Skip to content

Commit

Permalink
Merge pull request #305 from JupiterOne/303-relationshipclass-core
Browse files Browse the repository at this point in the history
Fixes #303 - Expose RelationshipClass from @jupiterone/integration-sdk-core
  • Loading branch information
austinkelleher authored Aug 24, 2020
2 parents 5cf43d9 + bccd2ea commit 5601d13
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 2 deletions.
1 change: 1 addition & 0 deletions packages/integration-sdk-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
"access": "public"
},
"scripts": {
"test": "jest",
"prebuild:dist": "rm -rf dist && mkdir dist",
"build:dist": "tsc -p tsconfig.dist.json --declaration",
"prepack": "yarn build:dist"
Expand Down
11 changes: 11 additions & 0 deletions packages/integration-sdk-core/src/__tests__/index.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { RelationshipClass } from '../index';

describe('#RelationshipClass', () => {
test('should export @jupiterone/data-model properties in the index', () => {
expect(
Object.values(RelationshipClass).filter((v) => typeof v !== 'string')
.length,
).toEqual(0);
expect(RelationshipClass.HAS).toEqual('HAS');
});
});
1 change: 1 addition & 0 deletions packages/integration-sdk-core/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
export * from './data';
export * from './types';
export * from './errors';
export { RelationshipClass } from '@jupiterone/data-model';
16 changes: 14 additions & 2 deletions packages/integration-sdk/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,16 @@ Example:
const entity = await jobState.findEntity('entity-key-here');
```

- [#303](https://github.com/JupiterOne/sdk/issues/303) Export
`RelationshipClass` from the `@jupiterone/data-model` inside of
`@jupiterone/integration-sdk-core`.

Usage:

```typescript
import { RelationshipClass } from '@jupiterone/integration-sdk-core';
```

### Changed

- **BREAKING** [#291](https://github.com/JupiterOne/sdk/issues/291) - Remove
Expand All @@ -46,8 +56,10 @@ await jobState.getEntity('myentitykey');
Example:

```typescript
import { RelationshipClass } from '@jupiterone/data-model';
import { createDirectRelationship } from '@jupiterone/integration-sdk-core';
import {
createDirectRelationship,
RelationshipClass
} from '@jupiterone/integration-sdk-core';

createDirectRelationship({
_class: RelationshipClass.HAS,
Expand Down

0 comments on commit 5601d13

Please sign in to comment.