Skip to content

Commit

Permalink
Update SDK to allow the new result field (#46)
Browse files Browse the repository at this point in the history
merging on behalf of Fangming
  • Loading branch information
ricardo-fierro-sp committed Oct 27, 2023
1 parent d910f51 commit 9f17e34
Show file tree
Hide file tree
Showing 3 changed files with 42 additions and 4 deletions.
32 changes: 32 additions & 0 deletions lib/commands/command.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,35 @@ export type EntitlementSchema = Schema & {
type: string,
includePermissions?: boolean
}

/**
* Granular result for an attribute to indicate partial attribule level success & warning & failure
*/
export type Result = {
attribute: string,
status?: ResultStatus,
messages?: ResultMessage[]
}

/**
* Status for result
*/
export enum ResultStatus {
Error = 'error',
}

/**
* Warning or error message for a result
*/
export type ResultMessage = {
level: ResultMessageLevel,
message: string
}

/**
* Level for result message
*/
export enum ResultMessageLevel {
WARN = 'WARN',
ERROR = 'ERROR',
}
5 changes: 3 additions & 2 deletions lib/commands/std-account-create.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Copyright (c) 2021. SailPoint Technologies, Inc. All rights reserved. */

import { AccountSchema, Attributes, ObjectOutput } from './command'
import { AccountSchema, Attributes, ObjectOutput, Result } from './command'

/**
* Input object of `std:account:create` command
Expand All @@ -17,5 +17,6 @@ export type StdAccountCreateInput = {
export type StdAccountCreateOutput = ObjectOutput & {
disabled?: boolean
locked?: boolean
attributes: Attributes
attributes: Attributes,
results?: Result[]
}
9 changes: 7 additions & 2 deletions lib/commands/std-account-update.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
/* Copyright (c) 2021. SailPoint Technologies, Inc. All rights reserved. */

import { AccountSchema, Attributes, ObjectInput, ObjectOutput } from './command'
import { AccountSchema, Attributes, ObjectInput, ObjectOutput, Result } from './command'

export enum AttributeChangeOp {
Add = 'Add',
Expand Down Expand Up @@ -30,4 +30,9 @@ export type StdAccountUpdateInput = ObjectInput & {
*
* All properties are optional for this output
*/
export type StdAccountUpdateOutput = ObjectOutput & { disabled?: boolean, locked?: boolean, attributes?: Attributes }
export type StdAccountUpdateOutput = ObjectOutput & {
disabled?: boolean,
locked?: boolean,
attributes?: Attributes,
results?: Result[]
}

0 comments on commit 9f17e34

Please sign in to comment.