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
|
@@ -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
|
|
@@ -246,7 +246,7 @@ class FilesClient {
|
|
|
246
246
|
* `media_links.video_h264_180` on a static image file) or transoding process hasn't completed
|
|
247
247
|
* (i.e. the file's `status` is "uploaded" rather than "transcoded"), then the link will also be set to null in
|
|
248
248
|
* the response payload. In short, the client must handle null media links gracefully.
|
|
249
|
-
* <br/>Rate Limits:
|
|
249
|
+
* <br/>Rate Limits: 10 calls per 1 second(s) per account_user
|
|
250
250
|
*
|
|
251
251
|
* @param {Frameio.Uuid} account_id
|
|
252
252
|
* @param {Frameio.Uuid} file_id
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import type { BaseClientOptions, BaseRequestOptions } from "../../../../BaseClient.js";
|
|
2
|
+
import { type NormalizedClientOptionsWithAuth } from "../../../../BaseClient.js";
|
|
3
|
+
import * as core from "../../../../core/index.js";
|
|
4
|
+
import * as Frameio from "../../../index.js";
|
|
5
|
+
export declare namespace GroupsClient {
|
|
6
|
+
type Options = BaseClientOptions;
|
|
7
|
+
interface RequestOptions extends BaseRequestOptions {
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Manage Groups and related operations.
|
|
12
|
+
*/
|
|
13
|
+
export declare class GroupsClient {
|
|
14
|
+
protected readonly _options: NormalizedClientOptionsWithAuth<GroupsClient.Options>;
|
|
15
|
+
constructor(options: GroupsClient.Options);
|
|
16
|
+
/**
|
|
17
|
+
* List groups in account. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
18
|
+
*
|
|
19
|
+
* @param {Frameio.Uuid} account_id
|
|
20
|
+
* @param {Frameio.GroupsIndexRequest} request
|
|
21
|
+
* @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
22
|
+
*
|
|
23
|
+
* @throws {@link Frameio.BadRequestError}
|
|
24
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
25
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
26
|
+
* @throws {@link Frameio.NotFoundError}
|
|
27
|
+
* @throws {@link Frameio.ConflictError}
|
|
28
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
29
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
30
|
+
*
|
|
31
|
+
* @example
|
|
32
|
+
* await client.groups.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
33
|
+
* include: "creator",
|
|
34
|
+
* sort: "creator_asc",
|
|
35
|
+
* after: "<opaque_cursor>",
|
|
36
|
+
* page_size: 10,
|
|
37
|
+
* include_total_count: false
|
|
38
|
+
* })
|
|
39
|
+
*/
|
|
40
|
+
index(account_id: Frameio.Uuid, request?: Frameio.GroupsIndexRequest, requestOptions?: GroupsClient.RequestOptions): core.HttpResponsePromise<Frameio.GroupsWithIncludesResponse>;
|
|
41
|
+
private __index;
|
|
42
|
+
/**
|
|
43
|
+
* Create group for the current account. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
44
|
+
*
|
|
45
|
+
* @param {Frameio.Uuid} account_id
|
|
46
|
+
* @param {Frameio.CreateGroupParams} request
|
|
47
|
+
* @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
|
+
*
|
|
49
|
+
* @throws {@link Frameio.BadRequestError}
|
|
50
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
51
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
52
|
+
* @throws {@link Frameio.NotFoundError}
|
|
53
|
+
* @throws {@link Frameio.ConflictError}
|
|
54
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
55
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* await client.groups.create("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
59
|
+
* data: {
|
|
60
|
+
* emoji: "smile",
|
|
61
|
+
* name: "group-1"
|
|
62
|
+
* }
|
|
63
|
+
* })
|
|
64
|
+
*/
|
|
65
|
+
create(account_id: Frameio.Uuid, request: Frameio.CreateGroupParams, requestOptions?: GroupsClient.RequestOptions): core.HttpResponsePromise<Frameio.GroupResponse>;
|
|
66
|
+
private __create;
|
|
67
|
+
/**
|
|
68
|
+
* Show group details. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
69
|
+
*
|
|
70
|
+
* @param {Frameio.Uuid} account_id
|
|
71
|
+
* @param {Frameio.Uuid} group_id
|
|
72
|
+
* @param {Frameio.GroupsShowRequest} request
|
|
73
|
+
* @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
74
|
+
*
|
|
75
|
+
* @throws {@link Frameio.BadRequestError}
|
|
76
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
77
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
78
|
+
* @throws {@link Frameio.NotFoundError}
|
|
79
|
+
* @throws {@link Frameio.ConflictError}
|
|
80
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
81
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
82
|
+
*
|
|
83
|
+
* @example
|
|
84
|
+
* await client.groups.show("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
85
|
+
* include: "creator"
|
|
86
|
+
* })
|
|
87
|
+
*/
|
|
88
|
+
show(account_id: Frameio.Uuid, group_id: Frameio.Uuid, request?: Frameio.GroupsShowRequest, requestOptions?: GroupsClient.RequestOptions): core.HttpResponsePromise<Frameio.GroupWithIncludesResponse>;
|
|
89
|
+
private __show;
|
|
90
|
+
/**
|
|
91
|
+
* Update group details. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
92
|
+
*
|
|
93
|
+
* @param {Frameio.Uuid} account_id
|
|
94
|
+
* @param {Frameio.Uuid} group_id
|
|
95
|
+
* @param {Frameio.UpdateGroupParams} request
|
|
96
|
+
* @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
97
|
+
*
|
|
98
|
+
* @throws {@link Frameio.BadRequestError}
|
|
99
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
100
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
101
|
+
* @throws {@link Frameio.NotFoundError}
|
|
102
|
+
* @throws {@link Frameio.ConflictError}
|
|
103
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
104
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
105
|
+
*
|
|
106
|
+
* @example
|
|
107
|
+
* await client.groups.update("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
108
|
+
* data: {
|
|
109
|
+
* emoji: "smile",
|
|
110
|
+
* name: "group-1"
|
|
111
|
+
* }
|
|
112
|
+
* })
|
|
113
|
+
*/
|
|
114
|
+
update(account_id: Frameio.Uuid, group_id: Frameio.Uuid, request: Frameio.UpdateGroupParams, requestOptions?: GroupsClient.RequestOptions): core.HttpResponsePromise<Frameio.GroupResponse>;
|
|
115
|
+
private __update;
|
|
116
|
+
}
|
|
@@ -0,0 +1,368 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
20
|
+
var ownKeys = function(o) {
|
|
21
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
22
|
+
var ar = [];
|
|
23
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
24
|
+
return ar;
|
|
25
|
+
};
|
|
26
|
+
return ownKeys(o);
|
|
27
|
+
};
|
|
28
|
+
return function (mod) {
|
|
29
|
+
if (mod && mod.__esModule) return mod;
|
|
30
|
+
var result = {};
|
|
31
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
32
|
+
__setModuleDefault(result, mod);
|
|
33
|
+
return result;
|
|
34
|
+
};
|
|
35
|
+
})();
|
|
36
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
37
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
38
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
39
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
40
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
41
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
42
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
43
|
+
});
|
|
44
|
+
};
|
|
45
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
+
exports.GroupsClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
48
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
50
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
52
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
|
+
const Frameio = __importStar(require("../../../index.js"));
|
|
54
|
+
/**
|
|
55
|
+
* Manage Groups and related operations.
|
|
56
|
+
*/
|
|
57
|
+
class GroupsClient {
|
|
58
|
+
constructor(options) {
|
|
59
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
60
|
+
}
|
|
61
|
+
/**
|
|
62
|
+
* List groups in account. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
63
|
+
*
|
|
64
|
+
* @param {Frameio.Uuid} account_id
|
|
65
|
+
* @param {Frameio.GroupsIndexRequest} request
|
|
66
|
+
* @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
67
|
+
*
|
|
68
|
+
* @throws {@link Frameio.BadRequestError}
|
|
69
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
70
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
71
|
+
* @throws {@link Frameio.NotFoundError}
|
|
72
|
+
* @throws {@link Frameio.ConflictError}
|
|
73
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
74
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
75
|
+
*
|
|
76
|
+
* @example
|
|
77
|
+
* await client.groups.index("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
78
|
+
* include: "creator",
|
|
79
|
+
* sort: "creator_asc",
|
|
80
|
+
* after: "<opaque_cursor>",
|
|
81
|
+
* page_size: 10,
|
|
82
|
+
* include_total_count: false
|
|
83
|
+
* })
|
|
84
|
+
*/
|
|
85
|
+
index(account_id, request = {}, requestOptions) {
|
|
86
|
+
return core.HttpResponsePromise.fromPromise(this.__index(account_id, request, requestOptions));
|
|
87
|
+
}
|
|
88
|
+
__index(account_id_1) {
|
|
89
|
+
return __awaiter(this, arguments, void 0, function* (account_id, request = {}, requestOptions) {
|
|
90
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
91
|
+
const { include, sort, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
92
|
+
const _queryParams = {
|
|
93
|
+
include: include != null ? include : undefined,
|
|
94
|
+
sort: sort != null ? sort : undefined,
|
|
95
|
+
after,
|
|
96
|
+
page_size: pageSize,
|
|
97
|
+
include_total_count: includeTotalCount,
|
|
98
|
+
};
|
|
99
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
100
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
101
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
102
|
+
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)}/groups`),
|
|
103
|
+
method: "GET",
|
|
104
|
+
headers: _headers,
|
|
105
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
106
|
+
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,
|
|
107
|
+
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,
|
|
108
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
109
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
110
|
+
logging: this._options.logging,
|
|
111
|
+
});
|
|
112
|
+
if (_response.ok) {
|
|
113
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
114
|
+
}
|
|
115
|
+
if (_response.error.reason === "status-code") {
|
|
116
|
+
switch (_response.error.statusCode) {
|
|
117
|
+
case 400:
|
|
118
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
119
|
+
case 401:
|
|
120
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
121
|
+
case 403:
|
|
122
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
123
|
+
case 404:
|
|
124
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
125
|
+
case 409:
|
|
126
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
127
|
+
case 422:
|
|
128
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
129
|
+
case 429:
|
|
130
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
131
|
+
default:
|
|
132
|
+
throw new errors.FrameioError({
|
|
133
|
+
statusCode: _response.error.statusCode,
|
|
134
|
+
body: _response.error.body,
|
|
135
|
+
rawResponse: _response.rawResponse,
|
|
136
|
+
});
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/groups");
|
|
140
|
+
});
|
|
141
|
+
}
|
|
142
|
+
/**
|
|
143
|
+
* Create group for the current account. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
144
|
+
*
|
|
145
|
+
* @param {Frameio.Uuid} account_id
|
|
146
|
+
* @param {Frameio.CreateGroupParams} request
|
|
147
|
+
* @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
148
|
+
*
|
|
149
|
+
* @throws {@link Frameio.BadRequestError}
|
|
150
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
151
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
152
|
+
* @throws {@link Frameio.NotFoundError}
|
|
153
|
+
* @throws {@link Frameio.ConflictError}
|
|
154
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
155
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
156
|
+
*
|
|
157
|
+
* @example
|
|
158
|
+
* await client.groups.create("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
159
|
+
* data: {
|
|
160
|
+
* emoji: "smile",
|
|
161
|
+
* name: "group-1"
|
|
162
|
+
* }
|
|
163
|
+
* })
|
|
164
|
+
*/
|
|
165
|
+
create(account_id, request, requestOptions) {
|
|
166
|
+
return core.HttpResponsePromise.fromPromise(this.__create(account_id, request, requestOptions));
|
|
167
|
+
}
|
|
168
|
+
__create(account_id, request, requestOptions) {
|
|
169
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
170
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
171
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
172
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
173
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
174
|
+
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)}/groups`),
|
|
175
|
+
method: "POST",
|
|
176
|
+
headers: _headers,
|
|
177
|
+
contentType: "application/json",
|
|
178
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
179
|
+
requestType: "json",
|
|
180
|
+
body: request,
|
|
181
|
+
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,
|
|
182
|
+
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,
|
|
183
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
184
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
185
|
+
logging: this._options.logging,
|
|
186
|
+
});
|
|
187
|
+
if (_response.ok) {
|
|
188
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
189
|
+
}
|
|
190
|
+
if (_response.error.reason === "status-code") {
|
|
191
|
+
switch (_response.error.statusCode) {
|
|
192
|
+
case 400:
|
|
193
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
194
|
+
case 401:
|
|
195
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
196
|
+
case 403:
|
|
197
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
198
|
+
case 404:
|
|
199
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
200
|
+
case 409:
|
|
201
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
202
|
+
case 422:
|
|
203
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
204
|
+
case 429:
|
|
205
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
206
|
+
default:
|
|
207
|
+
throw new errors.FrameioError({
|
|
208
|
+
statusCode: _response.error.statusCode,
|
|
209
|
+
body: _response.error.body,
|
|
210
|
+
rawResponse: _response.rawResponse,
|
|
211
|
+
});
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/groups");
|
|
215
|
+
});
|
|
216
|
+
}
|
|
217
|
+
/**
|
|
218
|
+
* Show group details. <br>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
219
|
+
*
|
|
220
|
+
* @param {Frameio.Uuid} account_id
|
|
221
|
+
* @param {Frameio.Uuid} group_id
|
|
222
|
+
* @param {Frameio.GroupsShowRequest} request
|
|
223
|
+
* @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
224
|
+
*
|
|
225
|
+
* @throws {@link Frameio.BadRequestError}
|
|
226
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
227
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
228
|
+
* @throws {@link Frameio.NotFoundError}
|
|
229
|
+
* @throws {@link Frameio.ConflictError}
|
|
230
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
231
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
232
|
+
*
|
|
233
|
+
* @example
|
|
234
|
+
* await client.groups.show("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
235
|
+
* include: "creator"
|
|
236
|
+
* })
|
|
237
|
+
*/
|
|
238
|
+
show(account_id, group_id, request = {}, requestOptions) {
|
|
239
|
+
return core.HttpResponsePromise.fromPromise(this.__show(account_id, group_id, request, requestOptions));
|
|
240
|
+
}
|
|
241
|
+
__show(account_id_1, group_id_1) {
|
|
242
|
+
return __awaiter(this, arguments, void 0, function* (account_id, group_id, request = {}, requestOptions) {
|
|
243
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
244
|
+
const { include } = request;
|
|
245
|
+
const _queryParams = {
|
|
246
|
+
include: include != null ? include : undefined,
|
|
247
|
+
};
|
|
248
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
249
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
250
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
251
|
+
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)}/groups/${core.url.encodePathParam(group_id)}`),
|
|
252
|
+
method: "GET",
|
|
253
|
+
headers: _headers,
|
|
254
|
+
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
255
|
+
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,
|
|
256
|
+
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,
|
|
257
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
258
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
259
|
+
logging: this._options.logging,
|
|
260
|
+
});
|
|
261
|
+
if (_response.ok) {
|
|
262
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
263
|
+
}
|
|
264
|
+
if (_response.error.reason === "status-code") {
|
|
265
|
+
switch (_response.error.statusCode) {
|
|
266
|
+
case 400:
|
|
267
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
268
|
+
case 401:
|
|
269
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
270
|
+
case 403:
|
|
271
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
272
|
+
case 404:
|
|
273
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
274
|
+
case 409:
|
|
275
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
276
|
+
case 422:
|
|
277
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
278
|
+
case 429:
|
|
279
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
280
|
+
default:
|
|
281
|
+
throw new errors.FrameioError({
|
|
282
|
+
statusCode: _response.error.statusCode,
|
|
283
|
+
body: _response.error.body,
|
|
284
|
+
rawResponse: _response.rawResponse,
|
|
285
|
+
});
|
|
286
|
+
}
|
|
287
|
+
}
|
|
288
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/groups/{group_id}");
|
|
289
|
+
});
|
|
290
|
+
}
|
|
291
|
+
/**
|
|
292
|
+
* Update group details. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
293
|
+
*
|
|
294
|
+
* @param {Frameio.Uuid} account_id
|
|
295
|
+
* @param {Frameio.Uuid} group_id
|
|
296
|
+
* @param {Frameio.UpdateGroupParams} request
|
|
297
|
+
* @param {GroupsClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
298
|
+
*
|
|
299
|
+
* @throws {@link Frameio.BadRequestError}
|
|
300
|
+
* @throws {@link Frameio.UnauthorizedError}
|
|
301
|
+
* @throws {@link Frameio.ForbiddenError}
|
|
302
|
+
* @throws {@link Frameio.NotFoundError}
|
|
303
|
+
* @throws {@link Frameio.ConflictError}
|
|
304
|
+
* @throws {@link Frameio.UnprocessableEntityError}
|
|
305
|
+
* @throws {@link Frameio.TooManyRequestsError}
|
|
306
|
+
*
|
|
307
|
+
* @example
|
|
308
|
+
* await client.groups.update("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", {
|
|
309
|
+
* data: {
|
|
310
|
+
* emoji: "smile",
|
|
311
|
+
* name: "group-1"
|
|
312
|
+
* }
|
|
313
|
+
* })
|
|
314
|
+
*/
|
|
315
|
+
update(account_id, group_id, request, requestOptions) {
|
|
316
|
+
return core.HttpResponsePromise.fromPromise(this.__update(account_id, group_id, request, requestOptions));
|
|
317
|
+
}
|
|
318
|
+
__update(account_id, group_id, request, requestOptions) {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
321
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
322
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.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);
|
|
323
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
324
|
+
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)}/groups/${core.url.encodePathParam(group_id)}`),
|
|
325
|
+
method: "PATCH",
|
|
326
|
+
headers: _headers,
|
|
327
|
+
contentType: "application/json",
|
|
328
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
329
|
+
requestType: "json",
|
|
330
|
+
body: request,
|
|
331
|
+
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,
|
|
332
|
+
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,
|
|
333
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
334
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
335
|
+
logging: this._options.logging,
|
|
336
|
+
});
|
|
337
|
+
if (_response.ok) {
|
|
338
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
339
|
+
}
|
|
340
|
+
if (_response.error.reason === "status-code") {
|
|
341
|
+
switch (_response.error.statusCode) {
|
|
342
|
+
case 400:
|
|
343
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
344
|
+
case 401:
|
|
345
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
346
|
+
case 403:
|
|
347
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
348
|
+
case 404:
|
|
349
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
350
|
+
case 409:
|
|
351
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
352
|
+
case 422:
|
|
353
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
354
|
+
case 429:
|
|
355
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
356
|
+
default:
|
|
357
|
+
throw new errors.FrameioError({
|
|
358
|
+
statusCode: _response.error.statusCode,
|
|
359
|
+
body: _response.error.body,
|
|
360
|
+
rawResponse: _response.rawResponse,
|
|
361
|
+
});
|
|
362
|
+
}
|
|
363
|
+
}
|
|
364
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v4/accounts/{account_id}/groups/{group_id}");
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
}
|
|
368
|
+
exports.GroupsClient = GroupsClient;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./requests/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* data: {
|
|
5
|
+
* emoji: "smile",
|
|
6
|
+
* name: "group-1"
|
|
7
|
+
* }
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface CreateGroupParams {
|
|
11
|
+
data: CreateGroupParams.Data;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace CreateGroupParams {
|
|
14
|
+
interface Data {
|
|
15
|
+
/** Group emoji for UI display */
|
|
16
|
+
emoji: string;
|
|
17
|
+
/** Group name */
|
|
18
|
+
name: string;
|
|
19
|
+
}
|
|
20
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type * as Frameio from "../../../../index.js";
|
|
2
|
+
/**
|
|
3
|
+
* @example
|
|
4
|
+
* {
|
|
5
|
+
* include: "creator",
|
|
6
|
+
* sort: "creator_asc",
|
|
7
|
+
* after: "<opaque_cursor>",
|
|
8
|
+
* page_size: 10,
|
|
9
|
+
* include_total_count: false
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface GroupsIndexRequest {
|
|
13
|
+
include?: "creator";
|
|
14
|
+
/** Sort groups by query params */
|
|
15
|
+
sort?: Frameio.GroupsIndexRequestSort;
|
|
16
|
+
/**
|
|
17
|
+
* Opaque Cursor query param for requests returning paginated results.
|
|
18
|
+
* <br/>
|
|
19
|
+
* NOTE: this value is auto-generated and included as part of links from a previous response. It is not intended to be human readable.
|
|
20
|
+
*/
|
|
21
|
+
after?: Frameio.RequestAfterOpaqueCursor | undefined;
|
|
22
|
+
page_size?: Frameio.RequestPageSize;
|
|
23
|
+
include_total_count?: Frameio.IncludeTotalCount;
|
|
24
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @example
|
|
3
|
+
* {
|
|
4
|
+
* data: {
|
|
5
|
+
* emoji: "smile",
|
|
6
|
+
* name: "group-1"
|
|
7
|
+
* }
|
|
8
|
+
* }
|
|
9
|
+
*/
|
|
10
|
+
export interface UpdateGroupParams {
|
|
11
|
+
data: UpdateGroupParams.Data;
|
|
12
|
+
}
|
|
13
|
+
export declare namespace UpdateGroupParams {
|
|
14
|
+
interface Data {
|
|
15
|
+
/** Group emoji for UI display */
|
|
16
|
+
emoji?: string | undefined;
|
|
17
|
+
/** Group name */
|
|
18
|
+
name?: string | undefined;
|
|
19
|
+
}
|
|
20
|
+
}
|