@credal/sdk 0.1.2 → 0.1.5
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/Client.d.ts +0 -3
- package/dist/cjs/Client.js +6 -11
- package/dist/cjs/api/resources/{permissionsService/types/Group.d.ts → common/types/CustomMetadataValue.d.ts} +1 -4
- package/dist/cjs/api/resources/common/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/common/types/index.js +1 -0
- package/dist/cjs/api/resources/copilots/client/Client.js +36 -27
- package/dist/cjs/api/resources/documentCatalog/client/Client.js +12 -9
- package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.ts +5 -2
- package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatch.d.ts +1 -1
- package/dist/cjs/api/resources/documentCollections/client/Client.js +28 -21
- package/dist/cjs/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.d.ts +1 -3
- package/dist/cjs/api/resources/index.d.ts +0 -3
- package/dist/cjs/api/resources/index.js +1 -4
- package/dist/cjs/api/resources/search/client/Client.js +4 -3
- package/dist/cjs/api/resources/users/client/Client.js +4 -3
- package/dist/cjs/api/resources/users/types/UserMetadataPatch.d.ts +1 -1
- package/dist/cjs/core/auth/AuthProvider.d.ts +4 -0
- package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
- package/dist/cjs/{api/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.js → core/auth/AuthRequest.js} +0 -3
- package/dist/cjs/core/auth/index.d.ts +2 -0
- package/dist/cjs/core/fetcher/Fetcher.js +2 -2
- package/dist/cjs/core/fetcher/index.d.ts +5 -5
- package/dist/cjs/core/fetcher/index.js +5 -5
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +0 -3
- package/dist/esm/Client.mjs +2 -7
- package/dist/esm/api/resources/{permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.mjs → common/types/CustomMetadataValue.d.mts} +1 -1
- package/dist/esm/api/resources/common/types/index.d.mts +1 -0
- package/dist/esm/api/resources/common/types/index.mjs +1 -0
- package/dist/esm/api/resources/copilots/client/Client.mjs +36 -27
- package/dist/esm/api/resources/documentCatalog/client/Client.mjs +12 -9
- package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.mts +5 -2
- package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatch.d.mts +1 -1
- package/dist/esm/api/resources/documentCollections/client/Client.mjs +28 -21
- package/dist/esm/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.d.mts +1 -3
- package/dist/esm/api/resources/index.d.mts +0 -3
- package/dist/esm/api/resources/index.mjs +0 -3
- package/dist/esm/api/resources/search/client/Client.mjs +4 -3
- package/dist/esm/api/resources/users/client/Client.mjs +4 -3
- package/dist/esm/api/resources/users/types/UserMetadataPatch.d.mts +1 -1
- package/dist/esm/core/auth/AuthProvider.d.mts +4 -0
- package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
- package/dist/esm/core/auth/AuthRequest.mjs +1 -0
- package/dist/esm/core/auth/index.d.mts +2 -0
- package/dist/esm/core/fetcher/Fetcher.mjs +2 -2
- package/dist/esm/core/fetcher/index.d.mts +5 -5
- package/dist/esm/core/fetcher/index.mjs +2 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +0 -213
- package/dist/cjs/api/resources/permissionsService/client/Client.d.ts +0 -86
- package/dist/cjs/api/resources/permissionsService/client/Client.js +0 -257
- package/dist/cjs/api/resources/permissionsService/client/index.d.ts +0 -2
- package/dist/cjs/api/resources/permissionsService/client/index.js +0 -17
- package/dist/cjs/api/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.d.ts +0 -26
- package/dist/cjs/api/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.d.ts +0 -23
- package/dist/cjs/api/resources/permissionsService/client/requests/ListCachedAuthorizedResourcesForUserRequest.d.ts +0 -20
- package/dist/cjs/api/resources/permissionsService/client/requests/ListCachedAuthorizedResourcesForUserRequest.js +0 -5
- package/dist/cjs/api/resources/permissionsService/client/requests/index.d.ts +0 -3
- package/dist/cjs/api/resources/permissionsService/index.d.ts +0 -2
- package/dist/cjs/api/resources/permissionsService/index.js +0 -18
- package/dist/cjs/api/resources/permissionsService/types/Action.d.ts +0 -7
- package/dist/cjs/api/resources/permissionsService/types/Action.js +0 -9
- package/dist/cjs/api/resources/permissionsService/types/AuthorizedResource.d.ts +0 -8
- package/dist/cjs/api/resources/permissionsService/types/AuthorizedResource.js +0 -5
- package/dist/cjs/api/resources/permissionsService/types/AuthorizedResourceListPage.d.ts +0 -5
- package/dist/cjs/api/resources/permissionsService/types/AuthorizedResourceListPage.js +0 -5
- package/dist/cjs/api/resources/permissionsService/types/CheckBulkResourcesAuthorizationResponse.d.ts +0 -5
- package/dist/cjs/api/resources/permissionsService/types/CheckBulkResourcesAuthorizationResponse.js +0 -5
- package/dist/cjs/api/resources/permissionsService/types/CheckResourceAuthorizationResponse.d.ts +0 -6
- package/dist/cjs/api/resources/permissionsService/types/CheckResourceAuthorizationResponse.js +0 -5
- package/dist/cjs/api/resources/permissionsService/types/Group.js +0 -5
- package/dist/cjs/api/resources/permissionsService/types/Principal.d.ts +0 -13
- package/dist/cjs/api/resources/permissionsService/types/Principal.js +0 -5
- package/dist/cjs/api/resources/permissionsService/types/PrincipalListPage.d.ts +0 -8
- package/dist/cjs/api/resources/permissionsService/types/PrincipalListPage.js +0 -5
- package/dist/cjs/api/resources/permissionsService/types/ResourceAuthorizationResult.d.ts +0 -9
- package/dist/cjs/api/resources/permissionsService/types/ResourceAuthorizationResult.js +0 -5
- package/dist/cjs/api/resources/permissionsService/types/User.d.ts +0 -8
- package/dist/cjs/api/resources/permissionsService/types/User.js +0 -5
- package/dist/cjs/api/resources/permissionsService/types/index.d.ts +0 -10
- package/dist/cjs/api/resources/permissionsService/types/index.js +0 -26
- package/dist/esm/api/resources/permissionsService/client/Client.d.mts +0 -86
- package/dist/esm/api/resources/permissionsService/client/Client.mjs +0 -220
- package/dist/esm/api/resources/permissionsService/client/index.d.mts +0 -2
- package/dist/esm/api/resources/permissionsService/client/index.mjs +0 -1
- package/dist/esm/api/resources/permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.d.mts +0 -26
- package/dist/esm/api/resources/permissionsService/client/requests/CheckResourceAuthorizationForUserRequest.d.mts +0 -23
- package/dist/esm/api/resources/permissionsService/client/requests/ListCachedAuthorizedResourcesForUserRequest.d.mts +0 -20
- package/dist/esm/api/resources/permissionsService/client/requests/ListCachedAuthorizedResourcesForUserRequest.mjs +0 -4
- package/dist/esm/api/resources/permissionsService/client/requests/index.d.mts +0 -3
- package/dist/esm/api/resources/permissionsService/index.d.mts +0 -2
- package/dist/esm/api/resources/permissionsService/index.mjs +0 -2
- package/dist/esm/api/resources/permissionsService/types/Action.d.mts +0 -7
- package/dist/esm/api/resources/permissionsService/types/Action.mjs +0 -6
- package/dist/esm/api/resources/permissionsService/types/AuthorizedResource.d.mts +0 -8
- package/dist/esm/api/resources/permissionsService/types/AuthorizedResource.mjs +0 -4
- package/dist/esm/api/resources/permissionsService/types/AuthorizedResourceListPage.d.mts +0 -5
- package/dist/esm/api/resources/permissionsService/types/AuthorizedResourceListPage.mjs +0 -4
- package/dist/esm/api/resources/permissionsService/types/CheckBulkResourcesAuthorizationResponse.d.mts +0 -5
- package/dist/esm/api/resources/permissionsService/types/CheckBulkResourcesAuthorizationResponse.mjs +0 -4
- package/dist/esm/api/resources/permissionsService/types/CheckResourceAuthorizationResponse.d.mts +0 -6
- package/dist/esm/api/resources/permissionsService/types/CheckResourceAuthorizationResponse.mjs +0 -4
- package/dist/esm/api/resources/permissionsService/types/Group.d.mts +0 -7
- package/dist/esm/api/resources/permissionsService/types/Group.mjs +0 -4
- package/dist/esm/api/resources/permissionsService/types/Principal.d.mts +0 -13
- package/dist/esm/api/resources/permissionsService/types/Principal.mjs +0 -4
- package/dist/esm/api/resources/permissionsService/types/PrincipalListPage.d.mts +0 -8
- package/dist/esm/api/resources/permissionsService/types/PrincipalListPage.mjs +0 -4
- package/dist/esm/api/resources/permissionsService/types/ResourceAuthorizationResult.d.mts +0 -9
- package/dist/esm/api/resources/permissionsService/types/ResourceAuthorizationResult.mjs +0 -4
- package/dist/esm/api/resources/permissionsService/types/User.d.mts +0 -8
- package/dist/esm/api/resources/permissionsService/types/User.mjs +0 -4
- package/dist/esm/api/resources/permissionsService/types/index.d.mts +0 -10
- package/dist/esm/api/resources/permissionsService/types/index.mjs +0 -10
- /package/dist/cjs/api/resources/{permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.js → common/types/CustomMetadataValue.js} +0 -0
- /package/dist/cjs/{api/resources/permissionsService/client/requests/index.js → core/auth/AuthProvider.js} +0 -0
- /package/dist/esm/api/resources/{permissionsService/client/requests/CheckBulkResourcesAuthorizationForUserRequest.mjs → common/types/CustomMetadataValue.mjs} +0 -0
- /package/dist/esm/{api/resources/permissionsService/client/requests/index.mjs → core/auth/AuthProvider.mjs} +0 -0
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -6,7 +6,6 @@ import * as core from "./core/index.js";
|
|
|
6
6
|
import { Copilots } from "./api/resources/copilots/client/Client.js";
|
|
7
7
|
import { DocumentCatalog } from "./api/resources/documentCatalog/client/Client.js";
|
|
8
8
|
import { DocumentCollections } from "./api/resources/documentCollections/client/Client.js";
|
|
9
|
-
import { PermissionsService } from "./api/resources/permissionsService/client/Client.js";
|
|
10
9
|
import { Search } from "./api/resources/search/client/Client.js";
|
|
11
10
|
import { Users } from "./api/resources/users/client/Client.js";
|
|
12
11
|
export declare namespace CredalClient {
|
|
@@ -37,14 +36,12 @@ export declare class CredalClient {
|
|
|
37
36
|
protected _copilots: Copilots | undefined;
|
|
38
37
|
protected _documentCatalog: DocumentCatalog | undefined;
|
|
39
38
|
protected _documentCollections: DocumentCollections | undefined;
|
|
40
|
-
protected _permissionsService: PermissionsService | undefined;
|
|
41
39
|
protected _search: Search | undefined;
|
|
42
40
|
protected _users: Users | undefined;
|
|
43
41
|
constructor(_options?: CredalClient.Options);
|
|
44
42
|
get copilots(): Copilots;
|
|
45
43
|
get documentCatalog(): DocumentCatalog;
|
|
46
44
|
get documentCollections(): DocumentCollections;
|
|
47
|
-
get permissionsService(): PermissionsService;
|
|
48
45
|
get search(): Search;
|
|
49
46
|
get users(): Users;
|
|
50
47
|
}
|
package/dist/cjs/Client.js
CHANGED
|
@@ -42,16 +42,15 @@ const headers_js_1 = require("./core/headers.js");
|
|
|
42
42
|
const Client_js_1 = require("./api/resources/copilots/client/Client.js");
|
|
43
43
|
const Client_js_2 = require("./api/resources/documentCatalog/client/Client.js");
|
|
44
44
|
const Client_js_3 = require("./api/resources/documentCollections/client/Client.js");
|
|
45
|
-
const Client_js_4 = require("./api/resources/
|
|
46
|
-
const Client_js_5 = require("./api/resources/
|
|
47
|
-
const Client_js_6 = require("./api/resources/users/client/Client.js");
|
|
45
|
+
const Client_js_4 = require("./api/resources/search/client/Client.js");
|
|
46
|
+
const Client_js_5 = require("./api/resources/users/client/Client.js");
|
|
48
47
|
class CredalClient {
|
|
49
48
|
constructor(_options = {}) {
|
|
50
49
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
51
50
|
"X-Fern-Language": "JavaScript",
|
|
52
51
|
"X-Fern-SDK-Name": "@credal/sdk",
|
|
53
|
-
"X-Fern-SDK-Version": "0.1.
|
|
54
|
-
"User-Agent": "@credal/sdk/0.1.
|
|
52
|
+
"X-Fern-SDK-Version": "0.1.5",
|
|
53
|
+
"User-Agent": "@credal/sdk/0.1.5",
|
|
55
54
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
56
55
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
57
56
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -68,17 +67,13 @@ class CredalClient {
|
|
|
68
67
|
var _a;
|
|
69
68
|
return ((_a = this._documentCollections) !== null && _a !== void 0 ? _a : (this._documentCollections = new Client_js_3.DocumentCollections(this._options)));
|
|
70
69
|
}
|
|
71
|
-
get permissionsService() {
|
|
72
|
-
var _a;
|
|
73
|
-
return ((_a = this._permissionsService) !== null && _a !== void 0 ? _a : (this._permissionsService = new Client_js_4.PermissionsService(this._options)));
|
|
74
|
-
}
|
|
75
70
|
get search() {
|
|
76
71
|
var _a;
|
|
77
|
-
return ((_a = this._search) !== null && _a !== void 0 ? _a : (this._search = new
|
|
72
|
+
return ((_a = this._search) !== null && _a !== void 0 ? _a : (this._search = new Client_js_4.Search(this._options)));
|
|
78
73
|
}
|
|
79
74
|
get users() {
|
|
80
75
|
var _a;
|
|
81
|
-
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new
|
|
76
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_5.Users(this._options)));
|
|
82
77
|
}
|
|
83
78
|
}
|
|
84
79
|
exports.CredalClient = CredalClient;
|
|
@@ -21,3 +21,4 @@ __exportStar(require("./ResourceType.js"), exports);
|
|
|
21
21
|
__exportStar(require("./Collaborator.js"), exports);
|
|
22
22
|
__exportStar(require("./Role.js"), exports);
|
|
23
23
|
__exportStar(require("./Operator.js"), exports);
|
|
24
|
+
__exportStar(require("./CustomMetadataValue.js"), exports);
|
|
@@ -76,10 +76,11 @@ class Copilots {
|
|
|
76
76
|
__createCopilot(request, requestOptions) {
|
|
77
77
|
return __awaiter(this, void 0, void 0, function* () {
|
|
78
78
|
var _a, _b, _c, _d;
|
|
79
|
-
|
|
80
|
-
|
|
79
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
80
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
81
|
+
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/createCopilot"),
|
|
81
82
|
method: "POST",
|
|
82
|
-
headers:
|
|
83
|
+
headers: _headers,
|
|
83
84
|
contentType: "application/json",
|
|
84
85
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
85
86
|
requestType: "json",
|
|
@@ -133,10 +134,11 @@ class Copilots {
|
|
|
133
134
|
__createConversation(request, requestOptions) {
|
|
134
135
|
return __awaiter(this, void 0, void 0, function* () {
|
|
135
136
|
var _a, _b, _c, _d;
|
|
136
|
-
|
|
137
|
-
|
|
137
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
138
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
139
|
+
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/createConversation"),
|
|
138
140
|
method: "POST",
|
|
139
|
-
headers:
|
|
141
|
+
headers: _headers,
|
|
140
142
|
contentType: "application/json",
|
|
141
143
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
142
144
|
requestType: "json",
|
|
@@ -194,10 +196,11 @@ class Copilots {
|
|
|
194
196
|
__provideMessageFeedback(request, requestOptions) {
|
|
195
197
|
return __awaiter(this, void 0, void 0, function* () {
|
|
196
198
|
var _a, _b, _c, _d;
|
|
197
|
-
|
|
198
|
-
|
|
199
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
200
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
201
|
+
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/provideMessageFeedback"),
|
|
199
202
|
method: "POST",
|
|
200
|
-
headers:
|
|
203
|
+
headers: _headers,
|
|
201
204
|
contentType: "application/json",
|
|
202
205
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
203
206
|
requestType: "json",
|
|
@@ -257,10 +260,11 @@ class Copilots {
|
|
|
257
260
|
__sendMessage(request, requestOptions) {
|
|
258
261
|
return __awaiter(this, void 0, void 0, function* () {
|
|
259
262
|
var _a, _b, _c, _d;
|
|
260
|
-
|
|
261
|
-
|
|
263
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
264
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
265
|
+
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/sendMessage"),
|
|
262
266
|
method: "POST",
|
|
263
|
-
headers:
|
|
267
|
+
headers: _headers,
|
|
264
268
|
contentType: "application/json",
|
|
265
269
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
266
270
|
requestType: "json",
|
|
@@ -305,10 +309,11 @@ class Copilots {
|
|
|
305
309
|
__streamMessage(request, requestOptions) {
|
|
306
310
|
return __awaiter(this, void 0, void 0, function* () {
|
|
307
311
|
var _a, _b, _c, _d;
|
|
308
|
-
|
|
309
|
-
|
|
312
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
313
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
314
|
+
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/streamMessage"),
|
|
310
315
|
method: "POST",
|
|
311
|
-
headers:
|
|
316
|
+
headers: _headers,
|
|
312
317
|
contentType: "application/json",
|
|
313
318
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
314
319
|
requestType: "json",
|
|
@@ -374,10 +379,11 @@ class Copilots {
|
|
|
374
379
|
__addCollectionToCopilot(request, requestOptions) {
|
|
375
380
|
return __awaiter(this, void 0, void 0, function* () {
|
|
376
381
|
var _a, _b, _c, _d;
|
|
377
|
-
|
|
378
|
-
|
|
382
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
383
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
384
|
+
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/addCollectionToCopilot"),
|
|
379
385
|
method: "POST",
|
|
380
|
-
headers:
|
|
386
|
+
headers: _headers,
|
|
381
387
|
contentType: "application/json",
|
|
382
388
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
383
389
|
requestType: "json",
|
|
@@ -431,10 +437,11 @@ class Copilots {
|
|
|
431
437
|
__removeCollectionFromCopilot(request, requestOptions) {
|
|
432
438
|
return __awaiter(this, void 0, void 0, function* () {
|
|
433
439
|
var _a, _b, _c, _d;
|
|
434
|
-
|
|
435
|
-
|
|
440
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
441
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
442
|
+
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/removeCollectionFromCopilot"),
|
|
436
443
|
method: "POST",
|
|
437
|
-
headers:
|
|
444
|
+
headers: _headers,
|
|
438
445
|
contentType: "application/json",
|
|
439
446
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
440
447
|
requestType: "json",
|
|
@@ -496,10 +503,11 @@ class Copilots {
|
|
|
496
503
|
__updateConfiguration(request, requestOptions) {
|
|
497
504
|
return __awaiter(this, void 0, void 0, function* () {
|
|
498
505
|
var _a, _b, _c, _d;
|
|
499
|
-
|
|
500
|
-
|
|
506
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
507
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
508
|
+
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/updateConfiguration"),
|
|
501
509
|
method: "POST",
|
|
502
|
-
headers:
|
|
510
|
+
headers: _headers,
|
|
503
511
|
contentType: "application/json",
|
|
504
512
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
505
513
|
requestType: "json",
|
|
@@ -550,10 +558,11 @@ class Copilots {
|
|
|
550
558
|
__deleteCopilot(request, requestOptions) {
|
|
551
559
|
return __awaiter(this, void 0, void 0, function* () {
|
|
552
560
|
var _a, _b, _c, _d;
|
|
553
|
-
|
|
554
|
-
|
|
561
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
562
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
563
|
+
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/deleteCopilot"),
|
|
555
564
|
method: "DELETE",
|
|
556
|
-
headers:
|
|
565
|
+
headers: _headers,
|
|
557
566
|
contentType: "application/json",
|
|
558
567
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
559
568
|
requestType: "json",
|
|
@@ -73,10 +73,11 @@ class DocumentCatalog {
|
|
|
73
73
|
__uploadDocumentContents(request, requestOptions) {
|
|
74
74
|
return __awaiter(this, void 0, void 0, function* () {
|
|
75
75
|
var _a, _b, _c, _d;
|
|
76
|
-
|
|
77
|
-
|
|
76
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
77
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
78
|
+
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/catalog/uploadDocumentContents"),
|
|
78
79
|
method: "POST",
|
|
79
|
-
headers:
|
|
80
|
+
headers: _headers,
|
|
80
81
|
contentType: "application/json",
|
|
81
82
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
82
83
|
requestType: "json",
|
|
@@ -130,10 +131,11 @@ class DocumentCatalog {
|
|
|
130
131
|
__syncSourceByUrl(request, requestOptions) {
|
|
131
132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
132
133
|
var _a, _b, _c, _d;
|
|
133
|
-
|
|
134
|
-
|
|
134
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
135
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
136
|
+
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/catalog/syncSourceByUrl"),
|
|
135
137
|
method: "POST",
|
|
136
|
-
headers:
|
|
138
|
+
headers: _headers,
|
|
137
139
|
contentType: "application/json",
|
|
138
140
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
139
141
|
requestType: "json",
|
|
@@ -207,10 +209,11 @@ class DocumentCatalog {
|
|
|
207
209
|
__metadata(request, requestOptions) {
|
|
208
210
|
return __awaiter(this, void 0, void 0, function* () {
|
|
209
211
|
var _a, _b, _c, _d;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
213
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
214
|
+
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/catalog/metadata"),
|
|
212
215
|
method: "PATCH",
|
|
213
|
-
headers:
|
|
216
|
+
headers: _headers,
|
|
214
217
|
contentType: "application/json",
|
|
215
218
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
216
219
|
requestType: "json",
|
package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as Credal from "../../../../index.js";
|
|
4
5
|
/**
|
|
5
6
|
* @example
|
|
6
7
|
* {
|
|
@@ -25,11 +26,13 @@ export interface UploadDocumentContentsRequest {
|
|
|
25
26
|
/** The external URL of the document you want to upload. If provided Credal will link to this URL. */
|
|
26
27
|
documentExternalUrl?: string;
|
|
27
28
|
/** Optional JSON representing any custom metadata for this document */
|
|
28
|
-
customMetadata?:
|
|
29
|
-
/** If specified, document will also be added to
|
|
29
|
+
customMetadata?: Record<string, Credal.CustomMetadataValue>;
|
|
30
|
+
/** If specified, the document will also be added to the provided document collection. The document does not immediately start appearing in searches of that collection due to an asynchronous embedding process. To await this process and have this endpoint return only when that embedding process is complete, use the `awaitVectorStoreSync` parameter. */
|
|
30
31
|
collectionId?: string;
|
|
31
32
|
/** If specified, document contents will be re-uploaded and re-embedded even if the document already exists in Credal */
|
|
32
33
|
forceUpdate?: boolean;
|
|
33
34
|
/** If specified, document will be accessible to everyone within the organization of the uploader */
|
|
34
35
|
internalPublic?: boolean;
|
|
36
|
+
/** If specified, the API will wait for the vector store to be updated before returning. This is useful if you want to ensure that the document is immediately searchable after this call returns. */
|
|
37
|
+
awaitVectorStoreSync?: boolean;
|
|
35
38
|
}
|
|
@@ -6,5 +6,5 @@ export interface DocumentMetadataPatch {
|
|
|
6
6
|
/** The identifier for the resource you want to patch */
|
|
7
7
|
resourceIdentifier: Credal.ResourceIdentifier;
|
|
8
8
|
/** Key-value object of metadata for document. Keys will be merged with any existing values but can also be set to `null` to effectively remove */
|
|
9
|
-
metadata
|
|
9
|
+
metadata: Record<string, unknown>;
|
|
10
10
|
}
|
|
@@ -80,10 +80,11 @@ class DocumentCollections {
|
|
|
80
80
|
__addDocumentsToCollection(request, requestOptions) {
|
|
81
81
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
82
|
var _a, _b, _c, _d;
|
|
83
|
-
|
|
84
|
-
|
|
83
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
84
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
85
|
+
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/documentCollections/addDocumentsToCollection"),
|
|
85
86
|
method: "POST",
|
|
86
|
-
headers:
|
|
87
|
+
headers: _headers,
|
|
87
88
|
contentType: "application/json",
|
|
88
89
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
89
90
|
requestType: "json",
|
|
@@ -145,10 +146,11 @@ class DocumentCollections {
|
|
|
145
146
|
__removeDocumentsFromCollection(request, requestOptions) {
|
|
146
147
|
return __awaiter(this, void 0, void 0, function* () {
|
|
147
148
|
var _a, _b, _c, _d;
|
|
148
|
-
|
|
149
|
-
|
|
149
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
150
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
151
|
+
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/documentCollections/removeDocumentsFromCollection"),
|
|
150
152
|
method: "DELETE",
|
|
151
|
-
headers:
|
|
153
|
+
headers: _headers,
|
|
152
154
|
contentType: "application/json",
|
|
153
155
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
154
156
|
requestType: "json",
|
|
@@ -204,10 +206,11 @@ class DocumentCollections {
|
|
|
204
206
|
const { collectionId } = request;
|
|
205
207
|
const _queryParams = {};
|
|
206
208
|
_queryParams["collectionId"] = collectionId;
|
|
207
|
-
|
|
208
|
-
|
|
209
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
210
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
211
|
+
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/documentCollections/listDocumentsInCollection"),
|
|
209
212
|
method: "GET",
|
|
210
|
-
headers:
|
|
213
|
+
headers: _headers,
|
|
211
214
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
212
215
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
213
216
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
@@ -265,10 +268,11 @@ class DocumentCollections {
|
|
|
265
268
|
__createCollection(request, requestOptions) {
|
|
266
269
|
return __awaiter(this, void 0, void 0, function* () {
|
|
267
270
|
var _a, _b, _c, _d;
|
|
268
|
-
|
|
269
|
-
|
|
271
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
272
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
273
|
+
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/documentCollections/createCollection"),
|
|
270
274
|
method: "POST",
|
|
271
|
-
headers:
|
|
275
|
+
headers: _headers,
|
|
272
276
|
contentType: "application/json",
|
|
273
277
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
274
278
|
requestType: "json",
|
|
@@ -321,10 +325,11 @@ class DocumentCollections {
|
|
|
321
325
|
__deleteCollection(request, requestOptions) {
|
|
322
326
|
return __awaiter(this, void 0, void 0, function* () {
|
|
323
327
|
var _a, _b, _c, _d;
|
|
324
|
-
|
|
325
|
-
|
|
328
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
329
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
330
|
+
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/documentCollections/deleteCollection"),
|
|
326
331
|
method: "DELETE",
|
|
327
|
-
headers:
|
|
332
|
+
headers: _headers,
|
|
328
333
|
contentType: "application/json",
|
|
329
334
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
330
335
|
requestType: "json",
|
|
@@ -393,10 +398,11 @@ class DocumentCollections {
|
|
|
393
398
|
__createMongoCollectionSync(request, requestOptions) {
|
|
394
399
|
return __awaiter(this, void 0, void 0, function* () {
|
|
395
400
|
var _a, _b, _c, _d;
|
|
396
|
-
|
|
397
|
-
|
|
401
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
402
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
403
|
+
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/documentCollections/mongodb/createMongoSync"),
|
|
398
404
|
method: "POST",
|
|
399
|
-
headers:
|
|
405
|
+
headers: _headers,
|
|
400
406
|
contentType: "application/json",
|
|
401
407
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
402
408
|
requestType: "json",
|
|
@@ -465,10 +471,11 @@ class DocumentCollections {
|
|
|
465
471
|
__updateMongoCollectionSync(request, requestOptions) {
|
|
466
472
|
return __awaiter(this, void 0, void 0, function* () {
|
|
467
473
|
var _a, _b, _c, _d;
|
|
468
|
-
|
|
469
|
-
|
|
474
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
475
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
476
|
+
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/documentCollections/mongodb/updateMongoSync"),
|
|
470
477
|
method: "POST",
|
|
471
|
-
headers:
|
|
478
|
+
headers: _headers,
|
|
472
479
|
contentType: "application/json",
|
|
473
480
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
474
481
|
requestType: "json",
|
|
@@ -6,8 +6,6 @@ export * as documentCatalog from "./documentCatalog/index.js";
|
|
|
6
6
|
export * from "./documentCatalog/types/index.js";
|
|
7
7
|
export * as documentCollections from "./documentCollections/index.js";
|
|
8
8
|
export * from "./documentCollections/types/index.js";
|
|
9
|
-
export * as permissionsService from "./permissionsService/index.js";
|
|
10
|
-
export * from "./permissionsService/types/index.js";
|
|
11
9
|
export * as search from "./search/index.js";
|
|
12
10
|
export * from "./search/types/index.js";
|
|
13
11
|
export * as users from "./users/index.js";
|
|
@@ -15,5 +13,4 @@ export * from "./users/types/index.js";
|
|
|
15
13
|
export * from "./copilots/client/requests/index.js";
|
|
16
14
|
export * from "./documentCatalog/client/requests/index.js";
|
|
17
15
|
export * from "./documentCollections/client/requests/index.js";
|
|
18
|
-
export * from "./permissionsService/client/requests/index.js";
|
|
19
16
|
export * from "./search/client/requests/index.js";
|
|
@@ -36,7 +36,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
36
36
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.users = exports.search = exports.
|
|
39
|
+
exports.users = exports.search = exports.documentCollections = exports.documentCatalog = exports.copilots = exports.common = void 0;
|
|
40
40
|
exports.common = __importStar(require("./common/index.js"));
|
|
41
41
|
__exportStar(require("./common/types/index.js"), exports);
|
|
42
42
|
exports.copilots = __importStar(require("./copilots/index.js"));
|
|
@@ -45,8 +45,6 @@ exports.documentCatalog = __importStar(require("./documentCatalog/index.js"));
|
|
|
45
45
|
__exportStar(require("./documentCatalog/types/index.js"), exports);
|
|
46
46
|
exports.documentCollections = __importStar(require("./documentCollections/index.js"));
|
|
47
47
|
__exportStar(require("./documentCollections/types/index.js"), exports);
|
|
48
|
-
exports.permissionsService = __importStar(require("./permissionsService/index.js"));
|
|
49
|
-
__exportStar(require("./permissionsService/types/index.js"), exports);
|
|
50
48
|
exports.search = __importStar(require("./search/index.js"));
|
|
51
49
|
__exportStar(require("./search/types/index.js"), exports);
|
|
52
50
|
exports.users = __importStar(require("./users/index.js"));
|
|
@@ -54,5 +52,4 @@ __exportStar(require("./users/types/index.js"), exports);
|
|
|
54
52
|
__exportStar(require("./copilots/client/requests/index.js"), exports);
|
|
55
53
|
__exportStar(require("./documentCatalog/client/requests/index.js"), exports);
|
|
56
54
|
__exportStar(require("./documentCollections/client/requests/index.js"), exports);
|
|
57
|
-
__exportStar(require("./permissionsService/client/requests/index.js"), exports);
|
|
58
55
|
__exportStar(require("./search/client/requests/index.js"), exports);
|
|
@@ -86,10 +86,11 @@ class Search {
|
|
|
86
86
|
__searchDocumentCollection(request, requestOptions) {
|
|
87
87
|
return __awaiter(this, void 0, void 0, function* () {
|
|
88
88
|
var _a, _b, _c, _d;
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
90
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
91
|
+
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/search/searchDocumentCollection"),
|
|
91
92
|
method: "POST",
|
|
92
|
-
headers:
|
|
93
|
+
headers: _headers,
|
|
93
94
|
contentType: "application/json",
|
|
94
95
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
95
96
|
requestType: "json",
|
|
@@ -81,10 +81,11 @@ class Users {
|
|
|
81
81
|
__metadata(request, requestOptions) {
|
|
82
82
|
return __awaiter(this, void 0, void 0, function* () {
|
|
83
83
|
var _a, _b, _c, _d;
|
|
84
|
-
|
|
85
|
-
|
|
84
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
85
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
86
|
+
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/users/metadata"),
|
|
86
87
|
method: "PATCH",
|
|
87
|
-
headers:
|
|
88
|
+
headers: _headers,
|
|
88
89
|
contentType: "application/json",
|
|
89
90
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
90
91
|
requestType: "json",
|
|
@@ -12,15 +12,15 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
exports.fetcher = void 0;
|
|
13
13
|
exports.fetcherImpl = fetcherImpl;
|
|
14
14
|
const json_js_1 = require("../json.js");
|
|
15
|
-
const RawResponse_js_1 = require("./RawResponse.js");
|
|
16
|
-
const Supplier_js_1 = require("./Supplier.js");
|
|
17
15
|
const createRequestUrl_js_1 = require("./createRequestUrl.js");
|
|
18
16
|
const getErrorResponseBody_js_1 = require("./getErrorResponseBody.js");
|
|
19
17
|
const getFetchFn_js_1 = require("./getFetchFn.js");
|
|
20
18
|
const getRequestBody_js_1 = require("./getRequestBody.js");
|
|
21
19
|
const getResponseBody_js_1 = require("./getResponseBody.js");
|
|
22
20
|
const makeRequest_js_1 = require("./makeRequest.js");
|
|
21
|
+
const RawResponse_js_1 = require("./RawResponse.js");
|
|
23
22
|
const requestWithRetries_js_1 = require("./requestWithRetries.js");
|
|
23
|
+
const Supplier_js_1 = require("./Supplier.js");
|
|
24
24
|
function getHeaders(args) {
|
|
25
25
|
return __awaiter(this, void 0, void 0, function* () {
|
|
26
26
|
const newHeaders = {};
|