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
|
@@ -43,25 +43,27 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
43
43
|
});
|
|
44
44
|
};
|
|
45
45
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
46
|
-
exports.
|
|
47
|
-
const
|
|
48
|
-
const core = __importStar(require("../../../../core/index.js"));
|
|
49
|
-
const Frameio = __importStar(require("../../../index.js"));
|
|
46
|
+
exports.SharesClient = void 0;
|
|
47
|
+
const BaseClient_js_1 = require("../../../../BaseClient.js");
|
|
50
48
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
49
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
50
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
51
|
+
const handleNonStatusCodeError_js_1 = require("../../../../errors/handleNonStatusCodeError.js");
|
|
51
52
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
|
+
const Frameio = __importStar(require("../../../index.js"));
|
|
52
54
|
/**
|
|
53
55
|
* Manage Shares and related operations.
|
|
54
56
|
*/
|
|
55
|
-
class
|
|
56
|
-
constructor(
|
|
57
|
-
this._options =
|
|
57
|
+
class SharesClient {
|
|
58
|
+
constructor(options) {
|
|
59
|
+
this._options = (0, BaseClient_js_1.normalizeClientOptionsWithAuth)(options);
|
|
58
60
|
}
|
|
59
61
|
/**
|
|
60
62
|
* Show a single Share. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
61
63
|
*
|
|
62
|
-
* @param {Frameio.Uuid}
|
|
63
|
-
* @param {Frameio.Uuid}
|
|
64
|
-
* @param {
|
|
64
|
+
* @param {Frameio.Uuid} account_id
|
|
65
|
+
* @param {Frameio.Uuid} share_id
|
|
66
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
65
67
|
*
|
|
66
68
|
* @throws {@link Frameio.BadRequestError}
|
|
67
69
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -74,21 +76,24 @@ class Shares {
|
|
|
74
76
|
* @example
|
|
75
77
|
* await client.shares.show("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
|
|
76
78
|
*/
|
|
77
|
-
show(
|
|
78
|
-
return core.HttpResponsePromise.fromPromise(this.__show(
|
|
79
|
+
show(account_id, share_id, requestOptions) {
|
|
80
|
+
return core.HttpResponsePromise.fromPromise(this.__show(account_id, share_id, requestOptions));
|
|
79
81
|
}
|
|
80
|
-
__show(
|
|
82
|
+
__show(account_id, share_id, requestOptions) {
|
|
81
83
|
return __awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
var _a, _b, _c, _d;
|
|
83
|
-
|
|
84
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
85
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
86
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
84
87
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
85
|
-
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/${
|
|
88
|
+
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)}`),
|
|
86
89
|
method: "GET",
|
|
87
90
|
headers: _headers,
|
|
88
91
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
89
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
90
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
92
|
+
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,
|
|
93
|
+
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,
|
|
91
94
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
95
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
96
|
+
logging: this._options.logging,
|
|
92
97
|
});
|
|
93
98
|
if (_response.ok) {
|
|
94
99
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -117,29 +122,15 @@ class Shares {
|
|
|
117
122
|
});
|
|
118
123
|
}
|
|
119
124
|
}
|
|
120
|
-
|
|
121
|
-
case "non-json":
|
|
122
|
-
throw new errors.FrameioError({
|
|
123
|
-
statusCode: _response.error.statusCode,
|
|
124
|
-
body: _response.error.rawBody,
|
|
125
|
-
rawResponse: _response.rawResponse,
|
|
126
|
-
});
|
|
127
|
-
case "timeout":
|
|
128
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/shares/{share_id}.");
|
|
129
|
-
case "unknown":
|
|
130
|
-
throw new errors.FrameioError({
|
|
131
|
-
message: _response.error.errorMessage,
|
|
132
|
-
rawResponse: _response.rawResponse,
|
|
133
|
-
});
|
|
134
|
-
}
|
|
125
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/shares/{share_id}");
|
|
135
126
|
});
|
|
136
127
|
}
|
|
137
128
|
/**
|
|
138
129
|
* Delete a share. <br/>Rate Limits: 60 calls per 1.00 minute(s) per account_user
|
|
139
130
|
*
|
|
140
|
-
* @param {Frameio.Uuid}
|
|
141
|
-
* @param {Frameio.Uuid}
|
|
142
|
-
* @param {
|
|
131
|
+
* @param {Frameio.Uuid} account_id
|
|
132
|
+
* @param {Frameio.Uuid} share_id
|
|
133
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
143
134
|
*
|
|
144
135
|
* @throws {@link Frameio.BadRequestError}
|
|
145
136
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -152,21 +143,24 @@ class Shares {
|
|
|
152
143
|
* @example
|
|
153
144
|
* await client.shares.delete("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
|
|
154
145
|
*/
|
|
155
|
-
delete(
|
|
156
|
-
return core.HttpResponsePromise.fromPromise(this.__delete(
|
|
146
|
+
delete(account_id, share_id, requestOptions) {
|
|
147
|
+
return core.HttpResponsePromise.fromPromise(this.__delete(account_id, share_id, requestOptions));
|
|
157
148
|
}
|
|
158
|
-
__delete(
|
|
149
|
+
__delete(account_id, share_id, requestOptions) {
|
|
159
150
|
return __awaiter(this, void 0, void 0, function* () {
|
|
160
|
-
var _a, _b, _c, _d;
|
|
161
|
-
|
|
151
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
152
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
153
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
162
154
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
163
|
-
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/${
|
|
155
|
+
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)}`),
|
|
164
156
|
method: "DELETE",
|
|
165
157
|
headers: _headers,
|
|
166
158
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
167
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
168
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
159
|
+
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,
|
|
160
|
+
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,
|
|
169
161
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
162
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
163
|
+
logging: this._options.logging,
|
|
170
164
|
});
|
|
171
165
|
if (_response.ok) {
|
|
172
166
|
return { data: undefined, rawResponse: _response.rawResponse };
|
|
@@ -195,30 +189,16 @@ class Shares {
|
|
|
195
189
|
});
|
|
196
190
|
}
|
|
197
191
|
}
|
|
198
|
-
|
|
199
|
-
case "non-json":
|
|
200
|
-
throw new errors.FrameioError({
|
|
201
|
-
statusCode: _response.error.statusCode,
|
|
202
|
-
body: _response.error.rawBody,
|
|
203
|
-
rawResponse: _response.rawResponse,
|
|
204
|
-
});
|
|
205
|
-
case "timeout":
|
|
206
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling DELETE /v4/accounts/{account_id}/shares/{share_id}.");
|
|
207
|
-
case "unknown":
|
|
208
|
-
throw new errors.FrameioError({
|
|
209
|
-
message: _response.error.errorMessage,
|
|
210
|
-
rawResponse: _response.rawResponse,
|
|
211
|
-
});
|
|
212
|
-
}
|
|
192
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/shares/{share_id}");
|
|
213
193
|
});
|
|
214
194
|
}
|
|
215
195
|
/**
|
|
216
196
|
* Update share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
217
197
|
*
|
|
218
|
-
* @param {Frameio.Uuid}
|
|
219
|
-
* @param {Frameio.Uuid}
|
|
198
|
+
* @param {Frameio.Uuid} account_id
|
|
199
|
+
* @param {Frameio.Uuid} share_id
|
|
220
200
|
* @param {Frameio.UpdateShareParams} request
|
|
221
|
-
* @param {
|
|
201
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
222
202
|
*
|
|
223
203
|
* @throws {@link Frameio.BadRequestError}
|
|
224
204
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -240,24 +220,27 @@ class Shares {
|
|
|
240
220
|
* }
|
|
241
221
|
* })
|
|
242
222
|
*/
|
|
243
|
-
update(
|
|
244
|
-
return core.HttpResponsePromise.fromPromise(this.__update(
|
|
223
|
+
update(account_id, share_id, request, requestOptions) {
|
|
224
|
+
return core.HttpResponsePromise.fromPromise(this.__update(account_id, share_id, request, requestOptions));
|
|
245
225
|
}
|
|
246
|
-
__update(
|
|
226
|
+
__update(account_id, share_id, request, requestOptions) {
|
|
247
227
|
return __awaiter(this, void 0, void 0, function* () {
|
|
248
|
-
var _a, _b, _c, _d;
|
|
249
|
-
|
|
228
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
229
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
230
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
250
231
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
251
|
-
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/${
|
|
232
|
+
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)}`),
|
|
252
233
|
method: "PATCH",
|
|
253
234
|
headers: _headers,
|
|
254
235
|
contentType: "application/json",
|
|
255
236
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
256
237
|
requestType: "json",
|
|
257
238
|
body: request,
|
|
258
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
259
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
239
|
+
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,
|
|
240
|
+
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,
|
|
260
241
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
242
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
243
|
+
logging: this._options.logging,
|
|
261
244
|
});
|
|
262
245
|
if (_response.ok) {
|
|
263
246
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -286,30 +269,16 @@ class Shares {
|
|
|
286
269
|
});
|
|
287
270
|
}
|
|
288
271
|
}
|
|
289
|
-
|
|
290
|
-
case "non-json":
|
|
291
|
-
throw new errors.FrameioError({
|
|
292
|
-
statusCode: _response.error.statusCode,
|
|
293
|
-
body: _response.error.rawBody,
|
|
294
|
-
rawResponse: _response.rawResponse,
|
|
295
|
-
});
|
|
296
|
-
case "timeout":
|
|
297
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling PATCH /v4/accounts/{account_id}/shares/{share_id}.");
|
|
298
|
-
case "unknown":
|
|
299
|
-
throw new errors.FrameioError({
|
|
300
|
-
message: _response.error.errorMessage,
|
|
301
|
-
rawResponse: _response.rawResponse,
|
|
302
|
-
});
|
|
303
|
-
}
|
|
272
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "PATCH", "/v4/accounts/{account_id}/shares/{share_id}");
|
|
304
273
|
});
|
|
305
274
|
}
|
|
306
275
|
/**
|
|
307
276
|
* List share reviewers. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
308
277
|
*
|
|
309
|
-
* @param {Frameio.Uuid}
|
|
310
|
-
* @param {Frameio.Uuid}
|
|
278
|
+
* @param {Frameio.Uuid} account_id
|
|
279
|
+
* @param {Frameio.Uuid} share_id
|
|
311
280
|
* @param {Frameio.SharesListReviewersRequest} request
|
|
312
|
-
* @param {
|
|
281
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
313
282
|
*
|
|
314
283
|
* @throws {@link Frameio.BadRequestError}
|
|
315
284
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -326,75 +295,66 @@ class Shares {
|
|
|
326
295
|
* include_total_count: false
|
|
327
296
|
* })
|
|
328
297
|
*/
|
|
329
|
-
listReviewers(
|
|
330
|
-
return
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
method: "GET",
|
|
350
|
-
headers: _headers,
|
|
351
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
352
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
353
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
354
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
355
|
-
});
|
|
356
|
-
if (_response.ok) {
|
|
357
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
358
|
-
}
|
|
359
|
-
if (_response.error.reason === "status-code") {
|
|
360
|
-
switch (_response.error.statusCode) {
|
|
361
|
-
case 400:
|
|
362
|
-
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
363
|
-
case 401:
|
|
364
|
-
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
365
|
-
case 403:
|
|
366
|
-
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
367
|
-
case 404:
|
|
368
|
-
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
369
|
-
case 409:
|
|
370
|
-
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
371
|
-
case 422:
|
|
372
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
373
|
-
case 429:
|
|
374
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
375
|
-
default:
|
|
376
|
-
throw new errors.FrameioError({
|
|
377
|
-
statusCode: _response.error.statusCode,
|
|
378
|
-
body: _response.error.body,
|
|
379
|
-
rawResponse: _response.rawResponse,
|
|
380
|
-
});
|
|
381
|
-
}
|
|
382
|
-
}
|
|
383
|
-
switch (_response.error.reason) {
|
|
384
|
-
case "non-json":
|
|
385
|
-
throw new errors.FrameioError({
|
|
386
|
-
statusCode: _response.error.statusCode,
|
|
387
|
-
body: _response.error.rawBody,
|
|
388
|
-
rawResponse: _response.rawResponse,
|
|
389
|
-
});
|
|
390
|
-
case "timeout":
|
|
391
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling GET /v4/accounts/{account_id}/shares/{share_id}/reviewers.");
|
|
392
|
-
case "unknown":
|
|
393
|
-
throw new errors.FrameioError({
|
|
394
|
-
message: _response.error.errorMessage,
|
|
298
|
+
listReviewers(account_id_1, share_id_1) {
|
|
299
|
+
return __awaiter(this, arguments, void 0, function* (account_id, share_id, _request = {}, requestOptions) {
|
|
300
|
+
var _a, _b;
|
|
301
|
+
const list = core.HttpResponsePromise.interceptFunction((_requestUrl) => __awaiter(this, void 0, void 0, function* () {
|
|
302
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
303
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
304
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
305
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
306
|
+
url: _requestUrl,
|
|
307
|
+
method: "GET",
|
|
308
|
+
headers: _headers,
|
|
309
|
+
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,
|
|
310
|
+
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,
|
|
311
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
312
|
+
fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
|
|
313
|
+
logging: this._options.logging,
|
|
314
|
+
});
|
|
315
|
+
if (_response.ok) {
|
|
316
|
+
return {
|
|
317
|
+
data: _response.body,
|
|
395
318
|
rawResponse: _response.rawResponse,
|
|
396
|
-
}
|
|
397
|
-
|
|
319
|
+
};
|
|
320
|
+
}
|
|
321
|
+
if (_response.error.reason === "status-code") {
|
|
322
|
+
switch (_response.error.statusCode) {
|
|
323
|
+
case 400:
|
|
324
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
325
|
+
case 401:
|
|
326
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
327
|
+
case 403:
|
|
328
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
329
|
+
case 404:
|
|
330
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
331
|
+
case 409:
|
|
332
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
333
|
+
case 422:
|
|
334
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
335
|
+
case 429:
|
|
336
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
337
|
+
default:
|
|
338
|
+
throw new errors.FrameioError({
|
|
339
|
+
statusCode: _response.error.statusCode,
|
|
340
|
+
body: _response.error.body,
|
|
341
|
+
rawResponse: _response.rawResponse,
|
|
342
|
+
});
|
|
343
|
+
}
|
|
344
|
+
}
|
|
345
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/shares/{share_id}/reviewers");
|
|
346
|
+
}));
|
|
347
|
+
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;
|
|
348
|
+
const dataWithRawResponse = yield list(core.url.join(_baseUrl, `v4/accounts/${core.url.encodePathParam(account_id)}/shares/${core.url.encodePathParam(share_id)}/reviewers`)).withRawResponse();
|
|
349
|
+
return new core.Page({
|
|
350
|
+
response: dataWithRawResponse.data,
|
|
351
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
352
|
+
hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.links.next) != null && (response === null || response === void 0 ? void 0 : response.links.next) !== "",
|
|
353
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.data) !== null && _a !== void 0 ? _a : []; },
|
|
354
|
+
loadPage: (response) => {
|
|
355
|
+
return list(core.url.join(_baseUrl, response === null || response === void 0 ? void 0 : response.links.next));
|
|
356
|
+
},
|
|
357
|
+
});
|
|
398
358
|
});
|
|
399
359
|
}
|
|
400
360
|
/**
|
|
@@ -405,10 +365,10 @@ class Shares {
|
|
|
405
365
|
* `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.
|
|
406
366
|
* <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
407
367
|
*
|
|
408
|
-
* @param {Frameio.Uuid}
|
|
409
|
-
* @param {Frameio.Uuid}
|
|
368
|
+
* @param {Frameio.Uuid} account_id
|
|
369
|
+
* @param {Frameio.Uuid} share_id
|
|
410
370
|
* @param {Frameio.AddReviewersToShareParams} request
|
|
411
|
-
* @param {
|
|
371
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
412
372
|
*
|
|
413
373
|
* @throws {@link Frameio.BadRequestError}
|
|
414
374
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -428,24 +388,27 @@ class Shares {
|
|
|
428
388
|
* }
|
|
429
389
|
* })
|
|
430
390
|
*/
|
|
431
|
-
addReviewers(
|
|
432
|
-
return core.HttpResponsePromise.fromPromise(this.__addReviewers(
|
|
391
|
+
addReviewers(account_id, share_id, request, requestOptions) {
|
|
392
|
+
return core.HttpResponsePromise.fromPromise(this.__addReviewers(account_id, share_id, request, requestOptions));
|
|
433
393
|
}
|
|
434
|
-
__addReviewers(
|
|
394
|
+
__addReviewers(account_id, share_id, request, requestOptions) {
|
|
435
395
|
return __awaiter(this, void 0, void 0, function* () {
|
|
436
|
-
var _a, _b, _c, _d;
|
|
437
|
-
|
|
396
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
397
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
398
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
438
399
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
439
|
-
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/${
|
|
400
|
+
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`),
|
|
440
401
|
method: "POST",
|
|
441
402
|
headers: _headers,
|
|
442
403
|
contentType: "application/json",
|
|
443
404
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
444
405
|
requestType: "json",
|
|
445
406
|
body: request,
|
|
446
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
447
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
407
|
+
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,
|
|
408
|
+
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,
|
|
448
409
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
410
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
411
|
+
logging: this._options.logging,
|
|
449
412
|
});
|
|
450
413
|
if (_response.ok) {
|
|
451
414
|
return { data: undefined, rawResponse: _response.rawResponse };
|
|
@@ -474,21 +437,7 @@ class Shares {
|
|
|
474
437
|
});
|
|
475
438
|
}
|
|
476
439
|
}
|
|
477
|
-
|
|
478
|
-
case "non-json":
|
|
479
|
-
throw new errors.FrameioError({
|
|
480
|
-
statusCode: _response.error.statusCode,
|
|
481
|
-
body: _response.error.rawBody,
|
|
482
|
-
rawResponse: _response.rawResponse,
|
|
483
|
-
});
|
|
484
|
-
case "timeout":
|
|
485
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling POST /v4/accounts/{account_id}/shares/{share_id}/reviewers.");
|
|
486
|
-
case "unknown":
|
|
487
|
-
throw new errors.FrameioError({
|
|
488
|
-
message: _response.error.errorMessage,
|
|
489
|
-
rawResponse: _response.rawResponse,
|
|
490
|
-
});
|
|
491
|
-
}
|
|
440
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/shares/{share_id}/reviewers");
|
|
492
441
|
});
|
|
493
442
|
}
|
|
494
443
|
/**
|
|
@@ -497,10 +446,10 @@ class Shares {
|
|
|
497
446
|
* A request can only include one identifier type parameter.
|
|
498
447
|
* <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
499
448
|
*
|
|
500
|
-
* @param {Frameio.Uuid}
|
|
501
|
-
* @param {Frameio.Uuid}
|
|
449
|
+
* @param {Frameio.Uuid} account_id
|
|
450
|
+
* @param {Frameio.Uuid} share_id
|
|
502
451
|
* @param {Frameio.RemoveReviewerParams} request
|
|
503
|
-
* @param {
|
|
452
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
504
453
|
*
|
|
505
454
|
* @throws {@link Frameio.BadRequestError}
|
|
506
455
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -519,24 +468,27 @@ class Shares {
|
|
|
519
468
|
* }
|
|
520
469
|
* })
|
|
521
470
|
*/
|
|
522
|
-
removeReviewers(
|
|
523
|
-
return core.HttpResponsePromise.fromPromise(this.__removeReviewers(
|
|
471
|
+
removeReviewers(account_id, share_id, request, requestOptions) {
|
|
472
|
+
return core.HttpResponsePromise.fromPromise(this.__removeReviewers(account_id, share_id, request, requestOptions));
|
|
524
473
|
}
|
|
525
|
-
__removeReviewers(
|
|
474
|
+
__removeReviewers(account_id, share_id, request, requestOptions) {
|
|
526
475
|
return __awaiter(this, void 0, void 0, function* () {
|
|
527
|
-
var _a, _b, _c, _d;
|
|
528
|
-
|
|
476
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
477
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
478
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
529
479
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
530
|
-
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/${
|
|
480
|
+
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`),
|
|
531
481
|
method: "DELETE",
|
|
532
482
|
headers: _headers,
|
|
533
483
|
contentType: "application/json",
|
|
534
484
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
535
485
|
requestType: "json",
|
|
536
486
|
body: request,
|
|
537
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
538
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
487
|
+
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,
|
|
488
|
+
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,
|
|
539
489
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
490
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
491
|
+
logging: this._options.logging,
|
|
540
492
|
});
|
|
541
493
|
if (_response.ok) {
|
|
542
494
|
return { data: undefined, rawResponse: _response.rawResponse };
|
|
@@ -565,30 +517,16 @@ class Shares {
|
|
|
565
517
|
});
|
|
566
518
|
}
|
|
567
519
|
}
|
|
568
|
-
|
|
569
|
-
case "non-json":
|
|
570
|
-
throw new errors.FrameioError({
|
|
571
|
-
statusCode: _response.error.statusCode,
|
|
572
|
-
body: _response.error.rawBody,
|
|
573
|
-
rawResponse: _response.rawResponse,
|
|
574
|
-
});
|
|
575
|
-
case "timeout":
|
|
576
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling DELETE /v4/accounts/{account_id}/shares/{share_id}/reviewers.");
|
|
577
|
-
case "unknown":
|
|
578
|
-
throw new errors.FrameioError({
|
|
579
|
-
message: _response.error.errorMessage,
|
|
580
|
-
rawResponse: _response.rawResponse,
|
|
581
|
-
});
|
|
582
|
-
}
|
|
520
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/shares/{share_id}/reviewers");
|
|
583
521
|
});
|
|
584
522
|
}
|
|
585
523
|
/**
|
|
586
524
|
* Remove an asset currently in the share from that share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
587
525
|
*
|
|
588
|
-
* @param {Frameio.Uuid}
|
|
589
|
-
* @param {Frameio.Uuid}
|
|
590
|
-
* @param {Frameio.Uuid}
|
|
591
|
-
* @param {
|
|
526
|
+
* @param {Frameio.Uuid} account_id
|
|
527
|
+
* @param {Frameio.Uuid} share_id
|
|
528
|
+
* @param {Frameio.Uuid} asset_id
|
|
529
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
592
530
|
*
|
|
593
531
|
* @throws {@link Frameio.BadRequestError}
|
|
594
532
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -601,21 +539,24 @@ class Shares {
|
|
|
601
539
|
* @example
|
|
602
540
|
* await client.shares.removeAsset("b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b", "b2702c44-c6da-4bb6-8bbd-be6e547ccf1b")
|
|
603
541
|
*/
|
|
604
|
-
removeAsset(
|
|
605
|
-
return core.HttpResponsePromise.fromPromise(this.__removeAsset(
|
|
542
|
+
removeAsset(account_id, share_id, asset_id, requestOptions) {
|
|
543
|
+
return core.HttpResponsePromise.fromPromise(this.__removeAsset(account_id, share_id, asset_id, requestOptions));
|
|
606
544
|
}
|
|
607
|
-
__removeAsset(
|
|
545
|
+
__removeAsset(account_id, share_id, asset_id, requestOptions) {
|
|
608
546
|
return __awaiter(this, void 0, void 0, function* () {
|
|
609
|
-
var _a, _b, _c, _d;
|
|
610
|
-
|
|
547
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
548
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
549
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
611
550
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
612
|
-
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/${
|
|
551
|
+
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)}`),
|
|
613
552
|
method: "DELETE",
|
|
614
553
|
headers: _headers,
|
|
615
554
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
616
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
617
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
555
|
+
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,
|
|
556
|
+
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,
|
|
618
557
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
558
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
559
|
+
logging: this._options.logging,
|
|
619
560
|
});
|
|
620
561
|
if (_response.ok) {
|
|
621
562
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -644,30 +585,16 @@ class Shares {
|
|
|
644
585
|
});
|
|
645
586
|
}
|
|
646
587
|
}
|
|
647
|
-
|
|
648
|
-
case "non-json":
|
|
649
|
-
throw new errors.FrameioError({
|
|
650
|
-
statusCode: _response.error.statusCode,
|
|
651
|
-
body: _response.error.rawBody,
|
|
652
|
-
rawResponse: _response.rawResponse,
|
|
653
|
-
});
|
|
654
|
-
case "timeout":
|
|
655
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling DELETE /v4/accounts/{account_id}/shares/{share_id}/assets/{asset_id}.");
|
|
656
|
-
case "unknown":
|
|
657
|
-
throw new errors.FrameioError({
|
|
658
|
-
message: _response.error.errorMessage,
|
|
659
|
-
rawResponse: _response.rawResponse,
|
|
660
|
-
});
|
|
661
|
-
}
|
|
588
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "DELETE", "/v4/accounts/{account_id}/shares/{share_id}/assets/{asset_id}");
|
|
662
589
|
});
|
|
663
590
|
}
|
|
664
591
|
/**
|
|
665
592
|
* Add new asset share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
666
593
|
*
|
|
667
|
-
* @param {Frameio.Uuid}
|
|
668
|
-
* @param {Frameio.Uuid}
|
|
594
|
+
* @param {Frameio.Uuid} account_id
|
|
595
|
+
* @param {Frameio.Uuid} share_id
|
|
669
596
|
* @param {Frameio.AddAssetParams} request
|
|
670
|
-
* @param {
|
|
597
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
671
598
|
*
|
|
672
599
|
* @throws {@link Frameio.BadRequestError}
|
|
673
600
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -684,24 +611,27 @@ class Shares {
|
|
|
684
611
|
* }
|
|
685
612
|
* })
|
|
686
613
|
*/
|
|
687
|
-
addAsset(
|
|
688
|
-
return core.HttpResponsePromise.fromPromise(this.__addAsset(
|
|
614
|
+
addAsset(account_id, share_id, request, requestOptions) {
|
|
615
|
+
return core.HttpResponsePromise.fromPromise(this.__addAsset(account_id, share_id, request, requestOptions));
|
|
689
616
|
}
|
|
690
|
-
__addAsset(
|
|
617
|
+
__addAsset(account_id, share_id, request, requestOptions) {
|
|
691
618
|
return __awaiter(this, void 0, void 0, function* () {
|
|
692
|
-
var _a, _b, _c, _d;
|
|
693
|
-
|
|
619
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
620
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
621
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
694
622
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
695
|
-
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/${
|
|
623
|
+
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`),
|
|
696
624
|
method: "POST",
|
|
697
625
|
headers: _headers,
|
|
698
626
|
contentType: "application/json",
|
|
699
627
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
700
628
|
requestType: "json",
|
|
701
629
|
body: request,
|
|
702
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
703
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
630
|
+
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,
|
|
631
|
+
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,
|
|
704
632
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
633
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
634
|
+
logging: this._options.logging,
|
|
705
635
|
});
|
|
706
636
|
if (_response.ok) {
|
|
707
637
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -730,30 +660,16 @@ class Shares {
|
|
|
730
660
|
});
|
|
731
661
|
}
|
|
732
662
|
}
|
|
733
|
-
|
|
734
|
-
case "non-json":
|
|
735
|
-
throw new errors.FrameioError({
|
|
736
|
-
statusCode: _response.error.statusCode,
|
|
737
|
-
body: _response.error.rawBody,
|
|
738
|
-
rawResponse: _response.rawResponse,
|
|
739
|
-
});
|
|
740
|
-
case "timeout":
|
|
741
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling POST /v4/accounts/{account_id}/shares/{share_id}/assets.");
|
|
742
|
-
case "unknown":
|
|
743
|
-
throw new errors.FrameioError({
|
|
744
|
-
message: _response.error.errorMessage,
|
|
745
|
-
rawResponse: _response.rawResponse,
|
|
746
|
-
});
|
|
747
|
-
}
|
|
663
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/shares/{share_id}/assets");
|
|
748
664
|
});
|
|
749
665
|
}
|
|
750
666
|
/**
|
|
751
667
|
* List shares on a project. <br/>Rate Limits: 100 calls per 1.00 minute(s) per account_user
|
|
752
668
|
*
|
|
753
|
-
* @param {Frameio.Uuid}
|
|
754
|
-
* @param {Frameio.Uuid}
|
|
669
|
+
* @param {Frameio.Uuid} account_id
|
|
670
|
+
* @param {Frameio.Uuid} project_id
|
|
755
671
|
* @param {Frameio.SharesIndexRequest} request
|
|
756
|
-
* @param {
|
|
672
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
757
673
|
*
|
|
758
674
|
* @throws {@link Frameio.BadRequestError}
|
|
759
675
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -770,84 +686,72 @@ class Shares {
|
|
|
770
686
|
* include_total_count: false
|
|
771
687
|
* })
|
|
772
688
|
*/
|
|
773
|
-
index(
|
|
774
|
-
return
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
781
|
-
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
|
|
785
|
-
|
|
786
|
-
|
|
787
|
-
|
|
788
|
-
|
|
789
|
-
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
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`),
|
|
793
|
-
method: "GET",
|
|
794
|
-
headers: _headers,
|
|
795
|
-
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
796
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
797
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
798
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
799
|
-
});
|
|
800
|
-
if (_response.ok) {
|
|
801
|
-
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
802
|
-
}
|
|
803
|
-
if (_response.error.reason === "status-code") {
|
|
804
|
-
switch (_response.error.statusCode) {
|
|
805
|
-
case 400:
|
|
806
|
-
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
807
|
-
case 401:
|
|
808
|
-
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
809
|
-
case 403:
|
|
810
|
-
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
811
|
-
case 404:
|
|
812
|
-
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
813
|
-
case 409:
|
|
814
|
-
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
815
|
-
case 422:
|
|
816
|
-
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
817
|
-
case 429:
|
|
818
|
-
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
819
|
-
default:
|
|
820
|
-
throw new errors.FrameioError({
|
|
821
|
-
statusCode: _response.error.statusCode,
|
|
822
|
-
body: _response.error.body,
|
|
823
|
-
rawResponse: _response.rawResponse,
|
|
824
|
-
});
|
|
689
|
+
index(account_id_1, project_id_1) {
|
|
690
|
+
return __awaiter(this, arguments, void 0, function* (account_id, project_id, _request = {}, requestOptions) {
|
|
691
|
+
var _a, _b;
|
|
692
|
+
const list = core.HttpResponsePromise.interceptFunction((_requestUrl) => __awaiter(this, void 0, void 0, function* () {
|
|
693
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
|
694
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
695
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
696
|
+
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
697
|
+
url: _requestUrl,
|
|
698
|
+
method: "GET",
|
|
699
|
+
headers: _headers,
|
|
700
|
+
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,
|
|
701
|
+
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,
|
|
702
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
703
|
+
fetchFn: (_h = this._options) === null || _h === void 0 ? void 0 : _h.fetch,
|
|
704
|
+
logging: this._options.logging,
|
|
705
|
+
});
|
|
706
|
+
if (_response.ok) {
|
|
707
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
825
708
|
}
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
829
|
-
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
|
|
833
|
-
|
|
834
|
-
|
|
835
|
-
|
|
836
|
-
|
|
837
|
-
|
|
838
|
-
|
|
839
|
-
|
|
840
|
-
|
|
841
|
-
|
|
709
|
+
if (_response.error.reason === "status-code") {
|
|
710
|
+
switch (_response.error.statusCode) {
|
|
711
|
+
case 400:
|
|
712
|
+
throw new Frameio.BadRequestError(_response.error.body, _response.rawResponse);
|
|
713
|
+
case 401:
|
|
714
|
+
throw new Frameio.UnauthorizedError(_response.error.body, _response.rawResponse);
|
|
715
|
+
case 403:
|
|
716
|
+
throw new Frameio.ForbiddenError(_response.error.body, _response.rawResponse);
|
|
717
|
+
case 404:
|
|
718
|
+
throw new Frameio.NotFoundError(_response.error.body, _response.rawResponse);
|
|
719
|
+
case 409:
|
|
720
|
+
throw new Frameio.ConflictError(_response.error.body, _response.rawResponse);
|
|
721
|
+
case 422:
|
|
722
|
+
throw new Frameio.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
723
|
+
case 429:
|
|
724
|
+
throw new Frameio.TooManyRequestsError(_response.error.body, _response.rawResponse);
|
|
725
|
+
default:
|
|
726
|
+
throw new errors.FrameioError({
|
|
727
|
+
statusCode: _response.error.statusCode,
|
|
728
|
+
body: _response.error.body,
|
|
729
|
+
rawResponse: _response.rawResponse,
|
|
730
|
+
});
|
|
731
|
+
}
|
|
732
|
+
}
|
|
733
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "GET", "/v4/accounts/{account_id}/projects/{project_id}/shares");
|
|
734
|
+
}));
|
|
735
|
+
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;
|
|
736
|
+
const dataWithRawResponse = yield list(core.url.join(_baseUrl, `v4/accounts/${core.url.encodePathParam(account_id)}/projects/${core.url.encodePathParam(project_id)}/shares`)).withRawResponse();
|
|
737
|
+
return new core.Page({
|
|
738
|
+
response: dataWithRawResponse.data,
|
|
739
|
+
rawResponse: dataWithRawResponse.rawResponse,
|
|
740
|
+
hasNextPage: (response) => (response === null || response === void 0 ? void 0 : response.links.next) != null && (response === null || response === void 0 ? void 0 : response.links.next) !== "",
|
|
741
|
+
getItems: (response) => { var _a; return (_a = response === null || response === void 0 ? void 0 : response.data) !== null && _a !== void 0 ? _a : []; },
|
|
742
|
+
loadPage: (response) => {
|
|
743
|
+
return list(core.url.join(_baseUrl, response === null || response === void 0 ? void 0 : response.links.next));
|
|
744
|
+
},
|
|
745
|
+
});
|
|
842
746
|
});
|
|
843
747
|
}
|
|
844
748
|
/**
|
|
845
749
|
* Create share. <br/>Rate Limits: 10 calls per 1.00 minute(s) per account_user
|
|
846
750
|
*
|
|
847
|
-
* @param {Frameio.Uuid}
|
|
848
|
-
* @param {Frameio.Uuid}
|
|
751
|
+
* @param {Frameio.Uuid} account_id
|
|
752
|
+
* @param {Frameio.Uuid} project_id
|
|
849
753
|
* @param {Frameio.CreateShareParams} request
|
|
850
|
-
* @param {
|
|
754
|
+
* @param {SharesClient.RequestOptions} requestOptions - Request-specific configuration.
|
|
851
755
|
*
|
|
852
756
|
* @throws {@link Frameio.BadRequestError}
|
|
853
757
|
* @throws {@link Frameio.UnauthorizedError}
|
|
@@ -870,24 +774,27 @@ class Shares {
|
|
|
870
774
|
* }
|
|
871
775
|
* })
|
|
872
776
|
*/
|
|
873
|
-
create(
|
|
874
|
-
return core.HttpResponsePromise.fromPromise(this.__create(
|
|
777
|
+
create(account_id, project_id, request, requestOptions) {
|
|
778
|
+
return core.HttpResponsePromise.fromPromise(this.__create(account_id, project_id, request, requestOptions));
|
|
875
779
|
}
|
|
876
|
-
__create(
|
|
780
|
+
__create(account_id, project_id, request, requestOptions) {
|
|
877
781
|
return __awaiter(this, void 0, void 0, function* () {
|
|
878
|
-
var _a, _b, _c, _d;
|
|
879
|
-
|
|
782
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k;
|
|
783
|
+
const _authRequest = yield this._options.authProvider.getAuthRequest();
|
|
784
|
+
const _headers = (0, headers_js_1.mergeHeaders)(_authRequest.headers, (_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
880
785
|
const _response = yield ((_b = this._options.fetcher) !== null && _b !== void 0 ? _b : core.fetcher)({
|
|
881
|
-
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/${
|
|
786
|
+
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`),
|
|
882
787
|
method: "POST",
|
|
883
788
|
headers: _headers,
|
|
884
789
|
contentType: "application/json",
|
|
885
790
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
886
791
|
requestType: "json",
|
|
887
792
|
body: request,
|
|
888
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds)
|
|
889
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
793
|
+
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,
|
|
794
|
+
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,
|
|
890
795
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
796
|
+
fetchFn: (_k = this._options) === null || _k === void 0 ? void 0 : _k.fetch,
|
|
797
|
+
logging: this._options.logging,
|
|
891
798
|
});
|
|
892
799
|
if (_response.ok) {
|
|
893
800
|
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
@@ -916,27 +823,8 @@ class Shares {
|
|
|
916
823
|
});
|
|
917
824
|
}
|
|
918
825
|
}
|
|
919
|
-
|
|
920
|
-
case "non-json":
|
|
921
|
-
throw new errors.FrameioError({
|
|
922
|
-
statusCode: _response.error.statusCode,
|
|
923
|
-
body: _response.error.rawBody,
|
|
924
|
-
rawResponse: _response.rawResponse,
|
|
925
|
-
});
|
|
926
|
-
case "timeout":
|
|
927
|
-
throw new errors.FrameioTimeoutError("Timeout exceeded when calling POST /v4/accounts/{account_id}/projects/{project_id}/shares.");
|
|
928
|
-
case "unknown":
|
|
929
|
-
throw new errors.FrameioError({
|
|
930
|
-
message: _response.error.errorMessage,
|
|
931
|
-
rawResponse: _response.rawResponse,
|
|
932
|
-
});
|
|
933
|
-
}
|
|
934
|
-
});
|
|
935
|
-
}
|
|
936
|
-
_getAuthorizationHeader() {
|
|
937
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
938
|
-
return `Bearer ${yield core.Supplier.get(this._options.token)}`;
|
|
826
|
+
return (0, handleNonStatusCodeError_js_1.handleNonStatusCodeError)(_response.error, _response.rawResponse, "POST", "/v4/accounts/{account_id}/projects/{project_id}/shares");
|
|
939
827
|
});
|
|
940
828
|
}
|
|
941
829
|
}
|
|
942
|
-
exports.
|
|
830
|
+
exports.SharesClient = SharesClient;
|