@jupiterone/integration-sdk-core 8.1.2 → 8.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/src/errors.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const UNEXPECTED_ERROR_CODE = "UNEXPECTED_ERROR";
|
|
2
|
-
export declare const UNEXPECTED_ERROR_REASON = "Unexpected error occurred executing integration! Please contact us in Slack or at
|
|
2
|
+
export declare const UNEXPECTED_ERROR_REASON = "Unexpected error occurred executing integration! Please contact us in Slack, or alternatively email us at support@jupiterone.com if the problem continues to occur.";
|
|
3
3
|
export interface IntegrationErrorOptions {
|
|
4
4
|
message: string;
|
|
5
5
|
/**
|
package/dist/src/errors.js
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.shouldReportErrorToOperator = exports.isProviderAuthError = exports.isUserConfigError = exports.IntegrationProviderAuthorizationError = exports.IntegrationProviderAuthenticationError = exports.IntegrationProviderAPIError = exports.IntegrationValidationError = exports.IntegrationMissingKeyError = exports.IntegrationDuplicateKeyError = exports.UnaccountedStepStartStatesError = exports.StepStartStateUnknownStepIdsError = exports.IntegrationConfigLoadError = exports.IntegrationLocalConfigFieldTypeMismatchError = exports.IntegrationLocalConfigFieldMissingError = exports.IntegrationError = exports.UNEXPECTED_ERROR_REASON = exports.UNEXPECTED_ERROR_CODE = void 0;
|
|
4
4
|
exports.UNEXPECTED_ERROR_CODE = 'UNEXPECTED_ERROR';
|
|
5
|
-
exports.UNEXPECTED_ERROR_REASON = 'Unexpected error occurred executing integration! Please contact us in Slack or at
|
|
5
|
+
exports.UNEXPECTED_ERROR_REASON = 'Unexpected error occurred executing integration! Please contact us in Slack, or alternatively email us at support@jupiterone.com if the problem continues to occur.';
|
|
6
6
|
/**
|
|
7
7
|
* The base type of errors generated during integration execution. Integrations
|
|
8
8
|
* should not throw this error type directly; use one of the types documented
|
package/dist/src/errors.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG,kBAAkB,CAAC;AAC3C,QAAA,uBAAuB,GAClC,
|
|
1
|
+
{"version":3,"file":"errors.js","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":";;;AAAa,QAAA,qBAAqB,GAAG,kBAAkB,CAAC;AAC3C,QAAA,uBAAuB,GAClC,qKAAqK,CAAC;AAyBxK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAoCG;AACH,MAAa,gBAAiB,SAAQ,KAAK;IAgBzC,YAAY,OAAgC;;QAC1C,KAAK,CAAC,OAAO,CAAC,OAAO,CAAC,CAAC;QACvB,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;QACzB,IAAI,CAAC,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC;QAC3B,IAAI,CAAC,MAAM,GAAG,OAAO,CAAC,KAAK,CAAC;QAC5B,IAAI,MAAA,OAAO,CAAC,KAAK,0CAAE,KAAK,EAAE;YACxB,IAAI,CAAC,KAAK,IAAI,eAAe,GAAG,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;SACrD;IACH,CAAC;IAED;;OAEG;IACH,KAAK;QACH,OAAO,IAAI,CAAC,MAAM,CAAC;IACrB,CAAC;CACF;AAhCD,4CAgCC;AAED,MAAa,uCAAwC,SAAQ,gBAAgB;IAC3E,YAAY,OAAe;QACzB,KAAK,CAAC;YACJ,IAAI,EAAE,4BAA4B;YAClC,OAAO;SACR,CAAC,CAAC;IACL,CAAC;CACF;AAPD,0FAOC;AAED,MAAa,4CAA6C,SAAQ,gBAAgB;IAChF,YAAY,OAAe;QACzB,KAAK,CAAC;YACJ,IAAI,EAAE,kCAAkC;YACxC,OAAO;SACR,CAAC,CAAC;IACL,CAAC;CACF;AAPD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
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { IntegrationInstanceConfig } from './instance';
|
|
2
2
|
import { GetStepStartStatesFunction, Step } from './step';
|
|
3
3
|
import { InvocationValidationFunction } from './validation';
|
|
4
|
-
import { ExecutionContext, IntegrationExecutionContext, StepExecutionContext, IntegrationStepExecutionContext } from './context';
|
|
4
|
+
import { ExecutionContext, IntegrationExecutionContext, StepExecutionContext, IntegrationStepExecutionContext, IntegrationExecutionConfig } from './context';
|
|
5
5
|
import { Entity } from './entity';
|
|
6
6
|
/**
|
|
7
7
|
* Normalization transform for tracking keys in an integration. Allows
|
|
@@ -14,12 +14,16 @@ import { Entity } from './entity';
|
|
|
14
14
|
*/
|
|
15
15
|
export declare type KeyNormalizationFunction = (_key: string) => string;
|
|
16
16
|
export declare type BeforeAddEntityHookFunction<TExecutionContext extends ExecutionContext> = (context: TExecutionContext, entity: Entity) => Entity;
|
|
17
|
+
export declare type LoadExecutionConfigFunction<TInstanceConfig extends IntegrationInstanceConfig = IntegrationInstanceConfig, TExecutionConfig extends IntegrationExecutionConfig = IntegrationExecutionConfig> = (options: {
|
|
18
|
+
config: TInstanceConfig;
|
|
19
|
+
}) => TExecutionConfig;
|
|
17
20
|
export interface InvocationConfig<TExecutionContext extends ExecutionContext, TStepExecutionContext extends StepExecutionContext> {
|
|
18
21
|
validateInvocation?: InvocationValidationFunction<TExecutionContext>;
|
|
19
22
|
getStepStartStates?: GetStepStartStatesFunction<TExecutionContext>;
|
|
20
23
|
integrationSteps: Step<TStepExecutionContext>[];
|
|
21
24
|
normalizeGraphObjectKey?: KeyNormalizationFunction;
|
|
22
25
|
beforeAddEntity?: BeforeAddEntityHookFunction<TExecutionContext>;
|
|
26
|
+
loadExecutionConfig?: LoadExecutionConfigFunction;
|
|
23
27
|
/**
|
|
24
28
|
* An optional array of identifiers used to execute dependency
|
|
25
29
|
* graphs in a specific order. These values should match the
|
|
@@ -14,19 +14,37 @@ export interface ExecutionContext {
|
|
|
14
14
|
logger: IntegrationLogger;
|
|
15
15
|
executionHistory: ExecutionHistory;
|
|
16
16
|
}
|
|
17
|
+
/**
|
|
18
|
+
* A configuration object constructed by an integration just before the
|
|
19
|
+
* integration is executed. This is distinct from the
|
|
20
|
+
* `IntegrationInstanceConfig`, containing dynamic values perhaps calculated
|
|
21
|
+
* based on the instance config.
|
|
22
|
+
*/
|
|
23
|
+
export declare type IntegrationExecutionConfig = object;
|
|
17
24
|
/**
|
|
18
25
|
* @param TConfig the integration specific type of the `instance.config`
|
|
19
26
|
* property
|
|
20
27
|
*/
|
|
21
|
-
export declare type
|
|
28
|
+
export declare type IntegrationLoadExecutionConfigContext<TConfig extends IntegrationInstanceConfig> = ExecutionContext & {
|
|
22
29
|
instance: IntegrationInstance<TConfig>;
|
|
23
30
|
};
|
|
31
|
+
/**
|
|
32
|
+
* @param TConfig the integration specific type of the `instance.config`
|
|
33
|
+
* property
|
|
34
|
+
* @param TExecutionConfig the configuration type produced by the
|
|
35
|
+
* integration's optional `loadExecutionConfig` function
|
|
36
|
+
*/
|
|
37
|
+
export declare type IntegrationExecutionContext<TConfig extends IntegrationInstanceConfig = IntegrationInstanceConfig, TExecutionConfig extends IntegrationExecutionConfig = IntegrationExecutionConfig> = IntegrationLoadExecutionConfigContext<TConfig> & {
|
|
38
|
+
executionConfig: TExecutionConfig;
|
|
39
|
+
};
|
|
24
40
|
export declare type StepExecutionContext = ExecutionContext & {
|
|
25
41
|
jobState: JobState;
|
|
26
42
|
};
|
|
27
43
|
/**
|
|
28
44
|
* @param TConfig the integration specific type of the `instance.config`
|
|
29
45
|
* property
|
|
46
|
+
* @param TExecutionConfig the configuration type produced by the
|
|
47
|
+
* integration's optional `loadExecutionConfig` function
|
|
30
48
|
*/
|
|
31
|
-
export interface IntegrationStepExecutionContext<TConfig extends IntegrationInstanceConfig = IntegrationInstanceConfig> extends IntegrationExecutionContext<TConfig>, StepExecutionContext {
|
|
49
|
+
export interface IntegrationStepExecutionContext<TConfig extends IntegrationInstanceConfig = IntegrationInstanceConfig, TExecutionConfig extends IntegrationExecutionConfig = IntegrationExecutionConfig> extends IntegrationExecutionContext<TConfig, TExecutionConfig>, StepExecutionContext {
|
|
32
50
|
}
|
|
@@ -197,8 +197,8 @@
|
|
|
197
197
|
"affectsGlobalScope": false
|
|
198
198
|
},
|
|
199
199
|
"../src/errors.ts": {
|
|
200
|
-
"version": "
|
|
201
|
-
"signature": "
|
|
200
|
+
"version": "4143c3e63f944a11a978c7c0803dc461e15cb0cc480b20ae52cf22c583e46cbe",
|
|
201
|
+
"signature": "d60fdcb69d287beaac4191b4c389545f4b443b7b7d5d41337a45549884240e2e",
|
|
202
202
|
"affectsGlobalScope": false
|
|
203
203
|
},
|
|
204
204
|
"../../../node_modules/@types/lodash/common/common.d.ts": {
|
|
@@ -297,8 +297,8 @@
|
|
|
297
297
|
"affectsGlobalScope": false
|
|
298
298
|
},
|
|
299
299
|
"../../../node_modules/@jupiterone/data-model/dist/RelationshipClass.d.ts": {
|
|
300
|
-
"version": "
|
|
301
|
-
"signature": "
|
|
300
|
+
"version": "7c2aa1929759fee569c9eba25622b0b532abc90fe593184fa46a15a8ebbfe37d",
|
|
301
|
+
"signature": "7c2aa1929759fee569c9eba25622b0b532abc90fe593184fa46a15a8ebbfe37d",
|
|
302
302
|
"affectsGlobalScope": false
|
|
303
303
|
},
|
|
304
304
|
"../../../node_modules/@jupiterone/data-model/dist/relationships.d.ts": {
|
|
@@ -532,8 +532,8 @@
|
|
|
532
532
|
"affectsGlobalScope": false
|
|
533
533
|
},
|
|
534
534
|
"../../../node_modules/@jupiterone/data-model/dist/IntegrationSchema.d.ts": {
|
|
535
|
-
"version": "
|
|
536
|
-
"signature": "
|
|
535
|
+
"version": "3c971fba3f966d03f3f14c97ae3ffc43b82c16526ce7323a0570b52a7c7e358a",
|
|
536
|
+
"signature": "3c971fba3f966d03f3f14c97ae3ffc43b82c16526ce7323a0570b52a7c7e358a",
|
|
537
537
|
"affectsGlobalScope": false
|
|
538
538
|
},
|
|
539
539
|
"../../../node_modules/@jupiterone/data-model/dist/validateEntityWithSchema.d.ts": {
|
|
@@ -547,8 +547,8 @@
|
|
|
547
547
|
"affectsGlobalScope": false
|
|
548
548
|
},
|
|
549
549
|
"../../../node_modules/@jupiterone/data-model/dist/index.d.ts": {
|
|
550
|
-
"version": "
|
|
551
|
-
"signature": "
|
|
550
|
+
"version": "494b82b8dc805a27ef1fe1dd0fc8e23b1a94612867c404a7e6fb97b32e24c757",
|
|
551
|
+
"signature": "494b82b8dc805a27ef1fe1dd0fc8e23b1a94612867c404a7e6fb97b32e24c757",
|
|
552
552
|
"affectsGlobalScope": false
|
|
553
553
|
},
|
|
554
554
|
"../src/types/jobState.ts": {
|
|
@@ -572,8 +572,8 @@
|
|
|
572
572
|
"affectsGlobalScope": false
|
|
573
573
|
},
|
|
574
574
|
"../src/types/context.ts": {
|
|
575
|
-
"version": "
|
|
576
|
-
"signature": "
|
|
575
|
+
"version": "11560d1b1144f46e3ec5937ae34c5ae75a4559225350443bd0060b42abac6a25",
|
|
576
|
+
"signature": "e773b60c789844210fb71a9d1128a32e00ebb439a1754f83f6d03a528c506b56",
|
|
577
577
|
"affectsGlobalScope": false
|
|
578
578
|
},
|
|
579
579
|
"../src/types/persistedObject.ts": {
|
|
@@ -602,8 +602,8 @@
|
|
|
602
602
|
"affectsGlobalScope": false
|
|
603
603
|
},
|
|
604
604
|
"../src/types/config.ts": {
|
|
605
|
-
"version": "
|
|
606
|
-
"signature": "
|
|
605
|
+
"version": "e24c96c68acb773f7f7dcffcf9ace5b7feb15d2bed00772df404e3fde5f649eb",
|
|
606
|
+
"signature": "56f9040d9d5b5c31f5ee297052d578da43f0df72844f0c45a8db29173832e4d4",
|
|
607
607
|
"affectsGlobalScope": false
|
|
608
608
|
},
|
|
609
609
|
"../src/types/partialDatasets.ts": {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jupiterone/integration-sdk-core",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.3.0",
|
|
4
4
|
"description": "The SDK for developing JupiterOne integrations",
|
|
5
5
|
"main": "dist/src/index.js",
|
|
6
6
|
"types": "dist/src/index.d.ts",
|
|
@@ -23,12 +23,12 @@
|
|
|
23
23
|
"prepack": "yarn build:dist"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
|
-
"@jupiterone/data-model": "^0.
|
|
26
|
+
"@jupiterone/data-model": "^0.44.0",
|
|
27
27
|
"lodash": "^4.17.21",
|
|
28
28
|
"uuid": "^8.3.2"
|
|
29
29
|
},
|
|
30
30
|
"devDependencies": {
|
|
31
31
|
"@types/lodash": "^4.14.168"
|
|
32
32
|
},
|
|
33
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "c0aadb45b32b5266fd4710a632f6b6a5144c548d"
|
|
34
34
|
}
|