frameio 3.2.2 → 4.1.1
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 +159 -4
- package/dist/cjs/BaseClient.d.ts +4 -0
- package/dist/cjs/BaseClient.js +4 -2
- package/dist/cjs/api/resources/accountPermissions/client/Client.js +6 -6
- package/dist/cjs/api/resources/accounts/client/Client.js +13 -13
- package/dist/cjs/api/resources/comments/client/Client.js +48 -48
- package/dist/cjs/api/resources/files/client/Client.js +77 -77
- package/dist/cjs/api/resources/folders/client/Client.js +56 -56
- package/dist/cjs/api/resources/metadata/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/metadata/client/Client.js +18 -18
- package/dist/cjs/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.ts +4 -4
- package/dist/cjs/api/resources/metadataFields/client/Client.js +28 -28
- package/dist/cjs/api/resources/projectPermissions/client/Client.js +20 -20
- package/dist/cjs/api/resources/projects/client/Client.js +34 -34
- package/dist/cjs/api/resources/shares/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/shares/client/Client.js +72 -72
- package/dist/cjs/api/resources/shares/client/requests/AddAssetParams.d.ts +1 -1
- package/dist/cjs/api/resources/shares/client/requests/CreateShareParams.d.ts +2 -2
- package/dist/cjs/api/resources/shares/client/requests/UpdateShareParams.d.ts +1 -1
- package/dist/cjs/api/resources/users/client/Client.js +7 -7
- package/dist/cjs/api/resources/versionStacks/client/Client.d.ts +6 -2
- package/dist/cjs/api/resources/versionStacks/client/Client.js +48 -44
- package/dist/cjs/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.ts +1 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +34 -34
- package/dist/cjs/api/resources/workspacePermissions/client/Client.js +20 -20
- package/dist/cjs/api/resources/workspaces/client/Client.js +34 -34
- package/dist/cjs/api/types/Account.d.ts +0 -2
- package/dist/cjs/api/types/AuditLogwithIncludes.d.ts +4 -0
- package/dist/cjs/api/types/AuditLogwithIncludes.js +4 -0
- package/dist/cjs/api/types/Filters.d.ts +4 -0
- package/dist/cjs/api/types/Filters.js +4 -0
- package/dist/cjs/index.d.ts +4 -0
- package/dist/cjs/index.js +21 -1
- package/dist/cjs/oauth/BaseAuth.d.ts +66 -0
- package/dist/cjs/oauth/BaseAuth.js +113 -0
- package/dist/cjs/oauth/NativeAppAuth.d.ts +32 -0
- package/dist/cjs/oauth/NativeAppAuth.js +35 -0
- package/dist/cjs/oauth/SPAAuth.d.ts +38 -0
- package/dist/cjs/oauth/SPAAuth.js +96 -0
- package/dist/cjs/oauth/ServerToServerAuth.d.ts +17 -0
- package/dist/cjs/oauth/ServerToServerAuth.js +49 -0
- package/dist/cjs/oauth/TokenManager.d.ts +83 -0
- package/dist/cjs/oauth/TokenManager.js +174 -0
- package/dist/cjs/oauth/WebAppAuth.d.ts +29 -0
- package/dist/cjs/oauth/WebAppAuth.js +88 -0
- package/dist/cjs/oauth/errors.d.ts +41 -0
- package/dist/cjs/oauth/errors.js +83 -0
- package/dist/cjs/oauth/http.d.ts +70 -0
- package/dist/cjs/oauth/http.js +280 -0
- package/dist/cjs/oauth/index.d.ts +34 -0
- package/dist/cjs/oauth/index.js +47 -0
- package/dist/cjs/oauth/logger.d.ts +17 -0
- package/dist/cjs/oauth/logger.js +18 -0
- package/dist/cjs/oauth/pkce.d.ts +30 -0
- package/dist/cjs/oauth/pkce.js +102 -0
- package/dist/cjs/oauth/validation.d.ts +17 -0
- package/dist/cjs/oauth/validation.js +55 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +4 -0
- package/dist/esm/BaseClient.mjs +4 -2
- package/dist/esm/api/resources/accountPermissions/client/Client.mjs +7 -7
- package/dist/esm/api/resources/accounts/client/Client.mjs +13 -13
- package/dist/esm/api/resources/comments/client/Client.mjs +49 -49
- package/dist/esm/api/resources/files/client/Client.mjs +78 -78
- package/dist/esm/api/resources/folders/client/Client.mjs +57 -57
- package/dist/esm/api/resources/metadata/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/metadata/client/Client.mjs +19 -19
- package/dist/esm/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.mts +4 -4
- package/dist/esm/api/resources/metadataFields/client/Client.mjs +29 -29
- package/dist/esm/api/resources/projectPermissions/client/Client.mjs +21 -21
- package/dist/esm/api/resources/projects/client/Client.mjs +35 -35
- package/dist/esm/api/resources/shares/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/shares/client/Client.mjs +73 -73
- package/dist/esm/api/resources/shares/client/requests/AddAssetParams.d.mts +1 -1
- package/dist/esm/api/resources/shares/client/requests/CreateShareParams.d.mts +2 -2
- package/dist/esm/api/resources/shares/client/requests/UpdateShareParams.d.mts +1 -1
- package/dist/esm/api/resources/users/client/Client.mjs +8 -8
- package/dist/esm/api/resources/versionStacks/client/Client.d.mts +6 -2
- package/dist/esm/api/resources/versionStacks/client/Client.mjs +49 -45
- package/dist/esm/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.mts +1 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +35 -35
- package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +21 -21
- package/dist/esm/api/resources/workspaces/client/Client.mjs +35 -35
- package/dist/esm/api/types/Account.d.mts +0 -2
- package/dist/esm/api/types/AuditLogwithIncludes.d.mts +4 -0
- package/dist/esm/api/types/AuditLogwithIncludes.mjs +4 -0
- package/dist/esm/api/types/Filters.d.mts +4 -0
- package/dist/esm/api/types/Filters.mjs +4 -0
- package/dist/esm/index.d.mts +4 -0
- package/dist/esm/index.mjs +6 -0
- package/dist/esm/oauth/BaseAuth.d.mts +66 -0
- package/dist/esm/oauth/BaseAuth.mjs +109 -0
- package/dist/esm/oauth/NativeAppAuth.d.mts +32 -0
- package/dist/esm/oauth/NativeAppAuth.mjs +31 -0
- package/dist/esm/oauth/SPAAuth.d.mts +38 -0
- package/dist/esm/oauth/SPAAuth.mjs +92 -0
- package/dist/esm/oauth/ServerToServerAuth.d.mts +17 -0
- package/dist/esm/oauth/ServerToServerAuth.mjs +45 -0
- package/dist/esm/oauth/TokenManager.d.mts +83 -0
- package/dist/esm/oauth/TokenManager.mjs +170 -0
- package/dist/esm/oauth/WebAppAuth.d.mts +29 -0
- package/dist/esm/oauth/WebAppAuth.mjs +84 -0
- package/dist/esm/oauth/errors.d.mts +41 -0
- package/dist/esm/oauth/errors.mjs +72 -0
- package/dist/esm/oauth/http.d.mts +70 -0
- package/dist/esm/oauth/http.mjs +274 -0
- package/dist/esm/oauth/index.d.mts +34 -0
- package/dist/esm/oauth/index.mjs +30 -0
- package/dist/esm/oauth/logger.d.mts +17 -0
- package/dist/esm/oauth/logger.mjs +15 -0
- package/dist/esm/oauth/pkce.d.mts +30 -0
- package/dist/esm/oauth/pkce.mjs +98 -0
- package/dist/esm/oauth/validation.d.mts +17 -0
- package/dist/esm/oauth/validation.mjs +51 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +14 -10
|
@@ -20,7 +20,7 @@ var __rest = (this && this.__rest) || function (s, e) {
|
|
|
20
20
|
return t;
|
|
21
21
|
};
|
|
22
22
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
23
|
-
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
23
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
24
24
|
import * as core from "../../../../core/index.mjs";
|
|
25
25
|
import * as environments from "../../../../environments.mjs";
|
|
26
26
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
@@ -59,22 +59,22 @@ export class FoldersClient {
|
|
|
59
59
|
}
|
|
60
60
|
__show(account_id_1, folder_id_1) {
|
|
61
61
|
return __awaiter(this, arguments, void 0, function* (account_id, folder_id, request = {}, requestOptions) {
|
|
62
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
62
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
63
63
|
const { include } = request;
|
|
64
64
|
const _queryParams = {
|
|
65
65
|
include: include != null ? include : undefined,
|
|
66
66
|
};
|
|
67
67
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
68
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
69
|
-
const _response = yield ((
|
|
70
|
-
url: core.url.join((
|
|
68
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
69
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
70
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}`),
|
|
71
71
|
method: "GET",
|
|
72
72
|
headers: _headers,
|
|
73
73
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
74
|
-
timeoutMs: ((
|
|
75
|
-
maxRetries: (
|
|
74
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
75
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
76
76
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
77
|
-
fetchFn: (
|
|
77
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
78
78
|
logging: this._options.logging,
|
|
79
79
|
});
|
|
80
80
|
if (_response.ok) {
|
|
@@ -130,18 +130,18 @@ export class FoldersClient {
|
|
|
130
130
|
}
|
|
131
131
|
__delete(account_id, folder_id, requestOptions) {
|
|
132
132
|
return __awaiter(this, void 0, void 0, function* () {
|
|
133
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
133
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
134
134
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
135
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
136
|
-
const _response = yield ((
|
|
137
|
-
url: core.url.join((
|
|
135
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
136
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
137
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}`),
|
|
138
138
|
method: "DELETE",
|
|
139
139
|
headers: _headers,
|
|
140
140
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
141
|
-
timeoutMs: ((
|
|
142
|
-
maxRetries: (
|
|
141
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
142
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
143
143
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
144
|
-
fetchFn: (
|
|
144
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
145
145
|
logging: this._options.logging,
|
|
146
146
|
});
|
|
147
147
|
if (_response.ok) {
|
|
@@ -202,21 +202,21 @@ export class FoldersClient {
|
|
|
202
202
|
}
|
|
203
203
|
__update(account_id, folder_id, request, requestOptions) {
|
|
204
204
|
return __awaiter(this, void 0, void 0, function* () {
|
|
205
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
205
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
206
206
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
207
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
208
|
-
const _response = yield ((
|
|
209
|
-
url: core.url.join((
|
|
207
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
208
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
209
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}`),
|
|
210
210
|
method: "PATCH",
|
|
211
211
|
headers: _headers,
|
|
212
212
|
contentType: "application/json",
|
|
213
213
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
214
214
|
requestType: "json",
|
|
215
215
|
body: request,
|
|
216
|
-
timeoutMs: ((
|
|
217
|
-
maxRetries: (
|
|
216
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
217
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
218
218
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
219
|
-
fetchFn: (
|
|
219
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
220
220
|
logging: this._options.logging,
|
|
221
221
|
});
|
|
222
222
|
if (_response.ok) {
|
|
@@ -291,7 +291,7 @@ export class FoldersClient {
|
|
|
291
291
|
}
|
|
292
292
|
__index(account_id_1, folder_id_1) {
|
|
293
293
|
return __awaiter(this, arguments, void 0, function* (account_id, folder_id, request = {}, requestOptions) {
|
|
294
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
294
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
295
295
|
const { include, type: type_, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
296
296
|
const _queryParams = {
|
|
297
297
|
include: include != null ? include : undefined,
|
|
@@ -301,16 +301,16 @@ export class FoldersClient {
|
|
|
301
301
|
include_total_count: includeTotalCount,
|
|
302
302
|
};
|
|
303
303
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
304
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
305
|
-
const _response = yield ((
|
|
306
|
-
url: core.url.join((
|
|
304
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
305
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
306
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/children`),
|
|
307
307
|
method: "GET",
|
|
308
308
|
headers: _headers,
|
|
309
309
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
310
|
-
timeoutMs: ((
|
|
311
|
-
maxRetries: (
|
|
310
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
311
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
312
312
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
313
|
-
fetchFn: (
|
|
313
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
314
314
|
logging: this._options.logging,
|
|
315
315
|
});
|
|
316
316
|
if (_response.ok) {
|
|
@@ -375,25 +375,25 @@ export class FoldersClient {
|
|
|
375
375
|
}
|
|
376
376
|
__copy(account_id_1, folder_id_1) {
|
|
377
377
|
return __awaiter(this, arguments, void 0, function* (account_id, folder_id, request = {}, requestOptions) {
|
|
378
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
378
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
379
379
|
const { copy_metadata: copyMetadata } = request, _body = __rest(request, ["copy_metadata"]);
|
|
380
380
|
const _queryParams = {
|
|
381
381
|
copy_metadata: copyMetadata,
|
|
382
382
|
};
|
|
383
383
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
384
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
385
|
-
const _response = yield ((
|
|
386
|
-
url: core.url.join((
|
|
384
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
385
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
386
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/copy`),
|
|
387
387
|
method: "POST",
|
|
388
388
|
headers: _headers,
|
|
389
389
|
contentType: "application/json",
|
|
390
390
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
391
391
|
requestType: "json",
|
|
392
392
|
body: _body,
|
|
393
|
-
timeoutMs: ((
|
|
394
|
-
maxRetries: (
|
|
393
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
394
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
395
395
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
396
|
-
fetchFn: (
|
|
396
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
397
397
|
logging: this._options.logging,
|
|
398
398
|
});
|
|
399
399
|
if (_response.ok) {
|
|
@@ -455,7 +455,7 @@ export class FoldersClient {
|
|
|
455
455
|
}
|
|
456
456
|
__list(account_id_1, folder_id_1) {
|
|
457
457
|
return __awaiter(this, arguments, void 0, function* (account_id, folder_id, request = {}, requestOptions) {
|
|
458
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
458
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
459
459
|
const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
460
460
|
const _queryParams = {
|
|
461
461
|
include: include != null ? include : undefined,
|
|
@@ -464,16 +464,16 @@ export class FoldersClient {
|
|
|
464
464
|
include_total_count: includeTotalCount,
|
|
465
465
|
};
|
|
466
466
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
467
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
468
|
-
const _response = yield ((
|
|
469
|
-
url: core.url.join((
|
|
467
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
468
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
469
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/folders`),
|
|
470
470
|
method: "GET",
|
|
471
471
|
headers: _headers,
|
|
472
472
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
473
|
-
timeoutMs: ((
|
|
474
|
-
maxRetries: (
|
|
473
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
474
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
475
475
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
476
|
-
fetchFn: (
|
|
476
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
477
477
|
logging: this._options.logging,
|
|
478
478
|
});
|
|
479
479
|
if (_response.ok) {
|
|
@@ -534,21 +534,21 @@ export class FoldersClient {
|
|
|
534
534
|
}
|
|
535
535
|
__create(account_id, folder_id, request, requestOptions) {
|
|
536
536
|
return __awaiter(this, void 0, void 0, function* () {
|
|
537
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
537
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
538
538
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
539
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
540
|
-
const _response = yield ((
|
|
541
|
-
url: core.url.join((
|
|
539
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
540
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
541
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/folders`),
|
|
542
542
|
method: "POST",
|
|
543
543
|
headers: _headers,
|
|
544
544
|
contentType: "application/json",
|
|
545
545
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
546
546
|
requestType: "json",
|
|
547
547
|
body: request,
|
|
548
|
-
timeoutMs: ((
|
|
549
|
-
maxRetries: (
|
|
548
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
549
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
550
550
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
551
|
-
fetchFn: (
|
|
551
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
552
552
|
logging: this._options.logging,
|
|
553
553
|
});
|
|
554
554
|
if (_response.ok) {
|
|
@@ -609,21 +609,21 @@ export class FoldersClient {
|
|
|
609
609
|
}
|
|
610
610
|
__move(account_id, folder_id, request, requestOptions) {
|
|
611
611
|
return __awaiter(this, void 0, void 0, function* () {
|
|
612
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
612
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
613
613
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
614
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
615
|
-
const _response = yield ((
|
|
616
|
-
url: core.url.join((
|
|
614
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
615
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
616
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/folders/${core.url.encodePathParam(folder_id)}/move`),
|
|
617
617
|
method: "PATCH",
|
|
618
618
|
headers: _headers,
|
|
619
619
|
contentType: "application/json",
|
|
620
620
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
621
621
|
requestType: "json",
|
|
622
622
|
body: request,
|
|
623
|
-
timeoutMs: ((
|
|
624
|
-
maxRetries: (
|
|
623
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
624
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
625
625
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
626
|
-
fetchFn: (
|
|
626
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
627
627
|
logging: this._options.logging,
|
|
628
628
|
});
|
|
629
629
|
if (_response.ok) {
|
|
@@ -32,16 +32,16 @@ export declare class MetadataClient {
|
|
|
32
32
|
* @example
|
|
33
33
|
* await client.metadata.bulkUpdate("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
34
34
|
* data: {
|
|
35
|
-
* file_ids: ["
|
|
35
|
+
* file_ids: ["055e9655-5445-425c-9158-4dcff313a8a1", "7e91a226-d1ac-4bea-afd1-9128c52ffc8d"],
|
|
36
36
|
* values: [{
|
|
37
|
-
* field_definition_id: "
|
|
37
|
+
* field_definition_id: "174f1f07-3e07-4ad0-ac74-a27c0dc4a781",
|
|
38
38
|
* value: [
|
|
39
39
|
* {
|
|
40
|
-
* "id": "
|
|
40
|
+
* "id": "f1ef4511-a8ff-4645-b406-47e3362ad15a",
|
|
41
41
|
* "type": "user"
|
|
42
42
|
* },
|
|
43
43
|
* {
|
|
44
|
-
* "id": "
|
|
44
|
+
* "id": "3a015842-e804-496a-abbe-577a332fb255",
|
|
45
45
|
* "type": "account_user_group"
|
|
46
46
|
* }
|
|
47
47
|
* ]
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
12
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
@@ -41,16 +41,16 @@ export class MetadataClient {
|
|
|
41
41
|
* @example
|
|
42
42
|
* await client.metadata.bulkUpdate("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
43
43
|
* data: {
|
|
44
|
-
* file_ids: ["
|
|
44
|
+
* file_ids: ["055e9655-5445-425c-9158-4dcff313a8a1", "7e91a226-d1ac-4bea-afd1-9128c52ffc8d"],
|
|
45
45
|
* values: [{
|
|
46
|
-
* field_definition_id: "
|
|
46
|
+
* field_definition_id: "174f1f07-3e07-4ad0-ac74-a27c0dc4a781",
|
|
47
47
|
* value: [
|
|
48
48
|
* {
|
|
49
|
-
* "id": "
|
|
49
|
+
* "id": "f1ef4511-a8ff-4645-b406-47e3362ad15a",
|
|
50
50
|
* "type": "user"
|
|
51
51
|
* },
|
|
52
52
|
* {
|
|
53
|
-
* "id": "
|
|
53
|
+
* "id": "3a015842-e804-496a-abbe-577a332fb255",
|
|
54
54
|
* "type": "account_user_group"
|
|
55
55
|
* }
|
|
56
56
|
* ]
|
|
@@ -63,21 +63,21 @@ export class MetadataClient {
|
|
|
63
63
|
}
|
|
64
64
|
__bulkUpdate(account_id, project_id, request, requestOptions) {
|
|
65
65
|
return __awaiter(this, void 0, void 0, function* () {
|
|
66
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
66
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
67
67
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
68
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
69
|
-
const _response = yield ((
|
|
70
|
-
url: core.url.join((
|
|
68
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
69
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
70
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/projects/${core.url.encodePathParam(project_id)}/metadata/values`),
|
|
71
71
|
method: "PATCH",
|
|
72
72
|
headers: _headers,
|
|
73
73
|
contentType: "application/json",
|
|
74
74
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
75
75
|
requestType: "json",
|
|
76
76
|
body: request,
|
|
77
|
-
timeoutMs: ((
|
|
78
|
-
maxRetries: (
|
|
77
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
78
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
79
79
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
80
|
-
fetchFn: (
|
|
80
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
81
81
|
logging: this._options.logging,
|
|
82
82
|
});
|
|
83
83
|
if (_response.ok) {
|
|
@@ -136,22 +136,22 @@ export class MetadataClient {
|
|
|
136
136
|
}
|
|
137
137
|
__show(account_id_1, file_id_1) {
|
|
138
138
|
return __awaiter(this, arguments, void 0, function* (account_id, file_id, request = {}, requestOptions) {
|
|
139
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
139
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
140
140
|
const { show_null: showNull } = request;
|
|
141
141
|
const _queryParams = {
|
|
142
142
|
show_null: showNull,
|
|
143
143
|
};
|
|
144
144
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
145
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
146
|
-
const _response = yield ((
|
|
147
|
-
url: core.url.join((
|
|
145
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
146
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
147
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/files/${core.url.encodePathParam(file_id)}/metadata`),
|
|
148
148
|
method: "GET",
|
|
149
149
|
headers: _headers,
|
|
150
150
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
151
|
-
timeoutMs: ((
|
|
152
|
-
maxRetries: (
|
|
151
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
152
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
153
153
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
154
|
-
fetchFn: (
|
|
154
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
155
155
|
logging: this._options.logging,
|
|
156
156
|
});
|
|
157
157
|
if (_response.ok) {
|
|
@@ -3,16 +3,16 @@ import type * as Frameio from "../../../../index.mjs";
|
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
5
|
* data: {
|
|
6
|
-
* file_ids: ["
|
|
6
|
+
* file_ids: ["055e9655-5445-425c-9158-4dcff313a8a1", "7e91a226-d1ac-4bea-afd1-9128c52ffc8d"],
|
|
7
7
|
* values: [{
|
|
8
|
-
* field_definition_id: "
|
|
8
|
+
* field_definition_id: "174f1f07-3e07-4ad0-ac74-a27c0dc4a781",
|
|
9
9
|
* value: [
|
|
10
10
|
* {
|
|
11
|
-
* "id": "
|
|
11
|
+
* "id": "f1ef4511-a8ff-4645-b406-47e3362ad15a",
|
|
12
12
|
* "type": "user"
|
|
13
13
|
* },
|
|
14
14
|
* {
|
|
15
|
-
* "id": "
|
|
15
|
+
* "id": "3a015842-e804-496a-abbe-577a332fb255",
|
|
16
16
|
* "type": "account_user_group"
|
|
17
17
|
* }
|
|
18
18
|
* ]
|
|
@@ -9,7 +9,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
11
|
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
-
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
12
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
13
13
|
import * as core from "../../../../core/index.mjs";
|
|
14
14
|
import * as environments from "../../../../environments.mjs";
|
|
15
15
|
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
@@ -45,18 +45,18 @@ export class MetadataFieldsClient {
|
|
|
45
45
|
}
|
|
46
46
|
__metadataFieldDefinitionsDelete(account_id, field_definition_id, requestOptions) {
|
|
47
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
48
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
49
49
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
50
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
51
|
-
const _response = yield ((
|
|
52
|
-
url: core.url.join((
|
|
50
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
51
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
52
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/metadata/field_definitions/${core.url.encodePathParam(field_definition_id)}`),
|
|
53
53
|
method: "DELETE",
|
|
54
54
|
headers: _headers,
|
|
55
55
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
56
|
-
timeoutMs: ((
|
|
57
|
-
maxRetries: (
|
|
56
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
57
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
58
58
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
59
|
-
fetchFn: (
|
|
59
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
60
60
|
logging: this._options.logging,
|
|
61
61
|
});
|
|
62
62
|
if (_response.ok) {
|
|
@@ -126,21 +126,21 @@ export class MetadataFieldsClient {
|
|
|
126
126
|
}
|
|
127
127
|
__metadataFieldDefinitionsUpdate(account_id_1, field_definition_id_1) {
|
|
128
128
|
return __awaiter(this, arguments, void 0, function* (account_id, field_definition_id, request = {}, requestOptions) {
|
|
129
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
129
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
130
130
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
131
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
132
|
-
const _response = yield ((
|
|
133
|
-
url: core.url.join((
|
|
131
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
132
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
133
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/metadata/field_definitions/${core.url.encodePathParam(field_definition_id)}`),
|
|
134
134
|
method: "PATCH",
|
|
135
135
|
headers: _headers,
|
|
136
136
|
contentType: "application/json",
|
|
137
137
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
138
138
|
requestType: "json",
|
|
139
139
|
body: request,
|
|
140
|
-
timeoutMs: ((
|
|
141
|
-
maxRetries: (
|
|
140
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
141
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
142
142
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
143
|
-
fetchFn: (
|
|
143
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
144
144
|
logging: this._options.logging,
|
|
145
145
|
});
|
|
146
146
|
if (_response.ok) {
|
|
@@ -201,7 +201,7 @@ export class MetadataFieldsClient {
|
|
|
201
201
|
}
|
|
202
202
|
__metadataFieldDefinitionsIndex(account_id_1) {
|
|
203
203
|
return __awaiter(this, arguments, void 0, function* (account_id, request = {}, requestOptions) {
|
|
204
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
204
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
205
205
|
const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
206
206
|
const _queryParams = {
|
|
207
207
|
include: include != null ? include : undefined,
|
|
@@ -210,16 +210,16 @@ export class MetadataFieldsClient {
|
|
|
210
210
|
include_total_count: includeTotalCount,
|
|
211
211
|
};
|
|
212
212
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
213
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
214
|
-
const _response = yield ((
|
|
215
|
-
url: core.url.join((
|
|
213
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
214
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
215
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/metadata/field_definitions`),
|
|
216
216
|
method: "GET",
|
|
217
217
|
headers: _headers,
|
|
218
218
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
219
|
-
timeoutMs: ((
|
|
220
|
-
maxRetries: (
|
|
219
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
220
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
221
221
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
222
|
-
fetchFn: (
|
|
222
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
223
223
|
logging: this._options.logging,
|
|
224
224
|
});
|
|
225
225
|
if (_response.ok) {
|
|
@@ -291,21 +291,21 @@ export class MetadataFieldsClient {
|
|
|
291
291
|
}
|
|
292
292
|
__metadataFieldDefinitionsCreate(account_id_1) {
|
|
293
293
|
return __awaiter(this, arguments, void 0, function* (account_id, request = {}, requestOptions) {
|
|
294
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
294
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
295
295
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
296
|
-
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
297
|
-
const _response = yield ((
|
|
298
|
-
url: core.url.join((
|
|
296
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
297
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
298
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/metadata/field_definitions`),
|
|
299
299
|
method: "POST",
|
|
300
300
|
headers: _headers,
|
|
301
301
|
contentType: "application/json",
|
|
302
302
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
303
303
|
requestType: "json",
|
|
304
304
|
body: request,
|
|
305
|
-
timeoutMs: ((
|
|
306
|
-
maxRetries: (
|
|
305
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
306
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
307
307
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
308
|
-
fetchFn: (
|
|
308
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
309
309
|
logging: this._options.logging,
|
|
310
310
|
});
|
|
311
311
|
if (_response.ok) {
|