Skip to content

Commit 7c90080

Browse files
authored
Merge pull request #1155 from JupiterOne/INT-12497
INT-12497 - add support for system-internal
2 parents ed22246 + 216c738 commit 7c90080

File tree

1 file changed

+22
-4
lines changed
  • packages/integration-sdk-runtime/src/synchronization

1 file changed

+22
-4
lines changed

packages/integration-sdk-runtime/src/synchronization/index.ts

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,11 @@ export interface SynchronizeInput {
5454
* Using `'api'` will allow data to be uploaded without associating it with a specific integration instance. This is
5555
* useful when using the SDK to upload data from a script or other non-integration source.
5656
*/
57-
source: 'integration-managed' | 'integration-external' | 'api';
57+
source:
58+
| 'integration-managed'
59+
| 'integration-external'
60+
| 'api'
61+
| 'system-internal';
5862

5963
/**
6064
* The `scope` value used when creating the synchronization job. This value will be null when the
@@ -136,9 +140,23 @@ function buildJobConfiguration({
136140
integrationInstanceId,
137141
integrationJobId,
138142
}: SynchronizeInput) {
139-
return source === 'api'
140-
? { source, scope }
141-
: { source, integrationInstanceId, integrationJobId };
143+
if (source === 'api') {
144+
return {
145+
source,
146+
scope,
147+
};
148+
}
149+
150+
if (source === 'system-internal') {
151+
return {
152+
source,
153+
scope,
154+
integrationInstanceId,
155+
integrationJobId,
156+
};
157+
}
158+
159+
return { source, integrationInstanceId, integrationJobId };
142160
}
143161

144162
export interface SynchronizationJobContext {

0 commit comments

Comments
 (0)