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
|
@@ -46,15 +46,15 @@ export class Workspaces {
|
|
|
46
46
|
}
|
|
47
47
|
__show(accountId_1, workspaceId_1) {
|
|
48
48
|
return __awaiter(this, arguments, void 0, function* (accountId, workspaceId, request = {}, requestOptions) {
|
|
49
|
-
var _a, _b, _c;
|
|
49
|
+
var _a, _b, _c, _d;
|
|
50
50
|
const { include } = request;
|
|
51
51
|
const _queryParams = {};
|
|
52
52
|
if (include != null) {
|
|
53
53
|
_queryParams["include"] = include;
|
|
54
54
|
}
|
|
55
55
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
56
|
-
const _response = yield core.fetcher({
|
|
57
|
-
url: core.url.join((
|
|
56
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
57
|
+
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)}/workspaces/${encodeURIComponent(workspaceId)}`),
|
|
58
58
|
method: "GET",
|
|
59
59
|
headers: _headers,
|
|
60
60
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -132,10 +132,10 @@ export class Workspaces {
|
|
|
132
132
|
}
|
|
133
133
|
__delete(accountId, workspaceId, requestOptions) {
|
|
134
134
|
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
-
var _a, _b, _c;
|
|
135
|
+
var _a, _b, _c, _d;
|
|
136
136
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
137
|
-
const _response = yield core.fetcher({
|
|
138
|
-
url: core.url.join((
|
|
137
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
138
|
+
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)}/workspaces/${encodeURIComponent(workspaceId)}`),
|
|
139
139
|
method: "DELETE",
|
|
140
140
|
headers: _headers,
|
|
141
141
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -215,10 +215,10 @@ export class Workspaces {
|
|
|
215
215
|
}
|
|
216
216
|
__update(accountId, workspaceId, request, requestOptions) {
|
|
217
217
|
return __awaiter(this, void 0, void 0, function* () {
|
|
218
|
-
var _a, _b, _c;
|
|
218
|
+
var _a, _b, _c, _d;
|
|
219
219
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
220
|
-
const _response = yield core.fetcher({
|
|
221
|
-
url: core.url.join((
|
|
220
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
221
|
+
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)}/workspaces/${encodeURIComponent(workspaceId)}`),
|
|
222
222
|
method: "PATCH",
|
|
223
223
|
headers: _headers,
|
|
224
224
|
contentType: "application/json",
|
|
@@ -296,91 +296,81 @@ export class Workspaces {
|
|
|
296
296
|
* include_total_count: false
|
|
297
297
|
* })
|
|
298
298
|
*/
|
|
299
|
-
index(
|
|
299
|
+
index(accountId, request = {}, requestOptions) {
|
|
300
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, request, requestOptions));
|
|
301
|
+
}
|
|
302
|
+
__index(accountId_1) {
|
|
300
303
|
return __awaiter(this, arguments, void 0, function* (accountId, request = {}, requestOptions) {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
default:
|
|
350
|
-
throw new errors.FrameioError({
|
|
351
|
-
statusCode: _response.error.statusCode,
|
|
352
|
-
body: _response.error.body,
|
|
353
|
-
rawResponse: _response.rawResponse,
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
}
|
|
357
|
-
switch (_response.error.reason) {
|
|
358
|
-
case "non-json":
|
|
304
|
+
var _a, _b, _c, _d;
|
|
305
|
+
const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
306
|
+
const _queryParams = {};
|
|
307
|
+
if (include != null) {
|
|
308
|
+
_queryParams["include"] = include;
|
|
309
|
+
}
|
|
310
|
+
if (after != null) {
|
|
311
|
+
_queryParams["after"] = after;
|
|
312
|
+
}
|
|
313
|
+
if (pageSize != null) {
|
|
314
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
315
|
+
}
|
|
316
|
+
if (includeTotalCount != null) {
|
|
317
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
318
|
+
}
|
|
319
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
320
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
321
|
+
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)}/workspaces`),
|
|
322
|
+
method: "GET",
|
|
323
|
+
headers: _headers,
|
|
324
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
325
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
326
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
327
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
328
|
+
});
|
|
329
|
+
if (_response.ok) {
|
|
330
|
+
return {
|
|
331
|
+
data: _response.body,
|
|
332
|
+
rawResponse: _response.rawResponse,
|
|
333
|
+
};
|
|
334
|
+
}
|
|
335
|
+
if (_response.error.reason === "status-code") {
|
|
336
|
+
switch (_response.error.statusCode) {
|
|
337
|
+
case 400:
|
|
338
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
339
|
+
case 401:
|
|
340
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
341
|
+
case 403:
|
|
342
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
343
|
+
case 404:
|
|
344
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
345
|
+
case 409:
|
|
346
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
347
|
+
case 422:
|
|
348
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
349
|
+
case 429:
|
|
350
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
351
|
+
default:
|
|
359
352
|
throw new errors.FrameioError({
|
|
360
353
|
statusCode: _response.error.statusCode,
|
|
361
|
-
body: _response.error.
|
|
362
|
-
rawResponse: _response.rawResponse,
|
|
363
|
-
});
|
|
364
|
-
case "timeout":
|
|
365
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces.");
|
|
366
|
-
case "unknown":
|
|
367
|
-
throw new errors.FrameioError({
|
|
368
|
-
message: _response.error.errorMessage,
|
|
354
|
+
body: _response.error.body,
|
|
369
355
|
rawResponse: _response.rawResponse,
|
|
370
356
|
});
|
|
371
357
|
}
|
|
372
|
-
}
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
358
|
+
}
|
|
359
|
+
switch (_response.error.reason) {
|
|
360
|
+
case "non-json":
|
|
361
|
+
throw new errors.FrameioError({
|
|
362
|
+
statusCode: _response.error.statusCode,
|
|
363
|
+
body: _response.error.rawBody,
|
|
364
|
+
rawResponse: _response.rawResponse,
|
|
365
|
+
});
|
|
366
|
+
case "timeout":
|
|
367
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces.");
|
|
368
|
+
case "unknown":
|
|
369
|
+
throw new errors.FrameioError({
|
|
370
|
+
message: _response.error.errorMessage,
|
|
371
|
+
rawResponse: _response.rawResponse,
|
|
372
|
+
});
|
|
373
|
+
}
|
|
384
374
|
});
|
|
385
375
|
}
|
|
386
376
|
/**
|
|
@@ -410,10 +400,10 @@ export class Workspaces {
|
|
|
410
400
|
}
|
|
411
401
|
__create(accountId, request, requestOptions) {
|
|
412
402
|
return __awaiter(this, void 0, void 0, function* () {
|
|
413
|
-
var _a, _b, _c;
|
|
403
|
+
var _a, _b, _c, _d;
|
|
414
404
|
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
415
|
-
const _response = yield core.fetcher({
|
|
416
|
-
url: core.url.join((
|
|
405
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
406
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/workspaces`),
|
|
417
407
|
method: "POST",
|
|
418
408
|
headers: _headers,
|
|
419
409
|
contentType: "application/json",
|
package/dist/esm/core/index.mjs
CHANGED
package/dist/esm/version.d.mts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.
|
|
1
|
+
export declare const SDK_VERSION = "1.3.0";
|
package/dist/esm/version.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const SDK_VERSION = "1.
|
|
1
|
+
export const SDK_VERSION = "1.3.0";
|