frameio 2.0.3 → 3.0.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.d.ts +40 -0
- package/dist/cjs/BaseClient.js +62 -0
- package/dist/cjs/Client.d.ts +62 -68
- package/dist/cjs/Client.js +65 -39
- package/dist/cjs/api/errors/BadRequestError.d.ts +2 -2
- package/dist/cjs/api/errors/BadRequestError.js +5 -1
- package/dist/cjs/api/errors/ConflictError.d.ts +2 -2
- package/dist/cjs/api/errors/ConflictError.js +5 -1
- package/dist/cjs/api/errors/ForbiddenError.d.ts +2 -2
- package/dist/cjs/api/errors/ForbiddenError.js +5 -1
- package/dist/cjs/api/errors/NotFoundError.d.ts +2 -2
- package/dist/cjs/api/errors/NotFoundError.js +5 -1
- package/dist/cjs/api/errors/TooManyRequestsError.d.ts +2 -2
- package/dist/cjs/api/errors/TooManyRequestsError.js +5 -1
- package/dist/cjs/api/errors/UnauthorizedError.d.ts +2 -2
- package/dist/cjs/api/errors/UnauthorizedError.js +5 -1
- package/dist/cjs/api/errors/UnprocessableEntityError.d.ts +1 -1
- package/dist/cjs/api/errors/UnprocessableEntityError.js +5 -1
- package/dist/cjs/api/errors/index.d.ts +3 -3
- package/dist/cjs/api/errors/index.js +3 -3
- package/dist/cjs/api/index.d.ts +1 -1
- package/dist/cjs/api/index.js +1 -1
- package/dist/cjs/api/resources/accountPermissions/client/Client.d.ts +11 -30
- package/dist/cjs/api/resources/accountPermissions/client/Client.js +71 -86
- package/dist/cjs/api/resources/accountPermissions/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/accountPermissions/client/requests/AccountPermissionsIndexRequest.d.ts +1 -3
- package/dist/cjs/api/resources/accountPermissions/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/accountPermissions/exports.d.ts +2 -0
- package/dist/cjs/api/resources/accountPermissions/exports.js +21 -0
- package/dist/cjs/api/resources/accounts/client/Client.d.ts +13 -32
- package/dist/cjs/api/resources/accounts/client/Client.js +89 -124
- package/dist/cjs/api/resources/accounts/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/accounts/client/requests/AccountsIndexRequest.d.ts +1 -3
- package/dist/cjs/api/resources/accounts/client/requests/AuditlogIndexRequest.d.ts +1 -5
- package/dist/cjs/api/resources/accounts/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/accounts/exports.d.ts +2 -0
- package/dist/cjs/api/resources/accounts/exports.js +21 -0
- package/dist/cjs/api/resources/comments/client/Client.d.ts +28 -47
- package/dist/cjs/api/resources/comments/client/Client.js +143 -210
- package/dist/cjs/api/resources/comments/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/comments/client/requests/CommentsIndexRequest.d.ts +1 -5
- package/dist/cjs/api/resources/comments/client/requests/CommentsShowRequest.d.ts +1 -3
- package/dist/cjs/api/resources/comments/client/requests/CreateCommentParams.d.ts +5 -6
- package/dist/cjs/api/resources/comments/client/requests/UpdateCommentParams.d.ts +6 -7
- package/dist/cjs/api/resources/comments/client/requests/index.d.ts +4 -4
- package/dist/cjs/api/resources/comments/exports.d.ts +2 -0
- package/dist/cjs/api/resources/comments/exports.js +21 -0
- package/dist/cjs/api/resources/comments/index.d.ts +1 -1
- package/dist/cjs/api/resources/comments/index.js +1 -1
- package/dist/cjs/api/resources/comments/types/index.d.ts +1 -1
- package/dist/cjs/api/resources/comments/types/index.js +1 -1
- package/dist/cjs/api/resources/files/client/Client.d.ts +54 -70
- package/dist/cjs/api/resources/files/client/Client.js +194 -329
- package/dist/cjs/api/resources/files/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/files/client/requests/FileCopyParams.d.ts +2 -2
- package/dist/cjs/api/resources/files/client/requests/FileCreateParams.d.ts +1 -1
- package/dist/cjs/api/resources/files/client/requests/FileMoveParams.d.ts +1 -1
- package/dist/cjs/api/resources/files/client/requests/FileUpdateParams.d.ts +1 -1
- package/dist/cjs/api/resources/files/client/requests/FilesListRequest.d.ts +1 -4
- package/dist/cjs/api/resources/files/client/requests/FilesShowRequest.d.ts +1 -2
- package/dist/cjs/api/resources/files/client/requests/index.d.ts +9 -9
- package/dist/cjs/api/resources/files/exports.d.ts +2 -0
- package/dist/cjs/api/resources/files/exports.js +21 -0
- package/dist/cjs/api/resources/files/index.d.ts +1 -1
- package/dist/cjs/api/resources/files/index.js +1 -1
- package/dist/cjs/api/resources/files/types/index.d.ts +1 -1
- package/dist/cjs/api/resources/files/types/index.js +1 -1
- package/dist/cjs/api/resources/folders/client/Client.d.ts +40 -58
- package/dist/cjs/api/resources/folders/client/Client.js +153 -262
- package/dist/cjs/api/resources/folders/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/folders/client/requests/FolderCopyParams.d.ts +1 -1
- package/dist/cjs/api/resources/folders/client/requests/FolderCreateParams.d.ts +1 -1
- package/dist/cjs/api/resources/folders/client/requests/FolderMoveParams.d.ts +1 -1
- package/dist/cjs/api/resources/folders/client/requests/FolderUpdateParams.d.ts +1 -1
- package/dist/cjs/api/resources/folders/client/requests/FoldersIndexRequest.d.ts +1 -5
- package/dist/cjs/api/resources/folders/client/requests/FoldersListRequest.d.ts +1 -4
- package/dist/cjs/api/resources/folders/client/requests/FoldersShowRequest.d.ts +1 -2
- package/dist/cjs/api/resources/folders/client/requests/index.d.ts +7 -7
- package/dist/cjs/api/resources/folders/exports.d.ts +2 -0
- package/dist/cjs/api/resources/folders/exports.js +21 -0
- package/dist/cjs/api/resources/folders/index.d.ts +1 -1
- package/dist/cjs/api/resources/folders/index.js +1 -1
- package/dist/cjs/api/resources/folders/types/index.d.ts +1 -1
- package/dist/cjs/api/resources/folders/types/index.js +1 -1
- package/dist/cjs/api/resources/index.d.ts +24 -24
- package/dist/cjs/api/resources/index.js +28 -28
- package/dist/cjs/api/resources/metadata/client/Client.d.ts +16 -34
- package/dist/cjs/api/resources/metadata/client/Client.js +44 -70
- package/dist/cjs/api/resources/metadata/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.ts +2 -2
- package/dist/cjs/api/resources/metadata/client/requests/MetadataShowRequest.d.ts +0 -1
- package/dist/cjs/api/resources/metadata/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/metadata/exports.d.ts +2 -0
- package/dist/cjs/api/resources/metadata/exports.js +21 -0
- package/dist/cjs/api/resources/metadataFields/client/Client.d.ts +22 -40
- package/dist/cjs/api/resources/metadataFields/client/Client.js +77 -131
- package/dist/cjs/api/resources/metadataFields/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/metadataFields/client/requests/CreateFieldDefinitionParams.d.ts +1 -1
- package/dist/cjs/api/resources/metadataFields/client/requests/MetadataFieldDefinitionsIndexRequest.d.ts +1 -4
- package/dist/cjs/api/resources/metadataFields/client/requests/UpdateFieldDefinitionParams.d.ts +1 -1
- package/dist/cjs/api/resources/metadataFields/client/requests/index.d.ts +3 -3
- package/dist/cjs/api/resources/metadataFields/exports.d.ts +2 -0
- package/dist/cjs/api/resources/metadataFields/exports.js +21 -0
- package/dist/cjs/api/resources/metadataFields/index.d.ts +1 -1
- package/dist/cjs/api/resources/metadataFields/index.js +1 -1
- package/dist/cjs/api/resources/metadataFields/types/CreateFieldDefinitionParamsData.d.ts +3 -3
- package/dist/cjs/api/resources/metadataFields/types/UpdateFieldDefinitionParamsData.d.ts +3 -3
- package/dist/cjs/api/resources/metadataFields/types/index.d.ts +1 -1
- package/dist/cjs/api/resources/metadataFields/types/index.js +1 -1
- package/dist/cjs/api/resources/projectPermissions/client/Client.d.ts +22 -41
- package/dist/cjs/api/resources/projectPermissions/client/Client.js +104 -141
- package/dist/cjs/api/resources/projectPermissions/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/projectPermissions/client/requests/ProjectPermissionsIndexRequest.d.ts +1 -3
- package/dist/cjs/api/resources/projectPermissions/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/projectPermissions/exports.d.ts +2 -0
- package/dist/cjs/api/resources/projectPermissions/exports.js +21 -0
- package/dist/cjs/api/resources/projects/client/Client.d.ts +28 -47
- package/dist/cjs/api/resources/projects/client/Client.js +136 -196
- package/dist/cjs/api/resources/projects/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/projects/client/requests/ProjectParams.d.ts +1 -1
- package/dist/cjs/api/resources/projects/client/requests/ProjectUpdateParams.d.ts +3 -3
- package/dist/cjs/api/resources/projects/client/requests/ProjectsIndexRequest.d.ts +1 -4
- package/dist/cjs/api/resources/projects/client/requests/ProjectsShowRequest.d.ts +0 -1
- package/dist/cjs/api/resources/projects/client/requests/index.d.ts +4 -4
- package/dist/cjs/api/resources/projects/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/projects/exports.d.ts +2 -0
- package/dist/cjs/api/resources/projects/exports.js +21 -0
- package/dist/cjs/api/resources/shares/client/Client.d.ts +49 -69
- package/dist/cjs/api/resources/shares/client/Client.js +252 -364
- package/dist/cjs/api/resources/shares/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/shares/client/requests/AddReviewersToShareParams.d.ts +4 -4
- package/dist/cjs/api/resources/shares/client/requests/CreateShareParams.d.ts +1 -1
- package/dist/cjs/api/resources/shares/client/requests/RemoveReviewerParams.d.ts +4 -4
- package/dist/cjs/api/resources/shares/client/requests/SharesIndexRequest.d.ts +1 -3
- package/dist/cjs/api/resources/shares/client/requests/SharesListReviewersRequest.d.ts +1 -3
- package/dist/cjs/api/resources/shares/client/requests/UpdateShareParams.d.ts +6 -6
- package/dist/cjs/api/resources/shares/client/requests/index.d.ts +7 -7
- package/dist/cjs/api/resources/shares/client/requests/index.js +3 -0
- package/dist/cjs/api/resources/shares/exports.d.ts +2 -0
- package/dist/cjs/api/resources/shares/exports.js +21 -0
- package/dist/cjs/api/resources/shares/index.d.ts +1 -1
- package/dist/cjs/api/resources/shares/index.js +1 -1
- package/dist/cjs/api/resources/shares/types/CreateShareParamsData.d.ts +1 -1
- package/dist/cjs/api/resources/users/client/Client.d.ts +10 -28
- package/dist/cjs/api/resources/users/client/Client.js +19 -33
- package/dist/cjs/api/resources/users/exports.d.ts +2 -0
- package/dist/cjs/api/resources/users/exports.js +21 -0
- package/dist/cjs/api/resources/versionStacks/client/Client.d.ts +32 -50
- package/dist/cjs/api/resources/versionStacks/client/Client.js +122 -207
- package/dist/cjs/api/resources/versionStacks/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/versionStacks/client/requests/VersionStackCopyParams.d.ts +1 -1
- package/dist/cjs/api/resources/versionStacks/client/requests/VersionStackMoveParams.d.ts +1 -1
- package/dist/cjs/api/resources/versionStacks/client/requests/VersionStacksIndexRequest.d.ts +1 -4
- package/dist/cjs/api/resources/versionStacks/client/requests/VersionStacksListRequest.d.ts +1 -4
- package/dist/cjs/api/resources/versionStacks/client/requests/VersionStacksShowRequest.d.ts +1 -2
- package/dist/cjs/api/resources/versionStacks/client/requests/index.d.ts +6 -6
- package/dist/cjs/api/resources/versionStacks/exports.d.ts +2 -0
- package/dist/cjs/api/resources/versionStacks/exports.js +21 -0
- package/dist/cjs/api/resources/versionStacks/index.d.ts +1 -1
- package/dist/cjs/api/resources/versionStacks/index.js +1 -1
- package/dist/cjs/api/resources/versionStacks/types/index.d.ts +1 -1
- package/dist/cjs/api/resources/versionStacks/types/index.js +1 -1
- package/dist/cjs/api/resources/webhooks/client/Client.d.ts +28 -47
- package/dist/cjs/api/resources/webhooks/client/Client.js +136 -196
- package/dist/cjs/api/resources/webhooks/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/webhooks/client/requests/WebhookCreateParams.d.ts +1 -1
- package/dist/cjs/api/resources/webhooks/client/requests/WebhookUpdateParams.d.ts +5 -5
- package/dist/cjs/api/resources/webhooks/client/requests/WebhooksIndexRequest.d.ts +1 -4
- package/dist/cjs/api/resources/webhooks/client/requests/WebhooksShowRequest.d.ts +0 -1
- package/dist/cjs/api/resources/webhooks/client/requests/index.d.ts +4 -4
- package/dist/cjs/api/resources/webhooks/exports.d.ts +2 -0
- package/dist/cjs/api/resources/webhooks/exports.js +21 -0
- package/dist/cjs/api/resources/workspacePermissions/client/Client.d.ts +22 -41
- package/dist/cjs/api/resources/workspacePermissions/client/Client.js +104 -141
- package/dist/cjs/api/resources/workspacePermissions/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/workspacePermissions/client/requests/WorkspacePermissionsIndexRequest.d.ts +1 -3
- package/dist/cjs/api/resources/workspacePermissions/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/workspacePermissions/exports.d.ts +2 -0
- package/dist/cjs/api/resources/workspacePermissions/exports.js +21 -0
- package/dist/cjs/api/resources/workspaces/client/Client.d.ts +26 -45
- package/dist/cjs/api/resources/workspaces/client/Client.js +134 -197
- package/dist/cjs/api/resources/workspaces/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/workspaces/client/requests/WorkspacesIndexRequest.d.ts +1 -4
- package/dist/cjs/api/resources/workspaces/client/requests/WorkspacesShowRequest.d.ts +0 -1
- package/dist/cjs/api/resources/workspaces/client/requests/index.d.ts +2 -2
- package/dist/cjs/api/resources/workspaces/exports.d.ts +2 -0
- package/dist/cjs/api/resources/workspaces/exports.js +21 -0
- package/dist/cjs/api/types/Account.d.ts +4 -4
- package/dist/cjs/api/types/AccountUserRole.d.ts +2 -2
- package/dist/cjs/api/types/AccountUserRolesResponse.d.ts +2 -2
- package/dist/cjs/api/types/AccountsResponse.d.ts +2 -2
- package/dist/cjs/api/types/AddAssetResponse.d.ts +1 -1
- package/dist/cjs/api/types/AssetCommon.d.ts +1 -1
- package/dist/cjs/api/types/AssetCommonWithIncludes.d.ts +5 -5
- package/dist/cjs/api/types/AssetShareParams.d.ts +5 -5
- package/dist/cjs/api/types/AssetWithIncludes.d.ts +3 -3
- package/dist/cjs/api/types/AuditLogsWithIncludesResponse.d.ts +2 -2
- package/dist/cjs/api/types/AuditLogwithIncludes.d.ts +4 -4
- package/dist/cjs/api/types/BadRequest.d.ts +3 -3
- package/dist/cjs/api/types/BooleanValue.d.ts +2 -2
- package/dist/cjs/api/types/Comment.d.ts +6 -6
- package/dist/cjs/api/types/CommentResponse.d.ts +1 -1
- package/dist/cjs/api/types/CommentWithIncludes.d.ts +3 -3
- package/dist/cjs/api/types/CommentWithIncludesResponse.d.ts +1 -1
- package/dist/cjs/api/types/CommentsWithIncludesResponse.d.ts +2 -2
- package/dist/cjs/api/types/Conflict.d.ts +3 -3
- package/dist/cjs/api/types/DateDefinition.d.ts +3 -4
- package/dist/cjs/api/types/DateDefinitionParams.d.ts +3 -4
- package/dist/cjs/api/types/DateDefinitionWithIncludes.d.ts +2 -2
- package/dist/cjs/api/types/DateValue.d.ts +2 -2
- package/dist/cjs/api/types/FieldDefinition.d.ts +3 -3
- package/dist/cjs/api/types/FieldDefinitionResponse.d.ts +1 -1
- package/dist/cjs/api/types/FieldDefinitionWithIncludes.d.ts +3 -3
- package/dist/cjs/api/types/FieldDefinitionsWithIncludesResponse.d.ts +2 -2
- package/dist/cjs/api/types/FileAssetsWithIncludesResponse.d.ts +2 -2
- package/dist/cjs/api/types/FileCopyResponse.d.ts +1 -1
- package/dist/cjs/api/types/FileRemoteUploadResponse.d.ts +1 -1
- package/dist/cjs/api/types/FileResponse.d.ts +1 -1
- package/dist/cjs/api/types/FileUploadStatus.d.ts +2 -2
- package/dist/cjs/api/types/FileUploadStatusResponse.d.ts +1 -1
- package/dist/cjs/api/types/FileWithIncludes.d.ts +2 -2
- package/dist/cjs/api/types/FileWithIncludesResponse.d.ts +1 -1
- package/dist/cjs/api/types/FileWithUploadUrls.d.ts +2 -2
- package/dist/cjs/api/types/FileWithUploadUrlsResponse.d.ts +1 -1
- package/dist/cjs/api/types/File_.d.ts +3 -3
- package/dist/cjs/api/types/Filters.d.ts +9 -9
- package/dist/cjs/api/types/Folder.d.ts +2 -2
- package/dist/cjs/api/types/FolderAssetsWithIncludesResponse.d.ts +2 -2
- package/dist/cjs/api/types/FolderCopyResponse.d.ts +1 -1
- package/dist/cjs/api/types/FolderResponse.d.ts +1 -1
- package/dist/cjs/api/types/FolderWithIncludes.d.ts +6 -6
- package/dist/cjs/api/types/FolderWithIncludesResponse.d.ts +1 -1
- package/dist/cjs/api/types/FoldersWithIncludesResponse.d.ts +2 -2
- package/dist/cjs/api/types/Forbidden.d.ts +3 -3
- package/dist/cjs/api/types/IntegerValue.d.ts +2 -2
- package/dist/cjs/api/types/Links.d.ts +1 -1
- package/dist/cjs/api/types/LongTextDefinition.d.ts +1 -2
- package/dist/cjs/api/types/LongTextDefinitionWithIncludes.d.ts +2 -2
- package/dist/cjs/api/types/MediaLinkCommon.d.ts +1 -1
- package/dist/cjs/api/types/MediaLinksCollection.d.ts +8 -8
- package/dist/cjs/api/types/MetadataField.d.ts +3 -3
- package/dist/cjs/api/types/MetadataResponse.d.ts +1 -1
- package/dist/cjs/api/types/MetadataWithDefinition.d.ts +1 -1
- package/dist/cjs/api/types/MultiSelectValue.d.ts +2 -2
- package/dist/cjs/api/types/MultiUserValue.d.ts +3 -3
- package/dist/cjs/api/types/NotFound.d.ts +3 -3
- package/dist/cjs/api/types/NumberDefinition.d.ts +1 -1
- package/dist/cjs/api/types/NumberDefinitionParams.d.ts +1 -1
- package/dist/cjs/api/types/NumberDefinitionWithIncludes.d.ts +2 -2
- package/dist/cjs/api/types/NumberValue.d.ts +2 -2
- package/dist/cjs/api/types/OriginalMediaLink.d.ts +2 -2
- package/dist/cjs/api/types/Profile.d.ts +1 -1
- package/dist/cjs/api/types/ProfileResponse.d.ts +1 -1
- package/dist/cjs/api/types/Project.d.ts +1 -1
- package/dist/cjs/api/types/ProjectResponse.d.ts +1 -1
- package/dist/cjs/api/types/ProjectUserRolesResponse.d.ts +2 -2
- package/dist/cjs/api/types/ProjectWithIncludes.d.ts +3 -3
- package/dist/cjs/api/types/ProjectWithIncludesResponse.d.ts +1 -1
- package/dist/cjs/api/types/ProjectsWithIncludesResponse.d.ts +2 -2
- package/dist/cjs/api/types/RatingDefinition.d.ts +2 -2
- package/dist/cjs/api/types/RatingDefinitionParams.d.ts +2 -2
- package/dist/cjs/api/types/RatingDefinitionWithIncludes.d.ts +2 -2
- package/dist/cjs/api/types/RemoveAssetResponse.d.ts +1 -1
- package/dist/cjs/api/types/RenditionMediaLink.d.ts +2 -2
- package/dist/cjs/api/types/SelectDefinition.d.ts +3 -3
- package/dist/cjs/api/types/SelectDefinitionParams.d.ts +2 -2
- package/dist/cjs/api/types/SelectDefinitionWithIncludes.d.ts +2 -2
- package/dist/cjs/api/types/SelectMultiDefinition.d.ts +3 -3
- package/dist/cjs/api/types/SelectMultiDefinitionParams.d.ts +2 -2
- package/dist/cjs/api/types/SelectMultiDefinitionWithIncludes.d.ts +2 -2
- package/dist/cjs/api/types/SelectValue.d.ts +2 -2
- package/dist/cjs/api/types/Share.d.ts +6 -6
- package/dist/cjs/api/types/ShareResponse.d.ts +1 -1
- package/dist/cjs/api/types/ShareReviewersResponse.d.ts +2 -2
- package/dist/cjs/api/types/SharesResponse.d.ts +2 -2
- package/dist/cjs/api/types/SingleUserValue.d.ts +3 -3
- package/dist/cjs/api/types/TextDefinition.d.ts +1 -2
- package/dist/cjs/api/types/TextDefinitionWithIncludes.d.ts +2 -2
- package/dist/cjs/api/types/TextValue.d.ts +2 -2
- package/dist/cjs/api/types/ToggleDefinition.d.ts +1 -1
- package/dist/cjs/api/types/ToggleDefinitionParams.d.ts +2 -2
- package/dist/cjs/api/types/ToggleDefinitionWithIncludes.d.ts +2 -2
- package/dist/cjs/api/types/TooManyRequests.d.ts +3 -3
- package/dist/cjs/api/types/Unauthorized.d.ts +3 -3
- package/dist/cjs/api/types/UnprocessableContent.d.ts +3 -3
- package/dist/cjs/api/types/UpdateDateDefinitionParams.d.ts +6 -7
- package/dist/cjs/api/types/UpdateLongTextDefinitionParams.d.ts +1 -1
- package/dist/cjs/api/types/UpdateNumberDefinitionParams.d.ts +4 -4
- package/dist/cjs/api/types/UpdateRatingDefinitionParams.d.ts +5 -5
- package/dist/cjs/api/types/UpdateSelectDefinitionParams.d.ts +5 -5
- package/dist/cjs/api/types/UpdateSelectMultiDefinitionParams.d.ts +5 -5
- package/dist/cjs/api/types/UpdateTextDefinitionParams.d.ts +1 -1
- package/dist/cjs/api/types/UpdateToggleDefinitionParams.d.ts +3 -3
- package/dist/cjs/api/types/UpdateUserMultiDefinitionParams.d.ts +3 -4
- package/dist/cjs/api/types/UpdateUserRolesResponse.d.ts +1 -1
- package/dist/cjs/api/types/UpdateUserSingleDefinitionParams.d.ts +3 -4
- package/dist/cjs/api/types/User.d.ts +5 -5
- package/dist/cjs/api/types/UserMultiDefinition.d.ts +0 -1
- package/dist/cjs/api/types/UserMultiDefinitionParams.d.ts +1 -2
- package/dist/cjs/api/types/UserMultiDefinitionWithIncludes.d.ts +2 -2
- package/dist/cjs/api/types/UserRole.d.ts +1 -1
- package/dist/cjs/api/types/UserSingleDefinition.d.ts +0 -1
- package/dist/cjs/api/types/UserSingleDefinitionParams.d.ts +1 -2
- package/dist/cjs/api/types/UserSingleDefinitionWithIncludes.d.ts +2 -2
- package/dist/cjs/api/types/VersionStack.d.ts +2 -2
- package/dist/cjs/api/types/VersionStackAssetsWithIncludesResponse.d.ts +2 -2
- package/dist/cjs/api/types/VersionStackCopyResponse.d.ts +1 -1
- package/dist/cjs/api/types/VersionStackResponse.d.ts +1 -1
- package/dist/cjs/api/types/VersionStackWithIncludes.d.ts +6 -6
- package/dist/cjs/api/types/VersionStackWithIncludesResponse.d.ts +1 -1
- package/dist/cjs/api/types/VersionStacksWithIncludesResponse.d.ts +2 -2
- package/dist/cjs/api/types/Webhook.d.ts +3 -3
- package/dist/cjs/api/types/WebhookCreateResponse.d.ts +1 -1
- package/dist/cjs/api/types/WebhookResponse.d.ts +1 -1
- package/dist/cjs/api/types/WebhookWithIncludes.d.ts +2 -2
- package/dist/cjs/api/types/WebhookWithIncludesResponse.d.ts +1 -1
- package/dist/cjs/api/types/WebhooksWithIncludesResponse.d.ts +2 -2
- package/dist/cjs/api/types/WorkspaceParams.d.ts +1 -1
- package/dist/cjs/api/types/WorkspaceResponse.d.ts +1 -1
- package/dist/cjs/api/types/WorkspaceUserRolesResponse.d.ts +2 -2
- package/dist/cjs/api/types/WorkspaceWithIncludes.d.ts +2 -2
- package/dist/cjs/api/types/WorkspaceWithIncludesResponse.d.ts +1 -1
- package/dist/cjs/api/types/WorkspacesWithIncludesResponse.d.ts +2 -2
- package/dist/cjs/api/types/index.d.ts +143 -143
- package/dist/cjs/api/types/index.js +143 -143
- package/dist/cjs/auth/BearerAuthProvider.d.ts +20 -0
- package/dist/cjs/auth/BearerAuthProvider.js +79 -0
- package/dist/cjs/auth/index.d.ts +1 -0
- package/dist/cjs/auth/index.js +5 -0
- package/dist/cjs/core/auth/AuthProvider.d.ts +5 -2
- package/dist/cjs/core/auth/BearerToken.d.ts +3 -1
- package/dist/cjs/core/auth/BearerToken.js +7 -6
- package/dist/cjs/core/auth/NoOpAuthProvider.d.ts +5 -0
- package/dist/cjs/core/auth/NoOpAuthProvider.js +9 -0
- package/dist/cjs/core/auth/index.d.ts +1 -0
- package/dist/cjs/core/auth/index.js +3 -1
- package/dist/cjs/core/exports.d.ts +2 -0
- package/dist/cjs/core/exports.js +18 -0
- package/dist/cjs/core/fetcher/APIResponse.d.ts +1 -1
- package/dist/cjs/core/fetcher/BinaryResponse.d.ts +5 -6
- package/dist/cjs/core/fetcher/EndpointSupplier.d.ts +4 -4
- package/dist/cjs/core/fetcher/Fetcher.d.ts +12 -6
- package/dist/cjs/core/fetcher/Fetcher.js +210 -9
- package/dist/cjs/core/fetcher/HttpResponsePromise.d.ts +1 -1
- package/dist/cjs/core/fetcher/getErrorResponseBody.js +2 -1
- package/dist/cjs/core/fetcher/getRequestBody.d.ts +1 -1
- package/dist/cjs/core/fetcher/getRequestBody.js +4 -0
- package/dist/cjs/core/fetcher/getResponseBody.js +21 -7
- package/dist/cjs/core/fetcher/index.d.ts +2 -0
- package/dist/cjs/core/fetcher/index.js +3 -1
- package/dist/cjs/core/fetcher/makePassthroughRequest.d.ts +49 -0
- package/dist/cjs/core/fetcher/makePassthroughRequest.js +135 -0
- package/dist/cjs/core/fetcher/makeRequest.d.ts +6 -1
- package/dist/cjs/core/fetcher/makeRequest.js +32 -13
- package/dist/cjs/core/fetcher/requestWithRetries.js +3 -12
- package/dist/cjs/core/fetcher/signals.d.ts +1 -7
- package/dist/cjs/core/fetcher/signals.js +0 -12
- package/dist/cjs/core/headers.d.ts +2 -2
- package/dist/cjs/core/headers.js +6 -4
- package/dist/cjs/core/index.d.ts +4 -2
- package/dist/cjs/core/index.js +5 -3
- package/dist/cjs/core/logging/exports.d.ts +18 -0
- package/dist/cjs/core/logging/exports.js +45 -0
- package/dist/cjs/core/logging/index.d.ts +1 -0
- package/dist/cjs/core/logging/index.js +17 -0
- package/dist/cjs/core/logging/logger.d.ts +126 -0
- package/dist/cjs/core/logging/logger.js +144 -0
- package/dist/cjs/core/pagination/Page.d.ts +33 -0
- package/dist/cjs/core/pagination/Page.js +101 -0
- package/dist/cjs/core/pagination/exports.d.ts +1 -0
- package/dist/cjs/core/pagination/exports.js +2 -0
- package/dist/cjs/core/pagination/index.d.ts +1 -0
- package/dist/cjs/core/pagination/index.js +5 -0
- package/dist/cjs/core/runtime/runtime.js +17 -15
- package/dist/cjs/core/url/encodePathParam.d.ts +1 -0
- package/dist/cjs/core/url/encodePathParam.js +21 -0
- package/dist/cjs/core/url/index.d.ts +1 -0
- package/dist/cjs/core/url/index.js +3 -1
- package/dist/cjs/core/url/join.js +3 -4
- package/dist/cjs/errors/FrameioError.d.ts +1 -1
- package/dist/cjs/errors/FrameioError.js +6 -2
- package/dist/cjs/errors/FrameioTimeoutError.js +5 -1
- package/dist/cjs/errors/handleNonStatusCodeError.d.ts +2 -0
- package/dist/cjs/errors/handleNonStatusCodeError.js +65 -0
- package/dist/cjs/exports.d.ts +1 -0
- package/dist/cjs/exports.js +17 -0
- package/dist/cjs/index.d.ts +3 -1
- package/dist/cjs/index.js +8 -4
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/BaseClient.d.mts +40 -0
- package/dist/esm/BaseClient.mjs +25 -0
- package/dist/esm/Client.d.mts +62 -68
- package/dist/esm/Client.mjs +66 -40
- package/dist/esm/api/errors/BadRequestError.d.mts +2 -2
- package/dist/esm/api/errors/BadRequestError.mjs +5 -1
- package/dist/esm/api/errors/ConflictError.d.mts +2 -2
- package/dist/esm/api/errors/ConflictError.mjs +5 -1
- package/dist/esm/api/errors/ForbiddenError.d.mts +2 -2
- package/dist/esm/api/errors/ForbiddenError.mjs +5 -1
- package/dist/esm/api/errors/NotFoundError.d.mts +2 -2
- package/dist/esm/api/errors/NotFoundError.mjs +5 -1
- package/dist/esm/api/errors/TooManyRequestsError.d.mts +2 -2
- package/dist/esm/api/errors/TooManyRequestsError.mjs +5 -1
- package/dist/esm/api/errors/UnauthorizedError.d.mts +2 -2
- package/dist/esm/api/errors/UnauthorizedError.mjs +5 -1
- package/dist/esm/api/errors/UnprocessableEntityError.d.mts +1 -1
- package/dist/esm/api/errors/UnprocessableEntityError.mjs +5 -1
- package/dist/esm/api/errors/index.d.mts +3 -3
- package/dist/esm/api/errors/index.mjs +3 -3
- package/dist/esm/api/index.d.mts +1 -1
- package/dist/esm/api/index.mjs +1 -1
- package/dist/esm/api/resources/accountPermissions/client/Client.d.mts +11 -30
- package/dist/esm/api/resources/accountPermissions/client/Client.mjs +69 -84
- package/dist/esm/api/resources/accountPermissions/client/index.d.mts +0 -1
- package/dist/esm/api/resources/accountPermissions/client/requests/AccountPermissionsIndexRequest.d.mts +1 -3
- package/dist/esm/api/resources/accountPermissions/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/accountPermissions/exports.d.mts +2 -0
- package/dist/esm/api/resources/accountPermissions/exports.mjs +3 -0
- package/dist/esm/api/resources/accounts/client/Client.d.mts +13 -32
- package/dist/esm/api/resources/accounts/client/Client.mjs +87 -122
- package/dist/esm/api/resources/accounts/client/index.d.mts +0 -1
- package/dist/esm/api/resources/accounts/client/requests/AccountsIndexRequest.d.mts +1 -3
- package/dist/esm/api/resources/accounts/client/requests/AuditlogIndexRequest.d.mts +1 -5
- package/dist/esm/api/resources/accounts/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/accounts/exports.d.mts +2 -0
- package/dist/esm/api/resources/accounts/exports.mjs +3 -0
- package/dist/esm/api/resources/comments/client/Client.d.mts +28 -47
- package/dist/esm/api/resources/comments/client/Client.mjs +141 -208
- package/dist/esm/api/resources/comments/client/index.d.mts +0 -1
- package/dist/esm/api/resources/comments/client/requests/CommentsIndexRequest.d.mts +1 -5
- package/dist/esm/api/resources/comments/client/requests/CommentsShowRequest.d.mts +1 -3
- package/dist/esm/api/resources/comments/client/requests/CreateCommentParams.d.mts +5 -6
- package/dist/esm/api/resources/comments/client/requests/UpdateCommentParams.d.mts +6 -7
- package/dist/esm/api/resources/comments/client/requests/index.d.mts +4 -4
- package/dist/esm/api/resources/comments/exports.d.mts +2 -0
- package/dist/esm/api/resources/comments/exports.mjs +3 -0
- package/dist/esm/api/resources/comments/index.d.mts +1 -1
- package/dist/esm/api/resources/comments/index.mjs +1 -1
- package/dist/esm/api/resources/comments/types/index.d.mts +1 -1
- package/dist/esm/api/resources/comments/types/index.mjs +1 -1
- package/dist/esm/api/resources/files/client/Client.d.mts +54 -70
- package/dist/esm/api/resources/files/client/Client.mjs +192 -327
- package/dist/esm/api/resources/files/client/index.d.mts +0 -1
- package/dist/esm/api/resources/files/client/requests/FileCopyParams.d.mts +2 -2
- package/dist/esm/api/resources/files/client/requests/FileCreateParams.d.mts +1 -1
- package/dist/esm/api/resources/files/client/requests/FileMoveParams.d.mts +1 -1
- package/dist/esm/api/resources/files/client/requests/FileUpdateParams.d.mts +1 -1
- package/dist/esm/api/resources/files/client/requests/FilesListRequest.d.mts +1 -4
- package/dist/esm/api/resources/files/client/requests/FilesShowRequest.d.mts +1 -2
- package/dist/esm/api/resources/files/client/requests/index.d.mts +9 -9
- package/dist/esm/api/resources/files/exports.d.mts +2 -0
- package/dist/esm/api/resources/files/exports.mjs +3 -0
- package/dist/esm/api/resources/files/index.d.mts +1 -1
- package/dist/esm/api/resources/files/index.mjs +1 -1
- package/dist/esm/api/resources/files/types/index.d.mts +1 -1
- package/dist/esm/api/resources/files/types/index.mjs +1 -1
- package/dist/esm/api/resources/folders/client/Client.d.mts +40 -58
- package/dist/esm/api/resources/folders/client/Client.mjs +151 -260
- package/dist/esm/api/resources/folders/client/index.d.mts +0 -1
- package/dist/esm/api/resources/folders/client/requests/FolderCopyParams.d.mts +1 -1
- package/dist/esm/api/resources/folders/client/requests/FolderCreateParams.d.mts +1 -1
- package/dist/esm/api/resources/folders/client/requests/FolderMoveParams.d.mts +1 -1
- package/dist/esm/api/resources/folders/client/requests/FolderUpdateParams.d.mts +1 -1
- package/dist/esm/api/resources/folders/client/requests/FoldersIndexRequest.d.mts +1 -5
- package/dist/esm/api/resources/folders/client/requests/FoldersListRequest.d.mts +1 -4
- package/dist/esm/api/resources/folders/client/requests/FoldersShowRequest.d.mts +1 -2
- package/dist/esm/api/resources/folders/client/requests/index.d.mts +7 -7
- package/dist/esm/api/resources/folders/exports.d.mts +2 -0
- package/dist/esm/api/resources/folders/exports.mjs +3 -0
- package/dist/esm/api/resources/folders/index.d.mts +1 -1
- package/dist/esm/api/resources/folders/index.mjs +1 -1
- package/dist/esm/api/resources/folders/types/index.d.mts +1 -1
- package/dist/esm/api/resources/folders/types/index.mjs +1 -1
- package/dist/esm/api/resources/index.d.mts +24 -24
- package/dist/esm/api/resources/index.mjs +24 -24
- package/dist/esm/api/resources/metadata/client/Client.d.mts +16 -34
- package/dist/esm/api/resources/metadata/client/Client.mjs +42 -68
- package/dist/esm/api/resources/metadata/client/index.d.mts +0 -1
- package/dist/esm/api/resources/metadata/client/requests/BulkUpdateMetadataParams.d.mts +2 -2
- package/dist/esm/api/resources/metadata/client/requests/MetadataShowRequest.d.mts +0 -1
- package/dist/esm/api/resources/metadata/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/metadata/exports.d.mts +2 -0
- package/dist/esm/api/resources/metadata/exports.mjs +3 -0
- package/dist/esm/api/resources/metadataFields/client/Client.d.mts +22 -40
- package/dist/esm/api/resources/metadataFields/client/Client.mjs +75 -129
- package/dist/esm/api/resources/metadataFields/client/index.d.mts +0 -1
- package/dist/esm/api/resources/metadataFields/client/requests/CreateFieldDefinitionParams.d.mts +1 -1
- package/dist/esm/api/resources/metadataFields/client/requests/MetadataFieldDefinitionsIndexRequest.d.mts +1 -4
- package/dist/esm/api/resources/metadataFields/client/requests/UpdateFieldDefinitionParams.d.mts +1 -1
- package/dist/esm/api/resources/metadataFields/client/requests/index.d.mts +3 -3
- package/dist/esm/api/resources/metadataFields/exports.d.mts +2 -0
- package/dist/esm/api/resources/metadataFields/exports.mjs +3 -0
- package/dist/esm/api/resources/metadataFields/index.d.mts +1 -1
- package/dist/esm/api/resources/metadataFields/index.mjs +1 -1
- package/dist/esm/api/resources/metadataFields/types/CreateFieldDefinitionParamsData.d.mts +3 -3
- package/dist/esm/api/resources/metadataFields/types/UpdateFieldDefinitionParamsData.d.mts +3 -3
- package/dist/esm/api/resources/metadataFields/types/index.d.mts +1 -1
- package/dist/esm/api/resources/metadataFields/types/index.mjs +1 -1
- package/dist/esm/api/resources/projectPermissions/client/Client.d.mts +22 -41
- package/dist/esm/api/resources/projectPermissions/client/Client.mjs +102 -139
- package/dist/esm/api/resources/projectPermissions/client/index.d.mts +0 -1
- package/dist/esm/api/resources/projectPermissions/client/requests/ProjectPermissionsIndexRequest.d.mts +1 -3
- package/dist/esm/api/resources/projectPermissions/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/projectPermissions/exports.d.mts +2 -0
- package/dist/esm/api/resources/projectPermissions/exports.mjs +3 -0
- package/dist/esm/api/resources/projects/client/Client.d.mts +28 -47
- package/dist/esm/api/resources/projects/client/Client.mjs +134 -194
- package/dist/esm/api/resources/projects/client/index.d.mts +0 -1
- package/dist/esm/api/resources/projects/client/requests/ProjectParams.d.mts +1 -1
- package/dist/esm/api/resources/projects/client/requests/ProjectUpdateParams.d.mts +3 -3
- package/dist/esm/api/resources/projects/client/requests/ProjectsIndexRequest.d.mts +1 -4
- package/dist/esm/api/resources/projects/client/requests/ProjectsShowRequest.d.mts +0 -1
- package/dist/esm/api/resources/projects/client/requests/index.d.mts +4 -4
- package/dist/esm/api/resources/projects/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/projects/exports.d.mts +2 -0
- package/dist/esm/api/resources/projects/exports.mjs +3 -0
- package/dist/esm/api/resources/shares/client/Client.d.mts +49 -69
- package/dist/esm/api/resources/shares/client/Client.mjs +250 -362
- package/dist/esm/api/resources/shares/client/index.d.mts +0 -1
- package/dist/esm/api/resources/shares/client/requests/AddReviewersToShareParams.d.mts +4 -4
- package/dist/esm/api/resources/shares/client/requests/CreateShareParams.d.mts +1 -1
- package/dist/esm/api/resources/shares/client/requests/RemoveReviewerParams.d.mts +4 -4
- package/dist/esm/api/resources/shares/client/requests/SharesIndexRequest.d.mts +1 -3
- package/dist/esm/api/resources/shares/client/requests/SharesListReviewersRequest.d.mts +1 -3
- package/dist/esm/api/resources/shares/client/requests/UpdateShareParams.d.mts +6 -6
- package/dist/esm/api/resources/shares/client/requests/index.d.mts +7 -7
- package/dist/esm/api/resources/shares/client/requests/index.mjs +1 -1
- package/dist/esm/api/resources/shares/exports.d.mts +2 -0
- package/dist/esm/api/resources/shares/exports.mjs +3 -0
- package/dist/esm/api/resources/shares/index.d.mts +1 -1
- package/dist/esm/api/resources/shares/index.mjs +1 -1
- package/dist/esm/api/resources/shares/types/CreateShareParamsData.d.mts +1 -1
- package/dist/esm/api/resources/users/client/Client.d.mts +10 -28
- package/dist/esm/api/resources/users/client/Client.mjs +17 -31
- package/dist/esm/api/resources/users/exports.d.mts +2 -0
- package/dist/esm/api/resources/users/exports.mjs +3 -0
- package/dist/esm/api/resources/versionStacks/client/Client.d.mts +32 -50
- package/dist/esm/api/resources/versionStacks/client/Client.mjs +120 -205
- package/dist/esm/api/resources/versionStacks/client/index.d.mts +0 -1
- package/dist/esm/api/resources/versionStacks/client/requests/VersionStackCopyParams.d.mts +1 -1
- package/dist/esm/api/resources/versionStacks/client/requests/VersionStackMoveParams.d.mts +1 -1
- package/dist/esm/api/resources/versionStacks/client/requests/VersionStacksIndexRequest.d.mts +1 -4
- package/dist/esm/api/resources/versionStacks/client/requests/VersionStacksListRequest.d.mts +1 -4
- package/dist/esm/api/resources/versionStacks/client/requests/VersionStacksShowRequest.d.mts +1 -2
- package/dist/esm/api/resources/versionStacks/client/requests/index.d.mts +6 -6
- package/dist/esm/api/resources/versionStacks/exports.d.mts +2 -0
- package/dist/esm/api/resources/versionStacks/exports.mjs +3 -0
- package/dist/esm/api/resources/versionStacks/index.d.mts +1 -1
- package/dist/esm/api/resources/versionStacks/index.mjs +1 -1
- package/dist/esm/api/resources/versionStacks/types/index.d.mts +1 -1
- package/dist/esm/api/resources/versionStacks/types/index.mjs +1 -1
- package/dist/esm/api/resources/webhooks/client/Client.d.mts +28 -47
- package/dist/esm/api/resources/webhooks/client/Client.mjs +134 -194
- package/dist/esm/api/resources/webhooks/client/index.d.mts +0 -1
- package/dist/esm/api/resources/webhooks/client/requests/WebhookCreateParams.d.mts +1 -1
- package/dist/esm/api/resources/webhooks/client/requests/WebhookUpdateParams.d.mts +5 -5
- package/dist/esm/api/resources/webhooks/client/requests/WebhooksIndexRequest.d.mts +1 -4
- package/dist/esm/api/resources/webhooks/client/requests/WebhooksShowRequest.d.mts +0 -1
- package/dist/esm/api/resources/webhooks/client/requests/index.d.mts +4 -4
- package/dist/esm/api/resources/webhooks/exports.d.mts +2 -0
- package/dist/esm/api/resources/webhooks/exports.mjs +3 -0
- package/dist/esm/api/resources/workspacePermissions/client/Client.d.mts +22 -41
- package/dist/esm/api/resources/workspacePermissions/client/Client.mjs +102 -139
- package/dist/esm/api/resources/workspacePermissions/client/index.d.mts +0 -1
- package/dist/esm/api/resources/workspacePermissions/client/requests/WorkspacePermissionsIndexRequest.d.mts +1 -3
- package/dist/esm/api/resources/workspacePermissions/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/workspacePermissions/exports.d.mts +2 -0
- package/dist/esm/api/resources/workspacePermissions/exports.mjs +3 -0
- package/dist/esm/api/resources/workspaces/client/Client.d.mts +26 -45
- package/dist/esm/api/resources/workspaces/client/Client.mjs +132 -195
- package/dist/esm/api/resources/workspaces/client/index.d.mts +0 -1
- package/dist/esm/api/resources/workspaces/client/requests/WorkspacesIndexRequest.d.mts +1 -4
- package/dist/esm/api/resources/workspaces/client/requests/WorkspacesShowRequest.d.mts +0 -1
- package/dist/esm/api/resources/workspaces/client/requests/index.d.mts +2 -2
- package/dist/esm/api/resources/workspaces/exports.d.mts +2 -0
- package/dist/esm/api/resources/workspaces/exports.mjs +3 -0
- package/dist/esm/api/types/Account.d.mts +4 -4
- package/dist/esm/api/types/AccountUserRole.d.mts +2 -2
- package/dist/esm/api/types/AccountUserRolesResponse.d.mts +2 -2
- package/dist/esm/api/types/AccountsResponse.d.mts +2 -2
- package/dist/esm/api/types/AddAssetResponse.d.mts +1 -1
- package/dist/esm/api/types/AssetCommon.d.mts +1 -1
- package/dist/esm/api/types/AssetCommonWithIncludes.d.mts +5 -5
- package/dist/esm/api/types/AssetShareParams.d.mts +5 -5
- package/dist/esm/api/types/AssetWithIncludes.d.mts +3 -3
- package/dist/esm/api/types/AuditLogsWithIncludesResponse.d.mts +2 -2
- package/dist/esm/api/types/AuditLogwithIncludes.d.mts +4 -4
- package/dist/esm/api/types/BadRequest.d.mts +3 -3
- package/dist/esm/api/types/BooleanValue.d.mts +2 -2
- package/dist/esm/api/types/Comment.d.mts +6 -6
- package/dist/esm/api/types/CommentResponse.d.mts +1 -1
- package/dist/esm/api/types/CommentWithIncludes.d.mts +3 -3
- package/dist/esm/api/types/CommentWithIncludesResponse.d.mts +1 -1
- package/dist/esm/api/types/CommentsWithIncludesResponse.d.mts +2 -2
- package/dist/esm/api/types/Conflict.d.mts +3 -3
- package/dist/esm/api/types/DateDefinition.d.mts +3 -4
- package/dist/esm/api/types/DateDefinitionParams.d.mts +3 -4
- package/dist/esm/api/types/DateDefinitionWithIncludes.d.mts +2 -2
- package/dist/esm/api/types/DateValue.d.mts +2 -2
- package/dist/esm/api/types/FieldDefinition.d.mts +3 -3
- package/dist/esm/api/types/FieldDefinitionResponse.d.mts +1 -1
- package/dist/esm/api/types/FieldDefinitionWithIncludes.d.mts +3 -3
- package/dist/esm/api/types/FieldDefinitionsWithIncludesResponse.d.mts +2 -2
- package/dist/esm/api/types/FileAssetsWithIncludesResponse.d.mts +2 -2
- package/dist/esm/api/types/FileCopyResponse.d.mts +1 -1
- package/dist/esm/api/types/FileRemoteUploadResponse.d.mts +1 -1
- package/dist/esm/api/types/FileResponse.d.mts +1 -1
- package/dist/esm/api/types/FileUploadStatus.d.mts +2 -2
- package/dist/esm/api/types/FileUploadStatusResponse.d.mts +1 -1
- package/dist/esm/api/types/FileWithIncludes.d.mts +2 -2
- package/dist/esm/api/types/FileWithIncludesResponse.d.mts +1 -1
- package/dist/esm/api/types/FileWithUploadUrls.d.mts +2 -2
- package/dist/esm/api/types/FileWithUploadUrlsResponse.d.mts +1 -1
- package/dist/esm/api/types/File_.d.mts +3 -3
- package/dist/esm/api/types/Filters.d.mts +9 -9
- package/dist/esm/api/types/Folder.d.mts +2 -2
- package/dist/esm/api/types/FolderAssetsWithIncludesResponse.d.mts +2 -2
- package/dist/esm/api/types/FolderCopyResponse.d.mts +1 -1
- package/dist/esm/api/types/FolderResponse.d.mts +1 -1
- package/dist/esm/api/types/FolderWithIncludes.d.mts +6 -6
- package/dist/esm/api/types/FolderWithIncludesResponse.d.mts +1 -1
- package/dist/esm/api/types/FoldersWithIncludesResponse.d.mts +2 -2
- package/dist/esm/api/types/Forbidden.d.mts +3 -3
- package/dist/esm/api/types/IntegerValue.d.mts +2 -2
- package/dist/esm/api/types/Links.d.mts +1 -1
- package/dist/esm/api/types/LongTextDefinition.d.mts +1 -2
- package/dist/esm/api/types/LongTextDefinitionWithIncludes.d.mts +2 -2
- package/dist/esm/api/types/MediaLinkCommon.d.mts +1 -1
- package/dist/esm/api/types/MediaLinksCollection.d.mts +8 -8
- package/dist/esm/api/types/MetadataField.d.mts +3 -3
- package/dist/esm/api/types/MetadataResponse.d.mts +1 -1
- package/dist/esm/api/types/MetadataWithDefinition.d.mts +1 -1
- package/dist/esm/api/types/MultiSelectValue.d.mts +2 -2
- package/dist/esm/api/types/MultiUserValue.d.mts +3 -3
- package/dist/esm/api/types/NotFound.d.mts +3 -3
- package/dist/esm/api/types/NumberDefinition.d.mts +1 -1
- package/dist/esm/api/types/NumberDefinitionParams.d.mts +1 -1
- package/dist/esm/api/types/NumberDefinitionWithIncludes.d.mts +2 -2
- package/dist/esm/api/types/NumberValue.d.mts +2 -2
- package/dist/esm/api/types/OriginalMediaLink.d.mts +2 -2
- package/dist/esm/api/types/Profile.d.mts +1 -1
- package/dist/esm/api/types/ProfileResponse.d.mts +1 -1
- package/dist/esm/api/types/Project.d.mts +1 -1
- package/dist/esm/api/types/ProjectResponse.d.mts +1 -1
- package/dist/esm/api/types/ProjectUserRolesResponse.d.mts +2 -2
- package/dist/esm/api/types/ProjectWithIncludes.d.mts +3 -3
- package/dist/esm/api/types/ProjectWithIncludesResponse.d.mts +1 -1
- package/dist/esm/api/types/ProjectsWithIncludesResponse.d.mts +2 -2
- package/dist/esm/api/types/RatingDefinition.d.mts +2 -2
- package/dist/esm/api/types/RatingDefinitionParams.d.mts +2 -2
- package/dist/esm/api/types/RatingDefinitionWithIncludes.d.mts +2 -2
- package/dist/esm/api/types/RemoveAssetResponse.d.mts +1 -1
- package/dist/esm/api/types/RenditionMediaLink.d.mts +2 -2
- package/dist/esm/api/types/SelectDefinition.d.mts +3 -3
- package/dist/esm/api/types/SelectDefinitionParams.d.mts +2 -2
- package/dist/esm/api/types/SelectDefinitionWithIncludes.d.mts +2 -2
- package/dist/esm/api/types/SelectMultiDefinition.d.mts +3 -3
- package/dist/esm/api/types/SelectMultiDefinitionParams.d.mts +2 -2
- package/dist/esm/api/types/SelectMultiDefinitionWithIncludes.d.mts +2 -2
- package/dist/esm/api/types/SelectValue.d.mts +2 -2
- package/dist/esm/api/types/Share.d.mts +6 -6
- package/dist/esm/api/types/ShareResponse.d.mts +1 -1
- package/dist/esm/api/types/ShareReviewersResponse.d.mts +2 -2
- package/dist/esm/api/types/SharesResponse.d.mts +2 -2
- package/dist/esm/api/types/SingleUserValue.d.mts +3 -3
- package/dist/esm/api/types/TextDefinition.d.mts +1 -2
- package/dist/esm/api/types/TextDefinitionWithIncludes.d.mts +2 -2
- package/dist/esm/api/types/TextValue.d.mts +2 -2
- package/dist/esm/api/types/ToggleDefinition.d.mts +1 -1
- package/dist/esm/api/types/ToggleDefinitionParams.d.mts +2 -2
- package/dist/esm/api/types/ToggleDefinitionWithIncludes.d.mts +2 -2
- package/dist/esm/api/types/TooManyRequests.d.mts +3 -3
- package/dist/esm/api/types/Unauthorized.d.mts +3 -3
- package/dist/esm/api/types/UnprocessableContent.d.mts +3 -3
- package/dist/esm/api/types/UpdateDateDefinitionParams.d.mts +6 -7
- package/dist/esm/api/types/UpdateLongTextDefinitionParams.d.mts +1 -1
- package/dist/esm/api/types/UpdateNumberDefinitionParams.d.mts +4 -4
- package/dist/esm/api/types/UpdateRatingDefinitionParams.d.mts +5 -5
- package/dist/esm/api/types/UpdateSelectDefinitionParams.d.mts +5 -5
- package/dist/esm/api/types/UpdateSelectMultiDefinitionParams.d.mts +5 -5
- package/dist/esm/api/types/UpdateTextDefinitionParams.d.mts +1 -1
- package/dist/esm/api/types/UpdateToggleDefinitionParams.d.mts +3 -3
- package/dist/esm/api/types/UpdateUserMultiDefinitionParams.d.mts +3 -4
- package/dist/esm/api/types/UpdateUserRolesResponse.d.mts +1 -1
- package/dist/esm/api/types/UpdateUserSingleDefinitionParams.d.mts +3 -4
- package/dist/esm/api/types/User.d.mts +5 -5
- package/dist/esm/api/types/UserMultiDefinition.d.mts +0 -1
- package/dist/esm/api/types/UserMultiDefinitionParams.d.mts +1 -2
- package/dist/esm/api/types/UserMultiDefinitionWithIncludes.d.mts +2 -2
- package/dist/esm/api/types/UserRole.d.mts +1 -1
- package/dist/esm/api/types/UserSingleDefinition.d.mts +0 -1
- package/dist/esm/api/types/UserSingleDefinitionParams.d.mts +1 -2
- package/dist/esm/api/types/UserSingleDefinitionWithIncludes.d.mts +2 -2
- package/dist/esm/api/types/VersionStack.d.mts +2 -2
- package/dist/esm/api/types/VersionStackAssetsWithIncludesResponse.d.mts +2 -2
- package/dist/esm/api/types/VersionStackCopyResponse.d.mts +1 -1
- package/dist/esm/api/types/VersionStackResponse.d.mts +1 -1
- package/dist/esm/api/types/VersionStackWithIncludes.d.mts +6 -6
- package/dist/esm/api/types/VersionStackWithIncludesResponse.d.mts +1 -1
- package/dist/esm/api/types/VersionStacksWithIncludesResponse.d.mts +2 -2
- package/dist/esm/api/types/Webhook.d.mts +3 -3
- package/dist/esm/api/types/WebhookCreateResponse.d.mts +1 -1
- package/dist/esm/api/types/WebhookResponse.d.mts +1 -1
- package/dist/esm/api/types/WebhookWithIncludes.d.mts +2 -2
- package/dist/esm/api/types/WebhookWithIncludesResponse.d.mts +1 -1
- package/dist/esm/api/types/WebhooksWithIncludesResponse.d.mts +2 -2
- package/dist/esm/api/types/WorkspaceParams.d.mts +1 -1
- package/dist/esm/api/types/WorkspaceResponse.d.mts +1 -1
- package/dist/esm/api/types/WorkspaceUserRolesResponse.d.mts +2 -2
- package/dist/esm/api/types/WorkspaceWithIncludes.d.mts +2 -2
- package/dist/esm/api/types/WorkspaceWithIncludesResponse.d.mts +1 -1
- package/dist/esm/api/types/WorkspacesWithIncludesResponse.d.mts +2 -2
- package/dist/esm/api/types/index.d.mts +143 -143
- package/dist/esm/api/types/index.mjs +143 -143
- package/dist/esm/auth/BearerAuthProvider.d.mts +20 -0
- package/dist/esm/auth/BearerAuthProvider.mjs +42 -0
- package/dist/esm/auth/index.d.mts +1 -0
- package/dist/esm/auth/index.mjs +1 -0
- package/dist/esm/core/auth/AuthProvider.d.mts +5 -2
- package/dist/esm/core/auth/BearerToken.d.mts +3 -1
- package/dist/esm/core/auth/BearerToken.mjs +7 -6
- package/dist/esm/core/auth/NoOpAuthProvider.d.mts +5 -0
- package/dist/esm/core/auth/NoOpAuthProvider.mjs +5 -0
- package/dist/esm/core/auth/index.d.mts +1 -0
- package/dist/esm/core/auth/index.mjs +1 -0
- package/dist/esm/core/exports.d.mts +2 -0
- package/dist/esm/core/exports.mjs +2 -0
- package/dist/esm/core/fetcher/APIResponse.d.mts +1 -1
- package/dist/esm/core/fetcher/BinaryResponse.d.mts +5 -6
- package/dist/esm/core/fetcher/EndpointSupplier.d.mts +4 -4
- package/dist/esm/core/fetcher/Fetcher.d.mts +12 -6
- package/dist/esm/core/fetcher/Fetcher.mjs +210 -9
- package/dist/esm/core/fetcher/HttpResponsePromise.d.mts +1 -1
- package/dist/esm/core/fetcher/getErrorResponseBody.mjs +2 -1
- package/dist/esm/core/fetcher/getRequestBody.d.mts +1 -1
- package/dist/esm/core/fetcher/getRequestBody.mjs +4 -0
- package/dist/esm/core/fetcher/getResponseBody.mjs +21 -7
- package/dist/esm/core/fetcher/index.d.mts +2 -0
- package/dist/esm/core/fetcher/index.mjs +1 -0
- package/dist/esm/core/fetcher/makePassthroughRequest.d.mts +49 -0
- package/dist/esm/core/fetcher/makePassthroughRequest.mjs +132 -0
- package/dist/esm/core/fetcher/makeRequest.d.mts +6 -1
- package/dist/esm/core/fetcher/makeRequest.mjs +30 -13
- package/dist/esm/core/fetcher/requestWithRetries.mjs +3 -12
- package/dist/esm/core/fetcher/signals.d.mts +1 -7
- package/dist/esm/core/fetcher/signals.mjs +0 -12
- package/dist/esm/core/headers.d.mts +2 -2
- package/dist/esm/core/headers.mjs +6 -4
- package/dist/esm/core/index.d.mts +4 -2
- package/dist/esm/core/index.mjs +4 -2
- package/dist/esm/core/logging/exports.d.mts +18 -0
- package/dist/esm/core/logging/exports.mjs +9 -0
- package/dist/esm/core/logging/index.d.mts +1 -0
- package/dist/esm/core/logging/index.mjs +1 -0
- package/dist/esm/core/logging/logger.d.mts +126 -0
- package/dist/esm/core/logging/logger.mjs +138 -0
- package/dist/esm/core/pagination/Page.d.mts +33 -0
- package/dist/esm/core/pagination/Page.mjs +97 -0
- package/dist/esm/core/pagination/exports.d.mts +1 -0
- package/dist/esm/core/pagination/exports.mjs +1 -0
- package/dist/esm/core/pagination/index.d.mts +1 -0
- package/dist/esm/core/pagination/index.mjs +1 -0
- package/dist/esm/core/runtime/runtime.mjs +17 -15
- package/dist/esm/core/url/encodePathParam.d.mts +1 -0
- package/dist/esm/core/url/encodePathParam.mjs +18 -0
- package/dist/esm/core/url/index.d.mts +1 -0
- package/dist/esm/core/url/index.mjs +1 -0
- package/dist/esm/core/url/join.mjs +3 -4
- package/dist/esm/errors/FrameioError.d.mts +1 -1
- package/dist/esm/errors/FrameioError.mjs +6 -2
- package/dist/esm/errors/FrameioTimeoutError.mjs +5 -1
- package/dist/esm/errors/handleNonStatusCodeError.d.mts +2 -0
- package/dist/esm/errors/handleNonStatusCodeError.mjs +29 -0
- package/dist/esm/exports.d.mts +1 -0
- package/dist/esm/exports.mjs +1 -0
- package/dist/esm/index.d.mts +3 -1
- package/dist/esm/index.mjs +2 -1
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +182 -8
- package/reference.md +1056 -1008
- package/dist/cjs/core/fetcher/ResponseWithBody.d.ts +0 -4
- package/dist/cjs/core/fetcher/ResponseWithBody.js +0 -6
- package/dist/esm/core/fetcher/ResponseWithBody.d.mts +0 -4
- package/dist/esm/core/fetcher/ResponseWithBody.mjs +0 -3
|
@@ -8,24 +8,26 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
-
import
|
|
11
|
+
import { normalizeClientOptionsWithAuth } from "../../../../BaseClient.mjs";
|
|
12
|
+
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
12
13
|
import * as core from "../../../../core/index.mjs";
|
|
13
|
-
import * as
|
|
14
|
-
import {
|
|
14
|
+
import * as environments from "../../../../environments.mjs";
|
|
15
|
+
import { handleNonStatusCodeError } from "../../../../errors/handleNonStatusCodeError.mjs";
|
|
15
16
|
import * as errors from "../../../../errors/index.mjs";
|
|
17
|
+
import * as Frameio from "../../../index.mjs";
|
|
16
18
|
/**
|
|
17
19
|
* Manage Shares and related operations.
|
|
18
20
|
*/
|
|
19
|
-
export class
|
|
20
|
-
constructor(
|
|
21
|
-
this._options =
|
|
21
|
+
export class SharesClient {
|
|
22
|
+
constructor(options) {
|
|
23
|
+
this._options = normalizeClientOptionsWithAuth(options);
|
|
22
24
|
}
|
|
23
25
|
/**
|
|
24
26
|
* Show a single Share. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
25
27
|
*
|
|
26
|
-
* @param {Frameio.Uuid}
|
|
27
|
-
* @param {Frameio.Uuid}
|
|
28
|
-
* @param {
|
|
28
|
+
* @param {Frameio.Uuid} account_id
|
|
29
|
+
* @param {Frameio.Uuid} share_id
|
|
30
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
29
31
|
*
|
|
30
32
|
* @throws {@link Frameio.BadRequestError}
|
|
31
33
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -38,21 +40,24 @@ export class Shares {
|
|
|
38
40
|
* @example
|
|
39
41
|
* await client.shares.show("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
|
|
40
42
|
*/
|
|
41
|
-
show(
|
|
42
|
-
return core.HttpResponsePromise.fromPromise(this.__show(
|
|
43
|
+
show(account_id, share_id, requestOptions) {
|
|
44
|
+
return core.HttpResponsePromise.fromPromise(this.__show(account_id, share_id, requestOptions));
|
|
43
45
|
}
|
|
44
|
-
__show(
|
|
46
|
+
__show(account_id, share_id, requestOptions) {
|
|
45
47
|
return __awaiter(this, void 0, void 0, function* () {
|
|
46
|
-
var _a, _b, _c, _d;
|
|
47
|
-
|
|
48
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
49
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
50
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
48
51
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
49
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${
|
|
52
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/shares/${core.url.encodePathParam(share_id)}`),
|
|
50
53
|
method: "GET",
|
|
51
54
|
headers: _headers,
|
|
52
55
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
53
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
54
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
56
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
57
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
55
58
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
59
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
60
|
+
logging: this._options.logging,
|
|
56
61
|
});
|
|
57
62
|
if (_response.ok) {
|
|
58
63
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -81,29 +86,15 @@ export class Shares {
|
|
|
81
86
|
});
|
|
82
87
|
}
|
|
83
88
|
}
|
|
84
|
-
|
|
85
|
-
case "non-json":
|
|
86
|
-
throw new errors.FrameioError({
|
|
87
|
-
statusCode: _response.error.statusCode,
|
|
88
|
-
body: _response.error.rawBody,
|
|
89
|
-
rawResponse: _response.rawResponse,
|
|
90
|
-
});
|
|
91
|
-
case "timeout":
|
|
92
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/shares/{share_id}.");
|
|
93
|
-
case "unknown":
|
|
94
|
-
throw new errors.FrameioError({
|
|
95
|
-
message: _response.error.errorMessage,
|
|
96
|
-
rawResponse: _response.rawResponse,
|
|
97
|
-
});
|
|
98
|
-
}
|
|
89
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/shares/{share_id}");
|
|
99
90
|
});
|
|
100
91
|
}
|
|
101
92
|
/**
|
|
102
93
|
* Delete a share. <br/>Rate Limits: 60 calls per 1.00 minute(s) per account_user
|
|
103
94
|
*
|
|
104
|
-
* @param {Frameio.Uuid}
|
|
105
|
-
* @param {Frameio.Uuid}
|
|
106
|
-
* @param {
|
|
95
|
+
* @param {Frameio.Uuid} account_id
|
|
96
|
+
* @param {Frameio.Uuid} share_id
|
|
97
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
107
98
|
*
|
|
108
99
|
* @throws {@link Frameio.BadRequestError}
|
|
109
100
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -116,21 +107,24 @@ export class Shares {
|
|
|
116
107
|
* @example
|
|
117
108
|
* await client.shares.delete("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
|
|
118
109
|
*/
|
|
119
|
-
delete(
|
|
120
|
-
return core.HttpResponsePromise.fromPromise(this.__delete(
|
|
110
|
+
delete(account_id, share_id, requestOptions) {
|
|
111
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(account_id, share_id, requestOptions));
|
|
121
112
|
}
|
|
122
|
-
__delete(
|
|
113
|
+
__delete(account_id, share_id, requestOptions) {
|
|
123
114
|
return __awaiter(this, void 0, void 0, function* () {
|
|
124
|
-
var _a, _b, _c, _d;
|
|
125
|
-
|
|
115
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
116
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
117
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
126
118
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
127
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${
|
|
119
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/shares/${core.url.encodePathParam(share_id)}`),
|
|
128
120
|
method: "DELETE",
|
|
129
121
|
headers: _headers,
|
|
130
122
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
131
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
132
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
123
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
124
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
133
125
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
126
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
127
|
+
logging: this._options.logging,
|
|
134
128
|
});
|
|
135
129
|
if (_response.ok) {
|
|
136
130
|
return { data: undefined, rawResponse: _response.rawResponse };
|
|
@@ -159,30 +153,16 @@ export class Shares {
|
|
|
159
153
|
});
|
|
160
154
|
}
|
|
161
155
|
}
|
|
162
|
-
|
|
163
|
-
case "non-json":
|
|
164
|
-
throw new errors.FrameioError({
|
|
165
|
-
statusCode: _response.error.statusCode,
|
|
166
|
-
body: _response.error.rawBody,
|
|
167
|
-
rawResponse: _response.rawResponse,
|
|
168
|
-
});
|
|
169
|
-
case "timeout":
|
|
170
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling DELETE /v4/accounts/{account_id}/shares/{share_id}.");
|
|
171
|
-
case "unknown":
|
|
172
|
-
throw new errors.FrameioError({
|
|
173
|
-
message: _response.error.errorMessage,
|
|
174
|
-
rawResponse: _response.rawResponse,
|
|
175
|
-
});
|
|
176
|
-
}
|
|
156
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/shares/{share_id}");
|
|
177
157
|
});
|
|
178
158
|
}
|
|
179
159
|
/**
|
|
180
160
|
* Update share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
181
161
|
*
|
|
182
|
-
* @param {Frameio.Uuid}
|
|
183
|
-
* @param {Frameio.Uuid}
|
|
162
|
+
* @param {Frameio.Uuid} account_id
|
|
163
|
+
* @param {Frameio.Uuid} share_id
|
|
184
164
|
* @param {Frameio.UpdateShareParams} request
|
|
185
|
-
* @param {
|
|
165
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
186
166
|
*
|
|
187
167
|
* @throws {@link Frameio.BadRequestError}
|
|
188
168
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -204,24 +184,27 @@ export class Shares {
|
|
|
204
184
|
* }
|
|
205
185
|
* })
|
|
206
186
|
*/
|
|
207
|
-
update(
|
|
208
|
-
return core.HttpResponsePromise.fromPromise(this.__update(
|
|
187
|
+
update(account_id, share_id, request, requestOptions) {
|
|
188
|
+
return core.HttpResponsePromise.fromPromise(this.__update(account_id, share_id, request, requestOptions));
|
|
209
189
|
}
|
|
210
|
-
__update(
|
|
190
|
+
__update(account_id, share_id, request, requestOptions) {
|
|
211
191
|
return __awaiter(this, void 0, void 0, function* () {
|
|
212
|
-
var _a, _b, _c, _d;
|
|
213
|
-
|
|
192
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
193
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
194
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
214
195
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
215
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${
|
|
196
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/shares/${core.url.encodePathParam(share_id)}`),
|
|
216
197
|
method: "PATCH",
|
|
217
198
|
headers: _headers,
|
|
218
199
|
contentType: "application/json",
|
|
219
200
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
220
201
|
requestType: "json",
|
|
221
202
|
body: request,
|
|
222
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
223
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
203
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
204
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
224
205
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
206
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
207
|
+
logging: this._options.logging,
|
|
225
208
|
});
|
|
226
209
|
if (_response.ok) {
|
|
227
210
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -250,30 +233,16 @@ export class Shares {
|
|
|
250
233
|
});
|
|
251
234
|
}
|
|
252
235
|
}
|
|
253
|
-
|
|
254
|
-
case "non-json":
|
|
255
|
-
throw new errors.FrameioError({
|
|
256
|
-
statusCode: _response.error.statusCode,
|
|
257
|
-
body: _response.error.rawBody,
|
|
258
|
-
rawResponse: _response.rawResponse,
|
|
259
|
-
});
|
|
260
|
-
case "timeout":
|
|
261
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling PATCH /v4/accounts/{account_id}/shares/{share_id}.");
|
|
262
|
-
case "unknown":
|
|
263
|
-
throw new errors.FrameioError({
|
|
264
|
-
message: _response.error.errorMessage,
|
|
265
|
-
rawResponse: _response.rawResponse,
|
|
266
|
-
});
|
|
267
|
-
}
|
|
236
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "PATCH", "/v4/accounts/{account_id}/shares/{share_id}");
|
|
268
237
|
});
|
|
269
238
|
}
|
|
270
239
|
/**
|
|
271
240
|
* List share reviewers. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
272
241
|
*
|
|
273
|
-
* @param {Frameio.Uuid}
|
|
274
|
-
* @param {Frameio.Uuid}
|
|
242
|
+
* @param {Frameio.Uuid} account_id
|
|
243
|
+
* @param {Frameio.Uuid} share_id
|
|
275
244
|
* @param {Frameio.SharesListReviewersRequest} request
|
|
276
|
-
* @param {
|
|
245
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
277
246
|
*
|
|
278
247
|
* @throws {@link Frameio.BadRequestError}
|
|
279
248
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -290,75 +259,66 @@ export class Shares {
|
|
|
290
259
|
* include_total_count: false
|
|
291
260
|
* })
|
|
292
261
|
*/
|
|
293
|
-
listReviewers(
|
|
294
|
-
return
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
method: "GET",
|
|
314
|
-
headers: _headers,
|
|
315
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
316
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
317
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
318
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
319
|
-
});
|
|
320
|
-
if (_response.ok) {
|
|
321
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
322
|
-
}
|
|
323
|
-
if (_response.error.reason === "status-code") {
|
|
324
|
-
switch (_response.error.statusCode) {
|
|
325
|
-
case 400:
|
|
326
|
-
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
327
|
-
case 401:
|
|
328
|
-
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
329
|
-
case 403:
|
|
330
|
-
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
331
|
-
case 404:
|
|
332
|
-
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
333
|
-
case 409:
|
|
334
|
-
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
335
|
-
case 422:
|
|
336
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
337
|
-
case 429:
|
|
338
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
339
|
-
default:
|
|
340
|
-
throw new errors.FrameioError({
|
|
341
|
-
statusCode: _response.error.statusCode,
|
|
342
|
-
body: _response.error.body,
|
|
343
|
-
rawResponse: _response.rawResponse,
|
|
344
|
-
});
|
|
345
|
-
}
|
|
346
|
-
}
|
|
347
|
-
switch (_response.error.reason) {
|
|
348
|
-
case "non-json":
|
|
349
|
-
throw new errors.FrameioError({
|
|
350
|
-
statusCode: _response.error.statusCode,
|
|
351
|
-
body: _response.error.rawBody,
|
|
262
|
+
listReviewers(account_id_1, share_id_1) {
|
|
263
|
+
return __awaiter(this, arguments, void 0, function* (account_id, share_id, _request = {}, requestOptions) {
|
|
264
|
+
var _a, _b;
|
|
265
|
+
const list = core.HttpResponsePromise.interceptFunction((_requestUrl) => __awaiter(this, void 0, void 0, function* () {
|
|
266
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
267
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
268
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
269
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
270
|
+
url: _requestUrl,
|
|
271
|
+
method: "GET",
|
|
272
|
+
headers: _headers,
|
|
273
|
+
timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
|
|
274
|
+
maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
|
|
275
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
276
|
+
fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
|
|
277
|
+
logging: this._options.logging,
|
|
278
|
+
});
|
|
279
|
+
if (_response.ok) {
|
|
280
|
+
return {
|
|
281
|
+
data: _response.body,
|
|
352
282
|
rawResponse: _response.rawResponse,
|
|
353
|
-
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
283
|
+
};
|
|
284
|
+
}
|
|
285
|
+
if (_response.error.reason === "status-code") {
|
|
286
|
+
switch (_response.error.statusCode) {
|
|
287
|
+
case 400:
|
|
288
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
289
|
+
case 401:
|
|
290
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
291
|
+
case 403:
|
|
292
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
293
|
+
case 404:
|
|
294
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
295
|
+
case 409:
|
|
296
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
297
|
+
case 422:
|
|
298
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
299
|
+
case 429:
|
|
300
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
301
|
+
default:
|
|
302
|
+
throw new errors.FrameioError({
|
|
303
|
+
statusCode: _response.error.statusCode,
|
|
304
|
+
body: _response.error.body,
|
|
305
|
+
rawResponse: _response.rawResponse,
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/shares/{share_id}/reviewers");
|
|
310
|
+
}));
|
|
311
|
+
const _baseUrl = (_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.FrameioEnvironment.Default;
|
|
312
|
+
const dataWithRawResponse = yield list(core.url.join(_baseUrl, `v4/accounts/${core.url.encodePathParam(account_id)}/shares/${core.url.encodePathParam(share_id)}/reviewers`)).withRawResponse();
|
|
313
|
+
return new core.Page({
|
|
314
|
+
response: dataWithRawResponse.data,
|
|
315
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
316
|
+
hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.links.next) != null && (response === null || response === void 0 ? void 0 : response.links.next) !== "",
|
|
317
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.data) !== null && _a !== void 0 ? _a : []; },
|
|
318
|
+
loadPage: (response) => {
|
|
319
|
+
return list(core.url.join(_baseUrl, response === null || response === void 0 ? void 0 : response.links.next));
|
|
320
|
+
},
|
|
321
|
+
});
|
|
362
322
|
});
|
|
363
323
|
}
|
|
364
324
|
/**
|
|
@@ -369,10 +329,10 @@ export class Shares {
|
|
|
369
329
|
* `email` is the only identifier able to add reviewers to a Share who don't have a Frame account member on the account where the Share belongs.
|
|
370
330
|
* <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
371
331
|
*
|
|
372
|
-
* @param {Frameio.Uuid}
|
|
373
|
-
* @param {Frameio.Uuid}
|
|
332
|
+
* @param {Frameio.Uuid} account_id
|
|
333
|
+
* @param {Frameio.Uuid} share_id
|
|
374
334
|
* @param {Frameio.AddReviewersToShareParams} request
|
|
375
|
-
* @param {
|
|
335
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
376
336
|
*
|
|
377
337
|
* @throws {@link Frameio.BadRequestError}
|
|
378
338
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -392,24 +352,27 @@ export class Shares {
|
|
|
392
352
|
* }
|
|
393
353
|
* })
|
|
394
354
|
*/
|
|
395
|
-
addReviewers(
|
|
396
|
-
return core.HttpResponsePromise.fromPromise(this.__addReviewers(
|
|
355
|
+
addReviewers(account_id, share_id, request, requestOptions) {
|
|
356
|
+
return core.HttpResponsePromise.fromPromise(this.__addReviewers(account_id, share_id, request, requestOptions));
|
|
397
357
|
}
|
|
398
|
-
__addReviewers(
|
|
358
|
+
__addReviewers(account_id, share_id, request, requestOptions) {
|
|
399
359
|
return __awaiter(this, void 0, void 0, function* () {
|
|
400
|
-
var _a, _b, _c, _d;
|
|
401
|
-
|
|
360
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
361
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
362
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
402
363
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
403
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${
|
|
364
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/shares/${core.url.encodePathParam(share_id)}/reviewers`),
|
|
404
365
|
method: "POST",
|
|
405
366
|
headers: _headers,
|
|
406
367
|
contentType: "application/json",
|
|
407
368
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
408
369
|
requestType: "json",
|
|
409
370
|
body: request,
|
|
410
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
411
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
371
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
372
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
412
373
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
374
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
375
|
+
logging: this._options.logging,
|
|
413
376
|
});
|
|
414
377
|
if (_response.ok) {
|
|
415
378
|
return { data: undefined, rawResponse: _response.rawResponse };
|
|
@@ -438,21 +401,7 @@ export class Shares {
|
|
|
438
401
|
});
|
|
439
402
|
}
|
|
440
403
|
}
|
|
441
|
-
|
|
442
|
-
case "non-json":
|
|
443
|
-
throw new errors.FrameioError({
|
|
444
|
-
statusCode: _response.error.statusCode,
|
|
445
|
-
body: _response.error.rawBody,
|
|
446
|
-
rawResponse: _response.rawResponse,
|
|
447
|
-
});
|
|
448
|
-
case "timeout":
|
|
449
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling POST /v4/accounts/{account_id}/shares/{share_id}/reviewers.");
|
|
450
|
-
case "unknown":
|
|
451
|
-
throw new errors.FrameioError({
|
|
452
|
-
message: _response.error.errorMessage,
|
|
453
|
-
rawResponse: _response.rawResponse,
|
|
454
|
-
});
|
|
455
|
-
}
|
|
404
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/shares/{share_id}/reviewers");
|
|
456
405
|
});
|
|
457
406
|
}
|
|
458
407
|
/**
|
|
@@ -461,10 +410,10 @@ export class Shares {
|
|
|
461
410
|
* A request can only include one identifier type parameter.
|
|
462
411
|
* <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
463
412
|
*
|
|
464
|
-
* @param {Frameio.Uuid}
|
|
465
|
-
* @param {Frameio.Uuid}
|
|
413
|
+
* @param {Frameio.Uuid} account_id
|
|
414
|
+
* @param {Frameio.Uuid} share_id
|
|
466
415
|
* @param {Frameio.RemoveReviewerParams} request
|
|
467
|
-
* @param {
|
|
416
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
468
417
|
*
|
|
469
418
|
* @throws {@link Frameio.BadRequestError}
|
|
470
419
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -483,24 +432,27 @@ export class Shares {
|
|
|
483
432
|
* }
|
|
484
433
|
* })
|
|
485
434
|
*/
|
|
486
|
-
removeReviewers(
|
|
487
|
-
return core.HttpResponsePromise.fromPromise(this.__removeReviewers(
|
|
435
|
+
removeReviewers(account_id, share_id, request, requestOptions) {
|
|
436
|
+
return core.HttpResponsePromise.fromPromise(this.__removeReviewers(account_id, share_id, request, requestOptions));
|
|
488
437
|
}
|
|
489
|
-
__removeReviewers(
|
|
438
|
+
__removeReviewers(account_id, share_id, request, requestOptions) {
|
|
490
439
|
return __awaiter(this, void 0, void 0, function* () {
|
|
491
|
-
var _a, _b, _c, _d;
|
|
492
|
-
|
|
440
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
441
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
442
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
493
443
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
494
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${
|
|
444
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/shares/${core.url.encodePathParam(share_id)}/reviewers`),
|
|
495
445
|
method: "DELETE",
|
|
496
446
|
headers: _headers,
|
|
497
447
|
contentType: "application/json",
|
|
498
448
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
499
449
|
requestType: "json",
|
|
500
450
|
body: request,
|
|
501
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
502
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
451
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
452
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
503
453
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
454
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
455
|
+
logging: this._options.logging,
|
|
504
456
|
});
|
|
505
457
|
if (_response.ok) {
|
|
506
458
|
return { data: undefined, rawResponse: _response.rawResponse };
|
|
@@ -529,30 +481,16 @@ export class Shares {
|
|
|
529
481
|
});
|
|
530
482
|
}
|
|
531
483
|
}
|
|
532
|
-
|
|
533
|
-
case "non-json":
|
|
534
|
-
throw new errors.FrameioError({
|
|
535
|
-
statusCode: _response.error.statusCode,
|
|
536
|
-
body: _response.error.rawBody,
|
|
537
|
-
rawResponse: _response.rawResponse,
|
|
538
|
-
});
|
|
539
|
-
case "timeout":
|
|
540
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling DELETE /v4/accounts/{account_id}/shares/{share_id}/reviewers.");
|
|
541
|
-
case "unknown":
|
|
542
|
-
throw new errors.FrameioError({
|
|
543
|
-
message: _response.error.errorMessage,
|
|
544
|
-
rawResponse: _response.rawResponse,
|
|
545
|
-
});
|
|
546
|
-
}
|
|
484
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/shares/{share_id}/reviewers");
|
|
547
485
|
});
|
|
548
486
|
}
|
|
549
487
|
/**
|
|
550
488
|
* Remove an asset currently in the share from that share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
551
489
|
*
|
|
552
|
-
* @param {Frameio.Uuid}
|
|
553
|
-
* @param {Frameio.Uuid}
|
|
554
|
-
* @param {Frameio.Uuid}
|
|
555
|
-
* @param {
|
|
490
|
+
* @param {Frameio.Uuid} account_id
|
|
491
|
+
* @param {Frameio.Uuid} share_id
|
|
492
|
+
* @param {Frameio.Uuid} asset_id
|
|
493
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
556
494
|
*
|
|
557
495
|
* @throws {@link Frameio.BadRequestError}
|
|
558
496
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -565,21 +503,24 @@ export class Shares {
|
|
|
565
503
|
* @example
|
|
566
504
|
* await client.shares.removeAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
|
|
567
505
|
*/
|
|
568
|
-
removeAsset(
|
|
569
|
-
return core.HttpResponsePromise.fromPromise(this.__removeAsset(
|
|
506
|
+
removeAsset(account_id, share_id, asset_id, requestOptions) {
|
|
507
|
+
return core.HttpResponsePromise.fromPromise(this.__removeAsset(account_id, share_id, asset_id, requestOptions));
|
|
570
508
|
}
|
|
571
|
-
__removeAsset(
|
|
509
|
+
__removeAsset(account_id, share_id, asset_id, requestOptions) {
|
|
572
510
|
return __awaiter(this, void 0, void 0, function* () {
|
|
573
|
-
var _a, _b, _c, _d;
|
|
574
|
-
|
|
511
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
512
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
513
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
575
514
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
576
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${
|
|
515
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/shares/${core.url.encodePathParam(share_id)}/assets/${core.url.encodePathParam(asset_id)}`),
|
|
577
516
|
method: "DELETE",
|
|
578
517
|
headers: _headers,
|
|
579
518
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
580
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
581
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
519
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
520
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
582
521
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
522
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
523
|
+
logging: this._options.logging,
|
|
583
524
|
});
|
|
584
525
|
if (_response.ok) {
|
|
585
526
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -608,30 +549,16 @@ export class Shares {
|
|
|
608
549
|
});
|
|
609
550
|
}
|
|
610
551
|
}
|
|
611
|
-
|
|
612
|
-
case "non-json":
|
|
613
|
-
throw new errors.FrameioError({
|
|
614
|
-
statusCode: _response.error.statusCode,
|
|
615
|
-
body: _response.error.rawBody,
|
|
616
|
-
rawResponse: _response.rawResponse,
|
|
617
|
-
});
|
|
618
|
-
case "timeout":
|
|
619
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling DELETE /v4/accounts/{account_id}/shares/{share_id}/assets/{asset_id}.");
|
|
620
|
-
case "unknown":
|
|
621
|
-
throw new errors.FrameioError({
|
|
622
|
-
message: _response.error.errorMessage,
|
|
623
|
-
rawResponse: _response.rawResponse,
|
|
624
|
-
});
|
|
625
|
-
}
|
|
552
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/shares/{share_id}/assets/{asset_id}");
|
|
626
553
|
});
|
|
627
554
|
}
|
|
628
555
|
/**
|
|
629
556
|
* Add new asset share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
630
557
|
*
|
|
631
|
-
* @param {Frameio.Uuid}
|
|
632
|
-
* @param {Frameio.Uuid}
|
|
558
|
+
* @param {Frameio.Uuid} account_id
|
|
559
|
+
* @param {Frameio.Uuid} share_id
|
|
633
560
|
* @param {Frameio.AddAssetParams} request
|
|
634
|
-
* @param {
|
|
561
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
635
562
|
*
|
|
636
563
|
* @throws {@link Frameio.BadRequestError}
|
|
637
564
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -648,24 +575,27 @@ export class Shares {
|
|
|
648
575
|
* }
|
|
649
576
|
* })
|
|
650
577
|
*/
|
|
651
|
-
addAsset(
|
|
652
|
-
return core.HttpResponsePromise.fromPromise(this.__addAsset(
|
|
578
|
+
addAsset(account_id, share_id, request, requestOptions) {
|
|
579
|
+
return core.HttpResponsePromise.fromPromise(this.__addAsset(account_id, share_id, request, requestOptions));
|
|
653
580
|
}
|
|
654
|
-
__addAsset(
|
|
581
|
+
__addAsset(account_id, share_id, request, requestOptions) {
|
|
655
582
|
return __awaiter(this, void 0, void 0, function* () {
|
|
656
|
-
var _a, _b, _c, _d;
|
|
657
|
-
|
|
583
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
584
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
585
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
658
586
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
659
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${
|
|
587
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/shares/${core.url.encodePathParam(share_id)}/assets`),
|
|
660
588
|
method: "POST",
|
|
661
589
|
headers: _headers,
|
|
662
590
|
contentType: "application/json",
|
|
663
591
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
664
592
|
requestType: "json",
|
|
665
593
|
body: request,
|
|
666
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
667
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
594
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
595
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
668
596
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
597
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
598
|
+
logging: this._options.logging,
|
|
669
599
|
});
|
|
670
600
|
if (_response.ok) {
|
|
671
601
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -694,30 +624,16 @@ export class Shares {
|
|
|
694
624
|
});
|
|
695
625
|
}
|
|
696
626
|
}
|
|
697
|
-
|
|
698
|
-
case "non-json":
|
|
699
|
-
throw new errors.FrameioError({
|
|
700
|
-
statusCode: _response.error.statusCode,
|
|
701
|
-
body: _response.error.rawBody,
|
|
702
|
-
rawResponse: _response.rawResponse,
|
|
703
|
-
});
|
|
704
|
-
case "timeout":
|
|
705
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling POST /v4/accounts/{account_id}/shares/{share_id}/assets.");
|
|
706
|
-
case "unknown":
|
|
707
|
-
throw new errors.FrameioError({
|
|
708
|
-
message: _response.error.errorMessage,
|
|
709
|
-
rawResponse: _response.rawResponse,
|
|
710
|
-
});
|
|
711
|
-
}
|
|
627
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/shares/{share_id}/assets");
|
|
712
628
|
});
|
|
713
629
|
}
|
|
714
630
|
/**
|
|
715
631
|
* List shares on a project. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
716
632
|
*
|
|
717
|
-
* @param {Frameio.Uuid}
|
|
718
|
-
* @param {Frameio.Uuid}
|
|
633
|
+
* @param {Frameio.Uuid} account_id
|
|
634
|
+
* @param {Frameio.Uuid} project_id
|
|
719
635
|
* @param {Frameio.SharesIndexRequest} request
|
|
720
|
-
* @param {
|
|
636
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
721
637
|
*
|
|
722
638
|
* @throws {@link Frameio.BadRequestError}
|
|
723
639
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -734,84 +650,72 @@ export class Shares {
|
|
|
734
650
|
* include_total_count: false
|
|
735
651
|
* })
|
|
736
652
|
*/
|
|
737
|
-
index(
|
|
738
|
-
return
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
|
|
751
|
-
|
|
752
|
-
|
|
753
|
-
|
|
754
|
-
|
|
755
|
-
|
|
756
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${encodeURIComponent(accountId)}/projects/${encodeURIComponent(projectId)}/shares`),
|
|
757
|
-
method: "GET",
|
|
758
|
-
headers: _headers,
|
|
759
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
760
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
761
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
762
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
763
|
-
});
|
|
764
|
-
if (_response.ok) {
|
|
765
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
766
|
-
}
|
|
767
|
-
if (_response.error.reason === "status-code") {
|
|
768
|
-
switch (_response.error.statusCode) {
|
|
769
|
-
case 400:
|
|
770
|
-
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
771
|
-
case 401:
|
|
772
|
-
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
773
|
-
case 403:
|
|
774
|
-
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
775
|
-
case 404:
|
|
776
|
-
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
777
|
-
case 409:
|
|
778
|
-
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
779
|
-
case 422:
|
|
780
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
781
|
-
case 429:
|
|
782
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
783
|
-
default:
|
|
784
|
-
throw new errors.FrameioError({
|
|
785
|
-
statusCode: _response.error.statusCode,
|
|
786
|
-
body: _response.error.body,
|
|
787
|
-
rawResponse: _response.rawResponse,
|
|
788
|
-
});
|
|
653
|
+
index(account_id_1, project_id_1) {
|
|
654
|
+
return __awaiter(this, arguments, void 0, function* (account_id, project_id, _request = {}, requestOptions) {
|
|
655
|
+
var _a, _b;
|
|
656
|
+
const list = core.HttpResponsePromise.interceptFunction((_requestUrl) => __awaiter(this, void 0, void 0, function* () {
|
|
657
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
658
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
659
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
660
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
661
|
+
url: _requestUrl,
|
|
662
|
+
method: "GET",
|
|
663
|
+
headers: _headers,
|
|
664
|
+
timeoutMs: ((_e = (_c = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _c !== void 0 ? _c : (_d = this._options) === null || _d === void 0 ? void 0 : _d.timeoutInSeconds) !== null && _e !== void 0 ? _e : 60) * 1000,
|
|
665
|
+
maxRetries: (_f = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _f !== void 0 ? _f : (_g = this._options) === null || _g === void 0 ? void 0 : _g.maxRetries,
|
|
666
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
667
|
+
fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
|
|
668
|
+
logging: this._options.logging,
|
|
669
|
+
});
|
|
670
|
+
if (_response.ok) {
|
|
671
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
789
672
|
}
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
673
|
+
if (_response.error.reason === "status-code") {
|
|
674
|
+
switch (_response.error.statusCode) {
|
|
675
|
+
case 400:
|
|
676
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
677
|
+
case 401:
|
|
678
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
679
|
+
case 403:
|
|
680
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
681
|
+
case 404:
|
|
682
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
683
|
+
case 409:
|
|
684
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
685
|
+
case 422:
|
|
686
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
687
|
+
case 429:
|
|
688
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
689
|
+
default:
|
|
690
|
+
throw new errors.FrameioError({
|
|
691
|
+
statusCode: _response.error.statusCode,
|
|
692
|
+
body: _response.error.body,
|
|
693
|
+
rawResponse: _response.rawResponse,
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
}
|
|
697
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/projects/{project_id}/shares");
|
|
698
|
+
}));
|
|
699
|
+
const _baseUrl = (_b = (_a = (yield core.Supplier.get(this._options.baseUrl))) !== null && _a !== void 0 ? _a : (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.FrameioEnvironment.Default;
|
|
700
|
+
const dataWithRawResponse = yield list(core.url.join(_baseUrl, `v4/accounts/${core.url.encodePathParam(account_id)}/projects/${core.url.encodePathParam(project_id)}/shares`)).withRawResponse();
|
|
701
|
+
return new core.Page({
|
|
702
|
+
response: dataWithRawResponse.data,
|
|
703
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
704
|
+
hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.links.next) != null && (response === null || response === void 0 ? void 0 : response.links.next) !== "",
|
|
705
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.data) !== null && _a !== void 0 ? _a : []; },
|
|
706
|
+
loadPage: (response) => {
|
|
707
|
+
return list(core.url.join(_baseUrl, response === null || response === void 0 ? void 0 : response.links.next));
|
|
708
|
+
},
|
|
709
|
+
});
|
|
806
710
|
});
|
|
807
711
|
}
|
|
808
712
|
/**
|
|
809
713
|
* Create share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
810
714
|
*
|
|
811
|
-
* @param {Frameio.Uuid}
|
|
812
|
-
* @param {Frameio.Uuid}
|
|
715
|
+
* @param {Frameio.Uuid} account_id
|
|
716
|
+
* @param {Frameio.Uuid} project_id
|
|
813
717
|
* @param {Frameio.CreateShareParams} request
|
|
814
|
-
* @param {
|
|
718
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
815
719
|
*
|
|
816
720
|
* @throws {@link Frameio.BadRequestError}
|
|
817
721
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -834,24 +738,27 @@ export class Shares {
|
|
|
834
738
|
* }
|
|
835
739
|
* })
|
|
836
740
|
*/
|
|
837
|
-
create(
|
|
838
|
-
return core.HttpResponsePromise.fromPromise(this.__create(
|
|
741
|
+
create(account_id, project_id, request, requestOptions) {
|
|
742
|
+
return core.HttpResponsePromise.fromPromise(this.__create(account_id, project_id, request, requestOptions));
|
|
839
743
|
}
|
|
840
|
-
__create(
|
|
744
|
+
__create(account_id, project_id, request, requestOptions) {
|
|
841
745
|
return __awaiter(this, void 0, void 0, function* () {
|
|
842
|
-
var _a, _b, _c, _d;
|
|
843
|
-
|
|
746
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
747
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
748
|
+
const _headers = mergeHeaders(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
844
749
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
845
|
-
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${
|
|
750
|
+
url: core.url.join((_d = (_c = (yield core.Supplier.get(this._options.baseUrl))) !== null && _c !== void 0 ? _c : (yield core.Supplier.get(this._options.environment))) !== null && _d !== void 0 ? _d : environments.FrameioEnvironment.Default, `v4/accounts/${core.url.encodePathParam(account_id)}/projects/${core.url.encodePathParam(project_id)}/shares`),
|
|
846
751
|
method: "POST",
|
|
847
752
|
headers: _headers,
|
|
848
753
|
contentType: "application/json",
|
|
849
754
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
850
755
|
requestType: "json",
|
|
851
756
|
body: request,
|
|
852
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
853
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
757
|
+
timeoutMs: ((_g = (_e = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) !== null && _e !== void 0 ? _e : (_f = this._options) === null || _f === void 0 ? void 0 : _f.timeoutInSeconds) !== null && _g !== void 0 ? _g : 60) * 1000,
|
|
758
|
+
maxRetries: (_h = requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries) !== null && _h !== void 0 ? _h : (_j = this._options) === null || _j === void 0 ? void 0 : _j.maxRetries,
|
|
854
759
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
760
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
761
|
+
logging: this._options.logging,
|
|
855
762
|
});
|
|
856
763
|
if (_response.ok) {
|
|
857
764
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -880,26 +787,7 @@ export class Shares {
|
|
|
880
787
|
});
|
|
881
788
|
}
|
|
882
789
|
}
|
|
883
|
-
|
|
884
|
-
case "non-json":
|
|
885
|
-
throw new errors.FrameioError({
|
|
886
|
-
statusCode: _response.error.statusCode,
|
|
887
|
-
body: _response.error.rawBody,
|
|
888
|
-
rawResponse: _response.rawResponse,
|
|
889
|
-
});
|
|
890
|
-
case "timeout":
|
|
891
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling POST /v4/accounts/{account_id}/projects/{project_id}/shares.");
|
|
892
|
-
case "unknown":
|
|
893
|
-
throw new errors.FrameioError({
|
|
894
|
-
message: _response.error.errorMessage,
|
|
895
|
-
rawResponse: _response.rawResponse,
|
|
896
|
-
});
|
|
897
|
-
}
|
|
898
|
-
});
|
|
899
|
-
}
|
|
900
|
-
_getAuthorizationHeader() {
|
|
901
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
902
|
-
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
790
|
+
return handleNonStatusCodeError(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/projects/{project_id}/shares");
|
|
903
791
|
});
|
|
904
792
|
}
|
|
905
793
|
}
|