frameio 1.2.2 → 1.2.3
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.js +2 -2
- package/dist/cjs/api/resources/accountPermissions/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/accountPermissions/client/Client.js +66 -79
- package/dist/cjs/api/resources/accounts/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/accounts/client/Client.js +63 -73
- package/dist/cjs/api/resources/comments/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/comments/client/Client.js +69 -82
- package/dist/cjs/api/resources/projectPermissions/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/projectPermissions/client/Client.js +66 -79
- package/dist/cjs/api/resources/projects/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/projects/client/Client.js +66 -79
- package/dist/cjs/api/resources/shares/client/Client.d.ts +4 -2
- package/dist/cjs/api/resources/shares/client/Client.js +126 -149
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +66 -79
- package/dist/cjs/api/resources/workspacePermissions/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/workspacePermissions/client/Client.js +66 -79
- package/dist/cjs/api/resources/workspaces/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/workspaces/client/Client.js +69 -79
- 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.mjs +2 -2
- package/dist/esm/api/resources/accountPermissions/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/accountPermissions/client/Client.mjs +66 -79
- package/dist/esm/api/resources/accounts/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/accounts/client/Client.mjs +63 -73
- package/dist/esm/api/resources/comments/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/comments/client/Client.mjs +69 -82
- package/dist/esm/api/resources/projectPermissions/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/projectPermissions/client/Client.mjs +66 -79
- package/dist/esm/api/resources/projects/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/projects/client/Client.mjs +66 -79
- package/dist/esm/api/resources/shares/client/Client.d.mts +4 -2
- package/dist/esm/api/resources/shares/client/Client.mjs +126 -149
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +66 -79
- package/dist/esm/api/resources/workspacePermissions/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +66 -79
- package/dist/esm/api/resources/workspaces/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/workspaces/client/Client.mjs +69 -79
- 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
|
@@ -41,85 +41,75 @@ export class Accounts {
|
|
|
41
41
|
* include_total_count: false
|
|
42
42
|
* })
|
|
43
43
|
*/
|
|
44
|
-
index() {
|
|
44
|
+
index(request = {}, requestOptions) {
|
|
45
|
+
return core.HttpResponsePromise.fromPromise(this.__index(request, requestOptions));
|
|
46
|
+
}
|
|
47
|
+
__index() {
|
|
45
48
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
default:
|
|
89
|
-
throw new errors.FrameioError({
|
|
90
|
-
statusCode: _response.error.statusCode,
|
|
91
|
-
body: _response.error.body,
|
|
92
|
-
rawResponse: _response.rawResponse,
|
|
93
|
-
});
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
switch (_response.error.reason) {
|
|
97
|
-
case "non-json":
|
|
49
|
+
var _a, _b, _c;
|
|
50
|
+
const { after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
51
|
+
const _queryParams = {};
|
|
52
|
+
if (after != null) {
|
|
53
|
+
_queryParams["after"] = after;
|
|
54
|
+
}
|
|
55
|
+
if (pageSize != null) {
|
|
56
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
57
|
+
}
|
|
58
|
+
if (includeTotalCount != null) {
|
|
59
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
60
|
+
}
|
|
61
|
+
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);
|
|
62
|
+
const _response = yield core.fetcher({
|
|
63
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FrameioEnvironment.Default, "v4/accounts"),
|
|
64
|
+
method: "GET",
|
|
65
|
+
headers: _headers,
|
|
66
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
67
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
68
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
69
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
70
|
+
});
|
|
71
|
+
if (_response.ok) {
|
|
72
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
73
|
+
}
|
|
74
|
+
if (_response.error.reason === "status-code") {
|
|
75
|
+
switch (_response.error.statusCode) {
|
|
76
|
+
case 400:
|
|
77
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
78
|
+
case 401:
|
|
79
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
80
|
+
case 403:
|
|
81
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
82
|
+
case 404:
|
|
83
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
84
|
+
case 409:
|
|
85
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
86
|
+
case 422:
|
|
87
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
88
|
+
case 429:
|
|
89
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
90
|
+
default:
|
|
98
91
|
throw new errors.FrameioError({
|
|
99
92
|
statusCode: _response.error.statusCode,
|
|
100
|
-
body: _response.error.
|
|
101
|
-
rawResponse: _response.rawResponse,
|
|
102
|
-
});
|
|
103
|
-
case "timeout":
|
|
104
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts.");
|
|
105
|
-
case "unknown":
|
|
106
|
-
throw new errors.FrameioError({
|
|
107
|
-
message: _response.error.errorMessage,
|
|
93
|
+
body: _response.error.body,
|
|
108
94
|
rawResponse: _response.rawResponse,
|
|
109
95
|
});
|
|
110
96
|
}
|
|
111
|
-
}
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
97
|
+
}
|
|
98
|
+
switch (_response.error.reason) {
|
|
99
|
+
case "non-json":
|
|
100
|
+
throw new errors.FrameioError({
|
|
101
|
+
statusCode: _response.error.statusCode,
|
|
102
|
+
body: _response.error.rawBody,
|
|
103
|
+
rawResponse: _response.rawResponse,
|
|
104
|
+
});
|
|
105
|
+
case "timeout":
|
|
106
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts.");
|
|
107
|
+
case "unknown":
|
|
108
|
+
throw new errors.FrameioError({
|
|
109
|
+
message: _response.error.errorMessage,
|
|
110
|
+
rawResponse: _response.rawResponse,
|
|
111
|
+
});
|
|
112
|
+
}
|
|
123
113
|
});
|
|
124
114
|
}
|
|
125
115
|
/**
|
|
@@ -127,7 +127,8 @@ export declare class Comments {
|
|
|
127
127
|
* include_total_count: false
|
|
128
128
|
* })
|
|
129
129
|
*/
|
|
130
|
-
index(accountId: Frameio.Uuid, fileId: Frameio.Uuid, request?: Frameio.CommentsIndexRequest, requestOptions?: Comments.RequestOptions):
|
|
130
|
+
index(accountId: Frameio.Uuid, fileId: Frameio.Uuid, request?: Frameio.CommentsIndexRequest, requestOptions?: Comments.RequestOptions): core.HttpResponsePromise<Frameio.CommentsWithIncludesResponse>;
|
|
131
|
+
private __index;
|
|
131
132
|
/**
|
|
132
133
|
* Create a comment on a file. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
133
134
|
*
|
|
@@ -319,94 +319,81 @@ export class Comments {
|
|
|
319
319
|
* include_total_count: false
|
|
320
320
|
* })
|
|
321
321
|
*/
|
|
322
|
-
index(
|
|
322
|
+
index(accountId, fileId, request = {}, requestOptions) {
|
|
323
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, fileId, request, requestOptions));
|
|
324
|
+
}
|
|
325
|
+
__index(accountId_1, fileId_1) {
|
|
323
326
|
return __awaiter(this, arguments, void 0, function* (accountId, fileId, request = {}, requestOptions) {
|
|
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
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
373
|
-
case 429:
|
|
374
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
375
|
-
default:
|
|
376
|
-
throw new errors.FrameioError({
|
|
377
|
-
statusCode: _response.error.statusCode,
|
|
378
|
-
body: _response.error.body,
|
|
379
|
-
rawResponse: _response.rawResponse,
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
switch (_response.error.reason) {
|
|
384
|
-
case "non-json":
|
|
327
|
+
var _a, _b, _c;
|
|
328
|
+
const { timestamp_as_timecode: timestampAsTimecode, include, after, page_size: pageSize, include_total_count: includeTotalCount, } = request;
|
|
329
|
+
const _queryParams = {};
|
|
330
|
+
if (timestampAsTimecode != null) {
|
|
331
|
+
_queryParams["timestamp_as_timecode"] = timestampAsTimecode.toString();
|
|
332
|
+
}
|
|
333
|
+
if (include != null) {
|
|
334
|
+
_queryParams["include"] = include;
|
|
335
|
+
}
|
|
336
|
+
if (after != null) {
|
|
337
|
+
_queryParams["after"] = after;
|
|
338
|
+
}
|
|
339
|
+
if (pageSize != null) {
|
|
340
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
341
|
+
}
|
|
342
|
+
if (includeTotalCount != null) {
|
|
343
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
344
|
+
}
|
|
345
|
+
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);
|
|
346
|
+
const _response = yield core.fetcher({
|
|
347
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/files/${encodeURIComponent(fileId)}/comments`),
|
|
348
|
+
method: "GET",
|
|
349
|
+
headers: _headers,
|
|
350
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
351
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
352
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
353
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
354
|
+
});
|
|
355
|
+
if (_response.ok) {
|
|
356
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
357
|
+
}
|
|
358
|
+
if (_response.error.reason === "status-code") {
|
|
359
|
+
switch (_response.error.statusCode) {
|
|
360
|
+
case 400:
|
|
361
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
362
|
+
case 401:
|
|
363
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
364
|
+
case 403:
|
|
365
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
366
|
+
case 404:
|
|
367
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
368
|
+
case 409:
|
|
369
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
370
|
+
case 422:
|
|
371
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
372
|
+
case 429:
|
|
373
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
374
|
+
default:
|
|
385
375
|
throw new errors.FrameioError({
|
|
386
376
|
statusCode: _response.error.statusCode,
|
|
387
|
-
body: _response.error.
|
|
388
|
-
rawResponse: _response.rawResponse,
|
|
389
|
-
});
|
|
390
|
-
case "timeout":
|
|
391
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/files/{file_id}/comments.");
|
|
392
|
-
case "unknown":
|
|
393
|
-
throw new errors.FrameioError({
|
|
394
|
-
message: _response.error.errorMessage,
|
|
377
|
+
body: _response.error.body,
|
|
395
378
|
rawResponse: _response.rawResponse,
|
|
396
379
|
});
|
|
397
380
|
}
|
|
398
|
-
}
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
381
|
+
}
|
|
382
|
+
switch (_response.error.reason) {
|
|
383
|
+
case "non-json":
|
|
384
|
+
throw new errors.FrameioError({
|
|
385
|
+
statusCode: _response.error.statusCode,
|
|
386
|
+
body: _response.error.rawBody,
|
|
387
|
+
rawResponse: _response.rawResponse,
|
|
388
|
+
});
|
|
389
|
+
case "timeout":
|
|
390
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/files/{file_id}/comments.");
|
|
391
|
+
case "unknown":
|
|
392
|
+
throw new errors.FrameioError({
|
|
393
|
+
message: _response.error.errorMessage,
|
|
394
|
+
rawResponse: _response.rawResponse,
|
|
395
|
+
});
|
|
396
|
+
}
|
|
410
397
|
});
|
|
411
398
|
}
|
|
412
399
|
/**
|
|
@@ -53,7 +53,8 @@ export declare class ProjectPermissions {
|
|
|
53
53
|
* include_total_count: false
|
|
54
54
|
* })
|
|
55
55
|
*/
|
|
56
|
-
index(accountId: Frameio.Uuid, projectId: Frameio.Uuid, request?: Frameio.ProjectPermissionsIndexRequest, requestOptions?: ProjectPermissions.RequestOptions):
|
|
56
|
+
index(accountId: Frameio.Uuid, projectId: Frameio.Uuid, request?: Frameio.ProjectPermissionsIndexRequest, requestOptions?: ProjectPermissions.RequestOptions): core.HttpResponsePromise<Frameio.ProjectUserRolesResponse>;
|
|
57
|
+
private __index;
|
|
57
58
|
/**
|
|
58
59
|
* Remove a user from a given project. <br>Rate Limits: 60 calls per 1.00 minute(s) per account_user
|
|
59
60
|
*
|
|
@@ -44,91 +44,78 @@ export class ProjectPermissions {
|
|
|
44
44
|
* include_total_count: false
|
|
45
45
|
* })
|
|
46
46
|
*/
|
|
47
|
-
index(
|
|
47
|
+
index(accountId, projectId, request = {}, requestOptions) {
|
|
48
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, projectId, request, requestOptions));
|
|
49
|
+
}
|
|
50
|
+
__index(accountId_1, projectId_1) {
|
|
48
51
|
return __awaiter(this, arguments, void 0, function* (accountId, projectId, request = {}, requestOptions) {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
95
|
-
case 429:
|
|
96
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
97
|
-
default:
|
|
98
|
-
throw new errors.FrameioError({
|
|
99
|
-
statusCode: _response.error.statusCode,
|
|
100
|
-
body: _response.error.body,
|
|
101
|
-
rawResponse: _response.rawResponse,
|
|
102
|
-
});
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
switch (_response.error.reason) {
|
|
106
|
-
case "non-json":
|
|
52
|
+
var _a, _b, _c;
|
|
53
|
+
const { include_deactivated: includeDeactivated, after, page_size: pageSize, include_total_count: includeTotalCount, } = request;
|
|
54
|
+
const _queryParams = {};
|
|
55
|
+
if (includeDeactivated != null) {
|
|
56
|
+
_queryParams["include_deactivated"] = includeDeactivated.toString();
|
|
57
|
+
}
|
|
58
|
+
if (after != null) {
|
|
59
|
+
_queryParams["after"] = after;
|
|
60
|
+
}
|
|
61
|
+
if (pageSize != null) {
|
|
62
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
63
|
+
}
|
|
64
|
+
if (includeTotalCount != null) {
|
|
65
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
66
|
+
}
|
|
67
|
+
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);
|
|
68
|
+
const _response = yield core.fetcher({
|
|
69
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/projects/${encodeURIComponent(projectId)}/users`),
|
|
70
|
+
method: "GET",
|
|
71
|
+
headers: _headers,
|
|
72
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
73
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
74
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
75
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
76
|
+
});
|
|
77
|
+
if (_response.ok) {
|
|
78
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
79
|
+
}
|
|
80
|
+
if (_response.error.reason === "status-code") {
|
|
81
|
+
switch (_response.error.statusCode) {
|
|
82
|
+
case 400:
|
|
83
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
84
|
+
case 401:
|
|
85
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
86
|
+
case 403:
|
|
87
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
88
|
+
case 404:
|
|
89
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
90
|
+
case 409:
|
|
91
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
92
|
+
case 422:
|
|
93
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
94
|
+
case 429:
|
|
95
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
96
|
+
default:
|
|
107
97
|
throw new errors.FrameioError({
|
|
108
98
|
statusCode: _response.error.statusCode,
|
|
109
|
-
body: _response.error.
|
|
110
|
-
rawResponse: _response.rawResponse,
|
|
111
|
-
});
|
|
112
|
-
case "timeout":
|
|
113
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/projects/{project_id}/users.");
|
|
114
|
-
case "unknown":
|
|
115
|
-
throw new errors.FrameioError({
|
|
116
|
-
message: _response.error.errorMessage,
|
|
99
|
+
body: _response.error.body,
|
|
117
100
|
rawResponse: _response.rawResponse,
|
|
118
101
|
});
|
|
119
102
|
}
|
|
120
|
-
}
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
103
|
+
}
|
|
104
|
+
switch (_response.error.reason) {
|
|
105
|
+
case "non-json":
|
|
106
|
+
throw new errors.FrameioError({
|
|
107
|
+
statusCode: _response.error.statusCode,
|
|
108
|
+
body: _response.error.rawBody,
|
|
109
|
+
rawResponse: _response.rawResponse,
|
|
110
|
+
});
|
|
111
|
+
case "timeout":
|
|
112
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/projects/{project_id}/users.");
|
|
113
|
+
case "unknown":
|
|
114
|
+
throw new errors.FrameioError({
|
|
115
|
+
message: _response.error.errorMessage,
|
|
116
|
+
rawResponse: _response.rawResponse,
|
|
117
|
+
});
|
|
118
|
+
}
|
|
132
119
|
});
|
|
133
120
|
}
|
|
134
121
|
/**
|
|
@@ -123,7 +123,8 @@ export declare class Projects {
|
|
|
123
123
|
* include_total_count: false
|
|
124
124
|
* })
|
|
125
125
|
*/
|
|
126
|
-
index(accountId: Frameio.Uuid, workspaceId: Frameio.Uuid, request?: Frameio.ProjectsIndexRequest, requestOptions?: Projects.RequestOptions):
|
|
126
|
+
index(accountId: Frameio.Uuid, workspaceId: Frameio.Uuid, request?: Frameio.ProjectsIndexRequest, requestOptions?: Projects.RequestOptions): core.HttpResponsePromise<Frameio.ProjectsWithIncludesResponse>;
|
|
127
|
+
private __index;
|
|
127
128
|
/**
|
|
128
129
|
* Create project in a given workspace. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
129
130
|
*
|