All notable changes to the @jupiterone/integration-sdk-*
projects will be
documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
- Support
executeStepWithDependencies
for steps with nodependencyGraphId
, even ifinvocationConfig.dependencyGraphOrder
is present
- Additional error type
IntegrationProviderRetriesExceededError
to be used when integration has exhausted all of the retries. This error type won't be sent in as an alert to the operators.
- Reduced max upload size to 1 MB.
- Additional logging when upload errors occur
- Bumped version
@jupiterone/data-model
to v0.47.0
j1
commandsexport
andimport
now accept optional command parameter --api-base-url to specify a different URL to run against.
j1-integration
commandssync
,run
, andvalidate-question-file
now accept optional command parameter --api-base-url to specify a different URL to run against.
- SDK now proactively truncates rawData entries when uploads would exceed 6 megabytes.
- Bumped version of
@jupiterone/data-model
to v0.46.0
- pass client-generated correlation id with sync job uploads
- Log error
code
when an integration logs an error - Throw an
IntegrationError
with codeINTEGRATION_UPLOAD_FAILED
when the JupiterOne system responds withRequestEntityTooLargeException
- [#660] - Trigger fatal error when JupiterOne system responds with
JOB_NOT_AWAITING_UPLOADS
- Fixed an error where if
retryOptions
wasundefined
default options would not be adopted
retryOptions
parameter tocreateApiClient
to allow configuration of the retry behavior forAlpha
- Neo4j uploads now include all properties for mapped entities.
IngestionLimitEncountered
type to IntegrationErrorEventName and
IntegrationWarnEventName.
- Bumped version of
@jupiterone/data-model
to v0.45.0
Add support for empty string values to assignTags.
Export EntityCoreProperties to all type inference to work outside this project.
Fix #638 - The Neo4j ingestion tool was ignoring properties with the value
false
.
With this fix, the following query is supported:
MATCH (user:User {
mfaEnabled: false
}) RETURN user
- #633 Support
_class
as a node label property for entities created by the Neo4j store.
Example query by _type
:
MATCH (account:github_account)-[OWNS]->
(repo:github_repo)-[ALLOWS]->
(user:github_user {
role:"OUTSIDE"
})
RETURN account, repo, user
Example query by _class
:
MATCH (account:Account)-[OWNS]->
(repo:CodeRepo)-[ALLOWS]->
(user:User {
role:"OUTSIDE"
})
RETURN account, repo, user
- All types and classes used for labels are now being sanitized.
Fix #629 - Create relationships
from Neo4j store using _class
as the label instead of _type
Which GitHub repositories are accessible to outside collaborators?
Old query:
MATCH (n:github_repo)-[r:github_repo_allows_user]->(u:github_user{role:"OUTSIDE"})
RETURN n, u
MATCH (account:github_account)-[github_account_owns_repo]->
(repo:github_repo)-[github_repo_allows_user]->
(user:github_user {
role:"OUTSIDE"
})
RETURN account, repo, user
New query:
MATCH (account:github_account)-[OWNS]->
(repo:github_repo)-[ALLOWS]->
(user:github_user {
role:"OUTSIDE"
})
RETURN account, repo, user
- Bumped
@types/jest@^27.1.0
in order to fix Namespace 'NodeJS' has no exported member 'Global'. issues captured here: jestjs/jest#11640
- Changed logger to fully mask config field values, rather than displaying last 4 chars
-
Added
.toMatchStepMetadata
jest matcher. This matcher complements theexecuteStepWithDependencies
utility. Usage:const stepResult = await executeStepWithDependencies({ stepId: Steps.FETCH_USERS.id, invocationConfig, instanceConfig, }); expect(stepResult).toMatchStepMetadata({ stepId: Steps.FETCH_USERS.id, invocationConfig, });
-
Updated jest matchers in the following way:
- added optional
_type
argument to.toMatchGraphObjectSchema
matcher - added optional
_type
and_class
arguments to.toMatchDirectRelationshipSchema
matcher
This enables developers to simply pass the
StepEntityMetadata
andStepRelationshipMetadata
interfaces to these matchers. Usage:expect(collectedEntities).toMatchGraphObjectSchema(Entities.USER); expect(collectedRelationships).toMatchDirectRelationshipSchema( Relationships.ACCOUNT_HAS_USER, );
- added optional
-
Added optional
schema
property toStepGraphObjectMetadata
. This allows developers to provide the property schema to expect on entities, relationships, and mapped relationships. This serves two uses:- Schemas can be used at runtime or test-time to verify that an entity has the correct properties
- The
j1-integration document
command could automatically produce consumer documentation about the properties that an entity / relationship is expected to have
-
Added
executeStepWithDependencies
utility to@jupiterone/integration-sdk-testing
package. This allows developers to test specific integration steps in isolation, while assuring that all of its dependencies have indeed executed. Usage:const { collectedEntities, collectedRelationships, collectedData } = await executeStepWithDependencies({ stepId: Steps.FETCH_USERS.id, invocationConfig, instanceConfig, }); expect(collectedEntities.length).toBeGreaterThan(0); expect(collectedEnities).toMatchGraphObjectSchema({ _class: Entities.USER._class, schema: Entities.USER.schema, }); // ... additional expectations
-
Added
MockJobState.collectedData
to capture data that has been collected in the job state. Usage:const jobState = createMockJobState({ setData: { existingKey: 'existing-value' }, }); await executeStepThatAddsAccountEntity(); expect(jobState.collectedData).toEqual({ ACCOUNT_ENTITY: { _type: 'account', _class: 'Account', _key: 'account1', }, }); expect(jobState.collectedData.existingKey).toBeUndefined();
- Added ability to disable matching class schema in toMatchGraphObjectSchema
- Fixed #603 - Add missing
chalk
production dependency to@jupiterone/integration-sdk-cli
- Bumped version of
@jupiterone/data-model
to addstate
property toHost
entity class
Updated the error message within the sdk-core to reference support email instead of the support.jupiterone.io site.
-
Added the
loadExecutionConfig
lifecycle method to theInvocationConfig
interface.loadExecutionConfig
loads shared configuration assets, such as shared API credentials. Example:import { fromTemporaryCredentials } from '@aws-sdk/credential-providers'; /** * The AWS integration uses shared `fromTemporaryCredentials` across all of * its clients. */ export function loadExecutionConfig({ config: { roleArn: string, externalId: string }, }) { return { credentials: fromTemporaryCredentials({ params: { RoleArn: config.roleArn, ExternalId: config.externalId, RoleSessionName: `juptierone-${uuid()}`, }, }), }; }
- Bump
@jupiterone/data-model
to exposeRelationshipClass.SENDS
- Bump
@jupiterone/data-model
to remove warning messages forUser
andPerson
entities
- Fixed an issue where the
j1-integration neo4j
command was callingtoString()
on undefined properties in some cases
- Bump
@jupiterone/data-model
to exposeRelationshipClass.HOSTS
andRelationshipClass.LOGS
- CLI now has a command called
neo4j
that will upload any collected data in a project to a local Neo4j database. This requires that a NEO4J_URI, NEO4J_USER, and NEO4J_PASSWORD be supplied in the local .env file.
-
*BREAKING* Explicitly require a
_key
property when usingcreateIntegrationEntity()
. Previously, thecreateIntegrationEntity()
function allowed the_key
property to be optional, and when not present, the function automatically uses eitherid
orproviderId
as the entity_key
.This caused (entirely preventable) runtime errors if the given
source
data did not have anid
orproviderId
property available. -
Updated the interfaces for
jobState.findEntity
andjobState.hasKey
to allowundefined
. Oftentimes, we use optional chaining withjobState.findEntity
orjobState.hasKey
, so having the ability to passundefined
into these methods can make our code easier to read.// without allowing `undefined`, we often need to assert values as `string` const virtualMachineId = await jobState.findEntity( nic.virtualMachine?.id as string, ); // by allowing `undefined`, we can more safely use these methods without type assertions const virtualMachineId = await jobState.findEntity(nic.virtualMachine?.id);
- Fixed the way that symlinks are created on windows machines. Directories are
still created as simlinks, but files are now hardlinks to prevent the
requirement that
yarn start
be run with admin credentials.
- Bump
@pollyjs
packages in@jupiterone/integration-sdk-testing
and@jupiterone/integration-sdk-cli
- Bump
@jupiterone/data-model
to exposeVIOLATES
relationship class.
- #567 - Add utility function that truncates an entity property value
- Do not retry
RequestEntityTooLargeException
s
-
Added support to publish job log events at level
info
,warn
, anderror
.Usage:
logger.publishInfoEvent({ name: IntegrationErrorEventName.Stats, description: 'fetched 100000 records', }); logger.publishWarnEvent({ name: IntegrationErrorEventName.MissingPermission, description: 'Missing permission users.read', }); logger.publishErrorEvent({ name: IntegrationErrorEventName.MissingPermission, description: 'Missing permission users.read', });
-
Added support for relative paths in
yarn j1-integration *
commands
- Drop support for any version below Node 14.x. The build now only targets 14.x
- When an
IntegrationError
receives acause
property, appendcause.stack
to the error's stack trace
- Bump
@jupiterone/data-model
to exposeIssue
entity class.
- Use the default path
{CWD}/jupiterone/questions/questions.yaml
for the--file-path
argument ofj1-integration validate-question-file
- Introduce
j1-integration validate-question-file
command that is used to automatically validate managed questions and JupiterOne queries
- Added
toImplementSpec
jest matcher - Added
StepSpec
andIntegrationSpecConfig
types in order to define integration specifications
- Changed language for relationships created that document command produces.
- Add mapped relationship details to documentation output
- Bump
@jupiterone/data-model
to exposeSecret
entity class.
- Bump
@jupiterone/data-model
to exposeQuestion
entity class.
- Bump
@jupiterone/data-model
to exposeRelationshipClass.ENFORCES
- Add
j1-integration collect --project-path
to allow for executing against a project in any location - Add
j1-integration sync --project-path
to allow for executing against a project in any location - Add
j1-integration run --project-path
to allow for executing against a project in any location - Add
j1-integration run --development
to match other commands that connect to JupiterOne development environment - Add
j1-integration visualize --output-file
to allow for specifying the output file path - Add the
j1-integration visualize --data-dir
value to the error content of the generated file when there were no entities or relationships to render
- Improve grammar and consistency of CLI help content
- Change
j1-integration visualize --data-dir
to support absolute path, complementing added support for--project-path
on other commands
- Fix
j1-integration document --output-file
to reflect that it is a path relative to--project-path
- Fixed the way that symlinks are created on windows machines, which previously
threw
EPERM: operation not permitted, symlink
- Add optional
mappedRelationships
to step metadata
- Changed how
j1-integration visualize
displays placeholder entities. Now only properties present intargetFilterKeys
are displayed in the graph, making target entities smaller. Also, set borders of placeholder entities to dashed. - Bump
@jupiterone/data-model
to exposeAlert
entity schema. createEventPublishingQueue
takes in an optional Axios config.
- Track summary of collected graph object
_type
's and the number of times that each_type
has been encountered
- Bump
@jupiterone/data-model
to exposeProblem
entity schema.
- A single DataStore is now used for all dependency graphs executed in an integration run.
- Used default J1 colors for
yarn j1-integration visualize-types
command.
- a
dependencyGraphOrder
property to the InvocationConfig and adependencyGraphId
property to the StepMetadata which togeather can be used to create multiple ordered dependency graphs per execution.
- Bump
@jupiterone/data-model
to incorporateRelationshipClass.PUBLISHED
- Added
deleteData()
for jobState Usage:await jobState.setData('abc', true); await jobState.getData('abc'); // true await jobState.deleteData('abc'); // void await jobState.getData('abc'); // undefined
- Added
development
option toj1-integration sync
command.
- Removed
j1-integration compare
command. Developers should usej1-integration diff
in its place.
- Added
j1-integration diff
command to ouptut colorized diffs of old/new integrations. - Allow overriding integration instance properties when running integrations locally.
- #494 - Expose 401 Unauthorized errors from synchronization API
- Upgrade
@jupiterone/data-model@^0.30.0
- Added
toTargetEntities()
jest matcher for mapped relationship validation. Usage:expect([mappedRel1, mappedRel2]).toTargetEntities([ entity1, entity2, entity3, ]);
- Expanded the interface of
findEntity
to acceptstring | undefined
.
- Upgrade
@jupiterone/data-model@^0.28.0
- Fix missing CLI
compare
sub command. - Fix
compare
relationship key tracking. - Ignore metadata graph object properties in
compare
.
- Upgrade
@jupiterone/data-model@^0.27.0
- Add
compare
method to@jupiterone/integration-sdk-cli
which is used to diff data sets downloaded from JupiterOne.
- Upgrade
@jupiterone/data-model@^0.24.0
- Upgrade
@jupiterone/data-model@^0.22.2
- #470 Introduce
beforeAddEntity
hook intoIntegrationInvocationConfig
. See the development documentation for more information on its usage.
- Upgrade
@jupiterone/data-model@^0.22.1
- Upgrade
@jupiterone/data-model@^0.22.0
- Improved the performance of
jobState.findEntity()
when entities are written on disk. - Removed
GraphObjectStore.getEntity()
, and added.findEntity()
to the specification.
parseStringPropertyValue()
acceptsstring | undefined | null
as a convenience for cases where provider data answersundefined
ornull
values.- Updated numerous dependencies, including
typescript
andeslint
.
IntegrationProviderAuthorizationError
andIntegrationProviderAuthenticationError
constructors were not compatible withIntegrationProviderAPIError
, making for linting errors in projects that would expect them to be.
- Upgrade
@jupiterone/data-model@^0.18.0
- Additional logged information in uploads error case
- Additional logged information in uploads
- #429 - fixed
toMatchGraphObjectSchema
failure when multiple classes share sameenum
property name.
- #426 - Update return typings
for
jobState.getData
to be more realistic
Old:
getData: <T>(key: string) => Promise<T>;
New:
getData: <T>(key: string) => Promise<T | undefined>;
- Updated packages in
@jupiterone/integration-sdk-core
- Expose the following read-only properties on
IntegrationProviderAPIError
endpoint
status
statusText
- Added log statement after
uploadData()
successfully sends data to synchronizer.
- Allow duplicate key tracker to grow greater than V8 engine limit. See #420.
- Whitespace trimming of integration config values.
- Support for skipping writing graph object files when running CLI commands
- Skip logging warn message when a
CredentialsError
is received in graph object uploads.
- Support for specifying the upload batch size via the
uploadBatchSize
increatePersisterApiStepGraphObjectDataUploader
.
JobState.hasKey()
as an efficient means of determining whether an entity or relationship has been added. This allows integrations to avoid doing any of their own key tracking.
- A
createIntegrationEntity
bug in transferring source properties into an entity caused a memory leak.
-
Support for omitting specific graph objects from file storage. Some entities and relationships do not need to be stored on the file system at all. We only need to store graph objects on the file system if we later intend to fetch the data from the job state or iterate over the
_type
.Usage in an integration step:
{ id: 'my-step', name: 'My step', entities: [ { resourceName: 'The Record', _type: 'my_record', _class: ['Record'], indexMetadata: { // This _type will not be written to the file system enabled: false, }, }, ], relationships: [], async exeutionHandler() { ... } }
See PR #404
- Fixed issue where the SDK could upload empty entity and relationship graph object files.
-
OPTIMIZATION: Buffer entities and relationships in memory and allow for fast lookups. This change allows us to skip flushing to disk anytime there is a call to
findEntity
,iterateEntities
oriterateRelationships
.See PR #395
-
OPTIMIZATION: Allow
FileSystemGraphObjectStore
to specifygraphObjectBufferThreshold
, which defines the maximum number of graph objects that the graph object store can buffer into memory before flushing to disk. Machines with more memory should consider increasing this value as the default is500
.See PR #395
-
OPTIMIZATION: Continuously upload integration data during collection phase. Previously, our integrations had two primary phases. The first phase was the collection phase, and the second phase was the upload phase. The integration SDK now mixes these two phases and the integrations will upload the collected data to JupiterOne during the integration execution step that it has been collected in.
See PR #396
-
OPTIMIZATION: Reduce the size of the graph object files that are stored on disk by default. Previously, all graph object files written to disk while running the integration locally and running the integration in the managed JupiterOne runtime, were created with whitespace. The file whitespace is now only created when running the integration locally via the CLI commands.
See PR #399
- Remove
BucketMap
as it's no longer used in theFileSystemGraphObjectStore
.BucketMap
was technically exposed externally, but should not have been used externally.
- Added
registerEventHandlers
andunregisterEventHandlers
exports from the runtime package. These functions will register a common set of event handlers that handle out-of-band errors that can be thrown in integration steps, such asunhandledRejection
andmultipleResolves
. These handlers should be added to any deployment projects that invokeexecuteIntegrationInstance
. Developers should instrument these event handlers as early as possible in the node process. - Added
registerIntegrationLoggerEventHandlers
andunregisterIntegrationLoggerEventHandlers
as convenience functions, since JupiterOne infrastructure will handle these event emitter failures by callinglogger.error()
. - Added
registerEventHandlers
toexecuteIntegrationLocally
, so that events are caught when runningyarn j1-integration collect
. - Made
registerIntegrationEventHandlers
call the integration loggeronFailure
function.
- Increase concurrency on integration data uploads
- Implement retry logic around integration data uploads
ExecutionContext.executionHistory
is always provided to integrationsExecutionHistory.current: Execution
to provide information about the current execution.
ExecutionHistory
properties have been renamed as part of addingcurrent: Execution
, to avoid duplication in the naming:lastExecution
->previous
,lastSuccessfulExecution
->lastSuccessful
.- BREAKING:
executeIntegrationInstance
now requires anExecutionHistory
argument containing thecurrent: Execution
. - BREAKING:
executeWithContext(context: ExecutionContext, ...)
now requires thatExecutionContext.executionHistory
is provided.
- Log whether compression is enabled or not at beginning of execution
- Specifying the
INTEGRATION_FILE_COMPRESSION_ENABLED
environment variable will now compress local integration graph object files with Brotli compression on writes and decompress on reads.
-
Stop handling
IntegrationDuplicateKeyError
as fatal. Previously, this type of error would terminate the integration completely and no data would be ingested. Now, the step that raises this error will not complete, but all other steps will complete and partial datasets will be processed. -
Publish integration disk size event on interval
ExecutionContext.history?: ExecutionHistory
provides information about thelastExecution
andlastSuccessfulExecution
. Integrations may use this to limit data ingestion.- Allow
executeIntegrationInstance
to take a customGraphObjectStore
- Expose
BucketMap
andFileSystemGraphObjectStore
from@jupiterone/integration-sdk-runtime
- Steps may declare that a type of graph object will be
partial
to indicate that they will never ingest a complete set of some_type
s of entities/relationships.
- Refactored some tests
- Upgrade
@jupiterone/data-model@^0.15.0
- Removed
createApiClientWithApiKey
helper from runtime package. You must usecreateApiClient
for compatibility with new service tokens.
- Pass
onFailure
function to children ofIntegrationLogger
- Expose
onFailure
callback increateIntegrationLogger
- #362 - Added
onFailure
callback to integration logger constructor.
- #355 - Added
normalizeGraphObjectKey
argument to normalize lookups inDuplicateKeyTracker
. - Print link to
data-model
whentoMatchGraphObjectSchema
jest matcher fails.
- Update
@jupiterone/data-model
- Fixed unexpected behavior in
createIntegrationEntity()
whenstatus
property is set to anything exceptOnline
orActive
- Updated
@jupiterone/data-model
to version 0.13.0.
- Added
toMatchDirectRelationshipSchema
matcher.
- Upgrade to
@jupiterone/data-model@0.12.0
Entity.id
is nowstring | string[]
in thedata-model
(see PR). Integrations may enrich existing entities through mapped relationshiptargetEntity.id
values.
j1-integration visualize-type
command generates metadata graph of types- Added
--disable-schema-validation
flag toj1-integration collect
command. - Added optional
setData
input tocreateMockJobState()
test util.
- Introduced
shouldReportErrorToOperator
function for integration runtime environments to check whether anError
is of a type that need not be alerted to deployment operators. AllError
s other than those only an end user can resolve should be reported. - #333 - Made
ToMatchGraphObjectSchemaParams.schema
property optional in jest matcher. - Changed index signature of
AdditionalRelationshipProperties
to not allow Array or Object types.
- #321 -
j1-integration document
output in alphabetical order by entity metadataresourceName
property and relationship metadata_type
property.
- Upgrade to
@jupiterone/data-model@0.9.0
- #301 - Fix test
findEntity
for initialized entities in aMockJobState
.
-
#291 - Introduce
j1-integration document
command that is used to automatically generate documentation in{integration-proj-dir}/docs/jupiterone.md
. -
#284 - Introduce
jobState.findEntity
, which will returnnull
if the entity does not exist.
Example:
const entity = await jobState.findEntity('entity-key-here');
- #303 Export
RelationshipClass
from the@jupiterone/data-model
inside of@jupiterone/integration-sdk-core
.
Usage:
import { RelationshipClass } from '@jupiterone/integration-sdk-core';
-
BREAKING #291 - Remove
types
fromIntegrationStep
in favor ofentities
andrelationships
, which contain metadata used to generate documentation. -
BREAKING #285 - Require a
RelationshipClass
from@jupiterone/data-model
to be specified in relationship creation functions.
Example:
import {
createDirectRelationship,
RelationshipClass
} from '@jupiterone/integration-sdk-core';
createDirectRelationship({
_class: RelationshipClass.HAS,
...
});
-
#288 - Remove deprecated
createIntegrationRelationship
function -
#306 - Remove
jobState.getEntity
in favor ofjobState.findEntity
- #293
toMatchGraphObjectSchema
generates an invalid JSON schema when using_class
with duplicaterequired
ortypes
properties.
- Updated
@jupiterone/data-model
to latest version (0.8.1
).
- #288 - Remove
sourceEntityType
fromRelationshipMapping
interface
-
#279 - Update
.eslintrc
to include eslint rules that will help catch async errors -
Updated root
.eslintrc
to use@jupiterone/integration-sdk-dev-tools/config/eslint.json
directly with specific overrides.
jobState.addRelationships
floating promise in@jupiterone/integration-sdk-testing
- Various async fixes in test suites
- Test instance of
jobState.getEntity()
threw error saying entity not found even though it was added to the job state.
- Install direct
deepmerge
dependency into@jupiterone/integration-sdk-testing
package.
- #270 - Return the Entity from
jobState.addEntity
andjobState.addEntities
Example:
const entity = await jobState.addEntity(convertToEntity(data));
const entity2 = await jobState.addEntity(convertToOtherEntity(entity2));
await jobState.addRelationship(
convertToRelationship(entity, entity2)
);
// Or this:
await jobState.addRelationship(
convertToRelationship(
await jobState.addEntity(convertToEntity(data))
await jobState.addEntity(convertToOtherEntity(entity2))
)
);
- Fixed
visualize
cmd where mapped relationships did not considertargetFilterKey
when matching entities - Fixed
visualize
cmd where multiple nodes with the same nodeId could be created, which causes rendering to fail
- Automatically register custom Jest test matchers when using
@jupiterone/integration-sdk-dev-tools
. See: #265
- Added Jest test matcher for validating collected entities against a JSON schema. See: #263
Example:
expect(context.jobState.collectedEntities).toMatchGraphObjectSchema({
_class: ['Service'],
schema: {
additionalProperties: false,
properties: {
_type: { const: 'google_cloud_api_service' },
category: { const: ['infrastructure'] },
state: {
type: 'string',
enum: ['STATE_UNSPECIFIED', 'DISABLED', 'ENABLED'],
},
enabled: { type: 'boolean' },
usageRequirements: {
type: 'array',
items: { type: 'string' },
},
_rawData: {
type: 'array',
items: { type: 'object' },
}
}
});
- Added
getEntity({ _type, _key })
function - Added optional
sourceEntityType
property onRelationshipMapping
- Deprecated
createIntegrationRelationship
. Developers should use the exportedcreateDirectRelationship
orcreateMappedRelationship
functions.
j1-integration visualize
added mapped relationships as dashed lines.
j1-integration visualize
entities are colored by_type
.- Updated
IntegrationConfig
to support asynchronousgetStepStartStates
. See #254 for more information.
Example:
export const invocationConfig: IntegrationInvocationConfig<IntegrationConfig> = {
async getStepStartStates(ctx) {
return {
'fetch-users': { disabled: await checkFetchUsersStepDisabled(ctx) }
};
},
...
};
- Disk usage metrics are now published by the logger.
- Updated
@jupiterone/data-model
to latest version (0.7.1
).
@jupiterone/integration-sdk-dev-tools
did not includets-node
, so thatyarn start
would fail to execute with 'Integration invocation configuration not found. Configuration should be exported as "invocationConfig" from "src/index".'
publishMetric
now logs the metric that is published.
- The
validateInvocation
function will have certain types of errors it throws (IntegrationValidationError
,IntegrationProviderAuthenticationError
) logged atlevel: 40
(warn) instead oflevel: 50
(error). These are types that are considered handled user errors and are expected to be communicated to the user in a way that allows them to address the problem. All other error types thrown from the function will continue to be logged atlevel: 50
.
- Replace
createMockIntegrationLogger
implementation with a silent version of the logger exposed by@jupiterone/integration-sdk-runtime
.
- Decoupled synchronization event publishing from the
IntegrationLogger
. Event publishing can now be performed by listening to events that the logger publishes.
- Remove the need for the
JUPITERONE_DISABLE_EVENT_LOGGING
environment variable. - Removed
ApiClient
type from the@jupiterone/integration-sdk-core
package. Also removed the dependency onaxios
from the package as well. - Removed
registerSynchronizationContext
function from theIntegrationLogger
convertProperties
supports an optionparseTime
, directing the function to convert properties that are named with common suffixes (on, at, time, date) to a UNIX timestamp (number).- Added
publishMetric
function toIntegrationLogger
that now causes ametric
event to be emit.
- Allow extended types of Relationships/Entities to be iterated over with
iterateEntities
anditerateRelationships
onJobState
- Added the
@jupiterone/integration-sdk-dev-tools
package which contains some shared development dependencies and configuration files.
createIntegrationRelationship
made_key
optional for relationship mappings, a fine thing to do because specifying the_key
for those insn't necessary. However, the function was changed at the same time to stop generating a_key
, which is required to ensure the collected relationships are unique. This fixes things so the_key
remains an optional argument, and improves the generation of the_key
to ensure better uniqueness.
- Regression:
createIntegrationRelationship()
lost a change to accept optional_type
for relationship mappings, overriding the generated value or values provided inproperties
option. - Removed
@types/vis
from dependencies to devDependencies because having the type forces typescript consumers to haveDOM
in the theirlib
compiler option.
- Make published packages leaner by only including
dist
files.
createIntegrationRelationship
for a mapped relationship would attempt to generate a_key
value when none was provided. This is not useful for a mapped relationship since these are not actually a relationship, but a directive to the mapper to produce one or more relationships, each of which would not have the provided/generated_key
.
- Removed the deprecated convention based invocation config loading.
convertProperties
would transfer an Array such as[ null ]
. Now an Array where the first entry is an object is not transferred unlessstringifyArray: true
, orstringifyObjects: true
(the property will be an array full of JSON strings), and where the first value isnull
orundefined
, the property is not transferred at all.- Related to the removal of convention based configuration loading, the
createMockExecutionContext
andcreateMockStepExecutionContext
utilities exposed by@jupiterone/integration-sdk-testing
now requireinstanceConfigFields
to be passed in for config value generation to work.
- Upgrade to
@jupiterone/data-model@0.6.4
Prior to the 1.0.0
release, all integration SDK functionality was exposed by
the @jupiterone/integration-sdk
package. That package has now been split up
into the following packages:
@jupiterone/integration-sdk-core
@jupiterone/integration-sdk-runtime
@jupiterone/integration-sdk-testing
@jupiterone/integration-sdk-cli
To view the changes that went into @jupiterone/integration-sdk
, please see
LEGACY_SDK_CHANGELOG.md.