Skip to content

Commit

Permalink
SDK regeneration
Browse files Browse the repository at this point in the history
  • Loading branch information
fern-api[bot] committed Dec 11, 2024
1 parent 90db402 commit 3eda2d8
Show file tree
Hide file tree
Showing 17 changed files with 151 additions and 90 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@credal/sdk",
"version": "0.0.17",
"version": "0.0.18",
"private": false,
"repository": "https://github.com/credal-ai/credal-typescript-sdk",
"main": "./index.js",
Expand Down
16 changes: 10 additions & 6 deletions reference.md
Original file line number Diff line number Diff line change
Expand Up @@ -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",
});
```

Expand Down
20 changes: 12 additions & 8 deletions src/api/resources/actions/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand All @@ -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,
},
Expand Down
21 changes: 15 additions & 6 deletions src/api/resources/actions/client/requests/InvokeActionRequest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
Expand Down
6 changes: 4 additions & 2 deletions src/api/resources/actions/types/ActionStatus.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@

export type ActionStatus =
| "PENDING_APPROVAL"
| "IN_PROGRESS"
| "APPROVED_IN_PROGRESS"
| "NO_APPROVAL_NEEDED_IN_PROGRESS"
| "APPROVED_SUCCEEDED"
| "APPROVED_FAILED"
| "NO_APPROVAL_NEEDED_SUCCEEDED"
| "NO_APPROVAL_NEEDED_FAILED";

export const ActionStatus = {
PendingApproval: "PENDING_APPROVAL",
InProgress: "IN_PROGRESS",
ApprovedInProgress: "APPROVED_IN_PROGRESS",
NoApprovalNeededInProgress: "NO_APPROVAL_NEEDED_IN_PROGRESS",
ApprovedSucceeded: "APPROVED_SUCCEEDED",
ApprovedFailed: "APPROVED_FAILED",
NoApprovalNeededSucceeded: "NO_APPROVAL_NEEDED_SUCCEEDED",
Expand Down
2 changes: 1 addition & 1 deletion src/api/resources/actions/types/SlackThread.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@

export interface SlackThread {
channelId: string;
threadTimestamp: number;
threadTimestamp: string;
}
36 changes: 18 additions & 18 deletions src/api/resources/copilots/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export class Copilots {
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,
},
Expand Down Expand Up @@ -129,8 +129,8 @@ export class Copilots {
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,
},
Expand Down Expand Up @@ -201,8 +201,8 @@ export class Copilots {
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,
},
Expand Down Expand Up @@ -271,8 +271,8 @@ export class Copilots {
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,
},
Expand Down Expand Up @@ -331,8 +331,8 @@ export class Copilots {
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,
},
Expand Down Expand Up @@ -411,8 +411,8 @@ export class Copilots {
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,
},
Expand Down Expand Up @@ -475,8 +475,8 @@ export class Copilots {
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,
},
Expand Down Expand Up @@ -549,8 +549,8 @@ export class Copilots {
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,
},
Expand Down Expand Up @@ -610,8 +610,8 @@ export class Copilots {
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,
},
Expand Down
12 changes: 6 additions & 6 deletions src/api/resources/documentCatalog/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,8 @@ export class DocumentCatalog {
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,
},
Expand Down Expand Up @@ -125,8 +125,8 @@ export class DocumentCatalog {
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,
},
Expand Down Expand Up @@ -214,8 +214,8 @@ export class DocumentCatalog {
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,
},
Expand Down
24 changes: 12 additions & 12 deletions src/api/resources/documentCollections/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,8 @@ export class DocumentCollections {
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,
},
Expand Down Expand Up @@ -135,8 +135,8 @@ export class DocumentCollections {
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,
},
Expand Down Expand Up @@ -205,8 +205,8 @@ export class DocumentCollections {
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,
},
Expand Down Expand Up @@ -273,8 +273,8 @@ export class DocumentCollections {
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,
},
Expand Down Expand Up @@ -357,8 +357,8 @@ export class DocumentCollections {
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,
},
Expand Down Expand Up @@ -443,8 +443,8 @@ export class DocumentCollections {
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,
},
Expand Down
12 changes: 6 additions & 6 deletions src/api/resources/permissionsService/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,8 @@ export class PermissionsService {
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,
},
Expand Down Expand Up @@ -137,8 +137,8 @@ export class PermissionsService {
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,
},
Expand Down Expand Up @@ -207,8 +207,8 @@ export class PermissionsService {
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,
},
Expand Down
4 changes: 2 additions & 2 deletions src/api/resources/search/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,8 @@ export class Search {
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,
},
Expand Down
4 changes: 2 additions & 2 deletions src/api/resources/users/client/Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,8 @@ export class Users {
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,
},
Expand Down
Loading

0 comments on commit 3eda2d8

Please sign in to comment.