@foxnose/sdk 0.3.0 → 0.4.0
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/README.md +103 -5
- package/dist/index.cjs +522 -21
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +282 -8
- package/dist/index.d.ts +282 -8
- package/dist/index.js +517 -21
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -63,6 +63,119 @@ var FoxnoseAPIError = class extends FoxnoseError {
|
|
|
63
63
|
this.responseBody = options.responseBody;
|
|
64
64
|
}
|
|
65
65
|
};
|
|
66
|
+
var SpendCapExceededError = class extends FoxnoseAPIError {
|
|
67
|
+
/** Spend cap in USD, or null when unset on the server side. */
|
|
68
|
+
capUsd;
|
|
69
|
+
/** ISO timestamp when the current billing cycle resets. */
|
|
70
|
+
cycleResetsAt;
|
|
71
|
+
/** URL where the spend cap can be raised. */
|
|
72
|
+
raiseCapUrl;
|
|
73
|
+
constructor(options) {
|
|
74
|
+
super(options);
|
|
75
|
+
this.name = "SpendCapExceededError";
|
|
76
|
+
this.capUsd = options.capUsd;
|
|
77
|
+
this.cycleResetsAt = options.cycleResetsAt;
|
|
78
|
+
this.raiseCapUrl = options.raiseCapUrl;
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
var PlanExhaustedError = class extends FoxnoseAPIError {
|
|
82
|
+
/** Usage axis that was exhausted (e.g. retrievals, writes, data_storage, vector_storage). */
|
|
83
|
+
axis;
|
|
84
|
+
/** ISO timestamp when the usage window resets. */
|
|
85
|
+
windowResetsAt;
|
|
86
|
+
/** URL where the plan can be upgraded. */
|
|
87
|
+
upgradeUrl;
|
|
88
|
+
constructor(options) {
|
|
89
|
+
super(options);
|
|
90
|
+
this.name = "PlanExhaustedError";
|
|
91
|
+
this.axis = options.axis;
|
|
92
|
+
this.windowResetsAt = options.windowResetsAt;
|
|
93
|
+
this.upgradeUrl = options.upgradeUrl;
|
|
94
|
+
}
|
|
95
|
+
};
|
|
96
|
+
var PlanLimitExceededError = class extends FoxnoseAPIError {
|
|
97
|
+
/** Entity whose limit was exceeded (e.g. collections, environments, api_keys). */
|
|
98
|
+
entity;
|
|
99
|
+
/** Maximum allowed by the current plan. */
|
|
100
|
+
limit;
|
|
101
|
+
/** Current count that triggered the error. */
|
|
102
|
+
current;
|
|
103
|
+
/** URL where the plan can be upgraded, if provided. */
|
|
104
|
+
upgradeUrl;
|
|
105
|
+
constructor(options) {
|
|
106
|
+
super(options);
|
|
107
|
+
this.name = "PlanLimitExceededError";
|
|
108
|
+
this.entity = options.entity;
|
|
109
|
+
this.limit = options.limit;
|
|
110
|
+
this.current = options.current;
|
|
111
|
+
this.upgradeUrl = options.upgradeUrl;
|
|
112
|
+
}
|
|
113
|
+
};
|
|
114
|
+
var RateLimitExceededError = class extends FoxnoseAPIError {
|
|
115
|
+
/** Seconds to wait before retrying, from the Retry-After header. */
|
|
116
|
+
retryAfter;
|
|
117
|
+
constructor(options) {
|
|
118
|
+
super(options);
|
|
119
|
+
this.name = "RateLimitExceededError";
|
|
120
|
+
this.retryAfter = options.retryAfter;
|
|
121
|
+
}
|
|
122
|
+
};
|
|
123
|
+
function isPlainObject(value) {
|
|
124
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
125
|
+
}
|
|
126
|
+
function getHeader(headers, name) {
|
|
127
|
+
if (!headers) {
|
|
128
|
+
return void 0;
|
|
129
|
+
}
|
|
130
|
+
const target = name.toLowerCase();
|
|
131
|
+
for (const [key, value] of Object.entries(headers)) {
|
|
132
|
+
if (key.toLowerCase() === target) {
|
|
133
|
+
return value;
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
return void 0;
|
|
137
|
+
}
|
|
138
|
+
function buildAPIError(options) {
|
|
139
|
+
const { statusCode, errorCode, detail, responseHeaders, responseBody } = options;
|
|
140
|
+
const body = isPlainObject(responseBody) ? responseBody : void 0;
|
|
141
|
+
if (statusCode === 402 && errorCode === "spend_cap_reached" && body) {
|
|
142
|
+
return new SpendCapExceededError({
|
|
143
|
+
...options,
|
|
144
|
+
message: "message" in body ? options.message : "Spend cap reached",
|
|
145
|
+
capUsd: typeof body.cap_usd === "number" ? body.cap_usd : body.cap_usd === null ? null : void 0,
|
|
146
|
+
cycleResetsAt: typeof body.cycle_resets_at === "string" ? body.cycle_resets_at : void 0,
|
|
147
|
+
raiseCapUrl: typeof body.raise_cap_url === "string" ? body.raise_cap_url : void 0
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
if (statusCode === 402 && errorCode === "plan_exhausted" && body) {
|
|
151
|
+
return new PlanExhaustedError({
|
|
152
|
+
...options,
|
|
153
|
+
message: "message" in body ? options.message : "Plan allowance exhausted",
|
|
154
|
+
axis: typeof body.axis === "string" ? body.axis : void 0,
|
|
155
|
+
windowResetsAt: typeof body.window_resets_at === "string" ? body.window_resets_at : void 0,
|
|
156
|
+
upgradeUrl: typeof body.upgrade_url === "string" ? body.upgrade_url : void 0
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
if (statusCode === 403 && errorCode === "plan_limit_exceeded") {
|
|
160
|
+
const d = isPlainObject(detail) ? detail : {};
|
|
161
|
+
return new PlanLimitExceededError({
|
|
162
|
+
...options,
|
|
163
|
+
entity: typeof d.entity === "string" ? d.entity : void 0,
|
|
164
|
+
limit: typeof d.limit === "number" ? d.limit : void 0,
|
|
165
|
+
current: typeof d.current === "number" ? d.current : void 0,
|
|
166
|
+
upgradeUrl: typeof d.upgrade_url === "string" ? d.upgrade_url : void 0
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
if (statusCode === 429 && errorCode === "rate_limited") {
|
|
170
|
+
const raw = getHeader(responseHeaders, "Retry-After");
|
|
171
|
+
const parsed = raw !== void 0 ? Number(raw) : NaN;
|
|
172
|
+
return new RateLimitExceededError({
|
|
173
|
+
...options,
|
|
174
|
+
retryAfter: Number.isNaN(parsed) ? void 0 : parsed
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
return new FoxnoseAPIError(options);
|
|
178
|
+
}
|
|
66
179
|
var FoxnoseAuthError = class extends FoxnoseError {
|
|
67
180
|
constructor(message) {
|
|
68
181
|
super(message);
|
|
@@ -147,7 +260,7 @@ var DEFAULT_RETRY_CONFIG = {
|
|
|
147
260
|
statusCodes: [408, 425, 429, 500, 502, 503, 504],
|
|
148
261
|
methods: ["GET", "HEAD", "OPTIONS", "PUT", "DELETE"]
|
|
149
262
|
};
|
|
150
|
-
var SDK_VERSION = "0.
|
|
263
|
+
var SDK_VERSION = "0.4.0";
|
|
151
264
|
var DEFAULT_USER_AGENT = `foxnose-sdk-js/${SDK_VERSION}`;
|
|
152
265
|
function createConfig(options) {
|
|
153
266
|
if (!options.baseUrl) {
|
|
@@ -327,10 +440,12 @@ var HttpTransport = class {
|
|
|
327
440
|
if (text) {
|
|
328
441
|
try {
|
|
329
442
|
const payload = JSON.parse(text);
|
|
330
|
-
message = payload.message ?? message;
|
|
331
|
-
errorCode = payload.error_code;
|
|
332
|
-
detail = payload.detail;
|
|
333
443
|
body = payload;
|
|
444
|
+
if (payload && typeof payload === "object" && !Array.isArray(payload)) {
|
|
445
|
+
message = payload.message ?? message;
|
|
446
|
+
errorCode = payload.error_code;
|
|
447
|
+
detail = payload.detail;
|
|
448
|
+
}
|
|
334
449
|
} catch {
|
|
335
450
|
body = text;
|
|
336
451
|
}
|
|
@@ -341,7 +456,7 @@ var HttpTransport = class {
|
|
|
341
456
|
response.headers.forEach((value, key) => {
|
|
342
457
|
responseHeaders[key] = value;
|
|
343
458
|
});
|
|
344
|
-
throw
|
|
459
|
+
throw buildAPIError({
|
|
345
460
|
message: message || "API request failed",
|
|
346
461
|
statusCode: response.status,
|
|
347
462
|
errorCode,
|
|
@@ -355,7 +470,38 @@ var HttpTransport = class {
|
|
|
355
470
|
}
|
|
356
471
|
};
|
|
357
472
|
|
|
473
|
+
// src/_deprecation.ts
|
|
474
|
+
var warned = /* @__PURE__ */ new Set();
|
|
475
|
+
function warnDeprecatedMethod(oldName, newName, removal = "1.0") {
|
|
476
|
+
if (warned.has(oldName)) {
|
|
477
|
+
return;
|
|
478
|
+
}
|
|
479
|
+
warned.add(oldName);
|
|
480
|
+
console.warn(
|
|
481
|
+
`@foxnose/sdk: ${oldName}() is deprecated; use ${newName}() instead. ${oldName}() will be removed in @foxnose/sdk ${removal}.`
|
|
482
|
+
);
|
|
483
|
+
}
|
|
484
|
+
|
|
358
485
|
// src/management/models.ts
|
|
486
|
+
function nestedFieldMeta(opts) {
|
|
487
|
+
if (opts.extra) {
|
|
488
|
+
const reserved = ["component", "component_version", "auto_update"];
|
|
489
|
+
const collisions = reserved.filter(
|
|
490
|
+
(k) => Object.prototype.hasOwnProperty.call(opts.extra, k)
|
|
491
|
+
);
|
|
492
|
+
if (collisions.length > 0) {
|
|
493
|
+
throw new Error(
|
|
494
|
+
`nestedFieldMeta: 'extra' must not include reserved keys: ${collisions.join(", ")}`
|
|
495
|
+
);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
return {
|
|
499
|
+
...opts.extra ?? {},
|
|
500
|
+
component: opts.component,
|
|
501
|
+
component_version: opts.componentVersion,
|
|
502
|
+
auto_update: opts.autoUpdate ?? false
|
|
503
|
+
};
|
|
504
|
+
}
|
|
359
505
|
function resolveKey(value) {
|
|
360
506
|
if (typeof value === "string") {
|
|
361
507
|
return value;
|
|
@@ -375,11 +521,18 @@ function managementPaths(environmentKey) {
|
|
|
375
521
|
projectRoot: (orgKey, projectKey) => `/organizations/${orgKey}/projects/${projectKey}`,
|
|
376
522
|
environmentsBase: (orgKey, projectKey) => `/organizations/${orgKey}/projects/${projectKey}/environments`,
|
|
377
523
|
environmentRoot: (orgKey, projectKey, envKey) => `/organizations/${orgKey}/projects/${projectKey}/environments/${envKey}`,
|
|
378
|
-
// Folder paths
|
|
524
|
+
// Folder paths (deprecated — see Collection paths below).
|
|
379
525
|
foldersTreeRoot: () => `/v1/${environmentKey}/folders/tree`,
|
|
380
526
|
foldersTreeItem: () => `/v1/${environmentKey}/folders/tree/folder`,
|
|
381
527
|
folderVersionsBase: (folderKey) => `/v1/${environmentKey}/folders/${folderKey}/model/versions`,
|
|
382
528
|
folderSchemaTree: (folderKey, versionKey) => `/v1/${environmentKey}/folders/${folderKey}/model/versions/${versionKey}/schema/tree`,
|
|
529
|
+
// Collection paths (canonical going forward; folder paths above hit the
|
|
530
|
+
// deprecated /folders/ URL alias on the server side).
|
|
531
|
+
collectionsTreeRoot: () => `/v1/${environmentKey}/collections/tree`,
|
|
532
|
+
collectionsTreeItem: () => `/v1/${environmentKey}/collections/tree/collection`,
|
|
533
|
+
collectionVersionsBase: (collectionKey) => `/v1/${environmentKey}/collections/${collectionKey}/model/versions`,
|
|
534
|
+
collectionSchemaTree: (collectionKey, versionKey) => `/v1/${environmentKey}/collections/${collectionKey}/model/versions/${versionKey}/schema/tree`,
|
|
535
|
+
collectionSyncComponent: (collectionKey) => `/v1/${environmentKey}/collections/${collectionKey}/sync_component`,
|
|
383
536
|
// Component paths
|
|
384
537
|
componentsRoot: () => `/v1/${environmentKey}/components`,
|
|
385
538
|
componentRoot: (componentKey) => `/v1/${environmentKey}/components/${componentKey}`,
|
|
@@ -398,6 +551,7 @@ function managementPaths(environmentKey) {
|
|
|
398
551
|
apisRoot: () => `/v1/${environmentKey}/api`,
|
|
399
552
|
apiRoot: (apiKey) => `/v1/${environmentKey}/api/${apiKey}`,
|
|
400
553
|
apiFoldersRoot: (apiKey) => `/v1/${environmentKey}/api/${apiKey}/folders`,
|
|
554
|
+
apiCollectionsRoot: (apiKey) => `/v1/${environmentKey}/api/${apiKey}/collections`,
|
|
401
555
|
// Management role paths
|
|
402
556
|
managementRolesRoot: () => `/v1/${environmentKey}/permissions/management-api/roles`,
|
|
403
557
|
managementRoleRoot: (roleKey) => `/v1/${environmentKey}/permissions/management-api/roles/${roleKey}`,
|
|
@@ -583,13 +737,84 @@ var ManagementClient = class {
|
|
|
583
737
|
await this.request("DELETE", `${this.paths.apiRoot(key)}/`, { parseJson: false });
|
|
584
738
|
}
|
|
585
739
|
// ------------------------------------------------------------------ //
|
|
586
|
-
// API
|
|
740
|
+
// API ↔ Collection association (canonical)
|
|
587
741
|
// ------------------------------------------------------------------ //
|
|
742
|
+
async listApiCollections(apiKey, params) {
|
|
743
|
+
const key = resolveKey(apiKey);
|
|
744
|
+
return this.request("GET", `${this.paths.apiCollectionsRoot(key)}/`, { params });
|
|
745
|
+
}
|
|
746
|
+
async addApiCollection(apiKey, collectionKey, options) {
|
|
747
|
+
const aKey = resolveKey(apiKey);
|
|
748
|
+
const cKey = resolveKey(collectionKey);
|
|
749
|
+
const body = { folder: cKey };
|
|
750
|
+
if (options?.allowedMethods !== void 0) {
|
|
751
|
+
body.allowed_methods = options.allowedMethods;
|
|
752
|
+
}
|
|
753
|
+
if (options?.descriptionGetOne !== void 0) {
|
|
754
|
+
body.description_get_one = options.descriptionGetOne;
|
|
755
|
+
}
|
|
756
|
+
if (options?.descriptionGetMany !== void 0) {
|
|
757
|
+
body.description_get_many = options.descriptionGetMany;
|
|
758
|
+
}
|
|
759
|
+
if (options?.descriptionSearch !== void 0) {
|
|
760
|
+
body.description_search = options.descriptionSearch;
|
|
761
|
+
}
|
|
762
|
+
if (options?.descriptionSchema !== void 0) {
|
|
763
|
+
body.description_schema = options.descriptionSchema;
|
|
764
|
+
}
|
|
765
|
+
return this.request("POST", `${this.paths.apiCollectionsRoot(aKey)}/`, {
|
|
766
|
+
jsonBody: body
|
|
767
|
+
});
|
|
768
|
+
}
|
|
769
|
+
async getApiCollection(apiKey, collectionKey) {
|
|
770
|
+
const aKey = resolveKey(apiKey);
|
|
771
|
+
const cKey = resolveKey(collectionKey);
|
|
772
|
+
return this.request("GET", `${this.paths.apiCollectionsRoot(aKey)}/${cKey}/`);
|
|
773
|
+
}
|
|
774
|
+
async updateApiCollection(apiKey, collectionKey, options) {
|
|
775
|
+
const aKey = resolveKey(apiKey);
|
|
776
|
+
const cKey = resolveKey(collectionKey);
|
|
777
|
+
const body = {};
|
|
778
|
+
if (options?.allowedMethods !== void 0) {
|
|
779
|
+
body.allowed_methods = options.allowedMethods;
|
|
780
|
+
}
|
|
781
|
+
if (options?.descriptionGetOne !== void 0) {
|
|
782
|
+
body.description_get_one = options.descriptionGetOne;
|
|
783
|
+
}
|
|
784
|
+
if (options?.descriptionGetMany !== void 0) {
|
|
785
|
+
body.description_get_many = options.descriptionGetMany;
|
|
786
|
+
}
|
|
787
|
+
if (options?.descriptionSearch !== void 0) {
|
|
788
|
+
body.description_search = options.descriptionSearch;
|
|
789
|
+
}
|
|
790
|
+
if (options?.descriptionSchema !== void 0) {
|
|
791
|
+
body.description_schema = options.descriptionSchema;
|
|
792
|
+
}
|
|
793
|
+
return this.request("PUT", `${this.paths.apiCollectionsRoot(aKey)}/${cKey}/`, {
|
|
794
|
+
jsonBody: body
|
|
795
|
+
});
|
|
796
|
+
}
|
|
797
|
+
async removeApiCollection(apiKey, collectionKey) {
|
|
798
|
+
const aKey = resolveKey(apiKey);
|
|
799
|
+
const cKey = resolveKey(collectionKey);
|
|
800
|
+
await this.request(
|
|
801
|
+
"DELETE",
|
|
802
|
+
`${this.paths.apiCollectionsRoot(aKey)}/${cKey}/`,
|
|
803
|
+
{ parseJson: false }
|
|
804
|
+
);
|
|
805
|
+
}
|
|
806
|
+
// ------------------------------------------------------------------ //
|
|
807
|
+
// API ↔ Folder association (deprecated; hits legacy /folders/ URL)
|
|
808
|
+
// ------------------------------------------------------------------ //
|
|
809
|
+
/** @deprecated Use {@link listApiCollections} instead. */
|
|
588
810
|
async listApiFolders(apiKey, params) {
|
|
811
|
+
warnDeprecatedMethod("listApiFolders", "listApiCollections");
|
|
589
812
|
const key = resolveKey(apiKey);
|
|
590
813
|
return this.request("GET", `${this.paths.apiFoldersRoot(key)}/`, { params });
|
|
591
814
|
}
|
|
815
|
+
/** @deprecated Use {@link addApiCollection} instead. */
|
|
592
816
|
async addApiFolder(apiKey, folderKey, options) {
|
|
817
|
+
warnDeprecatedMethod("addApiFolder", "addApiCollection");
|
|
593
818
|
const aKey = resolveKey(apiKey);
|
|
594
819
|
const fKey = resolveKey(folderKey);
|
|
595
820
|
const body = { folder: fKey };
|
|
@@ -610,12 +835,16 @@ var ManagementClient = class {
|
|
|
610
835
|
}
|
|
611
836
|
return this.request("POST", `${this.paths.apiFoldersRoot(aKey)}/`, { jsonBody: body });
|
|
612
837
|
}
|
|
838
|
+
/** @deprecated Use {@link getApiCollection} instead. */
|
|
613
839
|
async getApiFolder(apiKey, folderKey) {
|
|
840
|
+
warnDeprecatedMethod("getApiFolder", "getApiCollection");
|
|
614
841
|
const aKey = resolveKey(apiKey);
|
|
615
842
|
const fKey = resolveKey(folderKey);
|
|
616
843
|
return this.request("GET", `${this.paths.apiFoldersRoot(aKey)}/${fKey}/`);
|
|
617
844
|
}
|
|
845
|
+
/** @deprecated Use {@link updateApiCollection} instead. */
|
|
618
846
|
async updateApiFolder(apiKey, folderKey, options) {
|
|
847
|
+
warnDeprecatedMethod("updateApiFolder", "updateApiCollection");
|
|
619
848
|
const aKey = resolveKey(apiKey);
|
|
620
849
|
const fKey = resolveKey(folderKey);
|
|
621
850
|
const body = {};
|
|
@@ -638,7 +867,9 @@ var ManagementClient = class {
|
|
|
638
867
|
jsonBody: body
|
|
639
868
|
});
|
|
640
869
|
}
|
|
870
|
+
/** @deprecated Use {@link removeApiCollection} instead. */
|
|
641
871
|
async removeApiFolder(apiKey, folderKey) {
|
|
872
|
+
warnDeprecatedMethod("removeApiFolder", "removeApiCollection");
|
|
642
873
|
const aKey = resolveKey(apiKey);
|
|
643
874
|
const fKey = resolveKey(folderKey);
|
|
644
875
|
await this.request("DELETE", `${this.paths.apiFoldersRoot(aKey)}/${fKey}/`, {
|
|
@@ -790,39 +1021,271 @@ var ManagementClient = class {
|
|
|
790
1021
|
});
|
|
791
1022
|
}
|
|
792
1023
|
// ------------------------------------------------------------------ //
|
|
793
|
-
//
|
|
1024
|
+
// Collection operations (canonical)
|
|
1025
|
+
// ------------------------------------------------------------------ //
|
|
1026
|
+
async listCollections(params) {
|
|
1027
|
+
return this.request("GET", `${this.paths.collectionsTreeRoot()}/`, { params });
|
|
1028
|
+
}
|
|
1029
|
+
async getCollection(collectionKey) {
|
|
1030
|
+
const key = resolveKey(collectionKey);
|
|
1031
|
+
return this.request("GET", `${this.paths.collectionsTreeItem()}/`, {
|
|
1032
|
+
params: { key }
|
|
1033
|
+
});
|
|
1034
|
+
}
|
|
1035
|
+
async getCollectionByPath(path) {
|
|
1036
|
+
return this.request("GET", `${this.paths.collectionsTreeItem()}/`, {
|
|
1037
|
+
params: { path }
|
|
1038
|
+
});
|
|
1039
|
+
}
|
|
1040
|
+
async listCollectionTree(options) {
|
|
1041
|
+
const params = {};
|
|
1042
|
+
if (options?.key) params.key = options.key;
|
|
1043
|
+
if (options?.mode) params.mode = options.mode;
|
|
1044
|
+
return this.request("GET", `${this.paths.collectionsTreeRoot()}/`, { params });
|
|
1045
|
+
}
|
|
1046
|
+
async createCollection(payload) {
|
|
1047
|
+
return this.request("POST", `${this.paths.collectionsTreeRoot()}/`, {
|
|
1048
|
+
jsonBody: payload
|
|
1049
|
+
});
|
|
1050
|
+
}
|
|
1051
|
+
async updateCollection(collectionKey, payload) {
|
|
1052
|
+
const key = resolveKey(collectionKey);
|
|
1053
|
+
return this.request("PUT", `${this.paths.collectionsTreeItem()}/`, {
|
|
1054
|
+
params: { key },
|
|
1055
|
+
jsonBody: payload
|
|
1056
|
+
});
|
|
1057
|
+
}
|
|
1058
|
+
async deleteCollection(collectionKey) {
|
|
1059
|
+
const key = resolveKey(collectionKey);
|
|
1060
|
+
await this.request("DELETE", `${this.paths.collectionsTreeItem()}/`, {
|
|
1061
|
+
params: { key },
|
|
1062
|
+
parseJson: false
|
|
1063
|
+
});
|
|
1064
|
+
}
|
|
1065
|
+
// ------------------------------------------------------------------ //
|
|
1066
|
+
// Collection schema version operations (canonical)
|
|
794
1067
|
// ------------------------------------------------------------------ //
|
|
1068
|
+
async listCollectionVersions(collectionKey, params) {
|
|
1069
|
+
const key = resolveKey(collectionKey);
|
|
1070
|
+
return this.request("GET", `${this.paths.collectionVersionsBase(key)}/`, {
|
|
1071
|
+
params
|
|
1072
|
+
});
|
|
1073
|
+
}
|
|
1074
|
+
async createCollectionVersion(collectionKey, payload, options) {
|
|
1075
|
+
const key = resolveKey(collectionKey);
|
|
1076
|
+
const params = {};
|
|
1077
|
+
if (options?.copyFrom) {
|
|
1078
|
+
params.copy_from = resolveKey(options.copyFrom);
|
|
1079
|
+
}
|
|
1080
|
+
return this.request("POST", `${this.paths.collectionVersionsBase(key)}/`, {
|
|
1081
|
+
jsonBody: payload,
|
|
1082
|
+
params: Object.keys(params).length > 0 ? params : void 0
|
|
1083
|
+
});
|
|
1084
|
+
}
|
|
1085
|
+
async getCollectionVersion(collectionKey, versionKey, options) {
|
|
1086
|
+
const cKey = resolveKey(collectionKey);
|
|
1087
|
+
const vKey = resolveKey(versionKey);
|
|
1088
|
+
const params = {};
|
|
1089
|
+
if (options?.includeSchema !== void 0) {
|
|
1090
|
+
params.include_schema = options.includeSchema;
|
|
1091
|
+
}
|
|
1092
|
+
return this.request(
|
|
1093
|
+
"GET",
|
|
1094
|
+
`${this.paths.collectionVersionsBase(cKey)}/${vKey}/`,
|
|
1095
|
+
{
|
|
1096
|
+
params: Object.keys(params).length > 0 ? params : void 0
|
|
1097
|
+
}
|
|
1098
|
+
);
|
|
1099
|
+
}
|
|
1100
|
+
async updateCollectionVersion(collectionKey, versionKey, payload) {
|
|
1101
|
+
const cKey = resolveKey(collectionKey);
|
|
1102
|
+
const vKey = resolveKey(versionKey);
|
|
1103
|
+
return this.request(
|
|
1104
|
+
"PUT",
|
|
1105
|
+
`${this.paths.collectionVersionsBase(cKey)}/${vKey}/`,
|
|
1106
|
+
{ jsonBody: payload }
|
|
1107
|
+
);
|
|
1108
|
+
}
|
|
1109
|
+
async deleteCollectionVersion(collectionKey, versionKey) {
|
|
1110
|
+
const cKey = resolveKey(collectionKey);
|
|
1111
|
+
const vKey = resolveKey(versionKey);
|
|
1112
|
+
await this.request(
|
|
1113
|
+
"DELETE",
|
|
1114
|
+
`${this.paths.collectionVersionsBase(cKey)}/${vKey}/`,
|
|
1115
|
+
{ parseJson: false }
|
|
1116
|
+
);
|
|
1117
|
+
}
|
|
1118
|
+
async publishCollectionVersion(collectionKey, versionKey) {
|
|
1119
|
+
const cKey = resolveKey(collectionKey);
|
|
1120
|
+
const vKey = resolveKey(versionKey);
|
|
1121
|
+
return this.request(
|
|
1122
|
+
"POST",
|
|
1123
|
+
`${this.paths.collectionVersionsBase(cKey)}/${vKey}/publish/`
|
|
1124
|
+
);
|
|
1125
|
+
}
|
|
1126
|
+
/**
|
|
1127
|
+
* Advance pinned nested fields on a Collection to a target Component version.
|
|
1128
|
+
*
|
|
1129
|
+
* Creates a new published Collection schema version with the affected
|
|
1130
|
+
* `meta.component_version` pins advanced. Fields with `auto_update=true`
|
|
1131
|
+
* and fields already at the requested target version are reported in
|
|
1132
|
+
* `skipped` rather than advanced.
|
|
1133
|
+
*
|
|
1134
|
+
* @param collectionKey The Collection to sync.
|
|
1135
|
+
* @param options.fieldPaths Optional list of nested field paths to advance.
|
|
1136
|
+
* When omitted, every pinned (`auto_update=false`) nested field on the
|
|
1137
|
+
* Collection's current version is considered.
|
|
1138
|
+
* @param options.toVersions Optional per-path override mapping field path
|
|
1139
|
+
* to target Component Version UID. Paths not in this mapping advance to
|
|
1140
|
+
* the referenced Component's `current_version`. When both `fieldPaths`
|
|
1141
|
+
* and `toVersions` are supplied, every key in `toVersions` must also
|
|
1142
|
+
* appear in `fieldPaths`.
|
|
1143
|
+
*
|
|
1144
|
+
* @returns Summary of synced and skipped paths, plus the new
|
|
1145
|
+
* `schema_version` UID (`null` if no paths were advanced).
|
|
1146
|
+
*
|
|
1147
|
+
* @throws `Error` locally (before any HTTP request) when both `fieldPaths`
|
|
1148
|
+
* and `toVersions` are supplied AND `toVersions` contains a key that is
|
|
1149
|
+
* not in `fieldPaths` (mirrors the server-side validator so the misuse
|
|
1150
|
+
* surfaces at the call-site).
|
|
1151
|
+
* @throws `FoxnoseApiError` on:
|
|
1152
|
+
* - 409 `component_sync_conflict` — target version would break existing resources
|
|
1153
|
+
* - 422 `too_many_versions` — Collection schema quota exhausted
|
|
1154
|
+
* - 422 `validation_error` — request body invalid
|
|
1155
|
+
* - 404 — Collection or specified target version missing
|
|
1156
|
+
*
|
|
1157
|
+
* @example
|
|
1158
|
+
* ```ts
|
|
1159
|
+
* // Advance every pinned nested field to its Component's current version.
|
|
1160
|
+
* await client.syncCollectionComponent('articles');
|
|
1161
|
+
*
|
|
1162
|
+
* // Advance a specific path to a chosen Component version.
|
|
1163
|
+
* await client.syncCollectionComponent('articles', {
|
|
1164
|
+
* fieldPaths: ['seo'],
|
|
1165
|
+
* toVersions: { seo: 'ver-def67890' },
|
|
1166
|
+
* });
|
|
1167
|
+
* ```
|
|
1168
|
+
*/
|
|
1169
|
+
async syncCollectionComponent(collectionKey, options = {}) {
|
|
1170
|
+
const cKey = resolveKey(collectionKey);
|
|
1171
|
+
if (options.fieldPaths !== void 0 && options.toVersions !== void 0) {
|
|
1172
|
+
const fieldPathSet = new Set(options.fieldPaths);
|
|
1173
|
+
const extras = Object.keys(options.toVersions).filter((k) => !fieldPathSet.has(k)).sort();
|
|
1174
|
+
if (extras.length > 0) {
|
|
1175
|
+
throw new Error(
|
|
1176
|
+
`toVersions includes paths not present in fieldPaths: [${extras.join(", ")}]`
|
|
1177
|
+
);
|
|
1178
|
+
}
|
|
1179
|
+
}
|
|
1180
|
+
const body = {};
|
|
1181
|
+
if (options.fieldPaths !== void 0) {
|
|
1182
|
+
body.field_paths = options.fieldPaths;
|
|
1183
|
+
}
|
|
1184
|
+
if (options.toVersions !== void 0) {
|
|
1185
|
+
body.to_versions = options.toVersions;
|
|
1186
|
+
}
|
|
1187
|
+
return this.request(
|
|
1188
|
+
"POST",
|
|
1189
|
+
`${this.paths.collectionSyncComponent(cKey)}/`,
|
|
1190
|
+
{ jsonBody: body }
|
|
1191
|
+
);
|
|
1192
|
+
}
|
|
1193
|
+
// ------------------------------------------------------------------ //
|
|
1194
|
+
// Collection schema field operations (canonical)
|
|
1195
|
+
// ------------------------------------------------------------------ //
|
|
1196
|
+
async listCollectionFields(collectionKey, versionKey, params) {
|
|
1197
|
+
const cKey = resolveKey(collectionKey);
|
|
1198
|
+
const vKey = resolveKey(versionKey);
|
|
1199
|
+
return this.request(
|
|
1200
|
+
"GET",
|
|
1201
|
+
`${this.paths.collectionSchemaTree(cKey, vKey)}/`,
|
|
1202
|
+
{ params }
|
|
1203
|
+
);
|
|
1204
|
+
}
|
|
1205
|
+
async createCollectionField(collectionKey, versionKey, payload) {
|
|
1206
|
+
const cKey = resolveKey(collectionKey);
|
|
1207
|
+
const vKey = resolveKey(versionKey);
|
|
1208
|
+
return this.request(
|
|
1209
|
+
"POST",
|
|
1210
|
+
`${this.paths.collectionSchemaTree(cKey, vKey)}/`,
|
|
1211
|
+
{ jsonBody: payload }
|
|
1212
|
+
);
|
|
1213
|
+
}
|
|
1214
|
+
async getCollectionField(collectionKey, versionKey, fieldPath) {
|
|
1215
|
+
const cKey = resolveKey(collectionKey);
|
|
1216
|
+
const vKey = resolveKey(versionKey);
|
|
1217
|
+
return this.request(
|
|
1218
|
+
"GET",
|
|
1219
|
+
`${this.paths.collectionSchemaTree(cKey, vKey)}/field/`,
|
|
1220
|
+
{ params: { path: fieldPath } }
|
|
1221
|
+
);
|
|
1222
|
+
}
|
|
1223
|
+
async updateCollectionField(collectionKey, versionKey, fieldPath, payload) {
|
|
1224
|
+
const cKey = resolveKey(collectionKey);
|
|
1225
|
+
const vKey = resolveKey(versionKey);
|
|
1226
|
+
return this.request(
|
|
1227
|
+
"PUT",
|
|
1228
|
+
`${this.paths.collectionSchemaTree(cKey, vKey)}/field/`,
|
|
1229
|
+
{ params: { path: fieldPath }, jsonBody: payload }
|
|
1230
|
+
);
|
|
1231
|
+
}
|
|
1232
|
+
async deleteCollectionField(collectionKey, versionKey, fieldPath) {
|
|
1233
|
+
const cKey = resolveKey(collectionKey);
|
|
1234
|
+
const vKey = resolveKey(versionKey);
|
|
1235
|
+
await this.request(
|
|
1236
|
+
"DELETE",
|
|
1237
|
+
`${this.paths.collectionSchemaTree(cKey, vKey)}/field/`,
|
|
1238
|
+
{ params: { path: fieldPath }, parseJson: false }
|
|
1239
|
+
);
|
|
1240
|
+
}
|
|
1241
|
+
// ------------------------------------------------------------------ //
|
|
1242
|
+
// Folder operations (deprecated; hit legacy /folders/ URL)
|
|
1243
|
+
// ------------------------------------------------------------------ //
|
|
1244
|
+
/** @deprecated Use {@link listCollections} instead. */
|
|
795
1245
|
async listFolders(params) {
|
|
1246
|
+
warnDeprecatedMethod("listFolders", "listCollections");
|
|
796
1247
|
return this.request("GET", `${this.paths.foldersTreeRoot()}/`, { params });
|
|
797
1248
|
}
|
|
1249
|
+
/** @deprecated Use {@link getCollection} instead. */
|
|
798
1250
|
async getFolder(folderKey) {
|
|
1251
|
+
warnDeprecatedMethod("getFolder", "getCollection");
|
|
799
1252
|
const key = resolveKey(folderKey);
|
|
800
1253
|
return this.request("GET", `${this.paths.foldersTreeItem()}/`, {
|
|
801
1254
|
params: { key }
|
|
802
1255
|
});
|
|
803
1256
|
}
|
|
1257
|
+
/** @deprecated Use {@link getCollectionByPath} instead. */
|
|
804
1258
|
async getFolderByPath(path) {
|
|
1259
|
+
warnDeprecatedMethod("getFolderByPath", "getCollectionByPath");
|
|
805
1260
|
return this.request("GET", `${this.paths.foldersTreeItem()}/`, {
|
|
806
1261
|
params: { path }
|
|
807
1262
|
});
|
|
808
1263
|
}
|
|
1264
|
+
/** @deprecated Use {@link listCollectionTree} instead. */
|
|
809
1265
|
async listFolderTree(options) {
|
|
1266
|
+
warnDeprecatedMethod("listFolderTree", "listCollectionTree");
|
|
810
1267
|
const params = {};
|
|
811
1268
|
if (options?.key) params.key = options.key;
|
|
812
1269
|
if (options?.mode) params.mode = options.mode;
|
|
813
1270
|
return this.request("GET", `${this.paths.foldersTreeRoot()}/`, { params });
|
|
814
1271
|
}
|
|
1272
|
+
/** @deprecated Use {@link createCollection} instead. */
|
|
815
1273
|
async createFolder(payload) {
|
|
1274
|
+
warnDeprecatedMethod("createFolder", "createCollection");
|
|
816
1275
|
return this.request("POST", `${this.paths.foldersTreeRoot()}/`, { jsonBody: payload });
|
|
817
1276
|
}
|
|
1277
|
+
/** @deprecated Use {@link updateCollection} instead. */
|
|
818
1278
|
async updateFolder(folderKey, payload) {
|
|
1279
|
+
warnDeprecatedMethod("updateFolder", "updateCollection");
|
|
819
1280
|
const key = resolveKey(folderKey);
|
|
820
1281
|
return this.request("PUT", `${this.paths.foldersTreeItem()}/`, {
|
|
821
1282
|
params: { key },
|
|
822
1283
|
jsonBody: payload
|
|
823
1284
|
});
|
|
824
1285
|
}
|
|
1286
|
+
/** @deprecated Use {@link deleteCollection} instead. */
|
|
825
1287
|
async deleteFolder(folderKey) {
|
|
1288
|
+
warnDeprecatedMethod("deleteFolder", "deleteCollection");
|
|
826
1289
|
const key = resolveKey(folderKey);
|
|
827
1290
|
await this.request("DELETE", `${this.paths.foldersTreeItem()}/`, {
|
|
828
1291
|
params: { key },
|
|
@@ -830,13 +1293,17 @@ var ManagementClient = class {
|
|
|
830
1293
|
});
|
|
831
1294
|
}
|
|
832
1295
|
// ------------------------------------------------------------------ //
|
|
833
|
-
// Folder version operations
|
|
1296
|
+
// Folder version operations (deprecated)
|
|
834
1297
|
// ------------------------------------------------------------------ //
|
|
1298
|
+
/** @deprecated Use {@link listCollectionVersions} instead. */
|
|
835
1299
|
async listFolderVersions(folderKey, params) {
|
|
1300
|
+
warnDeprecatedMethod("listFolderVersions", "listCollectionVersions");
|
|
836
1301
|
const key = resolveKey(folderKey);
|
|
837
1302
|
return this.request("GET", `${this.paths.folderVersionsBase(key)}/`, { params });
|
|
838
1303
|
}
|
|
1304
|
+
/** @deprecated Use {@link createCollectionVersion} instead. */
|
|
839
1305
|
async createFolderVersion(folderKey, payload, options) {
|
|
1306
|
+
warnDeprecatedMethod("createFolderVersion", "createCollectionVersion");
|
|
840
1307
|
const key = resolveKey(folderKey);
|
|
841
1308
|
const params = {};
|
|
842
1309
|
if (options?.copyFrom) {
|
|
@@ -847,7 +1314,9 @@ var ManagementClient = class {
|
|
|
847
1314
|
params: Object.keys(params).length > 0 ? params : void 0
|
|
848
1315
|
});
|
|
849
1316
|
}
|
|
1317
|
+
/** @deprecated Use {@link getCollectionVersion} instead. */
|
|
850
1318
|
async getFolderVersion(folderKey, versionKey, options) {
|
|
1319
|
+
warnDeprecatedMethod("getFolderVersion", "getCollectionVersion");
|
|
851
1320
|
const fKey = resolveKey(folderKey);
|
|
852
1321
|
const vKey = resolveKey(versionKey);
|
|
853
1322
|
const params = {};
|
|
@@ -858,48 +1327,62 @@ var ManagementClient = class {
|
|
|
858
1327
|
params: Object.keys(params).length > 0 ? params : void 0
|
|
859
1328
|
});
|
|
860
1329
|
}
|
|
1330
|
+
/** @deprecated Use {@link updateCollectionVersion} instead. */
|
|
861
1331
|
async updateFolderVersion(folderKey, versionKey, payload) {
|
|
1332
|
+
warnDeprecatedMethod("updateFolderVersion", "updateCollectionVersion");
|
|
862
1333
|
const fKey = resolveKey(folderKey);
|
|
863
1334
|
const vKey = resolveKey(versionKey);
|
|
864
1335
|
return this.request("PUT", `${this.paths.folderVersionsBase(fKey)}/${vKey}/`, {
|
|
865
1336
|
jsonBody: payload
|
|
866
1337
|
});
|
|
867
1338
|
}
|
|
1339
|
+
/** @deprecated Use {@link deleteCollectionVersion} instead. */
|
|
868
1340
|
async deleteFolderVersion(folderKey, versionKey) {
|
|
1341
|
+
warnDeprecatedMethod("deleteFolderVersion", "deleteCollectionVersion");
|
|
869
1342
|
const fKey = resolveKey(folderKey);
|
|
870
1343
|
const vKey = resolveKey(versionKey);
|
|
871
1344
|
await this.request("DELETE", `${this.paths.folderVersionsBase(fKey)}/${vKey}/`, {
|
|
872
1345
|
parseJson: false
|
|
873
1346
|
});
|
|
874
1347
|
}
|
|
1348
|
+
/** @deprecated Use {@link publishCollectionVersion} instead. */
|
|
875
1349
|
async publishFolderVersion(folderKey, versionKey) {
|
|
1350
|
+
warnDeprecatedMethod("publishFolderVersion", "publishCollectionVersion");
|
|
876
1351
|
const fKey = resolveKey(folderKey);
|
|
877
1352
|
const vKey = resolveKey(versionKey);
|
|
878
1353
|
return this.request("POST", `${this.paths.folderVersionsBase(fKey)}/${vKey}/publish/`);
|
|
879
1354
|
}
|
|
880
1355
|
// ------------------------------------------------------------------ //
|
|
881
|
-
// Folder field operations
|
|
1356
|
+
// Folder field operations (deprecated)
|
|
882
1357
|
// ------------------------------------------------------------------ //
|
|
1358
|
+
/** @deprecated Use {@link listCollectionFields} instead. */
|
|
883
1359
|
async listFolderFields(folderKey, versionKey, params) {
|
|
1360
|
+
warnDeprecatedMethod("listFolderFields", "listCollectionFields");
|
|
884
1361
|
const fKey = resolveKey(folderKey);
|
|
885
1362
|
const vKey = resolveKey(versionKey);
|
|
886
1363
|
return this.request("GET", `${this.paths.folderSchemaTree(fKey, vKey)}/`, { params });
|
|
887
1364
|
}
|
|
1365
|
+
/** @deprecated Use {@link createCollectionField} instead. */
|
|
888
1366
|
async createFolderField(folderKey, versionKey, payload) {
|
|
1367
|
+
warnDeprecatedMethod("createFolderField", "createCollectionField");
|
|
889
1368
|
const fKey = resolveKey(folderKey);
|
|
890
1369
|
const vKey = resolveKey(versionKey);
|
|
891
1370
|
return this.request("POST", `${this.paths.folderSchemaTree(fKey, vKey)}/`, {
|
|
892
1371
|
jsonBody: payload
|
|
893
1372
|
});
|
|
894
1373
|
}
|
|
1374
|
+
/** @deprecated Use {@link getCollectionField} instead. */
|
|
895
1375
|
async getFolderField(folderKey, versionKey, fieldPath) {
|
|
1376
|
+
warnDeprecatedMethod("getFolderField", "getCollectionField");
|
|
896
1377
|
const fKey = resolveKey(folderKey);
|
|
897
1378
|
const vKey = resolveKey(versionKey);
|
|
898
1379
|
return this.request("GET", `${this.paths.folderSchemaTree(fKey, vKey)}/field/`, {
|
|
899
1380
|
params: { path: fieldPath }
|
|
900
1381
|
});
|
|
901
1382
|
}
|
|
1383
|
+
/** @deprecated Use {@link updateCollectionField} instead. */
|
|
902
1384
|
async updateFolderField(folderKey, versionKey, fieldPath, payload) {
|
|
1385
|
+
warnDeprecatedMethod("updateFolderField", "updateCollectionField");
|
|
903
1386
|
const fKey = resolveKey(folderKey);
|
|
904
1387
|
const vKey = resolveKey(versionKey);
|
|
905
1388
|
return this.request("PUT", `${this.paths.folderSchemaTree(fKey, vKey)}/field/`, {
|
|
@@ -907,7 +1390,9 @@ var ManagementClient = class {
|
|
|
907
1390
|
jsonBody: payload
|
|
908
1391
|
});
|
|
909
1392
|
}
|
|
1393
|
+
/** @deprecated Use {@link deleteCollectionField} instead. */
|
|
910
1394
|
async deleteFolderField(folderKey, versionKey, fieldPath) {
|
|
1395
|
+
warnDeprecatedMethod("deleteFolderField", "deleteCollectionField");
|
|
911
1396
|
const fKey = resolveKey(folderKey);
|
|
912
1397
|
const vKey = resolveKey(versionKey);
|
|
913
1398
|
await this.request("DELETE", `${this.paths.folderSchemaTree(fKey, vKey)}/field/`, {
|
|
@@ -1035,32 +1520,41 @@ var ManagementClient = class {
|
|
|
1035
1520
|
return this.request("GET", `${this.paths.resourceBase(fKey)}/${rKey}/`);
|
|
1036
1521
|
}
|
|
1037
1522
|
async createResource(folderKey, payload, options) {
|
|
1038
|
-
|
|
1039
|
-
|
|
1040
|
-
|
|
1041
|
-
|
|
1523
|
+
if (options && typeof options === "object" && "component" in options) {
|
|
1524
|
+
throw new TypeError(
|
|
1525
|
+
"The `component` option has been removed. Resources now derive their schema from the folder's model. Remove the `component` field from your call site."
|
|
1526
|
+
);
|
|
1042
1527
|
}
|
|
1528
|
+
const key = resolveKey(folderKey);
|
|
1043
1529
|
const body = { ...payload };
|
|
1044
1530
|
if (options?.externalId) {
|
|
1045
1531
|
body.external_id = options.externalId;
|
|
1046
1532
|
}
|
|
1047
1533
|
return this.request("POST", `${this.paths.resourceBase(key)}/`, {
|
|
1048
|
-
params: Object.keys(params).length ? params : void 0,
|
|
1049
1534
|
jsonBody: body
|
|
1050
1535
|
});
|
|
1051
1536
|
}
|
|
1052
1537
|
async upsertResource(folderKey, payload, options) {
|
|
1538
|
+
if (options && typeof options === "object" && "component" in options) {
|
|
1539
|
+
throw new TypeError(
|
|
1540
|
+
"The `component` option has been removed. Resources now derive their schema from the folder's model. Remove the `component` field from your call site."
|
|
1541
|
+
);
|
|
1542
|
+
}
|
|
1053
1543
|
const key = resolveKey(folderKey);
|
|
1054
1544
|
const params = { external_id: options.externalId };
|
|
1055
|
-
if (options.component) {
|
|
1056
|
-
params.component = resolveKey(options.component);
|
|
1057
|
-
}
|
|
1058
1545
|
return this.request("PUT", `${this.paths.resourceBase(key)}/`, {
|
|
1059
1546
|
params,
|
|
1060
1547
|
jsonBody: payload
|
|
1061
1548
|
});
|
|
1062
1549
|
}
|
|
1063
1550
|
async batchUpsertResources(folderKey, items, options) {
|
|
1551
|
+
for (const item of items) {
|
|
1552
|
+
if (item && typeof item === "object" && "component" in item) {
|
|
1553
|
+
throw new TypeError(
|
|
1554
|
+
"BatchUpsertItem.component has been removed. Resources now derive their schema from the folder's model. Remove the `component` field from your batch items."
|
|
1555
|
+
);
|
|
1556
|
+
}
|
|
1557
|
+
}
|
|
1064
1558
|
const fKey = resolveKey(folderKey);
|
|
1065
1559
|
const maxConcurrency = options?.maxConcurrency ?? 5;
|
|
1066
1560
|
if (maxConcurrency < 1) {
|
|
@@ -1078,9 +1572,6 @@ var ManagementClient = class {
|
|
|
1078
1572
|
const processItem = async (index, item) => {
|
|
1079
1573
|
try {
|
|
1080
1574
|
const params = { external_id: item.external_id };
|
|
1081
|
-
if (item.component) {
|
|
1082
|
-
params.component = item.component;
|
|
1083
|
-
}
|
|
1084
1575
|
const result = await this.request(
|
|
1085
1576
|
"PUT",
|
|
1086
1577
|
`${this.paths.resourceBase(fKey)}/`,
|
|
@@ -1657,14 +2148,19 @@ export {
|
|
|
1657
2148
|
HttpTransport,
|
|
1658
2149
|
JWTAuth,
|
|
1659
2150
|
ManagementClient,
|
|
2151
|
+
PlanExhaustedError,
|
|
2152
|
+
PlanLimitExceededError,
|
|
2153
|
+
RateLimitExceededError,
|
|
1660
2154
|
SDK_VERSION,
|
|
1661
2155
|
SearchMode,
|
|
1662
2156
|
SecureKeyAuth,
|
|
1663
2157
|
SimpleKeyAuth,
|
|
2158
|
+
SpendCapExceededError,
|
|
1664
2159
|
StaticTokenProvider,
|
|
1665
2160
|
SDK_VERSION as VERSION,
|
|
1666
2161
|
buildSearchBody,
|
|
1667
2162
|
createConfig,
|
|
2163
|
+
nestedFieldMeta,
|
|
1668
2164
|
resolveKey
|
|
1669
2165
|
};
|
|
1670
2166
|
//# sourceMappingURL=index.js.map
|