frameio 3.2.3 → 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/README.md +159 -4
- package/dist/cjs/BaseClient.d.ts +4 -0
- package/dist/cjs/BaseClient.js +4 -2
- package/dist/cjs/Client.d.ts +6 -0
- package/dist/cjs/Client.js +34 -24
- package/dist/cjs/api/resources/accountPermissions/client/Client.js +6 -6
- package/dist/cjs/api/resources/accounts/client/Client.js +13 -13
- package/dist/cjs/api/resources/comments/client/Client.js +48 -48
- 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 +78 -78
- package/dist/cjs/api/resources/folders/client/Client.js +56 -56
- 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 +18 -18
- package/dist/cjs/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.ts +4 -4
- package/dist/cjs/api/resources/metadataFields/client/Client.js +28 -28
- package/dist/cjs/api/resources/projectPermissions/client/Client.js +20 -20
- package/dist/cjs/api/resources/projects/client/Client.js +34 -34
- package/dist/cjs/api/resources/shares/client/Client.d.ts +4 -4
- package/dist/cjs/api/resources/shares/client/Client.js +72 -72
- 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/users/client/Client.js +7 -7
- package/dist/cjs/api/resources/versionStacks/client/Client.d.ts +1 -1
- package/dist/cjs/api/resources/versionStacks/client/Client.js +43 -43
- package/dist/cjs/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.ts +1 -1
- package/dist/cjs/api/resources/webhooks/client/Client.js +34 -34
- package/dist/cjs/api/resources/workspacePermissions/client/Client.js +20 -20
- package/dist/cjs/api/resources/workspaces/client/Client.js +34 -34
- package/dist/cjs/api/types/Account.d.ts +0 -2
- 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 +7 -0
- package/dist/cjs/api/types/AuditLogwithIncludes.js +7 -0
- package/dist/cjs/api/types/Filters.d.ts +7 -0
- package/dist/cjs/api/types/Filters.js +7 -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/index.d.ts +4 -0
- package/dist/cjs/index.js +21 -1
- package/dist/cjs/oauth/BaseAuth.d.ts +66 -0
- package/dist/cjs/oauth/BaseAuth.js +113 -0
- package/dist/cjs/oauth/NativeAppAuth.d.ts +32 -0
- package/dist/cjs/oauth/NativeAppAuth.js +35 -0
- package/dist/cjs/oauth/SPAAuth.d.ts +38 -0
- package/dist/cjs/oauth/SPAAuth.js +96 -0
- package/dist/cjs/oauth/ServerToServerAuth.d.ts +17 -0
- package/dist/cjs/oauth/ServerToServerAuth.js +49 -0
- package/dist/cjs/oauth/TokenManager.d.ts +83 -0
- package/dist/cjs/oauth/TokenManager.js +174 -0
- package/dist/cjs/oauth/WebAppAuth.d.ts +29 -0
- package/dist/cjs/oauth/WebAppAuth.js +88 -0
- package/dist/cjs/oauth/errors.d.ts +41 -0
- package/dist/cjs/oauth/errors.js +83 -0
- package/dist/cjs/oauth/http.d.ts +70 -0
- package/dist/cjs/oauth/http.js +280 -0
- package/dist/cjs/oauth/index.d.ts +34 -0
- package/dist/cjs/oauth/index.js +47 -0
- package/dist/cjs/oauth/logger.d.ts +17 -0
- package/dist/cjs/oauth/logger.js +18 -0
- package/dist/cjs/oauth/pkce.d.ts +30 -0
- package/dist/cjs/oauth/pkce.js +102 -0
- package/dist/cjs/oauth/validation.d.ts +17 -0
- package/dist/cjs/oauth/validation.js +55 -0
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +4 -0
- package/dist/esm/BaseClient.mjs +4 -2
- package/dist/esm/Client.d.mts +6 -0
- package/dist/esm/Client.mjs +10 -0
- package/dist/esm/api/resources/accountPermissions/client/Client.mjs +7 -7
- package/dist/esm/api/resources/accounts/client/Client.mjs +13 -13
- package/dist/esm/api/resources/comments/client/Client.mjs +49 -49
- 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 +79 -79
- package/dist/esm/api/resources/folders/client/Client.mjs +57 -57
- 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 +19 -19
- package/dist/esm/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.mts +4 -4
- package/dist/esm/api/resources/metadataFields/client/Client.mjs +29 -29
- package/dist/esm/api/resources/projectPermissions/client/Client.mjs +21 -21
- package/dist/esm/api/resources/projects/client/Client.mjs +35 -35
- package/dist/esm/api/resources/shares/client/Client.d.mts +4 -4
- package/dist/esm/api/resources/shares/client/Client.mjs +73 -73
- 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/users/client/Client.mjs +8 -8
- package/dist/esm/api/resources/versionStacks/client/Client.d.mts +1 -1
- package/dist/esm/api/resources/versionStacks/client/Client.mjs +44 -44
- package/dist/esm/api/resources/versionStacks/client/requests/VersionStackCreateParams.d.mts +1 -1
- package/dist/esm/api/resources/webhooks/client/Client.mjs +35 -35
- package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +21 -21
- package/dist/esm/api/resources/workspaces/client/Client.mjs +35 -35
- package/dist/esm/api/types/Account.d.mts +0 -2
- 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 +7 -0
- package/dist/esm/api/types/AuditLogwithIncludes.mjs +7 -0
- package/dist/esm/api/types/Filters.d.mts +7 -0
- package/dist/esm/api/types/Filters.mjs +7 -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/index.d.mts +4 -0
- package/dist/esm/index.mjs +6 -0
- package/dist/esm/oauth/BaseAuth.d.mts +66 -0
- package/dist/esm/oauth/BaseAuth.mjs +109 -0
- package/dist/esm/oauth/NativeAppAuth.d.mts +32 -0
- package/dist/esm/oauth/NativeAppAuth.mjs +31 -0
- package/dist/esm/oauth/SPAAuth.d.mts +38 -0
- package/dist/esm/oauth/SPAAuth.mjs +92 -0
- package/dist/esm/oauth/ServerToServerAuth.d.mts +17 -0
- package/dist/esm/oauth/ServerToServerAuth.mjs +45 -0
- package/dist/esm/oauth/TokenManager.d.mts +83 -0
- package/dist/esm/oauth/TokenManager.mjs +170 -0
- package/dist/esm/oauth/WebAppAuth.d.mts +29 -0
- package/dist/esm/oauth/WebAppAuth.mjs +84 -0
- package/dist/esm/oauth/errors.d.mts +41 -0
- package/dist/esm/oauth/errors.mjs +72 -0
- package/dist/esm/oauth/http.d.mts +70 -0
- package/dist/esm/oauth/http.mjs +274 -0
- package/dist/esm/oauth/index.d.mts +34 -0
- package/dist/esm/oauth/index.mjs +30 -0
- package/dist/esm/oauth/logger.d.mts +17 -0
- package/dist/esm/oauth/logger.mjs +15 -0
- package/dist/esm/oauth/pkce.d.mts +30 -0
- package/dist/esm/oauth/pkce.mjs +98 -0
- package/dist/esm/oauth/validation.d.mts +17 -0
- package/dist/esm/oauth/validation.mjs +51 -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
package/README.md
CHANGED
|
@@ -3,11 +3,9 @@
|
|
|
3
3
|
[](https://buildwithfern.com?utm_source=github&utm_medium=github&utm_campaign=readme&utm_source=https%3A%2F%2Fgithub.com%2FFrameio%2Ftypescript-sdk)
|
|
4
4
|
[](https://www.npmjs.com/package/frameio)
|
|
5
5
|
|
|
6
|
-
|
|
7
6
|
<img width="1644" alt="artboard_small" src="https://user-images.githubusercontent.com/19295862/66240171-ba8dd280-e6b0-11e9-9ccf-573a4fc5961f.png">
|
|
8
7
|
|
|
9
|
-
Frame.io is a cloud-based collaboration hub that allows video professionals to share files, comment on clips real-time, and compare different versions and edits of a clip.
|
|
10
|
-
|
|
8
|
+
Frame.io is a cloud-based collaboration hub that allows video professionals to share files, comment on clips real-time, and compare different versions and edits of a clip.
|
|
11
9
|
|
|
12
10
|
## Installation
|
|
13
11
|
|
|
@@ -21,7 +19,26 @@ A full reference for this library is available [here](https://next.developer.fra
|
|
|
21
19
|
|
|
22
20
|
## Usage
|
|
23
21
|
|
|
24
|
-
|
|
22
|
+
You can authenticate with a static token or OAuth 2.0 via `frameio` auth classes:
|
|
23
|
+
|
|
24
|
+
**Static token** (for legacy dev tokens or when you already have an access token):
|
|
25
|
+
|
|
26
|
+
```typescript
|
|
27
|
+
const client = new FrameioClient({ token: "YOUR_TOKEN" });
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
**OAuth 2.0** (for production with automatic token refresh):
|
|
31
|
+
|
|
32
|
+
```typescript
|
|
33
|
+
import { FrameioClient, ServerToServerAuth } from "frameio";
|
|
34
|
+
|
|
35
|
+
const auth = new ServerToServerAuth({ clientId: "...", clientSecret: "..." });
|
|
36
|
+
const client = new FrameioClient({ token: () => auth.getToken() });
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
See the [Authentication](#authentication) section below for all OAuth flows.
|
|
40
|
+
|
|
41
|
+
Example: creating a metadata field definition:
|
|
25
42
|
|
|
26
43
|
```typescript
|
|
27
44
|
import { FrameioClient } from "frameio";
|
|
@@ -46,6 +63,123 @@ await client.metadataFields.metadataFieldDefinitionsCreate("b2702c44-c6da-4bb6-8
|
|
|
46
63
|
});
|
|
47
64
|
```
|
|
48
65
|
|
|
66
|
+
## Authentication
|
|
67
|
+
|
|
68
|
+
The SDK supports two authentication options:
|
|
69
|
+
|
|
70
|
+
- **Static token**: Pass a string directly to `token`. Suitable for legacy dev tokens or when you already have an access token.
|
|
71
|
+
- **OAuth 2.0**: Use the built-in auth classes for automatic token management and refresh. Pass `() => auth.getToken()` to the client.
|
|
72
|
+
|
|
73
|
+
The SDK provides four OAuth 2.0 flows:
|
|
74
|
+
|
|
75
|
+
| Flow | Use Case | Classes |
|
|
76
|
+
| ------------------------- | -------------------------------------------------- | -------------------- |
|
|
77
|
+
| **Server-to-Server** | Backend services, scripts, no user interaction | `ServerToServerAuth` |
|
|
78
|
+
| **Web App** | Server-side apps with client secret | `WebAppAuth` |
|
|
79
|
+
| **Single Page App (SPA)** | Browser apps without a client secret (PKCE) | `SPAAuth` |
|
|
80
|
+
| **Native App** | Desktop/mobile apps with custom URI schemes (PKCE) | `NativeAppAuth` |
|
|
81
|
+
|
|
82
|
+
### Server-to-Server
|
|
83
|
+
|
|
84
|
+
For backend services and scripts that need Frame.io access without user interaction:
|
|
85
|
+
|
|
86
|
+
```typescript
|
|
87
|
+
import { FrameioClient, ServerToServerAuth } from "frameio";
|
|
88
|
+
|
|
89
|
+
const auth = new ServerToServerAuth({ clientId: "...", clientSecret: "..." });
|
|
90
|
+
const client = new FrameioClient({ token: () => auth.getToken() });
|
|
91
|
+
// Tokens refresh automatically; no user interaction needed.
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
### Web App
|
|
95
|
+
|
|
96
|
+
For server-side applications with a client secret:
|
|
97
|
+
|
|
98
|
+
```typescript
|
|
99
|
+
import { FrameioClient, WebAppAuth } from "frameio";
|
|
100
|
+
import crypto from "crypto";
|
|
101
|
+
|
|
102
|
+
const auth = new WebAppAuth({
|
|
103
|
+
clientId: "...",
|
|
104
|
+
clientSecret: "...",
|
|
105
|
+
redirectUri: "https://myapp.com/callback",
|
|
106
|
+
});
|
|
107
|
+
|
|
108
|
+
const url = auth.getAuthorizationUrl({ state: crypto.randomBytes(32).toString("hex") });
|
|
109
|
+
// Redirect user to url, then:
|
|
110
|
+
await auth.exchangeCode("CODE_FROM_CALLBACK");
|
|
111
|
+
const client = new FrameioClient({ token: () => auth.getToken() });
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Single Page App (PKCE)
|
|
115
|
+
|
|
116
|
+
For browser-based apps that cannot store a client secret:
|
|
117
|
+
|
|
118
|
+
```typescript
|
|
119
|
+
import { FrameioClient, SPAAuth } from "frameio";
|
|
120
|
+
|
|
121
|
+
const auth = new SPAAuth({ clientId: "...", redirectUri: "https://myapp.com/cb" });
|
|
122
|
+
|
|
123
|
+
const result = await auth.getAuthorizationUrl({ state: crypto.randomUUID() });
|
|
124
|
+
// Redirect user to result.url, store result.codeVerifier, then:
|
|
125
|
+
await auth.exchangeCode({ code: "CODE", codeVerifier: result.codeVerifier });
|
|
126
|
+
const client = new FrameioClient({ token: () => auth.getToken() });
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Native App (PKCE with custom URI schemes)
|
|
130
|
+
|
|
131
|
+
For desktop and mobile applications:
|
|
132
|
+
|
|
133
|
+
```typescript
|
|
134
|
+
import { NativeAppAuth } from "frameio";
|
|
135
|
+
|
|
136
|
+
const auth = new NativeAppAuth({
|
|
137
|
+
clientId: "...",
|
|
138
|
+
redirectUri: "myapp://callback",
|
|
139
|
+
});
|
|
140
|
+
// Same PKCE flow as SPAAuth
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Token Persistence
|
|
144
|
+
|
|
145
|
+
For Web App, SPA, and Native App flows, you can persist tokens to avoid re-authenticating on each app restart:
|
|
146
|
+
|
|
147
|
+
```typescript
|
|
148
|
+
// After exchangeCode() — save tokens for later
|
|
149
|
+
const data = auth.exportTokens();
|
|
150
|
+
// Store data to file or database ...
|
|
151
|
+
|
|
152
|
+
// On next app start — restore and use
|
|
153
|
+
auth.importTokens(data);
|
|
154
|
+
const client = new FrameioClient({ token: () => auth.getToken() });
|
|
155
|
+
```
|
|
156
|
+
|
|
157
|
+
### Revoking Tokens
|
|
158
|
+
|
|
159
|
+
To sign out and revoke the current access and refresh tokens:
|
|
160
|
+
|
|
161
|
+
```typescript
|
|
162
|
+
await auth.revoke();
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
### Staging / Non-Production
|
|
166
|
+
|
|
167
|
+
Use `imsBaseUrl` to point at a staging or alternative Adobe IMS environment:
|
|
168
|
+
|
|
169
|
+
```typescript
|
|
170
|
+
const auth = new ServerToServerAuth({
|
|
171
|
+
clientId: "...",
|
|
172
|
+
clientSecret: "...",
|
|
173
|
+
imsBaseUrl: "https://ims-na1-stg1.adobelogin.com",
|
|
174
|
+
});
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
### Async / Concurrency
|
|
178
|
+
|
|
179
|
+
All auth flows use `async/await` natively. The `getToken()` method handles automatic token refresh and is safe to call concurrently — only one refresh request fires at a time.
|
|
180
|
+
|
|
181
|
+
For the full authentication guide, see the [TypeScript Authentication Guide](https://next.developer.frame.io/platform/v4/docs/typescript-authentication-guide).
|
|
182
|
+
|
|
49
183
|
## Request And Response Types
|
|
50
184
|
|
|
51
185
|
The SDK exports all request and response types as TypeScript interfaces. Simply import them with the
|
|
@@ -79,6 +213,27 @@ try {
|
|
|
79
213
|
}
|
|
80
214
|
```
|
|
81
215
|
|
|
216
|
+
For OAuth flows, additional exceptions are available:
|
|
217
|
+
|
|
218
|
+
- `AuthenticationError` — token exchange or refresh failed
|
|
219
|
+
- `TokenExpiredError` — refresh token expired; user must re-authenticate
|
|
220
|
+
- `ConfigurationError` — invalid configuration (e.g. missing `clientId`)
|
|
221
|
+
- `NetworkError`, `RateLimitError` — network or rate limit issues
|
|
222
|
+
|
|
223
|
+
```typescript
|
|
224
|
+
import { AuthenticationError, TokenExpiredError } from "frameio";
|
|
225
|
+
|
|
226
|
+
try {
|
|
227
|
+
await auth.exchangeCode("...");
|
|
228
|
+
} catch (error) {
|
|
229
|
+
if (error instanceof AuthenticationError) {
|
|
230
|
+
console.error(error.errorCode, error.errorDescription);
|
|
231
|
+
} else if (error instanceof TokenExpiredError) {
|
|
232
|
+
// Redirect user to sign in again
|
|
233
|
+
}
|
|
234
|
+
}
|
|
235
|
+
```
|
|
236
|
+
|
|
82
237
|
## Advanced
|
|
83
238
|
|
|
84
239
|
### Additional Headers
|
package/dist/cjs/BaseClient.d.ts
CHANGED
|
@@ -5,6 +5,8 @@ export type BaseClientOptions = {
|
|
|
5
5
|
environment?: core.Supplier<environments.FrameioEnvironment | string>;
|
|
6
6
|
/** Specify a custom URL to connect the client to. */
|
|
7
7
|
baseUrl?: core.Supplier<string>;
|
|
8
|
+
/** Override the user-agent header */
|
|
9
|
+
userAgent?: "frameio-ts";
|
|
8
10
|
/** Additional headers to include in requests. */
|
|
9
11
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
10
12
|
/** The default maximum time to wait for a response in seconds. */
|
|
@@ -24,6 +26,8 @@ export interface BaseRequestOptions {
|
|
|
24
26
|
maxRetries?: number;
|
|
25
27
|
/** A hook to abort the request. */
|
|
26
28
|
abortSignal?: AbortSignal;
|
|
29
|
+
/** Override the user-agent header */
|
|
30
|
+
userAgent?: "frameio-ts";
|
|
27
31
|
/** Additional query string parameters to include in the request. */
|
|
28
32
|
queryParams?: Record<string, unknown>;
|
|
29
33
|
/** Additional headers to include in the request. */
|
package/dist/cjs/BaseClient.js
CHANGED
|
@@ -40,13 +40,15 @@ const BearerAuthProvider_js_1 = require("./auth/BearerAuthProvider.js");
|
|
|
40
40
|
const headers_js_1 = require("./core/headers.js");
|
|
41
41
|
const core = __importStar(require("./core/index.js"));
|
|
42
42
|
function normalizeClientOptions(options) {
|
|
43
|
+
var _a;
|
|
43
44
|
const headers = (0, headers_js_1.mergeHeaders)({
|
|
44
45
|
"X-Fern-Language": "JavaScript",
|
|
45
46
|
"X-Fern-SDK-Name": "frameio",
|
|
46
|
-
"X-Fern-SDK-Version": "
|
|
47
|
-
"User-Agent": "frameio/
|
|
47
|
+
"X-Fern-SDK-Version": "4.2.0",
|
|
48
|
+
"User-Agent": "frameio/4.2.0",
|
|
48
49
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
49
50
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
51
|
+
"user-agent": (_a = options === null || options === void 0 ? void 0 : options.userAgent) !== null && _a !== void 0 ? _a : "frameio-ts",
|
|
50
52
|
}, options === null || options === void 0 ? void 0 : options.headers);
|
|
51
53
|
return Object.assign(Object.assign({}, options), { logging: core.logging.createLogger(options === null || options === void 0 ? void 0 : options.logging), headers });
|
|
52
54
|
}
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { AccountPermissionsClient } from "./api/resources/accountPermissions/client/Client.js";
|
|
2
2
|
import { AccountsClient } from "./api/resources/accounts/client/Client.js";
|
|
3
3
|
import { CommentsClient } from "./api/resources/comments/client/Client.js";
|
|
4
|
+
import { CustomActionsClient } from "./api/resources/customActions/client/Client.js";
|
|
4
5
|
import { FilesClient } from "./api/resources/files/client/Client.js";
|
|
5
6
|
import { FoldersClient } from "./api/resources/folders/client/Client.js";
|
|
7
|
+
import { GroupsClient } from "./api/resources/groups/client/Client.js";
|
|
6
8
|
import { MetadataClient } from "./api/resources/metadata/client/Client.js";
|
|
7
9
|
import { MetadataFieldsClient } from "./api/resources/metadataFields/client/Client.js";
|
|
8
10
|
import { ProjectPermissionsClient } from "./api/resources/projectPermissions/client/Client.js";
|
|
@@ -23,6 +25,7 @@ export declare namespace FrameioClient {
|
|
|
23
25
|
}
|
|
24
26
|
export declare class FrameioClient {
|
|
25
27
|
protected readonly _options: NormalizedClientOptionsWithAuth<FrameioClient.Options>;
|
|
28
|
+
protected _customActions: CustomActionsClient | undefined;
|
|
26
29
|
protected _metadataFields: MetadataFieldsClient | undefined;
|
|
27
30
|
protected _projectPermissions: ProjectPermissionsClient | undefined;
|
|
28
31
|
protected _folders: FoldersClient | undefined;
|
|
@@ -32,6 +35,7 @@ export declare class FrameioClient {
|
|
|
32
35
|
protected _accounts: AccountsClient | undefined;
|
|
33
36
|
protected _webhooks: WebhooksClient | undefined;
|
|
34
37
|
protected _workspacePermissions: WorkspacePermissionsClient | undefined;
|
|
38
|
+
protected _groups: GroupsClient | undefined;
|
|
35
39
|
protected _shares: SharesClient | undefined;
|
|
36
40
|
protected _metadata: MetadataClient | undefined;
|
|
37
41
|
protected _files: FilesClient | undefined;
|
|
@@ -39,6 +43,7 @@ export declare class FrameioClient {
|
|
|
39
43
|
protected _projects: ProjectsClient | undefined;
|
|
40
44
|
protected _workspaces: WorkspacesClient | undefined;
|
|
41
45
|
constructor(options: FrameioClient.Options);
|
|
46
|
+
get customActions(): CustomActionsClient;
|
|
42
47
|
get metadataFields(): MetadataFieldsClient;
|
|
43
48
|
get projectPermissions(): ProjectPermissionsClient;
|
|
44
49
|
get folders(): FoldersClient;
|
|
@@ -48,6 +53,7 @@ export declare class FrameioClient {
|
|
|
48
53
|
get accounts(): AccountsClient;
|
|
49
54
|
get webhooks(): WebhooksClient;
|
|
50
55
|
get workspacePermissions(): WorkspacePermissionsClient;
|
|
56
|
+
get groups(): GroupsClient;
|
|
51
57
|
get shares(): SharesClient;
|
|
52
58
|
get metadata(): MetadataClient;
|
|
53
59
|
get files(): FilesClient;
|
package/dist/cjs/Client.js
CHANGED
|
@@ -47,39 +47,45 @@ exports.FrameioClient = void 0;
|
|
|
47
47
|
const Client_js_1 = require("./api/resources/accountPermissions/client/Client.js");
|
|
48
48
|
const Client_js_2 = require("./api/resources/accounts/client/Client.js");
|
|
49
49
|
const Client_js_3 = require("./api/resources/comments/client/Client.js");
|
|
50
|
-
const Client_js_4 = require("./api/resources/
|
|
51
|
-
const Client_js_5 = require("./api/resources/
|
|
52
|
-
const Client_js_6 = require("./api/resources/
|
|
53
|
-
const Client_js_7 = require("./api/resources/
|
|
54
|
-
const Client_js_8 = require("./api/resources/
|
|
55
|
-
const Client_js_9 = require("./api/resources/
|
|
56
|
-
const Client_js_10 = require("./api/resources/
|
|
57
|
-
const Client_js_11 = require("./api/resources/
|
|
58
|
-
const Client_js_12 = require("./api/resources/
|
|
59
|
-
const Client_js_13 = require("./api/resources/
|
|
60
|
-
const Client_js_14 = require("./api/resources/
|
|
61
|
-
const Client_js_15 = require("./api/resources/
|
|
50
|
+
const Client_js_4 = require("./api/resources/customActions/client/Client.js");
|
|
51
|
+
const Client_js_5 = require("./api/resources/files/client/Client.js");
|
|
52
|
+
const Client_js_6 = require("./api/resources/folders/client/Client.js");
|
|
53
|
+
const Client_js_7 = require("./api/resources/groups/client/Client.js");
|
|
54
|
+
const Client_js_8 = require("./api/resources/metadata/client/Client.js");
|
|
55
|
+
const Client_js_9 = require("./api/resources/metadataFields/client/Client.js");
|
|
56
|
+
const Client_js_10 = require("./api/resources/projectPermissions/client/Client.js");
|
|
57
|
+
const Client_js_11 = require("./api/resources/projects/client/Client.js");
|
|
58
|
+
const Client_js_12 = require("./api/resources/shares/client/Client.js");
|
|
59
|
+
const Client_js_13 = require("./api/resources/users/client/Client.js");
|
|
60
|
+
const Client_js_14 = require("./api/resources/versionStacks/client/Client.js");
|
|
61
|
+
const Client_js_15 = require("./api/resources/webhooks/client/Client.js");
|
|
62
|
+
const Client_js_16 = require("./api/resources/workspacePermissions/client/Client.js");
|
|
63
|
+
const Client_js_17 = require("./api/resources/workspaces/client/Client.js");
|
|
62
64
|
const BaseClient_js_1 = require("./BaseClient.js");
|
|
63
65
|
const core = __importStar(require("./core/index.js"));
|
|
64
66
|
class FrameioClient {
|
|
65
67
|
constructor(options) {
|
|
66
68
|
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
67
69
|
}
|
|
70
|
+
get customActions() {
|
|
71
|
+
var _a;
|
|
72
|
+
return ((_a = this._customActions) !== null && _a !== void 0 ? _a : (this._customActions = new Client_js_4.CustomActionsClient(this._options)));
|
|
73
|
+
}
|
|
68
74
|
get metadataFields() {
|
|
69
75
|
var _a;
|
|
70
|
-
return ((_a = this._metadataFields) !== null && _a !== void 0 ? _a : (this._metadataFields = new
|
|
76
|
+
return ((_a = this._metadataFields) !== null && _a !== void 0 ? _a : (this._metadataFields = new Client_js_9.MetadataFieldsClient(this._options)));
|
|
71
77
|
}
|
|
72
78
|
get projectPermissions() {
|
|
73
79
|
var _a;
|
|
74
|
-
return ((_a = this._projectPermissions) !== null && _a !== void 0 ? _a : (this._projectPermissions = new
|
|
80
|
+
return ((_a = this._projectPermissions) !== null && _a !== void 0 ? _a : (this._projectPermissions = new Client_js_10.ProjectPermissionsClient(this._options)));
|
|
75
81
|
}
|
|
76
82
|
get folders() {
|
|
77
83
|
var _a;
|
|
78
|
-
return ((_a = this._folders) !== null && _a !== void 0 ? _a : (this._folders = new
|
|
84
|
+
return ((_a = this._folders) !== null && _a !== void 0 ? _a : (this._folders = new Client_js_6.FoldersClient(this._options)));
|
|
79
85
|
}
|
|
80
86
|
get versionStacks() {
|
|
81
87
|
var _a;
|
|
82
|
-
return ((_a = this._versionStacks) !== null && _a !== void 0 ? _a : (this._versionStacks = new
|
|
88
|
+
return ((_a = this._versionStacks) !== null && _a !== void 0 ? _a : (this._versionStacks = new Client_js_14.VersionStacksClient(this._options)));
|
|
83
89
|
}
|
|
84
90
|
get accountPermissions() {
|
|
85
91
|
var _a;
|
|
@@ -95,35 +101,39 @@ class FrameioClient {
|
|
|
95
101
|
}
|
|
96
102
|
get webhooks() {
|
|
97
103
|
var _a;
|
|
98
|
-
return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new
|
|
104
|
+
return ((_a = this._webhooks) !== null && _a !== void 0 ? _a : (this._webhooks = new Client_js_15.WebhooksClient(this._options)));
|
|
99
105
|
}
|
|
100
106
|
get workspacePermissions() {
|
|
101
107
|
var _a;
|
|
102
|
-
return ((_a = this._workspacePermissions) !== null && _a !== void 0 ? _a : (this._workspacePermissions = new
|
|
108
|
+
return ((_a = this._workspacePermissions) !== null && _a !== void 0 ? _a : (this._workspacePermissions = new Client_js_16.WorkspacePermissionsClient(this._options)));
|
|
109
|
+
}
|
|
110
|
+
get groups() {
|
|
111
|
+
var _a;
|
|
112
|
+
return ((_a = this._groups) !== null && _a !== void 0 ? _a : (this._groups = new Client_js_7.GroupsClient(this._options)));
|
|
103
113
|
}
|
|
104
114
|
get shares() {
|
|
105
115
|
var _a;
|
|
106
|
-
return ((_a = this._shares) !== null && _a !== void 0 ? _a : (this._shares = new
|
|
116
|
+
return ((_a = this._shares) !== null && _a !== void 0 ? _a : (this._shares = new Client_js_12.SharesClient(this._options)));
|
|
107
117
|
}
|
|
108
118
|
get metadata() {
|
|
109
119
|
var _a;
|
|
110
|
-
return ((_a = this._metadata) !== null && _a !== void 0 ? _a : (this._metadata = new
|
|
120
|
+
return ((_a = this._metadata) !== null && _a !== void 0 ? _a : (this._metadata = new Client_js_8.MetadataClient(this._options)));
|
|
111
121
|
}
|
|
112
122
|
get files() {
|
|
113
123
|
var _a;
|
|
114
|
-
return ((_a = this._files) !== null && _a !== void 0 ? _a : (this._files = new
|
|
124
|
+
return ((_a = this._files) !== null && _a !== void 0 ? _a : (this._files = new Client_js_5.FilesClient(this._options)));
|
|
115
125
|
}
|
|
116
126
|
get users() {
|
|
117
127
|
var _a;
|
|
118
|
-
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new
|
|
128
|
+
return ((_a = this._users) !== null && _a !== void 0 ? _a : (this._users = new Client_js_13.UsersClient(this._options)));
|
|
119
129
|
}
|
|
120
130
|
get projects() {
|
|
121
131
|
var _a;
|
|
122
|
-
return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new
|
|
132
|
+
return ((_a = this._projects) !== null && _a !== void 0 ? _a : (this._projects = new Client_js_11.ProjectsClient(this._options)));
|
|
123
133
|
}
|
|
124
134
|
get workspaces() {
|
|
125
135
|
var _a;
|
|
126
|
-
return ((_a = this._workspaces) !== null && _a !== void 0 ? _a : (this._workspaces = new
|
|
136
|
+
return ((_a = this._workspaces) !== null && _a !== void 0 ? _a : (this._workspaces = new Client_js_17.WorkspacesClient(this._options)));
|
|
127
137
|
}
|
|
128
138
|
/**
|
|
129
139
|
* Make a passthrough request using the SDK's configured auth, retry, logging, etc.
|
|
@@ -85,17 +85,17 @@ class AccountPermissionsClient {
|
|
|
85
85
|
return __awaiter(this, arguments, void 0, function* (account_id, _request = {}, requestOptions) {
|
|
86
86
|
var _a, _b;
|
|
87
87
|
const list = core.HttpResponsePromise.interceptFunction((_requestUrl) => __awaiter(this, void 0, void 0, function* () {
|
|
88
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
88
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
89
89
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
90
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
91
|
-
const _response = yield ((
|
|
90
|
+
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);
|
|
91
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
92
92
|
url: _requestUrl,
|
|
93
93
|
method: "GET",
|
|
94
94
|
headers: _headers,
|
|
95
|
-
timeoutMs: ((
|
|
96
|
-
maxRetries: (
|
|
95
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
96
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
97
97
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
98
|
-
fetchFn: (
|
|
98
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
99
99
|
logging: this._options.logging,
|
|
100
100
|
});
|
|
101
101
|
if (_response.ok) {
|
|
@@ -83,17 +83,17 @@ class AccountsClient {
|
|
|
83
83
|
return __awaiter(this, arguments, void 0, function* (_request = {}, requestOptions) {
|
|
84
84
|
var _a, _b;
|
|
85
85
|
const list = core.HttpResponsePromise.interceptFunction((_requestUrl) => __awaiter(this, void 0, void 0, function* () {
|
|
86
|
-
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
86
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
87
87
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
88
|
-
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
89
|
-
const _response = yield ((
|
|
88
|
+
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);
|
|
89
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
90
90
|
url: _requestUrl,
|
|
91
91
|
method: "GET",
|
|
92
92
|
headers: _headers,
|
|
93
|
-
timeoutMs: ((
|
|
94
|
-
maxRetries: (
|
|
93
|
+
timeoutMs: ((_f = (_d = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _d !== void 0 ? _d : (_e = this._options) === null || _e === void 0 ? void 0 : _e.timeoutInSeconds) !== null && _f !== void 0 ? _f : 60) * 1000,
|
|
94
|
+
maxRetries: (_g = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _g !== void 0 ? _g : (_h = this._options) === null || _h === void 0 ? void 0 : _h.maxRetries,
|
|
95
95
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
96
|
-
fetchFn: (
|
|
96
|
+
fetchFn: (_j = this._options) === null || _j === void 0 ? void 0 : _j.fetch,
|
|
97
97
|
logging: this._options.logging,
|
|
98
98
|
});
|
|
99
99
|
if (_response.ok) {
|
|
@@ -166,7 +166,7 @@ class AccountsClient {
|
|
|
166
166
|
}
|
|
167
167
|
__auditlogIndex(account_id_1) {
|
|
168
168
|
return __awaiter(this, arguments, void 0, function* (account_id, request = {}, requestOptions) {
|
|
169
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
169
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
|
|
170
170
|
const { include, filters, after, page_size: pageSize, include_total_count: includeTotalCount } = request;
|
|
171
171
|
const _queryParams = {
|
|
172
172
|
include: include != null ? include : undefined,
|
|
@@ -176,16 +176,16 @@ class AccountsClient {
|
|
|
176
176
|
include_total_count: includeTotalCount,
|
|
177
177
|
};
|
|
178
178
|
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
179
|
-
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)({ "api-version": "4.0" }), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
180
|
-
const _response = yield ((
|
|
181
|
-
url: core.url.join((
|
|
179
|
+
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)({ "api-version": "4.0", "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);
|
|
180
|
+
const _response = yield ((_c = this._options.fetcher) !== null && _c !== void 0 ? _c : core.fetcher)({
|
|
181
|
+
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)}/audit_logs`),
|
|
182
182
|
method: "GET",
|
|
183
183
|
headers: _headers,
|
|
184
184
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
185
|
-
timeoutMs: ((
|
|
186
|
-
maxRetries: (
|
|
185
|
+
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,
|
|
186
|
+
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,
|
|
187
187
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
188
|
-
fetchFn: (
|
|
188
|
+
fetchFn: (_l = this._options) === null || _l === void 0 ? void 0 : _l.fetch,
|
|
189
189
|
logging: this._options.logging,
|
|
190
190
|
});
|
|
191
191
|
if (_response.ok) {
|