@credal/sdk 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Client.d.ts +3 -0
- package/Client.js +17 -12
- package/api/resources/actions/client/Client.d.ts +46 -0
- package/api/resources/actions/client/Client.js +134 -0
- package/api/resources/actions/client/index.d.ts +1 -0
- package/api/resources/actions/client/index.js +17 -0
- package/api/resources/actions/client/requests/InvokeActionRequest.d.ts +46 -0
- package/api/resources/actions/client/requests/InvokeActionRequest.js +5 -0
- package/api/resources/actions/client/requests/index.d.ts +1 -0
- package/api/resources/actions/client/requests/index.js +2 -0
- package/api/resources/actions/index.d.ts +2 -0
- package/api/resources/actions/index.js +18 -0
- package/api/resources/actions/types/ActionStatus.d.ts +12 -0
- package/api/resources/actions/types/ActionStatus.js +14 -0
- package/api/resources/actions/types/Conversation.d.ts +6 -0
- package/api/resources/actions/types/Conversation.js +5 -0
- package/api/resources/actions/types/DirectMessage.d.ts +6 -0
- package/api/resources/actions/types/DirectMessage.js +5 -0
- package/api/resources/actions/types/HumanConfirmationChannel.d.ts +16 -0
- package/api/resources/actions/types/HumanConfirmationChannel.js +5 -0
- package/api/resources/actions/types/InvokeActionResponse.d.ts +8 -0
- package/api/resources/actions/types/InvokeActionResponse.js +5 -0
- package/api/resources/actions/types/SlackThread.d.ts +7 -0
- package/api/resources/actions/types/SlackThread.js +5 -0
- package/api/resources/actions/types/index.d.ts +6 -0
- package/api/resources/actions/types/index.js +22 -0
- package/api/resources/copilots/client/Client.d.ts +2 -2
- package/api/resources/copilots/client/Client.js +20 -20
- package/api/resources/copilots/client/requests/SendMessageRequest.d.ts +2 -2
- package/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +4 -4
- package/api/resources/copilots/types/InputVariable.d.ts +1 -1
- package/api/resources/copilots/types/StreamingChunk.d.ts +15 -1
- package/api/resources/documentCatalog/client/Client.d.ts +13 -0
- package/api/resources/documentCatalog/client/Client.js +67 -4
- package/api/resources/documentCatalog/types/SyncSourceByUrlRequest.d.ts +7 -0
- package/api/resources/documentCatalog/types/SyncSourceByUrlRequest.js +5 -0
- package/api/resources/documentCatalog/types/SyncSourceByUrlResponse.d.ts +6 -0
- package/api/resources/documentCatalog/types/SyncSourceByUrlResponse.js +5 -0
- package/api/resources/documentCatalog/types/index.d.ts +2 -0
- package/api/resources/documentCatalog/types/index.js +2 -0
- package/api/resources/documentCollections/client/Client.js +12 -12
- package/api/resources/index.d.ts +3 -0
- package/api/resources/index.js +4 -1
- package/api/resources/permissionsService/client/Client.js +6 -6
- package/api/resources/search/client/Client.js +2 -2
- package/api/resources/users/client/Client.js +2 -2
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +17 -12
- package/dist/api/resources/actions/client/Client.d.ts +46 -0
- package/dist/api/resources/actions/client/Client.js +134 -0
- package/dist/api/resources/actions/client/index.d.ts +1 -0
- package/dist/api/resources/actions/client/index.js +17 -0
- package/dist/api/resources/actions/client/requests/InvokeActionRequest.d.ts +46 -0
- package/dist/api/resources/actions/client/requests/InvokeActionRequest.js +5 -0
- package/dist/api/resources/actions/client/requests/index.d.ts +1 -0
- package/dist/api/resources/actions/client/requests/index.js +2 -0
- package/dist/api/resources/actions/index.d.ts +2 -0
- package/dist/api/resources/actions/index.js +18 -0
- package/dist/api/resources/actions/types/ActionStatus.d.ts +12 -0
- package/dist/api/resources/actions/types/ActionStatus.js +14 -0
- package/dist/api/resources/actions/types/Conversation.d.ts +6 -0
- package/dist/api/resources/actions/types/Conversation.js +5 -0
- package/dist/api/resources/actions/types/DirectMessage.d.ts +6 -0
- package/dist/api/resources/actions/types/DirectMessage.js +5 -0
- package/dist/api/resources/actions/types/HumanConfirmationChannel.d.ts +16 -0
- package/dist/api/resources/actions/types/HumanConfirmationChannel.js +5 -0
- package/dist/api/resources/actions/types/InvokeActionResponse.d.ts +8 -0
- package/dist/api/resources/actions/types/InvokeActionResponse.js +5 -0
- package/dist/api/resources/actions/types/SlackThread.d.ts +7 -0
- package/dist/api/resources/actions/types/SlackThread.js +5 -0
- package/dist/api/resources/actions/types/index.d.ts +6 -0
- package/dist/api/resources/actions/types/index.js +22 -0
- package/dist/api/resources/copilots/client/Client.d.ts +2 -2
- package/dist/api/resources/copilots/client/Client.js +20 -20
- package/dist/api/resources/copilots/client/requests/SendMessageRequest.d.ts +2 -2
- package/dist/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +4 -4
- package/dist/api/resources/copilots/types/InputVariable.d.ts +1 -1
- package/dist/api/resources/copilots/types/StreamingChunk.d.ts +15 -1
- package/dist/api/resources/documentCatalog/client/Client.d.ts +13 -0
- package/dist/api/resources/documentCatalog/client/Client.js +67 -4
- package/dist/api/resources/documentCatalog/types/SyncSourceByUrlRequest.d.ts +7 -0
- package/dist/api/resources/documentCatalog/types/SyncSourceByUrlRequest.js +5 -0
- package/dist/api/resources/documentCatalog/types/SyncSourceByUrlResponse.d.ts +6 -0
- package/dist/api/resources/documentCatalog/types/SyncSourceByUrlResponse.js +5 -0
- package/dist/api/resources/documentCatalog/types/index.d.ts +2 -0
- package/dist/api/resources/documentCatalog/types/index.js +2 -0
- package/dist/api/resources/documentCollections/client/Client.js +12 -12
- package/dist/api/resources/index.d.ts +3 -0
- package/dist/api/resources/index.js +4 -1
- package/dist/api/resources/permissionsService/client/Client.js +6 -6
- package/dist/api/resources/search/client/Client.js +2 -2
- package/dist/api/resources/users/client/Client.js +2 -2
- package/dist/serialization/resources/actions/client/index.d.ts +1 -0
- package/dist/serialization/resources/actions/client/index.js +17 -0
- package/dist/serialization/resources/actions/client/requests/InvokeActionRequest.d.ts +18 -0
- package/dist/serialization/resources/actions/client/requests/InvokeActionRequest.js +39 -0
- package/dist/serialization/resources/actions/client/requests/index.d.ts +1 -0
- package/dist/serialization/resources/actions/client/requests/index.js +5 -0
- package/dist/serialization/resources/actions/index.d.ts +2 -0
- package/dist/serialization/resources/actions/index.js +18 -0
- package/dist/serialization/resources/actions/types/ActionStatus.d.ts +10 -0
- package/dist/serialization/resources/actions/types/ActionStatus.js +38 -0
- package/dist/serialization/resources/actions/types/Conversation.d.ts +12 -0
- package/dist/serialization/resources/actions/types/Conversation.js +33 -0
- package/dist/serialization/resources/actions/types/DirectMessage.d.ts +12 -0
- package/dist/serialization/resources/actions/types/DirectMessage.js +33 -0
- package/dist/serialization/resources/actions/types/HumanConfirmationChannel.d.ts +22 -0
- package/dist/serialization/resources/actions/types/HumanConfirmationChannel.js +43 -0
- package/dist/serialization/resources/actions/types/InvokeActionResponse.d.ts +14 -0
- package/dist/serialization/resources/actions/types/InvokeActionResponse.js +35 -0
- package/dist/serialization/resources/actions/types/SlackThread.d.ts +13 -0
- package/dist/serialization/resources/actions/types/SlackThread.js +34 -0
- package/dist/serialization/resources/actions/types/index.d.ts +6 -0
- package/dist/serialization/resources/actions/types/index.js +22 -0
- package/dist/serialization/resources/copilots/types/InputVariable.d.ts +1 -1
- package/dist/serialization/resources/copilots/types/InputVariable.js +1 -1
- package/dist/serialization/resources/copilots/types/StreamingChunk.d.ts +13 -1
- package/dist/serialization/resources/copilots/types/StreamingChunk.js +11 -1
- package/dist/serialization/resources/documentCatalog/types/SyncSourceByUrlRequest.d.ts +13 -0
- package/dist/serialization/resources/documentCatalog/types/SyncSourceByUrlRequest.js +34 -0
- package/dist/serialization/resources/documentCatalog/types/SyncSourceByUrlResponse.d.ts +12 -0
- package/dist/serialization/resources/documentCatalog/types/SyncSourceByUrlResponse.js +33 -0
- package/dist/serialization/resources/documentCatalog/types/index.d.ts +2 -0
- package/dist/serialization/resources/documentCatalog/types/index.js +2 -0
- package/dist/serialization/resources/index.d.ts +3 -0
- package/dist/serialization/resources/index.js +4 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +145 -4
- package/serialization/resources/actions/client/index.d.ts +1 -0
- package/serialization/resources/actions/client/index.js +17 -0
- package/serialization/resources/actions/client/requests/InvokeActionRequest.d.ts +18 -0
- package/serialization/resources/actions/client/requests/InvokeActionRequest.js +39 -0
- package/serialization/resources/actions/client/requests/index.d.ts +1 -0
- package/serialization/resources/actions/client/requests/index.js +5 -0
- package/serialization/resources/actions/index.d.ts +2 -0
- package/serialization/resources/actions/index.js +18 -0
- package/serialization/resources/actions/types/ActionStatus.d.ts +10 -0
- package/serialization/resources/actions/types/ActionStatus.js +38 -0
- package/serialization/resources/actions/types/Conversation.d.ts +12 -0
- package/serialization/resources/actions/types/Conversation.js +33 -0
- package/serialization/resources/actions/types/DirectMessage.d.ts +12 -0
- package/serialization/resources/actions/types/DirectMessage.js +33 -0
- package/serialization/resources/actions/types/HumanConfirmationChannel.d.ts +22 -0
- package/serialization/resources/actions/types/HumanConfirmationChannel.js +43 -0
- package/serialization/resources/actions/types/InvokeActionResponse.d.ts +14 -0
- package/serialization/resources/actions/types/InvokeActionResponse.js +35 -0
- package/serialization/resources/actions/types/SlackThread.d.ts +13 -0
- package/serialization/resources/actions/types/SlackThread.js +34 -0
- package/serialization/resources/actions/types/index.d.ts +6 -0
- package/serialization/resources/actions/types/index.js +22 -0
- package/serialization/resources/copilots/types/InputVariable.d.ts +1 -1
- package/serialization/resources/copilots/types/InputVariable.js +1 -1
- package/serialization/resources/copilots/types/StreamingChunk.d.ts +13 -1
- package/serialization/resources/copilots/types/StreamingChunk.js +11 -1
- package/serialization/resources/documentCatalog/types/SyncSourceByUrlRequest.d.ts +13 -0
- package/serialization/resources/documentCatalog/types/SyncSourceByUrlRequest.js +34 -0
- package/serialization/resources/documentCatalog/types/SyncSourceByUrlResponse.d.ts +12 -0
- package/serialization/resources/documentCatalog/types/SyncSourceByUrlResponse.js +33 -0
- package/serialization/resources/documentCatalog/types/index.d.ts +2 -0
- package/serialization/resources/documentCatalog/types/index.js +2 -0
- package/serialization/resources/index.d.ts +3 -0
- package/serialization/resources/index.js +4 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests"), exports);
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Credal from "../../../../index";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* actionId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32",
|
|
9
|
+
* userEmail: "string",
|
|
10
|
+
* requireHumanConfirmation: true,
|
|
11
|
+
* humanConfirmationChannel: {
|
|
12
|
+
* type: "directMessage",
|
|
13
|
+
* channelId: "string"
|
|
14
|
+
* },
|
|
15
|
+
* justification: "string",
|
|
16
|
+
* auditLogId: "d5e9c84f-c2b2-4bf4-b4b0-7ffd7a9ffc32"
|
|
17
|
+
* }
|
|
18
|
+
*/
|
|
19
|
+
export interface InvokeActionRequest {
|
|
20
|
+
actionId: string;
|
|
21
|
+
/**
|
|
22
|
+
* The user who we should take the action on behalf of
|
|
23
|
+
*
|
|
24
|
+
*/
|
|
25
|
+
userEmail: string;
|
|
26
|
+
/**
|
|
27
|
+
* If true, then before executing the action we will ask for a human confirmation in Slack. If false, we may still ask for human confirmation if it's required by your organization admin.
|
|
28
|
+
*
|
|
29
|
+
*/
|
|
30
|
+
requireHumanConfirmation?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* Where we should ask for human confirmation if necessary
|
|
33
|
+
*
|
|
34
|
+
*/
|
|
35
|
+
humanConfirmationChannel: Credal.HumanConfirmationChannel;
|
|
36
|
+
/**
|
|
37
|
+
* The justification for requesting this action. This is likely generated by the LLM that requested the action.
|
|
38
|
+
*
|
|
39
|
+
*/
|
|
40
|
+
justification: string;
|
|
41
|
+
/**
|
|
42
|
+
* Audit log for the message that called for this action
|
|
43
|
+
*
|
|
44
|
+
*/
|
|
45
|
+
auditLogId: string;
|
|
46
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type InvokeActionRequest } from "./InvokeActionRequest";
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./types"), exports);
|
|
18
|
+
__exportStar(require("./client"), exports);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export declare type ActionStatus = "PENDING_APPROVAL" | "IN_PROGRESS" | "APPROVED_SUCCEEDED" | "APPROVED_FAILED" | "NO_APPROVAL_NEEDED_SUCCEEDED" | "NO_APPROVAL_NEEDED_FAILED";
|
|
5
|
+
export declare const ActionStatus: {
|
|
6
|
+
readonly PendingApproval: "PENDING_APPROVAL";
|
|
7
|
+
readonly InProgress: "IN_PROGRESS";
|
|
8
|
+
readonly ApprovedSucceeded: "APPROVED_SUCCEEDED";
|
|
9
|
+
readonly ApprovedFailed: "APPROVED_FAILED";
|
|
10
|
+
readonly NoApprovalNeededSucceeded: "NO_APPROVAL_NEEDED_SUCCEEDED";
|
|
11
|
+
readonly NoApprovalNeededFailed: "NO_APPROVAL_NEEDED_FAILED";
|
|
12
|
+
};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
exports.ActionStatus = void 0;
|
|
7
|
+
exports.ActionStatus = {
|
|
8
|
+
PendingApproval: "PENDING_APPROVAL",
|
|
9
|
+
InProgress: "IN_PROGRESS",
|
|
10
|
+
ApprovedSucceeded: "APPROVED_SUCCEEDED",
|
|
11
|
+
ApprovedFailed: "APPROVED_FAILED",
|
|
12
|
+
NoApprovalNeededSucceeded: "NO_APPROVAL_NEEDED_SUCCEEDED",
|
|
13
|
+
NoApprovalNeededFailed: "NO_APPROVAL_NEEDED_FAILED",
|
|
14
|
+
};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Credal from "../../../index";
|
|
5
|
+
export declare type HumanConfirmationChannel = Credal.HumanConfirmationChannel.DirectMessage | Credal.HumanConfirmationChannel.SlackThread | Credal.HumanConfirmationChannel.Conversation;
|
|
6
|
+
export declare namespace HumanConfirmationChannel {
|
|
7
|
+
interface DirectMessage extends Credal.DirectMessage {
|
|
8
|
+
type: "directMessage";
|
|
9
|
+
}
|
|
10
|
+
interface SlackThread extends Credal.SlackThread {
|
|
11
|
+
type: "slackThread";
|
|
12
|
+
}
|
|
13
|
+
interface Conversation extends Credal.Conversation {
|
|
14
|
+
type: "conversation";
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./HumanConfirmationChannel"), exports);
|
|
18
|
+
__exportStar(require("./DirectMessage"), exports);
|
|
19
|
+
__exportStar(require("./SlackThread"), exports);
|
|
20
|
+
__exportStar(require("./Conversation"), exports);
|
|
21
|
+
__exportStar(require("./InvokeActionResponse"), exports);
|
|
22
|
+
__exportStar(require("./ActionStatus"), exports);
|
|
@@ -79,10 +79,10 @@ export declare class Copilots {
|
|
|
79
79
|
* userEmail: "ravin@credal.ai",
|
|
80
80
|
* inputVariables: [{
|
|
81
81
|
* name: "input1",
|
|
82
|
-
*
|
|
82
|
+
* ids: ["82e4b12a-6990-45d4-8ebd-85c00e030c24"]
|
|
83
83
|
* }, {
|
|
84
84
|
* name: "input2",
|
|
85
|
-
*
|
|
85
|
+
* ids: ["82e4b12a-6990-45d4-8ebd-85c00e030c25", "82e4b12a-6990-45d4-8ebd-85c00e030c26"]
|
|
86
86
|
* }]
|
|
87
87
|
* })
|
|
88
88
|
*/
|
|
@@ -74,8 +74,8 @@ class Copilots {
|
|
|
74
74
|
Authorization: yield this._getAuthorizationHeader(),
|
|
75
75
|
"X-Fern-Language": "JavaScript",
|
|
76
76
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
77
|
-
"X-Fern-SDK-Version": "0.0.
|
|
78
|
-
"User-Agent": "@credal/sdk/0.0.
|
|
77
|
+
"X-Fern-SDK-Version": "0.0.17",
|
|
78
|
+
"User-Agent": "@credal/sdk/0.0.17",
|
|
79
79
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
80
80
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
81
81
|
},
|
|
@@ -137,8 +137,8 @@ class Copilots {
|
|
|
137
137
|
Authorization: yield this._getAuthorizationHeader(),
|
|
138
138
|
"X-Fern-Language": "JavaScript",
|
|
139
139
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
140
|
-
"X-Fern-SDK-Version": "0.0.
|
|
141
|
-
"User-Agent": "@credal/sdk/0.0.
|
|
140
|
+
"X-Fern-SDK-Version": "0.0.17",
|
|
141
|
+
"User-Agent": "@credal/sdk/0.0.17",
|
|
142
142
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
143
143
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
144
144
|
},
|
|
@@ -203,8 +203,8 @@ class Copilots {
|
|
|
203
203
|
Authorization: yield this._getAuthorizationHeader(),
|
|
204
204
|
"X-Fern-Language": "JavaScript",
|
|
205
205
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
206
|
-
"X-Fern-SDK-Version": "0.0.
|
|
207
|
-
"User-Agent": "@credal/sdk/0.0.
|
|
206
|
+
"X-Fern-SDK-Version": "0.0.17",
|
|
207
|
+
"User-Agent": "@credal/sdk/0.0.17",
|
|
208
208
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
209
209
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
210
210
|
},
|
|
@@ -250,10 +250,10 @@ class Copilots {
|
|
|
250
250
|
* userEmail: "ravin@credal.ai",
|
|
251
251
|
* inputVariables: [{
|
|
252
252
|
* name: "input1",
|
|
253
|
-
*
|
|
253
|
+
* ids: ["82e4b12a-6990-45d4-8ebd-85c00e030c24"]
|
|
254
254
|
* }, {
|
|
255
255
|
* name: "input2",
|
|
256
|
-
*
|
|
256
|
+
* ids: ["82e4b12a-6990-45d4-8ebd-85c00e030c25", "82e4b12a-6990-45d4-8ebd-85c00e030c26"]
|
|
257
257
|
* }]
|
|
258
258
|
* })
|
|
259
259
|
*/
|
|
@@ -267,8 +267,8 @@ class Copilots {
|
|
|
267
267
|
Authorization: yield this._getAuthorizationHeader(),
|
|
268
268
|
"X-Fern-Language": "JavaScript",
|
|
269
269
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
270
|
-
"X-Fern-SDK-Version": "0.0.
|
|
271
|
-
"User-Agent": "@credal/sdk/0.0.
|
|
270
|
+
"X-Fern-SDK-Version": "0.0.17",
|
|
271
|
+
"User-Agent": "@credal/sdk/0.0.17",
|
|
272
272
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
273
273
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
274
274
|
},
|
|
@@ -321,8 +321,8 @@ class Copilots {
|
|
|
321
321
|
Authorization: yield this._getAuthorizationHeader(),
|
|
322
322
|
"X-Fern-Language": "JavaScript",
|
|
323
323
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
324
|
-
"X-Fern-SDK-Version": "0.0.
|
|
325
|
-
"User-Agent": "@credal/sdk/0.0.
|
|
324
|
+
"X-Fern-SDK-Version": "0.0.17",
|
|
325
|
+
"User-Agent": "@credal/sdk/0.0.17",
|
|
326
326
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
327
327
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
328
328
|
},
|
|
@@ -395,8 +395,8 @@ class Copilots {
|
|
|
395
395
|
Authorization: yield this._getAuthorizationHeader(),
|
|
396
396
|
"X-Fern-Language": "JavaScript",
|
|
397
397
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
398
|
-
"X-Fern-SDK-Version": "0.0.
|
|
399
|
-
"User-Agent": "@credal/sdk/0.0.
|
|
398
|
+
"X-Fern-SDK-Version": "0.0.17",
|
|
399
|
+
"User-Agent": "@credal/sdk/0.0.17",
|
|
400
400
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
401
401
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
402
402
|
},
|
|
@@ -453,8 +453,8 @@ class Copilots {
|
|
|
453
453
|
Authorization: yield this._getAuthorizationHeader(),
|
|
454
454
|
"X-Fern-Language": "JavaScript",
|
|
455
455
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
456
|
-
"X-Fern-SDK-Version": "0.0.
|
|
457
|
-
"User-Agent": "@credal/sdk/0.0.
|
|
456
|
+
"X-Fern-SDK-Version": "0.0.17",
|
|
457
|
+
"User-Agent": "@credal/sdk/0.0.17",
|
|
458
458
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
459
459
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
460
460
|
},
|
|
@@ -521,8 +521,8 @@ class Copilots {
|
|
|
521
521
|
Authorization: yield this._getAuthorizationHeader(),
|
|
522
522
|
"X-Fern-Language": "JavaScript",
|
|
523
523
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
524
|
-
"X-Fern-SDK-Version": "0.0.
|
|
525
|
-
"User-Agent": "@credal/sdk/0.0.
|
|
524
|
+
"X-Fern-SDK-Version": "0.0.17",
|
|
525
|
+
"User-Agent": "@credal/sdk/0.0.17",
|
|
526
526
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
527
527
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
528
528
|
},
|
|
@@ -576,8 +576,8 @@ class Copilots {
|
|
|
576
576
|
Authorization: yield this._getAuthorizationHeader(),
|
|
577
577
|
"X-Fern-Language": "JavaScript",
|
|
578
578
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
579
|
-
"X-Fern-SDK-Version": "0.0.
|
|
580
|
-
"User-Agent": "@credal/sdk/0.0.
|
|
579
|
+
"X-Fern-SDK-Version": "0.0.17",
|
|
580
|
+
"User-Agent": "@credal/sdk/0.0.17",
|
|
581
581
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
582
582
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
583
583
|
},
|
|
@@ -10,10 +10,10 @@ import * as Credal from "../../../../index";
|
|
|
10
10
|
* userEmail: "ravin@credal.ai",
|
|
11
11
|
* inputVariables: [{
|
|
12
12
|
* name: "input1",
|
|
13
|
-
*
|
|
13
|
+
* ids: ["82e4b12a-6990-45d4-8ebd-85c00e030c24"]
|
|
14
14
|
* }, {
|
|
15
15
|
* name: "input2",
|
|
16
|
-
*
|
|
16
|
+
* ids: ["82e4b12a-6990-45d4-8ebd-85c00e030c25", "82e4b12a-6990-45d4-8ebd-85c00e030c26"]
|
|
17
17
|
* }]
|
|
18
18
|
* }
|
|
19
19
|
*/
|
|
@@ -10,10 +10,10 @@ import * as Credal from "../../../../index";
|
|
|
10
10
|
* email: "ravin@credal.ai",
|
|
11
11
|
* inputVariables: [{
|
|
12
12
|
* name: "input1",
|
|
13
|
-
*
|
|
13
|
+
* ids: ["82e4b12a-6990-45d4-8ebd-85c00e030c24"]
|
|
14
14
|
* }, {
|
|
15
15
|
* name: "input2",
|
|
16
|
-
*
|
|
16
|
+
* ids: ["82e4b12a-6990-45d4-8ebd-85c00e030c25", "82e4b12a-6990-45d4-8ebd-85c00e030c26"]
|
|
17
17
|
* }]
|
|
18
18
|
* }
|
|
19
19
|
*
|
|
@@ -24,10 +24,10 @@ import * as Credal from "../../../../index";
|
|
|
24
24
|
* email: "ravin@credal.ai",
|
|
25
25
|
* inputVariables: [{
|
|
26
26
|
* name: "input1",
|
|
27
|
-
*
|
|
27
|
+
* ids: ["82e4b12a-6990-45d4-8ebd-85c00e030c26"]
|
|
28
28
|
* }, {
|
|
29
29
|
* name: "input2",
|
|
30
|
-
*
|
|
30
|
+
* ids: ["82e4b12a-6990-45d4-8ebd-85c00e030c25", "82e4b12a-6990-45d4-8ebd-85c00e030c24"]
|
|
31
31
|
* }]
|
|
32
32
|
* }
|
|
33
33
|
*/
|
|
@@ -2,4 +2,18 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Credal from "../../../index";
|
|
5
|
-
export declare type StreamingChunk = Credal.
|
|
5
|
+
export declare type StreamingChunk = Credal.StreamingChunk.Initial | Credal.StreamingChunk.DataChunk | Credal.StreamingChunk.FinalChunk | Credal.StreamingChunk.Blocked;
|
|
6
|
+
export declare namespace StreamingChunk {
|
|
7
|
+
interface Initial extends Credal.InitialChunk {
|
|
8
|
+
event: "initial";
|
|
9
|
+
}
|
|
10
|
+
interface DataChunk extends Credal.DataChunk {
|
|
11
|
+
event: "data_chunk";
|
|
12
|
+
}
|
|
13
|
+
interface FinalChunk extends Credal.FinalChunk {
|
|
14
|
+
event: "final_chunk";
|
|
15
|
+
}
|
|
16
|
+
interface Blocked extends Credal.BlockedChunk {
|
|
17
|
+
event: "blocked";
|
|
18
|
+
}
|
|
19
|
+
}
|
|
@@ -36,6 +36,19 @@ export declare class DocumentCatalog {
|
|
|
36
36
|
* })
|
|
37
37
|
*/
|
|
38
38
|
uploadDocumentContents(request: Credal.UploadDocumentContentsRequest, requestOptions?: DocumentCatalog.RequestOptions): Promise<Credal.UploadDocumentResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* Sync a document from a source URL. Does not support recursive web search. Reach out to a Credal representative for access.
|
|
41
|
+
*
|
|
42
|
+
* @param {Credal.SyncSourceByUrlRequest} request
|
|
43
|
+
* @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
|
|
44
|
+
*
|
|
45
|
+
* @example
|
|
46
|
+
* await client.documentCatalog.syncSourceByUrl({
|
|
47
|
+
* sourceUrl: "https://drive.google.com/file/d/123456/view",
|
|
48
|
+
* uploadAsUserEmail: "ria@credal.ai"
|
|
49
|
+
* })
|
|
50
|
+
*/
|
|
51
|
+
syncSourceByUrl(request: Credal.SyncSourceByUrlRequest, requestOptions?: DocumentCatalog.RequestOptions): Promise<Credal.SyncSourceByUrlResponse>;
|
|
39
52
|
/**
|
|
40
53
|
* Bulk patch metadata for documents, synced natively by Credal or manual API uploads
|
|
41
54
|
*
|
|
@@ -71,8 +71,8 @@ class DocumentCatalog {
|
|
|
71
71
|
Authorization: yield this._getAuthorizationHeader(),
|
|
72
72
|
"X-Fern-Language": "JavaScript",
|
|
73
73
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
74
|
-
"X-Fern-SDK-Version": "0.0.
|
|
75
|
-
"User-Agent": "@credal/sdk/0.0.
|
|
74
|
+
"X-Fern-SDK-Version": "0.0.17",
|
|
75
|
+
"User-Agent": "@credal/sdk/0.0.17",
|
|
76
76
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
77
77
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
78
78
|
},
|
|
@@ -112,6 +112,69 @@ class DocumentCatalog {
|
|
|
112
112
|
}
|
|
113
113
|
});
|
|
114
114
|
}
|
|
115
|
+
/**
|
|
116
|
+
* Sync a document from a source URL. Does not support recursive web search. Reach out to a Credal representative for access.
|
|
117
|
+
*
|
|
118
|
+
* @param {Credal.SyncSourceByUrlRequest} request
|
|
119
|
+
* @param {DocumentCatalog.RequestOptions} requestOptions - Request-specific configuration.
|
|
120
|
+
*
|
|
121
|
+
* @example
|
|
122
|
+
* await client.documentCatalog.syncSourceByUrl({
|
|
123
|
+
* sourceUrl: "https://drive.google.com/file/d/123456/view",
|
|
124
|
+
* uploadAsUserEmail: "ria@credal.ai"
|
|
125
|
+
* })
|
|
126
|
+
*/
|
|
127
|
+
syncSourceByUrl(request, requestOptions) {
|
|
128
|
+
var _a, _b;
|
|
129
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
130
|
+
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
131
|
+
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.CredalEnvironment.Production, "/v0/catalog/syncSourceByUrl"),
|
|
132
|
+
method: "POST",
|
|
133
|
+
headers: {
|
|
134
|
+
Authorization: yield this._getAuthorizationHeader(),
|
|
135
|
+
"X-Fern-Language": "JavaScript",
|
|
136
|
+
"X-Fern-SDK-Name": "@credal/sdk",
|
|
137
|
+
"X-Fern-SDK-Version": "0.0.17",
|
|
138
|
+
"User-Agent": "@credal/sdk/0.0.17",
|
|
139
|
+
"X-Fern-Runtime": core.RUNTIME.type,
|
|
140
|
+
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
141
|
+
},
|
|
142
|
+
contentType: "application/json",
|
|
143
|
+
requestType: "json",
|
|
144
|
+
body: serializers.SyncSourceByUrlRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
145
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
146
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
147
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
148
|
+
});
|
|
149
|
+
if (_response.ok) {
|
|
150
|
+
return serializers.SyncSourceByUrlResponse.parseOrThrow(_response.body, {
|
|
151
|
+
unrecognizedObjectKeys: "passthrough",
|
|
152
|
+
allowUnrecognizedUnionMembers: true,
|
|
153
|
+
allowUnrecognizedEnumValues: true,
|
|
154
|
+
breadcrumbsPrefix: ["response"],
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
if (_response.error.reason === "status-code") {
|
|
158
|
+
throw new errors.CredalError({
|
|
159
|
+
statusCode: _response.error.statusCode,
|
|
160
|
+
body: _response.error.body,
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
switch (_response.error.reason) {
|
|
164
|
+
case "non-json":
|
|
165
|
+
throw new errors.CredalError({
|
|
166
|
+
statusCode: _response.error.statusCode,
|
|
167
|
+
body: _response.error.rawBody,
|
|
168
|
+
});
|
|
169
|
+
case "timeout":
|
|
170
|
+
throw new errors.CredalTimeoutError();
|
|
171
|
+
case "unknown":
|
|
172
|
+
throw new errors.CredalError({
|
|
173
|
+
message: _response.error.errorMessage,
|
|
174
|
+
});
|
|
175
|
+
}
|
|
176
|
+
});
|
|
177
|
+
}
|
|
115
178
|
/**
|
|
116
179
|
* Bulk patch metadata for documents, synced natively by Credal or manual API uploads
|
|
117
180
|
*
|
|
@@ -154,8 +217,8 @@ class DocumentCatalog {
|
|
|
154
217
|
Authorization: yield this._getAuthorizationHeader(),
|
|
155
218
|
"X-Fern-Language": "JavaScript",
|
|
156
219
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
157
|
-
"X-Fern-SDK-Version": "0.0.
|
|
158
|
-
"User-Agent": "@credal/sdk/0.0.
|
|
220
|
+
"X-Fern-SDK-Version": "0.0.17",
|
|
221
|
+
"User-Agent": "@credal/sdk/0.0.17",
|
|
159
222
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
160
223
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
161
224
|
},
|
|
@@ -17,3 +17,5 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
__exportStar(require("./UploadDocumentResponse"), exports);
|
|
18
18
|
__exportStar(require("./DocumentMetadataPatch"), exports);
|
|
19
19
|
__exportStar(require("./DocumentMetadataPatchRequest"), exports);
|
|
20
|
+
__exportStar(require("./SyncSourceByUrlRequest"), exports);
|
|
21
|
+
__exportStar(require("./SyncSourceByUrlResponse"), exports);
|