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
|
@@ -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];
|
|
@@ -48,16 +48,16 @@ export declare class Metadata {
|
|
|
48
48
|
* @example
|
|
49
49
|
* await client.metadata.bulkUpdate("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
50
50
|
* data: {
|
|
51
|
-
* file_ids: ["
|
|
51
|
+
* file_ids: ["6aa84ef8-7f0a-431e-805e-a5e96345a176", "54916a83-698a-43f8-9f14-19fd99094474"],
|
|
52
52
|
* values: [{
|
|
53
|
-
* field_definition_id: "
|
|
53
|
+
* field_definition_id: "79e05ece-741a-4a20-b320-3a09c15673bb",
|
|
54
54
|
* value: [
|
|
55
55
|
* {
|
|
56
|
-
* "id": "
|
|
56
|
+
* "id": "95681686-3627-4b8c-9a7c-982e41dc8af6",
|
|
57
57
|
* "type": "user"
|
|
58
58
|
* },
|
|
59
59
|
* {
|
|
60
|
-
* "id": "
|
|
60
|
+
* "id": "8759b175-9d71-41af-8b52-0dc79db384ec",
|
|
61
61
|
* "type": "account_user_group"
|
|
62
62
|
* }
|
|
63
63
|
* ]
|
|
@@ -75,16 +75,16 @@ class Metadata {
|
|
|
75
75
|
* @example
|
|
76
76
|
* await client.metadata.bulkUpdate("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
77
77
|
* data: {
|
|
78
|
-
* file_ids: ["
|
|
78
|
+
* file_ids: ["6aa84ef8-7f0a-431e-805e-a5e96345a176", "54916a83-698a-43f8-9f14-19fd99094474"],
|
|
79
79
|
* values: [{
|
|
80
|
-
* field_definition_id: "
|
|
80
|
+
* field_definition_id: "79e05ece-741a-4a20-b320-3a09c15673bb",
|
|
81
81
|
* value: [
|
|
82
82
|
* {
|
|
83
|
-
* "id": "
|
|
83
|
+
* "id": "95681686-3627-4b8c-9a7c-982e41dc8af6",
|
|
84
84
|
* "type": "user"
|
|
85
85
|
* },
|
|
86
86
|
* {
|
|
87
|
-
* "id": "
|
|
87
|
+
* "id": "8759b175-9d71-41af-8b52-0dc79db384ec",
|
|
88
88
|
* "type": "account_user_group"
|
|
89
89
|
* }
|
|
90
90
|
* ]
|
|
@@ -3,16 +3,16 @@ import * as Frameio from "../../../../index.js";
|
|
|
3
3
|
* @example
|
|
4
4
|
* {
|
|
5
5
|
* data: {
|
|
6
|
-
* file_ids: ["
|
|
6
|
+
* file_ids: ["6aa84ef8-7f0a-431e-805e-a5e96345a176", "54916a83-698a-43f8-9f14-19fd99094474"],
|
|
7
7
|
* values: [{
|
|
8
|
-
* field_definition_id: "
|
|
8
|
+
* field_definition_id: "79e05ece-741a-4a20-b320-3a09c15673bb",
|
|
9
9
|
* value: [
|
|
10
10
|
* {
|
|
11
|
-
* "id": "
|
|
11
|
+
* "id": "95681686-3627-4b8c-9a7c-982e41dc8af6",
|
|
12
12
|
* "type": "user"
|
|
13
13
|
* },
|
|
14
14
|
* {
|
|
15
|
-
* "id": "
|
|
15
|
+
* "id": "8759b175-9d71-41af-8b52-0dc79db384ec",
|
|
16
16
|
* "type": "account_user_group"
|
|
17
17
|
* }
|
|
18
18
|
* ]
|
|
@@ -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
|
*
|
|
@@ -80,88 +80,78 @@ class ProjectPermissions {
|
|
|
80
80
|
* include_total_count: false
|
|
81
81
|
* })
|
|
82
82
|
*/
|
|
83
|
-
index(
|
|
83
|
+
index(accountId, projectId, request = {}, requestOptions) {
|
|
84
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, projectId, request, requestOptions));
|
|
85
|
+
}
|
|
86
|
+
__index(accountId_1, projectId_1) {
|
|
84
87
|
return __awaiter(this, arguments, void 0, function* (accountId, projectId, request = {}, requestOptions) {
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
default:
|
|
131
|
-
throw new errors.FrameioError({
|
|
132
|
-
statusCode: _response.error.statusCode,
|
|
133
|
-
body: _response.error.body,
|
|
134
|
-
rawResponse: _response.rawResponse,
|
|
135
|
-
});
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
switch (_response.error.reason) {
|
|
139
|
-
case "non-json":
|
|
88
|
+
var _a, _b, _c;
|
|
89
|
+
const { include_deactivated: includeDeactivated, after, page_size: pageSize, include_total_count: includeTotalCount, } = request;
|
|
90
|
+
const _queryParams = {};
|
|
91
|
+
if (includeDeactivated != null) {
|
|
92
|
+
_queryParams["include_deactivated"] = includeDeactivated.toString();
|
|
93
|
+
}
|
|
94
|
+
if (after != null) {
|
|
95
|
+
_queryParams["after"] = after;
|
|
96
|
+
}
|
|
97
|
+
if (pageSize != null) {
|
|
98
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
99
|
+
}
|
|
100
|
+
if (includeTotalCount != null) {
|
|
101
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
102
|
+
}
|
|
103
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
104
|
+
const _response = yield core.fetcher({
|
|
105
|
+
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`),
|
|
106
|
+
method: "GET",
|
|
107
|
+
headers: _headers,
|
|
108
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
109
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
110
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
111
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
112
|
+
});
|
|
113
|
+
if (_response.ok) {
|
|
114
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
115
|
+
}
|
|
116
|
+
if (_response.error.reason === "status-code") {
|
|
117
|
+
switch (_response.error.statusCode) {
|
|
118
|
+
case 400:
|
|
119
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
120
|
+
case 401:
|
|
121
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
122
|
+
case 403:
|
|
123
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
124
|
+
case 404:
|
|
125
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
126
|
+
case 409:
|
|
127
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
128
|
+
case 422:
|
|
129
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
130
|
+
case 429:
|
|
131
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
132
|
+
default:
|
|
140
133
|
throw new errors.FrameioError({
|
|
141
134
|
statusCode: _response.error.statusCode,
|
|
142
|
-
body: _response.error.
|
|
143
|
-
rawResponse: _response.rawResponse,
|
|
144
|
-
});
|
|
145
|
-
case "timeout":
|
|
146
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/projects/{project_id}/users.");
|
|
147
|
-
case "unknown":
|
|
148
|
-
throw new errors.FrameioError({
|
|
149
|
-
message: _response.error.errorMessage,
|
|
135
|
+
body: _response.error.body,
|
|
150
136
|
rawResponse: _response.rawResponse,
|
|
151
137
|
});
|
|
152
138
|
}
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
139
|
+
}
|
|
140
|
+
switch (_response.error.reason) {
|
|
141
|
+
case "non-json":
|
|
142
|
+
throw new errors.FrameioError({
|
|
143
|
+
statusCode: _response.error.statusCode,
|
|
144
|
+
body: _response.error.rawBody,
|
|
145
|
+
rawResponse: _response.rawResponse,
|
|
146
|
+
});
|
|
147
|
+
case "timeout":
|
|
148
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/projects/{project_id}/users.");
|
|
149
|
+
case "unknown":
|
|
150
|
+
throw new errors.FrameioError({
|
|
151
|
+
message: _response.error.errorMessage,
|
|
152
|
+
rawResponse: _response.rawResponse,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
165
155
|
});
|
|
166
156
|
}
|
|
167
157
|
/**
|
|
@@ -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
|
*
|
|
@@ -332,91 +332,78 @@ class Projects {
|
|
|
332
332
|
* include_total_count: false
|
|
333
333
|
* })
|
|
334
334
|
*/
|
|
335
|
-
index(
|
|
335
|
+
index(accountId, workspaceId, request = {}, requestOptions) {
|
|
336
|
+
return core.HttpResponsePromise.fromPromise(this.__index(accountId, workspaceId, request, requestOptions));
|
|
337
|
+
}
|
|
338
|
+
__index(accountId_1, workspaceId_1) {
|
|
336
339
|
return __awaiter(this, arguments, void 0, function* (accountId, workspaceId, request = {}, requestOptions) {
|
|
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
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
383
|
-
case 429:
|
|
384
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
385
|
-
default:
|
|
386
|
-
throw new errors.FrameioError({
|
|
387
|
-
statusCode: _response.error.statusCode,
|
|
388
|
-
body: _response.error.body,
|
|
389
|
-
rawResponse: _response.rawResponse,
|
|
390
|
-
});
|
|
391
|
-
}
|
|
392
|
-
}
|
|
393
|
-
switch (_response.error.reason) {
|
|
394
|
-
case "non-json":
|
|
340
|
+
var _a, _b, _c;
|
|
341
|
+
const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
342
|
+
const _queryParams = {};
|
|
343
|
+
if (include != null) {
|
|
344
|
+
_queryParams["include"] = include;
|
|
345
|
+
}
|
|
346
|
+
if (after != null) {
|
|
347
|
+
_queryParams["after"] = after;
|
|
348
|
+
}
|
|
349
|
+
if (pageSize != null) {
|
|
350
|
+
_queryParams["page_size"] = pageSize.toString();
|
|
351
|
+
}
|
|
352
|
+
if (includeTotalCount != null) {
|
|
353
|
+
_queryParams["include_total_count"] = includeTotalCount.toString();
|
|
354
|
+
}
|
|
355
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)({ Authorization: yield this._getAuthorizationHeader() }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
356
|
+
const _response = yield core.fetcher({
|
|
357
|
+
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)}/workspaces/${encodeURIComponent(workspaceId)}/projects`),
|
|
358
|
+
method: "GET",
|
|
359
|
+
headers: _headers,
|
|
360
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
361
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
362
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
363
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
364
|
+
});
|
|
365
|
+
if (_response.ok) {
|
|
366
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
367
|
+
}
|
|
368
|
+
if (_response.error.reason === "status-code") {
|
|
369
|
+
switch (_response.error.statusCode) {
|
|
370
|
+
case 400:
|
|
371
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
372
|
+
case 401:
|
|
373
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
374
|
+
case 403:
|
|
375
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
376
|
+
case 404:
|
|
377
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
378
|
+
case 409:
|
|
379
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
380
|
+
case 422:
|
|
381
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
382
|
+
case 429:
|
|
383
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
384
|
+
default:
|
|
395
385
|
throw new errors.FrameioError({
|
|
396
386
|
statusCode: _response.error.statusCode,
|
|
397
|
-
body: _response.error.
|
|
398
|
-
rawResponse: _response.rawResponse,
|
|
399
|
-
});
|
|
400
|
-
case "timeout":
|
|
401
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces/{workspace_id}/projects.");
|
|
402
|
-
case "unknown":
|
|
403
|
-
throw new errors.FrameioError({
|
|
404
|
-
message: _response.error.errorMessage,
|
|
387
|
+
body: _response.error.body,
|
|
405
388
|
rawResponse: _response.rawResponse,
|
|
406
389
|
});
|
|
407
390
|
}
|
|
408
|
-
}
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
391
|
+
}
|
|
392
|
+
switch (_response.error.reason) {
|
|
393
|
+
case "non-json":
|
|
394
|
+
throw new errors.FrameioError({
|
|
395
|
+
statusCode: _response.error.statusCode,
|
|
396
|
+
body: _response.error.rawBody,
|
|
397
|
+
rawResponse: _response.rawResponse,
|
|
398
|
+
});
|
|
399
|
+
case "timeout":
|
|
400
|
+
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/workspaces/{workspace_id}/projects.");
|
|
401
|
+
case "unknown":
|
|
402
|
+
throw new errors.FrameioError({
|
|
403
|
+
message: _response.error.errorMessage,
|
|
404
|
+
rawResponse: _response.rawResponse,
|
|
405
|
+
});
|
|
406
|
+
}
|
|
420
407
|
});
|
|
421
408
|
}
|
|
422
409
|
/**
|
|
@@ -91,7 +91,7 @@ export declare class Shares {
|
|
|
91
91
|
* access: "public",
|
|
92
92
|
* description: "A descriptive summary of the share",
|
|
93
93
|
* downloading_enabled: true,
|
|
94
|
-
* expiration: "2026-01-
|
|
94
|
+
* expiration: "2026-01-29T19:41:37Z",
|
|
95
95
|
* name: "Share Name",
|
|
96
96
|
* passphrase: "as!dfj39sd(*"
|
|
97
97
|
* }
|
|
@@ -122,7 +122,8 @@ export declare class Shares {
|
|
|
122
122
|
* include_total_count: false
|
|
123
123
|
* })
|
|
124
124
|
*/
|
|
125
|
-
listReviewers(accountId: Frameio.Uuid, shareId: Frameio.Uuid, request?: Frameio.SharesListReviewersRequest, requestOptions?: Shares.RequestOptions):
|
|
125
|
+
listReviewers(accountId: Frameio.Uuid, shareId: Frameio.Uuid, request?: Frameio.SharesListReviewersRequest, requestOptions?: Shares.RequestOptions): core.HttpResponsePromise<Frameio.ShareReviewersResponse>;
|
|
126
|
+
private __listReviewers;
|
|
126
127
|
/**
|
|
127
128
|
* Add reviewers to secure share by three identifier types: `adobe_user_id`, `email`, and `user_id`.
|
|
128
129
|
* <br>
|
|
@@ -226,7 +227,7 @@ export declare class Shares {
|
|
|
226
227
|
* @example
|
|
227
228
|
* await client.shares.addAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
228
229
|
* data: {
|
|
229
|
-
* asset_id: "
|
|
230
|
+
* asset_id: "26a44993-9abd-49bb-8e39-2f44b4a72f62"
|
|
230
231
|
* }
|
|
231
232
|
* })
|
|
232
233
|
*/
|
|
@@ -255,7 +256,8 @@ export declare class Shares {
|
|
|
255
256
|
* include_total_count: false
|
|
256
257
|
* })
|
|
257
258
|
*/
|
|
258
|
-
index(accountId: Frameio.Uuid, projectId: Frameio.Uuid, request?: Frameio.SharesIndexRequest, requestOptions?: Shares.RequestOptions):
|
|
259
|
+
index(accountId: Frameio.Uuid, projectId: Frameio.Uuid, request?: Frameio.SharesIndexRequest, requestOptions?: Shares.RequestOptions): core.HttpResponsePromise<Frameio.SharesResponse>;
|
|
260
|
+
private __index;
|
|
259
261
|
/**
|
|
260
262
|
* Create share. <br>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
261
263
|
*
|
|
@@ -277,9 +279,9 @@ export declare class Shares {
|
|
|
277
279
|
* data: {
|
|
278
280
|
* type: "asset",
|
|
279
281
|
* access: "public",
|
|
280
|
-
* asset_ids: ["
|
|
282
|
+
* asset_ids: ["b68f4112-23fe-475e-9927-c0405331266b", "888a368c-06b2-47f8-b3b1-09ce71d37e6b"],
|
|
281
283
|
* downloading_enabled: true,
|
|
282
|
-
* expiration: "2026-01-
|
|
284
|
+
* expiration: "2026-01-29T19:41:37Z",
|
|
283
285
|
* name: "Share Name",
|
|
284
286
|
* passphrase: "as!dfj39sd(*"
|
|
285
287
|
* }
|