Skip to content

Commit 33db9bf

Browse files
Merge pull request #1197 from JupiterOne/feat/step-authorization-type
feat(core): add StepAuthorization interface to StepMetadata
2 parents 0dd90fe + 99856bb commit 33db9bf

File tree

1 file changed

+54
-0
lines changed
  • packages/integration-sdk-core/src/types

1 file changed

+54
-0
lines changed

packages/integration-sdk-core/src/types/step.ts

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,50 @@ export interface StepGraphObjectMetadataProperties {
215215
mappedRelationships?: StepMappedRelationshipMetadata[];
216216
}
217217

218+
/**
219+
* Describes the external authorization requirements that must be satisfied
220+
* for an integration step to execute successfully.
221+
*
222+
* Each property represents a specific type of authorization requirement.
223+
* Integrations declare only the properties that apply to their provider.
224+
*/
225+
export interface StepAuthorization {
226+
/**
227+
* IAM permissions granted to the integration principal.
228+
*/
229+
permissions?: string[];
230+
231+
/**
232+
* RBAC role assignments bound to the integration principal.
233+
*/
234+
roles?: string[];
235+
236+
/**
237+
* OAuth scopes granted to the application or service principal.
238+
*/
239+
oauthScopes?: string[];
240+
241+
/**
242+
* APIs or services that must be enabled in the target environment.
243+
*/
244+
apis?: string[];
245+
246+
/**
247+
* API endpoints that this step makes requests to.
248+
*/
249+
endpoints?: string[];
250+
251+
/**
252+
* Product licenses or SKUs required in the target environment.
253+
*/
254+
licenses?: string[];
255+
256+
/**
257+
* Links to provider documentation relevant to this step's setup or configuration.
258+
*/
259+
documentationLinks?: string[];
260+
}
261+
218262
export type StepMetadata = StepGraphObjectMetadataProperties & {
219263
/*
220264
* Identifier used to reference and track steps
@@ -259,6 +303,16 @@ export type StepMetadata = StepGraphObjectMetadataProperties & {
259303
*
260304
*/
261305
ingestionSourceId?: string;
306+
307+
/**
308+
* Describes the external authorization requirements that must be satisfied
309+
* for this step to execute successfully. Each property represents a
310+
* specific type of authorization requirement and is optional, allowing
311+
* integrations to declare only what applies to their provider.
312+
*
313+
* Used to generate documentation and communicate setup requirements to users.
314+
*/
315+
authorization?: StepAuthorization;
262316
};
263317

264318
export type StepExecutionHandlerWrapperFunction<

0 commit comments

Comments
 (0)