From 5b56b9f7df4455dde43f45c230ae8abbd8af1ed7 Mon Sep 17 00:00:00 2001 From: Matthew Zember Date: Wed, 11 Oct 2023 13:18:46 -0400 Subject: [PATCH] remove unused params --- src/index.ts | 21 +-------------------- src/j1cli.ts | 6 ------ 2 files changed, 1 insertion(+), 26 deletions(-) diff --git a/src/index.ts b/src/index.ts index 32f8b84..ac5bd22 100644 --- a/src/index.ts +++ b/src/index.ts @@ -43,8 +43,6 @@ import { } from './queries'; import { query, QueryTypes } from './util/query'; -const J1_USER_POOL_ID_PROD = 'us-east-2_9fnMVHuxD'; -const J1_CLIENT_ID_PROD = '1hcv141pqth5f49df7o28ngq1u'; const QUERY_RESULTS_TIMEOUT = 1000 * 60 * 5; // Poll s3 location for 5 minutes before timeout. const J1QL_SKIP_COUNT = 250; const J1QL_LIMIT_COUNT = 250; @@ -180,10 +178,6 @@ export interface QueryResult { export interface JupiterOneClientOptions { account: string; - username?: string; - password?: string; - poolId?: string; - clientId?: string; accessToken?: string; dev?: boolean; useRulesEndpoint?: boolean; @@ -287,10 +281,6 @@ export class JupiterOneClient { graphClient: ApolloClient; headers?: Record; account: string; - username: string | undefined; - password: string | undefined; - poolId: string; - clientId: string; accessToken: string; useRulesEndpoint: boolean; apiUrl: string; @@ -300,10 +290,6 @@ export class JupiterOneClient { constructor({ account, - username, - password, - poolId = J1_USER_POOL_ID_PROD, - clientId = J1_CLIENT_ID_PROD, accessToken, dev = false, useRulesEndpoint = false, @@ -311,10 +297,6 @@ export class JupiterOneClient { logger = undefined, }: JupiterOneClientOptions) { this.account = account; - this.username = username; - this.password = password; - this.poolId = poolId; - this.clientId = clientId; this.accessToken = accessToken; this.useRulesEndpoint = useRulesEndpoint; @@ -334,7 +316,7 @@ export class JupiterOneClient { } async init(): Promise { - const token = this.accessToken + const token = this.accessToken; this.headers = { Authorization: `Bearer ${token}`, 'LifeOmic-Account': this.account, @@ -358,7 +340,6 @@ export class JupiterOneClient { return this; } - async queryV1( j1ql: string, options: QueryOptions | Record = {}, diff --git a/src/j1cli.ts b/src/j1cli.ts index cdcfdfc..276155c 100644 --- a/src/j1cli.ts +++ b/src/j1cli.ts @@ -15,8 +15,6 @@ import { program } from 'commander'; const writeFile = util.promisify(fs.writeFile); -const J1_USER_POOL_ID = process.env.J1_USER_POOL_ID; -const J1_CLIENT_ID = process.env.J1_CLIENT_ID; const J1_API_TOKEN = process.env.J1_API_TOKEN; const J1_DEV_ENABLED = process.env.J1_DEV_ENABLED; const EUSAGEERROR = 126; @@ -234,10 +232,6 @@ async function initializeJ1Client() { process.stdout.write('Authenticating with JupiterOne... '); const j1Client = await new JupiterOneClient({ account: program.account, - username: program.user, - password: program.password, - poolId: J1_USER_POOL_ID, - clientId: J1_CLIENT_ID, accessToken: program.key || J1_API_TOKEN, dev: J1_DEV_ENABLED === 'true', apiBaseUrl: program.apiBaseUrl,