@credal/sdk 0.1.13 → 0.1.14
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/dist/cjs/BaseClient.js +2 -2
- package/dist/cjs/api/resources/copilots/client/Client.d.ts +20 -0
- package/dist/cjs/api/resources/copilots/client/Client.js +67 -0
- package/dist/cjs/api/resources/copilots/client/requests/ExportCopilotsRequest.d.ts +21 -0
- package/dist/cjs/api/resources/copilots/client/requests/ExportCopilotsRequest.js +3 -0
- package/dist/cjs/api/resources/copilots/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/copilots/types/ExportCopilotsResponse.d.ts +9 -0
- package/dist/cjs/api/resources/copilots/types/ExportCopilotsResponse.js +3 -0
- package/dist/cjs/api/resources/copilots/types/ExportedCopilot.d.ts +24 -0
- package/dist/cjs/api/resources/copilots/types/ExportedCopilot.js +3 -0
- package/dist/cjs/api/resources/copilots/types/index.d.ts +2 -0
- package/dist/cjs/api/resources/copilots/types/index.js +2 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/api/resources/copilots/client/Client.d.mts +20 -0
- package/dist/esm/api/resources/copilots/client/Client.mjs +67 -0
- package/dist/esm/api/resources/copilots/client/requests/ExportCopilotsRequest.d.mts +21 -0
- package/dist/esm/api/resources/copilots/client/requests/ExportCopilotsRequest.mjs +2 -0
- package/dist/esm/api/resources/copilots/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/copilots/types/ExportCopilotsResponse.d.mts +9 -0
- package/dist/esm/api/resources/copilots/types/ExportCopilotsResponse.mjs +2 -0
- package/dist/esm/api/resources/copilots/types/ExportedCopilot.d.mts +24 -0
- package/dist/esm/api/resources/copilots/types/ExportedCopilot.mjs +2 -0
- package/dist/esm/api/resources/copilots/types/index.d.mts +2 -0
- package/dist/esm/api/resources/copilots/types/index.mjs +2 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +72 -0
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -43,8 +43,8 @@ function normalizeClientOptions(options) {
|
|
|
43
43
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
44
|
"X-Fern-Language": "JavaScript",
|
|
45
45
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
46
|
-
"X-Fern-SDK-Version": "0.1.
|
|
47
|
-
"User-Agent": "@credal/sdk/0.1.
|
|
46
|
+
"X-Fern-SDK-Version": "0.1.14",
|
|
47
|
+
"User-Agent": "@credal/sdk/0.1.14",
|
|
48
48
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
49
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
50
50
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -147,4 +147,24 @@ export declare class CopilotsClient {
|
|
|
147
147
|
*/
|
|
148
148
|
deleteCopilot(request: Credal.DeleteCopilotRequest, requestOptions?: CopilotsClient.RequestOptions): core.HttpResponsePromise<Credal.DeleteCopilotResponse>;
|
|
149
149
|
private __deleteCopilot;
|
|
150
|
+
/**
|
|
151
|
+
* Export copilot configurations for backup or migration purposes.
|
|
152
|
+
*
|
|
153
|
+
* **IMPORTANT**: This endpoint requires:
|
|
154
|
+
* - Admin privileges
|
|
155
|
+
* - The 'ai-usage-analytics-log.export' scope on the API key
|
|
156
|
+
*
|
|
157
|
+
* Returns all deployed copilots with their full configuration including model settings, tools, and deployment details. Optional date filters can be applied to narrow down results.
|
|
158
|
+
*
|
|
159
|
+
* @param {Credal.ExportCopilotsRequest} request
|
|
160
|
+
* @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* await client.copilots.export({
|
|
164
|
+
* agentCreatedFrom: "2024-01-01T00:00:00Z",
|
|
165
|
+
* agentCreatedTo: "2024-12-31T23:59:59Z"
|
|
166
|
+
* })
|
|
167
|
+
*/
|
|
168
|
+
export(request?: Credal.ExportCopilotsRequest, requestOptions?: CopilotsClient.RequestOptions): core.HttpResponsePromise<Credal.ExportCopilotsResponse>;
|
|
169
|
+
private __export;
|
|
150
170
|
}
|
|
@@ -624,5 +624,72 @@ class CopilotsClient {
|
|
|
624
624
|
}
|
|
625
625
|
});
|
|
626
626
|
}
|
|
627
|
+
/**
|
|
628
|
+
* Export copilot configurations for backup or migration purposes.
|
|
629
|
+
*
|
|
630
|
+
* **IMPORTANT**: This endpoint requires:
|
|
631
|
+
* - Admin privileges
|
|
632
|
+
* - The 'ai-usage-analytics-log.export' scope on the API key
|
|
633
|
+
*
|
|
634
|
+
* Returns all deployed copilots with their full configuration including model settings, tools, and deployment details. Optional date filters can be applied to narrow down results.
|
|
635
|
+
*
|
|
636
|
+
* @param {Credal.ExportCopilotsRequest} request
|
|
637
|
+
* @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
638
|
+
*
|
|
639
|
+
* @example
|
|
640
|
+
* await client.copilots.export({
|
|
641
|
+
* agentCreatedFrom: "2024-01-01T00:00:00Z",
|
|
642
|
+
* agentCreatedTo: "2024-12-31T23:59:59Z"
|
|
643
|
+
* })
|
|
644
|
+
*/
|
|
645
|
+
export(request = {}, requestOptions) {
|
|
646
|
+
return core.HttpResponsePromise.fromPromise(this.__export(request, requestOptions));
|
|
647
|
+
}
|
|
648
|
+
__export() {
|
|
649
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
650
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
651
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
652
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
653
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
654
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/export"),
|
|
655
|
+
method: "POST",
|
|
656
|
+
headers: _headers,
|
|
657
|
+
contentType: "application/json",
|
|
658
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
659
|
+
requestType: "json",
|
|
660
|
+
body: request,
|
|
661
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
662
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
663
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
664
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
665
|
+
logging: this._options.logging,
|
|
666
|
+
});
|
|
667
|
+
if (_response.ok) {
|
|
668
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
669
|
+
}
|
|
670
|
+
if (_response.error.reason === "status-code") {
|
|
671
|
+
throw new errors.CredalError({
|
|
672
|
+
statusCode: _response.error.statusCode,
|
|
673
|
+
body: _response.error.body,
|
|
674
|
+
rawResponse: _response.rawResponse,
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
switch (_response.error.reason) {
|
|
678
|
+
case "non-json":
|
|
679
|
+
throw new errors.CredalError({
|
|
680
|
+
statusCode: _response.error.statusCode,
|
|
681
|
+
body: _response.error.rawBody,
|
|
682
|
+
rawResponse: _response.rawResponse,
|
|
683
|
+
});
|
|
684
|
+
case "timeout":
|
|
685
|
+
throw new errors.CredalTimeoutError("Timeout exceeded when calling POST /v0/copilots/export.");
|
|
686
|
+
case "unknown":
|
|
687
|
+
throw new errors.CredalError({
|
|
688
|
+
message: _response.error.errorMessage,
|
|
689
|
+
rawResponse: _response.rawResponse,
|
|
690
|
+
});
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
}
|
|
627
694
|
}
|
|
628
695
|
exports.CopilotsClient = CopilotsClient;
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* agentCreatedFrom: "2024-01-01T00:00:00Z",
|
|
5
|
+
* agentCreatedTo: "2024-12-31T23:59:59Z"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface ExportCopilotsRequest {
|
|
9
|
+
/** Filter copilots created on or after this datetime (ISO 8601 format). */
|
|
10
|
+
agentCreatedFrom?: string;
|
|
11
|
+
/** Filter copilots created before or on this datetime (ISO 8601 format). */
|
|
12
|
+
agentCreatedTo?: string;
|
|
13
|
+
/** Filter copilot versions created on or after this datetime (ISO 8601 format). */
|
|
14
|
+
versionCreatedFrom?: string;
|
|
15
|
+
/** Filter copilot versions created before or on this datetime (ISO 8601 format). */
|
|
16
|
+
versionCreatedTo?: string;
|
|
17
|
+
/** Maximum number of copilots to return. Must be a positive integer with a maximum value of 1000. Defaults to 100. */
|
|
18
|
+
limit?: number;
|
|
19
|
+
/** Cursor for pagination. Use the cursor returned in the previous response to fetch the next page of results. If not provided, returns the first page. */
|
|
20
|
+
cursor?: string;
|
|
21
|
+
}
|
|
@@ -2,6 +2,7 @@ export type { AddCollectionToCopilotRequest } from "./AddCollectionToCopilotRequ
|
|
|
2
2
|
export type { CreateConversationRequest } from "./CreateConversationRequest.js";
|
|
3
3
|
export type { CreateCopilotRequest } from "./CreateCopilotRequest.js";
|
|
4
4
|
export type { DeleteCopilotRequest } from "./DeleteCopilotRequest.js";
|
|
5
|
+
export type { ExportCopilotsRequest } from "./ExportCopilotsRequest.js";
|
|
5
6
|
export type { ProvideMessageFeedbackRequest } from "./ProvideMessageFeedbackRequest.js";
|
|
6
7
|
export type { RemoveCollectionFromCopilotRequest } from "./RemoveCollectionFromCopilotRequest.js";
|
|
7
8
|
export type { SendMessageRequest } from "./SendMessageRequest.js";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as Credal from "../../../index.js";
|
|
2
|
+
export interface ExportCopilotsResponse {
|
|
3
|
+
/** List of exported copilots matching the query filters. */
|
|
4
|
+
data: Credal.ExportedCopilot[];
|
|
5
|
+
/** Indicates whether there are more results available for pagination. */
|
|
6
|
+
hasMore: boolean;
|
|
7
|
+
/** Cursor to use for fetching the next page of results. This is a UUID string. If null or not present, there are no more results. */
|
|
8
|
+
nextCursor?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ExportedCopilot {
|
|
2
|
+
/** The unique identifier of the copilot. */
|
|
3
|
+
id: string;
|
|
4
|
+
/** The name of the deployed copilot version. */
|
|
5
|
+
name: string;
|
|
6
|
+
/** The description of the deployed copilot version. */
|
|
7
|
+
description: string;
|
|
8
|
+
/** Model configuration including provider, model name, temperature, and other settings. */
|
|
9
|
+
modelConfiguration?: unknown;
|
|
10
|
+
/** AI endpoint configuration including base URL and authentication details. */
|
|
11
|
+
aiEndpointConfiguration?: unknown;
|
|
12
|
+
/** List of tool configurations available to the copilot. */
|
|
13
|
+
toolConfigurations?: unknown;
|
|
14
|
+
/** Input variable configurations for the copilot. */
|
|
15
|
+
inputs?: unknown;
|
|
16
|
+
/** Deployment settings and configuration. */
|
|
17
|
+
deploymentConfiguration?: unknown;
|
|
18
|
+
/** ISO 8601 timestamp when the copilot was originally created. */
|
|
19
|
+
agentCreatedDatetime: string;
|
|
20
|
+
/** ISO 8601 timestamp when the deployed version was created. */
|
|
21
|
+
versionCreatedDatetime: string;
|
|
22
|
+
/** Indicates if the copilot is currently deployed (always true for export results). */
|
|
23
|
+
isDeployed: boolean;
|
|
24
|
+
}
|
|
@@ -12,6 +12,8 @@ export * from "./DeleteCopilotResponse.js";
|
|
|
12
12
|
export * from "./EndOfMessageChunk.js";
|
|
13
13
|
export * from "./ErrorChunk.js";
|
|
14
14
|
export * from "./ErrorChunkData.js";
|
|
15
|
+
export * from "./ExportCopilotsResponse.js";
|
|
16
|
+
export * from "./ExportedCopilot.js";
|
|
15
17
|
export * from "./FeedbackEnum.js";
|
|
16
18
|
export * from "./Filter.js";
|
|
17
19
|
export * from "./FinalChunk.js";
|
|
@@ -28,6 +28,8 @@ __exportStar(require("./DeleteCopilotResponse.js"), exports);
|
|
|
28
28
|
__exportStar(require("./EndOfMessageChunk.js"), exports);
|
|
29
29
|
__exportStar(require("./ErrorChunk.js"), exports);
|
|
30
30
|
__exportStar(require("./ErrorChunkData.js"), exports);
|
|
31
|
+
__exportStar(require("./ExportCopilotsResponse.js"), exports);
|
|
32
|
+
__exportStar(require("./ExportedCopilot.js"), exports);
|
|
31
33
|
__exportStar(require("./FeedbackEnum.js"), exports);
|
|
32
34
|
__exportStar(require("./Filter.js"), exports);
|
|
33
35
|
__exportStar(require("./FinalChunk.js"), exports);
|
package/dist/cjs/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.14";
|
package/dist/cjs/version.js
CHANGED
package/dist/esm/BaseClient.mjs
CHANGED
|
@@ -6,8 +6,8 @@ export function normalizeClientOptions(options) {
|
|
|
6
6
|
const headers = mergeHeaders({
|
|
7
7
|
"X-Fern-Language": "JavaScript",
|
|
8
8
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
9
|
-
"X-Fern-SDK-Version": "0.1.
|
|
10
|
-
"User-Agent": "@credal/sdk/0.1.
|
|
9
|
+
"X-Fern-SDK-Version": "0.1.14",
|
|
10
|
+
"User-Agent": "@credal/sdk/0.1.14",
|
|
11
11
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
12
12
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
13
13
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
@@ -147,4 +147,24 @@ export declare class CopilotsClient {
|
|
|
147
147
|
*/
|
|
148
148
|
deleteCopilot(request: Credal.DeleteCopilotRequest, requestOptions?: CopilotsClient.RequestOptions): core.HttpResponsePromise<Credal.DeleteCopilotResponse>;
|
|
149
149
|
private __deleteCopilot;
|
|
150
|
+
/**
|
|
151
|
+
* Export copilot configurations for backup or migration purposes.
|
|
152
|
+
*
|
|
153
|
+
* **IMPORTANT**: This endpoint requires:
|
|
154
|
+
* - Admin privileges
|
|
155
|
+
* - The 'ai-usage-analytics-log.export' scope on the API key
|
|
156
|
+
*
|
|
157
|
+
* Returns all deployed copilots with their full configuration including model settings, tools, and deployment details. Optional date filters can be applied to narrow down results.
|
|
158
|
+
*
|
|
159
|
+
* @param {Credal.ExportCopilotsRequest} request
|
|
160
|
+
* @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
161
|
+
*
|
|
162
|
+
* @example
|
|
163
|
+
* await client.copilots.export({
|
|
164
|
+
* agentCreatedFrom: "2024-01-01T00:00:00Z",
|
|
165
|
+
* agentCreatedTo: "2024-12-31T23:59:59Z"
|
|
166
|
+
* })
|
|
167
|
+
*/
|
|
168
|
+
export(request?: Credal.ExportCopilotsRequest, requestOptions?: CopilotsClient.RequestOptions): core.HttpResponsePromise<Credal.ExportCopilotsResponse>;
|
|
169
|
+
private __export;
|
|
150
170
|
}
|
|
@@ -588,4 +588,71 @@ export class CopilotsClient {
|
|
|
588
588
|
}
|
|
589
589
|
});
|
|
590
590
|
}
|
|
591
|
+
/**
|
|
592
|
+
* Export copilot configurations for backup or migration purposes.
|
|
593
|
+
*
|
|
594
|
+
* **IMPORTANT**: This endpoint requires:
|
|
595
|
+
* - Admin privileges
|
|
596
|
+
* - The 'ai-usage-analytics-log.export' scope on the API key
|
|
597
|
+
*
|
|
598
|
+
* Returns all deployed copilots with their full configuration including model settings, tools, and deployment details. Optional date filters can be applied to narrow down results.
|
|
599
|
+
*
|
|
600
|
+
* @param {Credal.ExportCopilotsRequest} request
|
|
601
|
+
* @param {CopilotsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
602
|
+
*
|
|
603
|
+
* @example
|
|
604
|
+
* await client.copilots.export({
|
|
605
|
+
* agentCreatedFrom: "2024-01-01T00:00:00Z",
|
|
606
|
+
* agentCreatedTo: "2024-12-31T23:59:59Z"
|
|
607
|
+
* })
|
|
608
|
+
*/
|
|
609
|
+
export(request = {}, requestOptions) {
|
|
610
|
+
return core.HttpResponsePromise.fromPromise(this.__export(request, requestOptions));
|
|
611
|
+
}
|
|
612
|
+
__export() {
|
|
613
|
+
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
614
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
615
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
616
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
617
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
618
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.CredalEnvironment.Production, "/v0/copilots/export"),
|
|
619
|
+
method: "POST",
|
|
620
|
+
headers: _headers,
|
|
621
|
+
contentType: "application/json",
|
|
622
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
623
|
+
requestType: "json",
|
|
624
|
+
body: request,
|
|
625
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
626
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
627
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
628
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
629
|
+
logging: this._options.logging,
|
|
630
|
+
});
|
|
631
|
+
if (_response.ok) {
|
|
632
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
633
|
+
}
|
|
634
|
+
if (_response.error.reason === "status-code") {
|
|
635
|
+
throw new errors.CredalError({
|
|
636
|
+
statusCode: _response.error.statusCode,
|
|
637
|
+
body: _response.error.body,
|
|
638
|
+
rawResponse: _response.rawResponse,
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
switch (_response.error.reason) {
|
|
642
|
+
case "non-json":
|
|
643
|
+
throw new errors.CredalError({
|
|
644
|
+
statusCode: _response.error.statusCode,
|
|
645
|
+
body: _response.error.rawBody,
|
|
646
|
+
rawResponse: _response.rawResponse,
|
|
647
|
+
});
|
|
648
|
+
case "timeout":
|
|
649
|
+
throw new errors.CredalTimeoutError("Timeout exceeded when calling POST /v0/copilots/export.");
|
|
650
|
+
case "unknown":
|
|
651
|
+
throw new errors.CredalError({
|
|
652
|
+
message: _response.error.errorMessage,
|
|
653
|
+
rawResponse: _response.rawResponse,
|
|
654
|
+
});
|
|
655
|
+
}
|
|
656
|
+
});
|
|
657
|
+
}
|
|
591
658
|
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* agentCreatedFrom: "2024-01-01T00:00:00Z",
|
|
5
|
+
* agentCreatedTo: "2024-12-31T23:59:59Z"
|
|
6
|
+
* }
|
|
7
|
+
*/
|
|
8
|
+
export interface ExportCopilotsRequest {
|
|
9
|
+
/** Filter copilots created on or after this datetime (ISO 8601 format). */
|
|
10
|
+
agentCreatedFrom?: string;
|
|
11
|
+
/** Filter copilots created before or on this datetime (ISO 8601 format). */
|
|
12
|
+
agentCreatedTo?: string;
|
|
13
|
+
/** Filter copilot versions created on or after this datetime (ISO 8601 format). */
|
|
14
|
+
versionCreatedFrom?: string;
|
|
15
|
+
/** Filter copilot versions created before or on this datetime (ISO 8601 format). */
|
|
16
|
+
versionCreatedTo?: string;
|
|
17
|
+
/** Maximum number of copilots to return. Must be a positive integer with a maximum value of 1000. Defaults to 100. */
|
|
18
|
+
limit?: number;
|
|
19
|
+
/** Cursor for pagination. Use the cursor returned in the previous response to fetch the next page of results. If not provided, returns the first page. */
|
|
20
|
+
cursor?: string;
|
|
21
|
+
}
|
|
@@ -2,6 +2,7 @@ export type { AddCollectionToCopilotRequest } from "./AddCollectionToCopilotRequ
|
|
|
2
2
|
export type { CreateConversationRequest } from "./CreateConversationRequest.mjs";
|
|
3
3
|
export type { CreateCopilotRequest } from "./CreateCopilotRequest.mjs";
|
|
4
4
|
export type { DeleteCopilotRequest } from "./DeleteCopilotRequest.mjs";
|
|
5
|
+
export type { ExportCopilotsRequest } from "./ExportCopilotsRequest.mjs";
|
|
5
6
|
export type { ProvideMessageFeedbackRequest } from "./ProvideMessageFeedbackRequest.mjs";
|
|
6
7
|
export type { RemoveCollectionFromCopilotRequest } from "./RemoveCollectionFromCopilotRequest.mjs";
|
|
7
8
|
export type { SendMessageRequest } from "./SendMessageRequest.mjs";
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type * as Credal from "../../../index.mjs";
|
|
2
|
+
export interface ExportCopilotsResponse {
|
|
3
|
+
/** List of exported copilots matching the query filters. */
|
|
4
|
+
data: Credal.ExportedCopilot[];
|
|
5
|
+
/** Indicates whether there are more results available for pagination. */
|
|
6
|
+
hasMore: boolean;
|
|
7
|
+
/** Cursor to use for fetching the next page of results. This is a UUID string. If null or not present, there are no more results. */
|
|
8
|
+
nextCursor?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export interface ExportedCopilot {
|
|
2
|
+
/** The unique identifier of the copilot. */
|
|
3
|
+
id: string;
|
|
4
|
+
/** The name of the deployed copilot version. */
|
|
5
|
+
name: string;
|
|
6
|
+
/** The description of the deployed copilot version. */
|
|
7
|
+
description: string;
|
|
8
|
+
/** Model configuration including provider, model name, temperature, and other settings. */
|
|
9
|
+
modelConfiguration?: unknown;
|
|
10
|
+
/** AI endpoint configuration including base URL and authentication details. */
|
|
11
|
+
aiEndpointConfiguration?: unknown;
|
|
12
|
+
/** List of tool configurations available to the copilot. */
|
|
13
|
+
toolConfigurations?: unknown;
|
|
14
|
+
/** Input variable configurations for the copilot. */
|
|
15
|
+
inputs?: unknown;
|
|
16
|
+
/** Deployment settings and configuration. */
|
|
17
|
+
deploymentConfiguration?: unknown;
|
|
18
|
+
/** ISO 8601 timestamp when the copilot was originally created. */
|
|
19
|
+
agentCreatedDatetime: string;
|
|
20
|
+
/** ISO 8601 timestamp when the deployed version was created. */
|
|
21
|
+
versionCreatedDatetime: string;
|
|
22
|
+
/** Indicates if the copilot is currently deployed (always true for export results). */
|
|
23
|
+
isDeployed: boolean;
|
|
24
|
+
}
|
|
@@ -12,6 +12,8 @@ export * from "./DeleteCopilotResponse.mjs";
|
|
|
12
12
|
export * from "./EndOfMessageChunk.mjs";
|
|
13
13
|
export * from "./ErrorChunk.mjs";
|
|
14
14
|
export * from "./ErrorChunkData.mjs";
|
|
15
|
+
export * from "./ExportCopilotsResponse.mjs";
|
|
16
|
+
export * from "./ExportedCopilot.mjs";
|
|
15
17
|
export * from "./FeedbackEnum.mjs";
|
|
16
18
|
export * from "./Filter.mjs";
|
|
17
19
|
export * from "./FinalChunk.mjs";
|
|
@@ -12,6 +12,8 @@ export * from "./DeleteCopilotResponse.mjs";
|
|
|
12
12
|
export * from "./EndOfMessageChunk.mjs";
|
|
13
13
|
export * from "./ErrorChunk.mjs";
|
|
14
14
|
export * from "./ErrorChunkData.mjs";
|
|
15
|
+
export * from "./ExportCopilotsResponse.mjs";
|
|
16
|
+
export * from "./ExportedCopilot.mjs";
|
|
15
17
|
export * from "./FeedbackEnum.mjs";
|
|
16
18
|
export * from "./Filter.mjs";
|
|
17
19
|
export * from "./FinalChunk.mjs";
|
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "0.1.
|
|
1
|
+
export declare const SDK_VERSION = "0.1.14";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "0.1.
|
|
1
|
+
export const SDK_VERSION = "0.1.14";
|
package/package.json
CHANGED
package/reference.md
CHANGED
|
@@ -584,6 +584,78 @@ await client.copilots.deleteCopilot({
|
|
|
584
584
|
</dl>
|
|
585
585
|
|
|
586
586
|
|
|
587
|
+
</dd>
|
|
588
|
+
</dl>
|
|
589
|
+
</details>
|
|
590
|
+
|
|
591
|
+
<details><summary><code>client.copilots.<a href="/src/api/resources/copilots/client/Client.ts">export</a>({ ...params }) -> Credal.ExportCopilotsResponse</code></summary>
|
|
592
|
+
<dl>
|
|
593
|
+
<dd>
|
|
594
|
+
|
|
595
|
+
#### 📝 Description
|
|
596
|
+
|
|
597
|
+
<dl>
|
|
598
|
+
<dd>
|
|
599
|
+
|
|
600
|
+
<dl>
|
|
601
|
+
<dd>
|
|
602
|
+
|
|
603
|
+
Export copilot configurations for backup or migration purposes.
|
|
604
|
+
|
|
605
|
+
**IMPORTANT**: This endpoint requires:
|
|
606
|
+
- Admin privileges
|
|
607
|
+
- The 'ai-usage-analytics-log.export' scope on the API key
|
|
608
|
+
|
|
609
|
+
Returns all deployed copilots with their full configuration including model settings, tools, and deployment details. Optional date filters can be applied to narrow down results.
|
|
610
|
+
</dd>
|
|
611
|
+
</dl>
|
|
612
|
+
</dd>
|
|
613
|
+
</dl>
|
|
614
|
+
|
|
615
|
+
#### 🔌 Usage
|
|
616
|
+
|
|
617
|
+
<dl>
|
|
618
|
+
<dd>
|
|
619
|
+
|
|
620
|
+
<dl>
|
|
621
|
+
<dd>
|
|
622
|
+
|
|
623
|
+
```typescript
|
|
624
|
+
await client.copilots.export({
|
|
625
|
+
agentCreatedFrom: "2024-01-01T00:00:00Z",
|
|
626
|
+
agentCreatedTo: "2024-12-31T23:59:59Z"
|
|
627
|
+
});
|
|
628
|
+
|
|
629
|
+
```
|
|
630
|
+
</dd>
|
|
631
|
+
</dl>
|
|
632
|
+
</dd>
|
|
633
|
+
</dl>
|
|
634
|
+
|
|
635
|
+
#### ⚙️ Parameters
|
|
636
|
+
|
|
637
|
+
<dl>
|
|
638
|
+
<dd>
|
|
639
|
+
|
|
640
|
+
<dl>
|
|
641
|
+
<dd>
|
|
642
|
+
|
|
643
|
+
**request:** `Credal.ExportCopilotsRequest`
|
|
644
|
+
|
|
645
|
+
</dd>
|
|
646
|
+
</dl>
|
|
647
|
+
|
|
648
|
+
<dl>
|
|
649
|
+
<dd>
|
|
650
|
+
|
|
651
|
+
**requestOptions:** `CopilotsClient.RequestOptions`
|
|
652
|
+
|
|
653
|
+
</dd>
|
|
654
|
+
</dl>
|
|
655
|
+
</dd>
|
|
656
|
+
</dl>
|
|
657
|
+
|
|
658
|
+
|
|
587
659
|
</dd>
|
|
588
660
|
</dl>
|
|
589
661
|
</details>
|