frameio 1.2.2 → 1.3.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/dist/cjs/Client.d.ts +1 -0
- package/dist/cjs/Client.js +2 -2
- package/dist/cjs/api/resources/accountPermissions/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/accountPermissions/client/Client.js +66 -79
- package/dist/cjs/api/resources/accounts/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/accounts/client/Client.js +66 -76
- package/dist/cjs/api/resources/comments/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/comments/client/Client.js +81 -94
- package/dist/cjs/api/resources/files/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/files/client/Client.js +30 -30
- package/dist/cjs/api/resources/folders/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/folders/client/Client.js +24 -24
- package/dist/cjs/api/resources/metadata/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/metadata/client/Client.js +6 -6
- package/dist/cjs/api/resources/metadataFields/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/metadataFields/client/Client.js +12 -12
- package/dist/cjs/api/resources/projectPermissions/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/projectPermissions/client/Client.js +72 -85
- package/dist/cjs/api/resources/projects/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/projects/client/Client.js +78 -91
- package/dist/cjs/api/resources/shares/client/Client.d.ts +5 -2
- package/dist/cjs/api/resources/shares/client/Client.js +150 -173
- package/dist/cjs/api/resources/users/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/users/client/Client.js +3 -3
- package/dist/cjs/api/resources/versionStacks/client/Client.d.ts +1 -0
- package/dist/cjs/api/resources/versionStacks/client/Client.js +18 -18
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +78 -91
- package/dist/cjs/api/resources/workspacePermissions/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/workspacePermissions/client/Client.js +72 -85
- package/dist/cjs/api/resources/workspaces/client/Client.d.ts +3 -1
- package/dist/cjs/api/resources/workspaces/client/Client.js +81 -91
- package/dist/cjs/core/index.d.ts +0 -2
- package/dist/cjs/core/index.js +0 -2
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +1 -0
- package/dist/esm/Client.mjs +2 -2
- package/dist/esm/api/resources/accountPermissions/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/accountPermissions/client/Client.mjs +66 -79
- package/dist/esm/api/resources/accounts/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/accounts/client/Client.mjs +66 -76
- package/dist/esm/api/resources/comments/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/comments/client/Client.mjs +81 -94
- package/dist/esm/api/resources/files/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/files/client/Client.mjs +30 -30
- package/dist/esm/api/resources/folders/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/folders/client/Client.mjs +24 -24
- package/dist/esm/api/resources/metadata/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/metadata/client/Client.mjs +6 -6
- package/dist/esm/api/resources/metadataFields/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/metadataFields/client/Client.mjs +12 -12
- package/dist/esm/api/resources/projectPermissions/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/projectPermissions/client/Client.mjs +72 -85
- package/dist/esm/api/resources/projects/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/projects/client/Client.mjs +78 -91
- package/dist/esm/api/resources/shares/client/Client.d.mts +5 -2
- package/dist/esm/api/resources/shares/client/Client.mjs +150 -173
- package/dist/esm/api/resources/users/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/users/client/Client.mjs +3 -3
- package/dist/esm/api/resources/versionStacks/client/Client.d.mts +1 -0
- package/dist/esm/api/resources/versionStacks/client/Client.mjs +18 -18
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +78 -91
- package/dist/esm/api/resources/workspacePermissions/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +72 -85
- package/dist/esm/api/resources/workspaces/client/Client.d.mts +3 -1
- package/dist/esm/api/resources/workspaces/client/Client.mjs +81 -91
- package/dist/esm/core/index.d.mts +0 -2
- package/dist/esm/core/index.mjs +0 -2
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +29 -203
- package/dist/cjs/core/pagination/Page.d.ts +0 -32
- package/dist/cjs/core/pagination/Page.js +0 -100
- package/dist/cjs/core/pagination/Pageable.d.ts +0 -14
- package/dist/cjs/core/pagination/Pageable.js +0 -10
- package/dist/cjs/core/pagination/index.d.ts +0 -2
- package/dist/cjs/core/pagination/index.js +0 -7
- package/dist/cjs/core/utils/index.d.ts +0 -1
- package/dist/cjs/core/utils/index.js +0 -5
- package/dist/cjs/core/utils/setObjectProperty.d.ts +0 -11
- package/dist/cjs/core/utils/setObjectProperty.js +0 -42
- package/dist/esm/core/pagination/Page.d.mts +0 -32
- package/dist/esm/core/pagination/Page.mjs +0 -96
- package/dist/esm/core/pagination/Pageable.d.mts +0 -14
- package/dist/esm/core/pagination/Pageable.mjs +0 -6
- package/dist/esm/core/pagination/index.d.mts +0 -2
- package/dist/esm/core/pagination/index.mjs +0 -2
- package/dist/esm/core/utils/index.d.mts +0 -1
- package/dist/esm/core/utils/index.mjs +0 -1
- package/dist/esm/core/utils/setObjectProperty.d.mts +0 -11
- package/dist/esm/core/utils/setObjectProperty.mjs +0 -39
|
@@ -94,7 +94,7 @@ class Comments {
|
|
|
94
94
|
}
|
|
95
95
|
__show(accountId_1, commentId_1) {
|
|
96
96
|
return __awaiter(this, arguments, void 0, function* (accountId, commentId, request = {}, requestOptions) {
|
|
97
|
-
var _a, _b, _c;
|
|
97
|
+
var _a, _b, _c, _d;
|
|
98
98
|
const { timestamp_as_timecode: timestampAsTimecode, include } = request;
|
|
99
99
|
const _queryParams = {};
|
|
100
100
|
if (timestampAsTimecode != null) {
|
|
@@ -104,8 +104,8 @@ class Comments {
|
|
|
104
104
|
_queryParams["include"] = include;
|
|
105
105
|
}
|
|
106
106
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
107
|
-
const _response = yield core.fetcher({
|
|
108
|
-
url: core.url.join((
|
|
107
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
108
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/comments/${encodeURIComponent(commentId)}`),
|
|
109
109
|
method: "GET",
|
|
110
110
|
headers: _headers,
|
|
111
111
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -180,10 +180,10 @@ class Comments {
|
|
|
180
180
|
}
|
|
181
181
|
__delete(accountId, commentId, requestOptions) {
|
|
182
182
|
return __awaiter(this, void 0, void 0, function* () {
|
|
183
|
-
var _a, _b, _c;
|
|
183
|
+
var _a, _b, _c, _d;
|
|
184
184
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
185
|
-
const _response = yield core.fetcher({
|
|
186
|
-
url: core.url.join((
|
|
185
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
186
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/comments/${encodeURIComponent(commentId)}`),
|
|
187
187
|
method: "DELETE",
|
|
188
188
|
headers: _headers,
|
|
189
189
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -267,15 +267,15 @@ class Comments {
|
|
|
267
267
|
}
|
|
268
268
|
__update(accountId, commentId, request, requestOptions) {
|
|
269
269
|
return __awaiter(this, void 0, void 0, function* () {
|
|
270
|
-
var _a, _b, _c;
|
|
270
|
+
var _a, _b, _c, _d;
|
|
271
271
|
const { timestamp_as_timecode: timestampAsTimecode } = request, _body = __rest(request, ["timestamp_as_timecode"]);
|
|
272
272
|
const _queryParams = {};
|
|
273
273
|
if (timestampAsTimecode != null) {
|
|
274
274
|
_queryParams["timestamp_as_timecode"] = timestampAsTimecode.toString();
|
|
275
275
|
}
|
|
276
276
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
277
|
-
const _response = yield core.fetcher({
|
|
278
|
-
url: core.url.join((
|
|
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/comments/${encodeURIComponent(commentId)}`),
|
|
279
279
|
method: "PATCH",
|
|
280
280
|
headers: _headers,
|
|
281
281
|
contentType: "application/json",
|
|
@@ -355,94 +355,81 @@ class Comments {
|
|
|
355
355
|
* include_total_count: false
|
|
356
356
|
* })
|
|
357
357
|
*/
|
|
358
|
-
index(
|
|
358
|
+
index(accountId, fileId, request = {}, requestOptions) {
|
|
359
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, fileId, request, requestOptions));
|
|
360
|
+
}
|
|
361
|
+
__index(accountId_1, fileId_1) {
|
|
359
362
|
return __awaiter(this, arguments, void 0, function* (accountId, fileId, request = {}, requestOptions) {
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
409
|
-
case 429:
|
|
410
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
411
|
-
default:
|
|
412
|
-
throw new errors.FrameioError({
|
|
413
|
-
statusCode: _response.error.statusCode,
|
|
414
|
-
body: _response.error.body,
|
|
415
|
-
rawResponse: _response.rawResponse,
|
|
416
|
-
});
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
switch (_response.error.reason) {
|
|
420
|
-
case "non-json":
|
|
363
|
+
var _a, _b, _c, _d;
|
|
364
|
+
const { timestamp_as_timecode: timestampAsTimecode, include, after, page_size: pageSize, include_total_count: includeTotalCount, } = request;
|
|
365
|
+
const _queryParams = {};
|
|
366
|
+
if (timestampAsTimecode != null) {
|
|
367
|
+
_queryParams["timestamp_as_timecode"] = timestampAsTimecode.toString();
|
|
368
|
+
}
|
|
369
|
+
if (include != null) {
|
|
370
|
+
_queryParams["include"] = include;
|
|
371
|
+
}
|
|
372
|
+
if (after != null) {
|
|
373
|
+
_queryParams["after"] = after;
|
|
374
|
+
}
|
|
375
|
+
if (pageSize != null) {
|
|
376
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
377
|
+
}
|
|
378
|
+
if (includeTotalCount != null) {
|
|
379
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
380
|
+
}
|
|
381
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
382
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
383
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}/comments`),
|
|
384
|
+
method: "GET",
|
|
385
|
+
headers: _headers,
|
|
386
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
387
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
388
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
389
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
390
|
+
});
|
|
391
|
+
if (_response.ok) {
|
|
392
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
393
|
+
}
|
|
394
|
+
if (_response.error.reason === "status-code") {
|
|
395
|
+
switch (_response.error.statusCode) {
|
|
396
|
+
case 400:
|
|
397
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
398
|
+
case 401:
|
|
399
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
400
|
+
case 403:
|
|
401
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
402
|
+
case 404:
|
|
403
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
404
|
+
case 409:
|
|
405
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
406
|
+
case 422:
|
|
407
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
408
|
+
case 429:
|
|
409
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
410
|
+
default:
|
|
421
411
|
throw new errors.FrameioError({
|
|
422
412
|
statusCode: _response.error.statusCode,
|
|
423
|
-
body: _response.error.
|
|
424
|
-
rawResponse: _response.rawResponse,
|
|
425
|
-
});
|
|
426
|
-
case "timeout":
|
|
427
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/files/{file_id}/comments.");
|
|
428
|
-
case "unknown":
|
|
429
|
-
throw new errors.FrameioError({
|
|
430
|
-
message: _response.error.errorMessage,
|
|
413
|
+
body: _response.error.body,
|
|
431
414
|
rawResponse: _response.rawResponse,
|
|
432
415
|
});
|
|
433
416
|
}
|
|
434
|
-
}
|
|
435
|
-
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
417
|
+
}
|
|
418
|
+
switch (_response.error.reason) {
|
|
419
|
+
case "non-json":
|
|
420
|
+
throw new errors.FrameioError({
|
|
421
|
+
statusCode: _response.error.statusCode,
|
|
422
|
+
body: _response.error.rawBody,
|
|
423
|
+
rawResponse: _response.rawResponse,
|
|
424
|
+
});
|
|
425
|
+
case "timeout":
|
|
426
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/files/{file_id}/comments.");
|
|
427
|
+
case "unknown":
|
|
428
|
+
throw new errors.FrameioError({
|
|
429
|
+
message: _response.error.errorMessage,
|
|
430
|
+
rawResponse: _response.rawResponse,
|
|
431
|
+
});
|
|
432
|
+
}
|
|
446
433
|
});
|
|
447
434
|
}
|
|
448
435
|
/**
|
|
@@ -478,15 +465,15 @@ class Comments {
|
|
|
478
465
|
}
|
|
479
466
|
__create(accountId, fileId, request, requestOptions) {
|
|
480
467
|
return __awaiter(this, void 0, void 0, function* () {
|
|
481
|
-
var _a, _b, _c;
|
|
468
|
+
var _a, _b, _c, _d;
|
|
482
469
|
const { timestamp_as_timecode: timestampAsTimecode } = request, _body = __rest(request, ["timestamp_as_timecode"]);
|
|
483
470
|
const _queryParams = {};
|
|
484
471
|
if (timestampAsTimecode != null) {
|
|
485
472
|
_queryParams["timestamp_as_timecode"] = timestampAsTimecode.toString();
|
|
486
473
|
}
|
|
487
474
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
488
|
-
const _response = yield core.fetcher({
|
|
489
|
-
url: core.url.join((
|
|
475
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
476
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}/comments`),
|
|
490
477
|
method: "POST",
|
|
491
478
|
headers: _headers,
|
|
492
479
|
contentType: "application/json",
|
|
@@ -9,6 +9,7 @@ export declare namespace Files {
|
|
|
9
9
|
token: core.Supplier<core.BearerToken>;
|
|
10
10
|
/** Additional headers to include in requests. */
|
|
11
11
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
12
|
+
fetcher?: core.FetchFunction;
|
|
12
13
|
}
|
|
13
14
|
interface RequestOptions {
|
|
14
15
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -97,7 +97,7 @@ class Files {
|
|
|
97
97
|
}
|
|
98
98
|
__list(accountId_1, folderId_1) {
|
|
99
99
|
return __awaiter(this, arguments, void 0, function* (accountId, folderId, request = {}, requestOptions) {
|
|
100
|
-
var _a, _b, _c;
|
|
100
|
+
var _a, _b, _c, _d;
|
|
101
101
|
const { include, sort, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
102
102
|
const _queryParams = {};
|
|
103
103
|
if (include != null) {
|
|
@@ -116,8 +116,8 @@ class Files {
|
|
|
116
116
|
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
117
117
|
}
|
|
118
118
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
119
|
-
const _response = yield core.fetcher({
|
|
120
|
-
url: core.url.join((
|
|
119
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
120
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/files`),
|
|
121
121
|
method: "GET",
|
|
122
122
|
headers: _headers,
|
|
123
123
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -202,10 +202,10 @@ class Files {
|
|
|
202
202
|
}
|
|
203
203
|
__create(accountId, folderId, request, requestOptions) {
|
|
204
204
|
return __awaiter(this, void 0, void 0, function* () {
|
|
205
|
-
var _a, _b, _c;
|
|
205
|
+
var _a, _b, _c, _d;
|
|
206
206
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
207
|
-
const _response = yield core.fetcher({
|
|
208
|
-
url: core.url.join((
|
|
207
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
208
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/files`),
|
|
209
209
|
method: "POST",
|
|
210
210
|
headers: _headers,
|
|
211
211
|
contentType: "application/json",
|
|
@@ -298,15 +298,15 @@ class Files {
|
|
|
298
298
|
}
|
|
299
299
|
__show(accountId_1, fileId_1) {
|
|
300
300
|
return __awaiter(this, arguments, void 0, function* (accountId, fileId, request = {}, requestOptions) {
|
|
301
|
-
var _a, _b, _c;
|
|
301
|
+
var _a, _b, _c, _d;
|
|
302
302
|
const { include } = request;
|
|
303
303
|
const _queryParams = {};
|
|
304
304
|
if (include != null) {
|
|
305
305
|
_queryParams["include"] = include;
|
|
306
306
|
}
|
|
307
307
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
308
|
-
const _response = yield core.fetcher({
|
|
309
|
-
url: core.url.join((
|
|
308
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
309
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}`),
|
|
310
310
|
method: "GET",
|
|
311
311
|
headers: _headers,
|
|
312
312
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -381,10 +381,10 @@ class Files {
|
|
|
381
381
|
}
|
|
382
382
|
__delete(accountId, fileId, requestOptions) {
|
|
383
383
|
return __awaiter(this, void 0, void 0, function* () {
|
|
384
|
-
var _a, _b, _c;
|
|
384
|
+
var _a, _b, _c, _d;
|
|
385
385
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
386
|
-
const _response = yield core.fetcher({
|
|
387
|
-
url: core.url.join((
|
|
386
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
387
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}`),
|
|
388
388
|
method: "DELETE",
|
|
389
389
|
headers: _headers,
|
|
390
390
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -464,10 +464,10 @@ class Files {
|
|
|
464
464
|
}
|
|
465
465
|
__update(accountId, fileId, request, requestOptions) {
|
|
466
466
|
return __awaiter(this, void 0, void 0, function* () {
|
|
467
|
-
var _a, _b, _c;
|
|
467
|
+
var _a, _b, _c, _d;
|
|
468
468
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
469
|
-
const _response = yield core.fetcher({
|
|
470
|
-
url: core.url.join((
|
|
469
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
470
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}`),
|
|
471
471
|
method: "PATCH",
|
|
472
472
|
headers: _headers,
|
|
473
473
|
contentType: "application/json",
|
|
@@ -552,7 +552,7 @@ class Files {
|
|
|
552
552
|
}
|
|
553
553
|
__copy(accountId_1, fileId_1) {
|
|
554
554
|
return __awaiter(this, arguments, void 0, function* (accountId, fileId, request = {}, requestOptions) {
|
|
555
|
-
var _a, _b, _c;
|
|
555
|
+
var _a, _b, _c, _d;
|
|
556
556
|
const { copy_metadata: copyMetadata, copy_comments: copyComments } = request, _body = __rest(request, ["copy_metadata", "copy_comments"]);
|
|
557
557
|
const _queryParams = {};
|
|
558
558
|
if (copyMetadata != null) {
|
|
@@ -562,8 +562,8 @@ class Files {
|
|
|
562
562
|
_queryParams["copy_comments"] = copyComments;
|
|
563
563
|
}
|
|
564
564
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
565
|
-
const _response = yield core.fetcher({
|
|
566
|
-
url: core.url.join((
|
|
565
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
566
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}/copy`),
|
|
567
567
|
method: "POST",
|
|
568
568
|
headers: _headers,
|
|
569
569
|
contentType: "application/json",
|
|
@@ -647,10 +647,10 @@ class Files {
|
|
|
647
647
|
}
|
|
648
648
|
__createRemoteUpload(accountId, folderId, request, requestOptions) {
|
|
649
649
|
return __awaiter(this, void 0, void 0, function* () {
|
|
650
|
-
var _a, _b, _c;
|
|
650
|
+
var _a, _b, _c, _d;
|
|
651
651
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
652
|
-
const _response = yield core.fetcher({
|
|
653
|
-
url: core.url.join((
|
|
652
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
653
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/files/remote_upload`),
|
|
654
654
|
method: "POST",
|
|
655
655
|
headers: _headers,
|
|
656
656
|
contentType: "application/json",
|
|
@@ -733,10 +733,10 @@ class Files {
|
|
|
733
733
|
}
|
|
734
734
|
__move(accountId, fileId, request, requestOptions) {
|
|
735
735
|
return __awaiter(this, void 0, void 0, function* () {
|
|
736
|
-
var _a, _b, _c;
|
|
736
|
+
var _a, _b, _c, _d;
|
|
737
737
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
738
|
-
const _response = yield core.fetcher({
|
|
739
|
-
url: core.url.join((
|
|
738
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
739
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}/move`),
|
|
740
740
|
method: "PATCH",
|
|
741
741
|
headers: _headers,
|
|
742
742
|
contentType: "application/json",
|
|
@@ -820,10 +820,10 @@ class Files {
|
|
|
820
820
|
}
|
|
821
821
|
__createLocalUpload(accountId, folderId, request, requestOptions) {
|
|
822
822
|
return __awaiter(this, void 0, void 0, function* () {
|
|
823
|
-
var _a, _b, _c;
|
|
823
|
+
var _a, _b, _c, _d;
|
|
824
824
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
825
|
-
const _response = yield core.fetcher({
|
|
826
|
-
url: core.url.join((
|
|
825
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
826
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/files/local_upload`),
|
|
827
827
|
method: "POST",
|
|
828
828
|
headers: _headers,
|
|
829
829
|
contentType: "application/json",
|
|
@@ -901,10 +901,10 @@ class Files {
|
|
|
901
901
|
}
|
|
902
902
|
__showFileUploadStatus(accountId, fileId, requestOptions) {
|
|
903
903
|
return __awaiter(this, void 0, void 0, function* () {
|
|
904
|
-
var _a, _b, _c;
|
|
904
|
+
var _a, _b, _c, _d;
|
|
905
905
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
906
|
-
const _response = yield core.fetcher({
|
|
907
|
-
url: core.url.join((
|
|
906
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
907
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}/status`),
|
|
908
908
|
method: "GET",
|
|
909
909
|
headers: _headers,
|
|
910
910
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -9,6 +9,7 @@ export declare namespace Folders {
|
|
|
9
9
|
token: core.Supplier<core.BearerToken>;
|
|
10
10
|
/** Additional headers to include in requests. */
|
|
11
11
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
12
|
+
fetcher?: core.FetchFunction;
|
|
12
13
|
}
|
|
13
14
|
interface RequestOptions {
|
|
14
15
|
/** The maximum time to wait for a response in seconds. */
|
|
@@ -93,15 +93,15 @@ class Folders {
|
|
|
93
93
|
}
|
|
94
94
|
__show(accountId_1, folderId_1) {
|
|
95
95
|
return __awaiter(this, arguments, void 0, function* (accountId, folderId, request = {}, requestOptions) {
|
|
96
|
-
var _a, _b, _c;
|
|
96
|
+
var _a, _b, _c, _d;
|
|
97
97
|
const { include } = request;
|
|
98
98
|
const _queryParams = {};
|
|
99
99
|
if (include != null) {
|
|
100
100
|
_queryParams["include"] = include;
|
|
101
101
|
}
|
|
102
102
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
103
|
-
const _response = yield core.fetcher({
|
|
104
|
-
url: core.url.join((
|
|
103
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
104
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}`),
|
|
105
105
|
method: "GET",
|
|
106
106
|
headers: _headers,
|
|
107
107
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -176,10 +176,10 @@ class Folders {
|
|
|
176
176
|
}
|
|
177
177
|
__delete(accountId, folderId, requestOptions) {
|
|
178
178
|
return __awaiter(this, void 0, void 0, function* () {
|
|
179
|
-
var _a, _b, _c;
|
|
179
|
+
var _a, _b, _c, _d;
|
|
180
180
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
181
|
-
const _response = yield core.fetcher({
|
|
182
|
-
url: core.url.join((
|
|
181
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
182
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}`),
|
|
183
183
|
method: "DELETE",
|
|
184
184
|
headers: _headers,
|
|
185
185
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -259,10 +259,10 @@ class Folders {
|
|
|
259
259
|
}
|
|
260
260
|
__update(accountId, folderId, request, requestOptions) {
|
|
261
261
|
return __awaiter(this, void 0, void 0, function* () {
|
|
262
|
-
var _a, _b, _c;
|
|
262
|
+
var _a, _b, _c, _d;
|
|
263
263
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
264
|
-
const _response = yield core.fetcher({
|
|
265
|
-
url: core.url.join((
|
|
264
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
265
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}`),
|
|
266
266
|
method: "PATCH",
|
|
267
267
|
headers: _headers,
|
|
268
268
|
contentType: "application/json",
|
|
@@ -359,7 +359,7 @@ class Folders {
|
|
|
359
359
|
}
|
|
360
360
|
__index(accountId_1, folderId_1) {
|
|
361
361
|
return __awaiter(this, arguments, void 0, function* (accountId, folderId, request = {}, requestOptions) {
|
|
362
|
-
var _a, _b, _c;
|
|
362
|
+
var _a, _b, _c, _d;
|
|
363
363
|
const { include, type: type_, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
364
364
|
const _queryParams = {};
|
|
365
365
|
if (include != null) {
|
|
@@ -378,8 +378,8 @@ class Folders {
|
|
|
378
378
|
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
379
379
|
}
|
|
380
380
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
381
|
-
const _response = yield core.fetcher({
|
|
382
|
-
url: core.url.join((
|
|
381
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
382
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/children`),
|
|
383
383
|
method: "GET",
|
|
384
384
|
headers: _headers,
|
|
385
385
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -463,15 +463,15 @@ class Folders {
|
|
|
463
463
|
}
|
|
464
464
|
__copy(accountId_1, folderId_1) {
|
|
465
465
|
return __awaiter(this, arguments, void 0, function* (accountId, folderId, request = {}, requestOptions) {
|
|
466
|
-
var _a, _b, _c;
|
|
466
|
+
var _a, _b, _c, _d;
|
|
467
467
|
const { copy_metadata: copyMetadata } = request, _body = __rest(request, ["copy_metadata"]);
|
|
468
468
|
const _queryParams = {};
|
|
469
469
|
if (copyMetadata != null) {
|
|
470
470
|
_queryParams["copy_metadata"] = copyMetadata.toString();
|
|
471
471
|
}
|
|
472
472
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
473
|
-
const _response = yield core.fetcher({
|
|
474
|
-
url: core.url.join((
|
|
473
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
474
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/copy`),
|
|
475
475
|
method: "POST",
|
|
476
476
|
headers: _headers,
|
|
477
477
|
contentType: "application/json",
|
|
@@ -555,7 +555,7 @@ class Folders {
|
|
|
555
555
|
}
|
|
556
556
|
__list(accountId_1, folderId_1) {
|
|
557
557
|
return __awaiter(this, arguments, void 0, function* (accountId, folderId, request = {}, requestOptions) {
|
|
558
|
-
var _a, _b, _c;
|
|
558
|
+
var _a, _b, _c, _d;
|
|
559
559
|
const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
560
560
|
const _queryParams = {};
|
|
561
561
|
if (include != null) {
|
|
@@ -571,8 +571,8 @@ class Folders {
|
|
|
571
571
|
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
572
572
|
}
|
|
573
573
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
574
|
-
const _response = yield core.fetcher({
|
|
575
|
-
url: core.url.join((
|
|
574
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
575
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/folders`),
|
|
576
576
|
method: "GET",
|
|
577
577
|
headers: _headers,
|
|
578
578
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -652,10 +652,10 @@ class Folders {
|
|
|
652
652
|
}
|
|
653
653
|
__create(accountId, folderId, request, requestOptions) {
|
|
654
654
|
return __awaiter(this, void 0, void 0, function* () {
|
|
655
|
-
var _a, _b, _c;
|
|
655
|
+
var _a, _b, _c, _d;
|
|
656
656
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
657
|
-
const _response = yield core.fetcher({
|
|
658
|
-
url: core.url.join((
|
|
657
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
658
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/folders`),
|
|
659
659
|
method: "POST",
|
|
660
660
|
headers: _headers,
|
|
661
661
|
contentType: "application/json",
|
|
@@ -738,10 +738,10 @@ class Folders {
|
|
|
738
738
|
}
|
|
739
739
|
__move(accountId, folderId, request, requestOptions) {
|
|
740
740
|
return __awaiter(this, void 0, void 0, function* () {
|
|
741
|
-
var _a, _b, _c;
|
|
741
|
+
var _a, _b, _c, _d;
|
|
742
742
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
743
|
-
const _response = yield core.fetcher({
|
|
744
|
-
url: core.url.join((
|
|
743
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
744
|
+
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.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/folders/${encodeURIComponent(folderId)}/move`),
|
|
745
745
|
method: "PATCH",
|
|
746
746
|
headers: _headers,
|
|
747
747
|
contentType: "application/json",
|
|
@@ -9,6 +9,7 @@ export declare namespace Metadata {
|
|
|
9
9
|
token: core.Supplier<core.BearerToken>;
|
|
10
10
|
/** Additional headers to include in requests. */
|
|
11
11
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
12
|
+
fetcher?: core.FetchFunction;
|
|
12
13
|
}
|
|
13
14
|
interface RequestOptions {
|
|
14
15
|
/** The maximum time to wait for a response in seconds. */
|