diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index a8681da..d84ee6e 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -65,6 +65,7 @@ jobs: if: env.publish == 'true' env: NPM_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }} + publish: ${{ env.publish }} run: | echo "//registry.npmjs.org/:_authToken=${NPM_AUTH_TOKEN}" > .npmrc yarn diff --git a/src/index.new.test.ts b/src/index.new.test.ts index b4dd239..62b0713 100644 --- a/src/index.new.test.ts +++ b/src/index.new.test.ts @@ -47,12 +47,6 @@ describe('Core Index Tests', () => { test('queryGraphQL', () => { expect(j1).toHaveProperty('queryGraphQL'); }); - test('ingestEntities', () => { - expect(j1).toHaveProperty('ingestEntities'); - }); - test('ingestCommitRange', () => { - expect(j1).toHaveProperty('ingestCommitRange'); - }); test('mutateAlertRule', () => { expect(j1).toHaveProperty('mutateAlertRule'); }); diff --git a/src/index.ts b/src/index.ts index ba449c9..a2c3d65 100644 --- a/src/index.ts +++ b/src/index.ts @@ -169,17 +169,6 @@ export interface JupiterOneEntity { properties: any; } -export interface CommitRange { - account_uuid: string; - repo_uuid: string; - source: string; - destination: string; -} - -export interface IngestionResults { - entities: object[]; -} - export interface QueryResult { id: string; entity: object; @@ -452,38 +441,6 @@ export class JupiterOneClient { return res; } - async ingestEntities( - integrationInstanceId: string, - entities: any[], - ): Promise { - return fetch(this.apiUrl + '/integrations/ingest', { - method: 'POST', - body: JSON.stringify({ integrationInstanceId, entities }), - headers: { - 'Content-Type': 'application/json', - ...this.headers, - }, - }).then((res: any) => res.json()); - } - - async ingestCommitRange( - integrationInstanceId: string, - commitRange: CommitRange, - ): Promise { - return fetch(this.apiUrl + '/integrations/action', { - method: 'POST', - body: JSON.stringify({ - integrationInstanceId, - action: { name: 'INGEST', commitRange }, - }), - headers: { - 'Content-Type': 'application/json', - ...this.headers, - }, - timeout: 10000, - }).then((res: any) => res.json()); - } - async mutateAlertRule(rule: any, update: any) { const inlineQuestion = !!rule.instance?.question; let mutation;