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
|
@@ -99,7 +99,7 @@ class FilesClient {
|
|
|
99
99
|
}
|
|
100
100
|
__list(account_id_1, folder_id_1) {
|
|
101
101
|
return __awaiter(this, arguments, void 0, function* (account_id, folder_id, request = {}, requestOptions) {
|
|
102
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
102
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
103
103
|
const { include, sort, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
104
104
|
const _queryParams = {
|
|
105
105
|
include: include != null ? include : undefined,
|
|
@@ -109,16 +109,16 @@ class FilesClient {
|
|
|
109
109
|
include_total_count: includeTotalCount,
|
|
110
110
|
};
|
|
111
111
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
112
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
113
|
-
const _response = yield ((
|
|
114
|
-
url: core.url.join((
|
|
112
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
113
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
114
|
+
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)}/files`),
|
|
115
115
|
method: "GET",
|
|
116
116
|
headers: _headers,
|
|
117
117
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
118
|
-
timeoutMs: ((
|
|
119
|
-
maxRetries: (
|
|
118
|
+
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,
|
|
119
|
+
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,
|
|
120
120
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
121
|
-
fetchFn: (
|
|
121
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
122
122
|
logging: this._options.logging,
|
|
123
123
|
});
|
|
124
124
|
if (_response.ok) {
|
|
@@ -186,21 +186,21 @@ class FilesClient {
|
|
|
186
186
|
}
|
|
187
187
|
__create(account_id, folder_id, request, requestOptions) {
|
|
188
188
|
return __awaiter(this, void 0, void 0, function* () {
|
|
189
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
189
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
190
190
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
191
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
192
|
-
const _response = yield ((
|
|
193
|
-
url: core.url.join((
|
|
191
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
192
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
193
|
+
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)}/files`),
|
|
194
194
|
method: "POST",
|
|
195
195
|
headers: _headers,
|
|
196
196
|
contentType: "application/json",
|
|
197
197
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
198
198
|
requestType: "json",
|
|
199
199
|
body: request,
|
|
200
|
-
timeoutMs: ((
|
|
201
|
-
maxRetries: (
|
|
200
|
+
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,
|
|
201
|
+
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,
|
|
202
202
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
203
|
-
fetchFn: (
|
|
203
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
204
204
|
logging: this._options.logging,
|
|
205
205
|
});
|
|
206
206
|
if (_response.ok) {
|
|
@@ -271,22 +271,22 @@ class FilesClient {
|
|
|
271
271
|
}
|
|
272
272
|
__show(account_id_1, file_id_1) {
|
|
273
273
|
return __awaiter(this, arguments, void 0, function* (account_id, file_id, request = {}, requestOptions) {
|
|
274
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
274
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
275
275
|
const { include } = request;
|
|
276
276
|
const _queryParams = {
|
|
277
277
|
include: include != null ? include : undefined,
|
|
278
278
|
};
|
|
279
279
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
280
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
281
|
-
const _response = yield ((
|
|
282
|
-
url: core.url.join((
|
|
280
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
281
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
282
|
+
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)}`),
|
|
283
283
|
method: "GET",
|
|
284
284
|
headers: _headers,
|
|
285
285
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
286
|
-
timeoutMs: ((
|
|
287
|
-
maxRetries: (
|
|
286
|
+
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,
|
|
287
|
+
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,
|
|
288
288
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
289
|
-
fetchFn: (
|
|
289
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
290
290
|
logging: this._options.logging,
|
|
291
291
|
});
|
|
292
292
|
if (_response.ok) {
|
|
@@ -342,18 +342,18 @@ class FilesClient {
|
|
|
342
342
|
}
|
|
343
343
|
__delete(account_id, file_id, requestOptions) {
|
|
344
344
|
return __awaiter(this, void 0, void 0, function* () {
|
|
345
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
345
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
346
346
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
347
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
348
|
-
const _response = yield ((
|
|
349
|
-
url: core.url.join((
|
|
347
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
348
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
349
|
+
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)}`),
|
|
350
350
|
method: "DELETE",
|
|
351
351
|
headers: _headers,
|
|
352
352
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
353
|
-
timeoutMs: ((
|
|
354
|
-
maxRetries: (
|
|
353
|
+
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,
|
|
354
|
+
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,
|
|
355
355
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
356
|
-
fetchFn: (
|
|
356
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
357
357
|
logging: this._options.logging,
|
|
358
358
|
});
|
|
359
359
|
if (_response.ok) {
|
|
@@ -414,21 +414,21 @@ class FilesClient {
|
|
|
414
414
|
}
|
|
415
415
|
__update(account_id, file_id, request, requestOptions) {
|
|
416
416
|
return __awaiter(this, void 0, void 0, function* () {
|
|
417
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
417
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
418
418
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
419
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
420
|
-
const _response = yield ((
|
|
421
|
-
url: core.url.join((
|
|
419
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
420
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
421
|
+
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)}`),
|
|
422
422
|
method: "PATCH",
|
|
423
423
|
headers: _headers,
|
|
424
424
|
contentType: "application/json",
|
|
425
425
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
426
426
|
requestType: "json",
|
|
427
427
|
body: request,
|
|
428
|
-
timeoutMs: ((
|
|
429
|
-
maxRetries: (
|
|
428
|
+
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,
|
|
429
|
+
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,
|
|
430
430
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
431
|
-
fetchFn: (
|
|
431
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
432
432
|
logging: this._options.logging,
|
|
433
433
|
});
|
|
434
434
|
if (_response.ok) {
|
|
@@ -491,26 +491,26 @@ class FilesClient {
|
|
|
491
491
|
}
|
|
492
492
|
__copy(account_id_1, file_id_1) {
|
|
493
493
|
return __awaiter(this, arguments, void 0, function* (account_id, file_id, request = {}, requestOptions) {
|
|
494
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
494
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
495
495
|
const { copy_metadata: copyMetadata, copy_comments: copyComments } = request, _body = __rest(request, ["copy_metadata", "copy_comments"]);
|
|
496
496
|
const _queryParams = {
|
|
497
497
|
copy_metadata: copyMetadata,
|
|
498
498
|
copy_comments: copyComments != null ? copyComments : undefined,
|
|
499
499
|
};
|
|
500
500
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
501
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
502
|
-
const _response = yield ((
|
|
503
|
-
url: core.url.join((
|
|
501
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
502
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
503
|
+
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)}/copy`),
|
|
504
504
|
method: "POST",
|
|
505
505
|
headers: _headers,
|
|
506
506
|
contentType: "application/json",
|
|
507
507
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
508
508
|
requestType: "json",
|
|
509
509
|
body: _body,
|
|
510
|
-
timeoutMs: ((
|
|
511
|
-
maxRetries: (
|
|
510
|
+
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,
|
|
511
|
+
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,
|
|
512
512
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
513
|
-
fetchFn: (
|
|
513
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
514
514
|
logging: this._options.logging,
|
|
515
515
|
});
|
|
516
516
|
if (_response.ok) {
|
|
@@ -572,21 +572,21 @@ class FilesClient {
|
|
|
572
572
|
}
|
|
573
573
|
__createRemoteUpload(account_id, folder_id, request, requestOptions) {
|
|
574
574
|
return __awaiter(this, void 0, void 0, function* () {
|
|
575
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
575
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
576
576
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
577
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
578
|
-
const _response = yield ((
|
|
579
|
-
url: core.url.join((
|
|
577
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
578
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
579
|
+
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)}/files/remote_upload`),
|
|
580
580
|
method: "POST",
|
|
581
581
|
headers: _headers,
|
|
582
582
|
contentType: "application/json",
|
|
583
583
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
584
584
|
requestType: "json",
|
|
585
585
|
body: request,
|
|
586
|
-
timeoutMs: ((
|
|
587
|
-
maxRetries: (
|
|
586
|
+
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,
|
|
587
|
+
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,
|
|
588
588
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
589
|
-
fetchFn: (
|
|
589
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
590
590
|
logging: this._options.logging,
|
|
591
591
|
});
|
|
592
592
|
if (_response.ok) {
|
|
@@ -647,21 +647,21 @@ class FilesClient {
|
|
|
647
647
|
}
|
|
648
648
|
__move(account_id, file_id, request, requestOptions) {
|
|
649
649
|
return __awaiter(this, void 0, void 0, function* () {
|
|
650
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
650
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
651
651
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
652
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
653
|
-
const _response = yield ((
|
|
654
|
-
url: core.url.join((
|
|
652
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
653
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
654
|
+
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)}/move`),
|
|
655
655
|
method: "PATCH",
|
|
656
656
|
headers: _headers,
|
|
657
657
|
contentType: "application/json",
|
|
658
658
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
659
659
|
requestType: "json",
|
|
660
660
|
body: request,
|
|
661
|
-
timeoutMs: ((
|
|
662
|
-
maxRetries: (
|
|
661
|
+
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,
|
|
662
|
+
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,
|
|
663
663
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
664
|
-
fetchFn: (
|
|
664
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
665
665
|
logging: this._options.logging,
|
|
666
666
|
});
|
|
667
667
|
if (_response.ok) {
|
|
@@ -723,21 +723,21 @@ class FilesClient {
|
|
|
723
723
|
}
|
|
724
724
|
__createLocalUpload(account_id, folder_id, request, requestOptions) {
|
|
725
725
|
return __awaiter(this, void 0, void 0, function* () {
|
|
726
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
726
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
727
727
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
728
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
729
|
-
const _response = yield ((
|
|
730
|
-
url: core.url.join((
|
|
728
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
729
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
730
|
+
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)}/files/local_upload`),
|
|
731
731
|
method: "POST",
|
|
732
732
|
headers: _headers,
|
|
733
733
|
contentType: "application/json",
|
|
734
734
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
735
735
|
requestType: "json",
|
|
736
736
|
body: request,
|
|
737
|
-
timeoutMs: ((
|
|
738
|
-
maxRetries: (
|
|
737
|
+
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,
|
|
738
|
+
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,
|
|
739
739
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
740
|
-
fetchFn: (
|
|
740
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
741
741
|
logging: this._options.logging,
|
|
742
742
|
});
|
|
743
743
|
if (_response.ok) {
|
|
@@ -800,21 +800,21 @@ class FilesClient {
|
|
|
800
800
|
}
|
|
801
801
|
__importFile(account_id, folder_id, request, requestOptions) {
|
|
802
802
|
return __awaiter(this, void 0, void 0, function* () {
|
|
803
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
803
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
804
804
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
805
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
806
|
-
const _response = yield ((
|
|
807
|
-
url: core.url.join((
|
|
805
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
806
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
807
|
+
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)}/files/import`),
|
|
808
808
|
method: "POST",
|
|
809
809
|
headers: _headers,
|
|
810
810
|
contentType: "application/json",
|
|
811
811
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
812
812
|
requestType: "json",
|
|
813
813
|
body: request,
|
|
814
|
-
timeoutMs: ((
|
|
815
|
-
maxRetries: (
|
|
814
|
+
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,
|
|
815
|
+
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,
|
|
816
816
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
817
|
-
fetchFn: (
|
|
817
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
818
818
|
logging: this._options.logging,
|
|
819
819
|
});
|
|
820
820
|
if (_response.ok) {
|
|
@@ -870,18 +870,18 @@ class FilesClient {
|
|
|
870
870
|
}
|
|
871
871
|
__showFileUploadStatus(account_id, file_id, requestOptions) {
|
|
872
872
|
return __awaiter(this, void 0, void 0, function* () {
|
|
873
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
873
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
874
874
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
875
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
876
|
-
const _response = yield ((
|
|
877
|
-
url: core.url.join((
|
|
875
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
876
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
877
|
+
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)}/status`),
|
|
878
878
|
method: "GET",
|
|
879
879
|
headers: _headers,
|
|
880
880
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
881
|
-
timeoutMs: ((
|
|
882
|
-
maxRetries: (
|
|
881
|
+
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,
|
|
882
|
+
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,
|
|
883
883
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
884
|
-
fetchFn: (
|
|
884
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
885
885
|
logging: this._options.logging,
|
|
886
886
|
});
|
|
887
887
|
if (_response.ok) {
|