-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
90db402
commit 3eda2d8
Showing
17 changed files
with
151 additions
and
90 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -31,15 +31,19 @@ Invoke an action, asking for human confirmation if necessary | |
|
||
```typescript | ||
await client.actions.invokeAction({ | ||
actionId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", | ||
userEmail: "string", | ||
actionId: "2b5cf2b8-3df3-11ef-9a96-332d4470d189", | ||
actionInputs: { | ||
textToAppend: "If you need more help, please contact your direct manager.", | ||
}, | ||
userEmail: "[email protected]", | ||
requireHumanConfirmation: true, | ||
humanConfirmationChannel: { | ||
type: "directMessage", | ||
channelId: "string", | ||
type: "slackThread", | ||
channelId: "ABC123", | ||
threadTimestamp: "123456789", | ||
}, | ||
justification: "string", | ||
auditLogId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", | ||
justification: "The user directly asked to update the Relocations Confluence document with this text.", | ||
auditLogId: "3df3f2b8-3df3-11ef-9a96-332d447011ef", | ||
}); | ||
``` | ||
|
||
|
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 |
---|---|---|
|
@@ -37,15 +37,19 @@ export class Actions { | |
* | ||
* @example | ||
* await client.actions.invokeAction({ | ||
* actionId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", | ||
* userEmail: "string", | ||
* actionId: "2b5cf2b8-3df3-11ef-9a96-332d4470d189", | ||
* actionInputs: { | ||
* "textToAppend": "If you need more help, please contact your direct manager." | ||
* }, | ||
* userEmail: "[email protected]", | ||
* requireHumanConfirmation: true, | ||
* humanConfirmationChannel: { | ||
* type: "directMessage", | ||
* channelId: "string" | ||
* type: "slackThread", | ||
* channelId: "ABC123", | ||
* threadTimestamp: "123456789" | ||
* }, | ||
* justification: "string", | ||
* auditLogId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" | ||
* justification: "The user directly asked to update the Relocations Confluence document with this text.", | ||
* auditLogId: "3df3f2b8-3df3-11ef-9a96-332d447011ef" | ||
* }) | ||
*/ | ||
public async invokeAction( | ||
|
@@ -62,8 +66,8 @@ export class Actions { | |
Authorization: await this._getAuthorizationHeader(), | ||
"X-Fern-Language": "JavaScript", | ||
"X-Fern-SDK-Name": "@credal/sdk", | ||
"X-Fern-SDK-Version": "0.0.17", | ||
"User-Agent": "@credal/sdk/0.0.17", | ||
"X-Fern-SDK-Version": "0.0.18", | ||
"User-Agent": "@credal/sdk/0.0.18", | ||
"X-Fern-Runtime": core.RUNTIME.type, | ||
"X-Fern-Runtime-Version": core.RUNTIME.version, | ||
}, | ||
|
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 |
---|---|---|
|
@@ -7,19 +7,28 @@ import * as Credal from "../../../../index"; | |
/** | ||
* @example | ||
* { | ||
* actionId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32", | ||
* userEmail: "string", | ||
* actionId: "2b5cf2b8-3df3-11ef-9a96-332d4470d189", | ||
* actionInputs: { | ||
* "textToAppend": "If you need more help, please contact your direct manager." | ||
* }, | ||
* userEmail: "[email protected]", | ||
* requireHumanConfirmation: true, | ||
* humanConfirmationChannel: { | ||
* type: "directMessage", | ||
* channelId: "string" | ||
* type: "slackThread", | ||
* channelId: "ABC123", | ||
* threadTimestamp: "123456789" | ||
* }, | ||
* justification: "string", | ||
* auditLogId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32" | ||
* justification: "The user directly asked to update the Relocations Confluence document with this text.", | ||
* auditLogId: "3df3f2b8-3df3-11ef-9a96-332d447011ef" | ||
* } | ||
*/ | ||
export interface InvokeActionRequest { | ||
actionId: string; | ||
/** | ||
* The inputs needed to execute the action | ||
* | ||
*/ | ||
actionInputs?: unknown; | ||
/** | ||
* The user who we should take the action on behalf of | ||
* | ||
|
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,5 +4,5 @@ | |
|
||
export interface SlackThread { | ||
channelId: string; | ||
threadTimestamp: number; | ||
threadTimestamp: string; | ||
} |
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
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
Oops, something went wrong.