@credal/sdk 0.0.25 → 0.0.26
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/api/resources/copilots/client/Client.d.ts +10 -10
- package/api/resources/copilots/client/Client.js +19 -19
- package/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.d.ts +1 -1
- package/api/resources/copilots/client/requests/CreateConversationRequest.d.ts +1 -1
- package/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +5 -5
- package/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +1 -1
- package/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.d.ts +1 -1
- package/api/resources/copilots/client/requests/SendMessageRequest.d.ts +2 -2
- package/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +2 -2
- package/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.ts +3 -3
- package/api/resources/copilots/types/SendMessageResponse.d.ts +1 -1
- package/api/resources/documentCatalog/client/Client.js +3 -3
- package/api/resources/documentCollections/client/Client.d.ts +3 -3
- package/api/resources/documentCollections/client/Client.js +9 -9
- package/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +2 -2
- package/api/resources/permissionsService/client/Client.js +3 -3
- package/api/resources/search/client/Client.js +1 -1
- package/api/resources/users/client/Client.js +1 -1
- package/dist/api/resources/copilots/client/Client.d.ts +10 -10
- package/dist/api/resources/copilots/client/Client.js +19 -19
- package/dist/api/resources/copilots/client/requests/AddCollectionToCopilotRequest.d.ts +1 -1
- package/dist/api/resources/copilots/client/requests/CreateConversationRequest.d.ts +1 -1
- package/dist/api/resources/copilots/client/requests/CreateCopilotRequest.d.ts +5 -5
- package/dist/api/resources/copilots/client/requests/ProvideMessageFeedbackRequest.d.ts +1 -1
- package/dist/api/resources/copilots/client/requests/RemoveCollectionFromCopilotRequest.d.ts +1 -1
- package/dist/api/resources/copilots/client/requests/SendMessageRequest.d.ts +2 -2
- package/dist/api/resources/copilots/client/requests/StreamMessageRequest.d.ts +2 -2
- package/dist/api/resources/copilots/client/requests/UpdateConfigurationRequest.d.ts +3 -3
- package/dist/api/resources/copilots/types/SendMessageResponse.d.ts +1 -1
- package/dist/api/resources/documentCatalog/client/Client.js +3 -3
- package/dist/api/resources/documentCollections/client/Client.d.ts +3 -3
- package/dist/api/resources/documentCollections/client/Client.js +9 -9
- package/dist/api/resources/documentCollections/client/requests/CreateCollectionRequest.d.ts +2 -2
- package/dist/api/resources/permissionsService/client/Client.js +3 -3
- package/dist/api/resources/search/client/Client.js +1 -1
- package/dist/api/resources/users/client/Client.js +1 -1
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +13 -13
- package/version.d.ts +1 -1
- package/version.js +1 -1
|
@@ -27,15 +27,15 @@ export declare class Copilots {
|
|
|
27
27
|
protected readonly _options: Copilots.Options;
|
|
28
28
|
constructor(_options?: Copilots.Options);
|
|
29
29
|
/**
|
|
30
|
-
* Create a new
|
|
30
|
+
* Create a new agent. The API key used will be added to the agent for future Requests
|
|
31
31
|
*
|
|
32
32
|
* @param {Credal.CreateCopilotRequest} request
|
|
33
33
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
34
34
|
*
|
|
35
35
|
* @example
|
|
36
36
|
* await client.copilots.createCopilot({
|
|
37
|
-
* name: "Customer
|
|
38
|
-
* description: "This
|
|
37
|
+
* name: "Customer Agent",
|
|
38
|
+
* description: "This agent is used to answer customer requests based on internal documentation.",
|
|
39
39
|
* collaborators: [{
|
|
40
40
|
* email: "test@gmail.com",
|
|
41
41
|
* role: "editor"
|
|
@@ -44,7 +44,7 @@ export declare class Copilots {
|
|
|
44
44
|
*/
|
|
45
45
|
createCopilot(request: Credal.CreateCopilotRequest, requestOptions?: Copilots.RequestOptions): Promise<Credal.CreateCopilotResponse>;
|
|
46
46
|
/**
|
|
47
|
-
* OPTIONAL. Create a new conversation with the
|
|
47
|
+
* OPTIONAL. Create a new conversation with the Agent. The conversation ID can be used in the `sendMessage` endpoint. The `sendMessage` endpoint automatically creates new conversations upon first request, but calling this endpoint can simplify certain use cases where it is helpful for the application to have the conversation ID before the first message is sent.
|
|
48
48
|
*
|
|
49
49
|
* @param {Credal.CreateConversationRequest} request
|
|
50
50
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -93,11 +93,11 @@ export declare class Copilots {
|
|
|
93
93
|
*/
|
|
94
94
|
sendMessage(request: Credal.SendMessageRequest, requestOptions?: Copilots.RequestOptions): Promise<Credal.SendAgentMessageResponse>;
|
|
95
95
|
/**
|
|
96
|
-
* This endpoint allows you to send a message to a specific
|
|
96
|
+
* This endpoint allows you to send a message to a specific agent and get the response back as a streamed set of Server-Sent Events.
|
|
97
97
|
*/
|
|
98
98
|
streamMessage(request: Credal.StreamMessageRequest, requestOptions?: Copilots.RequestOptions): Promise<core.Stream<Credal.StreamingChunk>>;
|
|
99
99
|
/**
|
|
100
|
-
* Link a collection with a
|
|
100
|
+
* Link a collection with a agent. The API Key used must be added to both the collection and the agent beforehand.
|
|
101
101
|
*
|
|
102
102
|
* @param {Credal.AddCollectionToCopilotRequest} request
|
|
103
103
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -110,7 +110,7 @@ export declare class Copilots {
|
|
|
110
110
|
*/
|
|
111
111
|
addCollectionToCopilot(request: Credal.AddCollectionToCopilotRequest, requestOptions?: Copilots.RequestOptions): Promise<void>;
|
|
112
112
|
/**
|
|
113
|
-
* Unlink a collection with a
|
|
113
|
+
* Unlink a collection with a agent. The API Key used must be added to both the collection and the agent beforehand.
|
|
114
114
|
*
|
|
115
115
|
* @param {Credal.RemoveCollectionFromCopilotRequest} request
|
|
116
116
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -123,7 +123,7 @@ export declare class Copilots {
|
|
|
123
123
|
*/
|
|
124
124
|
removeCollectionFromCopilot(request: Credal.RemoveCollectionFromCopilotRequest, requestOptions?: Copilots.RequestOptions): Promise<void>;
|
|
125
125
|
/**
|
|
126
|
-
* Update the configuration for a
|
|
126
|
+
* Update the configuration for a agent
|
|
127
127
|
*
|
|
128
128
|
* @param {Credal.UpdateConfigurationRequest} request
|
|
129
129
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -132,8 +132,8 @@ export declare class Copilots {
|
|
|
132
132
|
* await client.copilots.updateConfiguration({
|
|
133
133
|
* copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
134
134
|
* configuration: {
|
|
135
|
-
* name: "Customer
|
|
136
|
-
* description: "This
|
|
135
|
+
* name: "Customer Agent",
|
|
136
|
+
* description: "This agent is used to answer customer requests based on internal documentation.",
|
|
137
137
|
* prompt: "You are a polite, helpful assistant used to answer customer requests.",
|
|
138
138
|
* aiEndpointConfiguration: {
|
|
139
139
|
* baseUrl: "https://api.openai.com/v1/",
|
|
@@ -59,15 +59,15 @@ class Copilots {
|
|
|
59
59
|
this._options = _options;
|
|
60
60
|
}
|
|
61
61
|
/**
|
|
62
|
-
* Create a new
|
|
62
|
+
* Create a new agent. The API key used will be added to the agent for future Requests
|
|
63
63
|
*
|
|
64
64
|
* @param {Credal.CreateCopilotRequest} request
|
|
65
65
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
66
66
|
*
|
|
67
67
|
* @example
|
|
68
68
|
* await client.copilots.createCopilot({
|
|
69
|
-
* name: "Customer
|
|
70
|
-
* description: "This
|
|
69
|
+
* name: "Customer Agent",
|
|
70
|
+
* description: "This agent is used to answer customer requests based on internal documentation.",
|
|
71
71
|
* collaborators: [{
|
|
72
72
|
* email: "test@gmail.com",
|
|
73
73
|
* role: "editor"
|
|
@@ -80,7 +80,7 @@ class Copilots {
|
|
|
80
80
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
81
81
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/copilots/createCopilot"),
|
|
82
82
|
method: "POST",
|
|
83
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
83
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
84
84
|
contentType: "application/json",
|
|
85
85
|
requestType: "json",
|
|
86
86
|
body: serializers.CreateCopilotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -118,7 +118,7 @@ class Copilots {
|
|
|
118
118
|
});
|
|
119
119
|
}
|
|
120
120
|
/**
|
|
121
|
-
* OPTIONAL. Create a new conversation with the
|
|
121
|
+
* OPTIONAL. Create a new conversation with the Agent. The conversation ID can be used in the `sendMessage` endpoint. The `sendMessage` endpoint automatically creates new conversations upon first request, but calling this endpoint can simplify certain use cases where it is helpful for the application to have the conversation ID before the first message is sent.
|
|
122
122
|
*
|
|
123
123
|
* @param {Credal.CreateConversationRequest} request
|
|
124
124
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -135,7 +135,7 @@ class Copilots {
|
|
|
135
135
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
136
136
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/copilots/createConversation"),
|
|
137
137
|
method: "POST",
|
|
138
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
138
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
139
139
|
contentType: "application/json",
|
|
140
140
|
requestType: "json",
|
|
141
141
|
body: serializers.CreateConversationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -194,7 +194,7 @@ class Copilots {
|
|
|
194
194
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
195
195
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/copilots/provideMessageFeedback"),
|
|
196
196
|
method: "POST",
|
|
197
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
197
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
198
198
|
contentType: "application/json",
|
|
199
199
|
requestType: "json",
|
|
200
200
|
body: serializers.ProvideMessageFeedbackRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -250,7 +250,7 @@ class Copilots {
|
|
|
250
250
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
251
251
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/copilots/sendMessage"),
|
|
252
252
|
method: "POST",
|
|
253
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
253
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
254
254
|
contentType: "application/json",
|
|
255
255
|
requestType: "json",
|
|
256
256
|
body: serializers.SendMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -288,7 +288,7 @@ class Copilots {
|
|
|
288
288
|
});
|
|
289
289
|
}
|
|
290
290
|
/**
|
|
291
|
-
* This endpoint allows you to send a message to a specific
|
|
291
|
+
* This endpoint allows you to send a message to a specific agent and get the response back as a streamed set of Server-Sent Events.
|
|
292
292
|
*/
|
|
293
293
|
streamMessage(request, requestOptions) {
|
|
294
294
|
return __awaiter(this, void 0, void 0, function* () {
|
|
@@ -296,7 +296,7 @@ class Copilots {
|
|
|
296
296
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
297
297
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/copilots/streamMessage"),
|
|
298
298
|
method: "POST",
|
|
299
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
299
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
300
300
|
contentType: "application/json",
|
|
301
301
|
requestType: "json",
|
|
302
302
|
body: serializers.StreamMessageRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -345,7 +345,7 @@ class Copilots {
|
|
|
345
345
|
});
|
|
346
346
|
}
|
|
347
347
|
/**
|
|
348
|
-
* Link a collection with a
|
|
348
|
+
* Link a collection with a agent. The API Key used must be added to both the collection and the agent beforehand.
|
|
349
349
|
*
|
|
350
350
|
* @param {Credal.AddCollectionToCopilotRequest} request
|
|
351
351
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -362,7 +362,7 @@ class Copilots {
|
|
|
362
362
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
363
363
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/copilots/addCollectionToCopilot"),
|
|
364
364
|
method: "POST",
|
|
365
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
365
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
366
366
|
contentType: "application/json",
|
|
367
367
|
requestType: "json",
|
|
368
368
|
body: serializers.AddCollectionToCopilotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -395,7 +395,7 @@ class Copilots {
|
|
|
395
395
|
});
|
|
396
396
|
}
|
|
397
397
|
/**
|
|
398
|
-
* Unlink a collection with a
|
|
398
|
+
* Unlink a collection with a agent. The API Key used must be added to both the collection and the agent beforehand.
|
|
399
399
|
*
|
|
400
400
|
* @param {Credal.RemoveCollectionFromCopilotRequest} request
|
|
401
401
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -412,7 +412,7 @@ class Copilots {
|
|
|
412
412
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
413
413
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/copilots/removeCollectionFromCopilot"),
|
|
414
414
|
method: "POST",
|
|
415
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
415
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
416
416
|
contentType: "application/json",
|
|
417
417
|
requestType: "json",
|
|
418
418
|
body: serializers.RemoveCollectionFromCopilotRequest.jsonOrThrow(request, {
|
|
@@ -447,7 +447,7 @@ class Copilots {
|
|
|
447
447
|
});
|
|
448
448
|
}
|
|
449
449
|
/**
|
|
450
|
-
* Update the configuration for a
|
|
450
|
+
* Update the configuration for a agent
|
|
451
451
|
*
|
|
452
452
|
* @param {Credal.UpdateConfigurationRequest} request
|
|
453
453
|
* @param {Copilots.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -456,8 +456,8 @@ class Copilots {
|
|
|
456
456
|
* await client.copilots.updateConfiguration({
|
|
457
457
|
* copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
458
458
|
* configuration: {
|
|
459
|
-
* name: "Customer
|
|
460
|
-
* description: "This
|
|
459
|
+
* name: "Customer Agent",
|
|
460
|
+
* description: "This agent is used to answer customer requests based on internal documentation.",
|
|
461
461
|
* prompt: "You are a polite, helpful assistant used to answer customer requests.",
|
|
462
462
|
* aiEndpointConfiguration: {
|
|
463
463
|
* baseUrl: "https://api.openai.com/v1/",
|
|
@@ -472,7 +472,7 @@ class Copilots {
|
|
|
472
472
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
473
473
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/copilots/updateConfiguration"),
|
|
474
474
|
method: "POST",
|
|
475
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
475
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
476
476
|
contentType: "application/json",
|
|
477
477
|
requestType: "json",
|
|
478
478
|
body: serializers.UpdateConfigurationRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -519,7 +519,7 @@ class Copilots {
|
|
|
519
519
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
520
520
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/copilots/deleteCopilot"),
|
|
521
521
|
method: "DELETE",
|
|
522
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
522
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
523
523
|
contentType: "application/json",
|
|
524
524
|
requestType: "json",
|
|
525
525
|
body: serializers.DeleteCopilotRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
11
|
export interface AddCollectionToCopilotRequest {
|
|
12
|
-
/** Credal-generated
|
|
12
|
+
/** Credal-generated Agent ID to add the collection to. */
|
|
13
13
|
copilotId: string;
|
|
14
14
|
/** Credal-generated collection ID to add. */
|
|
15
15
|
collectionId: string;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
11
|
export interface CreateConversationRequest {
|
|
12
|
-
/** Credal-generated
|
|
12
|
+
/** Credal-generated Agent ID to specify which agent to route the request to. */
|
|
13
13
|
agentId: string;
|
|
14
14
|
/** End-user for the conversation. */
|
|
15
15
|
userEmail: string;
|
|
@@ -5,8 +5,8 @@ import * as Credal from "../../../../index";
|
|
|
5
5
|
/**
|
|
6
6
|
* @example
|
|
7
7
|
* {
|
|
8
|
-
* name: "Customer
|
|
9
|
-
* description: "This
|
|
8
|
+
* name: "Customer Agent",
|
|
9
|
+
* description: "This agent is used to answer customer requests based on internal documentation.",
|
|
10
10
|
* collaborators: [{
|
|
11
11
|
* email: "test@gmail.com",
|
|
12
12
|
* role: "editor"
|
|
@@ -14,10 +14,10 @@ import * as Credal from "../../../../index";
|
|
|
14
14
|
* }
|
|
15
15
|
*/
|
|
16
16
|
export interface CreateCopilotRequest {
|
|
17
|
-
/** A descriptive name for the
|
|
17
|
+
/** A descriptive name for the agent. */
|
|
18
18
|
name: string;
|
|
19
|
-
/** An in depth name for the
|
|
19
|
+
/** An in depth name for the agent's function. Useful for routing requests to the right agent. */
|
|
20
20
|
description: string;
|
|
21
|
-
/** A list of collaborator emails and roles that will have access to the
|
|
21
|
+
/** A list of collaborator emails and roles that will have access to the agent. */
|
|
22
22
|
collaborators: Credal.Collaborator[];
|
|
23
23
|
}
|
|
@@ -16,7 +16,7 @@ import * as Credal from "../../../../index";
|
|
|
16
16
|
* }
|
|
17
17
|
*/
|
|
18
18
|
export interface ProvideMessageFeedbackRequest {
|
|
19
|
-
/** Credal-generated
|
|
19
|
+
/** Credal-generated Agent ID to specify which agent to route the request to. */
|
|
20
20
|
agentId: string;
|
|
21
21
|
/** The user profile you want to use when providing feedback. */
|
|
22
22
|
userEmail: string;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* }
|
|
10
10
|
*/
|
|
11
11
|
export interface RemoveCollectionFromCopilotRequest {
|
|
12
|
-
/** Credal-generated
|
|
12
|
+
/** Credal-generated agent ID to add the collection to. */
|
|
13
13
|
copilotId: string;
|
|
14
14
|
/** Credal-generated collection ID to add. */
|
|
15
15
|
collectionId: string;
|
|
@@ -18,9 +18,9 @@ import * as Credal from "../../../../index";
|
|
|
18
18
|
* }
|
|
19
19
|
*/
|
|
20
20
|
export interface SendMessageRequest {
|
|
21
|
-
/** Credal-generated
|
|
21
|
+
/** Credal-generated Agent ID to specify which agent to route the request to. */
|
|
22
22
|
agentId: string;
|
|
23
|
-
/** The message you want to send to your
|
|
23
|
+
/** The message you want to send to your agent. */
|
|
24
24
|
message: string;
|
|
25
25
|
/** The user profile you want to use when sending the message. */
|
|
26
26
|
userEmail: string;
|
|
@@ -46,9 +46,9 @@ import * as Credal from "../../../../index";
|
|
|
46
46
|
* }
|
|
47
47
|
*/
|
|
48
48
|
export interface StreamMessageRequest {
|
|
49
|
-
/** Credal-generated
|
|
49
|
+
/** Credal-generated Agent ID to specify which agent to route the request to. */
|
|
50
50
|
copilotId: string;
|
|
51
|
-
/** The message you want to send to your
|
|
51
|
+
/** The message you want to send to your agent. */
|
|
52
52
|
message: string;
|
|
53
53
|
/** The user profile you want to use when sending the message. */
|
|
54
54
|
email: string;
|
|
@@ -7,8 +7,8 @@ import * as Credal from "../../../../index";
|
|
|
7
7
|
* {
|
|
8
8
|
* copilotId: "82e4b12a-6990-45d4-8ebd-85c00e030c24",
|
|
9
9
|
* configuration: {
|
|
10
|
-
* name: "Customer
|
|
11
|
-
* description: "This
|
|
10
|
+
* name: "Customer Agent",
|
|
11
|
+
* description: "This agent is used to answer customer requests based on internal documentation.",
|
|
12
12
|
* prompt: "You are a polite, helpful assistant used to answer customer requests.",
|
|
13
13
|
* aiEndpointConfiguration: {
|
|
14
14
|
* baseUrl: "https://api.openai.com/v1/",
|
|
@@ -18,7 +18,7 @@ import * as Credal from "../../../../index";
|
|
|
18
18
|
* }
|
|
19
19
|
*/
|
|
20
20
|
export interface UpdateConfigurationRequest {
|
|
21
|
-
/** Credal-generated
|
|
21
|
+
/** Credal-generated agent ID to add the collection to. */
|
|
22
22
|
copilotId: string;
|
|
23
23
|
configuration: Credal.Configuration;
|
|
24
24
|
}
|
|
@@ -5,7 +5,7 @@ import * as Credal from "../../../index";
|
|
|
5
5
|
export type SendMessageResponse =
|
|
6
6
|
/**
|
|
7
7
|
* Returned when there is a reply
|
|
8
|
-
* fetched from the
|
|
8
|
+
* fetched from the agent. */
|
|
9
9
|
Credal.SendMessageResponse.AiResponseResult
|
|
10
10
|
/**
|
|
11
11
|
* Returned when Credal detects possible
|
|
@@ -77,7 +77,7 @@ class DocumentCatalog {
|
|
|
77
77
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
78
78
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/catalog/uploadDocumentContents"),
|
|
79
79
|
method: "POST",
|
|
80
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
80
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
81
81
|
contentType: "application/json",
|
|
82
82
|
requestType: "json",
|
|
83
83
|
body: serializers.UploadDocumentContentsRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -132,7 +132,7 @@ class DocumentCatalog {
|
|
|
132
132
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
133
133
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/catalog/syncSourceByUrl"),
|
|
134
134
|
method: "POST",
|
|
135
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
135
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
136
136
|
contentType: "application/json",
|
|
137
137
|
requestType: "json",
|
|
138
138
|
body: serializers.SyncSourceByUrlRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -207,7 +207,7 @@ class DocumentCatalog {
|
|
|
207
207
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
208
208
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/catalog/metadata"),
|
|
209
209
|
method: "PATCH",
|
|
210
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
210
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
211
211
|
contentType: "application/json",
|
|
212
212
|
requestType: "json",
|
|
213
213
|
body: serializers.DocumentMetadataPatchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -69,7 +69,7 @@ export declare class DocumentCollections {
|
|
|
69
69
|
*/
|
|
70
70
|
removeDocumentsFromCollection(request: Credal.RemoveDocumentsFromCollectionRequest, requestOptions?: DocumentCollections.RequestOptions): Promise<void>;
|
|
71
71
|
/**
|
|
72
|
-
* Create a new
|
|
72
|
+
* Create a new collection. The API key used will be added to the collection for future Requests
|
|
73
73
|
*
|
|
74
74
|
* @param {Credal.CreateCollectionRequest} request
|
|
75
75
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -98,7 +98,7 @@ export declare class DocumentCollections {
|
|
|
98
98
|
*/
|
|
99
99
|
deleteCollection(request: Credal.DeleteCollectionRequest, requestOptions?: DocumentCollections.RequestOptions): Promise<Credal.DeleteCollectionResponse>;
|
|
100
100
|
/**
|
|
101
|
-
* Credal lets you easily sync your MongoDB data for use in Collections and
|
|
101
|
+
* Credal lets you easily sync your MongoDB data for use in Collections and Agents. Create a new sync from a MongoDB collection to a Credal collection.
|
|
102
102
|
*
|
|
103
103
|
* @param {Credal.CreateMongoCollectionSyncRequest} request
|
|
104
104
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -126,7 +126,7 @@ export declare class DocumentCollections {
|
|
|
126
126
|
*/
|
|
127
127
|
createMongoCollectionSync(request: Credal.CreateMongoCollectionSyncRequest, requestOptions?: DocumentCollections.RequestOptions): Promise<Credal.MongoCollectionSyncResponse>;
|
|
128
128
|
/**
|
|
129
|
-
* Credal lets you easily sync your MongoDB data for use in Collections and
|
|
129
|
+
* Credal lets you easily sync your MongoDB data for use in Collections and Agents. Update an existing sync from a MongoDB collection to a Credal collection via the `mongoCredentialId`, to disambiguate between multiple potential syncs to a given collection.
|
|
130
130
|
*
|
|
131
131
|
* @param {Credal.UpdateMongoCollectionSyncRequest} request
|
|
132
132
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -84,7 +84,7 @@ class DocumentCollections {
|
|
|
84
84
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
85
85
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/documentCollections/addDocumentsToCollection"),
|
|
86
86
|
method: "POST",
|
|
87
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
87
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
88
88
|
contentType: "application/json",
|
|
89
89
|
requestType: "json",
|
|
90
90
|
body: serializers.AddDocumentsToCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -142,7 +142,7 @@ class DocumentCollections {
|
|
|
142
142
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
143
143
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/documentCollections/removeDocumentsFromCollection"),
|
|
144
144
|
method: "DELETE",
|
|
145
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
145
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
146
146
|
contentType: "application/json",
|
|
147
147
|
requestType: "json",
|
|
148
148
|
body: serializers.RemoveDocumentsFromCollectionRequest.jsonOrThrow(request, {
|
|
@@ -177,7 +177,7 @@ class DocumentCollections {
|
|
|
177
177
|
});
|
|
178
178
|
}
|
|
179
179
|
/**
|
|
180
|
-
* Create a new
|
|
180
|
+
* Create a new collection. The API key used will be added to the collection for future Requests
|
|
181
181
|
*
|
|
182
182
|
* @param {Credal.CreateCollectionRequest} request
|
|
183
183
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -198,7 +198,7 @@ class DocumentCollections {
|
|
|
198
198
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
199
199
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/documentCollections/createCollection"),
|
|
200
200
|
method: "POST",
|
|
201
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
201
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
202
202
|
contentType: "application/json",
|
|
203
203
|
requestType: "json",
|
|
204
204
|
body: serializers.CreateCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -252,7 +252,7 @@ class DocumentCollections {
|
|
|
252
252
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
253
253
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/documentCollections/deleteCollection"),
|
|
254
254
|
method: "DELETE",
|
|
255
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
255
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
256
256
|
contentType: "application/json",
|
|
257
257
|
requestType: "json",
|
|
258
258
|
body: serializers.DeleteCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -290,7 +290,7 @@ class DocumentCollections {
|
|
|
290
290
|
});
|
|
291
291
|
}
|
|
292
292
|
/**
|
|
293
|
-
* Credal lets you easily sync your MongoDB data for use in Collections and
|
|
293
|
+
* Credal lets you easily sync your MongoDB data for use in Collections and Agents. Create a new sync from a MongoDB collection to a Credal collection.
|
|
294
294
|
*
|
|
295
295
|
* @param {Credal.CreateMongoCollectionSyncRequest} request
|
|
296
296
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -322,7 +322,7 @@ class DocumentCollections {
|
|
|
322
322
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
323
323
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/documentCollections/mongodb/createMongoSync"),
|
|
324
324
|
method: "POST",
|
|
325
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
325
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
326
326
|
contentType: "application/json",
|
|
327
327
|
requestType: "json",
|
|
328
328
|
body: serializers.CreateMongoCollectionSyncRequest.jsonOrThrow(request, {
|
|
@@ -362,7 +362,7 @@ class DocumentCollections {
|
|
|
362
362
|
});
|
|
363
363
|
}
|
|
364
364
|
/**
|
|
365
|
-
* Credal lets you easily sync your MongoDB data for use in Collections and
|
|
365
|
+
* Credal lets you easily sync your MongoDB data for use in Collections and Agents. Update an existing sync from a MongoDB collection to a Credal collection via the `mongoCredentialId`, to disambiguate between multiple potential syncs to a given collection.
|
|
366
366
|
*
|
|
367
367
|
* @param {Credal.UpdateMongoCollectionSyncRequest} request
|
|
368
368
|
* @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
|
|
@@ -394,7 +394,7 @@ class DocumentCollections {
|
|
|
394
394
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
395
395
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/documentCollections/mongodb/updateMongoSync"),
|
|
396
396
|
method: "POST",
|
|
397
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
397
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
398
398
|
contentType: "application/json",
|
|
399
399
|
requestType: "json",
|
|
400
400
|
body: serializers.UpdateMongoCollectionSyncRequest.jsonOrThrow(request, {
|
|
@@ -16,8 +16,8 @@ import * as Credal from "../../../../index";
|
|
|
16
16
|
export interface CreateCollectionRequest {
|
|
17
17
|
/** A descriptive name for the collection. */
|
|
18
18
|
name: string;
|
|
19
|
-
/** An in depth name for the
|
|
19
|
+
/** An in depth name for the agent's function. Useful for routing requests to the right agent. */
|
|
20
20
|
description: string;
|
|
21
|
-
/** A list of collaborator emails and roles that will have access to the
|
|
21
|
+
/** A list of collaborator emails and roles that will have access to the agent. */
|
|
22
22
|
collaborators: Credal.Collaborator[];
|
|
23
23
|
}
|
|
@@ -80,7 +80,7 @@ class PermissionsService {
|
|
|
80
80
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
81
81
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/permissions/checkResourceAuthorizationForUser"),
|
|
82
82
|
method: "POST",
|
|
83
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
83
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
84
84
|
contentType: "application/json",
|
|
85
85
|
requestType: "json",
|
|
86
86
|
body: serializers.CheckResourceAuthorizationForUserRequest.jsonOrThrow(request, {
|
|
@@ -144,7 +144,7 @@ class PermissionsService {
|
|
|
144
144
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
145
145
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/permissions/checkBulkResourcesAuthorizationForUser"),
|
|
146
146
|
method: "POST",
|
|
147
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
147
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
148
148
|
contentType: "application/json",
|
|
149
149
|
requestType: "json",
|
|
150
150
|
body: serializers.CheckBulkResourcesAuthorizationForUserRequest.jsonOrThrow(request, {
|
|
@@ -200,7 +200,7 @@ class PermissionsService {
|
|
|
200
200
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
201
201
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/permissions/listCachedAuthorizedResourcesForUser"),
|
|
202
202
|
method: "POST",
|
|
203
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
203
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
204
204
|
contentType: "application/json",
|
|
205
205
|
requestType: "json",
|
|
206
206
|
body: serializers.ListCachedAuthorizedResourcesForUserRequest.jsonOrThrow(request, {
|
|
@@ -90,7 +90,7 @@ class Search {
|
|
|
90
90
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
91
91
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/search/searchDocumentCollection"),
|
|
92
92
|
method: "POST",
|
|
93
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
93
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
94
94
|
contentType: "application/json",
|
|
95
95
|
requestType: "json",
|
|
96
96
|
body: serializers.SearchDocumentCollectionRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -85,7 +85,7 @@ class Users {
|
|
|
85
85
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
86
86
|
url: (0, url_join_1.default)((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.CredalEnvironment.Production, "/v0/users/metadata"),
|
|
87
87
|
method: "PATCH",
|
|
88
|
-
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.
|
|
88
|
+
headers: Object.assign({ Authorization: yield this._getAuthorizationHeader(), "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@credal/sdk", "X-Fern-SDK-Version": "0.0.26", "User-Agent": "@credal/sdk/0.0.26", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
89
89
|
contentType: "application/json",
|
|
90
90
|
requestType: "json",
|
|
91
91
|
body: serializers.users.metadata.Request.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|