Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix content-type header to prevent merging of duplicates #160

Merged
merged 1 commit into from
Jul 2, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
{
maxAttempts: 5,
delay: 1000,
handleError(err, context, options) {

Check warning on line 117 in src/index.ts

View workflow job for this annotation

GitHub Actions / test

'options' is defined but never used
const possibleFetchError = err as Partial<FetchError>;
const { httpStatusCode } = possibleFetchError;
if (httpStatusCode !== undefined) {
Expand Down Expand Up @@ -166,7 +166,7 @@

export interface JupiterOneEntity {
entity: JupiterOneEntityMetadata;
properties: any;

Check warning on line 169 in src/index.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type
}

export interface QueryResult {
Expand Down Expand Up @@ -286,7 +286,7 @@
};

export class JupiterOneClient {
graphClient: ApolloClient<any>;

Check warning on line 289 in src/index.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type
headers?: Record<string, string>;
account: string;
accessToken: string;
Expand Down Expand Up @@ -328,7 +328,7 @@
this.headers = {
Authorization: `Bearer ${token}`,
'LifeOmic-Account': this.account,
'Content-Type': 'application/json',
'content-type': 'application/json',
};

const uri = this.useRulesEndpoint ? this.rulesEndpoint : this.queryEndpoint;
Expand Down Expand Up @@ -361,7 +361,7 @@
) {
let complete = false;
let page = startPage;
let results: any[] = [];

Check warning on line 364 in src/index.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type

while (!complete && results.length < stopAfter) {
const j1qlForPage = `${j1ql} SKIP ${
Expand Down Expand Up @@ -432,7 +432,7 @@
return results;
}

async queryGraphQL(query: any) {

Check warning on line 435 in src/index.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type
const res = await this.graphClient.query({ query });
if (res.errors) {
this.logger.info(res.errors);
Expand All @@ -441,7 +441,7 @@
return res;
}

async mutateAlertRule(rule: any, update: any) {

Check warning on line 444 in src/index.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type

Check warning on line 444 in src/index.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type
const inlineQuestion = !!rule.instance?.question;
let mutation;
if (inlineQuestion) {
Expand Down Expand Up @@ -471,7 +471,7 @@
key: string,
type: string,
classLabels: string[],
properties: any,

Check warning on line 474 in src/index.ts

View workflow job for this annotation

GitHub Actions / test

Unexpected any. Specify a different type
): Promise<object> {
const res = await this.graphClient.mutate({
mutation: CREATE_ENTITY,
Expand Down
Loading