Skip to content

Commit

Permalink
remove unused params
Browse files Browse the repository at this point in the history
  • Loading branch information
zemberdotnet committed Oct 11, 2023
1 parent 2b0c42a commit 5b56b9f
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 26 deletions.
21 changes: 1 addition & 20 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -287,10 +281,6 @@ export class JupiterOneClient {
graphClient: ApolloClient<any>;

Check warning on line 281 in src/index.ts

View workflow job for this annotation

GitHub Actions / test (14.x, ubuntu-latest)

Unexpected any. Specify a different type
headers?: Record<string, string>;
account: string;
username: string | undefined;
password: string | undefined;
poolId: string;
clientId: string;
accessToken: string;
useRulesEndpoint: boolean;
apiUrl: string;
Expand All @@ -300,21 +290,13 @@ export class JupiterOneClient {

constructor({
account,
username,
password,
poolId = J1_USER_POOL_ID_PROD,
clientId = J1_CLIENT_ID_PROD,
accessToken,
dev = false,
useRulesEndpoint = false,
apiBaseUrl = undefined,
logger = undefined,
}: JupiterOneClientOptions) {
this.account = account;
this.username = username;
this.password = password;
this.poolId = poolId;
this.clientId = clientId;
this.accessToken = accessToken;
this.useRulesEndpoint = useRulesEndpoint;

Expand All @@ -334,7 +316,7 @@ export class JupiterOneClient {
}

async init(): Promise<JupiterOneClient> {
const token = this.accessToken
const token = this.accessToken;
this.headers = {
Authorization: `Bearer ${token}`,
'LifeOmic-Account': this.account,
Expand All @@ -358,7 +340,6 @@ export class JupiterOneClient {
return this;
}


async queryV1(
j1ql: string,
options: QueryOptions | Record<string, unknown> = {},
Expand Down
6 changes: 0 additions & 6 deletions src/j1cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 5b56b9f

Please sign in to comment.