@credal/sdk 0.1.1 → 0.1.3

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.
Files changed (54) hide show
  1. package/dist/cjs/Client.js +2 -2
  2. package/dist/cjs/api/resources/copilots/client/Client.js +36 -27
  3. package/dist/cjs/api/resources/documentCatalog/client/Client.js +12 -9
  4. package/dist/cjs/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.ts +1 -1
  5. package/dist/cjs/api/resources/documentCatalog/types/DocumentMetadataPatch.d.ts +1 -1
  6. package/dist/cjs/api/resources/documentCollections/client/Client.d.ts +13 -0
  7. package/dist/cjs/api/resources/documentCollections/client/Client.js +84 -18
  8. package/dist/cjs/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.d.ts +13 -0
  9. package/dist/cjs/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.js +5 -0
  10. package/dist/cjs/api/resources/documentCollections/client/requests/index.d.ts +1 -0
  11. package/dist/cjs/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.d.ts +7 -0
  12. package/dist/cjs/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.js +5 -0
  13. package/dist/cjs/api/resources/documentCollections/types/index.d.ts +1 -0
  14. package/dist/cjs/api/resources/documentCollections/types/index.js +1 -0
  15. package/dist/cjs/api/resources/permissionsService/client/Client.js +12 -9
  16. package/dist/cjs/api/resources/search/client/Client.js +4 -3
  17. package/dist/cjs/api/resources/users/client/Client.js +4 -3
  18. package/dist/cjs/api/resources/users/types/UserMetadataPatch.d.ts +1 -1
  19. package/dist/cjs/core/auth/AuthProvider.d.ts +4 -0
  20. package/dist/cjs/core/auth/AuthProvider.js +2 -0
  21. package/dist/cjs/core/auth/AuthRequest.d.ts +9 -0
  22. package/dist/cjs/core/auth/AuthRequest.js +2 -0
  23. package/dist/cjs/core/auth/index.d.ts +2 -0
  24. package/dist/cjs/core/fetcher/index.d.ts +1 -1
  25. package/dist/cjs/version.d.ts +1 -1
  26. package/dist/cjs/version.js +1 -1
  27. package/dist/esm/Client.mjs +2 -2
  28. package/dist/esm/api/resources/copilots/client/Client.mjs +36 -27
  29. package/dist/esm/api/resources/documentCatalog/client/Client.mjs +12 -9
  30. package/dist/esm/api/resources/documentCatalog/client/requests/UploadDocumentContentsRequest.d.mts +1 -1
  31. package/dist/esm/api/resources/documentCatalog/types/DocumentMetadataPatch.d.mts +1 -1
  32. package/dist/esm/api/resources/documentCollections/client/Client.d.mts +13 -0
  33. package/dist/esm/api/resources/documentCollections/client/Client.mjs +84 -18
  34. package/dist/esm/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.d.mts +13 -0
  35. package/dist/esm/api/resources/documentCollections/client/requests/ListDocumentsInCollectionRequest.mjs +4 -0
  36. package/dist/esm/api/resources/documentCollections/client/requests/index.d.mts +1 -0
  37. package/dist/esm/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.d.mts +7 -0
  38. package/dist/esm/api/resources/documentCollections/types/ListDocumentsInCollectionResponse.mjs +4 -0
  39. package/dist/esm/api/resources/documentCollections/types/index.d.mts +1 -0
  40. package/dist/esm/api/resources/documentCollections/types/index.mjs +1 -0
  41. package/dist/esm/api/resources/permissionsService/client/Client.mjs +12 -9
  42. package/dist/esm/api/resources/search/client/Client.mjs +4 -3
  43. package/dist/esm/api/resources/users/client/Client.mjs +4 -3
  44. package/dist/esm/api/resources/users/types/UserMetadataPatch.d.mts +1 -1
  45. package/dist/esm/core/auth/AuthProvider.d.mts +4 -0
  46. package/dist/esm/core/auth/AuthProvider.mjs +1 -0
  47. package/dist/esm/core/auth/AuthRequest.d.mts +9 -0
  48. package/dist/esm/core/auth/AuthRequest.mjs +1 -0
  49. package/dist/esm/core/auth/index.d.mts +2 -0
  50. package/dist/esm/core/fetcher/index.d.mts +1 -1
  51. package/dist/esm/version.d.mts +1 -1
  52. package/dist/esm/version.mjs +1 -1
  53. package/package.json +1 -1
  54. package/reference.md +65 -0
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Request parameters for authentication requests.
3
+ */
4
+ export interface AuthRequest {
5
+ /**
6
+ * The headers to be included in the request.
7
+ */
8
+ headers: Record<string, string>;
9
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -1,2 +1,4 @@
1
1
  export { BasicAuth } from "./BasicAuth.js";
2
2
  export { BearerToken } from "./BearerToken.js";
3
+ export { type AuthRequest } from "./AuthRequest.js";
4
+ export { AuthProvider } from "./AuthProvider.js";
@@ -6,4 +6,4 @@ export { Supplier } from "./Supplier.js";
6
6
  export { abortRawResponse, toRawResponse, unknownRawResponse } from "./RawResponse.js";
7
7
  export type { RawResponse, WithRawResponse } from "./RawResponse.js";
8
8
  export { HttpResponsePromise } from "./HttpResponsePromise.js";
9
- export { BinaryResponse } from "./BinaryResponse.js";
9
+ export type { BinaryResponse } from "./BinaryResponse.js";
@@ -1 +1 @@
1
- export declare const SDK_VERSION = "0.1.1";
1
+ export declare const SDK_VERSION = "0.1.3";
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.SDK_VERSION = void 0;
4
- exports.SDK_VERSION = "0.1.1";
4
+ exports.SDK_VERSION = "0.1.3";
@@ -14,8 +14,8 @@ export class CredalClient {
14
14
  this._options = Object.assign(Object.assign({}, _options), { headers: mergeHeaders({
15
15
  "X-Fern-Language": "JavaScript",
16
16
  "X-Fern-SDK-Name": "@credal/sdk",
17
- "X-Fern-SDK-Version": "0.1.1",
18
- "User-Agent": "@credal/sdk/0.1.1",
17
+ "X-Fern-SDK-Version": "0.1.3",
18
+ "User-Agent": "@credal/sdk/0.1.3",
19
19
  "X-Fern-Runtime": core.RUNTIME.type,
20
20
  "X-Fern-Runtime-Version": core.RUNTIME.version,
21
21
  }, _options === null || _options === void 0 ? void 0 : _options.headers) });
@@ -40,10 +40,11 @@ export class Copilots {
40
40
  __createCopilot(request, requestOptions) {
41
41
  return __awaiter(this, void 0, void 0, function* () {
42
42
  var _a, _b, _c, _d;
43
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
44
- url: core.url.join((_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"),
43
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
44
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
45
+ 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"),
45
46
  method: "POST",
46
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
47
+ headers: _headers,
47
48
  contentType: "application/json",
48
49
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
49
50
  requestType: "json",
@@ -97,10 +98,11 @@ export class Copilots {
97
98
  __createConversation(request, requestOptions) {
98
99
  return __awaiter(this, void 0, void 0, function* () {
99
100
  var _a, _b, _c, _d;
100
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
101
- url: core.url.join((_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"),
101
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
102
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
103
+ 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"),
102
104
  method: "POST",
103
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
105
+ headers: _headers,
104
106
  contentType: "application/json",
105
107
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
106
108
  requestType: "json",
@@ -158,10 +160,11 @@ export class Copilots {
158
160
  __provideMessageFeedback(request, requestOptions) {
159
161
  return __awaiter(this, void 0, void 0, function* () {
160
162
  var _a, _b, _c, _d;
161
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
162
- url: core.url.join((_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"),
163
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
164
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
165
+ 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"),
163
166
  method: "POST",
164
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
167
+ headers: _headers,
165
168
  contentType: "application/json",
166
169
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
167
170
  requestType: "json",
@@ -221,10 +224,11 @@ export class Copilots {
221
224
  __sendMessage(request, requestOptions) {
222
225
  return __awaiter(this, void 0, void 0, function* () {
223
226
  var _a, _b, _c, _d;
224
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
225
- url: core.url.join((_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"),
227
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
228
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
229
+ 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"),
226
230
  method: "POST",
227
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
231
+ headers: _headers,
228
232
  contentType: "application/json",
229
233
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
230
234
  requestType: "json",
@@ -269,10 +273,11 @@ export class Copilots {
269
273
  __streamMessage(request, requestOptions) {
270
274
  return __awaiter(this, void 0, void 0, function* () {
271
275
  var _a, _b, _c, _d;
272
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
273
- url: core.url.join((_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"),
276
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
277
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
278
+ 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"),
274
279
  method: "POST",
275
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
280
+ headers: _headers,
276
281
  contentType: "application/json",
277
282
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
278
283
  requestType: "json",
@@ -338,10 +343,11 @@ export class Copilots {
338
343
  __addCollectionToCopilot(request, requestOptions) {
339
344
  return __awaiter(this, void 0, void 0, function* () {
340
345
  var _a, _b, _c, _d;
341
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
342
- url: core.url.join((_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"),
346
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
347
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
348
+ 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"),
343
349
  method: "POST",
344
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
350
+ headers: _headers,
345
351
  contentType: "application/json",
346
352
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
347
353
  requestType: "json",
@@ -395,10 +401,11 @@ export class Copilots {
395
401
  __removeCollectionFromCopilot(request, requestOptions) {
396
402
  return __awaiter(this, void 0, void 0, function* () {
397
403
  var _a, _b, _c, _d;
398
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
399
- url: core.url.join((_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"),
404
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
405
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
406
+ 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"),
400
407
  method: "POST",
401
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
408
+ headers: _headers,
402
409
  contentType: "application/json",
403
410
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
404
411
  requestType: "json",
@@ -460,10 +467,11 @@ export class Copilots {
460
467
  __updateConfiguration(request, requestOptions) {
461
468
  return __awaiter(this, void 0, void 0, function* () {
462
469
  var _a, _b, _c, _d;
463
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
464
- url: core.url.join((_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"),
470
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
471
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
472
+ 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"),
465
473
  method: "POST",
466
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
474
+ headers: _headers,
467
475
  contentType: "application/json",
468
476
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
469
477
  requestType: "json",
@@ -514,10 +522,11 @@ export class Copilots {
514
522
  __deleteCopilot(request, requestOptions) {
515
523
  return __awaiter(this, void 0, void 0, function* () {
516
524
  var _a, _b, _c, _d;
517
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
518
- url: core.url.join((_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"),
525
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
526
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
527
+ 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"),
519
528
  method: "DELETE",
520
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
529
+ headers: _headers,
521
530
  contentType: "application/json",
522
531
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
523
532
  requestType: "json",
@@ -37,10 +37,11 @@ export class DocumentCatalog {
37
37
  __uploadDocumentContents(request, requestOptions) {
38
38
  return __awaiter(this, void 0, void 0, function* () {
39
39
  var _a, _b, _c, _d;
40
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
41
- url: core.url.join((_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"),
40
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
41
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
42
+ 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"),
42
43
  method: "POST",
43
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
44
+ headers: _headers,
44
45
  contentType: "application/json",
45
46
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
46
47
  requestType: "json",
@@ -94,10 +95,11 @@ export class DocumentCatalog {
94
95
  __syncSourceByUrl(request, requestOptions) {
95
96
  return __awaiter(this, void 0, void 0, function* () {
96
97
  var _a, _b, _c, _d;
97
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
98
- url: core.url.join((_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"),
98
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
99
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
100
+ 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"),
99
101
  method: "POST",
100
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
102
+ headers: _headers,
101
103
  contentType: "application/json",
102
104
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
103
105
  requestType: "json",
@@ -171,10 +173,11 @@ export class DocumentCatalog {
171
173
  __metadata(request, requestOptions) {
172
174
  return __awaiter(this, void 0, void 0, function* () {
173
175
  var _a, _b, _c, _d;
174
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
175
- url: core.url.join((_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"),
176
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
177
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
178
+ 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"),
176
179
  method: "PATCH",
177
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
180
+ headers: _headers,
178
181
  contentType: "application/json",
179
182
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
180
183
  requestType: "json",
@@ -25,7 +25,7 @@ export interface UploadDocumentContentsRequest {
25
25
  /** The external URL of the document you want to upload. If provided Credal will link to this URL. */
26
26
  documentExternalUrl?: string;
27
27
  /** Optional JSON representing any custom metadata for this document */
28
- customMetadata?: unknown;
28
+ customMetadata?: Record<string, unknown>;
29
29
  /** If specified, document will also be added to a particular document collection */
30
30
  collectionId?: string;
31
31
  /** If specified, document contents will be re-uploaded and re-embedded even if the document already exists in Credal */
@@ -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?: unknown;
9
+ metadata: Record<string, unknown>;
10
10
  }
@@ -74,6 +74,19 @@ export declare class DocumentCollections {
74
74
  */
75
75
  removeDocumentsFromCollection(request: Credal.RemoveDocumentsFromCollectionRequest, requestOptions?: DocumentCollections.RequestOptions): core.HttpResponsePromise<void>;
76
76
  private __removeDocumentsFromCollection;
77
+ /**
78
+ * List documents in a collection
79
+ *
80
+ * @param {Credal.ListDocumentsInCollectionRequest} request
81
+ * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
82
+ *
83
+ * @example
84
+ * await client.documentCollections.listDocumentsInCollection({
85
+ * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24"
86
+ * })
87
+ */
88
+ listDocumentsInCollection(request: Credal.ListDocumentsInCollectionRequest, requestOptions?: DocumentCollections.RequestOptions): core.HttpResponsePromise<Credal.ListDocumentsInCollectionResponse>;
89
+ private __listDocumentsInCollection;
77
90
  /**
78
91
  * Create a new collection. The API key used will be added to the collection for future Requests
79
92
  *
@@ -44,10 +44,11 @@ export class DocumentCollections {
44
44
  __addDocumentsToCollection(request, requestOptions) {
45
45
  return __awaiter(this, void 0, void 0, function* () {
46
46
  var _a, _b, _c, _d;
47
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
48
- url: core.url.join((_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"),
47
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
48
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
49
+ 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"),
49
50
  method: "POST",
50
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
51
+ headers: _headers,
51
52
  contentType: "application/json",
52
53
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
53
54
  requestType: "json",
@@ -109,10 +110,11 @@ export class DocumentCollections {
109
110
  __removeDocumentsFromCollection(request, requestOptions) {
110
111
  return __awaiter(this, void 0, void 0, function* () {
111
112
  var _a, _b, _c, _d;
112
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
113
- url: core.url.join((_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"),
113
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
114
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
115
+ 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"),
114
116
  method: "DELETE",
115
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
117
+ headers: _headers,
116
118
  contentType: "application/json",
117
119
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
118
120
  requestType: "json",
@@ -148,6 +150,66 @@ export class DocumentCollections {
148
150
  }
149
151
  });
150
152
  }
153
+ /**
154
+ * List documents in a collection
155
+ *
156
+ * @param {Credal.ListDocumentsInCollectionRequest} request
157
+ * @param {DocumentCollections.RequestOptions} requestOptions - Request-specific configuration.
158
+ *
159
+ * @example
160
+ * await client.documentCollections.listDocumentsInCollection({
161
+ * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24"
162
+ * })
163
+ */
164
+ listDocumentsInCollection(request, requestOptions) {
165
+ return core.HttpResponsePromise.fromPromise(this.__listDocumentsInCollection(request, requestOptions));
166
+ }
167
+ __listDocumentsInCollection(request, requestOptions) {
168
+ return __awaiter(this, void 0, void 0, function* () {
169
+ var _a, _b, _c, _d;
170
+ const { collectionId } = request;
171
+ const _queryParams = {};
172
+ _queryParams["collectionId"] = collectionId;
173
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
174
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
175
+ 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"),
176
+ method: "GET",
177
+ headers: _headers,
178
+ queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
179
+ timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
180
+ maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
181
+ abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
182
+ });
183
+ if (_response.ok) {
184
+ return {
185
+ data: _response.body,
186
+ rawResponse: _response.rawResponse,
187
+ };
188
+ }
189
+ if (_response.error.reason === "status-code") {
190
+ throw new errors.CredalError({
191
+ statusCode: _response.error.statusCode,
192
+ body: _response.error.body,
193
+ rawResponse: _response.rawResponse,
194
+ });
195
+ }
196
+ switch (_response.error.reason) {
197
+ case "non-json":
198
+ throw new errors.CredalError({
199
+ statusCode: _response.error.statusCode,
200
+ body: _response.error.rawBody,
201
+ rawResponse: _response.rawResponse,
202
+ });
203
+ case "timeout":
204
+ throw new errors.CredalTimeoutError("Timeout exceeded when calling GET /v0/documentCollections/listDocumentsInCollection.");
205
+ case "unknown":
206
+ throw new errors.CredalError({
207
+ message: _response.error.errorMessage,
208
+ rawResponse: _response.rawResponse,
209
+ });
210
+ }
211
+ });
212
+ }
151
213
  /**
152
214
  * Create a new collection. The API key used will be added to the collection for future Requests
153
215
  *
@@ -170,10 +232,11 @@ export class DocumentCollections {
170
232
  __createCollection(request, requestOptions) {
171
233
  return __awaiter(this, void 0, void 0, function* () {
172
234
  var _a, _b, _c, _d;
173
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
174
- url: core.url.join((_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"),
235
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
236
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
237
+ 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"),
175
238
  method: "POST",
176
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
239
+ headers: _headers,
177
240
  contentType: "application/json",
178
241
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
179
242
  requestType: "json",
@@ -226,10 +289,11 @@ export class DocumentCollections {
226
289
  __deleteCollection(request, requestOptions) {
227
290
  return __awaiter(this, void 0, void 0, function* () {
228
291
  var _a, _b, _c, _d;
229
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
230
- url: core.url.join((_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"),
292
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
293
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
294
+ 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"),
231
295
  method: "DELETE",
232
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
296
+ headers: _headers,
233
297
  contentType: "application/json",
234
298
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
235
299
  requestType: "json",
@@ -298,10 +362,11 @@ export class DocumentCollections {
298
362
  __createMongoCollectionSync(request, requestOptions) {
299
363
  return __awaiter(this, void 0, void 0, function* () {
300
364
  var _a, _b, _c, _d;
301
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
302
- url: core.url.join((_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"),
365
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
366
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
367
+ 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"),
303
368
  method: "POST",
304
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
369
+ headers: _headers,
305
370
  contentType: "application/json",
306
371
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
307
372
  requestType: "json",
@@ -370,10 +435,11 @@ export class DocumentCollections {
370
435
  __updateMongoCollectionSync(request, requestOptions) {
371
436
  return __awaiter(this, void 0, void 0, function* () {
372
437
  var _a, _b, _c, _d;
373
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
374
- url: core.url.join((_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"),
438
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
439
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
440
+ 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"),
375
441
  method: "POST",
376
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
442
+ headers: _headers,
377
443
  contentType: "application/json",
378
444
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
379
445
  requestType: "json",
@@ -0,0 +1,13 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ /**
5
+ * @example
6
+ * {
7
+ * collectionId: "82e4b12a-6990-45d4-8ebd-85c00e030c24"
8
+ * }
9
+ */
10
+ export interface ListDocumentsInCollectionRequest {
11
+ /** The ID of the document collection to list documents from. */
12
+ collectionId: string;
13
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -1,5 +1,6 @@
1
1
  export { type AddDocumentsToCollectionRequest } from "./AddDocumentsToCollectionRequest.mjs";
2
2
  export { type RemoveDocumentsFromCollectionRequest } from "./RemoveDocumentsFromCollectionRequest.mjs";
3
+ export { type ListDocumentsInCollectionRequest } from "./ListDocumentsInCollectionRequest.mjs";
3
4
  export { type CreateCollectionRequest } from "./CreateCollectionRequest.mjs";
4
5
  export { type DeleteCollectionRequest } from "./DeleteCollectionRequest.mjs";
5
6
  export { type CreateMongoCollectionSyncRequest } from "./CreateMongoCollectionSyncRequest.mjs";
@@ -0,0 +1,7 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ import * as Credal from "../../../index.mjs";
5
+ export interface ListDocumentsInCollectionResponse {
6
+ resourceIdentifiers: Credal.ResourceIdentifier[];
7
+ }
@@ -0,0 +1,4 @@
1
+ /**
2
+ * This file was auto-generated by Fern from our API Definition.
3
+ */
4
+ export {};
@@ -1,5 +1,6 @@
1
1
  export * from "./CreateCollectionResponse.mjs";
2
2
  export * from "./DeleteCollectionResponse.mjs";
3
+ export * from "./ListDocumentsInCollectionResponse.mjs";
3
4
  export * from "./MongoSourceFieldsConfig.mjs";
4
5
  export * from "./MongoCollectionSyncConfig.mjs";
5
6
  export * from "./MongoCollectionSyncResponse.mjs";
@@ -1,5 +1,6 @@
1
1
  export * from "./CreateCollectionResponse.mjs";
2
2
  export * from "./DeleteCollectionResponse.mjs";
3
+ export * from "./ListDocumentsInCollectionResponse.mjs";
3
4
  export * from "./MongoSourceFieldsConfig.mjs";
4
5
  export * from "./MongoCollectionSyncConfig.mjs";
5
6
  export * from "./MongoCollectionSyncResponse.mjs";
@@ -40,10 +40,11 @@ export class PermissionsService {
40
40
  __checkResourceAuthorizationForUser(request, requestOptions) {
41
41
  return __awaiter(this, void 0, void 0, function* () {
42
42
  var _a, _b, _c, _d;
43
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
44
- url: core.url.join((_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"),
43
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
44
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
45
+ 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/permissions/checkResourceAuthorizationForUser"),
45
46
  method: "POST",
46
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
47
+ headers: _headers,
47
48
  contentType: "application/json",
48
49
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
49
50
  requestType: "json",
@@ -107,10 +108,11 @@ export class PermissionsService {
107
108
  __checkBulkResourcesAuthorizationForUser(request, requestOptions) {
108
109
  return __awaiter(this, void 0, void 0, function* () {
109
110
  var _a, _b, _c, _d;
110
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
111
- url: core.url.join((_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"),
111
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
112
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
113
+ 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/permissions/checkBulkResourcesAuthorizationForUser"),
112
114
  method: "POST",
113
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
115
+ headers: _headers,
114
116
  contentType: "application/json",
115
117
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
116
118
  requestType: "json",
@@ -166,10 +168,11 @@ export class PermissionsService {
166
168
  __listCachedAuthorizedResourcesForUser(request, requestOptions) {
167
169
  return __awaiter(this, void 0, void 0, function* () {
168
170
  var _a, _b, _c, _d;
169
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
170
- url: core.url.join((_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"),
171
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
172
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
173
+ 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/permissions/listCachedAuthorizedResourcesForUser"),
171
174
  method: "POST",
172
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
175
+ headers: _headers,
173
176
  contentType: "application/json",
174
177
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
175
178
  requestType: "json",
@@ -50,10 +50,11 @@ export class Search {
50
50
  __searchDocumentCollection(request, requestOptions) {
51
51
  return __awaiter(this, void 0, void 0, function* () {
52
52
  var _a, _b, _c, _d;
53
- const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
54
- url: core.url.join((_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"),
53
+ var _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
54
+ const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
55
+ 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"),
55
56
  method: "POST",
56
- headers: mergeHeaders((_d = this._options) === null || _d === void 0 ? void 0 : _d.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
57
+ headers: _headers,
57
58
  contentType: "application/json",
58
59
  queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
59
60
  requestType: "json",