-
Notifications
You must be signed in to change notification settings - Fork 16
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes #321 - j1-integration document output in alphabetical order by …
…_type
- Loading branch information
1 parent
28baab2
commit 7964752
Showing
12 changed files
with
224 additions
and
2 deletions.
There are no files selected for viewing
83 changes: 83 additions & 0 deletions
83
packages/integration-sdk-cli/src/__tests__/__snapshots__/cli.test.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 1 addition & 0 deletions
1
...ntegration-sdk-private-test-utils/__fixtures__/docsInstanceEntitiesAlphabetize/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.j1-integration |
7 changes: 7 additions & 0 deletions
7
...vate-test-utils/__fixtures__/docsInstanceEntitiesAlphabetize/docs/jupiterone.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Integration with JupiterOne | ||
|
||
## Setup | ||
|
||
In this section, please provide details about how to set up the integration with | ||
JupiterOne. This may require provisioning some resources on the provider's side | ||
(perhaps a role, app, or api key) and passing information over to JupiterOne. |
10 changes: 10 additions & 0 deletions
10
...egration-sdk-private-test-utils/__fixtures__/docsInstanceEntitiesAlphabetize/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import fetchDataSteps from './steps/fetchData'; | ||
import { | ||
IntegrationInvocationConfig, | ||
IntegrationInstanceConfig, | ||
} from '@jupiterone/integration-sdk-core'; | ||
|
||
export const invocationConfig: IntegrationInvocationConfig<IntegrationInstanceConfig> = { | ||
instanceConfigFields: {}, | ||
integrationSteps: [fetchDataSteps], | ||
}; |
33 changes: 33 additions & 0 deletions
33
...dk-private-test-utils/__fixtures__/docsInstanceEntitiesAlphabetize/src/steps/fetchData.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import noop from 'lodash/noop'; | ||
import { StepExecutionContext, Step } from '@jupiterone/integration-sdk-core'; | ||
|
||
const fetchDataSteps: Step<StepExecutionContext> = { | ||
id: 'fetch-data', | ||
name: 'Fetch Data', | ||
entities: [ | ||
{ | ||
resourceName: 'The User 2', | ||
_type: 'my_user_2', | ||
_class: 'User', | ||
}, | ||
{ | ||
resourceName: 'The Group', | ||
_type: 'my_group', | ||
_class: 'Group', | ||
}, | ||
{ | ||
resourceName: 'The Group 2', | ||
_type: 'my_group_2', | ||
_class: 'Group', | ||
}, | ||
{ | ||
resourceName: 'The User', | ||
_type: 'my_user', | ||
_class: 'User', | ||
}, | ||
], | ||
relationships: [], | ||
executionHandler: noop, | ||
}; | ||
|
||
export default fetchDataSteps; |
1 change: 1 addition & 0 deletions
1
...ation-sdk-private-test-utils/__fixtures__/docsInstanceRelationshipsAlphabetize/.gitignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.j1-integration |
7 changes: 7 additions & 0 deletions
7
...test-utils/__fixtures__/docsInstanceRelationshipsAlphabetize/docs/jupiterone.md
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# Integration with JupiterOne | ||
|
||
## Setup | ||
|
||
In this section, please provide details about how to set up the integration with | ||
JupiterOne. This may require provisioning some resources on the provider's side | ||
(perhaps a role, app, or api key) and passing information over to JupiterOne. |
10 changes: 10 additions & 0 deletions
10
...ion-sdk-private-test-utils/__fixtures__/docsInstanceRelationshipsAlphabetize/src/index.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
import fetchAccountsStep from './steps/fetchAccounts'; | ||
import { | ||
IntegrationInvocationConfig, | ||
IntegrationInstanceConfig, | ||
} from '@jupiterone/integration-sdk-core'; | ||
|
||
export const invocationConfig: IntegrationInvocationConfig<IntegrationInstanceConfig> = { | ||
instanceConfigFields: {}, | ||
integrationSteps: [fetchAccountsStep], | ||
}; |
32 changes: 32 additions & 0 deletions
32
...e-test-utils/__fixtures__/docsInstanceRelationshipsAlphabetize/src/steps/fetchAccounts.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
import noop from 'lodash/noop'; | ||
import { StepExecutionContext, Step } from '@jupiterone/integration-sdk-core'; | ||
import { RelationshipClass } from '@jupiterone/data-model'; | ||
|
||
const fetchAccountsStep: Step<StepExecutionContext> = { | ||
id: 'fetch-accounts', | ||
name: 'Fetch Accounts', | ||
entities: [], | ||
relationships: [ | ||
{ | ||
_type: 'the_root_has_my_account_2', | ||
_class: RelationshipClass.HAS, | ||
sourceType: 'the_root', | ||
targetType: 'my_account_2', | ||
}, | ||
{ | ||
_type: 'the_root_has_my_account', | ||
_class: RelationshipClass.HAS, | ||
sourceType: 'the_root', | ||
targetType: 'my_account', | ||
}, | ||
{ | ||
_type: 'the_root_has_my_account_1', | ||
_class: RelationshipClass.HAS, | ||
sourceType: 'the_root', | ||
targetType: 'my_account_1', | ||
}, | ||
], | ||
executionHandler: noop, | ||
}; | ||
|
||
export default fetchAccountsStep; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters