@jupiterone/integration-sdk-core 8.1.0 → 8.2.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.
@@ -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 IntegrationExecutionContext<TConfig extends IntegrationInstanceConfig = IntegrationInstanceConfig> = ExecutionContext & {
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
  }
@@ -297,8 +297,8 @@
297
297
  "affectsGlobalScope": false
298
298
  },
299
299
  "../../../node_modules/@jupiterone/data-model/dist/RelationshipClass.d.ts": {
300
- "version": "44c6751f74dda336e79b3e1689688ea6acb0725fff87a0884ff6aa49f8d1e7b7",
301
- "signature": "44c6751f74dda336e79b3e1689688ea6acb0725fff87a0884ff6aa49f8d1e7b7",
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": "6c572cb0cc80ec71ec002e39b7917cd9410dc6bd3a1e0b834dd20b73d6db9112",
536
- "signature": "6c572cb0cc80ec71ec002e39b7917cd9410dc6bd3a1e0b834dd20b73d6db9112",
535
+ "version": "6117f065f5fcb6720b2a78db493031773ed1d972915881e362aeda71090eac93",
536
+ "signature": "6117f065f5fcb6720b2a78db493031773ed1d972915881e362aeda71090eac93",
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": "c9bbf1d56427cf8ecb8276caaa60a38cf961d6dbeb445c5a15c3f367e73d3720",
551
- "signature": "c9bbf1d56427cf8ecb8276caaa60a38cf961d6dbeb445c5a15c3f367e73d3720",
550
+ "version": "3bb7a2cbe38a48e65c8a80df422e3a0100e3ed0f293d11c355b8daab48178f72",
551
+ "signature": "3bb7a2cbe38a48e65c8a80df422e3a0100e3ed0f293d11c355b8daab48178f72",
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": "bc21346b9de5efe7e8cd464300d683eb9217e1449a76bfbccffd97af56f2579b",
576
- "signature": "8e3ac2a6307f130147aad76654298fd0fa55f67c253c5f1d0ff1c491269cee09",
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": "83cde32a7aefa7568de6d77fba63ee5b1d8b388c03b62eea9aa3053dea3c510e",
606
- "signature": "5c3127adee065bf7b37a65f629b88f53231dcd0d74af03877cf2f9e26cc74f3c",
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.1.0",
3
+ "version": "8.2.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.42.0",
26
+ "@jupiterone/data-model": "^0.43.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": "0ac133e50ed20a51949810d27d6ed873c977fc46"
33
+ "gitHead": "7531882f83d9ac9107f101c64e1b1e042c3bcd72"
34
34
  }