frameio 1.2.1 → 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/README.md +1 -1
- 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 +3 -2
- package/dist/cjs/api/resources/accounts/client/Client.js +67 -74
- 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/files/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/files/client/Client.js +4 -1
- package/dist/cjs/api/resources/folders/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/folders/client/Client.js +4 -1
- package/dist/cjs/api/resources/folders/types/FoldersListRequestInclude.d.ts +1 -0
- package/dist/cjs/api/resources/folders/types/FoldersListRequestInclude.js +1 -0
- package/dist/cjs/api/resources/folders/types/FoldersShowRequestInclude.d.ts +1 -0
- package/dist/cjs/api/resources/folders/types/FoldersShowRequestInclude.js +1 -0
- package/dist/cjs/api/resources/metadata/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/metadata/client/Client.js +4 -4
- package/dist/cjs/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.ts +4 -4
- package/dist/cjs/api/resources/projectPermissions/client/Client.d.ts +2 -1
- package/dist/cjs/api/resources/projectPermissions/client/Client.js +66 -76
- 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 +8 -6
- package/dist/cjs/api/resources/shares/client/Client.js +130 -153
- 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/versionStacks/client/Client.d.ts +2 -2
- package/dist/cjs/api/resources/versionStacks/client/Client.js +5 -2
- package/dist/cjs/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.ts +1 -1
- 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 -76
- 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/api/types/AssetInclude.d.ts +1 -0
- package/dist/cjs/api/types/AssetInclude.js +1 -0
- package/dist/cjs/api/types/{AuditLogsResponse.d.ts → AuditLogsWithIncludesResponse.d.ts} +1 -1
- package/dist/cjs/api/types/{AssetsWithIncludesResponse.d.ts → FileAssetsWithIncludesResponse.d.ts} +1 -1
- package/dist/cjs/api/types/FolderAssetsWithIncludesResponse.d.ts +8 -0
- package/dist/cjs/api/types/{UserRolesResponse.d.ts → ProjectUserRolesResponse.d.ts} +1 -1
- package/dist/cjs/api/types/ProjectUserRolesResponse.js +3 -0
- package/dist/cjs/api/types/VersionStackAssetsWithIncludesResponse.d.ts +8 -0
- package/dist/cjs/api/types/VersionStackAssetsWithIncludesResponse.js +3 -0
- package/dist/cjs/api/types/WorkspaceUserRolesResponse.d.ts +11 -0
- package/dist/cjs/api/types/WorkspaceUserRolesResponse.js +3 -0
- package/dist/cjs/api/types/index.d.ts +6 -3
- package/dist/cjs/api/types/index.js +6 -3
- 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 +3 -2
- package/dist/esm/api/resources/accounts/client/Client.mjs +67 -74
- 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/files/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/files/client/Client.mjs +4 -1
- package/dist/esm/api/resources/folders/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/folders/client/Client.mjs +4 -1
- package/dist/esm/api/resources/folders/types/FoldersListRequestInclude.d.mts +1 -0
- package/dist/esm/api/resources/folders/types/FoldersListRequestInclude.mjs +1 -0
- package/dist/esm/api/resources/folders/types/FoldersShowRequestInclude.d.mts +1 -0
- package/dist/esm/api/resources/folders/types/FoldersShowRequestInclude.mjs +1 -0
- package/dist/esm/api/resources/metadata/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/metadata/client/Client.mjs +4 -4
- package/dist/esm/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.mts +4 -4
- package/dist/esm/api/resources/projectPermissions/client/Client.d.mts +2 -1
- package/dist/esm/api/resources/projectPermissions/client/Client.mjs +66 -76
- 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 +8 -6
- package/dist/esm/api/resources/shares/client/Client.mjs +130 -153
- 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/versionStacks/client/Client.d.mts +2 -2
- package/dist/esm/api/resources/versionStacks/client/Client.mjs +5 -2
- package/dist/esm/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.mts +1 -1
- 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 -76
- 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/api/types/AssetInclude.d.mts +1 -0
- package/dist/esm/api/types/AssetInclude.mjs +1 -0
- package/dist/esm/api/types/{AuditLogsResponse.d.mts → AuditLogsWithIncludesResponse.d.mts} +1 -1
- package/dist/esm/api/types/{AssetsWithIncludesResponse.d.mts → FileAssetsWithIncludesResponse.d.mts} +1 -1
- package/dist/esm/api/types/FolderAssetsWithIncludesResponse.d.mts +8 -0
- package/dist/esm/api/types/{UserRolesResponse.d.mts → ProjectUserRolesResponse.d.mts} +1 -1
- package/dist/esm/api/types/ProjectUserRolesResponse.mjs +2 -0
- package/dist/esm/api/types/VersionStackAssetsWithIncludesResponse.d.mts +8 -0
- package/dist/esm/api/types/VersionStackAssetsWithIncludesResponse.mjs +2 -0
- package/dist/esm/api/types/WorkspaceUserRolesResponse.d.mts +11 -0
- package/dist/esm/api/types/WorkspaceUserRolesResponse.mjs +2 -0
- package/dist/esm/api/types/index.d.mts +6 -3
- package/dist/esm/api/types/index.mjs +6 -3
- 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 +42 -216
- 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
- /package/dist/cjs/api/types/{AssetsWithIncludesResponse.js → AuditLogsWithIncludesResponse.js} +0 -0
- /package/dist/cjs/api/types/{AuditLogsResponse.js → FileAssetsWithIncludesResponse.js} +0 -0
- /package/dist/cjs/api/types/{UserRolesResponse.js → FolderAssetsWithIncludesResponse.js} +0 -0
- /package/dist/esm/api/types/{AssetsWithIncludesResponse.mjs → AuditLogsWithIncludesResponse.mjs} +0 -0
- /package/dist/esm/api/types/{AuditLogsResponse.mjs → FileAssetsWithIncludesResponse.mjs} +0 -0
- /package/dist/esm/api/types/{UserRolesResponse.mjs → FolderAssetsWithIncludesResponse.mjs} +0 -0
|
@@ -43,91 +43,78 @@ export class AccountPermissions {
|
|
|
43
43
|
* include_total_count: false
|
|
44
44
|
* })
|
|
45
45
|
*/
|
|
46
|
-
index(
|
|
46
|
+
index(accountId, request = {}, requestOptions) {
|
|
47
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, request, requestOptions));
|
|
48
|
+
}
|
|
49
|
+
__index(accountId_1) {
|
|
47
50
|
return __awaiter(this, arguments, void 0, function* (accountId, request = {}, requestOptions) {
|
|
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
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
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:
|
|
97
|
-
throw new errors.FrameioError({
|
|
98
|
-
statusCode: _response.error.statusCode,
|
|
99
|
-
body: _response.error.body,
|
|
100
|
-
rawResponse: _response.rawResponse,
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
}
|
|
104
|
-
switch (_response.error.reason) {
|
|
105
|
-
case "non-json":
|
|
51
|
+
var _a, _b, _c;
|
|
52
|
+
const { include_deactivated: includeDeactivated, after, page_size: pageSize, include_total_count: includeTotalCount, } = request;
|
|
53
|
+
const _queryParams = {};
|
|
54
|
+
if (includeDeactivated != null) {
|
|
55
|
+
_queryParams["include_deactivated"] = includeDeactivated.toString();
|
|
56
|
+
}
|
|
57
|
+
if (after != null) {
|
|
58
|
+
_queryParams["after"] = after;
|
|
59
|
+
}
|
|
60
|
+
if (pageSize != null) {
|
|
61
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
62
|
+
}
|
|
63
|
+
if (includeTotalCount != null) {
|
|
64
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
65
|
+
}
|
|
66
|
+
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);
|
|
67
|
+
const _response = yield core.fetcher({
|
|
68
|
+
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)}/users`),
|
|
69
|
+
method: "GET",
|
|
70
|
+
headers: _headers,
|
|
71
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
72
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
73
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
74
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
75
|
+
});
|
|
76
|
+
if (_response.ok) {
|
|
77
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
78
|
+
}
|
|
79
|
+
if (_response.error.reason === "status-code") {
|
|
80
|
+
switch (_response.error.statusCode) {
|
|
81
|
+
case 400:
|
|
82
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
83
|
+
case 401:
|
|
84
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
85
|
+
case 403:
|
|
86
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
87
|
+
case 404:
|
|
88
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
89
|
+
case 409:
|
|
90
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
91
|
+
case 422:
|
|
92
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
93
|
+
case 429:
|
|
94
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
95
|
+
default:
|
|
106
96
|
throw new errors.FrameioError({
|
|
107
97
|
statusCode: _response.error.statusCode,
|
|
108
|
-
body: _response.error.
|
|
109
|
-
rawResponse: _response.rawResponse,
|
|
110
|
-
});
|
|
111
|
-
case "timeout":
|
|
112
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/users.");
|
|
113
|
-
case "unknown":
|
|
114
|
-
throw new errors.FrameioError({
|
|
115
|
-
message: _response.error.errorMessage,
|
|
98
|
+
body: _response.error.body,
|
|
116
99
|
rawResponse: _response.rawResponse,
|
|
117
100
|
});
|
|
118
101
|
}
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
102
|
+
}
|
|
103
|
+
switch (_response.error.reason) {
|
|
104
|
+
case "non-json":
|
|
105
|
+
throw new errors.FrameioError({
|
|
106
|
+
statusCode: _response.error.statusCode,
|
|
107
|
+
body: _response.error.rawBody,
|
|
108
|
+
rawResponse: _response.rawResponse,
|
|
109
|
+
});
|
|
110
|
+
case "timeout":
|
|
111
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/users.");
|
|
112
|
+
case "unknown":
|
|
113
|
+
throw new errors.FrameioError({
|
|
114
|
+
message: _response.error.errorMessage,
|
|
115
|
+
rawResponse: _response.rawResponse,
|
|
116
|
+
});
|
|
117
|
+
}
|
|
131
118
|
});
|
|
132
119
|
}
|
|
133
120
|
_getAuthorizationHeader() {
|
|
@@ -50,7 +50,8 @@ export declare class Accounts {
|
|
|
50
50
|
* include_total_count: false
|
|
51
51
|
* })
|
|
52
52
|
*/
|
|
53
|
-
index(request?: Frameio.AccountsIndexRequest, requestOptions?: Accounts.RequestOptions):
|
|
53
|
+
index(request?: Frameio.AccountsIndexRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<Frameio.AccountsResponse>;
|
|
54
|
+
private __index;
|
|
54
55
|
/**
|
|
55
56
|
* List audit logs with filtering capabilities via query params. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
56
57
|
*
|
|
@@ -74,7 +75,7 @@ export declare class Accounts {
|
|
|
74
75
|
* include_total_count: false
|
|
75
76
|
* })
|
|
76
77
|
*/
|
|
77
|
-
auditlogIndex(accountId: Frameio.Uuid, request?: Frameio.AuditlogIndexRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<Frameio.
|
|
78
|
+
auditlogIndex(accountId: Frameio.Uuid, request?: Frameio.AuditlogIndexRequest, requestOptions?: Accounts.RequestOptions): core.HttpResponsePromise<Frameio.AuditLogsWithIncludesResponse>;
|
|
78
79
|
private __auditlogIndex;
|
|
79
80
|
protected _getAuthorizationHeader(): Promise<string>;
|
|
80
81
|
}
|
|
@@ -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
|
/**
|
|
@@ -179,7 +169,10 @@ export class Accounts {
|
|
|
179
169
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
180
170
|
});
|
|
181
171
|
if (_response.ok) {
|
|
182
|
-
return {
|
|
172
|
+
return {
|
|
173
|
+
data: _response.body,
|
|
174
|
+
rawResponse: _response.rawResponse,
|
|
175
|
+
};
|
|
183
176
|
}
|
|
184
177
|
if (_response.error.reason === "status-code") {
|
|
185
178
|
switch (_response.error.statusCode) {
|
|
@@ -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
|
/**
|
|
@@ -54,7 +54,7 @@ export declare class Files {
|
|
|
54
54
|
* include_total_count: false
|
|
55
55
|
* })
|
|
56
56
|
*/
|
|
57
|
-
list(accountId: Frameio.Uuid, folderId: Frameio.Uuid, request?: Frameio.FilesListRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise<Frameio.
|
|
57
|
+
list(accountId: Frameio.Uuid, folderId: Frameio.Uuid, request?: Frameio.FilesListRequest, requestOptions?: Files.RequestOptions): core.HttpResponsePromise<Frameio.FileAssetsWithIncludesResponse>;
|
|
58
58
|
private __list;
|
|
59
59
|
/**
|
|
60
60
|
* Create new file under parent folder. `Create file (local upload)` and `Create file (remote upload)` have replaced this endpoint. <br>Rate Limits: 5 calls per 1 second(s) per account_user
|
|
@@ -90,7 +90,10 @@ export class Files {
|
|
|
90
90
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
91
91
|
});
|
|
92
92
|
if (_response.ok) {
|
|
93
|
-
return {
|
|
93
|
+
return {
|
|
94
|
+
data: _response.body,
|
|
95
|
+
rawResponse: _response.rawResponse,
|
|
96
|
+
};
|
|
94
97
|
}
|
|
95
98
|
if (_response.error.reason === "status-code") {
|
|
96
99
|
switch (_response.error.statusCode) {
|
|
@@ -134,7 +134,7 @@ export declare class Folders {
|
|
|
134
134
|
* include_total_count: false
|
|
135
135
|
* })
|
|
136
136
|
*/
|
|
137
|
-
index(accountId: Frameio.Uuid, folderId: Frameio.Uuid, request?: Frameio.FoldersIndexRequest, requestOptions?: Folders.RequestOptions): core.HttpResponsePromise<Frameio.
|
|
137
|
+
index(accountId: Frameio.Uuid, folderId: Frameio.Uuid, request?: Frameio.FoldersIndexRequest, requestOptions?: Folders.RequestOptions): core.HttpResponsePromise<Frameio.FolderAssetsWithIncludesResponse>;
|
|
138
138
|
private __index;
|
|
139
139
|
/**
|
|
140
140
|
* Copy folder. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
@@ -352,7 +352,10 @@ export class Folders {
|
|
|
352
352
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
353
353
|
});
|
|
354
354
|
if (_response.ok) {
|
|
355
|
-
return {
|
|
355
|
+
return {
|
|
356
|
+
data: _response.body,
|
|
357
|
+
rawResponse: _response.rawResponse,
|
|
358
|
+
};
|
|
356
359
|
}
|
|
357
360
|
if (_response.error.reason === "status-code") {
|
|
358
361
|
switch (_response.error.statusCode) {
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export declare const FoldersListRequestInclude: {
|
|
3
3
|
readonly Creator: "creator";
|
|
4
4
|
readonly Project: "project";
|
|
5
|
+
readonly ProjectOwner: "project.owner";
|
|
5
6
|
readonly Metadata: "metadata";
|
|
6
7
|
};
|
|
7
8
|
export type FoldersListRequestInclude = (typeof FoldersListRequestInclude)[keyof typeof FoldersListRequestInclude];
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
export declare const FoldersShowRequestInclude: {
|
|
3
3
|
readonly Creator: "creator";
|
|
4
4
|
readonly Project: "project";
|
|
5
|
+
readonly ProjectOwner: "project.owner";
|
|
5
6
|
readonly Metadata: "metadata";
|
|
6
7
|
};
|
|
7
8
|
export type FoldersShowRequestInclude = (typeof FoldersShowRequestInclude)[keyof typeof FoldersShowRequestInclude];
|