Skip to content

Commit 792b4fb

Browse files
committed
Remove unused endpoints from client
1 parent 4914a33 commit 792b4fb

3 files changed

Lines changed: 1 addition & 49 deletions

File tree

.github/workflows/build.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ jobs:
6565
if: env.publish == 'true'
6666
env:
6767
NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
68+
publish: ${{ env.publish }}
6869
run: |
6970
echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc
7071
yarn

src/index.new.test.ts

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,6 @@ describe('Core Index Tests', () => {
4747
test('queryGraphQL', () => {
4848
expect(j1).toHaveProperty('queryGraphQL');
4949
});
50-
test('ingestEntities', () => {
51-
expect(j1).toHaveProperty('ingestEntities');
52-
});
53-
test('ingestCommitRange', () => {
54-
expect(j1).toHaveProperty('ingestCommitRange');
55-
});
5650
test('mutateAlertRule', () => {
5751
expect(j1).toHaveProperty('mutateAlertRule');
5852
});

src/index.ts

Lines changed: 0 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -169,17 +169,6 @@ export interface JupiterOneEntity {
169169
properties: any;
170170
}
171171

172-
export interface CommitRange {
173-
account_uuid: string;
174-
repo_uuid: string;
175-
source: string;
176-
destination: string;
177-
}
178-
179-
export interface IngestionResults {
180-
entities: object[];
181-
}
182-
183172
export interface QueryResult {
184173
id: string;
185174
entity: object;
@@ -452,38 +441,6 @@ export class JupiterOneClient {
452441
return res;
453442
}
454443

455-
async ingestEntities(
456-
integrationInstanceId: string,
457-
entities: any[],
458-
): Promise<IngestionResults> {
459-
return fetch(this.apiUrl + '/integrations/ingest', {
460-
method: 'POST',
461-
body: JSON.stringify({ integrationInstanceId, entities }),
462-
headers: {
463-
'Content-Type': 'application/json',
464-
...this.headers,
465-
},
466-
}).then((res: any) => res.json());
467-
}
468-
469-
async ingestCommitRange(
470-
integrationInstanceId: string,
471-
commitRange: CommitRange,
472-
): Promise<IngestionResults> {
473-
return fetch(this.apiUrl + '/integrations/action', {
474-
method: 'POST',
475-
body: JSON.stringify({
476-
integrationInstanceId,
477-
action: { name: 'INGEST', commitRange },
478-
}),
479-
headers: {
480-
'Content-Type': 'application/json',
481-
...this.headers,
482-
},
483-
timeout: 10000,
484-
}).then((res: any) => res.json());
485-
}
486-
487444
async mutateAlertRule(rule: any, update: any) {
488445
const inlineQuestion = !!rule.instance?.question;
489446
let mutation;

0 commit comments

Comments
 (0)