frameio 4.1.1 → 4.2.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/BaseClient.js +2 -2
- package/dist/cjs/Client.d.ts +6 -0
- package/dist/cjs/Client.js +34 -24
- package/dist/cjs/api/resources/customActions/client/Client.d.ts +145 -0
- package/dist/cjs/api/resources/customActions/client/Client.js +443 -0
- package/dist/cjs/api/resources/customActions/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/customActions/client/index.js +17 -0
- package/dist/cjs/api/resources/customActions/client/requests/ActionCreateParams.d.ts +31 -0
- package/dist/cjs/api/resources/customActions/client/requests/ActionCreateParams.js +3 -0
- package/dist/cjs/api/resources/customActions/client/requests/ActionUpdateParams.d.ts +35 -0
- package/dist/cjs/api/resources/customActions/client/requests/ActionUpdateParams.js +3 -0
- package/dist/cjs/api/resources/customActions/client/requests/ActionsIndexRequest.d.ts +21 -0
- package/dist/cjs/api/resources/customActions/client/requests/ActionsIndexRequest.js +3 -0
- package/dist/cjs/api/resources/customActions/client/requests/ActionsShowRequest.d.ts +9 -0
- package/dist/cjs/api/resources/customActions/client/requests/ActionsShowRequest.js +3 -0
- package/dist/cjs/api/resources/customActions/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/customActions/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/customActions/exports.d.ts +2 -0
- package/dist/cjs/api/resources/customActions/exports.js +21 -0
- package/dist/cjs/api/resources/customActions/index.d.ts +1 -0
- package/dist/cjs/api/resources/customActions/index.js +17 -0
- package/dist/cjs/api/resources/files/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/files/client/Client.js +1 -1
- package/dist/cjs/api/resources/groups/client/Client.d.ts +116 -0
- package/dist/cjs/api/resources/groups/client/Client.js +368 -0
- package/dist/cjs/api/resources/groups/client/index.d.ts +1 -0
- package/dist/cjs/api/resources/groups/client/index.js +17 -0
- package/dist/cjs/api/resources/groups/client/requests/CreateGroupParams.d.ts +20 -0
- package/dist/cjs/api/resources/groups/client/requests/CreateGroupParams.js +3 -0
- package/dist/cjs/api/resources/groups/client/requests/GroupsIndexRequest.d.ts +24 -0
- package/dist/cjs/api/resources/groups/client/requests/GroupsIndexRequest.js +3 -0
- package/dist/cjs/api/resources/groups/client/requests/GroupsShowRequest.d.ts +9 -0
- package/dist/cjs/api/resources/groups/client/requests/GroupsShowRequest.js +3 -0
- package/dist/cjs/api/resources/groups/client/requests/UpdateGroupParams.d.ts +20 -0
- package/dist/cjs/api/resources/groups/client/requests/UpdateGroupParams.js +3 -0
- package/dist/cjs/api/resources/groups/client/requests/index.d.ts +4 -0
- package/dist/cjs/api/resources/groups/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/groups/exports.d.ts +2 -0
- package/dist/cjs/api/resources/groups/exports.js +21 -0
- package/dist/cjs/api/resources/groups/index.d.ts +2 -0
- package/dist/cjs/api/resources/groups/index.js +18 -0
- package/dist/cjs/api/resources/groups/types/GroupsIndexRequestSort.d.ts +10 -0
- package/dist/cjs/api/resources/groups/types/GroupsIndexRequestSort.js +13 -0
- package/dist/cjs/api/resources/groups/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/groups/types/index.js +17 -0
- package/dist/cjs/api/resources/index.d.ts +5 -0
- package/dist/cjs/api/resources/index.js +6 -1
- 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/shares/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/shares/client/Client.js +4 -4
- 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 +1 -1
- package/dist/cjs/api/resources/versionStacks/client/Client.js +1 -1
- package/dist/cjs/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.ts +1 -1
- package/dist/cjs/api/types/Action.d.ts +25 -0
- package/dist/cjs/api/types/Action.js +3 -0
- package/dist/cjs/api/types/ActionCreateResponse.d.ts +13 -0
- package/dist/cjs/api/types/ActionCreateResponse.js +3 -0
- package/dist/cjs/api/types/ActionInclude.d.ts +4 -0
- package/dist/cjs/api/types/ActionInclude.js +3 -0
- package/dist/cjs/api/types/ActionResponse.d.ts +7 -0
- package/dist/cjs/api/types/ActionResponse.js +3 -0
- package/dist/cjs/api/types/ActionWithIncludes.d.ts +4 -0
- package/dist/cjs/api/types/ActionWithIncludes.js +3 -0
- package/dist/cjs/api/types/ActionWithIncludesResponse.d.ts +7 -0
- package/dist/cjs/api/types/ActionWithIncludesResponse.js +3 -0
- package/dist/cjs/api/types/ActionsWithIncludesResponse.d.ts +11 -0
- package/dist/cjs/api/types/ActionsWithIncludesResponse.js +3 -0
- package/dist/cjs/api/types/AuditLogwithIncludes.d.ts +3 -0
- package/dist/cjs/api/types/AuditLogwithIncludes.js +3 -0
- package/dist/cjs/api/types/Filters.d.ts +3 -0
- package/dist/cjs/api/types/Filters.js +3 -0
- package/dist/cjs/api/types/GroupCommon.d.ts +16 -0
- package/dist/cjs/api/types/GroupCommon.js +3 -0
- package/dist/cjs/api/types/GroupCommonWithIncludes.d.ts +4 -0
- package/dist/cjs/api/types/GroupCommonWithIncludes.js +3 -0
- package/dist/cjs/api/types/GroupResponse.d.ts +4 -0
- package/dist/cjs/api/types/GroupResponse.js +3 -0
- package/dist/cjs/api/types/GroupWithIncludes.d.ts +13 -0
- package/dist/cjs/api/types/GroupWithIncludes.js +3 -0
- package/dist/cjs/api/types/GroupWithIncludesResponse.d.ts +4 -0
- package/dist/cjs/api/types/GroupWithIncludesResponse.js +3 -0
- package/dist/cjs/api/types/GroupsInclude.d.ts +4 -0
- package/dist/cjs/api/types/GroupsInclude.js +3 -0
- package/dist/cjs/api/types/GroupsSort.d.ts +10 -0
- package/dist/cjs/api/types/GroupsSort.js +13 -0
- package/dist/cjs/api/types/GroupsWithIncludesResponse.d.ts +8 -0
- package/dist/cjs/api/types/GroupsWithIncludesResponse.js +3 -0
- package/dist/cjs/api/types/SingleUserValue.d.ts +1 -1
- package/dist/cjs/api/types/SyncGroupWithIncludes.d.ts +15 -0
- package/dist/cjs/api/types/SyncGroupWithIncludes.js +14 -0
- package/dist/cjs/api/types/index.d.ts +16 -0
- package/dist/cjs/api/types/index.js +16 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.mjs +2 -2
- package/dist/esm/Client.d.mts +6 -0
- package/dist/esm/Client.mjs +10 -0
- package/dist/esm/api/resources/customActions/client/Client.d.mts +145 -0
- package/dist/esm/api/resources/customActions/client/Client.mjs +406 -0
- package/dist/esm/api/resources/customActions/client/index.d.mts +1 -0
- package/dist/esm/api/resources/customActions/client/index.mjs +1 -0
- package/dist/esm/api/resources/customActions/client/requests/ActionCreateParams.d.mts +31 -0
- package/dist/esm/api/resources/customActions/client/requests/ActionCreateParams.mjs +2 -0
- package/dist/esm/api/resources/customActions/client/requests/ActionUpdateParams.d.mts +35 -0
- package/dist/esm/api/resources/customActions/client/requests/ActionUpdateParams.mjs +2 -0
- package/dist/esm/api/resources/customActions/client/requests/ActionsIndexRequest.d.mts +21 -0
- package/dist/esm/api/resources/customActions/client/requests/ActionsIndexRequest.mjs +2 -0
- package/dist/esm/api/resources/customActions/client/requests/ActionsShowRequest.d.mts +9 -0
- package/dist/esm/api/resources/customActions/client/requests/ActionsShowRequest.mjs +2 -0
- package/dist/esm/api/resources/customActions/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/customActions/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/customActions/exports.d.mts +2 -0
- package/dist/esm/api/resources/customActions/exports.mjs +3 -0
- package/dist/esm/api/resources/customActions/index.d.mts +1 -0
- package/dist/esm/api/resources/customActions/index.mjs +1 -0
- package/dist/esm/api/resources/files/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/files/client/Client.mjs +1 -1
- package/dist/esm/api/resources/groups/client/Client.d.mts +116 -0
- package/dist/esm/api/resources/groups/client/Client.mjs +331 -0
- package/dist/esm/api/resources/groups/client/index.d.mts +1 -0
- package/dist/esm/api/resources/groups/client/index.mjs +1 -0
- package/dist/esm/api/resources/groups/client/requests/CreateGroupParams.d.mts +20 -0
- package/dist/esm/api/resources/groups/client/requests/CreateGroupParams.mjs +2 -0
- package/dist/esm/api/resources/groups/client/requests/GroupsIndexRequest.d.mts +24 -0
- package/dist/esm/api/resources/groups/client/requests/GroupsIndexRequest.mjs +2 -0
- package/dist/esm/api/resources/groups/client/requests/GroupsShowRequest.d.mts +9 -0
- package/dist/esm/api/resources/groups/client/requests/GroupsShowRequest.mjs +2 -0
- package/dist/esm/api/resources/groups/client/requests/UpdateGroupParams.d.mts +20 -0
- package/dist/esm/api/resources/groups/client/requests/UpdateGroupParams.mjs +2 -0
- package/dist/esm/api/resources/groups/client/requests/index.d.mts +4 -0
- package/dist/esm/api/resources/groups/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/groups/exports.d.mts +2 -0
- package/dist/esm/api/resources/groups/exports.mjs +3 -0
- package/dist/esm/api/resources/groups/index.d.mts +2 -0
- package/dist/esm/api/resources/groups/index.mjs +2 -0
- package/dist/esm/api/resources/groups/types/GroupsIndexRequestSort.d.mts +10 -0
- package/dist/esm/api/resources/groups/types/GroupsIndexRequestSort.mjs +10 -0
- package/dist/esm/api/resources/groups/types/index.d.mts +1 -0
- package/dist/esm/api/resources/groups/types/index.mjs +1 -0
- package/dist/esm/api/resources/index.d.mts +5 -0
- package/dist/esm/api/resources/index.mjs +5 -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/shares/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/shares/client/Client.mjs +4 -4
- 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 +1 -1
- package/dist/esm/api/resources/versionStacks/client/Client.mjs +1 -1
- package/dist/esm/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.mts +1 -1
- package/dist/esm/api/types/Action.d.mts +25 -0
- package/dist/esm/api/types/Action.mjs +2 -0
- package/dist/esm/api/types/ActionCreateResponse.d.mts +13 -0
- package/dist/esm/api/types/ActionCreateResponse.mjs +2 -0
- package/dist/esm/api/types/ActionInclude.d.mts +4 -0
- package/dist/esm/api/types/ActionInclude.mjs +2 -0
- package/dist/esm/api/types/ActionResponse.d.mts +7 -0
- package/dist/esm/api/types/ActionResponse.mjs +2 -0
- package/dist/esm/api/types/ActionWithIncludes.d.mts +4 -0
- package/dist/esm/api/types/ActionWithIncludes.mjs +2 -0
- package/dist/esm/api/types/ActionWithIncludesResponse.d.mts +7 -0
- package/dist/esm/api/types/ActionWithIncludesResponse.mjs +2 -0
- package/dist/esm/api/types/ActionsWithIncludesResponse.d.mts +11 -0
- package/dist/esm/api/types/ActionsWithIncludesResponse.mjs +2 -0
- package/dist/esm/api/types/AuditLogwithIncludes.d.mts +3 -0
- package/dist/esm/api/types/AuditLogwithIncludes.mjs +3 -0
- package/dist/esm/api/types/Filters.d.mts +3 -0
- package/dist/esm/api/types/Filters.mjs +3 -0
- package/dist/esm/api/types/GroupCommon.d.mts +16 -0
- package/dist/esm/api/types/GroupCommon.mjs +2 -0
- package/dist/esm/api/types/GroupCommonWithIncludes.d.mts +4 -0
- package/dist/esm/api/types/GroupCommonWithIncludes.mjs +2 -0
- package/dist/esm/api/types/GroupResponse.d.mts +4 -0
- package/dist/esm/api/types/GroupResponse.mjs +2 -0
- package/dist/esm/api/types/GroupWithIncludes.d.mts +13 -0
- package/dist/esm/api/types/GroupWithIncludes.mjs +2 -0
- package/dist/esm/api/types/GroupWithIncludesResponse.d.mts +4 -0
- package/dist/esm/api/types/GroupWithIncludesResponse.mjs +2 -0
- package/dist/esm/api/types/GroupsInclude.d.mts +4 -0
- package/dist/esm/api/types/GroupsInclude.mjs +2 -0
- package/dist/esm/api/types/GroupsSort.d.mts +10 -0
- package/dist/esm/api/types/GroupsSort.mjs +10 -0
- package/dist/esm/api/types/GroupsWithIncludesResponse.d.mts +8 -0
- package/dist/esm/api/types/GroupsWithIncludesResponse.mjs +2 -0
- package/dist/esm/api/types/SingleUserValue.d.mts +1 -1
- package/dist/esm/api/types/SyncGroupWithIncludes.d.mts +15 -0
- package/dist/esm/api/types/SyncGroupWithIncludes.mjs +11 -0
- package/dist/esm/api/types/index.d.mts +16 -0
- package/dist/esm/api/types/index.mjs +16 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +23 -1
- package/reference.md +1318 -586
|
@@ -0,0 +1,406 @@
|
|
|
1
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
2
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
+
});
|
|
10
|
+
};
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
13
|
+
import * as core from "../../../../core/index.mjs";
|
|
14
|
+
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
16
|
+
import * as errors from "../../../../errors/index.mjs";
|
|
17
|
+
import * as Frameio from "../../../index.mjs";
|
|
18
|
+
/**
|
|
19
|
+
* Manage Custom Actions and related operations.
|
|
20
|
+
*/
|
|
21
|
+
export class CustomActionsClient {
|
|
22
|
+
constructor(options) {
|
|
23
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Show custom action details. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
27
|
+
*
|
|
28
|
+
* @param {Frameio.Uuid} account_id
|
|
29
|
+
* @param {Frameio.Uuid} action_id
|
|
30
|
+
* @param {Frameio.ActionsShowRequest} request
|
|
31
|
+
* @param {CustomActionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
32
|
+
*
|
|
33
|
+
* @throws {@link Frameio.BadRequestError}
|
|
34
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
35
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
36
|
+
* @throws {@link Frameio.NotFoundError}
|
|
37
|
+
* @throws {@link Frameio.ConflictError}
|
|
38
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
39
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
40
|
+
*
|
|
41
|
+
* @example
|
|
42
|
+
* await client.customActions.actionsShow("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
43
|
+
* include: "creator"
|
|
44
|
+
* })
|
|
45
|
+
*/
|
|
46
|
+
actionsShow(account_id, action_id, request = {}, requestOptions) {
|
|
47
|
+
return core.HttpResponsePromise.fromPromise(this.__actionsShow(account_id, action_id, request, requestOptions));
|
|
48
|
+
}
|
|
49
|
+
__actionsShow(account_id_1, action_id_1) {
|
|
50
|
+
return __awaiter(this, arguments, void 0, function* (account_id, action_id, request = {}, requestOptions) {
|
|
51
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
52
|
+
const { include } = request;
|
|
53
|
+
const _queryParams = {
|
|
54
|
+
include: include != null ? include : undefined,
|
|
55
|
+
};
|
|
56
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
57
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
58
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
59
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/actions/${core.url.encodePathParam(action_id)}`),
|
|
60
|
+
method: "GET",
|
|
61
|
+
headers: _headers,
|
|
62
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
63
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
64
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
65
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
66
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
67
|
+
logging: this._options.logging,
|
|
68
|
+
});
|
|
69
|
+
if (_response.ok) {
|
|
70
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
71
|
+
}
|
|
72
|
+
if (_response.error.reason === "status-code") {
|
|
73
|
+
switch (_response.error.statusCode) {
|
|
74
|
+
case 400:
|
|
75
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
76
|
+
case 401:
|
|
77
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
78
|
+
case 403:
|
|
79
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
80
|
+
case 404:
|
|
81
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
82
|
+
case 409:
|
|
83
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
84
|
+
case 422:
|
|
85
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
86
|
+
case 429:
|
|
87
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
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
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/actions/{action_id}");
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
/**
|
|
100
|
+
* Delete a custom action. <br/>Rate Limits: 60 calls per 1.00 minute(s) per account_user
|
|
101
|
+
*
|
|
102
|
+
* @param {Frameio.Uuid} account_id
|
|
103
|
+
* @param {Frameio.Uuid} action_id
|
|
104
|
+
* @param {CustomActionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
105
|
+
*
|
|
106
|
+
* @throws {@link Frameio.BadRequestError}
|
|
107
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
108
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
109
|
+
* @throws {@link Frameio.NotFoundError}
|
|
110
|
+
* @throws {@link Frameio.ConflictError}
|
|
111
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
112
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
113
|
+
*
|
|
114
|
+
* @example
|
|
115
|
+
* await client.customActions.actionsDelete("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
|
|
116
|
+
*/
|
|
117
|
+
actionsDelete(account_id, action_id, requestOptions) {
|
|
118
|
+
return core.HttpResponsePromise.fromPromise(this.__actionsDelete(account_id, action_id, requestOptions));
|
|
119
|
+
}
|
|
120
|
+
__actionsDelete(account_id, action_id, requestOptions) {
|
|
121
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
122
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
123
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
124
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
125
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
126
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/actions/${core.url.encodePathParam(action_id)}`),
|
|
127
|
+
method: "DELETE",
|
|
128
|
+
headers: _headers,
|
|
129
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
130
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
131
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
132
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
133
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
134
|
+
logging: this._options.logging,
|
|
135
|
+
});
|
|
136
|
+
if (_response.ok) {
|
|
137
|
+
return { data: undefined, rawResponse: _response.rawResponse };
|
|
138
|
+
}
|
|
139
|
+
if (_response.error.reason === "status-code") {
|
|
140
|
+
switch (_response.error.statusCode) {
|
|
141
|
+
case 400:
|
|
142
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
143
|
+
case 401:
|
|
144
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
145
|
+
case 403:
|
|
146
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
147
|
+
case 404:
|
|
148
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
149
|
+
case 409:
|
|
150
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
151
|
+
case 422:
|
|
152
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
153
|
+
case 429:
|
|
154
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
155
|
+
default:
|
|
156
|
+
throw new errors.FrameioError({
|
|
157
|
+
statusCode: _response.error.statusCode,
|
|
158
|
+
body: _response.error.body,
|
|
159
|
+
rawResponse: _response.rawResponse,
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/actions/{action_id}");
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* Update custom action details. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
168
|
+
*
|
|
169
|
+
* @param {Frameio.Uuid} account_id
|
|
170
|
+
* @param {Frameio.Uuid} action_id
|
|
171
|
+
* @param {Frameio.ActionUpdateParams} request
|
|
172
|
+
* @param {CustomActionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
173
|
+
*
|
|
174
|
+
* @throws {@link Frameio.BadRequestError}
|
|
175
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
176
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
177
|
+
* @throws {@link Frameio.NotFoundError}
|
|
178
|
+
* @throws {@link Frameio.ConflictError}
|
|
179
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
180
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
181
|
+
*
|
|
182
|
+
* @example
|
|
183
|
+
* await client.customActions.actionsUpdate("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
184
|
+
* data: {
|
|
185
|
+
* active: true,
|
|
186
|
+
* description: "customizing our workflow",
|
|
187
|
+
* event: "my.event",
|
|
188
|
+
* multi_asset: true,
|
|
189
|
+
* name: "First Custom Action",
|
|
190
|
+
* timeout: 7,
|
|
191
|
+
* url: "https://example.com/custom-action"
|
|
192
|
+
* }
|
|
193
|
+
* })
|
|
194
|
+
*/
|
|
195
|
+
actionsUpdate(account_id, action_id, request, requestOptions) {
|
|
196
|
+
return core.HttpResponsePromise.fromPromise(this.__actionsUpdate(account_id, action_id, request, requestOptions));
|
|
197
|
+
}
|
|
198
|
+
__actionsUpdate(account_id, action_id, request, requestOptions) {
|
|
199
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
200
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
201
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
202
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
203
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
204
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/actions/${core.url.encodePathParam(action_id)}`),
|
|
205
|
+
method: "PATCH",
|
|
206
|
+
headers: _headers,
|
|
207
|
+
contentType: "application/json",
|
|
208
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
209
|
+
requestType: "json",
|
|
210
|
+
body: request,
|
|
211
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
212
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
213
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
214
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
215
|
+
logging: this._options.logging,
|
|
216
|
+
});
|
|
217
|
+
if (_response.ok) {
|
|
218
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
219
|
+
}
|
|
220
|
+
if (_response.error.reason === "status-code") {
|
|
221
|
+
switch (_response.error.statusCode) {
|
|
222
|
+
case 400:
|
|
223
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
224
|
+
case 401:
|
|
225
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
226
|
+
case 403:
|
|
227
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
228
|
+
case 404:
|
|
229
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
230
|
+
case 409:
|
|
231
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
232
|
+
case 422:
|
|
233
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
234
|
+
case 429:
|
|
235
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
236
|
+
default:
|
|
237
|
+
throw new errors.FrameioError({
|
|
238
|
+
statusCode: _response.error.statusCode,
|
|
239
|
+
body: _response.error.body,
|
|
240
|
+
rawResponse: _response.rawResponse,
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
}
|
|
244
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/v4/accounts/{account_id}/actions/{action_id}");
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
/**
|
|
248
|
+
* List actions in a given workspace. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
249
|
+
*
|
|
250
|
+
* @param {Frameio.Uuid} account_id
|
|
251
|
+
* @param {Frameio.Uuid} workspace_id
|
|
252
|
+
* @param {Frameio.ActionsIndexRequest} request
|
|
253
|
+
* @param {CustomActionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
254
|
+
*
|
|
255
|
+
* @throws {@link Frameio.BadRequestError}
|
|
256
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
257
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
258
|
+
* @throws {@link Frameio.NotFoundError}
|
|
259
|
+
* @throws {@link Frameio.ConflictError}
|
|
260
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
261
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
262
|
+
*
|
|
263
|
+
* @example
|
|
264
|
+
* await client.customActions.actionsIndex("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
265
|
+
* include: "creator",
|
|
266
|
+
* after: "<opaque_cursor>",
|
|
267
|
+
* page_size: 10,
|
|
268
|
+
* include_total_count: false
|
|
269
|
+
* })
|
|
270
|
+
*/
|
|
271
|
+
actionsIndex(account_id, workspace_id, request = {}, requestOptions) {
|
|
272
|
+
return core.HttpResponsePromise.fromPromise(this.__actionsIndex(account_id, workspace_id, request, requestOptions));
|
|
273
|
+
}
|
|
274
|
+
__actionsIndex(account_id_1, workspace_id_1) {
|
|
275
|
+
return __awaiter(this, arguments, void 0, function* (account_id, workspace_id, request = {}, requestOptions) {
|
|
276
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
277
|
+
const { include, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
278
|
+
const _queryParams = {
|
|
279
|
+
include: include != null ? include : undefined,
|
|
280
|
+
after,
|
|
281
|
+
page_size: pageSize,
|
|
282
|
+
include_total_count: includeTotalCount,
|
|
283
|
+
};
|
|
284
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
285
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
286
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
287
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/workspaces/${core.url.encodePathParam(workspace_id)}/actions`),
|
|
288
|
+
method: "GET",
|
|
289
|
+
headers: _headers,
|
|
290
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
291
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
292
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
293
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
294
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
295
|
+
logging: this._options.logging,
|
|
296
|
+
});
|
|
297
|
+
if (_response.ok) {
|
|
298
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
299
|
+
}
|
|
300
|
+
if (_response.error.reason === "status-code") {
|
|
301
|
+
switch (_response.error.statusCode) {
|
|
302
|
+
case 400:
|
|
303
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
304
|
+
case 401:
|
|
305
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
306
|
+
case 403:
|
|
307
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
308
|
+
case 404:
|
|
309
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
310
|
+
case 409:
|
|
311
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
312
|
+
case 422:
|
|
313
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
314
|
+
case 429:
|
|
315
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
316
|
+
default:
|
|
317
|
+
throw new errors.FrameioError({
|
|
318
|
+
statusCode: _response.error.statusCode,
|
|
319
|
+
body: _response.error.body,
|
|
320
|
+
rawResponse: _response.rawResponse,
|
|
321
|
+
});
|
|
322
|
+
}
|
|
323
|
+
}
|
|
324
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/workspaces/{workspace_id}/actions");
|
|
325
|
+
});
|
|
326
|
+
}
|
|
327
|
+
/**
|
|
328
|
+
* Create a custom action in a workspace. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
329
|
+
*
|
|
330
|
+
* @param {Frameio.Uuid} account_id
|
|
331
|
+
* @param {Frameio.Uuid} workspace_id
|
|
332
|
+
* @param {Frameio.ActionCreateParams} request
|
|
333
|
+
* @param {CustomActionsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
334
|
+
*
|
|
335
|
+
* @throws {@link Frameio.BadRequestError}
|
|
336
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
337
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
338
|
+
* @throws {@link Frameio.NotFoundError}
|
|
339
|
+
* @throws {@link Frameio.ConflictError}
|
|
340
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
341
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
342
|
+
*
|
|
343
|
+
* @example
|
|
344
|
+
* await client.customActions.actionsCreate("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
345
|
+
* data: {
|
|
346
|
+
* description: "customizing our workflow",
|
|
347
|
+
* event: "my.event",
|
|
348
|
+
* name: "First Custom Action",
|
|
349
|
+
* timeout: 7,
|
|
350
|
+
* url: "https://example.com/custom-action"
|
|
351
|
+
* }
|
|
352
|
+
* })
|
|
353
|
+
*/
|
|
354
|
+
actionsCreate(account_id, workspace_id, request, requestOptions) {
|
|
355
|
+
return core.HttpResponsePromise.fromPromise(this.__actionsCreate(account_id, workspace_id, request, requestOptions));
|
|
356
|
+
}
|
|
357
|
+
__actionsCreate(account_id, workspace_id, request, requestOptions) {
|
|
358
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
359
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
360
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
361
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders({ "user-agent": (_b = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.userAgent) !== null && _b !== void 0 ? _b : "frameio-ts" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
362
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
363
|
+
url: core.url.join((_e = (_d = (yield core.Supplier.get(this._options.baseUrl))) !== null && _d !== void 0 ? _d : (yield core.Supplier.get(this._options.environment))) !== null && _e !== void 0 ? _e : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/workspaces/${core.url.encodePathParam(workspace_id)}/actions`),
|
|
364
|
+
method: "POST",
|
|
365
|
+
headers: _headers,
|
|
366
|
+
contentType: "application/json",
|
|
367
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
368
|
+
requestType: "json",
|
|
369
|
+
body: request,
|
|
370
|
+
timeoutMs: ((_h = (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.timeoutInSeconds) !== null && _h !== void 0 ? _h : 60) * 1000,
|
|
371
|
+
maxRetries: (_j = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _j !== void 0 ? _j : (_k = this._options) === null || _k === void 0 ? void 0 : _k.maxRetries,
|
|
372
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
373
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
374
|
+
logging: this._options.logging,
|
|
375
|
+
});
|
|
376
|
+
if (_response.ok) {
|
|
377
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
378
|
+
}
|
|
379
|
+
if (_response.error.reason === "status-code") {
|
|
380
|
+
switch (_response.error.statusCode) {
|
|
381
|
+
case 400:
|
|
382
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
383
|
+
case 401:
|
|
384
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
385
|
+
case 403:
|
|
386
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
387
|
+
case 404:
|
|
388
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
389
|
+
case 409:
|
|
390
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
391
|
+
case 422:
|
|
392
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
393
|
+
case 429:
|
|
394
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
395
|
+
default:
|
|
396
|
+
throw new errors.FrameioError({
|
|
397
|
+
statusCode: _response.error.statusCode,
|
|
398
|
+
body: _response.error.body,
|
|
399
|
+
rawResponse: _response.rawResponse,
|
|
400
|
+
});
|
|
401
|
+
}
|
|
402
|
+
}
|
|
403
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/workspaces/{workspace_id}/actions");
|
|
404
|
+
});
|
|
405
|
+
}
|
|
406
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.mjs";
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* data: {
|
|
5
|
+
* description: "customizing our workflow",
|
|
6
|
+
* event: "my.event",
|
|
7
|
+
* name: "First Custom Action",
|
|
8
|
+
* timeout: 7,
|
|
9
|
+
* url: "https://example.com/custom-action"
|
|
10
|
+
* }
|
|
11
|
+
* }
|
|
12
|
+
*/
|
|
13
|
+
export interface ActionCreateParams {
|
|
14
|
+
data: ActionCreateParams.Data;
|
|
15
|
+
}
|
|
16
|
+
export declare namespace ActionCreateParams {
|
|
17
|
+
interface Data {
|
|
18
|
+
/** Action description */
|
|
19
|
+
description: string;
|
|
20
|
+
/** Event name sent to `url` */
|
|
21
|
+
event: string;
|
|
22
|
+
/** Manages action trigger on multiple assets */
|
|
23
|
+
multi_asset?: boolean | undefined;
|
|
24
|
+
/** Action name */
|
|
25
|
+
name: string;
|
|
26
|
+
/** Timeout for the action requests in seconds */
|
|
27
|
+
timeout?: number | undefined;
|
|
28
|
+
/** URL where `event` is sent */
|
|
29
|
+
url: string;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* data: {
|
|
5
|
+
* active: true,
|
|
6
|
+
* description: "customizing our workflow",
|
|
7
|
+
* event: "my.event",
|
|
8
|
+
* multi_asset: true,
|
|
9
|
+
* name: "First Custom Action",
|
|
10
|
+
* timeout: 7,
|
|
11
|
+
* url: "https://example.com/custom-action"
|
|
12
|
+
* }
|
|
13
|
+
* }
|
|
14
|
+
*/
|
|
15
|
+
export interface ActionUpdateParams {
|
|
16
|
+
data: ActionUpdateParams.Data;
|
|
17
|
+
}
|
|
18
|
+
export declare namespace ActionUpdateParams {
|
|
19
|
+
interface Data {
|
|
20
|
+
/** Active Status */
|
|
21
|
+
active?: boolean | undefined;
|
|
22
|
+
/** Action description */
|
|
23
|
+
description?: string | undefined;
|
|
24
|
+
/** Event name sent to `url` */
|
|
25
|
+
event?: string | undefined;
|
|
26
|
+
/** Manages action trigger on multiple assets */
|
|
27
|
+
multi_asset?: boolean | undefined;
|
|
28
|
+
/** Action name */
|
|
29
|
+
name?: string | undefined;
|
|
30
|
+
/** Timeout for the action requests in seconds */
|
|
31
|
+
timeout?: number | undefined;
|
|
32
|
+
/** URL where `event` is sent */
|
|
33
|
+
url?: string | undefined;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type * as Frameio from "../../../../index.mjs";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* include: "creator",
|
|
6
|
+
* after: "<opaque_cursor>",
|
|
7
|
+
* page_size: 10,
|
|
8
|
+
* include_total_count: false
|
|
9
|
+
* }
|
|
10
|
+
*/
|
|
11
|
+
export interface ActionsIndexRequest {
|
|
12
|
+
include?: "creator";
|
|
13
|
+
/**
|
|
14
|
+
* Opaque Cursor query param for requests returning paginated results.
|
|
15
|
+
* <br/>
|
|
16
|
+
* NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.
|
|
17
|
+
*/
|
|
18
|
+
after?: Frameio.RequestAfterOpaqueCursor | undefined;
|
|
19
|
+
page_size?: Frameio.RequestPageSize;
|
|
20
|
+
include_total_count?: Frameio.IncludeTotalCount;
|
|
21
|
+
}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
export type { ActionCreateParams } from "./ActionCreateParams.mjs";
|
|
2
|
+
export type { ActionsIndexRequest } from "./ActionsIndexRequest.mjs";
|
|
3
|
+
export type { ActionsShowRequest } from "./ActionsShowRequest.mjs";
|
|
4
|
+
export type { ActionUpdateParams } from "./ActionUpdateParams.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.mjs";
|
|
@@ -82,7 +82,7 @@ export declare class FilesClient {
|
|
|
82
82
|
* `media_links.video_h264_180` on a static image file) or transoding process hasn't completed
|
|
83
83
|
* (i.e. the file's `status` is "uploaded" rather than "transcoded"), then the link will also be set to null in
|
|
84
84
|
* the response payload. In short, the client must handle null media links gracefully.
|
|
85
|
-
* <br/>Rate Limits:
|
|
85
|
+
* <br/>Rate Limits: 10 calls per 1 second(s) per account_user
|
|
86
86
|
*
|
|
87
87
|
* @param {Frameio.Uuid} account_id
|
|
88
88
|
* @param {Frameio.Uuid} file_id
|
|
@@ -210,7 +210,7 @@ export class FilesClient {
|
|
|
210
210
|
* `media_links.video_h264_180` on a static image file) or transoding process hasn't completed
|
|
211
211
|
* (i.e. the file's `status` is "uploaded" rather than "transcoded"), then the link will also be set to null in
|
|
212
212
|
* the response payload. In short, the client must handle null media links gracefully.
|
|
213
|
-
* <br/>Rate Limits:
|
|
213
|
+
* <br/>Rate Limits: 10 calls per 1 second(s) per account_user
|
|
214
214
|
*
|
|
215
215
|
* @param {Frameio.Uuid} account_id
|
|
216
216
|
* @param {Frameio.Uuid} file_id
|