From 3bf1f4203b9068b4b746b284cfc4a77dd7ae8634 Mon Sep 17 00:00:00 2001 From: Vladislav Tupikin Date: Fri, 17 Jul 2026 01:41:29 +0300 Subject: [PATCH 01/37] chore: checkpoint monorepo + cloud v2 work in progress Snapshot of the uncommitted monorepo restructure and the new Confluence Cloud v2 client, taken before the v3 single-package restructure so the work exists somewhere other than the working tree. Not a coherent state: packages are private, the root publishes nothing, and the v2 client requires the API path baked into `host`. --- .changeset/README.md | 26 + .changeset/config.json | 11 + .github/workflows/changeset-check.yml | 65 + .github/workflows/ci.yaml | 58 +- .github/workflows/publish-dev.yml | 26 +- .github/workflows/publish.yml | 153 - .github/workflows/release.yml | 57 + .gitignore | 1 + .husky/pre-push | 3 + .npmignore | 11 - eslint.config.ts | 14 +- package.json | 120 +- packages/cloud/package.json | 37 + packages/cloud/src/api/adminKey.ts | 56 + packages/cloud/src/api/ancestors.ts | 145 + packages/cloud/src/api/appProperties.ts | 73 + packages/cloud/src/api/attachment.ts | 213 ++ packages/cloud/src/api/blogPost.ts | 186 + packages/cloud/src/api/children.ts | 288 ++ packages/cloud/src/api/classificationLevel.ts | 352 ++ packages/cloud/src/api/comment.ts | 470 +++ packages/cloud/src/api/content.ts | 26 + packages/cloud/src/api/contentProperties.ts | 991 +++++ packages/cloud/src/api/customContent.ts | 215 ++ packages/cloud/src/api/dataPolicies.ts | 46 + packages/cloud/src/api/database.ts | 64 + packages/cloud/src/api/descendants.ts | 238 ++ packages/cloud/src/api/folder.ts | 61 + packages/cloud/src/api/index.ts | 59 + packages/cloud/src/api/label.ts | 185 + packages/cloud/src/api/like.ts | 167 + packages/cloud/src/api/operation.ts | 215 ++ packages/cloud/src/api/page.ts | 215 ++ packages/cloud/src/api/redactions.ts | 42 + packages/cloud/src/api/smartLink.ts | 61 + packages/cloud/src/api/space.ts | 82 + .../src/api/spacePermissionTransition.ts | 123 + packages/cloud/src/api/spacePermissions.ts | 55 + packages/cloud/src/api/spaceProperties.ts | 106 + packages/cloud/src/api/spaceRoles.ts | 203 + packages/cloud/src/api/task.ts | 82 + packages/cloud/src/api/user.ts | 60 + packages/cloud/src/api/version.ts | 273 ++ packages/cloud/src/api/whiteboard.ts | 64 + packages/cloud/src/createCloud.v2Client.ts | 842 ++++ packages/cloud/src/index.ts | 11 + .../cloud/src/models/abstractPageLinks.ts | 13 + packages/cloud/src/models/accessByEmail.ts | 11 + packages/cloud/src/models/accountStatus.ts | 6 + packages/cloud/src/models/accountType.ts | 6 + packages/cloud/src/models/adminKey.ts | 11 + packages/cloud/src/models/ancestor.ts | 11 + packages/cloud/src/models/ancestorType.ts | 6 + packages/cloud/src/models/attachment.ts | 79 + .../cloud/src/models/attachmentComment.ts | 21 + .../cloud/src/models/attachmentComments.ts | 11 + .../src/models/attachmentContentProperties.ts | 11 + packages/cloud/src/models/attachmentLabels.ts | 11 + packages/cloud/src/models/attachmentLinks.ts | 11 + .../cloud/src/models/attachmentSortOrder.ts | 9 + .../cloud/src/models/attachmentSummary.ts | 54 + .../cloud/src/models/attachmentVersion.ts | 22 + .../cloud/src/models/attachmentVersions.ts | 11 + packages/cloud/src/models/attachments.ts | 11 + .../src/models/availableSpacePermissions.ts | 11 + .../cloud/src/models/availableSpaceRoles.ts | 11 + packages/cloud/src/models/blogPost.ts | 58 + .../cloud/src/models/blogPostBodyWrite.ts | 11 + packages/cloud/src/models/blogPostComment.ts | 21 + .../cloud/src/models/blogPostContentStatus.ts | 6 + .../src/models/blogPostFooterComments.ts | 11 + .../cloud/src/models/blogPostInlineComment.ts | 25 + .../src/models/blogPostInlineComments.ts | 11 + packages/cloud/src/models/blogPostLabels.ts | 11 + .../cloud/src/models/blogPostLikeCount.ts | 9 + .../cloud/src/models/blogPostLikeUsers.ts | 11 + .../src/models/blogPostNestedBodyWrite.ts | 12 + .../cloud/src/models/blogPostSortOrder.ts | 16 + packages/cloud/src/models/blogPostSummary.ts | 25 + packages/cloud/src/models/blogPostVersion.ts | 22 + packages/cloud/src/models/blogPostVersions.ts | 11 + packages/cloud/src/models/blogPosts.ts | 11 + packages/cloud/src/models/blogPostsInSpace.ts | 11 + .../cloud/src/models/blogpostAttachments.ts | 11 + .../src/models/blogpostContentProperties.ts | 11 + packages/cloud/src/models/body.ts | 12 + packages/cloud/src/models/bodySummary.ts | 11 + packages/cloud/src/models/bodyType.ts | 11 + packages/cloud/src/models/bulkAssignRoles.ts | 12 + packages/cloud/src/models/bulkRemoveAccess.ts | 11 + .../models/bulkTransitionCombinationEntry.ts | 36 + .../models/bulkTransitionDecodedPermission.ts | 11 + .../bulkTransitionPrincipalTypeAssignment.ts | 21 + .../models/bulkTransitionRoleAssignment.ts | 12 + .../models/bulkTransitionSpaceSelection.ts | 12 + .../src/models/bulkTransitionSpaceTarget.ts | 11 + .../cloud/src/models/bulkTransitionTask.ts | 13 + .../src/models/bulkTransitionTaskStatus.ts | 13 + packages/cloud/src/models/bulkUserLookup.ts | 11 + .../cloud/src/models/childCustomContent.ts | 17 + .../cloud/src/models/childCustomContentGet.ts | 11 + .../src/models/childCustomContentSortOrder.ts | 16 + packages/cloud/src/models/childPage.ts | 17 + .../cloud/src/models/childPageSortOrder.ts | 18 + packages/cloud/src/models/childPages.ts | 11 + packages/cloud/src/models/children.ts | 23 + packages/cloud/src/models/childrenComment.ts | 21 + .../cloud/src/models/classificationLevel.ts | 29 + .../src/models/classificationLevelColor.ts | 17 + .../src/models/classificationLevelStatus.ts | 5 + packages/cloud/src/models/commentBodyWrite.ts | 11 + .../src/models/commentContentProperties.ts | 11 + packages/cloud/src/models/commentLinks.ts | 9 + .../src/models/commentNestedBodyWrite.ts | 12 + packages/cloud/src/models/commentSortOrder.ts | 9 + packages/cloud/src/models/commentVersion.ts | 22 + .../src/models/contentIdToContentType.ts | 13 + packages/cloud/src/models/contentProperty.ts | 15 + .../cloud/src/models/contentPropertyCreate.ts | 11 + .../src/models/contentPropertySortOrder.ts | 9 + .../cloud/src/models/contentPropertyUpdate.ts | 18 + packages/cloud/src/models/contentSortOrder.ts | 20 + packages/cloud/src/models/contentStatus.ts | 6 + .../src/models/createFooterCommentModel.ts | 23 + .../src/models/createInlineCommentModel.ts | 38 + packages/cloud/src/models/customContent.ts | 74 + .../src/models/customContentAttachments.ts | 11 + .../cloud/src/models/customContentBody.ts | 13 + .../models/customContentBodyRepresentation.ts | 6 + .../customContentBodyRepresentationSingle.ts | 13 + .../src/models/customContentBodySummary.ts | 12 + .../src/models/customContentBodyWrite.ts | 11 + .../cloud/src/models/customContentByType.ts | 11 + .../models/customContentByTypeInBlogPost.ts | 11 + .../src/models/customContentByTypeInPage.ts | 11 + .../src/models/customContentByTypeInSpace.ts | 11 + .../cloud/src/models/customContentComment.ts | 21 + .../cloud/src/models/customContentComments.ts | 11 + .../models/customContentContentProperties.ts | 11 + .../cloud/src/models/customContentLabels.ts | 11 + .../cloud/src/models/customContentLinks.ts | 9 + .../models/customContentNestedBodyWrite.ts | 15 + .../src/models/customContentSortOrder.ts | 18 + .../cloud/src/models/customContentSummary.ts | 49 + .../cloud/src/models/customContentVersion.ts | 22 + .../cloud/src/models/customContentVersions.ts | 11 + .../cloud/src/models/dataPolicyMetadata.ts | 10 + packages/cloud/src/models/dataPolicySpace.ts | 23 + packages/cloud/src/models/dataPolicySpaces.ts | 11 + packages/cloud/src/models/database.ts | 33 + .../cloud/src/models/databaseAncestors.ts | 9 + .../src/models/databaseContentProperties.ts | 11 + .../cloud/src/models/databaseDescendants.ts | 11 + .../src/models/databaseDirectChildren.ts | 11 + packages/cloud/src/models/databaseLinks.ts | 9 + .../src/models/deleteSpaceRoleResponse.ts | 9 + packages/cloud/src/models/descendants.ts | 25 + packages/cloud/src/models/detailedVersion.ts | 28 + packages/cloud/src/models/folder.ts | 33 + packages/cloud/src/models/folderAncestors.ts | 9 + .../src/models/folderContentProperties.ts | 11 + .../cloud/src/models/folderDescendants.ts | 11 + .../cloud/src/models/folderDirectChildren.ts | 11 + packages/cloud/src/models/folderLinks.ts | 9 + packages/cloud/src/models/footerComment.ts | 54 + .../cloud/src/models/footerCommentChildren.ts | 11 + .../cloud/src/models/footerCommentVersions.ts | 11 + packages/cloud/src/models/footerComments.ts | 11 + packages/cloud/src/models/footerLikeCount.ts | 9 + packages/cloud/src/models/footerLikeUsers.ts | 11 + .../cloud/src/models/forgeAppProperties.ts | 19 + packages/cloud/src/models/forgeAppProperty.ts | 11 + packages/cloud/src/models/icon.ts | 13 + packages/cloud/src/models/index.ts | 455 +++ packages/cloud/src/models/inlineComment.ts | 66 + .../cloud/src/models/inlineCommentChildren.ts | 25 + .../src/models/inlineCommentChildrenGet.ts | 11 + .../src/models/inlineCommentProperties.ts | 11 + .../models/inlineCommentResolutionStatus.ts | 6 + .../cloud/src/models/inlineCommentVersions.ts | 11 + packages/cloud/src/models/inlineComments.ts | 11 + packages/cloud/src/models/inlineLikeCount.ts | 9 + packages/cloud/src/models/inlineLikeUsers.ts | 11 + packages/cloud/src/models/label.ts | 13 + packages/cloud/src/models/labelAttachments.ts | 11 + packages/cloud/src/models/labelBlogPosts.ts | 11 + packages/cloud/src/models/labelPages.ts | 11 + packages/cloud/src/models/labelSortOrder.ts | 9 + packages/cloud/src/models/labels.ts | 11 + packages/cloud/src/models/like.ts | 9 + ...listSpacePermissionCombinationsResponse.ts | 17 + packages/cloud/src/models/multiEntityLinks.ts | 14 + .../onlyArchivedAndCurrentContentStatus.ts | 6 + packages/cloud/src/models/operation.ts | 11 + .../cloud/src/models/optionalFieldLinks.ts | 9 + .../cloud/src/models/optionalFieldMeta.ts | 14 + packages/cloud/src/models/page.ts | 68 + packages/cloud/src/models/pageAncestors.ts | 11 + packages/cloud/src/models/pageAttachments.ts | 11 + packages/cloud/src/models/pageBodyWrite.ts | 11 + packages/cloud/src/models/pageComment.ts | 21 + .../cloud/src/models/pageContentProperties.ts | 11 + packages/cloud/src/models/pageDescendants.ts | 11 + .../cloud/src/models/pageDirectChildren.ts | 11 + .../cloud/src/models/pageFooterComments.ts | 11 + .../cloud/src/models/pageInlineComment.ts | 25 + .../cloud/src/models/pageInlineComments.ts | 11 + packages/cloud/src/models/pageLabels.ts | 11 + packages/cloud/src/models/pageLikeCount.ts | 9 + packages/cloud/src/models/pageLikeUsers.ts | 11 + .../cloud/src/models/pageNestedBodyWrite.ts | 12 + packages/cloud/src/models/pageSortOrder.ts | 18 + packages/cloud/src/models/pageSummary.ts | 37 + packages/cloud/src/models/pageVersion.ts | 22 + packages/cloud/src/models/pageVersions.ts | 11 + packages/cloud/src/models/pages.ts | 11 + packages/cloud/src/models/pagesInSpace.ts | 11 + .../cloud/src/models/parentContentType.ts | 6 + .../cloud/src/models/permittedOperations.ts | 10 + .../src/models/primaryBodyRepresentation.ts | 9 + .../models/primaryBodyRepresentationSingle.ts | 17 + packages/cloud/src/models/principal.ts | 12 + packages/cloud/src/models/principalType.ts | 6 + packages/cloud/src/models/redaction.ts | 10 + packages/cloud/src/models/redactionPointer.ts | 21 + .../src/models/redactionPointerResponse.ts | 17 + .../cloud/src/models/redactionResponse.ts | 14 + packages/cloud/src/models/redactionSection.ts | 10 + packages/cloud/src/models/roleType.ts | 6 + packages/cloud/src/models/smartLink.ts | 38 + .../cloud/src/models/smartLinkAncestors.ts | 9 + .../src/models/smartLinkContentProperties.ts | 11 + .../cloud/src/models/smartLinkDescendants.ts | 11 + .../src/models/smartLinkDirectChildren.ts | 11 + packages/cloud/src/models/smartLinkLinks.ts | 9 + packages/cloud/src/models/space.ts | 57 + .../cloud/src/models/spaceContentLabels.ts | 11 + packages/cloud/src/models/spaceDescription.ts | 11 + .../spaceDescriptionBodyRepresentation.ts | 6 + packages/cloud/src/models/spaceIcon.ts | 20 + packages/cloud/src/models/spaceLabels.ts | 11 + packages/cloud/src/models/spaceLinks.ts | 9 + packages/cloud/src/models/spacePermission.ts | 15 + .../src/models/spacePermissionAssignment.ts | 36 + .../src/models/spacePermissionsAssignments.ts | 11 + packages/cloud/src/models/spaceProperties.ts | 11 + packages/cloud/src/models/spaceProperty.ts | 27 + .../cloud/src/models/spacePropertyCreate.ts | 11 + .../cloud/src/models/spacePropertyUpdate.ts | 18 + packages/cloud/src/models/spaceRole.ts | 17 + .../cloud/src/models/spaceRoleAssignment.ts | 11 + .../src/models/spaceRoleAssignmentsGet.ts | 11 + .../src/models/spaceRoleAssignmentsSet.ts | 11 + packages/cloud/src/models/spaceRoleMode.ts | 9 + packages/cloud/src/models/spaceSortOrder.ts | 9 + packages/cloud/src/models/spaceStatus.ts | 6 + packages/cloud/src/models/spaceSummary.ts | 33 + packages/cloud/src/models/spaceType.ts | 14 + packages/cloud/src/models/spaces.ts | 11 + packages/cloud/src/models/task.ts | 35 + packages/cloud/src/models/taskBody.ts | 11 + packages/cloud/src/models/tasks.ts | 11 + .../src/models/updateFooterCommentModel.ts | 16 + .../src/models/updateInlineCommentModel.ts | 22 + .../src/models/updateSpaceRoleResponse.ts | 17 + packages/cloud/src/models/user.ts | 27 + packages/cloud/src/models/version.ts | 20 + packages/cloud/src/models/versionSortOrder.ts | 9 + packages/cloud/src/models/versionedEntity.ts | 13 + packages/cloud/src/models/whiteboard.ts | 33 + .../cloud/src/models/whiteboardAncestors.ts | 9 + .../src/models/whiteboardContentProperties.ts | 11 + .../cloud/src/models/whiteboardDescendants.ts | 11 + .../src/models/whiteboardDirectChildren.ts | 11 + packages/cloud/src/models/whiteboardLinks.ts | 11 + .../bulkAssignSpacePermissionRoles.ts | 6 + .../bulkRemoveSpacePermissionAccess.ts | 6 + .../src/parameters/checkAccessByEmail.ts | 7 + .../convertContentIdsToContentTypes.ts | 7 + .../parameters/createAttachmentProperty.ts | 11 + .../cloud/src/parameters/createBlogPost.ts | 12 + .../src/parameters/createBlogpostProperty.ts | 11 + .../src/parameters/createBulkUserLookup.ts | 7 + .../src/parameters/createCommentProperty.ts | 11 + .../src/parameters/createCustomContent.ts | 7 + .../parameters/createCustomContentProperty.ts | 11 + .../cloud/src/parameters/createDatabase.ts | 9 + .../src/parameters/createDatabaseProperty.ts | 11 + packages/cloud/src/parameters/createFolder.ts | 7 + .../src/parameters/createFolderProperty.ts | 11 + .../src/parameters/createFooterComment.ts | 6 + .../src/parameters/createInlineComment.ts | 6 + packages/cloud/src/parameters/createPage.ts | 16 + .../src/parameters/createPageProperty.ts | 11 + .../cloud/src/parameters/createSmartLink.ts | 7 + .../src/parameters/createSmartLinkProperty.ts | 11 + packages/cloud/src/parameters/createSpace.ts | 7 + .../src/parameters/createSpaceProperty.ts | 11 + .../cloud/src/parameters/createSpaceRole.ts | 17 + .../cloud/src/parameters/createWhiteboard.ts | 12 + .../parameters/createWhiteboardProperty.ts | 11 + .../cloud/src/parameters/deleteAttachment.ts | 10 + .../deleteAttachmentPropertyById.ts | 10 + .../cloud/src/parameters/deleteBlogPost.ts | 12 + .../parameters/deleteBlogpostPropertyById.ts | 10 + .../parameters/deleteCommentPropertyById.ts | 10 + .../src/parameters/deleteCustomContent.ts | 10 + .../deleteCustomContentPropertyById.ts | 10 + .../cloud/src/parameters/deleteDatabase.ts | 8 + .../parameters/deleteDatabasePropertyById.ts | 10 + packages/cloud/src/parameters/deleteFolder.ts | 8 + .../parameters/deleteFolderPropertyById.ts | 10 + .../src/parameters/deleteFooterComment.ts | 8 + .../src/parameters/deleteForgeAppProperty.ts | 8 + .../src/parameters/deleteInlineComment.ts | 8 + packages/cloud/src/parameters/deletePage.ts | 12 + .../src/parameters/deletePagePropertyById.ts | 10 + .../cloud/src/parameters/deleteSmartLink.ts | 8 + .../parameters/deleteSmartLinkPropertyById.ts | 10 + .../deleteSpaceDefaultClassificationLevel.ts | 8 + .../src/parameters/deleteSpacePropertyById.ts | 10 + .../cloud/src/parameters/deleteSpaceRole.ts | 8 + .../cloud/src/parameters/deleteWhiteboard.ts | 8 + .../deleteWhiteboardPropertyById.ts | 10 + .../cloud/src/parameters/enableAdminKey.ts | 7 + .../cloud/src/parameters/getAttachmentById.ts | 47 + .../src/parameters/getAttachmentComments.ts | 32 + .../getAttachmentContentProperties.ts | 23 + .../getAttachmentContentPropertiesById.ts | 10 + .../src/parameters/getAttachmentLabels.ts | 22 + .../src/parameters/getAttachmentOperations.ts | 8 + .../parameters/getAttachmentThumbnailById.ts | 20 + .../parameters/getAttachmentVersionDetails.ts | 10 + .../src/parameters/getAttachmentVersions.ts | 24 + .../cloud/src/parameters/getAttachments.ts | 25 + .../getAvailableSpacePermissions.ts | 16 + .../src/parameters/getAvailableSpaceRoles.ts | 32 + .../cloud/src/parameters/getBlogPostById.ts | 67 + .../getBlogPostClassificationLevel.ts | 10 + .../parameters/getBlogPostFooterComments.ts | 29 + .../parameters/getBlogPostInlineComments.ts | 31 + .../cloud/src/parameters/getBlogPostLabels.ts | 22 + .../src/parameters/getBlogPostLikeCount.ts | 8 + .../src/parameters/getBlogPostLikeUsers.ts | 18 + .../src/parameters/getBlogPostOperations.ts | 8 + .../parameters/getBlogPostVersionDetails.ts | 10 + .../src/parameters/getBlogPostVersions.ts | 30 + packages/cloud/src/parameters/getBlogPosts.ts | 33 + .../src/parameters/getBlogPostsInSpace.ts | 31 + .../src/parameters/getBlogpostAttachments.ts | 27 + .../getBlogpostContentProperties.ts | 23 + .../getBlogpostContentPropertiesById.ts | 10 + .../src/parameters/getChildCustomContent.ts | 23 + .../cloud/src/parameters/getChildPages.ts | 20 + .../parameters/getCommentContentProperties.ts | 23 + .../getCommentContentPropertiesById.ts | 10 + .../parameters/getCustomContentAttachments.ts | 27 + .../src/parameters/getCustomContentById.ts | 56 + .../src/parameters/getCustomContentByType.ts | 40 + .../getCustomContentByTypeInBlogPost.ts | 35 + .../getCustomContentByTypeInPage.ts | 35 + .../getCustomContentByTypeInSpace.ts | 32 + .../parameters/getCustomContentComments.ts | 27 + .../getCustomContentContentProperties.ts | 23 + .../getCustomContentContentPropertiesById.ts | 10 + .../src/parameters/getCustomContentLabels.ts | 22 + .../parameters/getCustomContentOperations.ts | 8 + .../getCustomContentVersionDetails.ts | 10 + .../parameters/getCustomContentVersions.ts | 33 + .../src/parameters/getDataPolicySpaces.ts | 23 + .../src/parameters/getDatabaseAncestors.ts | 13 + .../cloud/src/parameters/getDatabaseById.ts | 24 + .../getDatabaseClassificationLevel.ts | 8 + .../getDatabaseContentProperties.ts | 23 + .../getDatabaseContentPropertiesById.ts | 10 + .../src/parameters/getDatabaseDescendants.ts | 23 + .../parameters/getDatabaseDirectChildren.ts | 20 + .../src/parameters/getDatabaseOperations.ts | 8 + .../src/parameters/getFolderAncestors.ts | 13 + .../cloud/src/parameters/getFolderById.ts | 24 + .../parameters/getFolderContentProperties.ts | 23 + .../getFolderContentPropertiesById.ts | 10 + .../src/parameters/getFolderDescendants.ts | 23 + .../src/parameters/getFolderDirectChildren.ts | 20 + .../src/parameters/getFolderOperations.ts | 8 + .../src/parameters/getFooterCommentById.ts | 48 + .../parameters/getFooterCommentChildren.ts | 27 + .../parameters/getFooterCommentOperations.ts | 8 + .../getFooterCommentVersionDetails.ts | 10 + .../parameters/getFooterCommentVersions.ts | 27 + .../cloud/src/parameters/getFooterComments.ts | 25 + .../src/parameters/getFooterLikeCount.ts | 8 + .../src/parameters/getFooterLikeUsers.ts | 18 + .../src/parameters/getForgeAppProperties.ts | 16 + .../src/parameters/getForgeAppProperty.ts | 8 + .../src/parameters/getInlineCommentById.ts | 48 + .../parameters/getInlineCommentChildren.ts | 27 + .../parameters/getInlineCommentOperations.ts | 8 + .../getInlineCommentVersionDetails.ts | 10 + .../parameters/getInlineCommentVersions.ts | 27 + .../cloud/src/parameters/getInlineComments.ts | 25 + .../src/parameters/getInlineLikeCount.ts | 8 + .../src/parameters/getInlineLikeUsers.ts | 18 + .../src/parameters/getLabelAttachments.ts | 21 + .../cloud/src/parameters/getLabelBlogPosts.ts | 29 + .../cloud/src/parameters/getLabelPages.ts | 29 + packages/cloud/src/parameters/getLabels.ts | 22 + .../cloud/src/parameters/getPageAncestors.ts | 13 + .../src/parameters/getPageAttachments.ts | 27 + packages/cloud/src/parameters/getPageById.ts | 66 + .../parameters/getPageClassificationLevel.ts | 10 + .../parameters/getPageContentProperties.ts | 23 + .../getPageContentPropertiesById.ts | 10 + .../src/parameters/getPageDescendants.ts | 23 + .../src/parameters/getPageDirectChildren.ts | 20 + .../src/parameters/getPageFooterComments.ts | 29 + .../src/parameters/getPageInlineComments.ts | 31 + .../cloud/src/parameters/getPageLabels.ts | 22 + .../cloud/src/parameters/getPageLikeCount.ts | 8 + .../cloud/src/parameters/getPageLikeUsers.ts | 18 + .../cloud/src/parameters/getPageOperations.ts | 8 + .../src/parameters/getPageVersionDetails.ts | 10 + .../cloud/src/parameters/getPageVersions.ts | 30 + packages/cloud/src/parameters/getPages.ts | 35 + .../cloud/src/parameters/getPagesInSpace.ts | 33 + .../src/parameters/getSmartLinkAncestors.ts | 13 + .../cloud/src/parameters/getSmartLinkById.ts | 24 + .../getSmartLinkContentProperties.ts | 23 + .../getSmartLinkContentPropertiesById.ts | 10 + .../src/parameters/getSmartLinkDescendants.ts | 23 + .../parameters/getSmartLinkDirectChildren.ts | 20 + .../src/parameters/getSmartLinkOperations.ts | 8 + packages/cloud/src/parameters/getSpaceById.ts | 47 + .../src/parameters/getSpaceContentLabels.ts | 22 + .../getSpaceDefaultClassificationLevel.ts | 8 + .../cloud/src/parameters/getSpaceLabels.ts | 22 + .../src/parameters/getSpaceOperations.ts | 8 + .../getSpacePermissionTransitionTaskStatus.ts | 8 + .../getSpacePermissionsAssignments.ts | 18 + .../src/parameters/getSpaceProperties.ts | 23 + .../src/parameters/getSpacePropertyById.ts | 10 + .../src/parameters/getSpaceRoleAssignments.ts | 34 + .../cloud/src/parameters/getSpaceRolesById.ts | 8 + packages/cloud/src/parameters/getSpaces.ts | 43 + packages/cloud/src/parameters/getTaskById.ts | 14 + packages/cloud/src/parameters/getTasks.ts | 70 + .../src/parameters/getWhiteboardAncestors.ts | 13 + .../cloud/src/parameters/getWhiteboardById.ts | 24 + .../getWhiteboardClassificationLevel.ts | 8 + .../getWhiteboardContentProperties.ts | 23 + .../getWhiteboardContentPropertiesById.ts | 10 + .../parameters/getWhiteboardDescendants.ts | 23 + .../parameters/getWhiteboardDirectChildren.ts | 20 + .../src/parameters/getWhiteboardOperations.ts | 8 + packages/cloud/src/parameters/index.ts | 423 ++ .../cloud/src/parameters/inviteByEmail.ts | 7 + .../listSpacePermissionCombinations.ts | 10 + .../postBlogPostClassificationLevel.ts | 9 + .../postDatabaseClassificationLevel.ts | 9 + .../parameters/postPageClassificationLevel.ts | 9 + .../cloud/src/parameters/postRedactBlog.ts | 9 + .../cloud/src/parameters/postRedactPage.ts | 9 + .../postWhiteboardClassificationLevel.ts | 9 + .../putBlogPostClassificationLevel.ts | 9 + .../putDatabaseClassificationLevel.ts | 9 + .../src/parameters/putForgeAppProperty.ts | 9 + .../parameters/putPageClassificationLevel.ts | 9 + .../putSpaceDefaultClassificationLevel.ts | 9 + .../putWhiteboardClassificationLevel.ts | 9 + .../src/parameters/setSpaceRoleAssignments.ts | 9 + .../updateAttachmentPropertyById.ts | 13 + .../cloud/src/parameters/updateBlogPost.ts | 12 + .../parameters/updateBlogpostPropertyById.ts | 13 + .../parameters/updateCommentPropertyById.ts | 13 + .../src/parameters/updateCustomContent.ts | 12 + .../updateCustomContentPropertyById.ts | 13 + .../parameters/updateDatabasePropertyById.ts | 13 + .../parameters/updateFolderPropertyById.ts | 13 + .../src/parameters/updateFooterComment.ts | 9 + .../src/parameters/updateInlineComment.ts | 11 + packages/cloud/src/parameters/updatePage.ts | 9 + .../src/parameters/updatePagePropertyById.ts | 13 + .../cloud/src/parameters/updatePageTitle.ts | 9 + .../parameters/updateSmartLinkPropertyById.ts | 13 + .../src/parameters/updateSpacePropertyById.ts | 13 + .../cloud/src/parameters/updateSpaceRole.ts | 29 + packages/cloud/src/parameters/updateTask.ts | 15 + .../updateWhiteboardPropertyById.ts | 13 + .../cloud/tests/integration/adminKey.test.ts | 177 + .../cloud/tests/integration/ancestors.test.ts | 127 + .../tests/integration/appProperties.test.ts | 118 + .../tests/integration/attachment.test.ts | 434 +++ .../cloud/tests/integration/blogPost.test.ts | 327 ++ .../cloud/tests/integration/children.test.ts | 176 + .../integration/classificationLevel.test.ts | 280 ++ .../cloud/tests/integration/comment.test.ts | 461 +++ .../cloud/tests/integration/content.test.ts | 148 + .../integration/contentProperties.test.ts | 307 ++ .../tests/integration/customContent.test.ts | 371 ++ .../tests/integration/dataPolicies.test.ts | 111 + .../cloud/tests/integration/database.test.ts | 226 ++ .../tests/integration/descendants.test.ts | 137 + .../cloud/tests/integration/folder.test.ts | 225 ++ .../cloud/tests/integration/helpers/naming.ts | 32 + .../cloud/tests/integration/helpers/poll.ts | 36 + .../cloud/tests/integration/label.test.ts | 271 ++ packages/cloud/tests/integration/like.test.ts | 289 ++ .../cloud/tests/integration/operation.test.ts | 278 ++ packages/cloud/tests/integration/page.test.ts | 412 ++ .../tests/integration/redactions.test.ts | 115 + .../cloud/tests/integration/setup/client.ts | 88 + packages/cloud/tests/integration/setup/env.ts | 38 + .../cloud/tests/integration/setup/fixtures.ts | 99 + .../tests/integration/setup/globalSetup.ts | 82 + .../tests/integration/setup/resources.ts | 39 + .../cloud/tests/integration/smartLink.test.ts | 236 ++ .../cloud/tests/integration/space.test.ts | 217 ++ .../spacePermissionTransition.test.ts | 228 ++ .../integration/spacePermissions.test.ts | 185 + .../tests/integration/spaceProperties.test.ts | 263 ++ .../tests/integration/spaceRoles.test.ts | 290 ++ packages/cloud/tests/integration/task.test.ts | 257 ++ packages/cloud/tests/integration/user.test.ts | 161 + .../cloud/tests/integration/version.test.ts | 415 ++ .../tests/integration/whiteboard.test.ts | 227 ++ packages/cloud/tests/tsconfig.json | 13 + packages/cloud/tsconfig.json | 12 + packages/cloud/vite.config.ts | 38 + packages/cloud/vitest.config.ts | 34 + packages/core/package.json | 31 + packages/core/src/apiError.ts | 19 + packages/core/src/apiObject.ts | 5 + packages/core/src/bodyToFetchBody.ts | 49 + packages/core/src/createClient.ts | 207 + packages/core/src/formData/attachmentInput.ts | 15 + packages/core/src/formData/bufferSchema.ts | 11 + packages/core/src/formData/index.ts | 5 + .../core/src/formData/multipartRequest.ts | 201 + packages/core/src/index.ts | 43 + packages/core/src/interfaces/client.ts | 5 + packages/core/src/interfaces/index.ts | 1 + .../core/src/oauth/buildAtlassianAuthUrl.ts | 22 + packages/core/src/oauth/index.ts | 15 + .../src/oauth/obtainAtlassianOAuthTokens.ts | 142 + .../src/oauth/parseAtlassianCallbackUrl.ts | 16 + .../src/oauth/refreshAtlassianOAuthTokens.ts | 44 + packages/core/src/schemas/auth.ts | 33 + packages/core/src/schemas/clientConfig.ts | 30 + packages/core/src/schemas/httpMethod.ts | 5 + packages/core/src/schemas/index.ts | 15 + .../core/src/schemas/sendRequestOptions.ts | 14 + packages/core/src/sendRequest.ts | 71 + packages/core/src/serializeSearchParams.ts | 61 + packages/core/src/withRetry.ts | 56 + packages/core/tsconfig.json | 9 + packages/core/vite.config.ts | 33 + packages/legacy/package.json | 43 + {src => packages/legacy/src}/api/analytics.ts | 10 +- {src => packages/legacy/src}/api/audit.ts | 10 +- {src => packages/legacy/src}/api/content.ts | 10 +- .../legacy/src}/api/contentAttachments.ts | 10 +- .../legacy/src}/api/contentBody.ts | 10 +- .../src}/api/contentChildrenAndDescendants.ts | 10 +- .../legacy/src}/api/contentComments.ts | 10 +- .../legacy/src}/api/contentLabels.ts | 10 +- .../legacy/src}/api/contentMacroBody.ts | 10 +- .../legacy/src}/api/contentPermissions.ts | 10 +- .../legacy/src}/api/contentProperties.ts | 10 +- .../legacy/src}/api/contentRestrictions.ts | 124 +- .../legacy/src}/api/contentStates.ts | 10 +- .../legacy/src}/api/contentVersions.ts | 10 +- .../legacy/src}/api/contentWatches.ts | 10 +- .../legacy/src}/api/dynamicModules.ts | 8 +- packages/legacy/src/api/experimental.ts | 145 + {src => packages/legacy/src}/api/group.ts | 194 +- packages/legacy/src/api/index.ts | 63 + .../legacy/src}/api/inlineTasks.ts | 10 +- {src => packages/legacy/src}/api/labelInfo.ts | 10 +- .../legacy/src}/api/longRunningTask.ts | 10 +- .../legacy/src}/api/models/accountId.ts | 0 .../src}/api/models/accountIdEmailRecord.ts | 0 .../api/models/accountIdEmailRecordArray.ts | 2 +- .../src}/api/models/addContentRestriction.ts | 0 .../addContentRestrictionUpdateArray.ts | 2 +- .../legacy/src}/api/models/affectedObject.ts | 0 .../legacy/src}/api/models/appDescriptor.ts | 2 +- .../src}/api/models/asyncContentBody.ts | 6 +- .../legacy/src}/api/models/asyncId.ts | 0 .../legacy/src}/api/models/attachment.ts | 4 +- .../src}/api/models/attachmentContainer.ts | 2 +- .../src}/api/models/attachmentMetadata.ts | 2 +- .../legacy/src}/api/models/auditRecord.ts | 4 +- .../src}/api/models/auditRecordArray.ts | 4 +- .../src}/api/models/auditRecordCreate.ts | 4 +- .../src}/api/models/availableContentStates.ts | 2 +- .../src}/api/models/blueprintTemplate.ts | 6 +- .../src}/api/models/blueprintTemplateArray.ts | 4 +- .../legacy/src}/api/models/breadcrumb.ts | 0 .../legacy/src}/api/models/bulkUserLookup.ts | 8 +- .../src}/api/models/bulkUserLookupArray.ts | 4 +- .../src}/api/models/buttonLookAndFeel.ts | 0 .../legacy/src}/api/models/changedValue.ts | 0 .../legacy/src}/api/models/connectModules.ts | 2 +- .../legacy/src}/api/models/container.ts | 0 .../src}/api/models/containerLookAndFeel.ts | 0 .../src}/api/models/containerSummary.ts | 0 .../legacy/src}/api/models/content.ts | 20 +- .../legacy/src}/api/models/contentArray.ts | 4 +- .../src}/api/models/contentBlueprintDraft.ts | 0 .../legacy/src}/api/models/contentBody.ts | 4 +- .../src}/api/models/contentBodyCreate.ts | 0 .../api/models/contentBodyCreateStorage.ts | 0 .../src}/api/models/contentChildType.ts | 2 +- .../legacy/src}/api/models/contentChildren.ts | 4 +- .../legacy/src}/api/models/contentCreate.ts | 2 +- .../legacy/src}/api/models/contentHistory.ts | 8 +- .../src}/api/models/contentLookAndFeel.ts | 4 +- .../api/models/contentPermissionRequest.ts | 2 +- .../legacy/src}/api/models/contentProperty.ts | 4 +- .../src}/api/models/contentPropertyArray.ts | 4 +- .../src}/api/models/contentPropertyCreate.ts | 2 +- .../api/models/contentPropertyCreateNoKey.ts | 2 +- .../src}/api/models/contentPropertyUpdate.ts | 0 .../src}/api/models/contentRestriction.ts | 8 +- .../api/models/contentRestrictionArray.ts | 4 +- .../api/models/contentRestrictionUpdate.ts | 0 .../models/contentRestrictionUpdateArray.ts | 2 +- .../legacy/src}/api/models/contentState.ts | 0 .../src}/api/models/contentStateResponse.ts | 2 +- .../src}/api/models/contentStateRestInput.ts | 0 .../src}/api/models/contentStateSettings.ts | 2 +- .../legacy/src}/api/models/contentTemplate.ts | 6 +- .../src}/api/models/contentTemplateArray.ts | 4 +- .../api/models/contentTemplateBodyCreate.ts | 2 +- .../src}/api/models/contentTemplateCreate.ts | 4 +- .../src}/api/models/contentTemplateUpdate.ts | 4 +- .../legacy/src}/api/models/contentUpdate.ts | 4 +- .../api/models/copyPageHierarchyRequest.ts | 2 +- .../models/copyPageHierarchyTitleOptions.ts | 0 .../legacy/src}/api/models/copyPageRequest.ts | 4 +- .../api/models/copyPageRequestDestination.ts | 0 .../src/api/models/createdAttachment.ts | 8 + .../legacy/src}/api/models/embeddable.ts | 0 .../legacy/src}/api/models/embeddedContent.ts | 2 +- .../legacy/src}/api/models/genericLinks.ts | 0 .../api/models/getRestrictionsByOperation.ts | 2 +- .../legacy/src}/api/models/getViewers.ts | 0 .../legacy/src}/api/models/getViews.ts | 0 .../legacy/src}/api/models/group.ts | 2 +- .../legacy/src}/api/models/groupArray.ts | 2 +- .../src}/api/models/groupArrayWithLinks.ts | 2 +- .../legacy/src}/api/models/groupCreate.ts | 0 .../legacy/src}/api/models/groupName.ts | 0 .../src}/api/models/headerLookAndFeel.ts | 6 +- .../api/models/horizontalHeaderLookAndFeel.ts | 8 +- .../legacy/src}/api/models/icon.ts | 0 packages/legacy/src/api/models/index.ts | 321 ++ .../legacy/src}/api/models/label.ts | 0 .../legacy/src}/api/models/labelArray.ts | 4 +- .../legacy/src}/api/models/labelCreate.ts | 0 .../legacy/src/api/models/labelCreateArray.ts | 3 + .../legacy/src}/api/models/labelDetails.ts | 4 +- .../legacy/src}/api/models/labeledContent.ts | 2 +- .../api/models/labeledContentPageResponse.ts | 2 +- .../src}/api/models/labeledContentType.ts | 0 .../legacy/src}/api/models/lifecycle.ts | 0 .../legacy/src}/api/models/longTask.ts | 0 .../legacy/src}/api/models/longTaskStatus.ts | 2 +- .../src}/api/models/longTaskStatusArray.ts | 4 +- .../api/models/longTaskStatusWithLinks.ts | 2 +- .../legacy/src}/api/models/lookAndFeel.ts | 8 +- .../src}/api/models/lookAndFeelSelection.ts | 0 .../src}/api/models/lookAndFeelSettings.ts | 2 +- .../legacy/src}/api/models/macroInstance.ts | 2 +- .../src}/api/models/menusLookAndFeel.ts | 0 .../legacy/src}/api/models/message.ts | 0 .../legacy/src}/api/models/migratedUser.ts | 0 .../src}/api/models/migratedUserArray.ts | 4 +- .../legacy/src}/api/models/movePage.ts | 0 .../src}/api/models/navigationLookAndFeel.ts | 0 .../src}/api/models/operationCheckResult.ts | 0 .../api/models/permissionCheckResponse.ts | 2 +- .../src}/api/models/permissionSubject.ts | 0 .../models/permissionSubjectWithGroupId.ts | 0 .../legacy/src}/api/models/propertyValue.ts | 0 .../legacy/src}/api/models/relation.ts | 4 +- .../legacy/src}/api/models/relationArray.ts | 4 +- .../legacy/src}/api/models/relationData.ts | 2 +- .../legacy/src}/api/models/retentionPeriod.ts | 0 .../src}/api/models/screenLookAndFeel.ts | 0 .../src}/api/models/searchFieldLookAndFeel.ts | 0 .../models/searchPageResponseSearchResult.ts | 4 +- .../legacy/src}/api/models/searchResult.ts | 6 +- .../legacy/src}/api/models/space.ts | 20 +- .../legacy/src}/api/models/spaceArray.ts | 4 +- .../legacy/src}/api/models/spaceCreate.ts | 4 +- .../src}/api/models/spaceDescription.ts | 0 .../src}/api/models/spaceDescriptionCreate.ts | 0 .../legacy/src}/api/models/spacePermission.ts | 6 +- .../src}/api/models/spacePermissionCreate.ts | 6 +- .../models/spacePermissionCustomContent.ts | 2 +- .../src}/api/models/spacePermissionRequest.ts | 4 +- .../src}/api/models/spacePermissionV2.ts | 4 +- .../src}/api/models/spacePrivateCreate.ts | 4 +- .../legacy/src}/api/models/spaceProperty.ts | 2 +- .../src}/api/models/spacePropertyArray.ts | 4 +- .../src}/api/models/spacePropertyCreate.ts | 2 +- .../api/models/spacePropertyCreateNoKey.ts | 2 +- .../src}/api/models/spacePropertyUpdate.ts | 0 .../legacy/src}/api/models/spaceSettings.ts | 2 +- .../src}/api/models/spaceSettingsUpdate.ts | 0 .../legacy/src}/api/models/spaceUpdate.ts | 2 +- .../legacy/src}/api/models/spaceWatch.ts | 2 +- .../legacy/src}/api/models/spaceWatchArray.ts | 4 +- .../legacy/src}/api/models/spaceWatchUser.ts | 4 +- .../src}/api/models/superBatchWebResources.ts | 0 .../src}/api/models/systemInfoEntity.ts | 0 .../legacy/src}/api/models/task.ts | 0 .../src}/api/models/taskPageResponse.ts | 2 +- .../src}/api/models/taskStatusUpdate.ts | 0 .../legacy/src}/api/models/theme.ts | 2 +- .../legacy/src}/api/models/themeArray.ts | 4 +- .../legacy/src}/api/models/themeNoLinks.ts | 2 +- .../legacy/src}/api/models/themeUpdate.ts | 0 .../api/models/topNavigationLookAndFeel.ts | 0 .../legacy/src}/api/models/user.ts | 8 +- .../legacy/src}/api/models/userAnonymous.ts | 6 +- .../legacy/src}/api/models/userArray.ts | 2 +- .../legacy/src}/api/models/userProperty.ts | 2 +- .../src}/api/models/userPropertyCreate.ts | 0 .../src}/api/models/userPropertyKeyArray.ts | 2 +- .../src}/api/models/userPropertyUpdate.ts | 0 .../legacy/src}/api/models/userWatch.ts | 0 .../legacy/src}/api/models/usersUserKeys.ts | 4 +- .../legacy/src}/api/models/version.ts | 8 +- .../legacy/src}/api/models/versionArray.ts | 4 +- .../legacy/src}/api/models/versionRestore.ts | 0 .../legacy/src}/api/models/watch.ts | 2 +- .../legacy/src}/api/models/watchArray.ts | 4 +- .../legacy/src}/api/models/watchUser.ts | 4 +- .../api/models/webResourceDependencies.ts | 2 +- .../src}/api/parameters/addContentWatcher.ts | 0 .../parameters/addCustomContentPermissions.ts | 2 +- .../addGroupToContentRestrictionByGroupId.ts | 0 .../src}/api/parameters/addLabelWatcher.ts | 0 .../src}/api/parameters/addLabelsToContent.ts | 2 +- .../src}/api/parameters/addLabelsToSpace.ts | 0 .../api/parameters/addPermissionToSpace.ts | 2 +- .../src}/api/parameters/addRestrictions.ts | 2 +- .../src}/api/parameters/addSpaceWatcher.ts | 0 .../parameters/addUserToContentRestriction.ts | 0 .../src}/api/parameters/addUserToGroup.ts | 2 +- .../api/parameters/addUserToGroupByGroupId.ts | 2 +- .../src}/api/parameters/archivePages.ts | 0 .../asyncConvertContentBodyRequest.ts | 2 +- .../asyncConvertContentBodyResponse.ts | 0 .../bulkAsyncConvertContentBodyRequest.ts | 2 +- .../bulkAsyncConvertContentBodyResponse.ts | 0 .../api/parameters/checkContentPermission.ts | 2 +- .../src}/api/parameters/convertContentBody.ts | 4 +- .../legacy/src}/api/parameters/copyPage.ts | 2 +- .../src}/api/parameters/copyPageHierarchy.ts | 2 +- .../src}/api/parameters/createAttachments.ts | 2 +- .../src}/api/parameters/createAuditRecord.ts | 2 +- .../src}/api/parameters/createContent.ts | 4 +- .../api/parameters/createContentProperty.ts | 2 +- .../parameters/createContentPropertyForKey.ts | 2 +- .../api/parameters/createContentTemplate.ts | 2 +- .../legacy/src/api/parameters/createGroup.ts | 3 + .../parameters/createOrUpdateAttachments.ts | 2 +- .../src}/api/parameters/createPrivateSpace.ts | 2 +- .../src}/api/parameters/createRelationship.ts | 0 .../legacy/src/api/parameters/createSpace.ts | 3 + .../api/parameters/createSpaceProperty.ts | 2 +- .../parameters/createSpacePropertyForKey.ts | 2 +- .../src}/api/parameters/createUserProperty.ts | 2 +- .../src}/api/parameters/deleteContent.ts | 0 .../api/parameters/deleteContentProperty.ts | 0 .../api/parameters/deleteContentVersion.ts | 0 .../src}/api/parameters/deleteGroupById.ts | 0 .../api/parameters/deleteLabelFromSpace.ts | 0 .../src}/api/parameters/deletePageTree.ts | 0 .../src}/api/parameters/deleteRelationship.ts | 0 .../src}/api/parameters/deleteRestrictions.ts | 0 .../legacy/src}/api/parameters/deleteSpace.ts | 0 .../api/parameters/deleteSpaceProperty.ts | 0 .../src}/api/parameters/deleteUserProperty.ts | 0 .../src}/api/parameters/downloadAttachment.ts | 0 .../src}/api/parameters/exportAuditRecords.ts | 0 .../api/parameters/findSourcesForTarget.ts | 0 .../api/parameters/findTargetFromSource.ts | 0 .../src}/api/parameters/getAllLabelContent.ts | 0 .../getAndAsyncConvertMacroBodyByMacroId.ts | 0 .../getAndConvertMacroBodyByMacroId.ts | 0 .../src}/api/parameters/getAnonymousUser.ts | 0 .../src}/api/parameters/getAttachments.ts | 2 +- .../src}/api/parameters/getAuditRecords.ts | 0 .../getAuditRecordsForTimePeriod.ts | 0 .../parameters/getAvailableContentStates.ts | 0 .../api/parameters/getBlueprintTemplates.ts | 0 .../src}/api/parameters/getBulkUserLookup.ts | 0 .../legacy/src}/api/parameters/getContent.ts | 2 +- .../src}/api/parameters/getContentById.ts | 2 +- .../parameters/getContentByTypeForSpace.ts | 0 .../src}/api/parameters/getContentChildren.ts | 2 +- .../parameters/getContentChildrenByType.ts | 0 .../src}/api/parameters/getContentComments.ts | 0 .../api/parameters/getContentDescendants.ts | 0 .../src}/api/parameters/getContentForSpace.ts | 0 .../api/parameters/getContentProperties.ts | 0 .../src}/api/parameters/getContentProperty.ts | 0 .../getContentRestrictionStatusForUser.ts | 0 .../src}/api/parameters/getContentState.ts | 0 .../api/parameters/getContentStateSettings.ts | 0 .../src}/api/parameters/getContentTemplate.ts | 0 .../api/parameters/getContentTemplates.ts | 0 .../src}/api/parameters/getContentVersion.ts | 0 .../src}/api/parameters/getContentVersions.ts | 0 .../api/parameters/getContentWatchStatus.ts | 0 .../api/parameters/getContentsWithState.ts | 0 .../src}/api/parameters/getCurrentUser.ts | 0 .../api/parameters/getDescendantsOfType.ts | 2 +- .../src}/api/parameters/getGroupByGroupId.ts | 0 .../parameters/getGroupMembersByGroupId.ts | 0 .../parameters/getGroupMembershipsForUser.ts | 11 + .../legacy/src}/api/parameters/getGroups.ts | 0 .../api/parameters/getHistoryForContent.ts | 0 ...dividualGroupRestrictionStatusByGroupId.ts | 0 .../api/parameters/getLabelsForContent.ts | 0 .../src}/api/parameters/getLabelsForSpace.ts | 0 .../api/parameters/getLookAndFeelSettings.ts | 0 .../api/parameters/getMacroBodyByMacroId.ts | 0 .../parameters/getPrivacyUnsafeUserEmail.ts | 0 .../getPrivacyUnsafeUserEmailBulk.ts | 0 .../src}/api/parameters/getRelationship.ts | 0 .../src}/api/parameters/getRestrictions.ts | 0 .../parameters/getRestrictionsByOperation.ts | 0 .../parameters/getRestrictionsForOperation.ts | 0 .../legacy/src}/api/parameters/getSpace.ts | 0 .../api/parameters/getSpaceContentStates.ts | 0 .../src}/api/parameters/getSpaceProperties.ts | 0 .../src}/api/parameters/getSpaceProperty.ts | 0 .../src}/api/parameters/getSpaceSettings.ts | 0 .../src}/api/parameters/getSpaceTheme.ts | 0 .../legacy/src}/api/parameters/getSpaces.ts | 0 .../legacy/src}/api/parameters/getTask.ts | 0 .../legacy/src}/api/parameters/getTaskById.ts | 0 .../legacy/src}/api/parameters/getTasks.ts | 0 .../legacy/src}/api/parameters/getTheme.ts | 0 .../legacy/src}/api/parameters/getThemes.ts | 0 .../legacy/src}/api/parameters/getUser.ts | 14 - .../src}/api/parameters/getUserProperties.ts | 0 .../src}/api/parameters/getUserProperty.ts | 0 .../legacy/src}/api/parameters/getViewers.ts | 0 .../legacy/src}/api/parameters/getViews.ts | 0 .../api/parameters/getWatchersForSpace.ts | 0 .../src}/api/parameters/getWatchesForPage.ts | 0 .../src}/api/parameters/getWatchesForSpace.ts | 0 packages/legacy/src/api/parameters/index.ts | 319 ++ .../src}/api/parameters/isWatchingLabel.ts | 0 .../src}/api/parameters/isWatchingSpace.ts | 0 .../legacy/src}/api/parameters/movePage.ts | 0 .../src}/api/parameters/publishLegacyDraft.ts | 2 +- .../src}/api/parameters/publishSharedDraft.ts | 2 +- .../src/api/parameters/registerModules.ts | 3 + .../src}/api/parameters/removeContentState.ts | 0 .../api/parameters/removeContentWatcher.ts | 0 .../src}/api/parameters/removeGroupById.ts | 0 .../api/parameters/removeLabelFromContent.ts | 0 ...moveLabelFromContentUsingQueryParameter.ts | 0 .../src}/api/parameters/removeLabelWatcher.ts | 0 .../api/parameters/removeMemberFromGroup.ts | 0 .../removeMemberFromGroupByGroupId.ts | 0 .../src}/api/parameters/removeModules.ts | 0 .../src}/api/parameters/removePermission.ts | 0 .../src}/api/parameters/removeSpaceWatch.ts | 0 .../src}/api/parameters/removeTemplate.ts | 0 .../removeUserFromContentRestriction.ts | 0 .../parameters/resetLookAndFeelSettings.ts | 0 .../src}/api/parameters/resetSpaceTheme.ts | 0 .../api/parameters/restoreContentVersion.ts | 2 +- .../legacy/src}/api/parameters/searchByCQL.ts | 0 .../src}/api/parameters/searchContentByCQL.ts | 0 .../src}/api/parameters/searchGroups.ts | 0 .../legacy/src}/api/parameters/searchTasks.ts | 0 .../legacy/src}/api/parameters/searchUser.ts | 0 .../src}/api/parameters/setContentState.ts | 2 +- .../src}/api/parameters/setRetentionPeriod.ts | 2 +- .../src}/api/parameters/setSpaceTheme.ts | 2 +- .../api/parameters/updateAttachmentData.ts | 4 +- .../parameters/updateAttachmentProperties.ts | 2 +- .../src}/api/parameters/updateContent.ts | 2 +- .../api/parameters/updateContentProperty.ts | 2 +- .../api/parameters/updateContentTemplate.ts | 2 +- .../src}/api/parameters/updateLookAndFeel.ts | 2 +- .../parameters/updateLookAndFeelSettings.ts | 2 +- .../src}/api/parameters/updateRestrictions.ts | 2 +- .../legacy/src}/api/parameters/updateSpace.ts | 2 +- .../api/parameters/updateSpaceProperty.ts | 2 +- .../api/parameters/updateSpaceSettings.ts | 2 +- .../src}/api/parameters/updateTaskById.ts | 2 +- .../src}/api/parameters/updateUserProperty.ts | 2 +- {src => packages/legacy/src}/api/relation.ts | 10 +- {src => packages/legacy/src}/api/search.ts | 10 +- {src => packages/legacy/src}/api/settings.ts | 49 +- {src => packages/legacy/src}/api/space.ts | 12 +- .../legacy/src}/api/spacePermissions.ts | 10 +- .../legacy/src}/api/spaceProperties.ts | 10 +- .../legacy/src}/api/spaceSettings.ts | 10 +- {src => packages/legacy/src}/api/template.ts | 10 +- {src => packages/legacy/src}/api/themes.ts | 10 +- .../legacy/src}/api/userProperties.ts | 10 +- {src => packages/legacy/src}/api/users.ts | 58 +- {src => packages/legacy/src}/callback.ts | 0 .../legacy/src}/clients/baseClient.ts | 12 +- .../legacy/src}/clients/client.ts | 4 +- .../legacy/src}/clients/confluenceClient.ts | 6 +- packages/legacy/src/clients/index.ts | 5 + {src => packages/legacy/src}/config.ts | 5 + packages/legacy/src/index.ts | 19 + .../legacy/src}/interfaces/extractBaseType.ts | 0 packages/legacy/src/interfaces/index.ts | 3 + .../legacy/src}/interfaces/oneOrMany.ts | 0 {src => packages/legacy/src}/pagination.ts | 0 .../legacy/src}/paramSerializer.ts | 0 {src => packages/legacy/src}/requestConfig.ts | 0 .../authenticationService.ts | 4 +- .../createBasicAuthenticationToken.ts | 4 +- .../createJWTAuthentication.ts | 2 +- .../createOAuth2AuthenticationToken.ts | 2 +- .../authentications/index.ts | 5 + .../authenticationService/base64Encoder.ts | 0 .../services/authenticationService/index.ts | 1 + packages/legacy/src/services/index.ts | 1 + .../legacy/tests}/integration/e2e.test.ts | 2 +- packages/legacy/tests/tsconfig.json | 12 + .../tests}/unit/api/contentBody.test.ts | 2 +- .../api/contentChildrenAndDescendants.test.ts | 4 +- .../legacy/tests}/unit/api/group.test.ts | 119 +- .../tests}/unit/clients/baseClient.test.ts | 4 +- .../unit/clients/confluenceClient.test.ts | 2 +- .../legacy/tests}/unit/index.test.ts | 4 +- packages/legacy/tsconfig.json | 9 + packages/legacy/vite.config.ts | 33 + packages/legacy/vitest.config.ts | 27 + pnpm-lock.yaml | 3404 ++++++++++------- pnpm-workspace.yaml | 3 + rollup.config.ts | 72 - src/api/experimental.ts | 341 -- src/api/index.ts | 32 - src/api/models/createdAttachment.ts | 8 - src/api/models/index.ts | 161 - src/api/models/labelCreateArray.ts | 3 - .../addGroupToContentRestriction.ts | 8 - src/api/parameters/createGroup.ts | 3 - src/api/parameters/createSpace.ts | 3 - src/api/parameters/getBulkUserMigration.ts | 16 - .../getContentRestrictionStatusForGroup.ts | 8 - src/api/parameters/getGroupByName.ts | 4 - src/api/parameters/getGroupByQueryParam.ts | 4 - src/api/parameters/getGroupMembers.ts | 8 - .../parameters/getGroupMembershipsForUser.ts | 25 - src/api/parameters/getMembersByQueryParam.ts | 16 - src/api/parameters/index.ts | 170 - src/api/parameters/registerModules.ts | 3 - src/api/parameters/removeGroup.ts | 4 - src/api/parameters/removeGroupByName.ts | 14 - src/api/parameters/setLookAndFeelSettings.ts | 7 - src/clients/index.ts | 3 - src/index.ts | 11 - src/interfaces/index.ts | 2 - .../authentications/index.ts | 3 - src/services/authenticationService/index.ts | 1 - src/services/index.ts | 1 - tests/tsconfig.json | 12 - tsconfig.base.json | 15 + tsconfig.json | 21 +- vitest.config.mts | 17 - vitest.config.ts | 25 + vitestShared.ts | 25 + 980 files changed, 27436 insertions(+), 3513 deletions(-) create mode 100644 .changeset/README.md create mode 100644 .changeset/config.json create mode 100644 .github/workflows/changeset-check.yml delete mode 100644 .github/workflows/publish.yml create mode 100644 .github/workflows/release.yml create mode 100644 .husky/pre-push delete mode 100644 .npmignore create mode 100644 packages/cloud/package.json create mode 100644 packages/cloud/src/api/adminKey.ts create mode 100644 packages/cloud/src/api/ancestors.ts create mode 100644 packages/cloud/src/api/appProperties.ts create mode 100644 packages/cloud/src/api/attachment.ts create mode 100644 packages/cloud/src/api/blogPost.ts create mode 100644 packages/cloud/src/api/children.ts create mode 100644 packages/cloud/src/api/classificationLevel.ts create mode 100644 packages/cloud/src/api/comment.ts create mode 100644 packages/cloud/src/api/content.ts create mode 100644 packages/cloud/src/api/contentProperties.ts create mode 100644 packages/cloud/src/api/customContent.ts create mode 100644 packages/cloud/src/api/dataPolicies.ts create mode 100644 packages/cloud/src/api/database.ts create mode 100644 packages/cloud/src/api/descendants.ts create mode 100644 packages/cloud/src/api/folder.ts create mode 100644 packages/cloud/src/api/index.ts create mode 100644 packages/cloud/src/api/label.ts create mode 100644 packages/cloud/src/api/like.ts create mode 100644 packages/cloud/src/api/operation.ts create mode 100644 packages/cloud/src/api/page.ts create mode 100644 packages/cloud/src/api/redactions.ts create mode 100644 packages/cloud/src/api/smartLink.ts create mode 100644 packages/cloud/src/api/space.ts create mode 100644 packages/cloud/src/api/spacePermissionTransition.ts create mode 100644 packages/cloud/src/api/spacePermissions.ts create mode 100644 packages/cloud/src/api/spaceProperties.ts create mode 100644 packages/cloud/src/api/spaceRoles.ts create mode 100644 packages/cloud/src/api/task.ts create mode 100644 packages/cloud/src/api/user.ts create mode 100644 packages/cloud/src/api/version.ts create mode 100644 packages/cloud/src/api/whiteboard.ts create mode 100644 packages/cloud/src/createCloud.v2Client.ts create mode 100644 packages/cloud/src/index.ts create mode 100644 packages/cloud/src/models/abstractPageLinks.ts create mode 100644 packages/cloud/src/models/accessByEmail.ts create mode 100644 packages/cloud/src/models/accountStatus.ts create mode 100644 packages/cloud/src/models/accountType.ts create mode 100644 packages/cloud/src/models/adminKey.ts create mode 100644 packages/cloud/src/models/ancestor.ts create mode 100644 packages/cloud/src/models/ancestorType.ts create mode 100644 packages/cloud/src/models/attachment.ts create mode 100644 packages/cloud/src/models/attachmentComment.ts create mode 100644 packages/cloud/src/models/attachmentComments.ts create mode 100644 packages/cloud/src/models/attachmentContentProperties.ts create mode 100644 packages/cloud/src/models/attachmentLabels.ts create mode 100644 packages/cloud/src/models/attachmentLinks.ts create mode 100644 packages/cloud/src/models/attachmentSortOrder.ts create mode 100644 packages/cloud/src/models/attachmentSummary.ts create mode 100644 packages/cloud/src/models/attachmentVersion.ts create mode 100644 packages/cloud/src/models/attachmentVersions.ts create mode 100644 packages/cloud/src/models/attachments.ts create mode 100644 packages/cloud/src/models/availableSpacePermissions.ts create mode 100644 packages/cloud/src/models/availableSpaceRoles.ts create mode 100644 packages/cloud/src/models/blogPost.ts create mode 100644 packages/cloud/src/models/blogPostBodyWrite.ts create mode 100644 packages/cloud/src/models/blogPostComment.ts create mode 100644 packages/cloud/src/models/blogPostContentStatus.ts create mode 100644 packages/cloud/src/models/blogPostFooterComments.ts create mode 100644 packages/cloud/src/models/blogPostInlineComment.ts create mode 100644 packages/cloud/src/models/blogPostInlineComments.ts create mode 100644 packages/cloud/src/models/blogPostLabels.ts create mode 100644 packages/cloud/src/models/blogPostLikeCount.ts create mode 100644 packages/cloud/src/models/blogPostLikeUsers.ts create mode 100644 packages/cloud/src/models/blogPostNestedBodyWrite.ts create mode 100644 packages/cloud/src/models/blogPostSortOrder.ts create mode 100644 packages/cloud/src/models/blogPostSummary.ts create mode 100644 packages/cloud/src/models/blogPostVersion.ts create mode 100644 packages/cloud/src/models/blogPostVersions.ts create mode 100644 packages/cloud/src/models/blogPosts.ts create mode 100644 packages/cloud/src/models/blogPostsInSpace.ts create mode 100644 packages/cloud/src/models/blogpostAttachments.ts create mode 100644 packages/cloud/src/models/blogpostContentProperties.ts create mode 100644 packages/cloud/src/models/body.ts create mode 100644 packages/cloud/src/models/bodySummary.ts create mode 100644 packages/cloud/src/models/bodyType.ts create mode 100644 packages/cloud/src/models/bulkAssignRoles.ts create mode 100644 packages/cloud/src/models/bulkRemoveAccess.ts create mode 100644 packages/cloud/src/models/bulkTransitionCombinationEntry.ts create mode 100644 packages/cloud/src/models/bulkTransitionDecodedPermission.ts create mode 100644 packages/cloud/src/models/bulkTransitionPrincipalTypeAssignment.ts create mode 100644 packages/cloud/src/models/bulkTransitionRoleAssignment.ts create mode 100644 packages/cloud/src/models/bulkTransitionSpaceSelection.ts create mode 100644 packages/cloud/src/models/bulkTransitionSpaceTarget.ts create mode 100644 packages/cloud/src/models/bulkTransitionTask.ts create mode 100644 packages/cloud/src/models/bulkTransitionTaskStatus.ts create mode 100644 packages/cloud/src/models/bulkUserLookup.ts create mode 100644 packages/cloud/src/models/childCustomContent.ts create mode 100644 packages/cloud/src/models/childCustomContentGet.ts create mode 100644 packages/cloud/src/models/childCustomContentSortOrder.ts create mode 100644 packages/cloud/src/models/childPage.ts create mode 100644 packages/cloud/src/models/childPageSortOrder.ts create mode 100644 packages/cloud/src/models/childPages.ts create mode 100644 packages/cloud/src/models/children.ts create mode 100644 packages/cloud/src/models/childrenComment.ts create mode 100644 packages/cloud/src/models/classificationLevel.ts create mode 100644 packages/cloud/src/models/classificationLevelColor.ts create mode 100644 packages/cloud/src/models/classificationLevelStatus.ts create mode 100644 packages/cloud/src/models/commentBodyWrite.ts create mode 100644 packages/cloud/src/models/commentContentProperties.ts create mode 100644 packages/cloud/src/models/commentLinks.ts create mode 100644 packages/cloud/src/models/commentNestedBodyWrite.ts create mode 100644 packages/cloud/src/models/commentSortOrder.ts create mode 100644 packages/cloud/src/models/commentVersion.ts create mode 100644 packages/cloud/src/models/contentIdToContentType.ts create mode 100644 packages/cloud/src/models/contentProperty.ts create mode 100644 packages/cloud/src/models/contentPropertyCreate.ts create mode 100644 packages/cloud/src/models/contentPropertySortOrder.ts create mode 100644 packages/cloud/src/models/contentPropertyUpdate.ts create mode 100644 packages/cloud/src/models/contentSortOrder.ts create mode 100644 packages/cloud/src/models/contentStatus.ts create mode 100644 packages/cloud/src/models/createFooterCommentModel.ts create mode 100644 packages/cloud/src/models/createInlineCommentModel.ts create mode 100644 packages/cloud/src/models/customContent.ts create mode 100644 packages/cloud/src/models/customContentAttachments.ts create mode 100644 packages/cloud/src/models/customContentBody.ts create mode 100644 packages/cloud/src/models/customContentBodyRepresentation.ts create mode 100644 packages/cloud/src/models/customContentBodyRepresentationSingle.ts create mode 100644 packages/cloud/src/models/customContentBodySummary.ts create mode 100644 packages/cloud/src/models/customContentBodyWrite.ts create mode 100644 packages/cloud/src/models/customContentByType.ts create mode 100644 packages/cloud/src/models/customContentByTypeInBlogPost.ts create mode 100644 packages/cloud/src/models/customContentByTypeInPage.ts create mode 100644 packages/cloud/src/models/customContentByTypeInSpace.ts create mode 100644 packages/cloud/src/models/customContentComment.ts create mode 100644 packages/cloud/src/models/customContentComments.ts create mode 100644 packages/cloud/src/models/customContentContentProperties.ts create mode 100644 packages/cloud/src/models/customContentLabels.ts create mode 100644 packages/cloud/src/models/customContentLinks.ts create mode 100644 packages/cloud/src/models/customContentNestedBodyWrite.ts create mode 100644 packages/cloud/src/models/customContentSortOrder.ts create mode 100644 packages/cloud/src/models/customContentSummary.ts create mode 100644 packages/cloud/src/models/customContentVersion.ts create mode 100644 packages/cloud/src/models/customContentVersions.ts create mode 100644 packages/cloud/src/models/dataPolicyMetadata.ts create mode 100644 packages/cloud/src/models/dataPolicySpace.ts create mode 100644 packages/cloud/src/models/dataPolicySpaces.ts create mode 100644 packages/cloud/src/models/database.ts create mode 100644 packages/cloud/src/models/databaseAncestors.ts create mode 100644 packages/cloud/src/models/databaseContentProperties.ts create mode 100644 packages/cloud/src/models/databaseDescendants.ts create mode 100644 packages/cloud/src/models/databaseDirectChildren.ts create mode 100644 packages/cloud/src/models/databaseLinks.ts create mode 100644 packages/cloud/src/models/deleteSpaceRoleResponse.ts create mode 100644 packages/cloud/src/models/descendants.ts create mode 100644 packages/cloud/src/models/detailedVersion.ts create mode 100644 packages/cloud/src/models/folder.ts create mode 100644 packages/cloud/src/models/folderAncestors.ts create mode 100644 packages/cloud/src/models/folderContentProperties.ts create mode 100644 packages/cloud/src/models/folderDescendants.ts create mode 100644 packages/cloud/src/models/folderDirectChildren.ts create mode 100644 packages/cloud/src/models/folderLinks.ts create mode 100644 packages/cloud/src/models/footerComment.ts create mode 100644 packages/cloud/src/models/footerCommentChildren.ts create mode 100644 packages/cloud/src/models/footerCommentVersions.ts create mode 100644 packages/cloud/src/models/footerComments.ts create mode 100644 packages/cloud/src/models/footerLikeCount.ts create mode 100644 packages/cloud/src/models/footerLikeUsers.ts create mode 100644 packages/cloud/src/models/forgeAppProperties.ts create mode 100644 packages/cloud/src/models/forgeAppProperty.ts create mode 100644 packages/cloud/src/models/icon.ts create mode 100644 packages/cloud/src/models/index.ts create mode 100644 packages/cloud/src/models/inlineComment.ts create mode 100644 packages/cloud/src/models/inlineCommentChildren.ts create mode 100644 packages/cloud/src/models/inlineCommentChildrenGet.ts create mode 100644 packages/cloud/src/models/inlineCommentProperties.ts create mode 100644 packages/cloud/src/models/inlineCommentResolutionStatus.ts create mode 100644 packages/cloud/src/models/inlineCommentVersions.ts create mode 100644 packages/cloud/src/models/inlineComments.ts create mode 100644 packages/cloud/src/models/inlineLikeCount.ts create mode 100644 packages/cloud/src/models/inlineLikeUsers.ts create mode 100644 packages/cloud/src/models/label.ts create mode 100644 packages/cloud/src/models/labelAttachments.ts create mode 100644 packages/cloud/src/models/labelBlogPosts.ts create mode 100644 packages/cloud/src/models/labelPages.ts create mode 100644 packages/cloud/src/models/labelSortOrder.ts create mode 100644 packages/cloud/src/models/labels.ts create mode 100644 packages/cloud/src/models/like.ts create mode 100644 packages/cloud/src/models/listSpacePermissionCombinationsResponse.ts create mode 100644 packages/cloud/src/models/multiEntityLinks.ts create mode 100644 packages/cloud/src/models/onlyArchivedAndCurrentContentStatus.ts create mode 100644 packages/cloud/src/models/operation.ts create mode 100644 packages/cloud/src/models/optionalFieldLinks.ts create mode 100644 packages/cloud/src/models/optionalFieldMeta.ts create mode 100644 packages/cloud/src/models/page.ts create mode 100644 packages/cloud/src/models/pageAncestors.ts create mode 100644 packages/cloud/src/models/pageAttachments.ts create mode 100644 packages/cloud/src/models/pageBodyWrite.ts create mode 100644 packages/cloud/src/models/pageComment.ts create mode 100644 packages/cloud/src/models/pageContentProperties.ts create mode 100644 packages/cloud/src/models/pageDescendants.ts create mode 100644 packages/cloud/src/models/pageDirectChildren.ts create mode 100644 packages/cloud/src/models/pageFooterComments.ts create mode 100644 packages/cloud/src/models/pageInlineComment.ts create mode 100644 packages/cloud/src/models/pageInlineComments.ts create mode 100644 packages/cloud/src/models/pageLabels.ts create mode 100644 packages/cloud/src/models/pageLikeCount.ts create mode 100644 packages/cloud/src/models/pageLikeUsers.ts create mode 100644 packages/cloud/src/models/pageNestedBodyWrite.ts create mode 100644 packages/cloud/src/models/pageSortOrder.ts create mode 100644 packages/cloud/src/models/pageSummary.ts create mode 100644 packages/cloud/src/models/pageVersion.ts create mode 100644 packages/cloud/src/models/pageVersions.ts create mode 100644 packages/cloud/src/models/pages.ts create mode 100644 packages/cloud/src/models/pagesInSpace.ts create mode 100644 packages/cloud/src/models/parentContentType.ts create mode 100644 packages/cloud/src/models/permittedOperations.ts create mode 100644 packages/cloud/src/models/primaryBodyRepresentation.ts create mode 100644 packages/cloud/src/models/primaryBodyRepresentationSingle.ts create mode 100644 packages/cloud/src/models/principal.ts create mode 100644 packages/cloud/src/models/principalType.ts create mode 100644 packages/cloud/src/models/redaction.ts create mode 100644 packages/cloud/src/models/redactionPointer.ts create mode 100644 packages/cloud/src/models/redactionPointerResponse.ts create mode 100644 packages/cloud/src/models/redactionResponse.ts create mode 100644 packages/cloud/src/models/redactionSection.ts create mode 100644 packages/cloud/src/models/roleType.ts create mode 100644 packages/cloud/src/models/smartLink.ts create mode 100644 packages/cloud/src/models/smartLinkAncestors.ts create mode 100644 packages/cloud/src/models/smartLinkContentProperties.ts create mode 100644 packages/cloud/src/models/smartLinkDescendants.ts create mode 100644 packages/cloud/src/models/smartLinkDirectChildren.ts create mode 100644 packages/cloud/src/models/smartLinkLinks.ts create mode 100644 packages/cloud/src/models/space.ts create mode 100644 packages/cloud/src/models/spaceContentLabels.ts create mode 100644 packages/cloud/src/models/spaceDescription.ts create mode 100644 packages/cloud/src/models/spaceDescriptionBodyRepresentation.ts create mode 100644 packages/cloud/src/models/spaceIcon.ts create mode 100644 packages/cloud/src/models/spaceLabels.ts create mode 100644 packages/cloud/src/models/spaceLinks.ts create mode 100644 packages/cloud/src/models/spacePermission.ts create mode 100644 packages/cloud/src/models/spacePermissionAssignment.ts create mode 100644 packages/cloud/src/models/spacePermissionsAssignments.ts create mode 100644 packages/cloud/src/models/spaceProperties.ts create mode 100644 packages/cloud/src/models/spaceProperty.ts create mode 100644 packages/cloud/src/models/spacePropertyCreate.ts create mode 100644 packages/cloud/src/models/spacePropertyUpdate.ts create mode 100644 packages/cloud/src/models/spaceRole.ts create mode 100644 packages/cloud/src/models/spaceRoleAssignment.ts create mode 100644 packages/cloud/src/models/spaceRoleAssignmentsGet.ts create mode 100644 packages/cloud/src/models/spaceRoleAssignmentsSet.ts create mode 100644 packages/cloud/src/models/spaceRoleMode.ts create mode 100644 packages/cloud/src/models/spaceSortOrder.ts create mode 100644 packages/cloud/src/models/spaceStatus.ts create mode 100644 packages/cloud/src/models/spaceSummary.ts create mode 100644 packages/cloud/src/models/spaceType.ts create mode 100644 packages/cloud/src/models/spaces.ts create mode 100644 packages/cloud/src/models/task.ts create mode 100644 packages/cloud/src/models/taskBody.ts create mode 100644 packages/cloud/src/models/tasks.ts create mode 100644 packages/cloud/src/models/updateFooterCommentModel.ts create mode 100644 packages/cloud/src/models/updateInlineCommentModel.ts create mode 100644 packages/cloud/src/models/updateSpaceRoleResponse.ts create mode 100644 packages/cloud/src/models/user.ts create mode 100644 packages/cloud/src/models/version.ts create mode 100644 packages/cloud/src/models/versionSortOrder.ts create mode 100644 packages/cloud/src/models/versionedEntity.ts create mode 100644 packages/cloud/src/models/whiteboard.ts create mode 100644 packages/cloud/src/models/whiteboardAncestors.ts create mode 100644 packages/cloud/src/models/whiteboardContentProperties.ts create mode 100644 packages/cloud/src/models/whiteboardDescendants.ts create mode 100644 packages/cloud/src/models/whiteboardDirectChildren.ts create mode 100644 packages/cloud/src/models/whiteboardLinks.ts create mode 100644 packages/cloud/src/parameters/bulkAssignSpacePermissionRoles.ts create mode 100644 packages/cloud/src/parameters/bulkRemoveSpacePermissionAccess.ts create mode 100644 packages/cloud/src/parameters/checkAccessByEmail.ts create mode 100644 packages/cloud/src/parameters/convertContentIdsToContentTypes.ts create mode 100644 packages/cloud/src/parameters/createAttachmentProperty.ts create mode 100644 packages/cloud/src/parameters/createBlogPost.ts create mode 100644 packages/cloud/src/parameters/createBlogpostProperty.ts create mode 100644 packages/cloud/src/parameters/createBulkUserLookup.ts create mode 100644 packages/cloud/src/parameters/createCommentProperty.ts create mode 100644 packages/cloud/src/parameters/createCustomContent.ts create mode 100644 packages/cloud/src/parameters/createCustomContentProperty.ts create mode 100644 packages/cloud/src/parameters/createDatabase.ts create mode 100644 packages/cloud/src/parameters/createDatabaseProperty.ts create mode 100644 packages/cloud/src/parameters/createFolder.ts create mode 100644 packages/cloud/src/parameters/createFolderProperty.ts create mode 100644 packages/cloud/src/parameters/createFooterComment.ts create mode 100644 packages/cloud/src/parameters/createInlineComment.ts create mode 100644 packages/cloud/src/parameters/createPage.ts create mode 100644 packages/cloud/src/parameters/createPageProperty.ts create mode 100644 packages/cloud/src/parameters/createSmartLink.ts create mode 100644 packages/cloud/src/parameters/createSmartLinkProperty.ts create mode 100644 packages/cloud/src/parameters/createSpace.ts create mode 100644 packages/cloud/src/parameters/createSpaceProperty.ts create mode 100644 packages/cloud/src/parameters/createSpaceRole.ts create mode 100644 packages/cloud/src/parameters/createWhiteboard.ts create mode 100644 packages/cloud/src/parameters/createWhiteboardProperty.ts create mode 100644 packages/cloud/src/parameters/deleteAttachment.ts create mode 100644 packages/cloud/src/parameters/deleteAttachmentPropertyById.ts create mode 100644 packages/cloud/src/parameters/deleteBlogPost.ts create mode 100644 packages/cloud/src/parameters/deleteBlogpostPropertyById.ts create mode 100644 packages/cloud/src/parameters/deleteCommentPropertyById.ts create mode 100644 packages/cloud/src/parameters/deleteCustomContent.ts create mode 100644 packages/cloud/src/parameters/deleteCustomContentPropertyById.ts create mode 100644 packages/cloud/src/parameters/deleteDatabase.ts create mode 100644 packages/cloud/src/parameters/deleteDatabasePropertyById.ts create mode 100644 packages/cloud/src/parameters/deleteFolder.ts create mode 100644 packages/cloud/src/parameters/deleteFolderPropertyById.ts create mode 100644 packages/cloud/src/parameters/deleteFooterComment.ts create mode 100644 packages/cloud/src/parameters/deleteForgeAppProperty.ts create mode 100644 packages/cloud/src/parameters/deleteInlineComment.ts create mode 100644 packages/cloud/src/parameters/deletePage.ts create mode 100644 packages/cloud/src/parameters/deletePagePropertyById.ts create mode 100644 packages/cloud/src/parameters/deleteSmartLink.ts create mode 100644 packages/cloud/src/parameters/deleteSmartLinkPropertyById.ts create mode 100644 packages/cloud/src/parameters/deleteSpaceDefaultClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/deleteSpacePropertyById.ts create mode 100644 packages/cloud/src/parameters/deleteSpaceRole.ts create mode 100644 packages/cloud/src/parameters/deleteWhiteboard.ts create mode 100644 packages/cloud/src/parameters/deleteWhiteboardPropertyById.ts create mode 100644 packages/cloud/src/parameters/enableAdminKey.ts create mode 100644 packages/cloud/src/parameters/getAttachmentById.ts create mode 100644 packages/cloud/src/parameters/getAttachmentComments.ts create mode 100644 packages/cloud/src/parameters/getAttachmentContentProperties.ts create mode 100644 packages/cloud/src/parameters/getAttachmentContentPropertiesById.ts create mode 100644 packages/cloud/src/parameters/getAttachmentLabels.ts create mode 100644 packages/cloud/src/parameters/getAttachmentOperations.ts create mode 100644 packages/cloud/src/parameters/getAttachmentThumbnailById.ts create mode 100644 packages/cloud/src/parameters/getAttachmentVersionDetails.ts create mode 100644 packages/cloud/src/parameters/getAttachmentVersions.ts create mode 100644 packages/cloud/src/parameters/getAttachments.ts create mode 100644 packages/cloud/src/parameters/getAvailableSpacePermissions.ts create mode 100644 packages/cloud/src/parameters/getAvailableSpaceRoles.ts create mode 100644 packages/cloud/src/parameters/getBlogPostById.ts create mode 100644 packages/cloud/src/parameters/getBlogPostClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/getBlogPostFooterComments.ts create mode 100644 packages/cloud/src/parameters/getBlogPostInlineComments.ts create mode 100644 packages/cloud/src/parameters/getBlogPostLabels.ts create mode 100644 packages/cloud/src/parameters/getBlogPostLikeCount.ts create mode 100644 packages/cloud/src/parameters/getBlogPostLikeUsers.ts create mode 100644 packages/cloud/src/parameters/getBlogPostOperations.ts create mode 100644 packages/cloud/src/parameters/getBlogPostVersionDetails.ts create mode 100644 packages/cloud/src/parameters/getBlogPostVersions.ts create mode 100644 packages/cloud/src/parameters/getBlogPosts.ts create mode 100644 packages/cloud/src/parameters/getBlogPostsInSpace.ts create mode 100644 packages/cloud/src/parameters/getBlogpostAttachments.ts create mode 100644 packages/cloud/src/parameters/getBlogpostContentProperties.ts create mode 100644 packages/cloud/src/parameters/getBlogpostContentPropertiesById.ts create mode 100644 packages/cloud/src/parameters/getChildCustomContent.ts create mode 100644 packages/cloud/src/parameters/getChildPages.ts create mode 100644 packages/cloud/src/parameters/getCommentContentProperties.ts create mode 100644 packages/cloud/src/parameters/getCommentContentPropertiesById.ts create mode 100644 packages/cloud/src/parameters/getCustomContentAttachments.ts create mode 100644 packages/cloud/src/parameters/getCustomContentById.ts create mode 100644 packages/cloud/src/parameters/getCustomContentByType.ts create mode 100644 packages/cloud/src/parameters/getCustomContentByTypeInBlogPost.ts create mode 100644 packages/cloud/src/parameters/getCustomContentByTypeInPage.ts create mode 100644 packages/cloud/src/parameters/getCustomContentByTypeInSpace.ts create mode 100644 packages/cloud/src/parameters/getCustomContentComments.ts create mode 100644 packages/cloud/src/parameters/getCustomContentContentProperties.ts create mode 100644 packages/cloud/src/parameters/getCustomContentContentPropertiesById.ts create mode 100644 packages/cloud/src/parameters/getCustomContentLabels.ts create mode 100644 packages/cloud/src/parameters/getCustomContentOperations.ts create mode 100644 packages/cloud/src/parameters/getCustomContentVersionDetails.ts create mode 100644 packages/cloud/src/parameters/getCustomContentVersions.ts create mode 100644 packages/cloud/src/parameters/getDataPolicySpaces.ts create mode 100644 packages/cloud/src/parameters/getDatabaseAncestors.ts create mode 100644 packages/cloud/src/parameters/getDatabaseById.ts create mode 100644 packages/cloud/src/parameters/getDatabaseClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/getDatabaseContentProperties.ts create mode 100644 packages/cloud/src/parameters/getDatabaseContentPropertiesById.ts create mode 100644 packages/cloud/src/parameters/getDatabaseDescendants.ts create mode 100644 packages/cloud/src/parameters/getDatabaseDirectChildren.ts create mode 100644 packages/cloud/src/parameters/getDatabaseOperations.ts create mode 100644 packages/cloud/src/parameters/getFolderAncestors.ts create mode 100644 packages/cloud/src/parameters/getFolderById.ts create mode 100644 packages/cloud/src/parameters/getFolderContentProperties.ts create mode 100644 packages/cloud/src/parameters/getFolderContentPropertiesById.ts create mode 100644 packages/cloud/src/parameters/getFolderDescendants.ts create mode 100644 packages/cloud/src/parameters/getFolderDirectChildren.ts create mode 100644 packages/cloud/src/parameters/getFolderOperations.ts create mode 100644 packages/cloud/src/parameters/getFooterCommentById.ts create mode 100644 packages/cloud/src/parameters/getFooterCommentChildren.ts create mode 100644 packages/cloud/src/parameters/getFooterCommentOperations.ts create mode 100644 packages/cloud/src/parameters/getFooterCommentVersionDetails.ts create mode 100644 packages/cloud/src/parameters/getFooterCommentVersions.ts create mode 100644 packages/cloud/src/parameters/getFooterComments.ts create mode 100644 packages/cloud/src/parameters/getFooterLikeCount.ts create mode 100644 packages/cloud/src/parameters/getFooterLikeUsers.ts create mode 100644 packages/cloud/src/parameters/getForgeAppProperties.ts create mode 100644 packages/cloud/src/parameters/getForgeAppProperty.ts create mode 100644 packages/cloud/src/parameters/getInlineCommentById.ts create mode 100644 packages/cloud/src/parameters/getInlineCommentChildren.ts create mode 100644 packages/cloud/src/parameters/getInlineCommentOperations.ts create mode 100644 packages/cloud/src/parameters/getInlineCommentVersionDetails.ts create mode 100644 packages/cloud/src/parameters/getInlineCommentVersions.ts create mode 100644 packages/cloud/src/parameters/getInlineComments.ts create mode 100644 packages/cloud/src/parameters/getInlineLikeCount.ts create mode 100644 packages/cloud/src/parameters/getInlineLikeUsers.ts create mode 100644 packages/cloud/src/parameters/getLabelAttachments.ts create mode 100644 packages/cloud/src/parameters/getLabelBlogPosts.ts create mode 100644 packages/cloud/src/parameters/getLabelPages.ts create mode 100644 packages/cloud/src/parameters/getLabels.ts create mode 100644 packages/cloud/src/parameters/getPageAncestors.ts create mode 100644 packages/cloud/src/parameters/getPageAttachments.ts create mode 100644 packages/cloud/src/parameters/getPageById.ts create mode 100644 packages/cloud/src/parameters/getPageClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/getPageContentProperties.ts create mode 100644 packages/cloud/src/parameters/getPageContentPropertiesById.ts create mode 100644 packages/cloud/src/parameters/getPageDescendants.ts create mode 100644 packages/cloud/src/parameters/getPageDirectChildren.ts create mode 100644 packages/cloud/src/parameters/getPageFooterComments.ts create mode 100644 packages/cloud/src/parameters/getPageInlineComments.ts create mode 100644 packages/cloud/src/parameters/getPageLabels.ts create mode 100644 packages/cloud/src/parameters/getPageLikeCount.ts create mode 100644 packages/cloud/src/parameters/getPageLikeUsers.ts create mode 100644 packages/cloud/src/parameters/getPageOperations.ts create mode 100644 packages/cloud/src/parameters/getPageVersionDetails.ts create mode 100644 packages/cloud/src/parameters/getPageVersions.ts create mode 100644 packages/cloud/src/parameters/getPages.ts create mode 100644 packages/cloud/src/parameters/getPagesInSpace.ts create mode 100644 packages/cloud/src/parameters/getSmartLinkAncestors.ts create mode 100644 packages/cloud/src/parameters/getSmartLinkById.ts create mode 100644 packages/cloud/src/parameters/getSmartLinkContentProperties.ts create mode 100644 packages/cloud/src/parameters/getSmartLinkContentPropertiesById.ts create mode 100644 packages/cloud/src/parameters/getSmartLinkDescendants.ts create mode 100644 packages/cloud/src/parameters/getSmartLinkDirectChildren.ts create mode 100644 packages/cloud/src/parameters/getSmartLinkOperations.ts create mode 100644 packages/cloud/src/parameters/getSpaceById.ts create mode 100644 packages/cloud/src/parameters/getSpaceContentLabels.ts create mode 100644 packages/cloud/src/parameters/getSpaceDefaultClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/getSpaceLabels.ts create mode 100644 packages/cloud/src/parameters/getSpaceOperations.ts create mode 100644 packages/cloud/src/parameters/getSpacePermissionTransitionTaskStatus.ts create mode 100644 packages/cloud/src/parameters/getSpacePermissionsAssignments.ts create mode 100644 packages/cloud/src/parameters/getSpaceProperties.ts create mode 100644 packages/cloud/src/parameters/getSpacePropertyById.ts create mode 100644 packages/cloud/src/parameters/getSpaceRoleAssignments.ts create mode 100644 packages/cloud/src/parameters/getSpaceRolesById.ts create mode 100644 packages/cloud/src/parameters/getSpaces.ts create mode 100644 packages/cloud/src/parameters/getTaskById.ts create mode 100644 packages/cloud/src/parameters/getTasks.ts create mode 100644 packages/cloud/src/parameters/getWhiteboardAncestors.ts create mode 100644 packages/cloud/src/parameters/getWhiteboardById.ts create mode 100644 packages/cloud/src/parameters/getWhiteboardClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/getWhiteboardContentProperties.ts create mode 100644 packages/cloud/src/parameters/getWhiteboardContentPropertiesById.ts create mode 100644 packages/cloud/src/parameters/getWhiteboardDescendants.ts create mode 100644 packages/cloud/src/parameters/getWhiteboardDirectChildren.ts create mode 100644 packages/cloud/src/parameters/getWhiteboardOperations.ts create mode 100644 packages/cloud/src/parameters/index.ts create mode 100644 packages/cloud/src/parameters/inviteByEmail.ts create mode 100644 packages/cloud/src/parameters/listSpacePermissionCombinations.ts create mode 100644 packages/cloud/src/parameters/postBlogPostClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/postDatabaseClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/postPageClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/postRedactBlog.ts create mode 100644 packages/cloud/src/parameters/postRedactPage.ts create mode 100644 packages/cloud/src/parameters/postWhiteboardClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/putBlogPostClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/putDatabaseClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/putForgeAppProperty.ts create mode 100644 packages/cloud/src/parameters/putPageClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/putSpaceDefaultClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/putWhiteboardClassificationLevel.ts create mode 100644 packages/cloud/src/parameters/setSpaceRoleAssignments.ts create mode 100644 packages/cloud/src/parameters/updateAttachmentPropertyById.ts create mode 100644 packages/cloud/src/parameters/updateBlogPost.ts create mode 100644 packages/cloud/src/parameters/updateBlogpostPropertyById.ts create mode 100644 packages/cloud/src/parameters/updateCommentPropertyById.ts create mode 100644 packages/cloud/src/parameters/updateCustomContent.ts create mode 100644 packages/cloud/src/parameters/updateCustomContentPropertyById.ts create mode 100644 packages/cloud/src/parameters/updateDatabasePropertyById.ts create mode 100644 packages/cloud/src/parameters/updateFolderPropertyById.ts create mode 100644 packages/cloud/src/parameters/updateFooterComment.ts create mode 100644 packages/cloud/src/parameters/updateInlineComment.ts create mode 100644 packages/cloud/src/parameters/updatePage.ts create mode 100644 packages/cloud/src/parameters/updatePagePropertyById.ts create mode 100644 packages/cloud/src/parameters/updatePageTitle.ts create mode 100644 packages/cloud/src/parameters/updateSmartLinkPropertyById.ts create mode 100644 packages/cloud/src/parameters/updateSpacePropertyById.ts create mode 100644 packages/cloud/src/parameters/updateSpaceRole.ts create mode 100644 packages/cloud/src/parameters/updateTask.ts create mode 100644 packages/cloud/src/parameters/updateWhiteboardPropertyById.ts create mode 100644 packages/cloud/tests/integration/adminKey.test.ts create mode 100644 packages/cloud/tests/integration/ancestors.test.ts create mode 100644 packages/cloud/tests/integration/appProperties.test.ts create mode 100644 packages/cloud/tests/integration/attachment.test.ts create mode 100644 packages/cloud/tests/integration/blogPost.test.ts create mode 100644 packages/cloud/tests/integration/children.test.ts create mode 100644 packages/cloud/tests/integration/classificationLevel.test.ts create mode 100644 packages/cloud/tests/integration/comment.test.ts create mode 100644 packages/cloud/tests/integration/content.test.ts create mode 100644 packages/cloud/tests/integration/contentProperties.test.ts create mode 100644 packages/cloud/tests/integration/customContent.test.ts create mode 100644 packages/cloud/tests/integration/dataPolicies.test.ts create mode 100644 packages/cloud/tests/integration/database.test.ts create mode 100644 packages/cloud/tests/integration/descendants.test.ts create mode 100644 packages/cloud/tests/integration/folder.test.ts create mode 100644 packages/cloud/tests/integration/helpers/naming.ts create mode 100644 packages/cloud/tests/integration/helpers/poll.ts create mode 100644 packages/cloud/tests/integration/label.test.ts create mode 100644 packages/cloud/tests/integration/like.test.ts create mode 100644 packages/cloud/tests/integration/operation.test.ts create mode 100644 packages/cloud/tests/integration/page.test.ts create mode 100644 packages/cloud/tests/integration/redactions.test.ts create mode 100644 packages/cloud/tests/integration/setup/client.ts create mode 100644 packages/cloud/tests/integration/setup/env.ts create mode 100644 packages/cloud/tests/integration/setup/fixtures.ts create mode 100644 packages/cloud/tests/integration/setup/globalSetup.ts create mode 100644 packages/cloud/tests/integration/setup/resources.ts create mode 100644 packages/cloud/tests/integration/smartLink.test.ts create mode 100644 packages/cloud/tests/integration/space.test.ts create mode 100644 packages/cloud/tests/integration/spacePermissionTransition.test.ts create mode 100644 packages/cloud/tests/integration/spacePermissions.test.ts create mode 100644 packages/cloud/tests/integration/spaceProperties.test.ts create mode 100644 packages/cloud/tests/integration/spaceRoles.test.ts create mode 100644 packages/cloud/tests/integration/task.test.ts create mode 100644 packages/cloud/tests/integration/user.test.ts create mode 100644 packages/cloud/tests/integration/version.test.ts create mode 100644 packages/cloud/tests/integration/whiteboard.test.ts create mode 100644 packages/cloud/tests/tsconfig.json create mode 100644 packages/cloud/tsconfig.json create mode 100644 packages/cloud/vite.config.ts create mode 100644 packages/cloud/vitest.config.ts create mode 100644 packages/core/package.json create mode 100644 packages/core/src/apiError.ts create mode 100644 packages/core/src/apiObject.ts create mode 100644 packages/core/src/bodyToFetchBody.ts create mode 100644 packages/core/src/createClient.ts create mode 100644 packages/core/src/formData/attachmentInput.ts create mode 100644 packages/core/src/formData/bufferSchema.ts create mode 100644 packages/core/src/formData/index.ts create mode 100644 packages/core/src/formData/multipartRequest.ts create mode 100644 packages/core/src/index.ts create mode 100644 packages/core/src/interfaces/client.ts create mode 100644 packages/core/src/interfaces/index.ts create mode 100644 packages/core/src/oauth/buildAtlassianAuthUrl.ts create mode 100644 packages/core/src/oauth/index.ts create mode 100644 packages/core/src/oauth/obtainAtlassianOAuthTokens.ts create mode 100644 packages/core/src/oauth/parseAtlassianCallbackUrl.ts create mode 100644 packages/core/src/oauth/refreshAtlassianOAuthTokens.ts create mode 100644 packages/core/src/schemas/auth.ts create mode 100644 packages/core/src/schemas/clientConfig.ts create mode 100644 packages/core/src/schemas/httpMethod.ts create mode 100644 packages/core/src/schemas/index.ts create mode 100644 packages/core/src/schemas/sendRequestOptions.ts create mode 100644 packages/core/src/sendRequest.ts create mode 100644 packages/core/src/serializeSearchParams.ts create mode 100644 packages/core/src/withRetry.ts create mode 100644 packages/core/tsconfig.json create mode 100644 packages/core/vite.config.ts create mode 100644 packages/legacy/package.json rename {src => packages/legacy/src}/api/analytics.ts (85%) rename {src => packages/legacy/src}/api/audit.ts (97%) rename {src => packages/legacy/src}/api/content.ts (98%) rename {src => packages/legacy/src}/api/contentAttachments.ts (97%) rename {src => packages/legacy/src}/api/contentBody.ts (97%) rename {src => packages/legacy/src}/api/contentChildrenAndDescendants.ts (98%) rename {src => packages/legacy/src}/api/contentComments.ts (85%) rename {src => packages/legacy/src}/api/contentLabels.ts (96%) rename {src => packages/legacy/src}/api/contentMacroBody.ts (98%) rename {src => packages/legacy/src}/api/contentPermissions.ts (89%) rename {src => packages/legacy/src}/api/contentProperties.ts (97%) rename {src => packages/legacy/src}/api/contentRestrictions.ts (77%) rename {src => packages/legacy/src}/api/contentStates.ts (97%) rename {src => packages/legacy/src}/api/contentVersions.ts (95%) rename {src => packages/legacy/src}/api/contentWatches.ts (98%) rename {src => packages/legacy/src}/api/dynamicModules.ts (93%) create mode 100644 packages/legacy/src/api/experimental.ts rename {src => packages/legacy/src}/api/group.ts (62%) create mode 100644 packages/legacy/src/api/index.ts rename {src => packages/legacy/src}/api/inlineTasks.ts (94%) rename {src => packages/legacy/src}/api/labelInfo.ts (84%) rename {src => packages/legacy/src}/api/longRunningTask.ts (91%) rename {src => packages/legacy/src}/api/models/accountId.ts (100%) rename {src => packages/legacy/src}/api/models/accountIdEmailRecord.ts (100%) rename {src => packages/legacy/src}/api/models/accountIdEmailRecordArray.ts (94%) rename {src => packages/legacy/src}/api/models/addContentRestriction.ts (100%) rename {src => packages/legacy/src}/api/models/addContentRestrictionUpdateArray.ts (93%) rename {src => packages/legacy/src}/api/models/affectedObject.ts (100%) rename {src => packages/legacy/src}/api/models/appDescriptor.ts (98%) rename {src => packages/legacy/src}/api/models/asyncContentBody.ts (85%) rename {src => packages/legacy/src}/api/models/asyncId.ts (100%) rename {src => packages/legacy/src}/api/models/attachment.ts (85%) rename {src => packages/legacy/src}/api/models/attachmentContainer.ts (91%) rename {src => packages/legacy/src}/api/models/attachmentMetadata.ts (86%) rename {src => packages/legacy/src}/api/models/auditRecord.ts (78%) rename {src => packages/legacy/src}/api/models/auditRecordArray.ts (56%) rename {src => packages/legacy/src}/api/models/auditRecordCreate.ts (93%) rename {src => packages/legacy/src}/api/models/availableContentStates.ts (77%) rename {src => packages/legacy/src}/api/models/blueprintTemplate.ts (69%) rename {src => packages/legacy/src}/api/models/blueprintTemplateArray.ts (55%) rename {src => packages/legacy/src}/api/models/breadcrumb.ts (100%) rename {src => packages/legacy/src}/api/models/bulkUserLookup.ts (91%) rename {src => packages/legacy/src}/api/models/bulkUserLookupArray.ts (55%) rename {src => packages/legacy/src}/api/models/buttonLookAndFeel.ts (100%) rename {src => packages/legacy/src}/api/models/changedValue.ts (100%) rename {src => packages/legacy/src}/api/models/connectModules.ts (79%) rename {src => packages/legacy/src}/api/models/container.ts (100%) rename {src => packages/legacy/src}/api/models/containerLookAndFeel.ts (100%) rename {src => packages/legacy/src}/api/models/containerSummary.ts (100%) rename {src => packages/legacy/src}/api/models/content.ts (73%) rename {src => packages/legacy/src}/api/models/contentArray.ts (58%) rename {src => packages/legacy/src}/api/models/contentBlueprintDraft.ts (100%) rename {src => packages/legacy/src}/api/models/contentBody.ts (78%) rename {src => packages/legacy/src}/api/models/contentBodyCreate.ts (100%) rename {src => packages/legacy/src}/api/models/contentBodyCreateStorage.ts (100%) rename {src => packages/legacy/src}/api/models/contentChildType.ts (89%) rename {src => packages/legacy/src}/api/models/contentChildren.ts (67%) rename {src => packages/legacy/src}/api/models/contentCreate.ts (97%) rename {src => packages/legacy/src}/api/models/contentHistory.ts (66%) rename {src => packages/legacy/src}/api/models/contentLookAndFeel.ts (76%) rename {src => packages/legacy/src}/api/models/contentPermissionRequest.ts (92%) rename {src => packages/legacy/src}/api/models/contentProperty.ts (75%) rename {src => packages/legacy/src}/api/models/contentPropertyArray.ts (55%) rename {src => packages/legacy/src}/api/models/contentPropertyCreate.ts (67%) rename {src => packages/legacy/src}/api/models/contentPropertyCreateNoKey.ts (56%) rename {src => packages/legacy/src}/api/models/contentPropertyUpdate.ts (100%) rename {src => packages/legacy/src}/api/models/contentRestriction.ts (61%) rename {src => packages/legacy/src}/api/models/contentRestrictionArray.ts (69%) rename {src => packages/legacy/src}/api/models/contentRestrictionUpdate.ts (100%) rename {src => packages/legacy/src}/api/models/contentRestrictionUpdateArray.ts (90%) rename {src => packages/legacy/src}/api/models/contentState.ts (100%) rename {src => packages/legacy/src}/api/models/contentStateResponse.ts (78%) rename {src => packages/legacy/src}/api/models/contentStateRestInput.ts (100%) rename {src => packages/legacy/src}/api/models/contentStateSettings.ts (89%) rename {src => packages/legacy/src}/api/models/contentTemplate.ts (60%) rename {src => packages/legacy/src}/api/models/contentTemplateArray.ts (55%) rename {src => packages/legacy/src}/api/models/contentTemplateBodyCreate.ts (68%) rename {src => packages/legacy/src}/api/models/contentTemplateCreate.ts (92%) rename {src => packages/legacy/src}/api/models/contentTemplateUpdate.ts (86%) rename {src => packages/legacy/src}/api/models/contentUpdate.ts (95%) rename {src => packages/legacy/src}/api/models/copyPageHierarchyRequest.ts (97%) rename {src => packages/legacy/src}/api/models/copyPageHierarchyTitleOptions.ts (100%) rename {src => packages/legacy/src}/api/models/copyPageRequest.ts (91%) rename {src => packages/legacy/src}/api/models/copyPageRequestDestination.ts (100%) create mode 100644 packages/legacy/src/api/models/createdAttachment.ts rename {src => packages/legacy/src}/api/models/embeddable.ts (100%) rename {src => packages/legacy/src}/api/models/embeddedContent.ts (61%) rename {src => packages/legacy/src}/api/models/genericLinks.ts (100%) rename {src => packages/legacy/src}/api/models/getRestrictionsByOperation.ts (57%) rename {src => packages/legacy/src}/api/models/getViewers.ts (100%) rename {src => packages/legacy/src}/api/models/getViews.ts (100%) rename {src => packages/legacy/src}/api/models/group.ts (64%) rename {src => packages/legacy/src}/api/models/groupArray.ts (71%) rename {src => packages/legacy/src}/api/models/groupArrayWithLinks.ts (79%) rename {src => packages/legacy/src}/api/models/groupCreate.ts (100%) rename {src => packages/legacy/src}/api/models/groupName.ts (100%) rename {src => packages/legacy/src}/api/models/headerLookAndFeel.ts (80%) rename {src => packages/legacy/src}/api/models/horizontalHeaderLookAndFeel.ts (81%) rename {src => packages/legacy/src}/api/models/icon.ts (100%) create mode 100644 packages/legacy/src/api/models/index.ts rename {src => packages/legacy/src}/api/models/label.ts (100%) rename {src => packages/legacy/src}/api/models/labelArray.ts (56%) rename {src => packages/legacy/src}/api/models/labelCreate.ts (100%) create mode 100644 packages/legacy/src/api/models/labelCreateArray.ts rename {src => packages/legacy/src}/api/models/labelDetails.ts (73%) rename {src => packages/legacy/src}/api/models/labeledContent.ts (67%) rename {src => packages/legacy/src}/api/models/labeledContentPageResponse.ts (68%) rename {src => packages/legacy/src}/api/models/labeledContentType.ts (100%) rename {src => packages/legacy/src}/api/models/lifecycle.ts (100%) rename {src => packages/legacy/src}/api/models/longTask.ts (100%) rename {src => packages/legacy/src}/api/models/longTaskStatus.ts (96%) rename {src => packages/legacy/src}/api/models/longTaskStatusArray.ts (55%) rename {src => packages/legacy/src}/api/models/longTaskStatusWithLinks.ts (78%) rename {src => packages/legacy/src}/api/models/lookAndFeel.ts (64%) rename {src => packages/legacy/src}/api/models/lookAndFeelSelection.ts (100%) rename {src => packages/legacy/src}/api/models/lookAndFeelSettings.ts (71%) rename {src => packages/legacy/src}/api/models/macroInstance.ts (67%) rename {src => packages/legacy/src}/api/models/menusLookAndFeel.ts (100%) rename {src => packages/legacy/src}/api/models/message.ts (100%) rename {src => packages/legacy/src}/api/models/migratedUser.ts (100%) rename {src => packages/legacy/src}/api/models/migratedUserArray.ts (56%) rename {src => packages/legacy/src}/api/models/movePage.ts (100%) rename {src => packages/legacy/src}/api/models/navigationLookAndFeel.ts (100%) rename {src => packages/legacy/src}/api/models/operationCheckResult.ts (100%) rename {src => packages/legacy/src}/api/models/permissionCheckResponse.ts (93%) rename {src => packages/legacy/src}/api/models/permissionSubject.ts (100%) rename {src => packages/legacy/src}/api/models/permissionSubjectWithGroupId.ts (100%) rename {src => packages/legacy/src}/api/models/propertyValue.ts (100%) rename {src => packages/legacy/src}/api/models/relation.ts (66%) rename {src => packages/legacy/src}/api/models/relationArray.ts (56%) rename {src => packages/legacy/src}/api/models/relationData.ts (74%) rename {src => packages/legacy/src}/api/models/retentionPeriod.ts (100%) rename {src => packages/legacy/src}/api/models/screenLookAndFeel.ts (100%) rename {src => packages/legacy/src}/api/models/searchFieldLookAndFeel.ts (100%) rename {src => packages/legacy/src}/api/models/searchPageResponseSearchResult.ts (66%) rename {src => packages/legacy/src}/api/models/searchResult.ts (67%) rename {src => packages/legacy/src}/api/models/space.ts (63%) rename {src => packages/legacy/src}/api/models/spaceArray.ts (56%) rename {src => packages/legacy/src}/api/models/spaceCreate.ts (94%) rename {src => packages/legacy/src}/api/models/spaceDescription.ts (100%) rename {src => packages/legacy/src}/api/models/spaceDescriptionCreate.ts (100%) rename {src => packages/legacy/src}/api/models/spacePermission.ts (92%) rename {src => packages/legacy/src}/api/models/spacePermissionCreate.ts (91%) rename {src => packages/legacy/src}/api/models/spacePermissionCustomContent.ts (87%) rename {src => packages/legacy/src}/api/models/spacePermissionRequest.ts (90%) rename {src => packages/legacy/src}/api/models/spacePermissionV2.ts (85%) rename {src => packages/legacy/src}/api/models/spacePrivateCreate.ts (98%) rename {src => packages/legacy/src}/api/models/spaceProperty.ts (86%) rename {src => packages/legacy/src}/api/models/spacePropertyArray.ts (56%) rename {src => packages/legacy/src}/api/models/spacePropertyCreate.ts (76%) rename {src => packages/legacy/src}/api/models/spacePropertyCreateNoKey.ts (55%) rename {src => packages/legacy/src}/api/models/spacePropertyUpdate.ts (100%) rename {src => packages/legacy/src}/api/models/spaceSettings.ts (89%) rename {src => packages/legacy/src}/api/models/spaceSettingsUpdate.ts (100%) rename {src => packages/legacy/src}/api/models/spaceUpdate.ts (97%) rename {src => packages/legacy/src}/api/models/spaceWatch.ts (66%) rename {src => packages/legacy/src}/api/models/spaceWatchArray.ts (56%) rename {src => packages/legacy/src}/api/models/spaceWatchUser.ts (96%) rename {src => packages/legacy/src}/api/models/superBatchWebResources.ts (100%) rename {src => packages/legacy/src}/api/models/systemInfoEntity.ts (100%) rename {src => packages/legacy/src}/api/models/task.ts (100%) rename {src => packages/legacy/src}/api/models/taskPageResponse.ts (73%) rename {src => packages/legacy/src}/api/models/taskStatusUpdate.ts (100%) rename {src => packages/legacy/src}/api/models/theme.ts (71%) rename {src => packages/legacy/src}/api/models/themeArray.ts (54%) rename {src => packages/legacy/src}/api/models/themeNoLinks.ts (80%) rename {src => packages/legacy/src}/api/models/themeUpdate.ts (100%) rename {src => packages/legacy/src}/api/models/topNavigationLookAndFeel.ts (100%) rename {src => packages/legacy/src}/api/models/user.ts (91%) rename {src => packages/legacy/src}/api/models/userAnonymous.ts (72%) rename {src => packages/legacy/src}/api/models/userArray.ts (72%) rename {src => packages/legacy/src}/api/models/userProperty.ts (88%) rename {src => packages/legacy/src}/api/models/userPropertyCreate.ts (100%) rename {src => packages/legacy/src}/api/models/userPropertyKeyArray.ts (74%) rename {src => packages/legacy/src}/api/models/userPropertyUpdate.ts (100%) rename {src => packages/legacy/src}/api/models/userWatch.ts (100%) rename {src => packages/legacy/src}/api/models/usersUserKeys.ts (51%) rename {src => packages/legacy/src}/api/models/version.ts (59%) rename {src => packages/legacy/src}/api/models/versionArray.ts (56%) rename {src => packages/legacy/src}/api/models/versionRestore.ts (100%) rename {src => packages/legacy/src}/api/models/watch.ts (63%) rename {src => packages/legacy/src}/api/models/watchArray.ts (56%) rename {src => packages/legacy/src}/api/models/watchUser.ts (95%) rename {src => packages/legacy/src}/api/models/webResourceDependencies.ts (96%) rename {src => packages/legacy/src}/api/parameters/addContentWatcher.ts (100%) rename {src => packages/legacy/src}/api/parameters/addCustomContentPermissions.ts (70%) rename {src => packages/legacy/src}/api/parameters/addGroupToContentRestrictionByGroupId.ts (100%) rename {src => packages/legacy/src}/api/parameters/addLabelWatcher.ts (100%) rename {src => packages/legacy/src}/api/parameters/addLabelsToContent.ts (92%) rename {src => packages/legacy/src}/api/parameters/addLabelsToSpace.ts (100%) rename {src => packages/legacy/src}/api/parameters/addPermissionToSpace.ts (70%) rename {src => packages/legacy/src}/api/parameters/addRestrictions.ts (98%) rename {src => packages/legacy/src}/api/parameters/addSpaceWatcher.ts (100%) rename {src => packages/legacy/src}/api/parameters/addUserToContentRestriction.ts (100%) rename {src => packages/legacy/src}/api/parameters/addUserToGroup.ts (70%) rename {src => packages/legacy/src}/api/parameters/addUserToGroupByGroupId.ts (72%) rename {src => packages/legacy/src}/api/parameters/archivePages.ts (100%) rename {src => packages/legacy/src}/api/parameters/asyncConvertContentBodyRequest.ts (98%) rename {src => packages/legacy/src}/api/parameters/asyncConvertContentBodyResponse.ts (100%) rename {src => packages/legacy/src}/api/parameters/bulkAsyncConvertContentBodyRequest.ts (98%) rename {src => packages/legacy/src}/api/parameters/bulkAsyncConvertContentBodyResponse.ts (100%) rename {src => packages/legacy/src}/api/parameters/checkContentPermission.ts (69%) rename {src => packages/legacy/src}/api/parameters/convertContentBody.ts (95%) rename {src => packages/legacy/src}/api/parameters/copyPage.ts (68%) rename {src => packages/legacy/src}/api/parameters/copyPageHierarchy.ts (56%) rename {src => packages/legacy/src}/api/parameters/createAttachments.ts (88%) rename {src => packages/legacy/src}/api/parameters/createAuditRecord.ts (51%) rename {src => packages/legacy/src}/api/parameters/createContent.ts (90%) rename {src => packages/legacy/src}/api/parameters/createContentProperty.ts (68%) rename {src => packages/legacy/src}/api/parameters/createContentPropertyForKey.ts (75%) rename {src => packages/legacy/src}/api/parameters/createContentTemplate.ts (52%) create mode 100644 packages/legacy/src/api/parameters/createGroup.ts rename {src => packages/legacy/src}/api/parameters/createOrUpdateAttachments.ts (85%) rename {src => packages/legacy/src}/api/parameters/createPrivateSpace.ts (51%) rename {src => packages/legacy/src}/api/parameters/createRelationship.ts (100%) create mode 100644 packages/legacy/src/api/parameters/createSpace.ts rename {src => packages/legacy/src}/api/parameters/createSpaceProperty.ts (71%) rename {src => packages/legacy/src}/api/parameters/createSpacePropertyForKey.ts (77%) rename {src => packages/legacy/src}/api/parameters/createUserProperty.ts (83%) rename {src => packages/legacy/src}/api/parameters/deleteContent.ts (100%) rename {src => packages/legacy/src}/api/parameters/deleteContentProperty.ts (100%) rename {src => packages/legacy/src}/api/parameters/deleteContentVersion.ts (100%) rename {src => packages/legacy/src}/api/parameters/deleteGroupById.ts (100%) rename {src => packages/legacy/src}/api/parameters/deleteLabelFromSpace.ts (100%) rename {src => packages/legacy/src}/api/parameters/deletePageTree.ts (100%) rename {src => packages/legacy/src}/api/parameters/deleteRelationship.ts (100%) rename {src => packages/legacy/src}/api/parameters/deleteRestrictions.ts (100%) rename {src => packages/legacy/src}/api/parameters/deleteSpace.ts (100%) rename {src => packages/legacy/src}/api/parameters/deleteSpaceProperty.ts (100%) rename {src => packages/legacy/src}/api/parameters/deleteUserProperty.ts (100%) rename {src => packages/legacy/src}/api/parameters/downloadAttachment.ts (100%) rename {src => packages/legacy/src}/api/parameters/exportAuditRecords.ts (100%) rename {src => packages/legacy/src}/api/parameters/findSourcesForTarget.ts (100%) rename {src => packages/legacy/src}/api/parameters/findTargetFromSource.ts (100%) rename {src => packages/legacy/src}/api/parameters/getAllLabelContent.ts (100%) rename {src => packages/legacy/src}/api/parameters/getAndAsyncConvertMacroBodyByMacroId.ts (100%) rename {src => packages/legacy/src}/api/parameters/getAndConvertMacroBodyByMacroId.ts (100%) rename {src => packages/legacy/src}/api/parameters/getAnonymousUser.ts (100%) rename {src => packages/legacy/src}/api/parameters/getAttachments.ts (96%) rename {src => packages/legacy/src}/api/parameters/getAuditRecords.ts (100%) rename {src => packages/legacy/src}/api/parameters/getAuditRecordsForTimePeriod.ts (100%) rename {src => packages/legacy/src}/api/parameters/getAvailableContentStates.ts (100%) rename {src => packages/legacy/src}/api/parameters/getBlueprintTemplates.ts (100%) rename {src => packages/legacy/src}/api/parameters/getBulkUserLookup.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContent.ts (97%) rename {src => packages/legacy/src}/api/parameters/getContentById.ts (97%) rename {src => packages/legacy/src}/api/parameters/getContentByTypeForSpace.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentChildren.ts (93%) rename {src => packages/legacy/src}/api/parameters/getContentChildrenByType.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentComments.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentDescendants.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentForSpace.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentProperties.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentProperty.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentRestrictionStatusForUser.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentState.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentStateSettings.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentTemplate.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentTemplates.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentVersion.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentVersions.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentWatchStatus.ts (100%) rename {src => packages/legacy/src}/api/parameters/getContentsWithState.ts (100%) rename {src => packages/legacy/src}/api/parameters/getCurrentUser.ts (100%) rename {src => packages/legacy/src}/api/parameters/getDescendantsOfType.ts (96%) rename {src => packages/legacy/src}/api/parameters/getGroupByGroupId.ts (100%) rename {src => packages/legacy/src}/api/parameters/getGroupMembersByGroupId.ts (100%) create mode 100644 packages/legacy/src/api/parameters/getGroupMembershipsForUser.ts rename {src => packages/legacy/src}/api/parameters/getGroups.ts (100%) rename {src => packages/legacy/src}/api/parameters/getHistoryForContent.ts (100%) rename {src => packages/legacy/src}/api/parameters/getIndividualGroupRestrictionStatusByGroupId.ts (100%) rename {src => packages/legacy/src}/api/parameters/getLabelsForContent.ts (100%) rename {src => packages/legacy/src}/api/parameters/getLabelsForSpace.ts (100%) rename {src => packages/legacy/src}/api/parameters/getLookAndFeelSettings.ts (100%) rename {src => packages/legacy/src}/api/parameters/getMacroBodyByMacroId.ts (100%) rename {src => packages/legacy/src}/api/parameters/getPrivacyUnsafeUserEmail.ts (100%) rename {src => packages/legacy/src}/api/parameters/getPrivacyUnsafeUserEmailBulk.ts (100%) rename {src => packages/legacy/src}/api/parameters/getRelationship.ts (100%) rename {src => packages/legacy/src}/api/parameters/getRestrictions.ts (100%) rename {src => packages/legacy/src}/api/parameters/getRestrictionsByOperation.ts (100%) rename {src => packages/legacy/src}/api/parameters/getRestrictionsForOperation.ts (100%) rename {src => packages/legacy/src}/api/parameters/getSpace.ts (100%) rename {src => packages/legacy/src}/api/parameters/getSpaceContentStates.ts (100%) rename {src => packages/legacy/src}/api/parameters/getSpaceProperties.ts (100%) rename {src => packages/legacy/src}/api/parameters/getSpaceProperty.ts (100%) rename {src => packages/legacy/src}/api/parameters/getSpaceSettings.ts (100%) rename {src => packages/legacy/src}/api/parameters/getSpaceTheme.ts (100%) rename {src => packages/legacy/src}/api/parameters/getSpaces.ts (100%) rename {src => packages/legacy/src}/api/parameters/getTask.ts (100%) rename {src => packages/legacy/src}/api/parameters/getTaskById.ts (100%) rename {src => packages/legacy/src}/api/parameters/getTasks.ts (100%) rename {src => packages/legacy/src}/api/parameters/getTheme.ts (100%) rename {src => packages/legacy/src}/api/parameters/getThemes.ts (100%) rename {src => packages/legacy/src}/api/parameters/getUser.ts (69%) rename {src => packages/legacy/src}/api/parameters/getUserProperties.ts (100%) rename {src => packages/legacy/src}/api/parameters/getUserProperty.ts (100%) rename {src => packages/legacy/src}/api/parameters/getViewers.ts (100%) rename {src => packages/legacy/src}/api/parameters/getViews.ts (100%) rename {src => packages/legacy/src}/api/parameters/getWatchersForSpace.ts (100%) rename {src => packages/legacy/src}/api/parameters/getWatchesForPage.ts (100%) rename {src => packages/legacy/src}/api/parameters/getWatchesForSpace.ts (100%) create mode 100644 packages/legacy/src/api/parameters/index.ts rename {src => packages/legacy/src}/api/parameters/isWatchingLabel.ts (100%) rename {src => packages/legacy/src}/api/parameters/isWatchingSpace.ts (100%) rename {src => packages/legacy/src}/api/parameters/movePage.ts (100%) rename {src => packages/legacy/src}/api/parameters/publishLegacyDraft.ts (89%) rename {src => packages/legacy/src}/api/parameters/publishSharedDraft.ts (89%) create mode 100644 packages/legacy/src/api/parameters/registerModules.ts rename {src => packages/legacy/src}/api/parameters/removeContentState.ts (100%) rename {src => packages/legacy/src}/api/parameters/removeContentWatcher.ts (100%) rename {src => packages/legacy/src}/api/parameters/removeGroupById.ts (100%) rename {src => packages/legacy/src}/api/parameters/removeLabelFromContent.ts (100%) rename {src => packages/legacy/src}/api/parameters/removeLabelFromContentUsingQueryParameter.ts (100%) rename {src => packages/legacy/src}/api/parameters/removeLabelWatcher.ts (100%) rename {src => packages/legacy/src}/api/parameters/removeMemberFromGroup.ts (100%) rename {src => packages/legacy/src}/api/parameters/removeMemberFromGroupByGroupId.ts (100%) rename {src => packages/legacy/src}/api/parameters/removeModules.ts (100%) rename {src => packages/legacy/src}/api/parameters/removePermission.ts (100%) rename {src => packages/legacy/src}/api/parameters/removeSpaceWatch.ts (100%) rename {src => packages/legacy/src}/api/parameters/removeTemplate.ts (100%) rename {src => packages/legacy/src}/api/parameters/removeUserFromContentRestriction.ts (100%) rename {src => packages/legacy/src}/api/parameters/resetLookAndFeelSettings.ts (100%) rename {src => packages/legacy/src}/api/parameters/resetSpaceTheme.ts (100%) rename {src => packages/legacy/src}/api/parameters/restoreContentVersion.ts (88%) rename {src => packages/legacy/src}/api/parameters/searchByCQL.ts (100%) rename {src => packages/legacy/src}/api/parameters/searchContentByCQL.ts (100%) rename {src => packages/legacy/src}/api/parameters/searchGroups.ts (100%) rename {src => packages/legacy/src}/api/parameters/searchTasks.ts (100%) rename {src => packages/legacy/src}/api/parameters/searchUser.ts (100%) rename {src => packages/legacy/src}/api/parameters/setContentState.ts (86%) rename {src => packages/legacy/src}/api/parameters/setRetentionPeriod.ts (52%) rename {src => packages/legacy/src}/api/parameters/setSpaceTheme.ts (69%) rename {src => packages/legacy/src}/api/parameters/updateAttachmentData.ts (69%) rename {src => packages/legacy/src}/api/parameters/updateAttachmentProperties.ts (98%) rename {src => packages/legacy/src}/api/parameters/updateContent.ts (93%) rename {src => packages/legacy/src}/api/parameters/updateContentProperty.ts (75%) rename {src => packages/legacy/src}/api/parameters/updateContentTemplate.ts (66%) rename {src => packages/legacy/src}/api/parameters/updateLookAndFeel.ts (51%) rename {src => packages/legacy/src}/api/parameters/updateLookAndFeelSettings.ts (82%) rename {src => packages/legacy/src}/api/parameters/updateRestrictions.ts (89%) rename {src => packages/legacy/src}/api/parameters/updateSpace.ts (67%) rename {src => packages/legacy/src}/api/parameters/updateSpaceProperty.ts (76%) rename {src => packages/legacy/src}/api/parameters/updateSpaceSettings.ts (70%) rename {src => packages/legacy/src}/api/parameters/updateTaskById.ts (69%) rename {src => packages/legacy/src}/api/parameters/updateUserProperty.ts (83%) rename {src => packages/legacy/src}/api/relation.ts (97%) rename {src => packages/legacy/src}/api/search.ts (94%) rename {src => packages/legacy/src}/api/settings.ts (82%) rename {src => packages/legacy/src}/api/space.ts (97%) rename {src => packages/legacy/src}/api/spacePermissions.ts (94%) rename {src => packages/legacy/src}/api/spaceProperties.ts (96%) rename {src => packages/legacy/src}/api/spaceSettings.ts (89%) rename {src => packages/legacy/src}/api/template.ts (97%) rename {src => packages/legacy/src}/api/themes.ts (95%) rename {src => packages/legacy/src}/api/userProperties.ts (97%) rename {src => packages/legacy/src}/api/users.ts (83%) rename {src => packages/legacy/src}/callback.ts (100%) rename {src => packages/legacy/src}/clients/baseClient.ts (93%) rename {src => packages/legacy/src}/clients/client.ts (64%) rename {src => packages/legacy/src}/clients/confluenceClient.ts (95%) create mode 100644 packages/legacy/src/clients/index.ts rename {src => packages/legacy/src}/config.ts (99%) create mode 100644 packages/legacy/src/index.ts rename {src => packages/legacy/src}/interfaces/extractBaseType.ts (100%) create mode 100644 packages/legacy/src/interfaces/index.ts rename {src => packages/legacy/src}/interfaces/oneOrMany.ts (100%) rename {src => packages/legacy/src}/pagination.ts (100%) rename {src => packages/legacy/src}/paramSerializer.ts (100%) rename {src => packages/legacy/src}/requestConfig.ts (100%) rename {src => packages/legacy/src}/services/authenticationService/authenticationService.ts (88%) rename {src => packages/legacy/src}/services/authenticationService/authentications/createBasicAuthenticationToken.ts (64%) rename {src => packages/legacy/src}/services/authenticationService/authentications/createJWTAuthentication.ts (92%) rename {src => packages/legacy/src}/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts (71%) create mode 100644 packages/legacy/src/services/authenticationService/authentications/index.ts rename {src => packages/legacy/src}/services/authenticationService/base64Encoder.ts (100%) create mode 100644 packages/legacy/src/services/authenticationService/index.ts create mode 100644 packages/legacy/src/services/index.ts rename {tests => packages/legacy/tests}/integration/e2e.test.ts (98%) create mode 100644 packages/legacy/tests/tsconfig.json rename {tests => packages/legacy/tests}/unit/api/contentBody.test.ts (97%) rename {tests => packages/legacy/tests}/unit/api/contentChildrenAndDescendants.test.ts (89%) rename {tests => packages/legacy/tests}/unit/api/group.test.ts (68%) rename {tests => packages/legacy/tests}/unit/clients/baseClient.test.ts (89%) rename {tests => packages/legacy/tests}/unit/clients/confluenceClient.test.ts (92%) rename {tests => packages/legacy/tests}/unit/index.test.ts (94%) create mode 100644 packages/legacy/tsconfig.json create mode 100644 packages/legacy/vite.config.ts create mode 100644 packages/legacy/vitest.config.ts delete mode 100644 rollup.config.ts delete mode 100644 src/api/experimental.ts delete mode 100644 src/api/index.ts delete mode 100644 src/api/models/createdAttachment.ts delete mode 100644 src/api/models/index.ts delete mode 100644 src/api/models/labelCreateArray.ts delete mode 100644 src/api/parameters/addGroupToContentRestriction.ts delete mode 100644 src/api/parameters/createGroup.ts delete mode 100644 src/api/parameters/createSpace.ts delete mode 100644 src/api/parameters/getBulkUserMigration.ts delete mode 100644 src/api/parameters/getContentRestrictionStatusForGroup.ts delete mode 100644 src/api/parameters/getGroupByName.ts delete mode 100644 src/api/parameters/getGroupByQueryParam.ts delete mode 100644 src/api/parameters/getGroupMembers.ts delete mode 100644 src/api/parameters/getGroupMembershipsForUser.ts delete mode 100644 src/api/parameters/getMembersByQueryParam.ts delete mode 100644 src/api/parameters/index.ts delete mode 100644 src/api/parameters/registerModules.ts delete mode 100644 src/api/parameters/removeGroup.ts delete mode 100644 src/api/parameters/removeGroupByName.ts delete mode 100644 src/api/parameters/setLookAndFeelSettings.ts delete mode 100644 src/clients/index.ts delete mode 100644 src/index.ts delete mode 100644 src/interfaces/index.ts delete mode 100644 src/services/authenticationService/authentications/index.ts delete mode 100644 src/services/authenticationService/index.ts delete mode 100644 src/services/index.ts delete mode 100644 tests/tsconfig.json create mode 100644 tsconfig.base.json delete mode 100644 vitest.config.mts create mode 100644 vitest.config.ts create mode 100644 vitestShared.ts diff --git a/.changeset/README.md b/.changeset/README.md new file mode 100644 index 00000000..ea4c70d4 --- /dev/null +++ b/.changeset/README.md @@ -0,0 +1,26 @@ +# Changesets + +This directory is used by [@changesets/cli](https://github.com/changesets/changesets) to manage versioning and changelog entries for confluence.js. + +## Workflow + +1. **Make changes** — implement your feature or fix +2. **Add a changeset** — `pnpm changeset` (interactive prompt) +3. **Commit** — include the generated `.md` file in your commit +4. **Release** — maintainers run `pnpm changeset:version` to bump versions, then publish + +## Changeset types + +| Type | When | +|------|------| +| `major` | Breaking changes | +| `minor` | Additive changes (new endpoints, new exports) | +| `patch` | Bug fixes, internal improvements, declaration fixes | + +## Rules + +- Every PR that affects public API **must** include a changeset +- PRs that only affect tests, docs, or CI may omit a changeset +- Breaking changes require a `major` changeset with migration guidance + +> Note: most `packages/cloud-v1/src/api`, `models`, `parameters` code is generated upstream by `apis-code-gen`. Changesets still track the published impact of regenerated output. diff --git a/.changeset/config.json b/.changeset/config.json new file mode 100644 index 00000000..8e6693cd --- /dev/null +++ b/.changeset/config.json @@ -0,0 +1,11 @@ +{ + "$schema": "https://unpkg.com/@changesets/config/schema.json", + "changelog": "@changesets/cli/changelog", + "commit": false, + "fixed": [], + "linked": [], + "access": "public", + "baseBranch": "master", + "updateInternalDependencies": "patch", + "ignore": [] +} diff --git a/.github/workflows/changeset-check.yml b/.github/workflows/changeset-check.yml new file mode 100644 index 00000000..f206cf81 --- /dev/null +++ b/.github/workflows/changeset-check.yml @@ -0,0 +1,65 @@ +name: 📦 Changeset Check + +on: + pull_request: + branches: + - master + - develop + +jobs: + changeset-check: + name: 📦 Changeset Required + runs-on: ubuntu-latest + permissions: + contents: read + steps: + - name: 🔄 Checkout sources + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: ⚙️ Use Node.js 22.x + uses: actions/setup-node@v4 + with: + node-version: 22.x + + - name: 📦 Install pnpm + uses: pnpm/action-setup@v4 + + - name: 📌 Install dependencies + run: pnpm install --frozen-lockfile + + - name: 📦 Check for changeset + run: | + # Get list of changed files in this PR vs base branch + CHANGED=$(git diff --name-only origin/${{ github.base_ref }}...HEAD) + echo "Changed files:" + echo "$CHANGED" + + # Check if any package source files changed + SRC_CHANGED=$(echo "$CHANGED" | grep -E '^packages/[^/]+/src/' || true) + + if [ -z "$SRC_CHANGED" ]; then + echo "✅ No package source files changed — changeset not required" + exit 0 + fi + + echo "Source files changed:" + echo "$SRC_CHANGED" + + # Check if any .md changeset files exist (excluding README.md) + CHANGESETS=$(ls .changeset/*.md 2>/dev/null | grep -v README.md || true) + + if [ -z "$CHANGESETS" ]; then + echo "" + echo "❌ Package source files changed but no changeset found." + echo "" + echo " Run: pnpm changeset" + echo " This creates a changeset file describing the impact of your changes." + echo " See .changeset/README.md for guidance." + echo "" + exit 1 + fi + + echo "✅ Changeset found:" + echo "$CHANGESETS" diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index e4e77615..1d0b1a73 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -3,22 +3,19 @@ name: 🛠️ CI on: push: branches: - - '**' # Runs on all branch pushes + - '**' tags-ignore: - - '**' # Ignore all tag pushes + - '**' repository_dispatch: types: [ pr-approved ] -env: - PNPM_VERSION: '10' - jobs: build: name: 🏗️ Build runs-on: ubuntu-latest strategy: matrix: - node-version: [20.x, 22.x] + node-version: [22.x, 24.x] steps: - name: 🔄 Checkout sources uses: actions/checkout@v4 @@ -28,45 +25,18 @@ jobs: node-version: ${{ matrix.node-version }} - name: 📦 Install pnpm uses: pnpm/action-setup@v4 - with: - version: ${{ env.PNPM_VERSION }} - name: 📌 Installing dependencies run: pnpm install --frozen-lockfile - name: 🛠️ Building sources run: pnpm run build - lint: - name: 🔍 Lint Code - needs: build - runs-on: ubuntu-latest - strategy: - matrix: - node-version: [20.x, 22.x] - steps: - - name: 🔄 Checkout sources - uses: actions/checkout@v4 - - name: ⚙️ Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v4 - with: - node-version: ${{ matrix.node-version }} - - name: 📦 Install pnpm - uses: pnpm/action-setup@v4 - with: - version: ${{ env.PNPM_VERSION }} - - name: 📌 Installing dependencies - run: pnpm install --frozen-lockfile - - name: ✨ Linting - run: pnpm run lint - env: - CI: true - - test_unit: + test: name: 🧪 Unit Tests needs: build runs-on: ubuntu-latest strategy: matrix: - node-version: [20.x, 22.x] + node-version: [22.x, 24.x] steps: - name: 🔄 Checkout sources uses: actions/checkout@v4 @@ -76,23 +46,21 @@ jobs: node-version: ${{ matrix.node-version }} - name: 📦 Install pnpm uses: pnpm/action-setup@v4 - with: - version: ${{ env.PNPM_VERSION }} - - name: 📌 Installing dependencies + - name: 📌 Install dependencies run: pnpm install --frozen-lockfile - - name: 🚀 Running unit tests + - name: 🏗️ Build packages + run: pnpm run build + - name: 🧪 Unit tests run: pnpm run test:unit test_integration: name: 🧩 Integration Tests - needs: - - lint - - test_unit + needs: test runs-on: ubuntu-latest strategy: max-parallel: 1 matrix: - node-version: [20.x, 22.x] + node-version: [22.x, 24.x] steps: - name: 🔄 Checkout sources uses: actions/checkout@v4 @@ -102,9 +70,7 @@ jobs: node-version: ${{ matrix.node-version }} - name: 📦 Install pnpm uses: pnpm/action-setup@v4 - with: - version: ${{ env.PNPM_VERSION }} - - name: 📌 Installing dependencies + - name: 📌 Install dependencies run: pnpm install --frozen-lockfile - name: 📝 Creating `.env` file run: | diff --git a/.github/workflows/publish-dev.yml b/.github/workflows/publish-dev.yml index fb3dce89..cc84bf55 100644 --- a/.github/workflows/publish-dev.yml +++ b/.github/workflows/publish-dev.yml @@ -4,11 +4,11 @@ on: workflow_dispatch env: - NODE_VERSION: '20.x' - PNPM_VERSION: '10' + NODE_VERSION: '22.x' permissions: contents: read + id-token: write jobs: build-and-publish: @@ -26,8 +26,6 @@ jobs: - name: 📦 Install pnpm uses: pnpm/action-setup@v4 - with: - version: ${{ env.PNPM_VERSION }} - name: 📌 Install dependencies run: pnpm install --frozen-lockfile @@ -35,20 +33,10 @@ jobs: - name: 🛠️ Run build run: pnpm run build - - name: 🔖 Update package version - id: update-version - run: | - CURRENT_VERSION=$(node -p "require('./package.json').version") - TIMESTAMP=$(date -u +"%Y%m%d%H%M%S") - NEW_VERSION="${CURRENT_VERSION}-dev${TIMESTAMP}" - pnpm version --no-git-tag-version $NEW_VERSION - echo "New version: $NEW_VERSION" - echo "NEW_VERSION=$NEW_VERSION" >> $GITHUB_ENV - - - name: 🔄 Update package-lock.json - run: pnpm install - - - name: 📤 Publish to NPM Dev Channel - run: pnpm publish --tag dev --no-git-checks + - name: 🔖 Snapshot version + run: pnpm changeset version --snapshot dev + + - name: 📤 Publish dev snapshot to NPM + run: pnpm publish -r --tag dev --no-git-checks --provenance env: NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml deleted file mode 100644 index 751d0158..00000000 --- a/.github/workflows/publish.yml +++ /dev/null @@ -1,153 +0,0 @@ -name: 🚀 Publish to NPM - -on: - push: - tags: - - 'v*.*.*' - -env: - NODE_VERSION: '20.x' - PNPM_VERSION: '10' - -permissions: - contents: read - -jobs: - build-and-test: - name: 🏗️ Build and Test - runs-on: ubuntu-latest - steps: - - name: 🔄 Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: ⚙️ Setup Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - - - name: 📦 Install pnpm - uses: pnpm/action-setup@v4 - with: - version: ${{ env.PNPM_VERSION }} - - - name: 📌 Install dependencies - run: pnpm install --frozen-lockfile - - - name: 🛠️ Run build - run: pnpm run build - - - name: 🔍 Run lint - run: pnpm run lint - env: - CI: true - - - name: 🧪 Run unit tests - run: pnpm run test:unit - - - name: 🧩 Run integration tests - run: pnpm run test:integration - env: - HOST: ${{ secrets.HOST }} - EMAIL: ${{ secrets.EMAIL }} - API_TOKEN: ${{ secrets.API_TOKEN }} - - publish-package: - name: 🚀 Publish Package - needs: build-and-test - runs-on: ubuntu-latest - permissions: - contents: write - outputs: - version: ${{ steps.version.outputs.version }} - steps: - - name: 🔄 Checkout repository - uses: actions/checkout@v4 - with: - fetch-depth: 0 - - - name: ⚙️ Setup Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - registry-url: 'https://registry.npmjs.org' - - - name: 📦 Install pnpm - uses: pnpm/action-setup@v4 - with: - version: ${{ env.PNPM_VERSION }} - - - name: 🔖 Get and validate version - id: version - run: | - if [[ $GITHUB_REF == refs/tags/v* ]]; then - TAG_VERSION=${GITHUB_REF#refs/tags/v} - echo "Using version from tag: $TAG_VERSION" - CURRENT_VERSION=$(node -p "require('./package.json').version") - - if [ "$TAG_VERSION" != "$CURRENT_VERSION" ]; then - echo "Updating package version to match tag..." - npm version $TAG_VERSION --no-git-tag-version - pnpm install - git config user.name "GitHub Actions" - git config user.email "actions@github.com" - git add package.json pnpm-lock.yaml - git commit -m "Update version to $TAG_VERSION [skip ci]" - git push - fi - else - TAG_VERSION=$(node -p "require('./package.json').version") - echo "Using version from package.json: $TAG_VERSION" - fi - - echo "version=$TAG_VERSION" >> $GITHUB_OUTPUT - echo "VERSION=$TAG_VERSION" >> $GITHUB_ENV - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - - - name: 📌 Install dependencies - run: pnpm install --frozen-lockfile - - - name: 🛠️ Build package - run: pnpm run build - - - name: 📤 Publish to NPM - run: pnpm publish --no-git-checks - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - deploy-documentation: - name: 📚 Deploy Documentation - needs: publish-package - runs-on: ubuntu-latest - steps: - - name: 🔄 Checkout repository - uses: actions/checkout@v4 - with: - ref: master - - - name: ⚙️ Setup Node.js ${{ env.NODE_VERSION }} - uses: actions/setup-node@v4 - with: - node-version: ${{ env.NODE_VERSION }} - - - name: 📦 Install pnpm - uses: pnpm/action-setup@v4 - with: - version: ${{ env.PNPM_VERSION }} - - - name: 📌 Install dependencies - run: pnpm install --frozen-lockfile - - - name: 📝 Generate documentation - run: pnpm run doc - - - name: 🚀 Deploy to docs branch - uses: JamesIves/github-pages-deploy-action@v4 - with: - branch: docs - folder: docs - clean: true - token: '${{ secrets.PAT }}' - commit-message: "docs: Update documentation for v${{ needs.publish-package.outputs.version }} [skip ci]" diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 00000000..8f095819 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,57 @@ +name: 🚀 Release + +on: + push: + branches: + - master + +concurrency: ${{ github.workflow }}-${{ github.ref }} + +jobs: + release: + name: 🚀 Release + runs-on: ubuntu-latest + permissions: + contents: write # create git tags, push version commits + pull-requests: write # create "Version Packages" PR + id-token: write # npm provenance attestation + + steps: + - name: 🔄 Checkout sources + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: ⚙️ Use Node.js 22.x + uses: actions/setup-node@v4 + with: + node-version: 22.x + registry-url: https://registry.npmjs.org + + - name: 📦 Install pnpm + uses: pnpm/action-setup@v4 + + - name: 📌 Install dependencies + run: pnpm install --frozen-lockfile + + - name: 🏗️ Build all packages + run: pnpm run build + + - name: 🧪 Unit tests + run: pnpm run test:unit + + # Changesets action: + # - If changesets are pending → creates/updates "Version Packages" PR + # - If this IS the version commit (no pending changesets) → publishes to npm + - name: 📦 Create Release PR or Publish + id: changesets + uses: changesets/action@v1 + with: + publish: pnpm run release:publish + version: pnpm run changeset:version + title: 'chore(release): version packages' + commit: 'chore(release): version packages' + createGithubReleases: true + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.gitignore b/.gitignore index 1b46ebbd..03570a80 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ node_modules/ dist/ docs/ +coverage/ .DS_Store .env diff --git a/.husky/pre-push b/.husky/pre-push new file mode 100644 index 00000000..0828b37a --- /dev/null +++ b/.husky/pre-push @@ -0,0 +1,3 @@ +pnpm run lint +pnpm run test:unit +pnpm run build diff --git a/.npmignore b/.npmignore deleted file mode 100644 index 5bd71e82..00000000 --- a/.npmignore +++ /dev/null @@ -1,11 +0,0 @@ -.idea -.github -node_modules/ -tests/ - -.editorconfig -.eslintrc -tsconfig.lint.json -.DS_Store -.env -.env.example diff --git a/eslint.config.ts b/eslint.config.ts index ad85b7d7..c2d631cb 100644 --- a/eslint.config.ts +++ b/eslint.config.ts @@ -33,11 +33,15 @@ export default defineConfig([ '@stylistic/object-curly-spacing': ['error', 'always'], '@stylistic/padding-line-between-statements': [ 'error', - // Return statements - { blankLine: 'always', prev: '*', next: 'return' }, - // Import statements { blankLine: 'always', prev: 'import', next: '*' }, { blankLine: 'any', prev: 'import', next: 'import' }, + { blankLine: 'always', prev: 'export', next: 'export' }, + { blankLine: 'always', prev: 'const', next: 'type' }, + { blankLine: 'always', prev: '*', next: 'if' }, + { blankLine: 'always', prev: 'if', next: '*' }, + { blankLine: 'always', prev: '*', next: 'for' }, + { blankLine: 'always', prev: 'for', next: '*' }, + { blankLine: 'always', prev: '*', next: 'return' }, ], '@stylistic/quotes': ['error', 'single'], '@stylistic/semi': ['error', 'always'], @@ -49,7 +53,11 @@ export default defineConfig([ }, ], '@typescript-eslint/no-empty-object-type': 'off', + '@typescript-eslint/no-redundant-type-constituents': 'off', '@typescript-eslint/no-unnecessary-condition': 'error', + '@typescript-eslint/no-unsafe-argument': 'off', + '@typescript-eslint/no-unsafe-assignment': 'off', + '@typescript-eslint/no-unsafe-call': 'off', '@typescript-eslint/no-unsafe-member-access': 'off', '@typescript-eslint/prefer-optional-chain': 'error', }, diff --git a/package.json b/package.json index 5d5aa8a9..08bc3d2e 100644 --- a/package.json +++ b/package.json @@ -1,91 +1,63 @@ { "name": "confluence.js", - "version": "2.1.0", + "version": "3.0.0", + "private": true, "description": "confluence.js is a powerful Node.JS/Browser module that allows you to interact with the Confluence API very easily", "author": "Vladislav Tupikin ", "license": "MIT", - "homepage": "https://mrrefactoring.github.io/confluence.js", + "type": "module", + "sideEffects": false, "repository": { "type": "git", "url": "git+https://github.com/MrRefactoring/confluence.js.git" }, - "type": "module", - "types": "./dist/esm/types/index.d.ts", - "module": "./dist/esm/index.mjs", - "main": "./dist/cjs/index.cjs", - "exports": { - ".": { - "types": "./dist/esm/types/index.d.ts", - "require": "./dist/cjs/index.cjs", - "import": "./dist/esm/index.mjs" - }, - "./*": { - "types": "./dist/esm/types/*.d.ts", - "require": "./dist/cjs/*.cjs", - "import": "./dist/esm/*.mjs" - }, - "./package.json": "./package.json" + "homepage": "https://mrrefactoring.github.io/confluence.js", + "bugs": { + "url": "https://github.com/MrRefactoring/confluence.js/issues" }, - "keywords": [ - "confluence", - "confluence-api", - "confluence-client", - "atlassian-confluence", - "confluence-cloud", - "confluence-server", - "nodejs", - "typescript", - "wiki", - "content-management", - "automation", - "rest-api" - ], "engines": { - "node": ">=20" + "node": ">=22" }, "scripts": { - "build": "rollup -c rollup.config.ts --configPlugin typescript", - "test": "pnpm run test:unit && pnpm run test:integration", - "prettier": "prettier --write src", - "doc": "typedoc --name \"Confluence.js - Cloud and Server API library\" --out docs ./src/index.ts --favicon https://bad37fb3-cb50-4e0b-9035-a3e09e8afb3b.selstorage.ru/confluence.js%2Ffavicon.svg", - "lint": "eslint --ext .ts src tests", + "build": "pnpm -r --filter './packages/*' run build", + "test": "vitest run", + "test:legacy": "vitest run --project legacy", + "test:cloud": "vitest run --project cloud", + "test:unit": "pnpm -r run test:unit", + "test:integration": "pnpm -r run test:integration", + "test:coverage": "vitest run --coverage", + "lint": "eslint packages/*/src eslint.config.ts", "lint:fix": "pnpm run lint --fix", - "test:unit": "vitest run tests/unit --minWorkers=1 --maxWorkers=8 --sequence.concurrent", - "test:integration": "vitest run tests/integration --bail=1 --no-file-parallelism --max-concurrency 1 -c vitest.config.mts --hookTimeout 100000 --testTimeout 100000", - "replace:wiki-rest": "grep -rl '/wiki/rest' src/api | xargs sed -i '' 's|/wiki/rest||g'", - "replace:all": "pnpm run replace:wiki-rest", - "code:formatting": "pnpm run replace:all && pnpm run prettier && pnpm run lint:fix" - }, - "dependencies": { - "@atlassian/atlassian-jwt": "^2.2.0", - "axios": "^1.10.0", - "form-data": "^4.0.3", - "oauth": "^0.10.2", - "zod": "^3.25.76" + "prettier": "prettier --write packages", + "doc": "typedoc --name \"Confluence.js - Cloud and Server API library\" --out docs ./packages/cloud/src/index.ts --favicon https://bad37fb3-cb50-4e0b-9035-a3e09e8afb3b.selstorage.ru/confluence.js%2Ffavicon.svg", + "code:formatting": "pnpm -r run replace:all && pnpm run prettier", + "changeset": "changeset", + "changeset:version": "changeset version", + "changeset:status": "changeset status", + "release:publish": "pnpm publish -r --no-git-checks --provenance", + "prepare": "husky" }, "devDependencies": { - "@eslint/js": "^9.31.0", - "@rollup/plugin-alias": "^5.1.1", - "@rollup/plugin-commonjs": "^28.0.6", - "@rollup/plugin-node-resolve": "^16.0.1", - "@rollup/plugin-typescript": "^12.1.4", - "@stylistic/eslint-plugin": "^5.2.0", - "@types/express": "^4.17.23", - "@types/node": "^20.19.8", - "@types/oauth": "^0.9.6", - "dotenv": "^17.2.0", - "eslint": "^9.31.0", - "globals": "^16.3.0", - "jiti": "^2.4.2", - "prettier": "^3.6.2", - "prettier-plugin-jsdoc": "^1.3.3", - "rollup": "^4.45.1", - "rollup-plugin-esnext-to-nodenext": "^1.0.1", - "rollup-plugin-node-externals": "^8.0.1", - "tslib": "^2.8.1", - "typedoc": "^0.28.7", - "typescript": "^5.8.3", - "typescript-eslint": "^8.37.0", - "vitest": "^3.2.4" - } + "@arethetypeswrong/cli": "^0.18.3", + "@changesets/cli": "^2.31.0", + "@eslint/js": "^10.0.1", + "@stylistic/eslint-plugin": "^5.10.0", + "@types/node": "^22.20.0", + "@vitest/coverage-v8": "^4.1.9", + "dotenv": "^17.4.2", + "eslint": "^10.5.0", + "globals": "^17.6.0", + "husky": "^9.1.7", + "jiti": "^2.7.0", + "prettier": "^3.8.4", + "prettier-plugin-jsdoc": "^1.8.1", + "tsc-alias": "^1.8.17", + "typedoc": "^0.28.19", + "typescript": "^6.0.3", + "typescript-eslint": "^8.61.1", + "vite": "^8.0.16", + "vite-plugin-externalize-deps": "^0.10.0", + "vitest": "^4.1.9" + }, + "packageManager": "pnpm@11.8.0" } diff --git a/packages/cloud/package.json b/packages/cloud/package.json new file mode 100644 index 00000000..a8e66cba --- /dev/null +++ b/packages/cloud/package.json @@ -0,0 +1,37 @@ +{ + "name": "@confluence.js/cloud", + "version": "0.0.1", + "private": true, + "description": "Confluence Cloud REST API v2 client", + "type": "module", + "sideEffects": false, + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "imports": { + "#/*": "./dist/*" + }, + "scripts": { + "build": "vite build && tsc --emitDeclarationOnly && tsc-alias --resolve-full-paths", + "test": "vitest run --passWithNoTests", + "test:unit": "vitest run tests/unit --passWithNoTests", + "test:integration": "vitest run tests/integration --passWithNoTests --bail=1 --hookTimeout 100000 --testTimeout 100000", + "prettier": "prettier --write src" + }, + "dependencies": { + "@confluence.js/core": "workspace:*", + "zod": "^4.4.3" + }, + "engines": { + "node": ">=22" + } +} diff --git a/packages/cloud/src/api/adminKey.ts b/packages/cloud/src/api/adminKey.ts new file mode 100644 index 00000000..4188d10a --- /dev/null +++ b/packages/cloud/src/api/adminKey.ts @@ -0,0 +1,56 @@ +import { AdminKeySchema, type AdminKey } from '#/models/adminKey'; +import type { EnableAdminKey } from '#/parameters/enableAdminKey'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns information about the admin key if one is currently enabled for the calling user within the site. + * + * **[Permissions](https://support.atlassian.com/user-management/docs/give-users-admin-permissions/#Centralized-user-management-content) + * required**: User must be an organization or site admin. + */ +export async function getAdminKey(client: Client): Promise { + const config: SendRequestOptions = { + url: '/admin-key', + method: 'GET', + schema: AdminKeySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Enables admin key access for the calling user within the site. If an admin key already exists for the user, a new one + * will be issued with an updated expiration time. + * + * **Note:** The `durationInMinutes` field within the request body is optional. If the request body is empty or if the + * `durationInMinutes` is set to 0 minutes, a new admin key will be issued to the calling user with a default duration + * of 10 minutes. + * + * **[Permissions](https://support.atlassian.com/user-management/docs/give-users-admin-permissions/#Centralized-user-management-content) + * required**: User must be an organization or site admin. + */ +export async function enableAdminKey(client: Client, parameters: EnableAdminKey): Promise { + const config: SendRequestOptions = { + url: '/admin-key', + method: 'POST', + body: parameters.body, + schema: AdminKeySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Disables admin key access for the calling user within the site. + * + * **[Permissions](https://support.atlassian.com/user-management/docs/give-users-admin-permissions/#Centralized-user-management-content) + * required**: User must be an organization or site admin. + */ +export async function disableAdminKey(client: Client): Promise { + const config: SendRequestOptions = { + url: '/admin-key', + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/ancestors.ts b/packages/cloud/src/api/ancestors.ts new file mode 100644 index 00000000..8ccc3ec0 --- /dev/null +++ b/packages/cloud/src/api/ancestors.ts @@ -0,0 +1,145 @@ +import { WhiteboardAncestorsSchema, type WhiteboardAncestors } from '#/models/whiteboardAncestors'; +import { DatabaseAncestorsSchema, type DatabaseAncestors } from '#/models/databaseAncestors'; +import { SmartLinkAncestorsSchema, type SmartLinkAncestors } from '#/models/smartLinkAncestors'; +import { FolderAncestorsSchema, type FolderAncestors } from '#/models/folderAncestors'; +import { PageAncestorsSchema, type PageAncestors } from '#/models/pageAncestors'; +import type { GetWhiteboardAncestors } from '#/parameters/getWhiteboardAncestors'; +import type { GetDatabaseAncestors } from '#/parameters/getDatabaseAncestors'; +import type { GetSmartLinkAncestors } from '#/parameters/getSmartLinkAncestors'; +import type { GetFolderAncestors } from '#/parameters/getFolderAncestors'; +import type { GetPageAncestors } from '#/parameters/getPageAncestors'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns all ancestors for a given whiteboard by ID in top-to-bottom order (that is, the highest ancestor is the first + * item in the response payload). The number of results is limited by the `limit` parameter and additional results (if + * available) will be available by calling this endpoint with the ID of first ancestor in the response payload. + * + * This endpoint returns minimal information about each ancestor. To fetch more details, use a related endpoint, such as + * [Get whiteboard by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Permission to view the whiteboard and its corresponding space + */ +export async function getWhiteboardAncestors( + client: Client, + parameters: GetWhiteboardAncestors, +): Promise { + const config: SendRequestOptions = { + url: `/whiteboards/${parameters.id}/ancestors`, + method: 'GET', + searchParams: { + limit: parameters.limit, + }, + schema: WhiteboardAncestorsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all ancestors for a given database by ID in top-to-bottom order (that is, the highest ancestor is the first + * item in the response payload). The number of results is limited by the `limit` parameter and additional results (if + * available) will be available by calling this endpoint with the ID of first ancestor in the response payload. + * + * This endpoint returns minimal information about each ancestor. To fetch more details, use a related endpoint, such as + * [Get database by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Permission to view the database and its corresponding space + */ +export async function getDatabaseAncestors( + client: Client, + parameters: GetDatabaseAncestors, +): Promise { + const config: SendRequestOptions = { + url: `/databases/${parameters.id}/ancestors`, + method: 'GET', + searchParams: { + limit: parameters.limit, + }, + schema: DatabaseAncestorsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all ancestors for a given Smart Link in the content tree by ID in top-to-bottom order (that is, the highest + * ancestor is the first item in the response payload). The number of results is limited by the `limit` parameter and + * additional results (if available) will be available by calling this endpoint with the ID of first ancestor in the + * response payload. + * + * This endpoint returns minimal information about each ancestor. To fetch more details, use a related endpoint, such as + * [Get Smart Link in the content tree by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Permission to view the Smart Link in the content tree and its corresponding space + */ +export async function getSmartLinkAncestors( + client: Client, + parameters: GetSmartLinkAncestors, +): Promise { + const config: SendRequestOptions = { + url: `/embeds/${parameters.id}/ancestors`, + method: 'GET', + searchParams: { + limit: parameters.limit, + }, + schema: SmartLinkAncestorsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all ancestors for a given folder by ID in top-to-bottom order (that is, the highest ancestor is the first + * item in the response payload). The number of results is limited by the `limit` parameter and additional results (if + * available) will be available by calling this endpoint with the ID of first ancestor in the response payload. + * + * This endpoint returns minimal information about each ancestor. To fetch more details, use a related endpoint, such as + * [Get folder by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-folders-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Permission to view the folder and its corresponding space + */ +export async function getFolderAncestors(client: Client, parameters: GetFolderAncestors): Promise { + const config: SendRequestOptions = { + url: `/folders/${parameters.id}/ancestors`, + method: 'GET', + searchParams: { + limit: parameters.limit, + }, + schema: FolderAncestorsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all ancestors for a given page by ID in top-to-bottom order (that is, the highest ancestor is the first item + * in the response payload). The number of results is limited by the `limit` parameter and additional results (if + * available) will be available by calling this endpoint with the ID of first ancestor in the response payload. + * + * This endpoint returns minimal information about each ancestor. To fetch more details, use a related endpoint, such as + * [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getPageAncestors(client: Client, parameters: GetPageAncestors): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/ancestors`, + method: 'GET', + searchParams: { + limit: parameters.limit, + }, + schema: PageAncestorsSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/appProperties.ts b/packages/cloud/src/api/appProperties.ts new file mode 100644 index 00000000..71f5fedf --- /dev/null +++ b/packages/cloud/src/api/appProperties.ts @@ -0,0 +1,73 @@ +import { ForgeAppPropertiesSchema, type ForgeAppProperties } from '#/models/forgeAppProperties'; +import { ForgeAppPropertySchema, type ForgeAppProperty } from '#/models/forgeAppProperty'; +import type { GetForgeAppProperties } from '#/parameters/getForgeAppProperties'; +import type { GetForgeAppProperty } from '#/parameters/getForgeAppProperty'; +import type { PutForgeAppProperty } from '#/parameters/putForgeAppProperty'; +import type { DeleteForgeAppProperty } from '#/parameters/deleteForgeAppProperty'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Gets Forge app properties. This API can only be accessed using + * **[asApp()](https://developer.atlassian.com/platform/forge/apis-reference/fetch-api-product.requestconfluence/#method-signature)** + * requests from Forge. + */ +export async function getForgeAppProperties( + client: Client, + parameters?: GetForgeAppProperties, +): Promise { + const config: SendRequestOptions = { + url: '/app/properties', + method: 'GET', + searchParams: { + cursor: parameters?.cursor, + limit: parameters?.limit, + }, + schema: ForgeAppPropertiesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Gets a Forge app property by property key. This API can only be accessed using + * **[asApp()](https://developer.atlassian.com/platform/forge/apis-reference/fetch-api-product.requestconfluence/#method-signature)** + * requests from Forge. + */ +export async function getForgeAppProperty(client: Client, parameters: GetForgeAppProperty): Promise { + const config: SendRequestOptions = { + url: `/app/properties/${parameters.propertyKey}`, + method: 'GET', + schema: ForgeAppPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates or updates a Forge app property. This API can only be accessed using + * **[asApp()](https://developer.atlassian.com/platform/forge/apis-reference/fetch-api-product.requestconfluence/#method-signature)** + * requests from Forge. + */ +export async function putForgeAppProperty(client: Client, parameters: PutForgeAppProperty): Promise { + const config: SendRequestOptions = { + url: `/app/properties/${parameters.propertyKey}`, + method: 'PUT', + body: parameters.body, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a Forge app property. This API can only be accessed using + * **[asApp()](https://developer.atlassian.com/platform/forge/apis-reference/fetch-api-product.requestconfluence/#method-signature)** + * requests from Forge. + */ +export async function deleteForgeAppProperty(client: Client, parameters: DeleteForgeAppProperty): Promise { + const config: SendRequestOptions = { + url: `/app/properties/${parameters.propertyKey}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/attachment.ts b/packages/cloud/src/api/attachment.ts new file mode 100644 index 00000000..9204a6f1 --- /dev/null +++ b/packages/cloud/src/api/attachment.ts @@ -0,0 +1,213 @@ +import { AttachmentsSchema, type Attachments } from '#/models/attachments'; +import { AttachmentSchema, type Attachment } from '#/models/attachment'; +import { BlogpostAttachmentsSchema, type BlogpostAttachments } from '#/models/blogpostAttachments'; +import { CustomContentAttachmentsSchema, type CustomContentAttachments } from '#/models/customContentAttachments'; +import { LabelAttachmentsSchema, type LabelAttachments } from '#/models/labelAttachments'; +import { PageAttachmentsSchema, type PageAttachments } from '#/models/pageAttachments'; +import type { GetAttachments } from '#/parameters/getAttachments'; +import type { GetAttachmentById } from '#/parameters/getAttachmentById'; +import type { DeleteAttachment } from '#/parameters/deleteAttachment'; +import type { GetBlogpostAttachments } from '#/parameters/getBlogpostAttachments'; +import type { GetCustomContentAttachments } from '#/parameters/getCustomContentAttachments'; +import type { GetLabelAttachments } from '#/parameters/getLabelAttachments'; +import type { GetPageAttachments } from '#/parameters/getPageAttachments'; +import type { GetAttachmentThumbnailById } from '#/parameters/getAttachmentThumbnailById'; +import { type Client, type SendRequestOptions, BufferSchema, type Buffer } from '@confluence.js/core'; + +/** + * Returns all attachments. The number of results is limited by the `limit` parameter and additional results (if + * available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the container of the + * attachment. + */ +export async function getAttachments(client: Client, parameters?: GetAttachments): Promise { + const config: SendRequestOptions = { + url: '/attachments', + method: 'GET', + searchParams: { + sort: parameters?.sort, + cursor: parameters?.cursor, + status: parameters?.status, + mediaType: parameters?.mediaType, + filename: parameters?.filename, + limit: parameters?.limit, + }, + schema: AttachmentsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a specific attachment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the attachment's container. + */ +export async function getAttachmentById(client: Client, parameters: GetAttachmentById): Promise { + const config: SendRequestOptions = { + url: `/attachments/${parameters.id}`, + method: 'GET', + searchParams: { + version: parameters.version, + 'include-labels': parameters.includeLabels, + 'include-properties': parameters.includeProperties, + 'include-operations': parameters.includeOperations, + 'include-versions': parameters.includeVersions, + 'include-version': parameters.includeVersion, + 'include-collaborators': parameters.includeCollaborators, + }, + schema: AttachmentSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Delete an attachment by id. + * + * Deleting an attachment moves the attachment to the trash, where it can be restored later. To permanently delete an + * attachment (or "purge" it), the endpoint must be called on a **trashed** attachment with the following param + * `purge=true`. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the container of the + * attachment. Permission to delete attachments in the space. Permission to administer the space (if attempting to + * purge). + */ +export async function deleteAttachment(client: Client, parameters: DeleteAttachment): Promise { + const config: SendRequestOptions = { + url: `/attachments/${parameters.id}`, + method: 'DELETE', + searchParams: { + purge: parameters.purge, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the attachments of specific blog post. The number of results is limited by the `limit` parameter and + * additional results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the blog + * post and its corresponding space. + */ +export async function getBlogpostAttachments( + client: Client, + parameters: GetBlogpostAttachments, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}/attachments`, + method: 'GET', + searchParams: { + sort: parameters.sort, + cursor: parameters.cursor, + status: parameters.status, + mediaType: parameters.mediaType, + filename: parameters.filename, + limit: parameters.limit, + }, + schema: BlogpostAttachmentsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the attachments of specific custom content. The number of results is limited by the `limit` parameter and + * additional results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the custom + * content and its corresponding space. + */ +export async function getCustomContentAttachments( + client: Client, + parameters: GetCustomContentAttachments, +): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.id}/attachments`, + method: 'GET', + searchParams: { + sort: parameters.sort, + cursor: parameters.cursor, + status: parameters.status, + mediaType: parameters.mediaType, + filename: parameters.filename, + limit: parameters.limit, + }, + schema: CustomContentAttachmentsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the attachments of specified label. The number of results is limited by the `limit` parameter and additional + * results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the attachment and its + * corresponding space. + */ +export async function getLabelAttachments(client: Client, parameters: GetLabelAttachments): Promise { + const config: SendRequestOptions = { + url: `/labels/${parameters.id}/attachments`, + method: 'GET', + searchParams: { + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: LabelAttachmentsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the attachments of specific page. The number of results is limited by the `limit` parameter and additional + * results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page and + * its corresponding space. + */ +export async function getPageAttachments(client: Client, parameters: GetPageAttachments): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/attachments`, + method: 'GET', + searchParams: { + sort: parameters.sort, + cursor: parameters.cursor, + status: parameters.status, + mediaType: parameters.mediaType, + filename: parameters.filename, + limit: parameters.limit, + }, + schema: PageAttachmentsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Redirects the client to a URL that serves an attachment thumbnail's binary data. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the attachment's container. + */ +export async function getAttachmentThumbnailById( + client: Client, + parameters: GetAttachmentThumbnailById, +): Promise { + const config: SendRequestOptions = { + url: `/attachments/${parameters.id}/thumbnail/download`, + method: 'GET', + searchParams: { + version: parameters.version, + height: parameters.height, + width: parameters.width, + }, + schema: BufferSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/blogPost.ts b/packages/cloud/src/api/blogPost.ts new file mode 100644 index 00000000..8ecb8327 --- /dev/null +++ b/packages/cloud/src/api/blogPost.ts @@ -0,0 +1,186 @@ +import { BlogPostsSchema, type BlogPosts } from '#/models/blogPosts'; +import { BlogPostSchema, type BlogPost } from '#/models/blogPost'; +import { LabelBlogPostsSchema, type LabelBlogPosts } from '#/models/labelBlogPosts'; +import { BlogPostsInSpaceSchema, type BlogPostsInSpace } from '#/models/blogPostsInSpace'; +import type { GetBlogPosts } from '#/parameters/getBlogPosts'; +import type { CreateBlogPost } from '#/parameters/createBlogPost'; +import type { GetBlogPostById } from '#/parameters/getBlogPostById'; +import type { UpdateBlogPost } from '#/parameters/updateBlogPost'; +import type { DeleteBlogPost } from '#/parameters/deleteBlogPost'; +import type { GetLabelBlogPosts } from '#/parameters/getLabelBlogPosts'; +import type { GetBlogPostsInSpace } from '#/parameters/getBlogPostsInSpace'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns all blog posts. The number of results is limited by the `limit` parameter and additional results (if + * available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Only blog posts that the user has permission to view will be returned. + */ +export async function getBlogPosts(client: Client, parameters?: GetBlogPosts): Promise { + const config: SendRequestOptions = { + url: '/blogposts', + method: 'GET', + searchParams: { + id: parameters?.id, + 'space-id': parameters?.spaceId, + sort: parameters?.sort, + status: parameters?.status, + title: parameters?.title, + 'body-format': parameters?.bodyFormat, + cursor: parameters?.cursor, + limit: parameters?.limit, + }, + schema: BlogPostsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a new blog post in the space specified by the spaceId. + * + * By default this will create the blog post as a non-draft, unless the status is specified as draft. If creating a + * non-draft, the title must not be empty. + * + * Currently only supports the storage representation specified in the body.representation enums below + */ +export async function createBlogPost(client: Client, parameters: CreateBlogPost): Promise { + const config: SendRequestOptions = { + url: '/blogposts', + method: 'POST', + searchParams: { + private: parameters.private, + }, + body: parameters.body, + schema: BlogPostSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a specific blog post. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the blog post and its + * corresponding space. + */ +export async function getBlogPostById(client: Client, parameters: GetBlogPostById): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + 'get-draft': parameters.getDraft, + status: parameters.status, + version: parameters.version, + 'include-labels': parameters.includeLabels, + 'include-properties': parameters.includeProperties, + 'include-operations': parameters.includeOperations, + 'include-likes': parameters.includeLikes, + 'include-versions': parameters.includeVersions, + 'include-version': parameters.includeVersion, + 'include-favorited-by-current-user-status': parameters.includeFavoritedByCurrentUserStatus, + 'include-webresources': parameters.includeWebresources, + 'include-collaborators': parameters.includeCollaborators, + }, + schema: BlogPostSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a blog post by id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the blog post and its + * corresponding space. Permission to update blog posts in the space. + */ +export async function updateBlogPost(client: Client, parameters: UpdateBlogPost): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}`, + method: 'PUT', + body: parameters.body, + schema: BlogPostSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Delete a blog post by id. + * + * By default this will delete blog posts that are non-drafts. To delete a blog post that is a draft, the endpoint must + * be called on a draft with the following param `draft=true`. Discarded drafts are not sent to the trash and are + * permanently deleted. + * + * Deleting a blog post that is not a draft moves the blog post to the trash, where it can be restored later. To + * permanently delete a blog post (or "purge" it), the endpoint must be called on a **trashed** blog post with the + * following param `purge=true`. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the blog post and its + * corresponding space. Permission to delete blog posts in the space. Permission to administer the space (if attempting + * to purge). + */ +export async function deleteBlogPost(client: Client, parameters: DeleteBlogPost): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}`, + method: 'DELETE', + searchParams: { + purge: parameters.purge, + draft: parameters.draft, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the blogposts of specified label. The number of results is limited by the `limit` parameter and additional + * results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page and + * its corresponding space. + */ +export async function getLabelBlogPosts(client: Client, parameters: GetLabelBlogPosts): Promise { + const config: SendRequestOptions = { + url: `/labels/${parameters.id}/blogposts`, + method: 'GET', + searchParams: { + 'space-id': parameters.spaceId, + 'body-format': parameters.bodyFormat, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: LabelBlogPostsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all blog posts in a space. The number of results is limited by the `limit` parameter and additional results + * (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission) and view the space. Only blog posts that the user has permission to view will be returned. + */ +export async function getBlogPostsInSpace(client: Client, parameters: GetBlogPostsInSpace): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.id}/blogposts`, + method: 'GET', + searchParams: { + sort: parameters.sort, + status: parameters.status, + title: parameters.title, + 'body-format': parameters.bodyFormat, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: BlogPostsInSpaceSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/children.ts b/packages/cloud/src/api/children.ts new file mode 100644 index 00000000..0834a302 --- /dev/null +++ b/packages/cloud/src/api/children.ts @@ -0,0 +1,288 @@ +import { WhiteboardDirectChildrenSchema, type WhiteboardDirectChildren } from '#/models/whiteboardDirectChildren'; +import { DatabaseDirectChildrenSchema, type DatabaseDirectChildren } from '#/models/databaseDirectChildren'; +import { SmartLinkDirectChildrenSchema, type SmartLinkDirectChildren } from '#/models/smartLinkDirectChildren'; +import { FolderDirectChildrenSchema, type FolderDirectChildren } from '#/models/folderDirectChildren'; +import { ChildPagesSchema, type ChildPages } from '#/models/childPages'; +import { ChildCustomContentGetSchema, type ChildCustomContentGet } from '#/models/childCustomContentGet'; +import { PageDirectChildrenSchema, type PageDirectChildren } from '#/models/pageDirectChildren'; +import type { GetWhiteboardDirectChildren } from '#/parameters/getWhiteboardDirectChildren'; +import type { GetDatabaseDirectChildren } from '#/parameters/getDatabaseDirectChildren'; +import type { GetSmartLinkDirectChildren } from '#/parameters/getSmartLinkDirectChildren'; +import type { GetFolderDirectChildren } from '#/parameters/getFolderDirectChildren'; +import type { GetChildPages } from '#/parameters/getChildPages'; +import type { GetChildCustomContent } from '#/parameters/getChildCustomContent'; +import type { GetPageDirectChildren } from '#/parameters/getPageDirectChildren'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns all children for given whiteboard id in the content tree. The number of results is limited by the `limit` + * parameter and additional results (if available) will be available through the `next` URL present in the `Link` + * response header. + * + * The following types of content will be returned: + * + * - Database + * - Embed + * - Folder + * - Page + * - Whiteboard + * + * This endpoint returns minimal information about each child. To fetch more details, use a related endpoint based on + * the content type, such as: + * + * - [Get database by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get) + * - [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get) + * - [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get) + * - [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get) + * - [Get whiteboard by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Only content that the user has permission to view will be returned. + */ +export async function getWhiteboardDirectChildren( + client: Client, + parameters: GetWhiteboardDirectChildren, +): Promise { + const config: SendRequestOptions = { + url: `/whiteboards/${parameters.id}/direct-children`, + method: 'GET', + searchParams: { + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + }, + schema: WhiteboardDirectChildrenSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all children for given database id in the content tree. The number of results is limited by the `limit` + * parameter and additional results (if available) will be available through the `next` URL present in the `Link` + * response header. + * + * The following types of content will be returned: + * + * - Database + * - Embed + * - Folder + * - Page + * - Whiteboard + * + * This endpoint returns minimal information about each child. To fetch more details, use a related endpoint based on + * the content type, such as: + * + * - [Get database by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get) + * - [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get) + * - [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get) + * - [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get) + * - [Get whiteboard by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Only content that the user has permission to view will be returned. + */ +export async function getDatabaseDirectChildren( + client: Client, + parameters: GetDatabaseDirectChildren, +): Promise { + const config: SendRequestOptions = { + url: `/databases/${parameters.id}/direct-children`, + method: 'GET', + searchParams: { + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + }, + schema: DatabaseDirectChildrenSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all children for given smart link id in the content tree. The number of results is limited by the `limit` + * parameter and additional results (if available) will be available through the `next` URL present in the `Link` + * response header. + * + * The following types of content will be returned: + * + * - Database + * - Embed + * - Folder + * - Page + * - Whiteboard + * + * This endpoint returns minimal information about each child. To fetch more details, use a related endpoint based on + * the content type, such as: + * + * - [Get database by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get) + * - [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get) + * - [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get) + * - [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get) + * - [Get whiteboard by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Only content that the user has permission to view will be returned. + */ +export async function getSmartLinkDirectChildren( + client: Client, + parameters: GetSmartLinkDirectChildren, +): Promise { + const config: SendRequestOptions = { + url: `/embeds/${parameters.id}/direct-children`, + method: 'GET', + searchParams: { + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + }, + schema: SmartLinkDirectChildrenSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all children for given folder id in the content tree. The number of results is limited by the `limit` + * parameter and additional results (if available) will be available through the `next` URL present in the `Link` + * response header. + * + * The following types of content will be returned: + * + * - Database + * - Embed + * - Folder + * - Page + * - Whiteboard + * + * This endpoint returns minimal information about each child. To fetch more details, use a related endpoint based on + * the content type, such as: + * + * - [Get database by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get) + * - [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get) + * - [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get) + * - [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get) + * - [Get whiteboard by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Only content that the user has permission to view will be returned. + */ +export async function getFolderDirectChildren( + client: Client, + parameters: GetFolderDirectChildren, +): Promise { + const config: SendRequestOptions = { + url: `/folders/${parameters.id}/direct-children`, + method: 'GET', + searchParams: { + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + }, + schema: FolderDirectChildrenSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all child pages for given page id. The number of results is limited by the `limit` parameter and additional + * results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Only pages that the user has permission to view will be returned. + */ +export async function getChildPages(client: Client, parameters: GetChildPages): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/children`, + method: 'GET', + searchParams: { + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + }, + schema: ChildPagesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all child custom content for given custom content id. The number of results is limited by the `limit` + * parameter and additional results (if available) will be available through the `next` URL present in the `Link` + * response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Only custom content that the user has permission to view will be returned. + */ +export async function getChildCustomContent( + client: Client, + parameters: GetChildCustomContent, +): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.id}/children`, + method: 'GET', + searchParams: { + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + }, + schema: ChildCustomContentGetSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all children for given page id in the content tree. The number of results is limited by the `limit` parameter + * and additional results (if available) will be available through the `next` URL present in the `Link` response + * header. + * + * The following types of content will be returned: + * + * - Database + * - Embed + * - Folder + * - Page + * - Whiteboard + * + * This endpoint returns minimal information about each child. To fetch more details, use a related endpoint based on + * the content type, such as: + * + * - [Get database by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get) + * - [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get) + * - [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get) + * - [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get) + * - [Get whiteboard by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Only content that the user has permission to view will be returned. + */ +export async function getPageDirectChildren( + client: Client, + parameters: GetPageDirectChildren, +): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/direct-children`, + method: 'GET', + searchParams: { + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + }, + schema: PageDirectChildrenSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/classificationLevel.ts b/packages/cloud/src/api/classificationLevel.ts new file mode 100644 index 00000000..0a688ff2 --- /dev/null +++ b/packages/cloud/src/api/classificationLevel.ts @@ -0,0 +1,352 @@ +import { ClassificationLevelSchema, type ClassificationLevel } from '#/models/classificationLevel'; +import type { GetSpaceDefaultClassificationLevel } from '#/parameters/getSpaceDefaultClassificationLevel'; +import type { PutSpaceDefaultClassificationLevel } from '#/parameters/putSpaceDefaultClassificationLevel'; +import type { DeleteSpaceDefaultClassificationLevel } from '#/parameters/deleteSpaceDefaultClassificationLevel'; +import type { GetPageClassificationLevel } from '#/parameters/getPageClassificationLevel'; +import type { PutPageClassificationLevel } from '#/parameters/putPageClassificationLevel'; +import type { PostPageClassificationLevel } from '#/parameters/postPageClassificationLevel'; +import type { GetBlogPostClassificationLevel } from '#/parameters/getBlogPostClassificationLevel'; +import type { PutBlogPostClassificationLevel } from '#/parameters/putBlogPostClassificationLevel'; +import type { PostBlogPostClassificationLevel } from '#/parameters/postBlogPostClassificationLevel'; +import type { GetWhiteboardClassificationLevel } from '#/parameters/getWhiteboardClassificationLevel'; +import type { PutWhiteboardClassificationLevel } from '#/parameters/putWhiteboardClassificationLevel'; +import type { PostWhiteboardClassificationLevel } from '#/parameters/postWhiteboardClassificationLevel'; +import type { GetDatabaseClassificationLevel } from '#/parameters/getDatabaseClassificationLevel'; +import type { PutDatabaseClassificationLevel } from '#/parameters/putDatabaseClassificationLevel'; +import type { PostDatabaseClassificationLevel } from '#/parameters/postDatabaseClassificationLevel'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; +import { z } from 'zod'; + +/** + * Returns a list of [classification + * levels](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level) available. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission). + */ +export async function getClassificationLevels(client: Client): Promise { + const config: SendRequestOptions = { + url: '/classification-levels', + method: 'GET', + schema: z.array(ClassificationLevelSchema), + }; + + return await client.sendRequest(config); +} + +/** + * Returns the [default classification + * level](https://support.atlassian.com/security-and-access-policies/docs/what-is-a-default-classification-level/) for a + * specific space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and permission to view the space. + */ +export async function getSpaceDefaultClassificationLevel( + client: Client, + parameters: GetSpaceDefaultClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.id}/classification-level/default`, + method: 'GET', + schema: ClassificationLevelSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update the [default classification + * level](https://support.atlassian.com/security-and-access-policies/docs/what-is-a-default-classification-level/) for a + * specific space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and 'Admin' permission for the space. + */ +export async function putSpaceDefaultClassificationLevel( + client: Client, + parameters: PutSpaceDefaultClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.id}/classification-level/default`, + method: 'PUT', + body: parameters.body, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the [default classification + * level](https://support.atlassian.com/security-and-access-policies/docs/what-is-a-default-classification-level/) for a + * specific space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and 'Admin' permission for the space. + */ +export async function deleteSpaceDefaultClassificationLevel( + client: Client, + parameters: DeleteSpaceDefaultClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.id}/classification-level/default`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} + +/** + * Returns the [classification + * level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level) for a specific page. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and permission to view the page. 'Permission to edit the page is required if trying to + * view classification level for a draft. + */ +export async function getPageClassificationLevel( + client: Client, + parameters: GetPageClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/classification-level`, + method: 'GET', + searchParams: { + status: parameters.status, + }, + schema: ClassificationLevelSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Updates the [classification + * level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level) for a specific page. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and permission to edit the page. + */ +export async function putPageClassificationLevel( + client: Client, + parameters: PutPageClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/classification-level`, + method: 'PUT', + body: parameters.body, + }; + + return await client.sendRequest(config); +} + +/** + * Resets the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level) + * for a specific page for the space [default classification + * level](https://support.atlassian.com/security-and-access-policies/docs/what-is-a-default-classification-level/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and permission to view the page. + */ +export async function postPageClassificationLevel( + client: Client, + parameters: PostPageClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/classification-level/reset`, + method: 'POST', + body: parameters.body, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the [classification + * level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level) for a specific blog post. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and permission to view the blog post. 'Permission to edit the blog post is required if + * trying to view classification level for a draft. + */ +export async function getBlogPostClassificationLevel( + client: Client, + parameters: GetBlogPostClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}/classification-level`, + method: 'GET', + searchParams: { + status: parameters.status, + }, + schema: ClassificationLevelSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Updates the [classification + * level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level) for a specific blog post. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and permission to edit the blog post. + */ +export async function putBlogPostClassificationLevel( + client: Client, + parameters: PutBlogPostClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}/classification-level`, + method: 'PUT', + body: parameters.body, + }; + + return await client.sendRequest(config); +} + +/** + * Resets the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level) + * for a specific blog post for the space\ + * [default classification + * level](https://support.atlassian.com/security-and-access-policies/docs/what-is-a-default-classification-level/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and permission to view the blog post. + */ +export async function postBlogPostClassificationLevel( + client: Client, + parameters: PostBlogPostClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}/classification-level/reset`, + method: 'POST', + body: parameters.body, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the [classification + * level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level) for a specific + * whiteboard. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and permission to view the whiteboard. + */ +export async function getWhiteboardClassificationLevel( + client: Client, + parameters: GetWhiteboardClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/whiteboards/${parameters.id}/classification-level`, + method: 'GET', + schema: ClassificationLevelSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Updates the [classification + * level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level) for a specific + * whiteboard. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and permission to edit the whiteboard. + */ +export async function putWhiteboardClassificationLevel( + client: Client, + parameters: PutWhiteboardClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/whiteboards/${parameters.id}/classification-level`, + method: 'PUT', + body: parameters.body, + }; + + return await client.sendRequest(config); +} + +/** + * Resets the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level) + * for a specific whiteboard for the space [default classification + * level](https://support.atlassian.com/security-and-access-policies/docs/what-is-a-default-classification-level/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and permission to view the whiteboard. + */ +export async function postWhiteboardClassificationLevel( + client: Client, + parameters: PostWhiteboardClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/whiteboards/${parameters.id}/classification-level/reset`, + method: 'POST', + body: parameters.body, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the [classification + * level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level) for a specific database. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and permission to view the database. + */ +export async function getDatabaseClassificationLevel( + client: Client, + parameters: GetDatabaseClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/databases/${parameters.id}/classification-level`, + method: 'GET', + schema: ClassificationLevelSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Updates the [classification + * level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level) for a specific database. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and permission to edit the database. + */ +export async function putDatabaseClassificationLevel( + client: Client, + parameters: PutDatabaseClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/databases/${parameters.id}/classification-level`, + method: 'PUT', + body: parameters.body, + }; + + return await client.sendRequest(config); +} + +/** + * Resets the [classification level](https://developer.atlassian.com/cloud/admin/dlp/rest/intro/#Classification%20level) + * for a specific database for the space [default classification + * level](https://support.atlassian.com/security-and-access-policies/docs/what-is-a-default-classification-level/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Permission to access the Confluence site + * ('Can use' global permission) and permission to view the database. + */ +export async function postDatabaseClassificationLevel( + client: Client, + parameters: PostDatabaseClassificationLevel, +): Promise { + const config: SendRequestOptions = { + url: `/databases/${parameters.id}/classification-level/reset`, + method: 'POST', + body: parameters.body, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/comment.ts b/packages/cloud/src/api/comment.ts new file mode 100644 index 00000000..94c87a6a --- /dev/null +++ b/packages/cloud/src/api/comment.ts @@ -0,0 +1,470 @@ +import { AttachmentCommentsSchema, type AttachmentComments } from '#/models/attachmentComments'; +import { CustomContentCommentsSchema, type CustomContentComments } from '#/models/customContentComments'; +import { PageFooterCommentsSchema, type PageFooterComments } from '#/models/pageFooterComments'; +import { PageInlineCommentsSchema, type PageInlineComments } from '#/models/pageInlineComments'; +import { BlogPostFooterCommentsSchema, type BlogPostFooterComments } from '#/models/blogPostFooterComments'; +import { BlogPostInlineCommentsSchema, type BlogPostInlineComments } from '#/models/blogPostInlineComments'; +import { FooterCommentsSchema, type FooterComments } from '#/models/footerComments'; +import { FooterCommentSchema, type FooterComment } from '#/models/footerComment'; +import { FooterCommentChildrenSchema, type FooterCommentChildren } from '#/models/footerCommentChildren'; +import { InlineCommentsSchema, type InlineComments } from '#/models/inlineComments'; +import { InlineCommentSchema, type InlineComment } from '#/models/inlineComment'; +import { InlineCommentChildrenGetSchema, type InlineCommentChildrenGet } from '#/models/inlineCommentChildrenGet'; +import type { GetAttachmentComments } from '#/parameters/getAttachmentComments'; +import type { GetCustomContentComments } from '#/parameters/getCustomContentComments'; +import type { GetPageFooterComments } from '#/parameters/getPageFooterComments'; +import type { GetPageInlineComments } from '#/parameters/getPageInlineComments'; +import type { GetBlogPostFooterComments } from '#/parameters/getBlogPostFooterComments'; +import type { GetBlogPostInlineComments } from '#/parameters/getBlogPostInlineComments'; +import type { GetFooterComments } from '#/parameters/getFooterComments'; +import type { CreateFooterComment } from '#/parameters/createFooterComment'; +import type { GetFooterCommentChildren } from '#/parameters/getFooterCommentChildren'; +import type { GetInlineComments } from '#/parameters/getInlineComments'; +import type { CreateInlineComment } from '#/parameters/createInlineComment'; +import type { GetInlineCommentChildren } from '#/parameters/getInlineCommentChildren'; +import type { GetFooterCommentById } from '#/parameters/getFooterCommentById'; +import type { UpdateFooterComment } from '#/parameters/updateFooterComment'; +import type { DeleteFooterComment } from '#/parameters/deleteFooterComment'; +import type { GetInlineCommentById } from '#/parameters/getInlineCommentById'; +import type { UpdateInlineComment } from '#/parameters/updateInlineComment'; +import type { DeleteInlineComment } from '#/parameters/deleteInlineComment'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns the comments of the specific attachment. The number of results is limited by the `limit` parameter and + * additional results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the attachment and its + * corresponding containers. + */ +export async function getAttachmentComments( + client: Client, + parameters: GetAttachmentComments, +): Promise { + const config: SendRequestOptions = { + url: `/attachments/${parameters.id}/footer-comments`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + version: parameters.version, + }, + schema: AttachmentCommentsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the comments of the specific custom content. The number of results is limited by the `limit` parameter and + * additional results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the custom content and its + * corresponding containers. + */ +export async function getCustomContentComments( + client: Client, + parameters: GetCustomContentComments, +): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.id}/footer-comments`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + }, + schema: CustomContentCommentsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the root footer comments of specific page. The number of results is limited by the `limit` parameter and + * additional results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page and + * its corresponding space. + */ +export async function getPageFooterComments( + client: Client, + parameters: GetPageFooterComments, +): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/footer-comments`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + status: parameters.status, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: PageFooterCommentsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the root inline comments of specific page. The number of results is limited by the `limit` parameter and + * additional results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page and + * its corresponding space. + */ +export async function getPageInlineComments( + client: Client, + parameters: GetPageInlineComments, +): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/inline-comments`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + status: parameters.status, + 'resolution-status': parameters.resolutionStatus, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: PageInlineCommentsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the root footer comments of specific blog post. The number of results is limited by the `limit` parameter and + * additional results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the blog + * post and its corresponding space. + */ +export async function getBlogPostFooterComments( + client: Client, + parameters: GetBlogPostFooterComments, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}/footer-comments`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + status: parameters.status, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: BlogPostFooterCommentsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the root inline comments of specific blog post. The number of results is limited by the `limit` parameter and + * additional results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the blog + * post and its corresponding space. + */ +export async function getBlogPostInlineComments( + client: Client, + parameters: GetBlogPostInlineComments, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}/inline-comments`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + status: parameters.status, + 'resolution-status': parameters.resolutionStatus, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: BlogPostInlineCommentsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all footer comments. The number of results is limited by the `limit` parameter and additional results (if + * available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the + * container and its corresponding space. + */ +export async function getFooterComments(client: Client, parameters?: GetFooterComments): Promise { + const config: SendRequestOptions = { + url: '/footer-comments', + method: 'GET', + searchParams: { + 'body-format': parameters?.bodyFormat, + sort: parameters?.sort, + cursor: parameters?.cursor, + limit: parameters?.limit, + }, + schema: FooterCommentsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Create a footer comment. + * + * The footer comment can be made against several locations: + * + * - At the top level (specifying pageId or blogPostId in the request body) + * - As a reply (specifying parentCommentId in the request body) + * - Against an attachment (note: this is different than the comments added via the attachment properties page on the UI, + * which are referred to as version comments) + * - Against a custom content + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page or + * blogpost and its corresponding space. Permission to create comments in the space. + */ +export async function createFooterComment(client: Client, parameters: CreateFooterComment): Promise { + const config: SendRequestOptions = { + url: '/footer-comments', + method: 'POST', + body: { + blogPostId: parameters.blogPostId, + pageId: parameters.pageId, + parentCommentId: parameters.parentCommentId, + attachmentId: parameters.attachmentId, + customContentId: parameters.customContentId, + body: parameters.body, + }, + schema: FooterCommentSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the children footer comments of specific comment. The number of results is limited by the `limit` parameter + * and additional results (if available) will be available through the `next` URL present in the `Link` response + * header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page and + * its corresponding space. + */ +export async function getFooterCommentChildren( + client: Client, + parameters: GetFooterCommentChildren, +): Promise { + const config: SendRequestOptions = { + url: `/footer-comments/${parameters.id}/children`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: FooterCommentChildrenSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all inline comments. The number of results is limited by the `limit` parameter and additional results (if + * available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page and + * its corresponding space. + */ +export async function getInlineComments(client: Client, parameters?: GetInlineComments): Promise { + const config: SendRequestOptions = { + url: '/inline-comments', + method: 'GET', + searchParams: { + 'body-format': parameters?.bodyFormat, + sort: parameters?.sort, + cursor: parameters?.cursor, + limit: parameters?.limit, + }, + schema: InlineCommentsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Create an inline comment. This can be at the top level (specifying pageId or blogPostId in the request body) or as a + * reply (specifying parentCommentId in the request body). Note the inlineCommentProperties object in the request body + * is used to select the text the inline comment should be tied to. This is what determines the text highlighting when + * viewing a page in Confluence. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page or + * blogpost and its corresponding space. Permission to create comments in the space. + */ +export async function createInlineComment(client: Client, parameters: CreateInlineComment): Promise { + const config: SendRequestOptions = { + url: '/inline-comments', + method: 'POST', + body: { + blogPostId: parameters.blogPostId, + pageId: parameters.pageId, + parentCommentId: parameters.parentCommentId, + body: parameters.body, + inlineCommentProperties: parameters.inlineCommentProperties, + }, + schema: InlineCommentSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the children inline comments of specific comment. The number of results is limited by the `limit` parameter + * and additional results (if available) will be available through the `next` URL present in the `Link` response + * header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page and + * its corresponding space. + */ +export async function getInlineCommentChildren( + client: Client, + parameters: GetInlineCommentChildren, +): Promise { + const config: SendRequestOptions = { + url: `/inline-comments/${parameters.id}/children`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: InlineCommentChildrenGetSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves a footer comment by id + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the + * container and its corresponding space. + */ +export async function getFooterCommentById(client: Client, parameters: GetFooterCommentById): Promise { + const config: SendRequestOptions = { + url: `/footer-comments/${parameters.commentId}`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + version: parameters.version, + 'include-properties': parameters.includeProperties, + 'include-operations': parameters.includeOperations, + 'include-likes': parameters.includeLikes, + 'include-versions': parameters.includeVersions, + 'include-version': parameters.includeVersion, + }, + schema: FooterCommentSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a footer comment. This can be used to update the body text of a comment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page or + * blogpost and its corresponding space. Permission to create comments in the space. + */ +export async function updateFooterComment(client: Client, parameters: UpdateFooterComment): Promise { + const config: SendRequestOptions = { + url: `/footer-comments/${parameters.commentId}`, + method: 'PUT', + body: parameters.body, + schema: FooterCommentSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a footer comment. This is a permanent deletion and cannot be reverted. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page or + * blogpost and its corresponding space. Permission to delete comments in the space. + */ +export async function deleteFooterComment(client: Client, parameters: DeleteFooterComment): Promise { + const config: SendRequestOptions = { + url: `/footer-comments/${parameters.commentId}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves an inline comment by id + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page or + * blogpost and its corresponding space. + */ +export async function getInlineCommentById(client: Client, parameters: GetInlineCommentById): Promise { + const config: SendRequestOptions = { + url: `/inline-comments/${parameters.commentId}`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + version: parameters.version, + 'include-properties': parameters.includeProperties, + 'include-operations': parameters.includeOperations, + 'include-likes': parameters.includeLikes, + 'include-versions': parameters.includeVersions, + 'include-version': parameters.includeVersion, + }, + schema: InlineCommentSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update an inline comment. This can be used to update the body text of a comment and/or to resolve the comment + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page or + * blogpost and its corresponding space. Permission to create comments in the space. + */ +export async function updateInlineComment(client: Client, parameters: UpdateInlineComment): Promise { + const config: SendRequestOptions = { + url: `/inline-comments/${parameters.commentId}`, + method: 'PUT', + body: { + version: parameters.version, + body: parameters.body, + resolved: parameters.resolved, + }, + schema: InlineCommentSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes an inline comment. This is a permanent deletion and cannot be reverted. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page or + * blogpost and its corresponding space. Permission to delete comments in the space. + */ +export async function deleteInlineComment(client: Client, parameters: DeleteInlineComment): Promise { + const config: SendRequestOptions = { + url: `/inline-comments/${parameters.commentId}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/content.ts b/packages/cloud/src/api/content.ts new file mode 100644 index 00000000..da8f3646 --- /dev/null +++ b/packages/cloud/src/api/content.ts @@ -0,0 +1,26 @@ +import { ContentIdToContentTypeSchema, type ContentIdToContentType } from '#/models/contentIdToContentType'; +import type { ConvertContentIdsToContentTypes } from '#/parameters/convertContentIdsToContentTypes'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Converts a list of content ids into their associated content types. This is useful for users migrating from v1 to v2 + * who may have stored just content ids without their associated type. This will return types as they should be used in + * v2. Notably, this will return `inline-comment` for inline comments and `footer-comment` for footer comments, which is + * distinct from them both being represented by `comment` in v1. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the requested content. Any + * content that the user does not have permission to view or does not exist will map to `null` in the response. + */ +export async function convertContentIdsToContentTypes( + client: Client, + parameters: ConvertContentIdsToContentTypes, +): Promise { + const config: SendRequestOptions = { + url: '/content/convert-ids-to-types', + method: 'POST', + body: parameters.body, + schema: ContentIdToContentTypeSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/contentProperties.ts b/packages/cloud/src/api/contentProperties.ts new file mode 100644 index 00000000..7a5ed765 --- /dev/null +++ b/packages/cloud/src/api/contentProperties.ts @@ -0,0 +1,991 @@ +import { + WhiteboardContentPropertiesSchema, + type WhiteboardContentProperties, +} from '#/models/whiteboardContentProperties'; +import { ContentPropertySchema, type ContentProperty } from '#/models/contentProperty'; +import { DatabaseContentPropertiesSchema, type DatabaseContentProperties } from '#/models/databaseContentProperties'; +import { SmartLinkContentPropertiesSchema, type SmartLinkContentProperties } from '#/models/smartLinkContentProperties'; +import { FolderContentPropertiesSchema, type FolderContentProperties } from '#/models/folderContentProperties'; +import { + AttachmentContentPropertiesSchema, + type AttachmentContentProperties, +} from '#/models/attachmentContentProperties'; +import { BlogpostContentPropertiesSchema, type BlogpostContentProperties } from '#/models/blogpostContentProperties'; +import { + CustomContentContentPropertiesSchema, + type CustomContentContentProperties, +} from '#/models/customContentContentProperties'; +import { PageContentPropertiesSchema, type PageContentProperties } from '#/models/pageContentProperties'; +import { CommentContentPropertiesSchema, type CommentContentProperties } from '#/models/commentContentProperties'; +import type { GetWhiteboardContentProperties } from '#/parameters/getWhiteboardContentProperties'; +import type { CreateWhiteboardProperty } from '#/parameters/createWhiteboardProperty'; +import type { GetDatabaseContentProperties } from '#/parameters/getDatabaseContentProperties'; +import type { CreateDatabaseProperty } from '#/parameters/createDatabaseProperty'; +import type { GetSmartLinkContentProperties } from '#/parameters/getSmartLinkContentProperties'; +import type { CreateSmartLinkProperty } from '#/parameters/createSmartLinkProperty'; +import type { GetFolderContentProperties } from '#/parameters/getFolderContentProperties'; +import type { CreateFolderProperty } from '#/parameters/createFolderProperty'; +import type { GetAttachmentContentProperties } from '#/parameters/getAttachmentContentProperties'; +import type { CreateAttachmentProperty } from '#/parameters/createAttachmentProperty'; +import type { GetAttachmentContentPropertiesById } from '#/parameters/getAttachmentContentPropertiesById'; +import type { UpdateAttachmentPropertyById } from '#/parameters/updateAttachmentPropertyById'; +import type { DeleteAttachmentPropertyById } from '#/parameters/deleteAttachmentPropertyById'; +import type { GetBlogpostContentProperties } from '#/parameters/getBlogpostContentProperties'; +import type { CreateBlogpostProperty } from '#/parameters/createBlogpostProperty'; +import type { GetBlogpostContentPropertiesById } from '#/parameters/getBlogpostContentPropertiesById'; +import type { UpdateBlogpostPropertyById } from '#/parameters/updateBlogpostPropertyById'; +import type { DeleteBlogpostPropertyById } from '#/parameters/deleteBlogpostPropertyById'; +import type { GetCustomContentContentProperties } from '#/parameters/getCustomContentContentProperties'; +import type { CreateCustomContentProperty } from '#/parameters/createCustomContentProperty'; +import type { GetCustomContentContentPropertiesById } from '#/parameters/getCustomContentContentPropertiesById'; +import type { UpdateCustomContentPropertyById } from '#/parameters/updateCustomContentPropertyById'; +import type { DeleteCustomContentPropertyById } from '#/parameters/deleteCustomContentPropertyById'; +import type { GetPageContentProperties } from '#/parameters/getPageContentProperties'; +import type { CreatePageProperty } from '#/parameters/createPageProperty'; +import type { GetPageContentPropertiesById } from '#/parameters/getPageContentPropertiesById'; +import type { UpdatePagePropertyById } from '#/parameters/updatePagePropertyById'; +import type { DeletePagePropertyById } from '#/parameters/deletePagePropertyById'; +import type { GetWhiteboardContentPropertiesById } from '#/parameters/getWhiteboardContentPropertiesById'; +import type { UpdateWhiteboardPropertyById } from '#/parameters/updateWhiteboardPropertyById'; +import type { DeleteWhiteboardPropertyById } from '#/parameters/deleteWhiteboardPropertyById'; +import type { GetDatabaseContentPropertiesById } from '#/parameters/getDatabaseContentPropertiesById'; +import type { UpdateDatabasePropertyById } from '#/parameters/updateDatabasePropertyById'; +import type { DeleteDatabasePropertyById } from '#/parameters/deleteDatabasePropertyById'; +import type { GetSmartLinkContentPropertiesById } from '#/parameters/getSmartLinkContentPropertiesById'; +import type { UpdateSmartLinkPropertyById } from '#/parameters/updateSmartLinkPropertyById'; +import type { DeleteSmartLinkPropertyById } from '#/parameters/deleteSmartLinkPropertyById'; +import type { GetFolderContentPropertiesById } from '#/parameters/getFolderContentPropertiesById'; +import type { UpdateFolderPropertyById } from '#/parameters/updateFolderPropertyById'; +import type { DeleteFolderPropertyById } from '#/parameters/deleteFolderPropertyById'; +import type { GetCommentContentProperties } from '#/parameters/getCommentContentProperties'; +import type { CreateCommentProperty } from '#/parameters/createCommentProperty'; +import type { GetCommentContentPropertiesById } from '#/parameters/getCommentContentPropertiesById'; +import type { UpdateCommentPropertyById } from '#/parameters/updateCommentPropertyById'; +import type { DeleteCommentPropertyById } from '#/parameters/deleteCommentPropertyById'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Retrieves Content Properties tied to a specified whiteboard. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the whiteboard. + */ +export async function getWhiteboardContentProperties( + client: Client, + parameters: GetWhiteboardContentProperties, +): Promise { + const config: SendRequestOptions = { + url: `/whiteboards/${parameters.id}/properties`, + method: 'GET', + searchParams: { + key: parameters.key, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: WhiteboardContentPropertiesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a new content property for a whiteboard. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the whiteboard. + */ +export async function createWhiteboardProperty( + client: Client, + parameters: CreateWhiteboardProperty, +): Promise { + const config: SendRequestOptions = { + url: `/whiteboards/${parameters.id}/properties`, + method: 'POST', + body: { + key: parameters.key, + value: parameters.value, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves Content Properties tied to a specified database. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the database. + */ +export async function getDatabaseContentProperties( + client: Client, + parameters: GetDatabaseContentProperties, +): Promise { + const config: SendRequestOptions = { + url: `/databases/${parameters.id}/properties`, + method: 'GET', + searchParams: { + key: parameters.key, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: DatabaseContentPropertiesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a new content property for a database. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the database. + */ +export async function createDatabaseProperty( + client: Client, + parameters: CreateDatabaseProperty, +): Promise { + const config: SendRequestOptions = { + url: `/databases/${parameters.id}/properties`, + method: 'POST', + body: { + key: parameters.key, + value: parameters.value, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves Content Properties tied to a specified Smart Link in the content tree. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the Smart Link in the + * content tree. + */ +export async function getSmartLinkContentProperties( + client: Client, + parameters: GetSmartLinkContentProperties, +): Promise { + const config: SendRequestOptions = { + url: `/embeds/${parameters.id}/properties`, + method: 'GET', + searchParams: { + key: parameters.key, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: SmartLinkContentPropertiesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a new content property for a Smart Link in the content tree. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the Smart Link in the + * content tree. + */ +export async function createSmartLinkProperty( + client: Client, + parameters: CreateSmartLinkProperty, +): Promise { + const config: SendRequestOptions = { + url: `/embeds/${parameters.id}/properties`, + method: 'POST', + body: { + key: parameters.key, + value: parameters.value, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves Content Properties tied to a specified folder. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the folder. + */ +export async function getFolderContentProperties( + client: Client, + parameters: GetFolderContentProperties, +): Promise { + const config: SendRequestOptions = { + url: `/folders/${parameters.id}/properties`, + method: 'GET', + searchParams: { + key: parameters.key, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: FolderContentPropertiesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a new content property for a folder. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the folder. + */ +export async function createFolderProperty(client: Client, parameters: CreateFolderProperty): Promise { + const config: SendRequestOptions = { + url: `/folders/${parameters.id}/properties`, + method: 'POST', + body: { + key: parameters.key, + value: parameters.value, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves all Content Properties tied to a specified attachment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the attachment. + */ +export async function getAttachmentContentProperties( + client: Client, + parameters: GetAttachmentContentProperties, +): Promise { + const config: SendRequestOptions = { + url: `/attachments/${parameters.attachmentId}/properties`, + method: 'GET', + searchParams: { + key: parameters.key, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: AttachmentContentPropertiesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a new content property for an attachment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the attachment. + */ +export async function createAttachmentProperty( + client: Client, + parameters: CreateAttachmentProperty, +): Promise { + const config: SendRequestOptions = { + url: `/attachments/${parameters.attachmentId}/properties`, + method: 'POST', + body: { + key: parameters.key, + value: parameters.value, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves a specific Content Property by ID that is attached to a specified attachment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the attachment. + */ +export async function getAttachmentContentPropertiesById( + client: Client, + parameters: GetAttachmentContentPropertiesById, +): Promise { + const config: SendRequestOptions = { + url: `/attachments/${parameters.attachmentId}/properties/${parameters.propertyId}`, + method: 'GET', + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a content property for attachment by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the attachment. + */ +export async function updateAttachmentPropertyById( + client: Client, + parameters: UpdateAttachmentPropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/attachments/${parameters.attachmentId}/properties/${parameters.propertyId}`, + method: 'PUT', + body: { + key: parameters.key, + value: parameters.value, + version: parameters.version, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a content property for an attachment by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to attachment the page. + */ +export async function deleteAttachmentPropertyById( + client: Client, + parameters: DeleteAttachmentPropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/attachments/${parameters.attachmentId}/properties/${parameters.propertyId}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves all Content Properties tied to a specified blog post. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the blog post. + */ +export async function getBlogpostContentProperties( + client: Client, + parameters: GetBlogpostContentProperties, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.blogpostId}/properties`, + method: 'GET', + searchParams: { + key: parameters.key, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: BlogpostContentPropertiesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a new property for a blogpost. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the blog post. + */ +export async function createBlogpostProperty( + client: Client, + parameters: CreateBlogpostProperty, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.blogpostId}/properties`, + method: 'POST', + body: { + key: parameters.key, + value: parameters.value, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves a specific Content Property by ID that is attached to a specified blog post. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the blog post. + */ +export async function getBlogpostContentPropertiesById( + client: Client, + parameters: GetBlogpostContentPropertiesById, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.blogpostId}/properties/${parameters.propertyId}`, + method: 'GET', + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a content property for blog post by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the blog post. + */ +export async function updateBlogpostPropertyById( + client: Client, + parameters: UpdateBlogpostPropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.blogpostId}/properties/${parameters.propertyId}`, + method: 'PUT', + body: { + key: parameters.key, + value: parameters.value, + version: parameters.version, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a content property for a blogpost by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the blog post. + */ +export async function deleteBlogpostPropertyById( + client: Client, + parameters: DeleteBlogpostPropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.blogpostId}/properties/${parameters.propertyId}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves Content Properties tied to a specified custom content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the custom content. + */ +export async function getCustomContentContentProperties( + client: Client, + parameters: GetCustomContentContentProperties, +): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.customContentId}/properties`, + method: 'GET', + searchParams: { + key: parameters.key, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: CustomContentContentPropertiesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a new content property for a piece of custom content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the custom content. + */ +export async function createCustomContentProperty( + client: Client, + parameters: CreateCustomContentProperty, +): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.customContentId}/properties`, + method: 'POST', + body: { + key: parameters.key, + value: parameters.value, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves a specific Content Property by ID that is attached to a specified custom content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the page. + */ +export async function getCustomContentContentPropertiesById( + client: Client, + parameters: GetCustomContentContentPropertiesById, +): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.customContentId}/properties/${parameters.propertyId}`, + method: 'GET', + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a content property for a piece of custom content by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the custom content. + */ +export async function updateCustomContentPropertyById( + client: Client, + parameters: UpdateCustomContentPropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.customContentId}/properties/${parameters.propertyId}`, + method: 'PUT', + body: { + key: parameters.key, + value: parameters.value, + version: parameters.version, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a content property for a piece of custom content by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the custom content. + */ +export async function deleteCustomContentPropertyById( + client: Client, + parameters: DeleteCustomContentPropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.customContentId}/properties/${parameters.propertyId}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves Content Properties tied to a specified page. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the page. + */ +export async function getPageContentProperties( + client: Client, + parameters: GetPageContentProperties, +): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.pageId}/properties`, + method: 'GET', + searchParams: { + key: parameters.key, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: PageContentPropertiesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a new content property for a page. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the page. + */ +export async function createPageProperty(client: Client, parameters: CreatePageProperty): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.pageId}/properties`, + method: 'POST', + body: { + key: parameters.key, + value: parameters.value, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves a specific Content Property by ID that is attached to a specified page. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the page. + */ +export async function getPageContentPropertiesById( + client: Client, + parameters: GetPageContentPropertiesById, +): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.pageId}/properties/${parameters.propertyId}`, + method: 'GET', + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a content property for a page by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the page. + */ +export async function updatePagePropertyById( + client: Client, + parameters: UpdatePagePropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.pageId}/properties/${parameters.propertyId}`, + method: 'PUT', + body: { + key: parameters.key, + value: parameters.value, + version: parameters.version, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a content property for a page by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the page. + */ +export async function deletePagePropertyById(client: Client, parameters: DeletePagePropertyById): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.pageId}/properties/${parameters.propertyId}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves a specific Content Property by ID that is attached to a specified whiteboard. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the whiteboard. + */ +export async function getWhiteboardContentPropertiesById( + client: Client, + parameters: GetWhiteboardContentPropertiesById, +): Promise { + const config: SendRequestOptions = { + url: `/whiteboards/${parameters.whiteboardId}/properties/${parameters.propertyId}`, + method: 'GET', + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a content property for a whiteboard by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the whiteboard. + */ +export async function updateWhiteboardPropertyById( + client: Client, + parameters: UpdateWhiteboardPropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/whiteboards/${parameters.whiteboardId}/properties/${parameters.propertyId}`, + method: 'PUT', + body: { + key: parameters.key, + value: parameters.value, + version: parameters.version, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a content property for a whiteboard by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the whiteboard. + */ +export async function deleteWhiteboardPropertyById( + client: Client, + parameters: DeleteWhiteboardPropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/whiteboards/${parameters.whiteboardId}/properties/${parameters.propertyId}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves a specific Content Property by ID that is attached to a specified database. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the database. + */ +export async function getDatabaseContentPropertiesById( + client: Client, + parameters: GetDatabaseContentPropertiesById, +): Promise { + const config: SendRequestOptions = { + url: `/databases/${parameters.databaseId}/properties/${parameters.propertyId}`, + method: 'GET', + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a content property for a database by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the database. + */ +export async function updateDatabasePropertyById( + client: Client, + parameters: UpdateDatabasePropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/databases/${parameters.databaseId}/properties/${parameters.propertyId}`, + method: 'PUT', + body: { + key: parameters.key, + value: parameters.value, + version: parameters.version, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a content property for a database by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the database. + */ +export async function deleteDatabasePropertyById( + client: Client, + parameters: DeleteDatabasePropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/databases/${parameters.databaseId}/properties/${parameters.propertyId}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves a specific Content Property by ID that is attached to a specified Smart Link in the content tree. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the Smart Link in the + * content tree. + */ +export async function getSmartLinkContentPropertiesById( + client: Client, + parameters: GetSmartLinkContentPropertiesById, +): Promise { + const config: SendRequestOptions = { + url: `/embeds/${parameters.embedId}/properties/${parameters.propertyId}`, + method: 'GET', + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a content property for a Smart Link in the content tree by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the Smart Link in the + * content tree. + */ +export async function updateSmartLinkPropertyById( + client: Client, + parameters: UpdateSmartLinkPropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/embeds/${parameters.embedId}/properties/${parameters.propertyId}`, + method: 'PUT', + body: { + key: parameters.key, + value: parameters.value, + version: parameters.version, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a content property for a Smart Link in the content tree by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the Smart Link in the + * content tree. + */ +export async function deleteSmartLinkPropertyById( + client: Client, + parameters: DeleteSmartLinkPropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/embeds/${parameters.embedId}/properties/${parameters.propertyId}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves a specific Content Property by ID that is attached to a specified folder. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the folder. + */ +export async function getFolderContentPropertiesById( + client: Client, + parameters: GetFolderContentPropertiesById, +): Promise { + const config: SendRequestOptions = { + url: `/folders/${parameters.folderId}/properties/${parameters.propertyId}`, + method: 'GET', + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a content property for a folder by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the folder. + */ +export async function updateFolderPropertyById( + client: Client, + parameters: UpdateFolderPropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/folders/${parameters.folderId}/properties/${parameters.propertyId}`, + method: 'PUT', + body: { + key: parameters.key, + value: parameters.value, + version: parameters.version, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a content property for a folder by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the folder. + */ +export async function deleteFolderPropertyById(client: Client, parameters: DeleteFolderPropertyById): Promise { + const config: SendRequestOptions = { + url: `/folders/${parameters.folderId}/properties/${parameters.propertyId}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves Content Properties attached to a specified comment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the comment. + */ +export async function getCommentContentProperties( + client: Client, + parameters: GetCommentContentProperties, +): Promise { + const config: SendRequestOptions = { + url: `/comments/${parameters.commentId}/properties`, + method: 'GET', + searchParams: { + key: parameters.key, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: CommentContentPropertiesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a new content property for a comment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the comment. + */ +export async function createCommentProperty( + client: Client, + parameters: CreateCommentProperty, +): Promise { + const config: SendRequestOptions = { + url: `/comments/${parameters.commentId}/properties`, + method: 'POST', + body: { + key: parameters.key, + value: parameters.value, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves a specific Content Property by ID that is attached to a specified comment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the comment. + */ +export async function getCommentContentPropertiesById( + client: Client, + parameters: GetCommentContentPropertiesById, +): Promise { + const config: SendRequestOptions = { + url: `/comments/${parameters.commentId}/properties/${parameters.propertyId}`, + method: 'GET', + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a content property for a comment by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the comment. + */ +export async function updateCommentPropertyById( + client: Client, + parameters: UpdateCommentPropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/comments/${parameters.commentId}/properties/${parameters.propertyId}`, + method: 'PUT', + body: { + key: parameters.key, + value: parameters.value, + version: parameters.version, + }, + schema: ContentPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a content property for a comment by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the comment. + */ +export async function deleteCommentPropertyById(client: Client, parameters: DeleteCommentPropertyById): Promise { + const config: SendRequestOptions = { + url: `/comments/${parameters.commentId}/properties/${parameters.propertyId}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/customContent.ts b/packages/cloud/src/api/customContent.ts new file mode 100644 index 00000000..5d9f3370 --- /dev/null +++ b/packages/cloud/src/api/customContent.ts @@ -0,0 +1,215 @@ +import { + CustomContentByTypeInBlogPostSchema, + type CustomContentByTypeInBlogPost, +} from '#/models/customContentByTypeInBlogPost'; +import { CustomContentByTypeSchema, type CustomContentByType } from '#/models/customContentByType'; +import { CustomContentSchema, type CustomContent } from '#/models/customContent'; +import { CustomContentByTypeInPageSchema, type CustomContentByTypeInPage } from '#/models/customContentByTypeInPage'; +import { CustomContentByTypeInSpaceSchema, type CustomContentByTypeInSpace } from '#/models/customContentByTypeInSpace'; +import type { GetCustomContentByTypeInBlogPost } from '#/parameters/getCustomContentByTypeInBlogPost'; +import type { GetCustomContentByType } from '#/parameters/getCustomContentByType'; +import type { CreateCustomContent } from '#/parameters/createCustomContent'; +import type { GetCustomContentById } from '#/parameters/getCustomContentById'; +import type { UpdateCustomContent } from '#/parameters/updateCustomContent'; +import type { DeleteCustomContent } from '#/parameters/deleteCustomContent'; +import type { GetCustomContentByTypeInPage } from '#/parameters/getCustomContentByTypeInPage'; +import type { GetCustomContentByTypeInSpace } from '#/parameters/getCustomContentByTypeInSpace'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns all custom content for a given type within a given blogpost. The number of results is limited by the `limit` + * parameter and additional results (if available) will be available through the `next` URL present in the `Link` + * response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the custom content, the + * container of the custom content (blog post), and the corresponding space. + */ +export async function getCustomContentByTypeInBlogPost( + client: Client, + parameters: GetCustomContentByTypeInBlogPost, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}/custom-content`, + method: 'GET', + searchParams: { + type: parameters.type, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + 'body-format': parameters.bodyFormat, + }, + schema: CustomContentByTypeInBlogPostSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all custom content for a given type. The number of results is limited by the `limit` parameter and additional + * results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the custom content, the + * container of the custom content, and the corresponding space (if different from the container). + */ +export async function getCustomContentByType( + client: Client, + parameters: GetCustomContentByType, +): Promise { + const config: SendRequestOptions = { + url: '/custom-content', + method: 'GET', + searchParams: { + type: parameters.type, + id: parameters.id, + 'space-id': parameters.spaceId, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + 'body-format': parameters.bodyFormat, + }, + schema: CustomContentByTypeSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a new custom content in the given space, page, blogpost or other custom content. + * + * Only one of `spaceId`, `pageId`, `blogPostId`, or `customContentId` is required in the request body. + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page or + * blogpost and its corresponding space. Permission to create custom content in the space. + */ +export async function createCustomContent(client: Client, parameters: CreateCustomContent): Promise { + const config: SendRequestOptions = { + url: '/custom-content', + method: 'POST', + body: parameters.body, + schema: CustomContentSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a specific piece of custom content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the custom content, the + * container of the custom content, and the corresponding space (if different from the container). + */ +export async function getCustomContentById(client: Client, parameters: GetCustomContentById): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.id}`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + version: parameters.version, + 'include-labels': parameters.includeLabels, + 'include-properties': parameters.includeProperties, + 'include-operations': parameters.includeOperations, + 'include-versions': parameters.includeVersions, + 'include-version': parameters.includeVersion, + 'include-collaborators': parameters.includeCollaborators, + }, + schema: CustomContentSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a custom content by id. At most one of `spaceId`, `pageId`, `blogPostId`, or `customContentId` is allowed in + * the request body. Note that if `spaceId` is specified, it must be the same as the `spaceId` used for creating the + * custom content as moving custom content to a different space is not supported. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page or + * blogpost and its corresponding space. Permission to update custom content in the space. + */ +export async function updateCustomContent(client: Client, parameters: UpdateCustomContent): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.id}`, + method: 'PUT', + body: parameters.body, + schema: CustomContentSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Delete a custom content by id. + * + * Deleting a custom content will either move it to the trash or permanently delete it (purge it), depending on the + * apiSupport. To permanently delete a **trashed** custom content, the endpoint must be called with the following param + * `purge=true`. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page or + * blogpost and its corresponding space. Permission to delete custom content in the space. Permission to administer the + * space (if attempting to purge). + */ +export async function deleteCustomContent(client: Client, parameters: DeleteCustomContent): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.id}`, + method: 'DELETE', + searchParams: { + purge: parameters.purge, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all custom content for a given type within a given page. The number of results is limited by the `limit` + * parameter and additional results (if available) will be available through the `next` URL present in the `Link` + * response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the custom content, the + * container of the custom content (page), and the corresponding space. + */ +export async function getCustomContentByTypeInPage( + client: Client, + parameters: GetCustomContentByTypeInPage, +): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/custom-content`, + method: 'GET', + searchParams: { + type: parameters.type, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + 'body-format': parameters.bodyFormat, + }, + schema: CustomContentByTypeInPageSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all custom content for a given type within a given space. The number of results is limited by the `limit` + * parameter and additional results (if available) will be available through the `next` URL present in the `Link` + * response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the custom content and the + * corresponding space. + */ +export async function getCustomContentByTypeInSpace( + client: Client, + parameters: GetCustomContentByTypeInSpace, +): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.id}/custom-content`, + method: 'GET', + searchParams: { + type: parameters.type, + cursor: parameters.cursor, + limit: parameters.limit, + 'body-format': parameters.bodyFormat, + }, + schema: CustomContentByTypeInSpaceSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/dataPolicies.ts b/packages/cloud/src/api/dataPolicies.ts new file mode 100644 index 00000000..73654a9e --- /dev/null +++ b/packages/cloud/src/api/dataPolicies.ts @@ -0,0 +1,46 @@ +import { DataPolicyMetadataSchema, type DataPolicyMetadata } from '#/models/dataPolicyMetadata'; +import { DataPolicySpacesSchema, type DataPolicySpaces } from '#/models/dataPolicySpaces'; +import type { GetDataPolicySpaces } from '#/parameters/getDataPolicySpaces'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns data policy metadata for the workspace. + * + * **[Permissions](#permissions) required:** Only apps can make this request. Permission to access the Confluence site + * ('Can use' global permission). + */ +export async function getDataPolicyMetadata(client: Client): Promise { + const config: SendRequestOptions = { + url: '/data-policies/metadata', + method: 'GET', + schema: DataPolicyMetadataSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all spaces. The results will be sorted by id ascending. The number of results is limited by the `limit` + * parameter and additional results (if available) will be available through the `next` URL present in the `Link` + * response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Only apps can make this request. Permission to + * access the Confluence site ('Can use' global permission). Only spaces that the app has permission to view will be + * returned. + */ +export async function getDataPolicySpaces(client: Client, parameters?: GetDataPolicySpaces): Promise { + const config: SendRequestOptions = { + url: '/data-policies/spaces', + method: 'GET', + searchParams: { + ids: parameters?.ids, + keys: parameters?.keys, + sort: parameters?.sort, + cursor: parameters?.cursor, + limit: parameters?.limit, + }, + schema: DataPolicySpacesSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/database.ts b/packages/cloud/src/api/database.ts new file mode 100644 index 00000000..0dd1440b --- /dev/null +++ b/packages/cloud/src/api/database.ts @@ -0,0 +1,64 @@ +import { DatabaseSchema, type Database } from '#/models/database'; +import type { CreateDatabase } from '#/parameters/createDatabase'; +import type { GetDatabaseById } from '#/parameters/getDatabaseById'; +import type { DeleteDatabase } from '#/parameters/deleteDatabase'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Creates a database in the space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the corresponding space. + * Permission to create a database in the space. + */ +export async function createDatabase(client: Client, parameters: CreateDatabase): Promise { + const config: SendRequestOptions = { + url: '/databases', + method: 'POST', + searchParams: { + private: parameters.private, + }, + body: parameters.body, + schema: DatabaseSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a specific database. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the database and its + * corresponding space. + */ +export async function getDatabaseById(client: Client, parameters: GetDatabaseById): Promise { + const config: SendRequestOptions = { + url: `/databases/${parameters.id}`, + method: 'GET', + searchParams: { + 'include-collaborators': parameters.includeCollaborators, + 'include-direct-children': parameters.includeDirectChildren, + 'include-operations': parameters.includeOperations, + 'include-properties': parameters.includeProperties, + }, + schema: DatabaseSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Delete a database by id. + * + * Deleting a database moves the database to the trash, where it can be restored later + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the database and its + * corresponding space. Permission to delete databases in the space. + */ +export async function deleteDatabase(client: Client, parameters: DeleteDatabase): Promise { + const config: SendRequestOptions = { + url: `/databases/${parameters.id}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/descendants.ts b/packages/cloud/src/api/descendants.ts new file mode 100644 index 00000000..d5f21f97 --- /dev/null +++ b/packages/cloud/src/api/descendants.ts @@ -0,0 +1,238 @@ +import { WhiteboardDescendantsSchema, type WhiteboardDescendants } from '#/models/whiteboardDescendants'; +import { DatabaseDescendantsSchema, type DatabaseDescendants } from '#/models/databaseDescendants'; +import { SmartLinkDescendantsSchema, type SmartLinkDescendants } from '#/models/smartLinkDescendants'; +import { FolderDescendantsSchema, type FolderDescendants } from '#/models/folderDescendants'; +import { PageDescendantsSchema, type PageDescendants } from '#/models/pageDescendants'; +import type { GetWhiteboardDescendants } from '#/parameters/getWhiteboardDescendants'; +import type { GetDatabaseDescendants } from '#/parameters/getDatabaseDescendants'; +import type { GetSmartLinkDescendants } from '#/parameters/getSmartLinkDescendants'; +import type { GetFolderDescendants } from '#/parameters/getFolderDescendants'; +import type { GetPageDescendants } from '#/parameters/getPageDescendants'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns descendants in the content tree for a given whiteboard by ID in top-to-bottom order (that is, the highest + * descendant is the first item in the response payload). The number of results is limited by the `limit` parameter and + * additional results (if available) will be available by calling this endpoint with the cursor in the response payload. + * There is also a `depth` parameter specifying depth of descendants to be fetched. + * + * The following types of content will be returned: + * + * - Database + * - Embed + * - Folder + * - Page + * - Whiteboard + * + * This endpoint returns minimal information about each descendant. To fetch more details, use a related endpoint based + * on the content type, such as: + * + * - [Get database by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get) + * - [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get) + * - [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get) + * - [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get) + * - [Get whiteboard by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Permission to view the whiteboard and its corresponding space + */ +export async function getWhiteboardDescendants( + client: Client, + parameters: GetWhiteboardDescendants, +): Promise { + const config: SendRequestOptions = { + url: `/whiteboards/${parameters.id}/descendants`, + method: 'GET', + searchParams: { + limit: parameters.limit, + depth: parameters.depth, + cursor: parameters.cursor, + }, + schema: WhiteboardDescendantsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns descendants in the content tree for a given database by ID in top-to-bottom order (that is, the highest + * descendant is the first item in the response payload). The number of results is limited by the `limit` parameter and + * additional results (if available) will be available by calling this endpoint with the cursor in the response payload. + * There is also a `depth` parameter specifying depth of descendants to be fetched. + * + * The following types of content will be returned: + * + * - Database + * - Embed + * - Folder + * - Page + * - Whiteboard + * + * This endpoint returns minimal information about each descendant. To fetch more details, use a related endpoint based + * on the content type, such as: + * + * - [Get database by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get) + * - [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get) + * - [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get) + * - [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get) + * - [Get whiteboard by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Permission to view the database and its corresponding space + */ +export async function getDatabaseDescendants( + client: Client, + parameters: GetDatabaseDescendants, +): Promise { + const config: SendRequestOptions = { + url: `/databases/${parameters.id}/descendants`, + method: 'GET', + searchParams: { + limit: parameters.limit, + depth: parameters.depth, + cursor: parameters.cursor, + }, + schema: DatabaseDescendantsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns descendants in the content tree for a given smart link by ID in top-to-bottom order (that is, the highest + * descendant is the first item in the response payload). The number of results is limited by the `limit` parameter and + * additional results (if available) will be available by calling this endpoint with the cursor in the response payload. + * There is also a `depth` parameter specifying depth of descendants to be fetched. + * + * The following types of content will be returned: + * + * - Database + * - Embed + * - Folder + * - Page + * - Whiteboard + * + * This endpoint returns minimal information about each descendant. To fetch more details, use a related endpoint based + * on the content type, such as: + * + * - [Get database by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get) + * - [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get) + * - [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get) + * - [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get) + * - [Get whiteboard by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Permission to view the smart link and its corresponding space + */ +export async function getSmartLinkDescendants( + client: Client, + parameters: GetSmartLinkDescendants, +): Promise { + const config: SendRequestOptions = { + url: `/embeds/${parameters.id}/descendants`, + method: 'GET', + searchParams: { + limit: parameters.limit, + depth: parameters.depth, + cursor: parameters.cursor, + }, + schema: SmartLinkDescendantsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns descendants in the content tree for a given folder by ID in top-to-bottom order (that is, the highest + * descendant is the first item in the response payload). The number of results is limited by the `limit` parameter and + * additional results (if available) will be available by calling this endpoint with the cursor in the response payload. + * There is also a `depth` parameter specifying depth of descendants to be fetched. + * + * The following types of content will be returned: + * + * - Database + * - Embed + * - Folder + * - Page + * - Whiteboard + * + * This endpoint returns minimal information about each descendant. To fetch more details, use a related endpoint based + * on the content type, such as: + * + * - [Get database by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get) + * - [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get) + * - [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get) + * - [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get) + * - [Get whiteboard by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Permission to view the and its corresponding space + */ +export async function getFolderDescendants( + client: Client, + parameters: GetFolderDescendants, +): Promise { + const config: SendRequestOptions = { + url: `/folders/${parameters.id}/descendants`, + method: 'GET', + searchParams: { + limit: parameters.limit, + depth: parameters.depth, + cursor: parameters.cursor, + }, + schema: FolderDescendantsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns descendants in the content tree for a given page by ID in top-to-bottom order (that is, the highest + * descendant is the first item in the response payload). The number of results is limited by the `limit` parameter and + * additional results (if available) will be available by calling this endpoint with the cursor in the response payload. + * There is also a `depth` parameter specifying depth of descendants to be fetched. + * + * The following types of content will be returned: + * + * - Database + * - Embed + * - Folder + * - Page + * - Whiteboard + * + * This endpoint returns minimal information about each descendant. To fetch more details, use a related endpoint based + * on the content type, such as: + * + * - [Get database by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-database/#api-databases-id-get) + * - [Get embed by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-smart-link/#api-embeds-id-get) + * - [Get folder by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-folder/#api-folders-id-get) + * - [Get page by id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-page/#api-pages-id-get) + * - [Get whiteboard by + * id](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-whiteboard/#api-whiteboards-id-get). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Permission to view the page and its corresponding space + */ +export async function getPageDescendants(client: Client, parameters: GetPageDescendants): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/descendants`, + method: 'GET', + searchParams: { + limit: parameters.limit, + depth: parameters.depth, + cursor: parameters.cursor, + }, + schema: PageDescendantsSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/folder.ts b/packages/cloud/src/api/folder.ts new file mode 100644 index 00000000..ce0c456d --- /dev/null +++ b/packages/cloud/src/api/folder.ts @@ -0,0 +1,61 @@ +import { FolderSchema, type Folder } from '#/models/folder'; +import type { CreateFolder } from '#/parameters/createFolder'; +import type { GetFolderById } from '#/parameters/getFolderById'; +import type { DeleteFolder } from '#/parameters/deleteFolder'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Creates a folder in the space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the corresponding space. + * Permission to create a folder in the space. + */ +export async function createFolder(client: Client, parameters: CreateFolder): Promise { + const config: SendRequestOptions = { + url: '/folders', + method: 'POST', + body: parameters.body, + schema: FolderSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a specific folder. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the folder and its + * corresponding space. + */ +export async function getFolderById(client: Client, parameters: GetFolderById): Promise { + const config: SendRequestOptions = { + url: `/folders/${parameters.id}`, + method: 'GET', + searchParams: { + 'include-collaborators': parameters.includeCollaborators, + 'include-direct-children': parameters.includeDirectChildren, + 'include-operations': parameters.includeOperations, + 'include-properties': parameters.includeProperties, + }, + schema: FolderSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Delete a folder by id. + * + * Deleting a folder moves the folder to the trash, where it can be restored later + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the folder and its + * corresponding space. Permission to delete folders in the space. + */ +export async function deleteFolder(client: Client, parameters: DeleteFolder): Promise { + const config: SendRequestOptions = { + url: `/folders/${parameters.id}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/index.ts b/packages/cloud/src/api/index.ts new file mode 100644 index 00000000..f106f23f --- /dev/null +++ b/packages/cloud/src/api/index.ts @@ -0,0 +1,59 @@ +export * from './adminKey.js'; + +export * from './ancestors.js'; + +export * from './appProperties.js'; + +export * from './attachment.js'; + +export * from './blogPost.js'; + +export * from './children.js'; + +export * from './classificationLevel.js'; + +export * from './comment.js'; + +export * from './content.js'; + +export * from './contentProperties.js'; + +export * from './customContent.js'; + +export * from './dataPolicies.js'; + +export * from './database.js'; + +export * from './descendants.js'; + +export * from './folder.js'; + +export * from './label.js'; + +export * from './like.js'; + +export * from './operation.js'; + +export * from './page.js'; + +export * from './redactions.js'; + +export * from './smartLink.js'; + +export * from './space.js'; + +export * from './spacePermissionTransition.js'; + +export * from './spacePermissions.js'; + +export * from './spaceProperties.js'; + +export * from './spaceRoles.js'; + +export * from './task.js'; + +export * from './user.js'; + +export * from './version.js'; + +export * from './whiteboard.js'; diff --git a/packages/cloud/src/api/label.ts b/packages/cloud/src/api/label.ts new file mode 100644 index 00000000..ea8bac5e --- /dev/null +++ b/packages/cloud/src/api/label.ts @@ -0,0 +1,185 @@ +import { AttachmentLabelsSchema, type AttachmentLabels } from '#/models/attachmentLabels'; +import { BlogPostLabelsSchema, type BlogPostLabels } from '#/models/blogPostLabels'; +import { CustomContentLabelsSchema, type CustomContentLabels } from '#/models/customContentLabels'; +import { LabelsSchema, type Labels } from '#/models/labels'; +import { PageLabelsSchema, type PageLabels } from '#/models/pageLabels'; +import { SpaceLabelsSchema, type SpaceLabels } from '#/models/spaceLabels'; +import { SpaceContentLabelsSchema, type SpaceContentLabels } from '#/models/spaceContentLabels'; +import type { GetAttachmentLabels } from '#/parameters/getAttachmentLabels'; +import type { GetBlogPostLabels } from '#/parameters/getBlogPostLabels'; +import type { GetCustomContentLabels } from '#/parameters/getCustomContentLabels'; +import type { GetLabels } from '#/parameters/getLabels'; +import type { GetPageLabels } from '#/parameters/getPageLabels'; +import type { GetSpaceLabels } from '#/parameters/getSpaceLabels'; +import type { GetSpaceContentLabels } from '#/parameters/getSpaceContentLabels'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns the labels of specific attachment. The number of results is limited by the `limit` parameter and additional + * results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the parent content of the + * attachment and its corresponding space. Only labels that the user has permission to view will be returned. + */ +export async function getAttachmentLabels(client: Client, parameters: GetAttachmentLabels): Promise { + const config: SendRequestOptions = { + url: `/attachments/${parameters.id}/labels`, + method: 'GET', + searchParams: { + prefix: parameters.prefix, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: AttachmentLabelsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the labels of specific blog post. The number of results is limited by the `limit` parameter and additional + * results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the blog + * post and its corresponding space. Only labels that the user has permission to view will be returned. + */ +export async function getBlogPostLabels(client: Client, parameters: GetBlogPostLabels): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}/labels`, + method: 'GET', + searchParams: { + prefix: parameters.prefix, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: BlogPostLabelsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the labels for a specific piece of custom content. The number of results is limited by the `limit` parameter + * and additional results (if available) will be available through the `next` URL present in the `Link` response + * header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the custom content and its + * corresponding space. Only labels that the user has permission to view will be returned. + */ +export async function getCustomContentLabels( + client: Client, + parameters: GetCustomContentLabels, +): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.id}/labels`, + method: 'GET', + searchParams: { + prefix: parameters.prefix, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: CustomContentLabelsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all labels. The number of results is limited by the `limit` parameter and additional results (if available) + * will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Only labels that the user has permission to view will be returned. + */ +export async function getLabels(client: Client, parameters?: GetLabels): Promise { + const config: SendRequestOptions = { + url: '/labels', + method: 'GET', + searchParams: { + 'label-id': parameters?.labelId, + prefix: parameters?.prefix, + cursor: parameters?.cursor, + sort: parameters?.sort, + limit: parameters?.limit, + }, + schema: LabelsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the labels of specific page. The number of results is limited by the `limit` parameter and additional results + * (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page and + * its corresponding space. Only labels that the user has permission to view will be returned. + */ +export async function getPageLabels(client: Client, parameters: GetPageLabels): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/labels`, + method: 'GET', + searchParams: { + prefix: parameters.prefix, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: PageLabelsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the labels of specific space. The number of results is limited by the `limit` parameter and additional + * results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the space. Only labels that + * the user has permission to view will be returned. + */ +export async function getSpaceLabels(client: Client, parameters: GetSpaceLabels): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.id}/labels`, + method: 'GET', + searchParams: { + prefix: parameters.prefix, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: SpaceLabelsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the labels of space content (pages, blogposts etc). The number of results is limited by the `limit` parameter + * and additional results (if available) will be available through the `next` URL present in the `Link` response + * header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the space. Only labels that + * the user has permission to view will be returned. + */ +export async function getSpaceContentLabels( + client: Client, + parameters: GetSpaceContentLabels, +): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.id}/content/labels`, + method: 'GET', + searchParams: { + prefix: parameters.prefix, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: SpaceContentLabelsSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/like.ts b/packages/cloud/src/api/like.ts new file mode 100644 index 00000000..32dfe592 --- /dev/null +++ b/packages/cloud/src/api/like.ts @@ -0,0 +1,167 @@ +import { BlogPostLikeCountSchema, type BlogPostLikeCount } from '#/models/blogPostLikeCount'; +import { BlogPostLikeUsersSchema, type BlogPostLikeUsers } from '#/models/blogPostLikeUsers'; +import { PageLikeCountSchema, type PageLikeCount } from '#/models/pageLikeCount'; +import { PageLikeUsersSchema, type PageLikeUsers } from '#/models/pageLikeUsers'; +import { FooterLikeCountSchema, type FooterLikeCount } from '#/models/footerLikeCount'; +import { FooterLikeUsersSchema, type FooterLikeUsers } from '#/models/footerLikeUsers'; +import { InlineLikeCountSchema, type InlineLikeCount } from '#/models/inlineLikeCount'; +import { InlineLikeUsersSchema, type InlineLikeUsers } from '#/models/inlineLikeUsers'; +import type { GetBlogPostLikeCount } from '#/parameters/getBlogPostLikeCount'; +import type { GetBlogPostLikeUsers } from '#/parameters/getBlogPostLikeUsers'; +import type { GetPageLikeCount } from '#/parameters/getPageLikeCount'; +import type { GetPageLikeUsers } from '#/parameters/getPageLikeUsers'; +import type { GetFooterLikeCount } from '#/parameters/getFooterLikeCount'; +import type { GetFooterLikeUsers } from '#/parameters/getFooterLikeUsers'; +import type { GetInlineLikeCount } from '#/parameters/getInlineLikeCount'; +import type { GetInlineLikeUsers } from '#/parameters/getInlineLikeUsers'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns the count of likes of specific blog post. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the blog + * post and its corresponding space. + */ +export async function getBlogPostLikeCount( + client: Client, + parameters: GetBlogPostLikeCount, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}/likes/count`, + method: 'GET', + schema: BlogPostLikeCountSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the account IDs of likes of specific blog post. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the blog + * post and its corresponding space. + */ +export async function getBlogPostLikeUsers( + client: Client, + parameters: GetBlogPostLikeUsers, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}/likes/users`, + method: 'GET', + searchParams: { + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: BlogPostLikeUsersSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the count of likes of specific page. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page and + * its corresponding space. + */ +export async function getPageLikeCount(client: Client, parameters: GetPageLikeCount): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/likes/count`, + method: 'GET', + schema: PageLikeCountSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the account IDs of likes of specific page. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page and + * its corresponding space. + */ +export async function getPageLikeUsers(client: Client, parameters: GetPageLikeUsers): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/likes/users`, + method: 'GET', + searchParams: { + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: PageLikeUsersSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the count of likes of specific footer comment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the + * page/blogpost and its corresponding space. + */ +export async function getFooterLikeCount(client: Client, parameters: GetFooterLikeCount): Promise { + const config: SendRequestOptions = { + url: `/footer-comments/${parameters.id}/likes/count`, + method: 'GET', + schema: FooterLikeCountSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the account IDs of likes of specific footer comment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the + * page/blogpost and its corresponding space. + */ +export async function getFooterLikeUsers(client: Client, parameters: GetFooterLikeUsers): Promise { + const config: SendRequestOptions = { + url: `/footer-comments/${parameters.id}/likes/users`, + method: 'GET', + searchParams: { + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: FooterLikeUsersSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the count of likes of specific inline comment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the + * page/blogpost and its corresponding space. + */ +export async function getInlineLikeCount(client: Client, parameters: GetInlineLikeCount): Promise { + const config: SendRequestOptions = { + url: `/inline-comments/${parameters.id}/likes/count`, + method: 'GET', + schema: InlineLikeCountSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the account IDs of likes of specific inline comment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the + * page/blogpost and its corresponding space. + */ +export async function getInlineLikeUsers(client: Client, parameters: GetInlineLikeUsers): Promise { + const config: SendRequestOptions = { + url: `/inline-comments/${parameters.id}/likes/users`, + method: 'GET', + searchParams: { + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: InlineLikeUsersSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/operation.ts b/packages/cloud/src/api/operation.ts new file mode 100644 index 00000000..4a923948 --- /dev/null +++ b/packages/cloud/src/api/operation.ts @@ -0,0 +1,215 @@ +import { PermittedOperationsSchema, type PermittedOperations } from '#/models/permittedOperations'; +import type { GetAttachmentOperations } from '#/parameters/getAttachmentOperations'; +import type { GetBlogPostOperations } from '#/parameters/getBlogPostOperations'; +import type { GetCustomContentOperations } from '#/parameters/getCustomContentOperations'; +import type { GetPageOperations } from '#/parameters/getPageOperations'; +import type { GetWhiteboardOperations } from '#/parameters/getWhiteboardOperations'; +import type { GetDatabaseOperations } from '#/parameters/getDatabaseOperations'; +import type { GetSmartLinkOperations } from '#/parameters/getSmartLinkOperations'; +import type { GetFolderOperations } from '#/parameters/getFolderOperations'; +import type { GetSpaceOperations } from '#/parameters/getSpaceOperations'; +import type { GetFooterCommentOperations } from '#/parameters/getFooterCommentOperations'; +import type { GetInlineCommentOperations } from '#/parameters/getInlineCommentOperations'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns the permitted operations on specific attachment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the parent content of the + * attachment and its corresponding space. + */ +export async function getAttachmentOperations( + client: Client, + parameters: GetAttachmentOperations, +): Promise { + const config: SendRequestOptions = { + url: `/attachments/${parameters.id}/operations`, + method: 'GET', + schema: PermittedOperationsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the permitted operations on specific blog post. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the parent content of the + * blog post and its corresponding space. + */ +export async function getBlogPostOperations( + client: Client, + parameters: GetBlogPostOperations, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}/operations`, + method: 'GET', + schema: PermittedOperationsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the permitted operations on specific custom content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the parent content of the + * custom content and its corresponding space. + */ +export async function getCustomContentOperations( + client: Client, + parameters: GetCustomContentOperations, +): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.id}/operations`, + method: 'GET', + schema: PermittedOperationsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the permitted operations on specific page. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the parent content of the + * page and its corresponding space. + */ +export async function getPageOperations(client: Client, parameters: GetPageOperations): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/operations`, + method: 'GET', + schema: PermittedOperationsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the permitted operations on specific whiteboard. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the whiteboard and its + * corresponding space. + */ +export async function getWhiteboardOperations( + client: Client, + parameters: GetWhiteboardOperations, +): Promise { + const config: SendRequestOptions = { + url: `/whiteboards/${parameters.id}/operations`, + method: 'GET', + schema: PermittedOperationsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the permitted operations on specific database. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the database and its + * corresponding space. + */ +export async function getDatabaseOperations( + client: Client, + parameters: GetDatabaseOperations, +): Promise { + const config: SendRequestOptions = { + url: `/databases/${parameters.id}/operations`, + method: 'GET', + schema: PermittedOperationsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the permitted operations on specific Smart Link in the content tree. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the Smart Link in the + * content tree and its corresponding space. + */ +export async function getSmartLinkOperations( + client: Client, + parameters: GetSmartLinkOperations, +): Promise { + const config: SendRequestOptions = { + url: `/embeds/${parameters.id}/operations`, + method: 'GET', + schema: PermittedOperationsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the permitted operations on specific folder. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the folder and its + * corresponding space. + */ +export async function getFolderOperations( + client: Client, + parameters: GetFolderOperations, +): Promise { + const config: SendRequestOptions = { + url: `/folders/${parameters.id}/operations`, + method: 'GET', + schema: PermittedOperationsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the permitted operations on specific space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the corresponding space. + */ +export async function getSpaceOperations(client: Client, parameters: GetSpaceOperations): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.id}/operations`, + method: 'GET', + schema: PermittedOperationsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the permitted operations on specific footer comment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the parent content of the + * footer comment and its corresponding space. + */ +export async function getFooterCommentOperations( + client: Client, + parameters: GetFooterCommentOperations, +): Promise { + const config: SendRequestOptions = { + url: `/footer-comments/${parameters.id}/operations`, + method: 'GET', + schema: PermittedOperationsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the permitted operations on specific inline comment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the parent content of the + * inline comment and its corresponding space. + */ +export async function getInlineCommentOperations( + client: Client, + parameters: GetInlineCommentOperations, +): Promise { + const config: SendRequestOptions = { + url: `/inline-comments/${parameters.id}/operations`, + method: 'GET', + schema: PermittedOperationsSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/page.ts b/packages/cloud/src/api/page.ts new file mode 100644 index 00000000..bf4d1c96 --- /dev/null +++ b/packages/cloud/src/api/page.ts @@ -0,0 +1,215 @@ +import { LabelPagesSchema, type LabelPages } from '#/models/labelPages'; +import { PagesSchema, type Pages } from '#/models/pages'; +import { PageSchema, type Page } from '#/models/page'; +import { PagesInSpaceSchema, type PagesInSpace } from '#/models/pagesInSpace'; +import type { GetLabelPages } from '#/parameters/getLabelPages'; +import type { GetPages } from '#/parameters/getPages'; +import type { CreatePage } from '#/parameters/createPage'; +import type { GetPageById } from '#/parameters/getPageById'; +import type { UpdatePage } from '#/parameters/updatePage'; +import type { DeletePage } from '#/parameters/deletePage'; +import type { UpdatePageTitle } from '#/parameters/updatePageTitle'; +import type { GetPagesInSpace } from '#/parameters/getPagesInSpace'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns the pages of specified label. The number of results is limited by the `limit` parameter and additional + * results (if available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page and + * its corresponding space. + */ +export async function getLabelPages(client: Client, parameters: GetLabelPages): Promise { + const config: SendRequestOptions = { + url: `/labels/${parameters.id}/pages`, + method: 'GET', + searchParams: { + 'space-id': parameters.spaceId, + 'body-format': parameters.bodyFormat, + sort: parameters.sort, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: LabelPagesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all pages. The number of results is limited by the `limit` parameter and additional results (if available) + * will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Only pages that the user has permission to view will be returned. + */ +export async function getPages(client: Client, parameters?: GetPages): Promise { + const config: SendRequestOptions = { + url: '/pages', + method: 'GET', + searchParams: { + id: parameters?.id, + 'space-id': parameters?.spaceId, + sort: parameters?.sort, + status: parameters?.status, + title: parameters?.title, + 'body-format': parameters?.bodyFormat, + subtype: parameters?.subtype, + cursor: parameters?.cursor, + limit: parameters?.limit, + }, + schema: PagesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a page in the space. + * + * Pages are created as published by default unless specified as a draft in the status field. If creating a published + * page, the title must be specified. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the corresponding space. + * Permission to create a page in the space. + */ +export async function createPage(client: Client, parameters: CreatePage): Promise { + const config: SendRequestOptions = { + url: '/pages', + method: 'POST', + searchParams: { + embedded: parameters.embedded, + private: parameters.private, + 'root-level': parameters.rootLevel, + }, + body: parameters.body, + schema: PageSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a specific page. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the page and its + * corresponding space. + */ +export async function getPageById(client: Client, parameters: GetPageById): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + 'get-draft': parameters.getDraft, + status: parameters.status, + version: parameters.version, + 'include-labels': parameters.includeLabels, + 'include-properties': parameters.includeProperties, + 'include-operations': parameters.includeOperations, + 'include-likes': parameters.includeLikes, + 'include-versions': parameters.includeVersions, + 'include-version': parameters.includeVersion, + 'include-favorited-by-current-user-status': parameters.includeFavoritedByCurrentUserStatus, + 'include-webresources': parameters.includeWebresources, + 'include-collaborators': parameters.includeCollaborators, + 'include-direct-children': parameters.includeDirectChildren, + }, + schema: PageSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a page by id. + * + * When the "current" version is updated, the provided body content is considered as the latest version. This latest + * body content will be attempted to be merged into the draft version through a content reconciliation algorithm. If two + * versions are significantly diverged, the latest provided content may entirely override what was previously in the + * draft. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the page and its + * corresponding space. Permission to update pages in the space. + */ +export async function updatePage(client: Client, parameters: UpdatePage): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}`, + method: 'PUT', + body: parameters.body, + schema: PageSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Delete a page by id. + * + * By default this will delete pages that are non-drafts. To delete a page that is a draft, the endpoint must be called + * on a draft with the following param `draft=true`. Discarded drafts are not sent to the trash and are permanently + * deleted. + * + * Deleting a page moves the page to the trash, where it can be restored later. To permanently delete a page (or "purge" + * it), the endpoint must be called on a **trashed** page with the following param `purge=true`. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the page and its + * corresponding space. Permission to delete pages in the space. Permission to administer the space (if attempting to + * purge). + */ +export async function deletePage(client: Client, parameters: DeletePage): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}`, + method: 'DELETE', + searchParams: { + purge: parameters.purge, + draft: parameters.draft, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Updates the title of a specified page. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the page and its + * corresponding space. Permission to update pages in the space. + */ +export async function updatePageTitle(client: Client, parameters: UpdatePageTitle): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/title`, + method: 'PUT', + body: parameters.body, + schema: PageSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all pages in a space. The number of results is limited by the `limit` parameter and additional results (if + * available) will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission) and 'View' permission for the space. Only pages that the user has permission to view will be + * returned. + */ +export async function getPagesInSpace(client: Client, parameters: GetPagesInSpace): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.id}/pages`, + method: 'GET', + searchParams: { + depth: parameters.depth, + sort: parameters.sort, + status: parameters.status, + title: parameters.title, + 'body-format': parameters.bodyFormat, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: PagesInSpaceSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/redactions.ts b/packages/cloud/src/api/redactions.ts new file mode 100644 index 00000000..ab42c03b --- /dev/null +++ b/packages/cloud/src/api/redactions.ts @@ -0,0 +1,42 @@ +import { RedactionResponseSchema, type RedactionResponse } from '#/models/redactionResponse'; +import type { PostRedactPage } from '#/parameters/postRedactPage'; +import type { PostRedactBlog } from '#/parameters/postRedactBlog'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Redacts sensitive content in a Confluence page by replacing specified text ranges with redaction markers. Each + * redaction in the response includes a unique UUID for restoration (except code block redactions). The response + * metadata items maintain the same order as the input redaction pointers, and completely overlapping redactions are + * merged into a single redaction with one UUID. + * + * **Note**: This endpoint requires **Atlassian Guard Premium**. + */ +export async function postRedactPage(client: Client, parameters: PostRedactPage): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/redact`, + method: 'POST', + body: parameters.body, + schema: RedactionResponseSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Redacts sensitive content in a Confluence blog post by replacing specified text ranges with redaction markers. Each + * redaction in the response includes a unique UUID for restoration (except code block redactions). The response + * metadata items maintain the same order as the input redaction pointers, and completely overlapping redactions are + * merged into a single redaction with one UUID. + * + * **Note**: This endpoint requires **Atlassian Guard Premium**. + */ +export async function postRedactBlog(client: Client, parameters: PostRedactBlog): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}/redact`, + method: 'POST', + body: parameters.body, + schema: RedactionResponseSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/smartLink.ts b/packages/cloud/src/api/smartLink.ts new file mode 100644 index 00000000..4068d5b0 --- /dev/null +++ b/packages/cloud/src/api/smartLink.ts @@ -0,0 +1,61 @@ +import { SmartLinkSchema, type SmartLink } from '#/models/smartLink'; +import type { CreateSmartLink } from '#/parameters/createSmartLink'; +import type { GetSmartLinkById } from '#/parameters/getSmartLinkById'; +import type { DeleteSmartLink } from '#/parameters/deleteSmartLink'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Creates a Smart Link in the content tree in the space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the corresponding space. + * Permission to create a Smart Link in the content tree in the space. + */ +export async function createSmartLink(client: Client, parameters: CreateSmartLink): Promise { + const config: SendRequestOptions = { + url: '/embeds', + method: 'POST', + body: parameters.body, + schema: SmartLinkSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a specific Smart Link in the content tree. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the Smart Link in the + * content tree and its corresponding space. + */ +export async function getSmartLinkById(client: Client, parameters: GetSmartLinkById): Promise { + const config: SendRequestOptions = { + url: `/embeds/${parameters.id}`, + method: 'GET', + searchParams: { + 'include-collaborators': parameters.includeCollaborators, + 'include-direct-children': parameters.includeDirectChildren, + 'include-operations': parameters.includeOperations, + 'include-properties': parameters.includeProperties, + }, + schema: SmartLinkSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Delete a Smart Link in the content tree by id. + * + * Deleting a Smart Link in the content tree moves the Smart Link to the trash, where it can be restored later + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the Smart Link in the + * content tree and its corresponding space. Permission to delete Smart Links in the content tree in the space. + */ +export async function deleteSmartLink(client: Client, parameters: DeleteSmartLink): Promise { + const config: SendRequestOptions = { + url: `/embeds/${parameters.id}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/space.ts b/packages/cloud/src/api/space.ts new file mode 100644 index 00000000..c2585f49 --- /dev/null +++ b/packages/cloud/src/api/space.ts @@ -0,0 +1,82 @@ +import { SpacesSchema, type Spaces } from '#/models/spaces'; +import { SpaceSummarySchema, type SpaceSummary } from '#/models/spaceSummary'; +import { SpaceSchema, type Space } from '#/models/space'; +import type { GetSpaces } from '#/parameters/getSpaces'; +import type { CreateSpace } from '#/parameters/createSpace'; +import type { GetSpaceById } from '#/parameters/getSpaceById'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns all spaces. The results will be sorted by id ascending. The number of results is limited by the `limit` + * parameter and additional results (if available) will be available through the `next` URL present in the `Link` + * response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Only spaces that the user has permission to view will be returned. + */ +export async function getSpaces(client: Client, parameters?: GetSpaces): Promise { + const config: SendRequestOptions = { + url: '/spaces', + method: 'GET', + searchParams: { + ids: parameters?.ids, + keys: parameters?.keys, + type: parameters?.type, + status: parameters?.status, + labels: parameters?.labels, + 'favorited-by': parameters?.favoritedBy, + 'not-favorited-by': parameters?.notFavoritedBy, + sort: parameters?.sort, + 'description-format': parameters?.descriptionFormat, + 'include-icon': parameters?.includeIcon, + cursor: parameters?.cursor, + limit: parameters?.limit, + }, + schema: SpacesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a Space as specified in the payload. + * + * Available on tenants with [Role-Based Access + * Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to create spaces. + */ +export async function createSpace(client: Client, parameters: CreateSpace): Promise { + const config: SendRequestOptions = { + url: '/spaces', + method: 'POST', + body: parameters.body, + schema: SpaceSummarySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a specific space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the space. + */ +export async function getSpaceById(client: Client, parameters: GetSpaceById): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.id}`, + method: 'GET', + searchParams: { + 'description-format': parameters.descriptionFormat, + 'include-icon': parameters.includeIcon, + 'include-operations': parameters.includeOperations, + 'include-properties': parameters.includeProperties, + 'include-permissions': parameters.includePermissions, + 'include-role-assignments': parameters.includeRoleAssignments, + 'include-labels': parameters.includeLabels, + }, + schema: SpaceSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/spacePermissionTransition.ts b/packages/cloud/src/api/spacePermissionTransition.ts new file mode 100644 index 00000000..8d51f665 --- /dev/null +++ b/packages/cloud/src/api/spacePermissionTransition.ts @@ -0,0 +1,123 @@ +import { + ListSpacePermissionCombinationsResponseSchema, + type ListSpacePermissionCombinationsResponse, +} from '#/models/listSpacePermissionCombinationsResponse'; +import { BulkTransitionTaskSchema, type BulkTransitionTask } from '#/models/bulkTransitionTask'; +import { BulkTransitionTaskStatusSchema, type BulkTransitionTaskStatus } from '#/models/bulkTransitionTaskStatus'; +import type { ListSpacePermissionCombinations } from '#/parameters/listSpacePermissionCombinations'; +import type { BulkAssignSpacePermissionRoles } from '#/parameters/bulkAssignSpacePermissionRoles'; +import type { BulkRemoveSpacePermissionAccess } from '#/parameters/bulkRemoveSpacePermissionAccess'; +import type { GetSpacePermissionTransitionTaskStatus } from '#/parameters/getSpacePermissionTransitionTaskStatus'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Lists the unique unassigned space permission combinations currently present on the tenant. Combinations that already + * map to a space role are filtered out server-side. Each row carries the decoded set of space permissions and the + * principal types that currently hold the combination — these inform which `principalType` values are valid to include + * in the matching bulk role-assignments request. + * + * Results are always sorted by `principalCount` descending. Sort field and sort order are not configurable; page size + * is controlled by the `limit` query parameter (default 25, min 1, max 250). Use the `cursor` field to page through + * additional results. The `generatedAt` field reflects the last audit run that populated the combinations table — call + * the generate-combinations endpoint to refresh stale data. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a Confluence administrator. + */ +export async function listSpacePermissionCombinations( + client: Client, + parameters?: ListSpacePermissionCombinations, +): Promise { + const config: SendRequestOptions = { + url: '/space-permissions/transition/combinations', + method: 'GET', + searchParams: { + cursor: parameters?.cursor, + limit: parameters?.limit, + }, + schema: ListSpacePermissionCombinationsResponseSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Submits a task to refresh the space permission combinations in the database, which identifies all unique permission + * combinations across the site. This provides permission combination IDs that can be used with the assign-roles and + * remove-access endpoints. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a Confluence administrator. + */ +export async function generateSpacePermissionCombinations(client: Client): Promise { + const config: SendRequestOptions = { + url: '/space-permissions/transition/combinations', + method: 'POST', + schema: BulkTransitionTaskSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Bulk assigns roles for one or more permission combination IDs obtained from the space permission combinations. + * Supports targeting all spaces, specific spaces, or excluding specific spaces. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a Confluence administrator. + */ +export async function bulkAssignSpacePermissionRoles( + client: Client, + parameters: BulkAssignSpacePermissionRoles, +): Promise { + const config: SendRequestOptions = { + url: '/space-permissions/transition/role-assignments', + method: 'POST', + body: { + assignments: parameters.assignments, + spaceSelection: parameters.spaceSelection, + }, + schema: BulkTransitionTaskSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Bulk removes access for one or more permission combination IDs obtained from the space permission combinations. This + * removes all space permissions for the specified combinations across the targeted spaces. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a Confluence administrator. + */ +export async function bulkRemoveSpacePermissionAccess( + client: Client, + parameters: BulkRemoveSpacePermissionAccess, +): Promise { + const config: SendRequestOptions = { + url: '/space-permissions/transition/access-removals', + method: 'POST', + body: { + permissionCombinationIds: parameters.permissionCombinationIds, + spaceSelection: parameters.spaceSelection, + }, + schema: BulkTransitionTaskSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves the status of an async space permission transition task. Use the taskId returned from the + * generate-combinations, assign-roles, or remove-access endpoints to poll for progress and completion. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a Confluence administrator. + */ +export async function getSpacePermissionTransitionTaskStatus( + client: Client, + parameters: GetSpacePermissionTransitionTaskStatus, +): Promise { + const config: SendRequestOptions = { + url: `/space-permissions/transition/tasks/${parameters.taskId}`, + method: 'GET', + schema: BulkTransitionTaskStatusSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/spacePermissions.ts b/packages/cloud/src/api/spacePermissions.ts new file mode 100644 index 00000000..ecb8d242 --- /dev/null +++ b/packages/cloud/src/api/spacePermissions.ts @@ -0,0 +1,55 @@ +import { + SpacePermissionsAssignmentsSchema, + type SpacePermissionsAssignments, +} from '#/models/spacePermissionsAssignments'; +import { AvailableSpacePermissionsSchema, type AvailableSpacePermissions } from '#/models/availableSpacePermissions'; +import type { GetSpacePermissionsAssignments } from '#/parameters/getSpacePermissionsAssignments'; +import type { GetAvailableSpacePermissions } from '#/parameters/getAvailableSpacePermissions'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns space permission assignments for a specific space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the space. + */ +export async function getSpacePermissionsAssignments( + client: Client, + parameters: GetSpacePermissionsAssignments, +): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.id}/permissions`, + method: 'GET', + searchParams: { + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: SpacePermissionsAssignmentsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves the available space permissions. + * + * Available on tenants with [Role-Based Access + * Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site. + */ +export async function getAvailableSpacePermissions( + client: Client, + parameters?: GetAvailableSpacePermissions, +): Promise { + const config: SendRequestOptions = { + url: '/space-permissions', + method: 'GET', + searchParams: { + cursor: parameters?.cursor, + limit: parameters?.limit, + }, + schema: AvailableSpacePermissionsSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/spaceProperties.ts b/packages/cloud/src/api/spaceProperties.ts new file mode 100644 index 00000000..4a4a1b9d --- /dev/null +++ b/packages/cloud/src/api/spaceProperties.ts @@ -0,0 +1,106 @@ +import { SpacePropertiesSchema, type SpaceProperties } from '#/models/spaceProperties'; +import { SpacePropertySchema, type SpaceProperty } from '#/models/spaceProperty'; +import type { GetSpaceProperties } from '#/parameters/getSpaceProperties'; +import type { CreateSpaceProperty } from '#/parameters/createSpaceProperty'; +import type { GetSpacePropertyById } from '#/parameters/getSpacePropertyById'; +import type { UpdateSpacePropertyById } from '#/parameters/updateSpacePropertyById'; +import type { DeleteSpacePropertyById } from '#/parameters/deleteSpacePropertyById'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns all properties for the given space. Space properties are a key-value storage associated with a space. The + * limit parameter specifies the maximum number of results returned in a single response. Use the `link` response header + * to paginate through additional results. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission) and 'View' permission for the space. + */ +export async function getSpaceProperties(client: Client, parameters: GetSpaceProperties): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.spaceId}/properties`, + method: 'GET', + searchParams: { + key: parameters.key, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: SpacePropertiesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a new space property. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission) and 'Admin' permission for the space. + */ +export async function createSpaceProperty(client: Client, parameters: CreateSpaceProperty): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.spaceId}/properties`, + method: 'POST', + body: { + key: parameters.key, + value: parameters.value, + }, + schema: SpacePropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieve a space property by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission) and 'View' permission for the space. + */ +export async function getSpacePropertyById(client: Client, parameters: GetSpacePropertyById): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.spaceId}/properties/${parameters.propertyId}`, + method: 'GET', + schema: SpacePropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a space property by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission) and 'Admin' permission for the space. + */ +export async function updateSpacePropertyById( + client: Client, + parameters: UpdateSpacePropertyById, +): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.spaceId}/properties/${parameters.propertyId}`, + method: 'PUT', + body: { + key: parameters.key, + value: parameters.value, + version: parameters.version, + }, + schema: SpacePropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a space property by its id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission) and 'Admin' permission for the space. + */ +export async function deleteSpacePropertyById(client: Client, parameters: DeleteSpacePropertyById): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.spaceId}/properties/${parameters.propertyId}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/spaceRoles.ts b/packages/cloud/src/api/spaceRoles.ts new file mode 100644 index 00000000..20c60142 --- /dev/null +++ b/packages/cloud/src/api/spaceRoles.ts @@ -0,0 +1,203 @@ +import { AvailableSpaceRolesSchema, type AvailableSpaceRoles } from '#/models/availableSpaceRoles'; +import { SpaceRoleSchema, type SpaceRole } from '#/models/spaceRole'; +import { UpdateSpaceRoleResponseSchema, type UpdateSpaceRoleResponse } from '#/models/updateSpaceRoleResponse'; +import { DeleteSpaceRoleResponseSchema, type DeleteSpaceRoleResponse } from '#/models/deleteSpaceRoleResponse'; +import { SpaceRoleModeSchema, type SpaceRoleMode } from '#/models/spaceRoleMode'; +import { SpaceRoleAssignmentsGetSchema, type SpaceRoleAssignmentsGet } from '#/models/spaceRoleAssignmentsGet'; +import { SpaceRoleAssignmentsSetSchema, type SpaceRoleAssignmentsSet } from '#/models/spaceRoleAssignmentsSet'; +import type { GetAvailableSpaceRoles } from '#/parameters/getAvailableSpaceRoles'; +import type { CreateSpaceRole } from '#/parameters/createSpaceRole'; +import type { GetSpaceRolesById } from '#/parameters/getSpaceRolesById'; +import type { UpdateSpaceRole } from '#/parameters/updateSpaceRole'; +import type { DeleteSpaceRole } from '#/parameters/deleteSpaceRole'; +import type { GetSpaceRoleAssignments } from '#/parameters/getSpaceRoleAssignments'; +import type { SetSpaceRoleAssignments } from '#/parameters/setSpaceRoleAssignments'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Retrieves the available space roles. + * + * Available on tenants with [Role-Based Access + * Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site; if + * requesting a certain space's roles, permission to view the space. + */ +export async function getAvailableSpaceRoles( + client: Client, + parameters?: GetAvailableSpaceRoles, +): Promise { + const config: SendRequestOptions = { + url: '/space-roles', + method: 'GET', + searchParams: { + 'space-id': parameters?.spaceId, + 'role-type': parameters?.roleType, + 'principal-id': parameters?.principalId, + 'principal-type': parameters?.principalType, + cursor: parameters?.cursor, + limit: parameters?.limit, + }, + schema: AvailableSpaceRolesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Create a space role. + * + * Available on tenants with [Role-Based Access + * Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be an organization or site admin. + * Connect and Forge app users are not authorized to access this resource. + */ +export async function createSpaceRole(client: Client, parameters: CreateSpaceRole): Promise { + const config: SendRequestOptions = { + url: '/space-roles', + method: 'POST', + body: { + name: parameters.name, + description: parameters.description, + spacePermissions: parameters.spacePermissions, + }, + schema: SpaceRoleSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves the space role by ID. + * + * Available on tenants with [Role-Based Access + * Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site. + */ +export async function getSpaceRolesById(client: Client, parameters: GetSpaceRolesById): Promise { + const config: SendRequestOptions = { + url: `/space-roles/${parameters.id}`, + method: 'GET', + schema: SpaceRoleSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a space role. + * + * Available on tenants with [Role-Based Access + * Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be an organization or site admin. + * Connect and Forge app users are not authorized to access this resource. + */ +export async function updateSpaceRole(client: Client, parameters: UpdateSpaceRole): Promise { + const config: SendRequestOptions = { + url: `/space-roles/${parameters.id}`, + method: 'PUT', + body: { + name: parameters.name, + description: parameters.description, + spacePermissions: parameters.spacePermissions, + anonymousReassignmentRoleId: parameters.anonymousReassignmentRoleId, + guestReassignmentRoleId: parameters.guestReassignmentRoleId, + }, + schema: UpdateSpaceRoleResponseSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Delete a space role + * + * Available on tenants with [Role-Based Access + * Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be an organization or site admin. + * Connect and Forge app users are not authorized to access this resource. + */ +export async function deleteSpaceRole(client: Client, parameters: DeleteSpaceRole): Promise { + const config: SendRequestOptions = { + url: `/space-roles/${parameters.id}`, + method: 'DELETE', + schema: DeleteSpaceRoleResponseSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves the space role mode. + * + * Available on tenants with [Role-Based Access + * Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getSpaceRoleMode(client: Client): Promise { + const config: SendRequestOptions = { + url: '/space-role-mode', + method: 'GET', + schema: SpaceRoleModeSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves the space role assignments. + * + * Available on tenants with [Role-Based Access + * Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the space. + */ +export async function getSpaceRoleAssignments( + client: Client, + parameters: GetSpaceRoleAssignments, +): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.id}/role-assignments`, + method: 'GET', + searchParams: { + 'role-id': parameters.roleId, + 'role-type': parameters.roleType, + 'principal-id': parameters.principalId, + 'principal-type': parameters.principalType, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: SpaceRoleAssignmentsGetSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Sets space role assignments as specified in the payload. For each entry, if `roleId` is provided the principal is + * assigned to that role. If `roleId` is omitted, the role assignment for that principal is removed, if it exists. + * + * Available on tenants with [Role-Based Access + * Control](https://support.atlassian.com/confluence-cloud/docs/manage-user-roles/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to manage roles in the space. + */ +export async function setSpaceRoleAssignments( + client: Client, + parameters: SetSpaceRoleAssignments, +): Promise { + const config: SendRequestOptions = { + url: `/spaces/${parameters.id}/role-assignments`, + method: 'POST', + body: parameters.body, + schema: SpaceRoleAssignmentsSetSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/task.ts b/packages/cloud/src/api/task.ts new file mode 100644 index 00000000..c55296da --- /dev/null +++ b/packages/cloud/src/api/task.ts @@ -0,0 +1,82 @@ +import { TasksSchema, type Tasks } from '#/models/tasks'; +import { TaskSchema, type Task } from '#/models/task'; +import type { GetTasks } from '#/parameters/getTasks'; +import type { GetTaskById } from '#/parameters/getTaskById'; +import type { UpdateTask } from '#/parameters/updateTask'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns all tasks. The number of results is limited by the `limit` parameter and additional results (if available) + * will be available through the `next` URL present in the `Link` response header. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Only tasks that the user has permission to view will be returned. + */ +export async function getTasks(client: Client, parameters?: GetTasks): Promise { + const config: SendRequestOptions = { + url: '/tasks', + method: 'GET', + searchParams: { + 'body-format': parameters?.bodyFormat, + 'include-blank-tasks': parameters?.includeBlankTasks, + status: parameters?.status, + 'task-id': parameters?.taskId, + 'space-id': parameters?.spaceId, + 'page-id': parameters?.pageId, + 'blogpost-id': parameters?.blogpostId, + 'created-by': parameters?.createdBy, + 'assigned-to': parameters?.assignedTo, + 'completed-by': parameters?.completedBy, + 'created-at-from': parameters?.createdAtFrom, + 'created-at-to': parameters?.createdAtTo, + 'due-at-from': parameters?.dueAtFrom, + 'due-at-to': parameters?.dueAtTo, + 'completed-at-from': parameters?.completedAtFrom, + 'completed-at-to': parameters?.completedAtTo, + cursor: parameters?.cursor, + limit: parameters?.limit, + }, + schema: TasksSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a specific task. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the containing page or blog + * post and its corresponding space. + */ +export async function getTaskById(client: Client, parameters: GetTaskById): Promise { + const config: SendRequestOptions = { + url: `/tasks/${parameters.id}`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + }, + schema: TaskSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Update a task by id. This endpoint currently only supports updating task status. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the containing page or blog + * post and view its corresponding space. + */ +export async function updateTask(client: Client, parameters: UpdateTask): Promise { + const config: SendRequestOptions = { + url: `/tasks/${parameters.id}`, + method: 'PUT', + searchParams: { + 'body-format': parameters.bodyFormat, + }, + body: parameters.body, + schema: TaskSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/user.ts b/packages/cloud/src/api/user.ts new file mode 100644 index 00000000..6dc7cc92 --- /dev/null +++ b/packages/cloud/src/api/user.ts @@ -0,0 +1,60 @@ +import { BulkUserLookupSchema, type BulkUserLookup } from '#/models/bulkUserLookup'; +import { AccessByEmailSchema, type AccessByEmail } from '#/models/accessByEmail'; +import type { CreateBulkUserLookup } from '#/parameters/createBulkUserLookup'; +import type { CheckAccessByEmail } from '#/parameters/checkAccessByEmail'; +import type { InviteByEmail } from '#/parameters/inviteByEmail'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns user details for the ids provided in the request body. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). The user must be able to view user profiles in the Confluence site. + */ +export async function createBulkUserLookup(client: Client, parameters: CreateBulkUserLookup): Promise { + const config: SendRequestOptions = { + url: '/users-bulk', + method: 'POST', + body: parameters.body, + schema: BulkUserLookupSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the list of emails from the input list that do not have access to site. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function checkAccessByEmail(client: Client, parameters: CheckAccessByEmail): Promise { + const config: SendRequestOptions = { + url: '/user/access/check-access-by-email', + method: 'POST', + body: parameters.body, + schema: AccessByEmailSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Invite a list of emails to the site. + * + * Ignores all invalid emails and no action is taken for the emails that already have access to the site. + * + * NOTE: This API is asynchronous and may take some time to complete. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function inviteByEmail(client: Client, parameters: InviteByEmail): Promise { + const config: SendRequestOptions = { + url: '/user/access/invite-by-email', + method: 'POST', + body: parameters.body, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/version.ts b/packages/cloud/src/api/version.ts new file mode 100644 index 00000000..393baf3d --- /dev/null +++ b/packages/cloud/src/api/version.ts @@ -0,0 +1,273 @@ +import { AttachmentVersionsSchema, type AttachmentVersions } from '#/models/attachmentVersions'; +import { BlogPostVersionsSchema, type BlogPostVersions } from '#/models/blogPostVersions'; +import { PageVersionsSchema, type PageVersions } from '#/models/pageVersions'; +import { FooterCommentVersionsSchema, type FooterCommentVersions } from '#/models/footerCommentVersions'; +import { InlineCommentVersionsSchema, type InlineCommentVersions } from '#/models/inlineCommentVersions'; +import { DetailedVersionSchema, type DetailedVersion } from '#/models/detailedVersion'; +import { CustomContentVersionsSchema, type CustomContentVersions } from '#/models/customContentVersions'; +import type { GetAttachmentVersions } from '#/parameters/getAttachmentVersions'; +import type { GetBlogPostVersions } from '#/parameters/getBlogPostVersions'; +import type { GetPageVersions } from '#/parameters/getPageVersions'; +import type { GetFooterCommentVersions } from '#/parameters/getFooterCommentVersions'; +import type { GetInlineCommentVersions } from '#/parameters/getInlineCommentVersions'; +import type { GetAttachmentVersionDetails } from '#/parameters/getAttachmentVersionDetails'; +import type { GetBlogPostVersionDetails } from '#/parameters/getBlogPostVersionDetails'; +import type { GetPageVersionDetails } from '#/parameters/getPageVersionDetails'; +import type { GetCustomContentVersions } from '#/parameters/getCustomContentVersions'; +import type { GetCustomContentVersionDetails } from '#/parameters/getCustomContentVersionDetails'; +import type { GetFooterCommentVersionDetails } from '#/parameters/getFooterCommentVersionDetails'; +import type { GetInlineCommentVersionDetails } from '#/parameters/getInlineCommentVersionDetails'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Returns the versions of specific attachment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the attachment and its + * corresponding space. + */ +export async function getAttachmentVersions( + client: Client, + parameters: GetAttachmentVersions, +): Promise { + const config: SendRequestOptions = { + url: `/attachments/${parameters.id}/versions`, + method: 'GET', + searchParams: { + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + }, + schema: AttachmentVersionsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the versions of specific blog post. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the blog post and its + * corresponding space. + */ +export async function getBlogPostVersions(client: Client, parameters: GetBlogPostVersions): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.id}/versions`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + }, + schema: BlogPostVersionsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the versions of specific page. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the page and its + * corresponding space. + */ +export async function getPageVersions(client: Client, parameters: GetPageVersions): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.id}/versions`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + }, + schema: PageVersionsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves the versions of the specified footer comment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page or + * blog post and its corresponding space. + */ +export async function getFooterCommentVersions( + client: Client, + parameters: GetFooterCommentVersions, +): Promise { + const config: SendRequestOptions = { + url: `/footer-comments/${parameters.id}/versions`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + }, + schema: FooterCommentVersionsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves the versions of the specified inline comment. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page or + * blog post and its corresponding space. + */ +export async function getInlineCommentVersions( + client: Client, + parameters: GetInlineCommentVersions, +): Promise { + const config: SendRequestOptions = { + url: `/inline-comments/${parameters.id}/versions`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + }, + schema: InlineCommentVersionsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves version details for the specified attachment and version number. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the attachment. + */ +export async function getAttachmentVersionDetails( + client: Client, + parameters: GetAttachmentVersionDetails, +): Promise { + const config: SendRequestOptions = { + url: `/attachments/${parameters.attachmentId}/versions/${parameters.versionNumber}`, + method: 'GET', + schema: DetailedVersionSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves version details for the specified blog post and version number. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the blog post. + */ +export async function getBlogPostVersionDetails( + client: Client, + parameters: GetBlogPostVersionDetails, +): Promise { + const config: SendRequestOptions = { + url: `/blogposts/${parameters.blogpostId}/versions/${parameters.versionNumber}`, + method: 'GET', + schema: DetailedVersionSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves version details for the specified page and version number. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the page. + */ +export async function getPageVersionDetails( + client: Client, + parameters: GetPageVersionDetails, +): Promise { + const config: SendRequestOptions = { + url: `/pages/${parameters.pageId}/versions/${parameters.versionNumber}`, + method: 'GET', + schema: DetailedVersionSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the versions of specific custom content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the custom content and its + * corresponding page and space. + */ +export async function getCustomContentVersions( + client: Client, + parameters: GetCustomContentVersions, +): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.customContentId}/versions`, + method: 'GET', + searchParams: { + 'body-format': parameters.bodyFormat, + cursor: parameters.cursor, + limit: parameters.limit, + sort: parameters.sort, + }, + schema: CustomContentVersionsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves version details for the specified custom content and version number. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the page. + */ +export async function getCustomContentVersionDetails( + client: Client, + parameters: GetCustomContentVersionDetails, +): Promise { + const config: SendRequestOptions = { + url: `/custom-content/${parameters.customContentId}/versions/${parameters.versionNumber}`, + method: 'GET', + schema: DetailedVersionSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves version details for the specified footer comment version. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page or + * blog post and its corresponding space. + */ +export async function getFooterCommentVersionDetails( + client: Client, + parameters: GetFooterCommentVersionDetails, +): Promise { + const config: SendRequestOptions = { + url: `/footer-comments/${parameters.id}/versions/${parameters.versionNumber}`, + method: 'GET', + schema: DetailedVersionSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Retrieves version details for the specified inline comment version. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content of the page or + * blog post and its corresponding space. + */ +export async function getInlineCommentVersionDetails( + client: Client, + parameters: GetInlineCommentVersionDetails, +): Promise { + const config: SendRequestOptions = { + url: `/inline-comments/${parameters.id}/versions/${parameters.versionNumber}`, + method: 'GET', + schema: DetailedVersionSchema, + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/api/whiteboard.ts b/packages/cloud/src/api/whiteboard.ts new file mode 100644 index 00000000..51d94c5e --- /dev/null +++ b/packages/cloud/src/api/whiteboard.ts @@ -0,0 +1,64 @@ +import { WhiteboardSchema, type Whiteboard } from '#/models/whiteboard'; +import type { CreateWhiteboard } from '#/parameters/createWhiteboard'; +import type { GetWhiteboardById } from '#/parameters/getWhiteboardById'; +import type { DeleteWhiteboard } from '#/parameters/deleteWhiteboard'; +import type { Client, SendRequestOptions } from '@confluence.js/core'; + +/** + * Creates a whiteboard in the space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the corresponding space. + * Permission to create a whiteboard in the space. + */ +export async function createWhiteboard(client: Client, parameters: CreateWhiteboard): Promise { + const config: SendRequestOptions = { + url: '/whiteboards', + method: 'POST', + searchParams: { + private: parameters.private, + }, + body: parameters.body, + schema: WhiteboardSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a specific whiteboard. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the whiteboard and its + * corresponding space. + */ +export async function getWhiteboardById(client: Client, parameters: GetWhiteboardById): Promise { + const config: SendRequestOptions = { + url: `/whiteboards/${parameters.id}`, + method: 'GET', + searchParams: { + 'include-collaborators': parameters.includeCollaborators, + 'include-direct-children': parameters.includeDirectChildren, + 'include-operations': parameters.includeOperations, + 'include-properties': parameters.includeProperties, + }, + schema: WhiteboardSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Delete a whiteboard by id. + * + * Deleting a whiteboard moves the whiteboard to the trash, where it can be restored later + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the whiteboard and its + * corresponding space. Permission to delete whiteboards in the space. + */ +export async function deleteWhiteboard(client: Client, parameters: DeleteWhiteboard): Promise { + const config: SendRequestOptions = { + url: `/whiteboards/${parameters.id}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/packages/cloud/src/createCloud.v2Client.ts b/packages/cloud/src/createCloud.v2Client.ts new file mode 100644 index 00000000..636f1e77 --- /dev/null +++ b/packages/cloud/src/createCloud.v2Client.ts @@ -0,0 +1,842 @@ +import { type ClientConfig, createClient, type Buffer } from '@confluence.js/core'; +import * as adminKey from '#/api/adminKey'; +import * as attachment from '#/api/attachment'; +import * as label from '#/api/label'; +import * as operation from '#/api/operation'; +import * as version from '#/api/version'; +import * as comment from '#/api/comment'; +import * as blogPost from '#/api/blogPost'; +import * as customContent from '#/api/customContent'; +import * as like from '#/api/like'; +import * as content from '#/api/content'; +import * as page from '#/api/page'; +import * as redactions from '#/api/redactions'; +import * as whiteboard from '#/api/whiteboard'; +import * as contentProperties from '#/api/contentProperties'; +import * as children from '#/api/children'; +import * as descendants from '#/api/descendants'; +import * as ancestors from '#/api/ancestors'; +import * as database from '#/api/database'; +import * as smartLink from '#/api/smartLink'; +import * as folder from '#/api/folder'; +import * as space from '#/api/space'; +import * as spacePermissions from '#/api/spacePermissions'; +import * as spacePermissionTransition from '#/api/spacePermissionTransition'; +import * as spaceRoles from '#/api/spaceRoles'; +import * as task from '#/api/task'; +import * as user from '#/api/user'; +import * as dataPolicies from '#/api/dataPolicies'; +import * as classificationLevel from '#/api/classificationLevel'; +import * as appProperties from '#/api/appProperties'; +import * as spaceProperties from '#/api/spaceProperties'; +import type { + EnableAdminKey, + GetAttachments, + GetAttachmentById, + DeleteAttachment, + GetBlogpostAttachments, + GetCustomContentAttachments, + GetLabelAttachments, + GetPageAttachments, + GetAttachmentThumbnailById, + GetAttachmentLabels, + GetBlogPostLabels, + GetCustomContentLabels, + GetLabels, + GetPageLabels, + GetSpaceLabels, + GetSpaceContentLabels, + GetAttachmentOperations, + GetBlogPostOperations, + GetCustomContentOperations, + GetPageOperations, + GetWhiteboardOperations, + GetDatabaseOperations, + GetSmartLinkOperations, + GetFolderOperations, + GetSpaceOperations, + GetFooterCommentOperations, + GetInlineCommentOperations, + GetAttachmentVersions, + GetBlogPostVersions, + GetPageVersions, + GetFooterCommentVersions, + GetInlineCommentVersions, + GetAttachmentVersionDetails, + GetBlogPostVersionDetails, + GetPageVersionDetails, + GetCustomContentVersions, + GetCustomContentVersionDetails, + GetFooterCommentVersionDetails, + GetInlineCommentVersionDetails, + GetAttachmentComments, + GetCustomContentComments, + GetPageFooterComments, + GetPageInlineComments, + GetBlogPostFooterComments, + GetBlogPostInlineComments, + GetFooterComments, + CreateFooterComment, + GetFooterCommentChildren, + GetInlineComments, + CreateInlineComment, + GetInlineCommentChildren, + GetFooterCommentById, + UpdateFooterComment, + DeleteFooterComment, + GetInlineCommentById, + UpdateInlineComment, + DeleteInlineComment, + GetBlogPosts, + CreateBlogPost, + GetBlogPostById, + UpdateBlogPost, + DeleteBlogPost, + GetLabelBlogPosts, + GetBlogPostsInSpace, + GetCustomContentByTypeInBlogPost, + GetCustomContentByType, + CreateCustomContent, + GetCustomContentById, + UpdateCustomContent, + DeleteCustomContent, + GetCustomContentByTypeInPage, + GetCustomContentByTypeInSpace, + GetBlogPostLikeCount, + GetBlogPostLikeUsers, + GetPageLikeCount, + GetPageLikeUsers, + GetFooterLikeCount, + GetFooterLikeUsers, + GetInlineLikeCount, + GetInlineLikeUsers, + ConvertContentIdsToContentTypes, + GetLabelPages, + GetPages, + CreatePage, + GetPageById, + UpdatePage, + DeletePage, + UpdatePageTitle, + GetPagesInSpace, + PostRedactPage, + PostRedactBlog, + CreateWhiteboard, + GetWhiteboardById, + DeleteWhiteboard, + GetWhiteboardContentProperties, + CreateWhiteboardProperty, + GetDatabaseContentProperties, + CreateDatabaseProperty, + GetSmartLinkContentProperties, + CreateSmartLinkProperty, + GetFolderContentProperties, + CreateFolderProperty, + GetAttachmentContentProperties, + CreateAttachmentProperty, + GetAttachmentContentPropertiesById, + UpdateAttachmentPropertyById, + DeleteAttachmentPropertyById, + GetBlogpostContentProperties, + CreateBlogpostProperty, + GetBlogpostContentPropertiesById, + UpdateBlogpostPropertyById, + DeleteBlogpostPropertyById, + GetCustomContentContentProperties, + CreateCustomContentProperty, + GetCustomContentContentPropertiesById, + UpdateCustomContentPropertyById, + DeleteCustomContentPropertyById, + GetPageContentProperties, + CreatePageProperty, + GetPageContentPropertiesById, + UpdatePagePropertyById, + DeletePagePropertyById, + GetWhiteboardContentPropertiesById, + UpdateWhiteboardPropertyById, + DeleteWhiteboardPropertyById, + GetDatabaseContentPropertiesById, + UpdateDatabasePropertyById, + DeleteDatabasePropertyById, + GetSmartLinkContentPropertiesById, + UpdateSmartLinkPropertyById, + DeleteSmartLinkPropertyById, + GetFolderContentPropertiesById, + UpdateFolderPropertyById, + DeleteFolderPropertyById, + GetCommentContentProperties, + CreateCommentProperty, + GetCommentContentPropertiesById, + UpdateCommentPropertyById, + DeleteCommentPropertyById, + GetWhiteboardDirectChildren, + GetDatabaseDirectChildren, + GetSmartLinkDirectChildren, + GetFolderDirectChildren, + GetChildPages, + GetChildCustomContent, + GetPageDirectChildren, + GetWhiteboardDescendants, + GetDatabaseDescendants, + GetSmartLinkDescendants, + GetFolderDescendants, + GetPageDescendants, + GetWhiteboardAncestors, + GetDatabaseAncestors, + GetSmartLinkAncestors, + GetFolderAncestors, + GetPageAncestors, + CreateDatabase, + GetDatabaseById, + DeleteDatabase, + CreateSmartLink, + GetSmartLinkById, + DeleteSmartLink, + CreateFolder, + GetFolderById, + DeleteFolder, + GetSpaces, + CreateSpace, + GetSpaceById, + GetSpacePermissionsAssignments, + GetAvailableSpacePermissions, + ListSpacePermissionCombinations, + BulkAssignSpacePermissionRoles, + BulkRemoveSpacePermissionAccess, + GetSpacePermissionTransitionTaskStatus, + GetAvailableSpaceRoles, + CreateSpaceRole, + GetSpaceRolesById, + UpdateSpaceRole, + DeleteSpaceRole, + GetSpaceRoleAssignments, + SetSpaceRoleAssignments, + GetTasks, + GetTaskById, + UpdateTask, + CreateBulkUserLookup, + CheckAccessByEmail, + InviteByEmail, + GetDataPolicySpaces, + GetSpaceDefaultClassificationLevel, + PutSpaceDefaultClassificationLevel, + DeleteSpaceDefaultClassificationLevel, + GetPageClassificationLevel, + PutPageClassificationLevel, + PostPageClassificationLevel, + GetBlogPostClassificationLevel, + PutBlogPostClassificationLevel, + PostBlogPostClassificationLevel, + GetWhiteboardClassificationLevel, + PutWhiteboardClassificationLevel, + PostWhiteboardClassificationLevel, + GetDatabaseClassificationLevel, + PutDatabaseClassificationLevel, + PostDatabaseClassificationLevel, + GetForgeAppProperties, + GetForgeAppProperty, + PutForgeAppProperty, + DeleteForgeAppProperty, + GetSpaceProperties, + CreateSpaceProperty, + GetSpacePropertyById, + UpdateSpacePropertyById, + DeleteSpacePropertyById, +} from '#/parameters'; +import type { + AdminKey, + Attachments, + Attachment, + BlogpostAttachments, + CustomContentAttachments, + LabelAttachments, + PageAttachments, + AttachmentLabels, + BlogPostLabels, + CustomContentLabels, + Labels, + PageLabels, + SpaceLabels, + SpaceContentLabels, + PermittedOperations, + AttachmentVersions, + BlogPostVersions, + PageVersions, + FooterCommentVersions, + InlineCommentVersions, + DetailedVersion, + CustomContentVersions, + AttachmentComments, + CustomContentComments, + PageFooterComments, + PageInlineComments, + BlogPostFooterComments, + BlogPostInlineComments, + FooterComments, + FooterComment, + FooterCommentChildren, + InlineComments, + InlineComment, + InlineCommentChildrenGet, + BlogPosts, + BlogPost, + LabelBlogPosts, + BlogPostsInSpace, + CustomContentByTypeInBlogPost, + CustomContentByType, + CustomContent, + CustomContentByTypeInPage, + CustomContentByTypeInSpace, + BlogPostLikeCount, + BlogPostLikeUsers, + PageLikeCount, + PageLikeUsers, + FooterLikeCount, + FooterLikeUsers, + InlineLikeCount, + InlineLikeUsers, + ContentIdToContentType, + LabelPages, + Pages, + Page, + PagesInSpace, + RedactionResponse, + Whiteboard, + WhiteboardContentProperties, + ContentProperty, + DatabaseContentProperties, + SmartLinkContentProperties, + FolderContentProperties, + AttachmentContentProperties, + BlogpostContentProperties, + CustomContentContentProperties, + PageContentProperties, + CommentContentProperties, + WhiteboardDirectChildren, + DatabaseDirectChildren, + SmartLinkDirectChildren, + FolderDirectChildren, + ChildPages, + ChildCustomContentGet, + PageDirectChildren, + WhiteboardDescendants, + DatabaseDescendants, + SmartLinkDescendants, + FolderDescendants, + PageDescendants, + WhiteboardAncestors, + DatabaseAncestors, + SmartLinkAncestors, + FolderAncestors, + PageAncestors, + Database, + SmartLink, + Folder, + Spaces, + SpaceSummary, + Space, + SpacePermissionsAssignments, + AvailableSpacePermissions, + ListSpacePermissionCombinationsResponse, + BulkTransitionTask, + BulkTransitionTaskStatus, + AvailableSpaceRoles, + SpaceRole, + UpdateSpaceRoleResponse, + DeleteSpaceRoleResponse, + SpaceRoleMode, + SpaceRoleAssignmentsGet, + SpaceRoleAssignmentsSet, + Tasks, + Task, + BulkUserLookup, + AccessByEmail, + DataPolicyMetadata, + DataPolicySpaces, + ClassificationLevel, + ForgeAppProperties, + ForgeAppProperty, + SpaceProperties, + SpaceProperty, +} from '#/models'; + +export function createCloudV2Client(clientConfig: ClientConfig) { + const client = createClient(clientConfig); + + return { + adminKey: { + getAdminKey: (): Promise => adminKey.getAdminKey(client), + enableAdminKey: (parameters: EnableAdminKey): Promise => adminKey.enableAdminKey(client, parameters), + disableAdminKey: (): Promise => adminKey.disableAdminKey(client), + }, + attachment: { + getAttachments: (parameters?: GetAttachments): Promise => + attachment.getAttachments(client, parameters), + getAttachmentById: (parameters: GetAttachmentById): Promise => + attachment.getAttachmentById(client, parameters), + deleteAttachment: (parameters: DeleteAttachment): Promise => + attachment.deleteAttachment(client, parameters), + getBlogpostAttachments: (parameters: GetBlogpostAttachments): Promise => + attachment.getBlogpostAttachments(client, parameters), + getCustomContentAttachments: (parameters: GetCustomContentAttachments): Promise => + attachment.getCustomContentAttachments(client, parameters), + getLabelAttachments: (parameters: GetLabelAttachments): Promise => + attachment.getLabelAttachments(client, parameters), + getPageAttachments: (parameters: GetPageAttachments): Promise => + attachment.getPageAttachments(client, parameters), + getAttachmentThumbnailById: (parameters: GetAttachmentThumbnailById): Promise => + attachment.getAttachmentThumbnailById(client, parameters), + }, + label: { + getAttachmentLabels: (parameters: GetAttachmentLabels): Promise => + label.getAttachmentLabels(client, parameters), + getBlogPostLabels: (parameters: GetBlogPostLabels): Promise => + label.getBlogPostLabels(client, parameters), + getCustomContentLabels: (parameters: GetCustomContentLabels): Promise => + label.getCustomContentLabels(client, parameters), + getLabels: (parameters?: GetLabels): Promise => label.getLabels(client, parameters), + getPageLabels: (parameters: GetPageLabels): Promise => label.getPageLabels(client, parameters), + getSpaceLabels: (parameters: GetSpaceLabels): Promise => label.getSpaceLabels(client, parameters), + getSpaceContentLabels: (parameters: GetSpaceContentLabels): Promise => + label.getSpaceContentLabels(client, parameters), + }, + operation: { + getAttachmentOperations: (parameters: GetAttachmentOperations): Promise => + operation.getAttachmentOperations(client, parameters), + getBlogPostOperations: (parameters: GetBlogPostOperations): Promise => + operation.getBlogPostOperations(client, parameters), + getCustomContentOperations: (parameters: GetCustomContentOperations): Promise => + operation.getCustomContentOperations(client, parameters), + getPageOperations: (parameters: GetPageOperations): Promise => + operation.getPageOperations(client, parameters), + getWhiteboardOperations: (parameters: GetWhiteboardOperations): Promise => + operation.getWhiteboardOperations(client, parameters), + getDatabaseOperations: (parameters: GetDatabaseOperations): Promise => + operation.getDatabaseOperations(client, parameters), + getSmartLinkOperations: (parameters: GetSmartLinkOperations): Promise => + operation.getSmartLinkOperations(client, parameters), + getFolderOperations: (parameters: GetFolderOperations): Promise => + operation.getFolderOperations(client, parameters), + getSpaceOperations: (parameters: GetSpaceOperations): Promise => + operation.getSpaceOperations(client, parameters), + getFooterCommentOperations: (parameters: GetFooterCommentOperations): Promise => + operation.getFooterCommentOperations(client, parameters), + getInlineCommentOperations: (parameters: GetInlineCommentOperations): Promise => + operation.getInlineCommentOperations(client, parameters), + }, + version: { + getAttachmentVersions: (parameters: GetAttachmentVersions): Promise => + version.getAttachmentVersions(client, parameters), + getBlogPostVersions: (parameters: GetBlogPostVersions): Promise => + version.getBlogPostVersions(client, parameters), + getPageVersions: (parameters: GetPageVersions): Promise => + version.getPageVersions(client, parameters), + getFooterCommentVersions: (parameters: GetFooterCommentVersions): Promise => + version.getFooterCommentVersions(client, parameters), + getInlineCommentVersions: (parameters: GetInlineCommentVersions): Promise => + version.getInlineCommentVersions(client, parameters), + getAttachmentVersionDetails: (parameters: GetAttachmentVersionDetails): Promise => + version.getAttachmentVersionDetails(client, parameters), + getBlogPostVersionDetails: (parameters: GetBlogPostVersionDetails): Promise => + version.getBlogPostVersionDetails(client, parameters), + getPageVersionDetails: (parameters: GetPageVersionDetails): Promise => + version.getPageVersionDetails(client, parameters), + getCustomContentVersions: (parameters: GetCustomContentVersions): Promise => + version.getCustomContentVersions(client, parameters), + getCustomContentVersionDetails: (parameters: GetCustomContentVersionDetails): Promise => + version.getCustomContentVersionDetails(client, parameters), + getFooterCommentVersionDetails: (parameters: GetFooterCommentVersionDetails): Promise => + version.getFooterCommentVersionDetails(client, parameters), + getInlineCommentVersionDetails: (parameters: GetInlineCommentVersionDetails): Promise => + version.getInlineCommentVersionDetails(client, parameters), + }, + comment: { + getAttachmentComments: (parameters: GetAttachmentComments): Promise => + comment.getAttachmentComments(client, parameters), + getCustomContentComments: (parameters: GetCustomContentComments): Promise => + comment.getCustomContentComments(client, parameters), + getPageFooterComments: (parameters: GetPageFooterComments): Promise => + comment.getPageFooterComments(client, parameters), + getPageInlineComments: (parameters: GetPageInlineComments): Promise => + comment.getPageInlineComments(client, parameters), + getBlogPostFooterComments: (parameters: GetBlogPostFooterComments): Promise => + comment.getBlogPostFooterComments(client, parameters), + getBlogPostInlineComments: (parameters: GetBlogPostInlineComments): Promise => + comment.getBlogPostInlineComments(client, parameters), + getFooterComments: (parameters?: GetFooterComments): Promise => + comment.getFooterComments(client, parameters), + createFooterComment: (parameters: CreateFooterComment): Promise => + comment.createFooterComment(client, parameters), + getFooterCommentChildren: (parameters: GetFooterCommentChildren): Promise => + comment.getFooterCommentChildren(client, parameters), + getInlineComments: (parameters?: GetInlineComments): Promise => + comment.getInlineComments(client, parameters), + createInlineComment: (parameters: CreateInlineComment): Promise => + comment.createInlineComment(client, parameters), + getInlineCommentChildren: (parameters: GetInlineCommentChildren): Promise => + comment.getInlineCommentChildren(client, parameters), + getFooterCommentById: (parameters: GetFooterCommentById): Promise => + comment.getFooterCommentById(client, parameters), + updateFooterComment: (parameters: UpdateFooterComment): Promise => + comment.updateFooterComment(client, parameters), + deleteFooterComment: (parameters: DeleteFooterComment): Promise => + comment.deleteFooterComment(client, parameters), + getInlineCommentById: (parameters: GetInlineCommentById): Promise => + comment.getInlineCommentById(client, parameters), + updateInlineComment: (parameters: UpdateInlineComment): Promise => + comment.updateInlineComment(client, parameters), + deleteInlineComment: (parameters: DeleteInlineComment): Promise => + comment.deleteInlineComment(client, parameters), + }, + blogPost: { + getBlogPosts: (parameters?: GetBlogPosts): Promise => blogPost.getBlogPosts(client, parameters), + createBlogPost: (parameters: CreateBlogPost): Promise => blogPost.createBlogPost(client, parameters), + getBlogPostById: (parameters: GetBlogPostById): Promise => blogPost.getBlogPostById(client, parameters), + updateBlogPost: (parameters: UpdateBlogPost): Promise => blogPost.updateBlogPost(client, parameters), + deleteBlogPost: (parameters: DeleteBlogPost): Promise => blogPost.deleteBlogPost(client, parameters), + getLabelBlogPosts: (parameters: GetLabelBlogPosts): Promise => + blogPost.getLabelBlogPosts(client, parameters), + getBlogPostsInSpace: (parameters: GetBlogPostsInSpace): Promise => + blogPost.getBlogPostsInSpace(client, parameters), + }, + customContent: { + getCustomContentByTypeInBlogPost: ( + parameters: GetCustomContentByTypeInBlogPost, + ): Promise => customContent.getCustomContentByTypeInBlogPost(client, parameters), + getCustomContentByType: (parameters: GetCustomContentByType): Promise => + customContent.getCustomContentByType(client, parameters), + createCustomContent: (parameters: CreateCustomContent): Promise => + customContent.createCustomContent(client, parameters), + getCustomContentById: (parameters: GetCustomContentById): Promise => + customContent.getCustomContentById(client, parameters), + updateCustomContent: (parameters: UpdateCustomContent): Promise => + customContent.updateCustomContent(client, parameters), + deleteCustomContent: (parameters: DeleteCustomContent): Promise => + customContent.deleteCustomContent(client, parameters), + getCustomContentByTypeInPage: (parameters: GetCustomContentByTypeInPage): Promise => + customContent.getCustomContentByTypeInPage(client, parameters), + getCustomContentByTypeInSpace: (parameters: GetCustomContentByTypeInSpace): Promise => + customContent.getCustomContentByTypeInSpace(client, parameters), + }, + like: { + getBlogPostLikeCount: (parameters: GetBlogPostLikeCount): Promise => + like.getBlogPostLikeCount(client, parameters), + getBlogPostLikeUsers: (parameters: GetBlogPostLikeUsers): Promise => + like.getBlogPostLikeUsers(client, parameters), + getPageLikeCount: (parameters: GetPageLikeCount): Promise => + like.getPageLikeCount(client, parameters), + getPageLikeUsers: (parameters: GetPageLikeUsers): Promise => + like.getPageLikeUsers(client, parameters), + getFooterLikeCount: (parameters: GetFooterLikeCount): Promise => + like.getFooterLikeCount(client, parameters), + getFooterLikeUsers: (parameters: GetFooterLikeUsers): Promise => + like.getFooterLikeUsers(client, parameters), + getInlineLikeCount: (parameters: GetInlineLikeCount): Promise => + like.getInlineLikeCount(client, parameters), + getInlineLikeUsers: (parameters: GetInlineLikeUsers): Promise => + like.getInlineLikeUsers(client, parameters), + }, + content: { + convertContentIdsToContentTypes: (parameters: ConvertContentIdsToContentTypes): Promise => + content.convertContentIdsToContentTypes(client, parameters), + }, + page: { + getLabelPages: (parameters: GetLabelPages): Promise => page.getLabelPages(client, parameters), + getPages: (parameters?: GetPages): Promise => page.getPages(client, parameters), + createPage: (parameters: CreatePage): Promise => page.createPage(client, parameters), + getPageById: (parameters: GetPageById): Promise => page.getPageById(client, parameters), + updatePage: (parameters: UpdatePage): Promise => page.updatePage(client, parameters), + deletePage: (parameters: DeletePage): Promise => page.deletePage(client, parameters), + updatePageTitle: (parameters: UpdatePageTitle): Promise => page.updatePageTitle(client, parameters), + getPagesInSpace: (parameters: GetPagesInSpace): Promise => page.getPagesInSpace(client, parameters), + }, + redactions: { + postRedactPage: (parameters: PostRedactPage): Promise => + redactions.postRedactPage(client, parameters), + postRedactBlog: (parameters: PostRedactBlog): Promise => + redactions.postRedactBlog(client, parameters), + }, + whiteboard: { + createWhiteboard: (parameters: CreateWhiteboard): Promise => + whiteboard.createWhiteboard(client, parameters), + getWhiteboardById: (parameters: GetWhiteboardById): Promise => + whiteboard.getWhiteboardById(client, parameters), + deleteWhiteboard: (parameters: DeleteWhiteboard): Promise => + whiteboard.deleteWhiteboard(client, parameters), + }, + contentProperties: { + getWhiteboardContentProperties: ( + parameters: GetWhiteboardContentProperties, + ): Promise => contentProperties.getWhiteboardContentProperties(client, parameters), + createWhiteboardProperty: (parameters: CreateWhiteboardProperty): Promise => + contentProperties.createWhiteboardProperty(client, parameters), + getDatabaseContentProperties: (parameters: GetDatabaseContentProperties): Promise => + contentProperties.getDatabaseContentProperties(client, parameters), + createDatabaseProperty: (parameters: CreateDatabaseProperty): Promise => + contentProperties.createDatabaseProperty(client, parameters), + getSmartLinkContentProperties: (parameters: GetSmartLinkContentProperties): Promise => + contentProperties.getSmartLinkContentProperties(client, parameters), + createSmartLinkProperty: (parameters: CreateSmartLinkProperty): Promise => + contentProperties.createSmartLinkProperty(client, parameters), + getFolderContentProperties: (parameters: GetFolderContentProperties): Promise => + contentProperties.getFolderContentProperties(client, parameters), + createFolderProperty: (parameters: CreateFolderProperty): Promise => + contentProperties.createFolderProperty(client, parameters), + getAttachmentContentProperties: ( + parameters: GetAttachmentContentProperties, + ): Promise => contentProperties.getAttachmentContentProperties(client, parameters), + createAttachmentProperty: (parameters: CreateAttachmentProperty): Promise => + contentProperties.createAttachmentProperty(client, parameters), + getAttachmentContentPropertiesById: (parameters: GetAttachmentContentPropertiesById): Promise => + contentProperties.getAttachmentContentPropertiesById(client, parameters), + updateAttachmentPropertyById: (parameters: UpdateAttachmentPropertyById): Promise => + contentProperties.updateAttachmentPropertyById(client, parameters), + deleteAttachmentPropertyById: (parameters: DeleteAttachmentPropertyById): Promise => + contentProperties.deleteAttachmentPropertyById(client, parameters), + getBlogpostContentProperties: (parameters: GetBlogpostContentProperties): Promise => + contentProperties.getBlogpostContentProperties(client, parameters), + createBlogpostProperty: (parameters: CreateBlogpostProperty): Promise => + contentProperties.createBlogpostProperty(client, parameters), + getBlogpostContentPropertiesById: (parameters: GetBlogpostContentPropertiesById): Promise => + contentProperties.getBlogpostContentPropertiesById(client, parameters), + updateBlogpostPropertyById: (parameters: UpdateBlogpostPropertyById): Promise => + contentProperties.updateBlogpostPropertyById(client, parameters), + deleteBlogpostPropertyById: (parameters: DeleteBlogpostPropertyById): Promise => + contentProperties.deleteBlogpostPropertyById(client, parameters), + getCustomContentContentProperties: ( + parameters: GetCustomContentContentProperties, + ): Promise => + contentProperties.getCustomContentContentProperties(client, parameters), + createCustomContentProperty: (parameters: CreateCustomContentProperty): Promise => + contentProperties.createCustomContentProperty(client, parameters), + getCustomContentContentPropertiesById: ( + parameters: GetCustomContentContentPropertiesById, + ): Promise => contentProperties.getCustomContentContentPropertiesById(client, parameters), + updateCustomContentPropertyById: (parameters: UpdateCustomContentPropertyById): Promise => + contentProperties.updateCustomContentPropertyById(client, parameters), + deleteCustomContentPropertyById: (parameters: DeleteCustomContentPropertyById): Promise => + contentProperties.deleteCustomContentPropertyById(client, parameters), + getPageContentProperties: (parameters: GetPageContentProperties): Promise => + contentProperties.getPageContentProperties(client, parameters), + createPageProperty: (parameters: CreatePageProperty): Promise => + contentProperties.createPageProperty(client, parameters), + getPageContentPropertiesById: (parameters: GetPageContentPropertiesById): Promise => + contentProperties.getPageContentPropertiesById(client, parameters), + updatePagePropertyById: (parameters: UpdatePagePropertyById): Promise => + contentProperties.updatePagePropertyById(client, parameters), + deletePagePropertyById: (parameters: DeletePagePropertyById): Promise => + contentProperties.deletePagePropertyById(client, parameters), + getWhiteboardContentPropertiesById: (parameters: GetWhiteboardContentPropertiesById): Promise => + contentProperties.getWhiteboardContentPropertiesById(client, parameters), + updateWhiteboardPropertyById: (parameters: UpdateWhiteboardPropertyById): Promise => + contentProperties.updateWhiteboardPropertyById(client, parameters), + deleteWhiteboardPropertyById: (parameters: DeleteWhiteboardPropertyById): Promise => + contentProperties.deleteWhiteboardPropertyById(client, parameters), + getDatabaseContentPropertiesById: (parameters: GetDatabaseContentPropertiesById): Promise => + contentProperties.getDatabaseContentPropertiesById(client, parameters), + updateDatabasePropertyById: (parameters: UpdateDatabasePropertyById): Promise => + contentProperties.updateDatabasePropertyById(client, parameters), + deleteDatabasePropertyById: (parameters: DeleteDatabasePropertyById): Promise => + contentProperties.deleteDatabasePropertyById(client, parameters), + getSmartLinkContentPropertiesById: (parameters: GetSmartLinkContentPropertiesById): Promise => + contentProperties.getSmartLinkContentPropertiesById(client, parameters), + updateSmartLinkPropertyById: (parameters: UpdateSmartLinkPropertyById): Promise => + contentProperties.updateSmartLinkPropertyById(client, parameters), + deleteSmartLinkPropertyById: (parameters: DeleteSmartLinkPropertyById): Promise => + contentProperties.deleteSmartLinkPropertyById(client, parameters), + getFolderContentPropertiesById: (parameters: GetFolderContentPropertiesById): Promise => + contentProperties.getFolderContentPropertiesById(client, parameters), + updateFolderPropertyById: (parameters: UpdateFolderPropertyById): Promise => + contentProperties.updateFolderPropertyById(client, parameters), + deleteFolderPropertyById: (parameters: DeleteFolderPropertyById): Promise => + contentProperties.deleteFolderPropertyById(client, parameters), + getCommentContentProperties: (parameters: GetCommentContentProperties): Promise => + contentProperties.getCommentContentProperties(client, parameters), + createCommentProperty: (parameters: CreateCommentProperty): Promise => + contentProperties.createCommentProperty(client, parameters), + getCommentContentPropertiesById: (parameters: GetCommentContentPropertiesById): Promise => + contentProperties.getCommentContentPropertiesById(client, parameters), + updateCommentPropertyById: (parameters: UpdateCommentPropertyById): Promise => + contentProperties.updateCommentPropertyById(client, parameters), + deleteCommentPropertyById: (parameters: DeleteCommentPropertyById): Promise => + contentProperties.deleteCommentPropertyById(client, parameters), + }, + children: { + getWhiteboardDirectChildren: (parameters: GetWhiteboardDirectChildren): Promise => + children.getWhiteboardDirectChildren(client, parameters), + getDatabaseDirectChildren: (parameters: GetDatabaseDirectChildren): Promise => + children.getDatabaseDirectChildren(client, parameters), + getSmartLinkDirectChildren: (parameters: GetSmartLinkDirectChildren): Promise => + children.getSmartLinkDirectChildren(client, parameters), + getFolderDirectChildren: (parameters: GetFolderDirectChildren): Promise => + children.getFolderDirectChildren(client, parameters), + getChildPages: (parameters: GetChildPages): Promise => children.getChildPages(client, parameters), + getChildCustomContent: (parameters: GetChildCustomContent): Promise => + children.getChildCustomContent(client, parameters), + getPageDirectChildren: (parameters: GetPageDirectChildren): Promise => + children.getPageDirectChildren(client, parameters), + }, + descendants: { + getWhiteboardDescendants: (parameters: GetWhiteboardDescendants): Promise => + descendants.getWhiteboardDescendants(client, parameters), + getDatabaseDescendants: (parameters: GetDatabaseDescendants): Promise => + descendants.getDatabaseDescendants(client, parameters), + getSmartLinkDescendants: (parameters: GetSmartLinkDescendants): Promise => + descendants.getSmartLinkDescendants(client, parameters), + getFolderDescendants: (parameters: GetFolderDescendants): Promise => + descendants.getFolderDescendants(client, parameters), + getPageDescendants: (parameters: GetPageDescendants): Promise => + descendants.getPageDescendants(client, parameters), + }, + ancestors: { + getWhiteboardAncestors: (parameters: GetWhiteboardAncestors): Promise => + ancestors.getWhiteboardAncestors(client, parameters), + getDatabaseAncestors: (parameters: GetDatabaseAncestors): Promise => + ancestors.getDatabaseAncestors(client, parameters), + getSmartLinkAncestors: (parameters: GetSmartLinkAncestors): Promise => + ancestors.getSmartLinkAncestors(client, parameters), + getFolderAncestors: (parameters: GetFolderAncestors): Promise => + ancestors.getFolderAncestors(client, parameters), + getPageAncestors: (parameters: GetPageAncestors): Promise => + ancestors.getPageAncestors(client, parameters), + }, + database: { + createDatabase: (parameters: CreateDatabase): Promise => database.createDatabase(client, parameters), + getDatabaseById: (parameters: GetDatabaseById): Promise => database.getDatabaseById(client, parameters), + deleteDatabase: (parameters: DeleteDatabase): Promise => database.deleteDatabase(client, parameters), + }, + smartLink: { + createSmartLink: (parameters: CreateSmartLink): Promise => + smartLink.createSmartLink(client, parameters), + getSmartLinkById: (parameters: GetSmartLinkById): Promise => + smartLink.getSmartLinkById(client, parameters), + deleteSmartLink: (parameters: DeleteSmartLink): Promise => smartLink.deleteSmartLink(client, parameters), + }, + folder: { + createFolder: (parameters: CreateFolder): Promise => folder.createFolder(client, parameters), + getFolderById: (parameters: GetFolderById): Promise => folder.getFolderById(client, parameters), + deleteFolder: (parameters: DeleteFolder): Promise => folder.deleteFolder(client, parameters), + }, + space: { + getSpaces: (parameters?: GetSpaces): Promise => space.getSpaces(client, parameters), + createSpace: (parameters: CreateSpace): Promise => space.createSpace(client, parameters), + getSpaceById: (parameters: GetSpaceById): Promise => space.getSpaceById(client, parameters), + }, + spacePermissions: { + getSpacePermissionsAssignments: ( + parameters: GetSpacePermissionsAssignments, + ): Promise => spacePermissions.getSpacePermissionsAssignments(client, parameters), + getAvailableSpacePermissions: (parameters?: GetAvailableSpacePermissions): Promise => + spacePermissions.getAvailableSpacePermissions(client, parameters), + }, + spacePermissionTransition: { + listSpacePermissionCombinations: ( + parameters?: ListSpacePermissionCombinations, + ): Promise => + spacePermissionTransition.listSpacePermissionCombinations(client, parameters), + generateSpacePermissionCombinations: (): Promise => + spacePermissionTransition.generateSpacePermissionCombinations(client), + bulkAssignSpacePermissionRoles: (parameters: BulkAssignSpacePermissionRoles): Promise => + spacePermissionTransition.bulkAssignSpacePermissionRoles(client, parameters), + bulkRemoveSpacePermissionAccess: (parameters: BulkRemoveSpacePermissionAccess): Promise => + spacePermissionTransition.bulkRemoveSpacePermissionAccess(client, parameters), + getSpacePermissionTransitionTaskStatus: ( + parameters: GetSpacePermissionTransitionTaskStatus, + ): Promise => + spacePermissionTransition.getSpacePermissionTransitionTaskStatus(client, parameters), + }, + spaceRoles: { + getAvailableSpaceRoles: (parameters?: GetAvailableSpaceRoles): Promise => + spaceRoles.getAvailableSpaceRoles(client, parameters), + createSpaceRole: (parameters: CreateSpaceRole): Promise => + spaceRoles.createSpaceRole(client, parameters), + getSpaceRolesById: (parameters: GetSpaceRolesById): Promise => + spaceRoles.getSpaceRolesById(client, parameters), + updateSpaceRole: (parameters: UpdateSpaceRole): Promise => + spaceRoles.updateSpaceRole(client, parameters), + deleteSpaceRole: (parameters: DeleteSpaceRole): Promise => + spaceRoles.deleteSpaceRole(client, parameters), + getSpaceRoleMode: (): Promise => spaceRoles.getSpaceRoleMode(client), + getSpaceRoleAssignments: (parameters: GetSpaceRoleAssignments): Promise => + spaceRoles.getSpaceRoleAssignments(client, parameters), + setSpaceRoleAssignments: (parameters: SetSpaceRoleAssignments): Promise => + spaceRoles.setSpaceRoleAssignments(client, parameters), + }, + task: { + getTasks: (parameters?: GetTasks): Promise => task.getTasks(client, parameters), + getTaskById: (parameters: GetTaskById): Promise => task.getTaskById(client, parameters), + updateTask: (parameters: UpdateTask): Promise => task.updateTask(client, parameters), + }, + user: { + createBulkUserLookup: (parameters: CreateBulkUserLookup): Promise => + user.createBulkUserLookup(client, parameters), + checkAccessByEmail: (parameters: CheckAccessByEmail): Promise => + user.checkAccessByEmail(client, parameters), + inviteByEmail: (parameters: InviteByEmail): Promise => user.inviteByEmail(client, parameters), + }, + dataPolicies: { + getDataPolicyMetadata: (): Promise => dataPolicies.getDataPolicyMetadata(client), + getDataPolicySpaces: (parameters?: GetDataPolicySpaces): Promise => + dataPolicies.getDataPolicySpaces(client, parameters), + }, + classificationLevel: { + getClassificationLevels: (): Promise => + classificationLevel.getClassificationLevels(client), + getSpaceDefaultClassificationLevel: ( + parameters: GetSpaceDefaultClassificationLevel, + ): Promise => classificationLevel.getSpaceDefaultClassificationLevel(client, parameters), + putSpaceDefaultClassificationLevel: (parameters: PutSpaceDefaultClassificationLevel): Promise => + classificationLevel.putSpaceDefaultClassificationLevel(client, parameters), + deleteSpaceDefaultClassificationLevel: (parameters: DeleteSpaceDefaultClassificationLevel): Promise => + classificationLevel.deleteSpaceDefaultClassificationLevel(client, parameters), + getPageClassificationLevel: (parameters: GetPageClassificationLevel): Promise => + classificationLevel.getPageClassificationLevel(client, parameters), + putPageClassificationLevel: (parameters: PutPageClassificationLevel): Promise => + classificationLevel.putPageClassificationLevel(client, parameters), + postPageClassificationLevel: (parameters: PostPageClassificationLevel): Promise => + classificationLevel.postPageClassificationLevel(client, parameters), + getBlogPostClassificationLevel: (parameters: GetBlogPostClassificationLevel): Promise => + classificationLevel.getBlogPostClassificationLevel(client, parameters), + putBlogPostClassificationLevel: (parameters: PutBlogPostClassificationLevel): Promise => + classificationLevel.putBlogPostClassificationLevel(client, parameters), + postBlogPostClassificationLevel: (parameters: PostBlogPostClassificationLevel): Promise => + classificationLevel.postBlogPostClassificationLevel(client, parameters), + getWhiteboardClassificationLevel: (parameters: GetWhiteboardClassificationLevel): Promise => + classificationLevel.getWhiteboardClassificationLevel(client, parameters), + putWhiteboardClassificationLevel: (parameters: PutWhiteboardClassificationLevel): Promise => + classificationLevel.putWhiteboardClassificationLevel(client, parameters), + postWhiteboardClassificationLevel: (parameters: PostWhiteboardClassificationLevel): Promise => + classificationLevel.postWhiteboardClassificationLevel(client, parameters), + getDatabaseClassificationLevel: (parameters: GetDatabaseClassificationLevel): Promise => + classificationLevel.getDatabaseClassificationLevel(client, parameters), + putDatabaseClassificationLevel: (parameters: PutDatabaseClassificationLevel): Promise => + classificationLevel.putDatabaseClassificationLevel(client, parameters), + postDatabaseClassificationLevel: (parameters: PostDatabaseClassificationLevel): Promise => + classificationLevel.postDatabaseClassificationLevel(client, parameters), + }, + appProperties: { + getForgeAppProperties: (parameters?: GetForgeAppProperties): Promise => + appProperties.getForgeAppProperties(client, parameters), + getForgeAppProperty: (parameters: GetForgeAppProperty): Promise => + appProperties.getForgeAppProperty(client, parameters), + putForgeAppProperty: (parameters: PutForgeAppProperty): Promise => + appProperties.putForgeAppProperty(client, parameters), + deleteForgeAppProperty: (parameters: DeleteForgeAppProperty): Promise => + appProperties.deleteForgeAppProperty(client, parameters), + }, + spaceProperties: { + getSpaceProperties: (parameters: GetSpaceProperties): Promise => + spaceProperties.getSpaceProperties(client, parameters), + createSpaceProperty: (parameters: CreateSpaceProperty): Promise => + spaceProperties.createSpaceProperty(client, parameters), + getSpacePropertyById: (parameters: GetSpacePropertyById): Promise => + spaceProperties.getSpacePropertyById(client, parameters), + updateSpacePropertyById: (parameters: UpdateSpacePropertyById): Promise => + spaceProperties.updateSpacePropertyById(client, parameters), + deleteSpacePropertyById: (parameters: DeleteSpacePropertyById): Promise => + spaceProperties.deleteSpacePropertyById(client, parameters), + }, + }; +} + +export type CloudV2Client = ReturnType; diff --git a/packages/cloud/src/index.ts b/packages/cloud/src/index.ts new file mode 100644 index 00000000..1930483c --- /dev/null +++ b/packages/cloud/src/index.ts @@ -0,0 +1,11 @@ +// @confluence.js/cloud — Confluence Cloud REST API v2 client. +// api / models / parameters are generated from the v2 OpenAPI spec via apis-code-gen. +// Transport is provided by the shared @confluence.js/core package. + +export * from './createCloud.v2Client.js'; + +export * as Api from './api/index.js'; + +export * as Models from './models/index.js'; + +export * as Parameters from './parameters/index.js'; diff --git a/packages/cloud/src/models/abstractPageLinks.ts b/packages/cloud/src/models/abstractPageLinks.ts new file mode 100644 index 00000000..1ef94f08 --- /dev/null +++ b/packages/cloud/src/models/abstractPageLinks.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const AbstractPageLinksSchema = apiObject({ + /** Web UI link of the content. */ + webui: z.string().optional(), + /** Edit UI link of the content. */ + editui: z.string().optional(), + /** Web UI link of the content. */ + tinyui: z.string().optional(), +}); + +export type AbstractPageLinks = z.infer; diff --git a/packages/cloud/src/models/accessByEmail.ts b/packages/cloud/src/models/accessByEmail.ts new file mode 100644 index 00000000..d1054551 --- /dev/null +++ b/packages/cloud/src/models/accessByEmail.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const AccessByEmailSchema = apiObject({ + /** List of emails that do not have access to site. */ + emailsWithoutAccess: z.array(z.string()).optional(), + /** List of invalid emails provided in the request. */ + invalidEmails: z.array(z.string()).optional(), +}); + +export type AccessByEmail = z.infer; diff --git a/packages/cloud/src/models/accountStatus.ts b/packages/cloud/src/models/accountStatus.ts new file mode 100644 index 00000000..63d2c5a8 --- /dev/null +++ b/packages/cloud/src/models/accountStatus.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +/** The account status of the user. */ + +export const AccountStatusSchema = z.enum(['active', 'inactive', 'closed', 'unknown']); + +export type AccountStatus = z.infer; diff --git a/packages/cloud/src/models/accountType.ts b/packages/cloud/src/models/accountType.ts new file mode 100644 index 00000000..83ba9a46 --- /dev/null +++ b/packages/cloud/src/models/accountType.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +/** The account type of the user. */ + +export const AccountTypeSchema = z.enum(['atlassian', 'app', 'customer', 'unknown']); + +export type AccountType = z.infer; diff --git a/packages/cloud/src/models/adminKey.ts b/packages/cloud/src/models/adminKey.ts new file mode 100644 index 00000000..bd9dbdeb --- /dev/null +++ b/packages/cloud/src/models/adminKey.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const AdminKeySchema = apiObject({ + /** User identifier. */ + accountId: z.string().optional(), + /** Timestamp in UTC that represents when the admin key will expire. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + expirationTime: z.coerce.date().optional(), +}); + +export type AdminKey = z.infer; diff --git a/packages/cloud/src/models/ancestor.ts b/packages/cloud/src/models/ancestor.ts new file mode 100644 index 00000000..4ea9612b --- /dev/null +++ b/packages/cloud/src/models/ancestor.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { AncestorTypeSchema } from '#/models/ancestorType'; + +export const AncestorSchema = apiObject({ + /** ID of the ancestor */ + id: z.string().optional(), + type: AncestorTypeSchema.optional(), +}); + +export type Ancestor = z.infer; diff --git a/packages/cloud/src/models/ancestorType.ts b/packages/cloud/src/models/ancestorType.ts new file mode 100644 index 00000000..396cf9c8 --- /dev/null +++ b/packages/cloud/src/models/ancestorType.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +/** The type of ancestor. */ + +export const AncestorTypeSchema = z.enum(['page', 'whiteboard', 'database', 'embed', 'folder']); + +export type AncestorType = z.infer; diff --git a/packages/cloud/src/models/attachment.ts b/packages/cloud/src/models/attachment.ts new file mode 100644 index 00000000..a5573bd8 --- /dev/null +++ b/packages/cloud/src/models/attachment.ts @@ -0,0 +1,79 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { VersionSchema } from '#/models/version'; +import { LabelSchema } from '#/models/label'; +import { OptionalFieldMetaSchema } from '#/models/optionalFieldMeta'; +import { OptionalFieldLinksSchema } from '#/models/optionalFieldLinks'; +import { ContentPropertySchema } from '#/models/contentProperty'; +import { OperationSchema } from '#/models/operation'; +import { AttachmentLinksSchema } from '#/models/attachmentLinks'; + +export const AttachmentSchema = apiObject({ + /** ID of the attachment. */ + id: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the comment. */ + title: z.string().optional(), + /** Date and time when the attachment was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** + * ID of the containing page. + * + * Note: This is only returned if the attachment has a container that is a page. + */ + pageId: z.string().optional(), + /** + * ID of the containing blog post. + * + * Note: This is only returned if the attachment has a container that is a blog post. + */ + blogPostId: z.string().optional(), + /** + * ID of the containing custom content. + * + * Note: This is only returned if the attachment has a container that is custom content. + */ + customContentId: z.string().optional(), + /** Media Type for the attachment. */ + mediaType: z.string().optional(), + /** Media Type description for the attachment. */ + mediaTypeDescription: z.string().nullish(), + /** Comment for the attachment. */ + comment: z.string().optional(), + /** + * File ID of the attachment. This is the ID referenced in `atlas_doc_format` bodies and is distinct from the + * attachment ID. + */ + fileId: z.string().optional(), + /** File size of the attachment. */ + fileSize: z.number().optional(), + /** WebUI link of the attachment. */ + webuiLink: z.string().optional(), + /** Download link of the attachment. */ + downloadLink: z.string().optional(), + version: VersionSchema.nullish(), + labels: apiObject({ + results: z.array(LabelSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + properties: apiObject({ + results: z.array(ContentPropertySchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + operations: apiObject({ + results: z.array(OperationSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + versions: apiObject({ + results: z.array(VersionSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + _links: AttachmentLinksSchema.nullish(), +}); + +export type Attachment = z.infer; diff --git a/packages/cloud/src/models/attachmentComment.ts b/packages/cloud/src/models/attachmentComment.ts new file mode 100644 index 00000000..2425314e --- /dev/null +++ b/packages/cloud/src/models/attachmentComment.ts @@ -0,0 +1,21 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { VersionSchema } from '#/models/version'; +import { BodySchema } from '#/models/body'; +import { CommentLinksSchema } from '#/models/commentLinks'; + +export const AttachmentCommentSchema = apiObject({ + /** ID of the comment. */ + id: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the comment. */ + title: z.string().optional(), + /** ID of the attachment containing the comment. */ + attachmentId: z.string().optional(), + version: VersionSchema.nullish(), + body: BodySchema.nullish(), + _links: CommentLinksSchema.nullish(), +}); + +export type AttachmentComment = z.infer; diff --git a/packages/cloud/src/models/attachmentComments.ts b/packages/cloud/src/models/attachmentComments.ts new file mode 100644 index 00000000..79eacab1 --- /dev/null +++ b/packages/cloud/src/models/attachmentComments.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { AttachmentCommentSchema } from './attachmentComment.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const AttachmentCommentsSchema = apiObject({ + results: z.array(AttachmentCommentSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type AttachmentComments = z.infer; diff --git a/packages/cloud/src/models/attachmentContentProperties.ts b/packages/cloud/src/models/attachmentContentProperties.ts new file mode 100644 index 00000000..97e50609 --- /dev/null +++ b/packages/cloud/src/models/attachmentContentProperties.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentPropertySchema } from './contentProperty.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const AttachmentContentPropertiesSchema = apiObject({ + results: z.array(ContentPropertySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type AttachmentContentProperties = z.infer; diff --git a/packages/cloud/src/models/attachmentLabels.ts b/packages/cloud/src/models/attachmentLabels.ts new file mode 100644 index 00000000..6cb518b4 --- /dev/null +++ b/packages/cloud/src/models/attachmentLabels.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { LabelSchema } from './label.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const AttachmentLabelsSchema = apiObject({ + results: z.array(LabelSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type AttachmentLabels = z.infer; diff --git a/packages/cloud/src/models/attachmentLinks.ts b/packages/cloud/src/models/attachmentLinks.ts new file mode 100644 index 00000000..ebe14871 --- /dev/null +++ b/packages/cloud/src/models/attachmentLinks.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const AttachmentLinksSchema = apiObject({ + /** Web UI link of the content. */ + webui: z.string().optional(), + /** Download link of the content. */ + download: z.string().optional(), +}); + +export type AttachmentLinks = z.infer; diff --git a/packages/cloud/src/models/attachmentSortOrder.ts b/packages/cloud/src/models/attachmentSortOrder.ts new file mode 100644 index 00000000..a157ba7f --- /dev/null +++ b/packages/cloud/src/models/attachmentSortOrder.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +/** + * The sort fields for attachments. The default sort direction is ascending. To sort in descending order, append a `-` + * character before the sort field. For example, `fieldName` or `-fieldName`. + */ + +export const AttachmentSortOrderSchema = z.enum(['created-date', '-created-date', 'modified-date', '-modified-date']); + +export type AttachmentSortOrder = z.infer; diff --git a/packages/cloud/src/models/attachmentSummary.ts b/packages/cloud/src/models/attachmentSummary.ts new file mode 100644 index 00000000..48f74ed4 --- /dev/null +++ b/packages/cloud/src/models/attachmentSummary.ts @@ -0,0 +1,54 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { VersionSchema } from '#/models/version'; +import { AttachmentLinksSchema } from '#/models/attachmentLinks'; + +export const AttachmentSummarySchema = apiObject({ + /** ID of the attachment. */ + id: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the comment. */ + title: z.string().optional(), + /** Date and time when the attachment was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** + * ID of the containing page. + * + * Note: This is only returned if the attachment has a container that is a page. + */ + pageId: z.string().optional(), + /** + * ID of the containing blog post. + * + * Note: This is only returned if the attachment has a container that is a blog post. + */ + blogPostId: z.string().optional(), + /** + * ID of the containing custom content. + * + * Note: This is only returned if the attachment has a container that is custom content. + */ + customContentId: z.string().optional(), + /** Media Type for the attachment. */ + mediaType: z.string().optional(), + /** Media Type description for the attachment. */ + mediaTypeDescription: z.string().nullish(), + /** Comment for the attachment. */ + comment: z.string().optional(), + /** + * File ID of the attachment. This is the ID referenced in `atlas_doc_format` bodies and is distinct from the + * attachment ID. + */ + fileId: z.string().optional(), + /** File size of the attachment. */ + fileSize: z.number().optional(), + /** WebUI link of the attachment. */ + webuiLink: z.string().optional(), + /** Download link of the attachment. */ + downloadLink: z.string().optional(), + version: VersionSchema.nullish(), + _links: AttachmentLinksSchema.nullish(), +}); + +export type AttachmentSummary = z.infer; diff --git a/packages/cloud/src/models/attachmentVersion.ts b/packages/cloud/src/models/attachmentVersion.ts new file mode 100644 index 00000000..1e634f79 --- /dev/null +++ b/packages/cloud/src/models/attachmentVersion.ts @@ -0,0 +1,22 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { VersionedEntitySchema } from '#/models/versionedEntity'; + +export const AttachmentVersionSchema = apiObject({ + /** Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** Message associated with the current version. */ + message: z.string().optional(), + /** The version number. */ + number: z.number().optional(), + /** + * Describes if this version is a minor version. Email notifications and activity stream updates are not created for + * minor versions. + */ + minorEdit: z.boolean().optional(), + /** The account ID of the user who created this version. */ + authorId: z.string().optional(), + attachment: VersionedEntitySchema.nullish(), +}); + +export type AttachmentVersion = z.infer; diff --git a/packages/cloud/src/models/attachmentVersions.ts b/packages/cloud/src/models/attachmentVersions.ts new file mode 100644 index 00000000..7724918e --- /dev/null +++ b/packages/cloud/src/models/attachmentVersions.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { AttachmentVersionSchema } from './attachmentVersion.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const AttachmentVersionsSchema = apiObject({ + results: z.array(AttachmentVersionSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type AttachmentVersions = z.infer; diff --git a/packages/cloud/src/models/attachments.ts b/packages/cloud/src/models/attachments.ts new file mode 100644 index 00000000..caec2863 --- /dev/null +++ b/packages/cloud/src/models/attachments.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { AttachmentSummarySchema } from './attachmentSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const AttachmentsSchema = apiObject({ + results: z.array(AttachmentSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type Attachments = z.infer; diff --git a/packages/cloud/src/models/availableSpacePermissions.ts b/packages/cloud/src/models/availableSpacePermissions.ts new file mode 100644 index 00000000..efb4f9a3 --- /dev/null +++ b/packages/cloud/src/models/availableSpacePermissions.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { SpacePermissionSchema } from './spacePermission.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const AvailableSpacePermissionsSchema = apiObject({ + results: z.array(SpacePermissionSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type AvailableSpacePermissions = z.infer; diff --git a/packages/cloud/src/models/availableSpaceRoles.ts b/packages/cloud/src/models/availableSpaceRoles.ts new file mode 100644 index 00000000..dc9a2bca --- /dev/null +++ b/packages/cloud/src/models/availableSpaceRoles.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { SpaceRoleSchema } from './spaceRole.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const AvailableSpaceRolesSchema = apiObject({ + results: z.array(SpaceRoleSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type AvailableSpaceRoles = z.infer; diff --git a/packages/cloud/src/models/blogPost.ts b/packages/cloud/src/models/blogPost.ts new file mode 100644 index 00000000..4dcce2a0 --- /dev/null +++ b/packages/cloud/src/models/blogPost.ts @@ -0,0 +1,58 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BlogPostContentStatusSchema } from '#/models/blogPostContentStatus'; +import { VersionSchema } from '#/models/version'; +import { BodySchema } from '#/models/body'; +import { LabelSchema } from '#/models/label'; +import { OptionalFieldMetaSchema } from '#/models/optionalFieldMeta'; +import { OptionalFieldLinksSchema } from '#/models/optionalFieldLinks'; +import { ContentPropertySchema } from '#/models/contentProperty'; +import { OperationSchema } from '#/models/operation'; +import { LikeSchema } from '#/models/like'; +import { AbstractPageLinksSchema } from '#/models/abstractPageLinks'; + +export const BlogPostSchema = apiObject({ + /** ID of the blog post. */ + id: z.string().optional(), + status: BlogPostContentStatusSchema.optional(), + /** Title of the blog post. */ + title: z.string().optional(), + /** ID of the space the blog post is in. */ + spaceId: z.string().optional(), + /** The account ID of the user who created this blog post originally. */ + authorId: z.string().optional(), + /** Date and time when the blog post was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + version: VersionSchema.nullish(), + body: BodySchema.nullish(), + labels: apiObject({ + results: z.array(LabelSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + properties: apiObject({ + results: z.array(ContentPropertySchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + operations: apiObject({ + results: z.array(OperationSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + likes: apiObject({ + results: z.array(LikeSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + versions: apiObject({ + results: z.array(VersionSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + /** Whether the blog post has been favorited by the current user. */ + isFavoritedByCurrentUser: z.boolean().optional(), + _links: AbstractPageLinksSchema.nullish(), +}); + +export type BlogPost = z.infer; diff --git a/packages/cloud/src/models/blogPostBodyWrite.ts b/packages/cloud/src/models/blogPostBodyWrite.ts new file mode 100644 index 00000000..bb21fb74 --- /dev/null +++ b/packages/cloud/src/models/blogPostBodyWrite.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const BlogPostBodyWriteSchema = apiObject({ + /** Type of content representation used for the value field. */ + representation: z.enum(['storage', 'atlas_doc_format', 'wiki']).optional(), + /** Body of the blog post, in the format found in the representation field. */ + value: z.string().optional(), +}); + +export type BlogPostBodyWrite = z.infer; diff --git a/packages/cloud/src/models/blogPostComment.ts b/packages/cloud/src/models/blogPostComment.ts new file mode 100644 index 00000000..e96309f7 --- /dev/null +++ b/packages/cloud/src/models/blogPostComment.ts @@ -0,0 +1,21 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { VersionSchema } from '#/models/version'; +import { BodySummarySchema } from '#/models/bodySummary'; +import { CommentLinksSchema } from '#/models/commentLinks'; + +export const BlogPostCommentSchema = apiObject({ + /** ID of the comment. */ + id: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the comment. */ + title: z.string().optional(), + /** ID of the blog post the comment is in. */ + blogPostId: z.string().optional(), + version: VersionSchema.nullish(), + body: BodySummarySchema.nullish(), + _links: CommentLinksSchema.nullish(), +}); + +export type BlogPostComment = z.infer; diff --git a/packages/cloud/src/models/blogPostContentStatus.ts b/packages/cloud/src/models/blogPostContentStatus.ts new file mode 100644 index 00000000..2427a477 --- /dev/null +++ b/packages/cloud/src/models/blogPostContentStatus.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +/** The status of the content. */ + +export const BlogPostContentStatusSchema = z.enum(['current', 'draft', 'historical', 'trashed', 'deleted', 'any']); + +export type BlogPostContentStatus = z.infer; diff --git a/packages/cloud/src/models/blogPostFooterComments.ts b/packages/cloud/src/models/blogPostFooterComments.ts new file mode 100644 index 00000000..9a48880a --- /dev/null +++ b/packages/cloud/src/models/blogPostFooterComments.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BlogPostCommentSchema } from './blogPostComment.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const BlogPostFooterCommentsSchema = apiObject({ + results: z.array(BlogPostCommentSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type BlogPostFooterComments = z.infer; diff --git a/packages/cloud/src/models/blogPostInlineComment.ts b/packages/cloud/src/models/blogPostInlineComment.ts new file mode 100644 index 00000000..8941997f --- /dev/null +++ b/packages/cloud/src/models/blogPostInlineComment.ts @@ -0,0 +1,25 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { VersionSchema } from '#/models/version'; +import { BodySummarySchema } from '#/models/bodySummary'; +import { InlineCommentResolutionStatusSchema } from '#/models/inlineCommentResolutionStatus'; +import { InlineCommentPropertiesSchema } from '#/models/inlineCommentProperties'; +import { CommentLinksSchema } from '#/models/commentLinks'; + +export const BlogPostInlineCommentSchema = apiObject({ + /** ID of the comment. */ + id: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the comment. */ + title: z.string().optional(), + /** ID of the blog post the comment is in. */ + blogPostId: z.string().optional(), + version: VersionSchema.nullish(), + body: BodySummarySchema.nullish(), + resolutionStatus: InlineCommentResolutionStatusSchema.optional(), + properties: InlineCommentPropertiesSchema.nullish(), + _links: CommentLinksSchema.nullish(), +}); + +export type BlogPostInlineComment = z.infer; diff --git a/packages/cloud/src/models/blogPostInlineComments.ts b/packages/cloud/src/models/blogPostInlineComments.ts new file mode 100644 index 00000000..f23dc951 --- /dev/null +++ b/packages/cloud/src/models/blogPostInlineComments.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BlogPostInlineCommentSchema } from './blogPostInlineComment.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const BlogPostInlineCommentsSchema = apiObject({ + results: z.array(BlogPostInlineCommentSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type BlogPostInlineComments = z.infer; diff --git a/packages/cloud/src/models/blogPostLabels.ts b/packages/cloud/src/models/blogPostLabels.ts new file mode 100644 index 00000000..14253086 --- /dev/null +++ b/packages/cloud/src/models/blogPostLabels.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { LabelSchema } from './label.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const BlogPostLabelsSchema = apiObject({ + results: z.array(LabelSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type BlogPostLabels = z.infer; diff --git a/packages/cloud/src/models/blogPostLikeCount.ts b/packages/cloud/src/models/blogPostLikeCount.ts new file mode 100644 index 00000000..46901454 --- /dev/null +++ b/packages/cloud/src/models/blogPostLikeCount.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const BlogPostLikeCountSchema = apiObject({ + /** The count number */ + count: z.number().optional(), +}); + +export type BlogPostLikeCount = z.infer; diff --git a/packages/cloud/src/models/blogPostLikeUsers.ts b/packages/cloud/src/models/blogPostLikeUsers.ts new file mode 100644 index 00000000..1c7ae4b8 --- /dev/null +++ b/packages/cloud/src/models/blogPostLikeUsers.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { LikeSchema } from './like.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const BlogPostLikeUsersSchema = apiObject({ + results: z.array(LikeSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type BlogPostLikeUsers = z.infer; diff --git a/packages/cloud/src/models/blogPostNestedBodyWrite.ts b/packages/cloud/src/models/blogPostNestedBodyWrite.ts new file mode 100644 index 00000000..9b89033d --- /dev/null +++ b/packages/cloud/src/models/blogPostNestedBodyWrite.ts @@ -0,0 +1,12 @@ +import type { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BlogPostBodyWriteSchema } from '#/models/blogPostBodyWrite'; +/** Body of the blog post. Only one body format should be specified as the property* for this object, e.g. `storage`. */ + +export const BlogPostNestedBodyWriteSchema = apiObject({ + storage: BlogPostBodyWriteSchema.nullish(), + atlas_doc_format: BlogPostBodyWriteSchema.nullish(), + wiki: BlogPostBodyWriteSchema.nullish(), +}); + +export type BlogPostNestedBodyWrite = z.infer; diff --git a/packages/cloud/src/models/blogPostSortOrder.ts b/packages/cloud/src/models/blogPostSortOrder.ts new file mode 100644 index 00000000..1f1c2351 --- /dev/null +++ b/packages/cloud/src/models/blogPostSortOrder.ts @@ -0,0 +1,16 @@ +import { z } from 'zod'; +/** + * The sort fields for blog posts. The default sort direction is ascending. To sort in descending order, append a `-` + * character before the sort field. For example, `fieldName` or `-fieldName`. + */ + +export const BlogPostSortOrderSchema = z.enum([ + 'id', + '-id', + 'created-date', + '-created-date', + 'modified-date', + '-modified-date', +]); + +export type BlogPostSortOrder = z.infer; diff --git a/packages/cloud/src/models/blogPostSummary.ts b/packages/cloud/src/models/blogPostSummary.ts new file mode 100644 index 00000000..ed6525bd --- /dev/null +++ b/packages/cloud/src/models/blogPostSummary.ts @@ -0,0 +1,25 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BlogPostContentStatusSchema } from '#/models/blogPostContentStatus'; +import { VersionSchema } from '#/models/version'; +import { BodySummarySchema } from '#/models/bodySummary'; +import { AbstractPageLinksSchema } from '#/models/abstractPageLinks'; + +export const BlogPostSummarySchema = apiObject({ + /** ID of the blog post. */ + id: z.string().optional(), + status: BlogPostContentStatusSchema.optional(), + /** Title of the blog post. */ + title: z.string().optional(), + /** ID of the space the blog post is in. */ + spaceId: z.string().optional(), + /** The account ID of the user who created this blog post originally. */ + authorId: z.string().optional(), + /** Date and time when the blog post was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + version: VersionSchema.nullish(), + body: BodySummarySchema.nullish(), + _links: AbstractPageLinksSchema.nullish(), +}); + +export type BlogPostSummary = z.infer; diff --git a/packages/cloud/src/models/blogPostVersion.ts b/packages/cloud/src/models/blogPostVersion.ts new file mode 100644 index 00000000..9b004e22 --- /dev/null +++ b/packages/cloud/src/models/blogPostVersion.ts @@ -0,0 +1,22 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { VersionedEntitySchema } from '#/models/versionedEntity'; + +export const BlogPostVersionSchema = apiObject({ + /** Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** Message associated with the current version. */ + message: z.string().optional(), + /** The version number. */ + number: z.number().optional(), + /** + * Describes if this version is a minor version. Email notifications and activity stream updates are not created for + * minor versions. + */ + minorEdit: z.boolean().optional(), + /** The account ID of the user who created this version. */ + authorId: z.string().optional(), + blogpost: VersionedEntitySchema.nullish(), +}); + +export type BlogPostVersion = z.infer; diff --git a/packages/cloud/src/models/blogPostVersions.ts b/packages/cloud/src/models/blogPostVersions.ts new file mode 100644 index 00000000..dcde9810 --- /dev/null +++ b/packages/cloud/src/models/blogPostVersions.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BlogPostVersionSchema } from './blogPostVersion.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const BlogPostVersionsSchema = apiObject({ + results: z.array(BlogPostVersionSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type BlogPostVersions = z.infer; diff --git a/packages/cloud/src/models/blogPosts.ts b/packages/cloud/src/models/blogPosts.ts new file mode 100644 index 00000000..fd9a3c36 --- /dev/null +++ b/packages/cloud/src/models/blogPosts.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BlogPostSummarySchema } from './blogPostSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const BlogPostsSchema = apiObject({ + results: z.array(BlogPostSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type BlogPosts = z.infer; diff --git a/packages/cloud/src/models/blogPostsInSpace.ts b/packages/cloud/src/models/blogPostsInSpace.ts new file mode 100644 index 00000000..5fbad179 --- /dev/null +++ b/packages/cloud/src/models/blogPostsInSpace.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BlogPostSummarySchema } from './blogPostSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const BlogPostsInSpaceSchema = apiObject({ + results: z.array(BlogPostSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type BlogPostsInSpace = z.infer; diff --git a/packages/cloud/src/models/blogpostAttachments.ts b/packages/cloud/src/models/blogpostAttachments.ts new file mode 100644 index 00000000..710ee52d --- /dev/null +++ b/packages/cloud/src/models/blogpostAttachments.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { AttachmentSummarySchema } from './attachmentSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const BlogpostAttachmentsSchema = apiObject({ + results: z.array(AttachmentSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type BlogpostAttachments = z.infer; diff --git a/packages/cloud/src/models/blogpostContentProperties.ts b/packages/cloud/src/models/blogpostContentProperties.ts new file mode 100644 index 00000000..f91efc06 --- /dev/null +++ b/packages/cloud/src/models/blogpostContentProperties.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentPropertySchema } from './contentProperty.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const BlogpostContentPropertiesSchema = apiObject({ + results: z.array(ContentPropertySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type BlogpostContentProperties = z.infer; diff --git a/packages/cloud/src/models/body.ts b/packages/cloud/src/models/body.ts new file mode 100644 index 00000000..8cfe3f45 --- /dev/null +++ b/packages/cloud/src/models/body.ts @@ -0,0 +1,12 @@ +import type { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BodyTypeSchema } from '#/models/bodyType'; +/** Contains fields for each representation type requested. */ + +export const BodySchema = apiObject({ + storage: BodyTypeSchema.nullish(), + atlas_doc_format: BodyTypeSchema.nullish(), + view: BodyTypeSchema.nullish(), +}); + +export type Body = z.infer; diff --git a/packages/cloud/src/models/bodySummary.ts b/packages/cloud/src/models/bodySummary.ts new file mode 100644 index 00000000..e1b2b10f --- /dev/null +++ b/packages/cloud/src/models/bodySummary.ts @@ -0,0 +1,11 @@ +import type { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BodyTypeSchema } from '#/models/bodyType'; +/** Contains fields for each representation type requested. */ + +export const BodySummarySchema = apiObject({ + storage: BodyTypeSchema.nullish(), + atlas_doc_format: BodyTypeSchema.nullish(), +}); + +export type BodySummary = z.infer; diff --git a/packages/cloud/src/models/bodyType.ts b/packages/cloud/src/models/bodyType.ts new file mode 100644 index 00000000..90dd0864 --- /dev/null +++ b/packages/cloud/src/models/bodyType.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const BodyTypeSchema = apiObject({ + /** Type of content representation used for the value field. */ + representation: z.string().optional(), + /** Body of the content, in the format found in the representation field. */ + value: z.string().optional(), +}); + +export type BodyType = z.infer; diff --git a/packages/cloud/src/models/bulkAssignRoles.ts b/packages/cloud/src/models/bulkAssignRoles.ts new file mode 100644 index 00000000..b54173ba --- /dev/null +++ b/packages/cloud/src/models/bulkAssignRoles.ts @@ -0,0 +1,12 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BulkTransitionRoleAssignmentSchema } from '#/models/bulkTransitionRoleAssignment'; +import { BulkTransitionSpaceSelectionSchema } from '#/models/bulkTransitionSpaceSelection'; + +export const BulkAssignRolesSchema = apiObject({ + /** List of role assignments to apply. */ + assignments: z.array(BulkTransitionRoleAssignmentSchema), + spaceSelection: BulkTransitionSpaceSelectionSchema, +}); + +export type BulkAssignRoles = z.infer; diff --git a/packages/cloud/src/models/bulkRemoveAccess.ts b/packages/cloud/src/models/bulkRemoveAccess.ts new file mode 100644 index 00000000..7bb6b163 --- /dev/null +++ b/packages/cloud/src/models/bulkRemoveAccess.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BulkTransitionSpaceSelectionSchema } from '#/models/bulkTransitionSpaceSelection'; + +export const BulkRemoveAccessSchema = apiObject({ + /** List of permission combination IDs to remove access for. */ + permissionCombinationIds: z.array(z.string()), + spaceSelection: BulkTransitionSpaceSelectionSchema, +}); + +export type BulkRemoveAccess = z.infer; diff --git a/packages/cloud/src/models/bulkTransitionCombinationEntry.ts b/packages/cloud/src/models/bulkTransitionCombinationEntry.ts new file mode 100644 index 00000000..260d5938 --- /dev/null +++ b/packages/cloud/src/models/bulkTransitionCombinationEntry.ts @@ -0,0 +1,36 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BulkTransitionDecodedPermissionSchema } from '#/models/bulkTransitionDecodedPermission'; + +export const BulkTransitionCombinationEntrySchema = apiObject({ + /** + * The opaque id identifying this unique combination of space permissions. Pass directly to the bulk + * role-assignments or access-removals endpoints. + */ + combinationId: z.string(), + /** Number of spaces that currently have this combination. */ + spaceCount: z.number(), + /** Number of principals (users / groups / etc.) that currently have this combination. */ + principalCount: z.number(), + /** The decoded space permissions that make up this combination. */ + permissions: z.array(BulkTransitionDecodedPermissionSchema), + /** + * The principal types that currently hold this combination and can be reassigned via the bulk role-assignments + * endpoint. Use this to know which `principalType` entries are valid to include in the bulk-assign request for this + * combination. + */ + principalTypes: z.array( + z.enum([ + 'USER', + 'GROUP', + 'GUEST', + 'ANONYMOUS', + 'ALL_LICENSED_USERS_USER_CLASS', + 'ALL_PRODUCT_ADMINS_USER_CLASS', + 'APP', + 'TEAM', + ]), + ), +}); + +export type BulkTransitionCombinationEntry = z.infer; diff --git a/packages/cloud/src/models/bulkTransitionDecodedPermission.ts b/packages/cloud/src/models/bulkTransitionDecodedPermission.ts new file mode 100644 index 00000000..c9733dde --- /dev/null +++ b/packages/cloud/src/models/bulkTransitionDecodedPermission.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const BulkTransitionDecodedPermissionSchema = apiObject({ + /** The platform id of the permission (e.g. `VIEW_CONTENT`). */ + id: z.string(), + /** Human-readable name of the permission. */ + displayName: z.string(), +}); + +export type BulkTransitionDecodedPermission = z.infer; diff --git a/packages/cloud/src/models/bulkTransitionPrincipalTypeAssignment.ts b/packages/cloud/src/models/bulkTransitionPrincipalTypeAssignment.ts new file mode 100644 index 00000000..1b4a3786 --- /dev/null +++ b/packages/cloud/src/models/bulkTransitionPrincipalTypeAssignment.ts @@ -0,0 +1,21 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const BulkTransitionPrincipalTypeAssignmentSchema = apiObject({ + /** The type of principal. */ + principalType: z.enum([ + 'USER', + 'GROUP', + 'GUEST', + 'ANONYMOUS', + 'ALL_LICENSED_USERS_USER_CLASS', + 'ALL_PRODUCT_ADMINS_USER_CLASS', + 'APP', + ]), + /** Whether to remove access for this principal type instead of assigning a role. */ + removeAccess: z.boolean(), + /** The UUID of the space role to assign. Required when removeAccess is false. */ + roleId: z.string().nullish(), +}); + +export type BulkTransitionPrincipalTypeAssignment = z.infer; diff --git a/packages/cloud/src/models/bulkTransitionRoleAssignment.ts b/packages/cloud/src/models/bulkTransitionRoleAssignment.ts new file mode 100644 index 00000000..7b60593c --- /dev/null +++ b/packages/cloud/src/models/bulkTransitionRoleAssignment.ts @@ -0,0 +1,12 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BulkTransitionPrincipalTypeAssignmentSchema } from '#/models/bulkTransitionPrincipalTypeAssignment'; + +export const BulkTransitionRoleAssignmentSchema = apiObject({ + /** The ID of the permission combination. */ + permissionCombinationId: z.string(), + /** List of principal type assignments. */ + principalTypeAssignments: z.array(BulkTransitionPrincipalTypeAssignmentSchema), +}); + +export type BulkTransitionRoleAssignment = z.infer; diff --git a/packages/cloud/src/models/bulkTransitionSpaceSelection.ts b/packages/cloud/src/models/bulkTransitionSpaceSelection.ts new file mode 100644 index 00000000..0001f616 --- /dev/null +++ b/packages/cloud/src/models/bulkTransitionSpaceSelection.ts @@ -0,0 +1,12 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BulkTransitionSpaceTargetSchema } from '#/models/bulkTransitionSpaceTarget'; + +export const BulkTransitionSpaceSelectionSchema = apiObject({ + /** The space selection type. */ + spaceType: z.enum(['ALL', 'ALL_EXCEPT_PERSONAL', 'ALL_EXCEPT_SPECIFIC', 'PERSONAL', 'SPECIFIC']), + /** List of specific spaces. Required when spaceType is SPECIFIC or ALL_EXCEPT_SPECIFIC. */ + selectedSpaces: z.array(BulkTransitionSpaceTargetSchema).nullish(), +}); + +export type BulkTransitionSpaceSelection = z.infer; diff --git a/packages/cloud/src/models/bulkTransitionSpaceTarget.ts b/packages/cloud/src/models/bulkTransitionSpaceTarget.ts new file mode 100644 index 00000000..f452c7b5 --- /dev/null +++ b/packages/cloud/src/models/bulkTransitionSpaceTarget.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const BulkTransitionSpaceTargetSchema = apiObject({ + /** The space ID. */ + id: z.string(), + /** The space key. */ + key: z.string(), +}); + +export type BulkTransitionSpaceTarget = z.infer; diff --git a/packages/cloud/src/models/bulkTransitionTask.ts b/packages/cloud/src/models/bulkTransitionTask.ts new file mode 100644 index 00000000..6bf7121c --- /dev/null +++ b/packages/cloud/src/models/bulkTransitionTask.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const BulkTransitionTaskSchema = apiObject({ + /** The ID of the async task. */ + taskId: z.string(), + /** The current status of the task. */ + status: z.enum(['IN_PROGRESS', 'COMPLETED', 'FAILED']), + /** URL to poll for task progress. */ + statusUrl: z.string(), +}); + +export type BulkTransitionTask = z.infer; diff --git a/packages/cloud/src/models/bulkTransitionTaskStatus.ts b/packages/cloud/src/models/bulkTransitionTaskStatus.ts new file mode 100644 index 00000000..dfa9f840 --- /dev/null +++ b/packages/cloud/src/models/bulkTransitionTaskStatus.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const BulkTransitionTaskStatusSchema = apiObject({ + /** The ID of the task. */ + taskId: z.string(), + /** The current status of the task. */ + status: z.enum(['IN_PROGRESS', 'COMPLETED', 'FAILED']), + /** Human-readable error message describing why the task failed. Only present when status is FAILED. */ + errorMessage: z.string().nullish(), +}); + +export type BulkTransitionTaskStatus = z.infer; diff --git a/packages/cloud/src/models/bulkUserLookup.ts b/packages/cloud/src/models/bulkUserLookup.ts new file mode 100644 index 00000000..0fafff98 --- /dev/null +++ b/packages/cloud/src/models/bulkUserLookup.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { UserSchema } from './user.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const BulkUserLookupSchema = apiObject({ + results: z.array(UserSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type BulkUserLookup = z.infer; diff --git a/packages/cloud/src/models/childCustomContent.ts b/packages/cloud/src/models/childCustomContent.ts new file mode 100644 index 00000000..e37fc20c --- /dev/null +++ b/packages/cloud/src/models/childCustomContent.ts @@ -0,0 +1,17 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { OnlyArchivedAndCurrentContentStatusSchema } from '#/models/onlyArchivedAndCurrentContentStatus'; + +export const ChildCustomContentSchema = apiObject({ + /** ID of the child custom content. */ + id: z.string().optional(), + status: OnlyArchivedAndCurrentContentStatusSchema.optional(), + /** Title of the custom content. */ + title: z.string().optional(), + /** Custom content type. */ + type: z.string().optional(), + /** ID of the space the custom content is in. */ + spaceId: z.string().optional(), +}); + +export type ChildCustomContent = z.infer; diff --git a/packages/cloud/src/models/childCustomContentGet.ts b/packages/cloud/src/models/childCustomContentGet.ts new file mode 100644 index 00000000..d7e00e9c --- /dev/null +++ b/packages/cloud/src/models/childCustomContentGet.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ChildCustomContentSchema } from './childCustomContent.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const ChildCustomContentGetSchema = apiObject({ + results: z.array(ChildCustomContentSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type ChildCustomContentGet = z.infer; diff --git a/packages/cloud/src/models/childCustomContentSortOrder.ts b/packages/cloud/src/models/childCustomContentSortOrder.ts new file mode 100644 index 00000000..718c46ca --- /dev/null +++ b/packages/cloud/src/models/childCustomContentSortOrder.ts @@ -0,0 +1,16 @@ +import { z } from 'zod'; +/** + * The sort fields for child custom content. The default sort direction is ascending by id. To sort in descending order, + * append a `-` character before the sort field. For example, `fieldName` or `-fieldName`. + */ + +export const ChildCustomContentSortOrderSchema = z.enum([ + 'created-date', + '-created-date', + 'id', + '-id', + 'modified-date', + '-modified-date', +]); + +export type ChildCustomContentSortOrder = z.infer; diff --git a/packages/cloud/src/models/childPage.ts b/packages/cloud/src/models/childPage.ts new file mode 100644 index 00000000..42c687ec --- /dev/null +++ b/packages/cloud/src/models/childPage.ts @@ -0,0 +1,17 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { OnlyArchivedAndCurrentContentStatusSchema } from '#/models/onlyArchivedAndCurrentContentStatus'; + +export const ChildPageSchema = apiObject({ + /** ID of the page. */ + id: z.string().optional(), + status: OnlyArchivedAndCurrentContentStatusSchema.optional(), + /** Title of the page. */ + title: z.string().optional(), + /** ID of the space the page is in. */ + spaceId: z.string().optional(), + /** Position of child page within the given parent page tree. */ + childPosition: z.number().nullish(), +}); + +export type ChildPage = z.infer; diff --git a/packages/cloud/src/models/childPageSortOrder.ts b/packages/cloud/src/models/childPageSortOrder.ts new file mode 100644 index 00000000..197fcb7d --- /dev/null +++ b/packages/cloud/src/models/childPageSortOrder.ts @@ -0,0 +1,18 @@ +import { z } from 'zod'; +/** + * The sort fields for child pages. The default sort direction is ascending by child-position. To sort in descending + * order, append a `-` character before the sort field. For example, `fieldName` or `-fieldName`. + */ + +export const ChildPageSortOrderSchema = z.enum([ + 'created-date', + '-created-date', + 'id', + '-id', + 'child-position', + '-child-position', + 'modified-date', + '-modified-date', +]); + +export type ChildPageSortOrder = z.infer; diff --git a/packages/cloud/src/models/childPages.ts b/packages/cloud/src/models/childPages.ts new file mode 100644 index 00000000..fce04f00 --- /dev/null +++ b/packages/cloud/src/models/childPages.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ChildPageSchema } from './childPage.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const ChildPagesSchema = apiObject({ + results: z.array(ChildPageSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type ChildPages = z.infer; diff --git a/packages/cloud/src/models/children.ts b/packages/cloud/src/models/children.ts new file mode 100644 index 00000000..8bf27d03 --- /dev/null +++ b/packages/cloud/src/models/children.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { OnlyArchivedAndCurrentContentStatusSchema } from '#/models/onlyArchivedAndCurrentContentStatus'; + +export const ChildrenSchema = apiObject({ + /** ID of the child content. */ + id: z.string().optional(), + status: OnlyArchivedAndCurrentContentStatusSchema.optional(), + /** Title of the child content. */ + title: z.string().optional(), + /** Hierarchical content type (database/embed/folder/page/whiteboard). */ + type: z.string().optional(), + /** ID of the space the content is in. */ + spaceId: z.string().optional(), + /** + * Numerical value indicating position of the content relative to its siblings (with the same parentId) within the + * content tree. If the content is sorted by childPosition, it will reflect the default content ordering within the + * content tree. + */ + childPosition: z.number().nullish(), +}); + +export type Children = z.infer; diff --git a/packages/cloud/src/models/childrenComment.ts b/packages/cloud/src/models/childrenComment.ts new file mode 100644 index 00000000..54190d31 --- /dev/null +++ b/packages/cloud/src/models/childrenComment.ts @@ -0,0 +1,21 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { VersionSchema } from '#/models/version'; +import { BodySummarySchema } from '#/models/bodySummary'; +import { CommentLinksSchema } from '#/models/commentLinks'; + +export const ChildrenCommentSchema = apiObject({ + /** ID of the comment. */ + id: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the comment. */ + title: z.string().optional(), + /** ID of the parent comment the child comment is in. */ + parentCommentId: z.string().optional(), + version: VersionSchema.nullish(), + body: BodySummarySchema.nullish(), + _links: CommentLinksSchema.nullish(), +}); + +export type ChildrenComment = z.infer; diff --git a/packages/cloud/src/models/classificationLevel.ts b/packages/cloud/src/models/classificationLevel.ts new file mode 100644 index 00000000..ba73843c --- /dev/null +++ b/packages/cloud/src/models/classificationLevel.ts @@ -0,0 +1,29 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ClassificationLevelStatusSchema } from '#/models/classificationLevelStatus'; +import { ClassificationLevelColorSchema } from '#/models/classificationLevelColor'; +/** + * A unit of [data + * classification](https://support.atlassian.com/security-and-access-policies/docs/what-is-data-classification/) defined + * by an organiation. * A classification level may be associated with specific storage and handling requirements or + * expectations. + */ + +export const ClassificationLevelSchema = apiObject({ + /** The ID of the classification level. */ + id: z.string().optional(), + /** The status of the classification level. */ + status: ClassificationLevelStatusSchema.optional(), + /** The order of the classification level object. */ + order: z.number().optional(), + /** The name of the classification level object. */ + name: z.string().optional(), + /** The description of the classification level object. */ + description: z.string().optional(), + /** The guideline of the classification level object. */ + guideline: z.string().optional(), + /** The color of the classification level object. */ + color: ClassificationLevelColorSchema.optional(), +}); + +export type ClassificationLevel = z.infer; diff --git a/packages/cloud/src/models/classificationLevelColor.ts b/packages/cloud/src/models/classificationLevelColor.ts new file mode 100644 index 00000000..f9f3d0de --- /dev/null +++ b/packages/cloud/src/models/classificationLevelColor.ts @@ -0,0 +1,17 @@ +import { z } from 'zod'; + +export const ClassificationLevelColorSchema = z.enum([ + 'RED', + 'RED_BOLD', + 'ORANGE', + 'YELLOW', + 'GREEN', + 'BLUE', + 'NAVY', + 'TEAL', + 'PURPLE', + 'GREY', + 'LIME', +]); + +export type ClassificationLevelColor = z.infer; diff --git a/packages/cloud/src/models/classificationLevelStatus.ts b/packages/cloud/src/models/classificationLevelStatus.ts new file mode 100644 index 00000000..89f9bd12 --- /dev/null +++ b/packages/cloud/src/models/classificationLevelStatus.ts @@ -0,0 +1,5 @@ +import { z } from 'zod'; + +export const ClassificationLevelStatusSchema = z.enum(['DRAFT', 'PUBLISHED', 'ARCHIVED']); + +export type ClassificationLevelStatus = z.infer; diff --git a/packages/cloud/src/models/commentBodyWrite.ts b/packages/cloud/src/models/commentBodyWrite.ts new file mode 100644 index 00000000..9fa4dc11 --- /dev/null +++ b/packages/cloud/src/models/commentBodyWrite.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const CommentBodyWriteSchema = apiObject({ + /** Type of content representation used for the value field. */ + representation: z.enum(['storage', 'atlas_doc_format', 'wiki']).optional(), + /** Body of the comment, in the format found in the representation field. */ + value: z.string().optional(), +}); + +export type CommentBodyWrite = z.infer; diff --git a/packages/cloud/src/models/commentContentProperties.ts b/packages/cloud/src/models/commentContentProperties.ts new file mode 100644 index 00000000..7191dc2b --- /dev/null +++ b/packages/cloud/src/models/commentContentProperties.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentPropertySchema } from './contentProperty.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const CommentContentPropertiesSchema = apiObject({ + results: z.array(ContentPropertySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type CommentContentProperties = z.infer; diff --git a/packages/cloud/src/models/commentLinks.ts b/packages/cloud/src/models/commentLinks.ts new file mode 100644 index 00000000..6b39cdeb --- /dev/null +++ b/packages/cloud/src/models/commentLinks.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const CommentLinksSchema = apiObject({ + /** Web UI link of the content. */ + webui: z.string().optional(), +}); + +export type CommentLinks = z.infer; diff --git a/packages/cloud/src/models/commentNestedBodyWrite.ts b/packages/cloud/src/models/commentNestedBodyWrite.ts new file mode 100644 index 00000000..fa863505 --- /dev/null +++ b/packages/cloud/src/models/commentNestedBodyWrite.ts @@ -0,0 +1,12 @@ +import type { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { CommentBodyWriteSchema } from '#/models/commentBodyWrite'; +/** Body of the comment. Only one body format should be specified as the property* for this object, e.g. `storage`. */ + +export const CommentNestedBodyWriteSchema = apiObject({ + storage: CommentBodyWriteSchema.nullish(), + atlas_doc_format: CommentBodyWriteSchema.nullish(), + wiki: CommentBodyWriteSchema.nullish(), +}); + +export type CommentNestedBodyWrite = z.infer; diff --git a/packages/cloud/src/models/commentSortOrder.ts b/packages/cloud/src/models/commentSortOrder.ts new file mode 100644 index 00000000..5b67de79 --- /dev/null +++ b/packages/cloud/src/models/commentSortOrder.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +/** + * The sort fields for comments. The default sort direction is ascending. To sort in descending order, append a `-` + * character before the sort field. For example, `fieldName` or `-fieldName`. + */ + +export const CommentSortOrderSchema = z.enum(['created-date', '-created-date', 'modified-date', '-modified-date']); + +export type CommentSortOrder = z.infer; diff --git a/packages/cloud/src/models/commentVersion.ts b/packages/cloud/src/models/commentVersion.ts new file mode 100644 index 00000000..d8efd888 --- /dev/null +++ b/packages/cloud/src/models/commentVersion.ts @@ -0,0 +1,22 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { VersionedEntitySchema } from '#/models/versionedEntity'; + +export const CommentVersionSchema = apiObject({ + /** Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** Message associated with the current version. */ + message: z.string().optional(), + /** The version number. */ + number: z.number().optional(), + /** + * Describes if this version is a minor version. Email notifications and activity stream updates are not created for + * minor versions. + */ + minorEdit: z.boolean().optional(), + /** The account ID of the user who created this version. */ + authorId: z.string().optional(), + comment: VersionedEntitySchema.nullish(), +}); + +export type CommentVersion = z.infer; diff --git a/packages/cloud/src/models/contentIdToContentType.ts b/packages/cloud/src/models/contentIdToContentType.ts new file mode 100644 index 00000000..70c8ae60 --- /dev/null +++ b/packages/cloud/src/models/contentIdToContentType.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const ContentIdToContentTypeSchema = apiObject({ + /** + * JSON object containing all requested content ids as keys and their associated content types as the values. + * Duplicate content ids in the request will be returned under a single key in the response. For built-in content + * types, the enumerations are as specified. Custom content ids will be mapped to their associated type. + */ + results: z.record(z.string(), z.any()).nullish(), +}); + +export type ContentIdToContentType = z.infer; diff --git a/packages/cloud/src/models/contentProperty.ts b/packages/cloud/src/models/contentProperty.ts new file mode 100644 index 00000000..92260bf8 --- /dev/null +++ b/packages/cloud/src/models/contentProperty.ts @@ -0,0 +1,15 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { VersionSchema } from '#/models/version'; + +export const ContentPropertySchema = apiObject({ + /** ID of the property */ + id: z.string().optional(), + /** Key of the property */ + key: z.string().optional(), + /** Value of the property. Must be a valid JSON value. */ + value: z.unknown().optional(), + version: VersionSchema.nullish(), +}); + +export type ContentProperty = z.infer; diff --git a/packages/cloud/src/models/contentPropertyCreate.ts b/packages/cloud/src/models/contentPropertyCreate.ts new file mode 100644 index 00000000..1e050d72 --- /dev/null +++ b/packages/cloud/src/models/contentPropertyCreate.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const ContentPropertyCreateSchema = apiObject({ + /** Key of the content property */ + key: z.string().optional(), + /** Value of the content property. */ + value: z.unknown().optional(), +}); + +export type ContentPropertyCreate = z.infer; diff --git a/packages/cloud/src/models/contentPropertySortOrder.ts b/packages/cloud/src/models/contentPropertySortOrder.ts new file mode 100644 index 00000000..69016d2c --- /dev/null +++ b/packages/cloud/src/models/contentPropertySortOrder.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +/** + * The sort fields for content properties. The default sort direction is ascending. To sort in descending order, append + * a `-` character before the sort field. For example, `fieldName` or `-fieldName`. + */ + +export const ContentPropertySortOrderSchema = z.enum(['key', '-key']); + +export type ContentPropertySortOrder = z.infer; diff --git a/packages/cloud/src/models/contentPropertyUpdate.ts b/packages/cloud/src/models/contentPropertyUpdate.ts new file mode 100644 index 00000000..d6daa38d --- /dev/null +++ b/packages/cloud/src/models/contentPropertyUpdate.ts @@ -0,0 +1,18 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const ContentPropertyUpdateSchema = apiObject({ + /** Key of the content property */ + key: z.string().optional(), + /** Value of the content property. */ + value: z.unknown().optional(), + /** New version number and associated message */ + version: apiObject({ + /** Version number of the new version. Should be 1 more than the current version number. */ + number: z.number().optional(), + /** Message to be associated with the new version. */ + message: z.string().optional(), + }).nullish(), +}); + +export type ContentPropertyUpdate = z.infer; diff --git a/packages/cloud/src/models/contentSortOrder.ts b/packages/cloud/src/models/contentSortOrder.ts new file mode 100644 index 00000000..9230c2f5 --- /dev/null +++ b/packages/cloud/src/models/contentSortOrder.ts @@ -0,0 +1,20 @@ +import { z } from 'zod'; +/** + * The sort fields for hierarchical content types. The default sort direction is ascending. To sort in descending order, + * append a `-` character before the sort field. For example, `fieldName` or `-fieldName`. + */ + +export const ContentSortOrderSchema = z.enum([ + 'created-date', + '-created-date', + 'id', + '-id', + 'modified-date', + '-modified-date', + 'child-position', + '-child-position', + 'title', + '-title', +]); + +export type ContentSortOrder = z.infer; diff --git a/packages/cloud/src/models/contentStatus.ts b/packages/cloud/src/models/contentStatus.ts new file mode 100644 index 00000000..6815c7f3 --- /dev/null +++ b/packages/cloud/src/models/contentStatus.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +/** The status of the content. */ + +export const ContentStatusSchema = z.enum(['current', 'draft', 'archived', 'historical', 'trashed', 'deleted', 'any']); + +export type ContentStatus = z.infer; diff --git a/packages/cloud/src/models/createFooterCommentModel.ts b/packages/cloud/src/models/createFooterCommentModel.ts new file mode 100644 index 00000000..bb78c32b --- /dev/null +++ b/packages/cloud/src/models/createFooterCommentModel.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { CommentBodyWriteSchema } from '#/models/commentBodyWrite'; +import { CommentNestedBodyWriteSchema } from '#/models/commentNestedBodyWrite'; + +export const CreateFooterCommentModelSchema = apiObject({ + /** + * ID of the containing blog post, if intending to create a top level footer comment. Do not provide if creating a + * reply. + */ + blogPostId: z.string().optional(), + /** ID of the containing page, if intending to create a top level footer comment. Do not provide if creating a reply. */ + pageId: z.string().optional(), + /** ID of the parent comment, if intending to create a reply. Do not provide if creating a top level comment. */ + parentCommentId: z.string().optional(), + /** ID of the attachment, if intending to create a comment against an attachment. */ + attachmentId: z.string().optional(), + /** ID of the custom content, if intending to create a comment against a custom content. */ + customContentId: z.string().optional(), + body: z.union([CommentBodyWriteSchema, CommentNestedBodyWriteSchema]).nullish(), +}); + +export type CreateFooterCommentModel = z.infer; diff --git a/packages/cloud/src/models/createInlineCommentModel.ts b/packages/cloud/src/models/createInlineCommentModel.ts new file mode 100644 index 00000000..d0e2eef2 --- /dev/null +++ b/packages/cloud/src/models/createInlineCommentModel.ts @@ -0,0 +1,38 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { CommentBodyWriteSchema } from '#/models/commentBodyWrite'; +import { CommentNestedBodyWriteSchema } from '#/models/commentNestedBodyWrite'; + +export const CreateInlineCommentModelSchema = apiObject({ + /** + * ID of the containing blog post, if intending to create a top level footer comment. Do not provide if creating a + * reply. + */ + blogPostId: z.string().optional(), + /** ID of the containing page, if intending to create a top level footer comment. Do not provide if creating a reply. */ + pageId: z.string().optional(), + /** ID of the parent comment, if intending to create a reply. Do not provide if creating a top level comment. */ + parentCommentId: z.string().optional(), + body: z.union([CommentBodyWriteSchema, CommentNestedBodyWriteSchema]).nullish(), + /** + * Object describing the text to highlight on the page/blog post. Only applicable for top level inline comments (not + * replies) and required in that case. + */ + inlineCommentProperties: apiObject({ + /** The text to highlight */ + textSelection: z.string().optional(), + /** + * The number of matches for the selected text on the page (should be strictly greater than + * textSelectionMatchIndex) + */ + textSelectionMatchCount: z.number().optional(), + /** + * The match index to highlight. This is zero-based. E.g. if you have 3 occurrences of "hello world" on a page + * and you want to highlight the second occurrence, you should pass 1 for textSelectionMatchIndex and 3 for + * textSelectionMatchCount. + */ + textSelectionMatchIndex: z.number().optional(), + }).nullish(), +}); + +export type CreateInlineCommentModel = z.infer; diff --git a/packages/cloud/src/models/customContent.ts b/packages/cloud/src/models/customContent.ts new file mode 100644 index 00000000..53209080 --- /dev/null +++ b/packages/cloud/src/models/customContent.ts @@ -0,0 +1,74 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { VersionSchema } from '#/models/version'; +import { LabelSchema } from '#/models/label'; +import { OptionalFieldMetaSchema } from '#/models/optionalFieldMeta'; +import { OptionalFieldLinksSchema } from '#/models/optionalFieldLinks'; +import { ContentPropertySchema } from '#/models/contentProperty'; +import { OperationSchema } from '#/models/operation'; +import { CustomContentBodySchema } from '#/models/customContentBody'; +import { CustomContentLinksSchema } from '#/models/customContentLinks'; + +export const CustomContentSchema = apiObject({ + /** ID of the custom content. */ + id: z.string().optional(), + /** The type of custom content. */ + type: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the custom content. */ + title: z.string().optional(), + /** + * ID of the space the custom content is in. + * + * Note: This is always returned, regardless of if the custom content has a container that is a space. + */ + spaceId: z.string().optional(), + /** + * ID of the containing page. + * + * Note: This is only returned if the custom content has a container that is a page. + */ + pageId: z.string().optional(), + /** + * ID of the containing blog post. + * + * Note: This is only returned if the custom content has a container that is a blog post. + */ + blogPostId: z.string().optional(), + /** + * ID of the containing custom content. + * + * Note: This is only returned if the custom content has a container that is custom content. + */ + customContentId: z.string().optional(), + /** The account ID of the user who created this custom content originally. */ + authorId: z.string().optional(), + /** Date and time when the custom content was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + version: VersionSchema.nullish(), + labels: apiObject({ + results: z.array(LabelSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + properties: apiObject({ + results: z.array(ContentPropertySchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + operations: apiObject({ + results: z.array(OperationSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + versions: apiObject({ + results: z.array(VersionSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + body: CustomContentBodySchema.nullish(), + _links: CustomContentLinksSchema.nullish(), +}); + +export type CustomContent = z.infer; diff --git a/packages/cloud/src/models/customContentAttachments.ts b/packages/cloud/src/models/customContentAttachments.ts new file mode 100644 index 00000000..0e42e14f --- /dev/null +++ b/packages/cloud/src/models/customContentAttachments.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { AttachmentSummarySchema } from './attachmentSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const CustomContentAttachmentsSchema = apiObject({ + results: z.array(AttachmentSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type CustomContentAttachments = z.infer; diff --git a/packages/cloud/src/models/customContentBody.ts b/packages/cloud/src/models/customContentBody.ts new file mode 100644 index 00000000..16be3d78 --- /dev/null +++ b/packages/cloud/src/models/customContentBody.ts @@ -0,0 +1,13 @@ +import type { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BodyTypeSchema } from '#/models/bodyType'; +/** Contains fields for each representation type requested. */ + +export const CustomContentBodySchema = apiObject({ + raw: BodyTypeSchema.nullish(), + storage: BodyTypeSchema.nullish(), + atlas_doc_format: BodyTypeSchema.nullish(), + view: BodyTypeSchema.nullish(), +}); + +export type CustomContentBody = z.infer; diff --git a/packages/cloud/src/models/customContentBodyRepresentation.ts b/packages/cloud/src/models/customContentBodyRepresentation.ts new file mode 100644 index 00000000..d3b7d7d1 --- /dev/null +++ b/packages/cloud/src/models/customContentBodyRepresentation.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +/** The formats a custom content body can be represented as. A subset of BodyRepresentation. */ + +export const CustomContentBodyRepresentationSchema = z.enum(['raw', 'storage', 'atlas_doc_format']); + +export type CustomContentBodyRepresentation = z.infer; diff --git a/packages/cloud/src/models/customContentBodyRepresentationSingle.ts b/packages/cloud/src/models/customContentBodyRepresentationSingle.ts new file mode 100644 index 00000000..d9be564a --- /dev/null +++ b/packages/cloud/src/models/customContentBodyRepresentationSingle.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +/** The formats a custom content body can be represented as. A subset of BodyRepresentation. */ + +export const CustomContentBodyRepresentationSingleSchema = z.enum([ + 'raw', + 'storage', + 'atlas_doc_format', + 'view', + 'export_view', + 'anonymous_export_view', +]); + +export type CustomContentBodyRepresentationSingle = z.infer; diff --git a/packages/cloud/src/models/customContentBodySummary.ts b/packages/cloud/src/models/customContentBodySummary.ts new file mode 100644 index 00000000..52f790a8 --- /dev/null +++ b/packages/cloud/src/models/customContentBodySummary.ts @@ -0,0 +1,12 @@ +import type { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BodyTypeSchema } from '#/models/bodyType'; +/** Contains fields for each representation type requested. */ + +export const CustomContentBodySummarySchema = apiObject({ + raw: BodyTypeSchema.nullish(), + storage: BodyTypeSchema.nullish(), + atlas_doc_format: BodyTypeSchema.nullish(), +}); + +export type CustomContentBodySummary = z.infer; diff --git a/packages/cloud/src/models/customContentBodyWrite.ts b/packages/cloud/src/models/customContentBodyWrite.ts new file mode 100644 index 00000000..5f5803f2 --- /dev/null +++ b/packages/cloud/src/models/customContentBodyWrite.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const CustomContentBodyWriteSchema = apiObject({ + /** Type of content representation used for the value field. */ + representation: z.enum(['storage', 'atlas_doc_format', 'raw']).optional(), + /** Body of the custom content, in the format found in the representation field. */ + value: z.string().optional(), +}); + +export type CustomContentBodyWrite = z.infer; diff --git a/packages/cloud/src/models/customContentByType.ts b/packages/cloud/src/models/customContentByType.ts new file mode 100644 index 00000000..872988f3 --- /dev/null +++ b/packages/cloud/src/models/customContentByType.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { CustomContentSummarySchema } from './customContentSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const CustomContentByTypeSchema = apiObject({ + results: z.array(CustomContentSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type CustomContentByType = z.infer; diff --git a/packages/cloud/src/models/customContentByTypeInBlogPost.ts b/packages/cloud/src/models/customContentByTypeInBlogPost.ts new file mode 100644 index 00000000..3131e621 --- /dev/null +++ b/packages/cloud/src/models/customContentByTypeInBlogPost.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { CustomContentSummarySchema } from './customContentSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const CustomContentByTypeInBlogPostSchema = apiObject({ + results: z.array(CustomContentSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type CustomContentByTypeInBlogPost = z.infer; diff --git a/packages/cloud/src/models/customContentByTypeInPage.ts b/packages/cloud/src/models/customContentByTypeInPage.ts new file mode 100644 index 00000000..e068d7d6 --- /dev/null +++ b/packages/cloud/src/models/customContentByTypeInPage.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { CustomContentSummarySchema } from './customContentSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const CustomContentByTypeInPageSchema = apiObject({ + results: z.array(CustomContentSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type CustomContentByTypeInPage = z.infer; diff --git a/packages/cloud/src/models/customContentByTypeInSpace.ts b/packages/cloud/src/models/customContentByTypeInSpace.ts new file mode 100644 index 00000000..36160862 --- /dev/null +++ b/packages/cloud/src/models/customContentByTypeInSpace.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { CustomContentSummarySchema } from './customContentSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const CustomContentByTypeInSpaceSchema = apiObject({ + results: z.array(CustomContentSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type CustomContentByTypeInSpace = z.infer; diff --git a/packages/cloud/src/models/customContentComment.ts b/packages/cloud/src/models/customContentComment.ts new file mode 100644 index 00000000..004cd574 --- /dev/null +++ b/packages/cloud/src/models/customContentComment.ts @@ -0,0 +1,21 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { VersionSchema } from '#/models/version'; +import { BodySchema } from '#/models/body'; +import { CommentLinksSchema } from '#/models/commentLinks'; + +export const CustomContentCommentSchema = apiObject({ + /** ID of the comment. */ + id: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the comment. */ + title: z.string().optional(), + /** ID of the custom content containing the comment. */ + customContentId: z.string().optional(), + version: VersionSchema.nullish(), + body: BodySchema.nullish(), + _links: CommentLinksSchema.nullish(), +}); + +export type CustomContentComment = z.infer; diff --git a/packages/cloud/src/models/customContentComments.ts b/packages/cloud/src/models/customContentComments.ts new file mode 100644 index 00000000..d0ca4b81 --- /dev/null +++ b/packages/cloud/src/models/customContentComments.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { CustomContentCommentSchema } from './customContentComment.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const CustomContentCommentsSchema = apiObject({ + results: z.array(CustomContentCommentSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type CustomContentComments = z.infer; diff --git a/packages/cloud/src/models/customContentContentProperties.ts b/packages/cloud/src/models/customContentContentProperties.ts new file mode 100644 index 00000000..b45e6ee6 --- /dev/null +++ b/packages/cloud/src/models/customContentContentProperties.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentPropertySchema } from './contentProperty.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const CustomContentContentPropertiesSchema = apiObject({ + results: z.array(ContentPropertySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type CustomContentContentProperties = z.infer; diff --git a/packages/cloud/src/models/customContentLabels.ts b/packages/cloud/src/models/customContentLabels.ts new file mode 100644 index 00000000..839534a2 --- /dev/null +++ b/packages/cloud/src/models/customContentLabels.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { LabelSchema } from './label.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const CustomContentLabelsSchema = apiObject({ + results: z.array(LabelSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type CustomContentLabels = z.infer; diff --git a/packages/cloud/src/models/customContentLinks.ts b/packages/cloud/src/models/customContentLinks.ts new file mode 100644 index 00000000..0249bc45 --- /dev/null +++ b/packages/cloud/src/models/customContentLinks.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const CustomContentLinksSchema = apiObject({ + /** Web UI link of the content. */ + webui: z.string().optional(), +}); + +export type CustomContentLinks = z.infer; diff --git a/packages/cloud/src/models/customContentNestedBodyWrite.ts b/packages/cloud/src/models/customContentNestedBodyWrite.ts new file mode 100644 index 00000000..4bff9fa1 --- /dev/null +++ b/packages/cloud/src/models/customContentNestedBodyWrite.ts @@ -0,0 +1,15 @@ +import type { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { CustomContentBodyWriteSchema } from '#/models/customContentBodyWrite'; +/** + * Body of the custom content. Only one body format should be specified as the property* for this object, e.g. + * `storage`. + */ + +export const CustomContentNestedBodyWriteSchema = apiObject({ + storage: CustomContentBodyWriteSchema.nullish(), + atlas_doc_format: CustomContentBodyWriteSchema.nullish(), + raw: CustomContentBodyWriteSchema.nullish(), +}); + +export type CustomContentNestedBodyWrite = z.infer; diff --git a/packages/cloud/src/models/customContentSortOrder.ts b/packages/cloud/src/models/customContentSortOrder.ts new file mode 100644 index 00000000..a937d578 --- /dev/null +++ b/packages/cloud/src/models/customContentSortOrder.ts @@ -0,0 +1,18 @@ +import { z } from 'zod'; +/** + * The sort fields for custom content. The default sort direction is ascending. To sort in descending order, append a + * `-` character before the sort field. For example, `fieldName` or `-fieldName`. + */ + +export const CustomContentSortOrderSchema = z.enum([ + 'id', + '-id', + 'created-date', + '-created-date', + 'modified-date', + '-modified-date', + 'title', + '-title', +]); + +export type CustomContentSortOrder = z.infer; diff --git a/packages/cloud/src/models/customContentSummary.ts b/packages/cloud/src/models/customContentSummary.ts new file mode 100644 index 00000000..e60011e3 --- /dev/null +++ b/packages/cloud/src/models/customContentSummary.ts @@ -0,0 +1,49 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { VersionSchema } from '#/models/version'; +import { CustomContentBodySummarySchema } from '#/models/customContentBodySummary'; +import { CustomContentLinksSchema } from '#/models/customContentLinks'; + +export const CustomContentSummarySchema = apiObject({ + /** ID of the custom content. */ + id: z.string().optional(), + /** The type of custom content. */ + type: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the custom content. */ + title: z.string().optional(), + /** + * ID of the space the custom content is in. + * + * Note: This is always returned, regardless of if the custom content has a container that is a space. + */ + spaceId: z.string().optional(), + /** + * ID of the containing page. + * + * Note: This is only returned if the custom content has a container that is a page. + */ + pageId: z.string().optional(), + /** + * ID of the containing blog post. + * + * Note: This is only returned if the custom content has a container that is a blog post. + */ + blogPostId: z.string().optional(), + /** + * ID of the containing custom content. + * + * Note: This is only returned if the custom content has a container that is custom content. + */ + customContentId: z.string().optional(), + /** The account ID of the user who created this custom content originally. */ + authorId: z.string().optional(), + /** Date and time when the custom content was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + version: VersionSchema.nullish(), + body: CustomContentBodySummarySchema.nullish(), + _links: CustomContentLinksSchema.nullish(), +}); + +export type CustomContentSummary = z.infer; diff --git a/packages/cloud/src/models/customContentVersion.ts b/packages/cloud/src/models/customContentVersion.ts new file mode 100644 index 00000000..76b922c1 --- /dev/null +++ b/packages/cloud/src/models/customContentVersion.ts @@ -0,0 +1,22 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { VersionedEntitySchema } from '#/models/versionedEntity'; + +export const CustomContentVersionSchema = apiObject({ + /** Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** Message associated with the current version. */ + message: z.string().optional(), + /** The version number. */ + number: z.number().optional(), + /** + * Describes if this version is a minor version. Email notifications and activity stream updates are not created for + * minor versions. + */ + minorEdit: z.boolean().optional(), + /** The account ID of the user who created this version. */ + authorId: z.string().optional(), + custom: VersionedEntitySchema.nullish(), +}); + +export type CustomContentVersion = z.infer; diff --git a/packages/cloud/src/models/customContentVersions.ts b/packages/cloud/src/models/customContentVersions.ts new file mode 100644 index 00000000..04bca19e --- /dev/null +++ b/packages/cloud/src/models/customContentVersions.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { CustomContentVersionSchema } from './customContentVersion.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const CustomContentVersionsSchema = apiObject({ + results: z.array(CustomContentVersionSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type CustomContentVersions = z.infer; diff --git a/packages/cloud/src/models/dataPolicyMetadata.ts b/packages/cloud/src/models/dataPolicyMetadata.ts new file mode 100644 index 00000000..8f866640 --- /dev/null +++ b/packages/cloud/src/models/dataPolicyMetadata.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +/** Details about data policies. */ + +export const DataPolicyMetadataSchema = apiObject({ + /** Whether the workspace contains any content blocked for (inaccessible to) the requesting client application. */ + anyContentBlocked: z.boolean().optional(), +}); + +export type DataPolicyMetadata = z.infer; diff --git a/packages/cloud/src/models/dataPolicySpace.ts b/packages/cloud/src/models/dataPolicySpace.ts new file mode 100644 index 00000000..43f11eb6 --- /dev/null +++ b/packages/cloud/src/models/dataPolicySpace.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { SpaceDescriptionSchema } from '#/models/spaceDescription'; +import { SpaceIconSchema } from '#/models/spaceIcon'; +import { SpaceLinksSchema } from '#/models/spaceLinks'; + +export const DataPolicySpaceSchema = apiObject({ + /** ID of the space. */ + id: z.string().optional(), + /** Key of the space. */ + key: z.string().optional(), + /** Name of the space. */ + name: z.string().optional(), + description: SpaceDescriptionSchema.nullish(), + dataPolicy: apiObject({ + /** Whether the space contains any content blocked for (inaccessible to) the requesting client application. */ + anyContentBlocked: z.boolean().optional(), + }).nullish(), + icon: SpaceIconSchema.nullish(), + _links: SpaceLinksSchema.nullish(), +}); + +export type DataPolicySpace = z.infer; diff --git a/packages/cloud/src/models/dataPolicySpaces.ts b/packages/cloud/src/models/dataPolicySpaces.ts new file mode 100644 index 00000000..67cad1b4 --- /dev/null +++ b/packages/cloud/src/models/dataPolicySpaces.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { DataPolicySpaceSchema } from './dataPolicySpace.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const DataPolicySpacesSchema = apiObject({ + results: z.array(DataPolicySpaceSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type DataPolicySpaces = z.infer; diff --git a/packages/cloud/src/models/database.ts b/packages/cloud/src/models/database.ts new file mode 100644 index 00000000..b6fc5e3a --- /dev/null +++ b/packages/cloud/src/models/database.ts @@ -0,0 +1,33 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { ParentContentTypeSchema } from '#/models/parentContentType'; +import { VersionSchema } from '#/models/version'; +import { DatabaseLinksSchema } from '#/models/databaseLinks'; + +export const DatabaseSchema = apiObject({ + /** ID of the database. */ + id: z.string().optional(), + /** The content type of the object. */ + type: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the database. */ + title: z.string().optional(), + /** ID of the parent content, or null if there is no parent content. */ + parentId: z.string().nullish(), + parentType: ParentContentTypeSchema.nullish(), + /** Position of the database within the given parent page tree. */ + position: z.number().nullish(), + /** The account ID of the user who created this database originally. */ + authorId: z.string().optional(), + /** The account ID of the user who owns this database. */ + ownerId: z.string().optional(), + /** Date and time when the database was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** ID of the space the database is in. */ + spaceId: z.string().optional(), + version: VersionSchema.nullish(), + _links: DatabaseLinksSchema.nullish(), +}); + +export type Database = z.infer; diff --git a/packages/cloud/src/models/databaseAncestors.ts b/packages/cloud/src/models/databaseAncestors.ts new file mode 100644 index 00000000..14e3b204 --- /dev/null +++ b/packages/cloud/src/models/databaseAncestors.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { AncestorSchema } from './ancestor.js'; + +export const DatabaseAncestorsSchema = apiObject({ + results: z.array(AncestorSchema).optional(), +}); + +export type DatabaseAncestors = z.infer; diff --git a/packages/cloud/src/models/databaseContentProperties.ts b/packages/cloud/src/models/databaseContentProperties.ts new file mode 100644 index 00000000..c0ced44b --- /dev/null +++ b/packages/cloud/src/models/databaseContentProperties.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentPropertySchema } from './contentProperty.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const DatabaseContentPropertiesSchema = apiObject({ + results: z.array(ContentPropertySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type DatabaseContentProperties = z.infer; diff --git a/packages/cloud/src/models/databaseDescendants.ts b/packages/cloud/src/models/databaseDescendants.ts new file mode 100644 index 00000000..240e85ab --- /dev/null +++ b/packages/cloud/src/models/databaseDescendants.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { DescendantsSchema } from './descendants.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const DatabaseDescendantsSchema = apiObject({ + results: z.array(DescendantsSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type DatabaseDescendants = z.infer; diff --git a/packages/cloud/src/models/databaseDirectChildren.ts b/packages/cloud/src/models/databaseDirectChildren.ts new file mode 100644 index 00000000..c39f9b25 --- /dev/null +++ b/packages/cloud/src/models/databaseDirectChildren.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ChildrenSchema } from './children.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const DatabaseDirectChildrenSchema = apiObject({ + results: z.array(ChildrenSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type DatabaseDirectChildren = z.infer; diff --git a/packages/cloud/src/models/databaseLinks.ts b/packages/cloud/src/models/databaseLinks.ts new file mode 100644 index 00000000..225fd430 --- /dev/null +++ b/packages/cloud/src/models/databaseLinks.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const DatabaseLinksSchema = apiObject({ + /** Web UI link of the content. */ + webui: z.string().optional(), +}); + +export type DatabaseLinks = z.infer; diff --git a/packages/cloud/src/models/deleteSpaceRoleResponse.ts b/packages/cloud/src/models/deleteSpaceRoleResponse.ts new file mode 100644 index 00000000..df4fb6df --- /dev/null +++ b/packages/cloud/src/models/deleteSpaceRoleResponse.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const DeleteSpaceRoleResponseSchema = apiObject({ + /** Id of the task to update the space permissions associated with the space role */ + taskId: z.string().optional(), +}); + +export type DeleteSpaceRoleResponse = z.infer; diff --git a/packages/cloud/src/models/descendants.ts b/packages/cloud/src/models/descendants.ts new file mode 100644 index 00000000..ba49956e --- /dev/null +++ b/packages/cloud/src/models/descendants.ts @@ -0,0 +1,25 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { OnlyArchivedAndCurrentContentStatusSchema } from '#/models/onlyArchivedAndCurrentContentStatus'; + +export const DescendantsSchema = apiObject({ + /** ID of the descendant. */ + id: z.string().optional(), + status: OnlyArchivedAndCurrentContentStatusSchema.optional(), + /** Title of the descendant. */ + title: z.string().optional(), + /** Hierarchical content type (database/embed/folder/page/whiteboard). */ + type: z.string().optional(), + /** ID of the parent content. */ + parentId: z.string().optional(), + /** Depth of the descendant in the content tree relative to the content specified in the request. */ + depth: z.number().optional(), + /** + * Numerical value indicating position of the content relative to its siblings (with the same parentId) within the + * content tree. If the content is sorted by childPosition, it will reflect the default content ordering within the + * content tree. + */ + childPosition: z.number().nullish(), +}); + +export type Descendants = z.infer; diff --git a/packages/cloud/src/models/detailedVersion.ts b/packages/cloud/src/models/detailedVersion.ts new file mode 100644 index 00000000..360cc7bb --- /dev/null +++ b/packages/cloud/src/models/detailedVersion.ts @@ -0,0 +1,28 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const DetailedVersionSchema = apiObject({ + /** The current version number. */ + number: z.number().optional(), + /** The account ID of the user who created this version. */ + authorId: z.string().optional(), + /** Message associated with the current version. */ + message: z.string().optional(), + /** Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** + * Describes if this version is a minor version. Email notifications and activity stream updates are not created for + * minor versions. + */ + minorEdit: z.boolean().optional(), + /** Describes if the content type is modified in this version (e.g. page to blog) */ + contentTypeModified: z.boolean().optional(), + /** The account IDs of users that collaborated on this version. */ + collaborators: z.array(z.string()).nullish(), + /** The version number of the version prior to this current content update. */ + prevVersion: z.number().nullish(), + /** The version number of the version after this current content update. */ + nextVersion: z.number().nullish(), +}); + +export type DetailedVersion = z.infer; diff --git a/packages/cloud/src/models/folder.ts b/packages/cloud/src/models/folder.ts new file mode 100644 index 00000000..480fc73d --- /dev/null +++ b/packages/cloud/src/models/folder.ts @@ -0,0 +1,33 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { ParentContentTypeSchema } from '#/models/parentContentType'; +import { VersionSchema } from '#/models/version'; +import { FolderLinksSchema } from '#/models/folderLinks'; + +export const FolderSchema = apiObject({ + /** ID of the folder. */ + id: z.string().optional(), + /** The content type of the object. */ + type: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the folder. */ + title: z.string().optional(), + /** ID of the parent content, or null if there is no parent content. */ + parentId: z.string().nullish(), + parentType: ParentContentTypeSchema.nullish(), + /** Position of the folder within the given parent page tree. */ + position: z.number().nullish(), + /** The account ID of the user who created this folder. */ + authorId: z.string().optional(), + /** The account ID of the user who owns this folder. */ + ownerId: z.string().optional(), + /** Date and time when the folder was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** ID of the space the folder is in. */ + spaceId: z.string().optional(), + version: VersionSchema.nullish(), + _links: FolderLinksSchema.nullish(), +}); + +export type Folder = z.infer; diff --git a/packages/cloud/src/models/folderAncestors.ts b/packages/cloud/src/models/folderAncestors.ts new file mode 100644 index 00000000..6a4484c7 --- /dev/null +++ b/packages/cloud/src/models/folderAncestors.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { AncestorSchema } from './ancestor.js'; + +export const FolderAncestorsSchema = apiObject({ + results: z.array(AncestorSchema).optional(), +}); + +export type FolderAncestors = z.infer; diff --git a/packages/cloud/src/models/folderContentProperties.ts b/packages/cloud/src/models/folderContentProperties.ts new file mode 100644 index 00000000..35135448 --- /dev/null +++ b/packages/cloud/src/models/folderContentProperties.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentPropertySchema } from './contentProperty.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const FolderContentPropertiesSchema = apiObject({ + results: z.array(ContentPropertySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type FolderContentProperties = z.infer; diff --git a/packages/cloud/src/models/folderDescendants.ts b/packages/cloud/src/models/folderDescendants.ts new file mode 100644 index 00000000..0b89ff77 --- /dev/null +++ b/packages/cloud/src/models/folderDescendants.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { DescendantsSchema } from './descendants.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const FolderDescendantsSchema = apiObject({ + results: z.array(DescendantsSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type FolderDescendants = z.infer; diff --git a/packages/cloud/src/models/folderDirectChildren.ts b/packages/cloud/src/models/folderDirectChildren.ts new file mode 100644 index 00000000..b03b37cc --- /dev/null +++ b/packages/cloud/src/models/folderDirectChildren.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ChildrenSchema } from './children.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const FolderDirectChildrenSchema = apiObject({ + results: z.array(ChildrenSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type FolderDirectChildren = z.infer; diff --git a/packages/cloud/src/models/folderLinks.ts b/packages/cloud/src/models/folderLinks.ts new file mode 100644 index 00000000..5e3f8e43 --- /dev/null +++ b/packages/cloud/src/models/folderLinks.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const FolderLinksSchema = apiObject({ + /** Web UI link of the content. */ + webui: z.string().optional(), +}); + +export type FolderLinks = z.infer; diff --git a/packages/cloud/src/models/footerComment.ts b/packages/cloud/src/models/footerComment.ts new file mode 100644 index 00000000..092208d4 --- /dev/null +++ b/packages/cloud/src/models/footerComment.ts @@ -0,0 +1,54 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { VersionSchema } from '#/models/version'; +import { ContentPropertySchema } from '#/models/contentProperty'; +import { OptionalFieldMetaSchema } from '#/models/optionalFieldMeta'; +import { OptionalFieldLinksSchema } from '#/models/optionalFieldLinks'; +import { OperationSchema } from '#/models/operation'; +import { LikeSchema } from '#/models/like'; +import { BodySchema } from '#/models/body'; +import { CommentLinksSchema } from '#/models/commentLinks'; + +export const FooterCommentSchema = apiObject({ + /** ID of the comment. */ + id: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the comment. */ + title: z.string().optional(), + /** ID of the blog post containing the comment if the comment is on a blog post. */ + blogPostId: z.string().optional(), + /** ID of the page containing the comment if the comment is on a page. */ + pageId: z.string().optional(), + /** ID of the attachment containing the comment if the comment is on an attachment. */ + attachmentId: z.string().optional(), + /** ID of the custom content containing the comment if the comment is on a custom content. */ + customContentId: z.string().optional(), + /** ID of the parent comment if the comment is a reply. */ + parentCommentId: z.string().optional(), + version: VersionSchema.nullish(), + properties: apiObject({ + results: z.array(ContentPropertySchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + operations: apiObject({ + results: z.array(OperationSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + likes: apiObject({ + results: z.array(LikeSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + versions: apiObject({ + results: z.array(VersionSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + body: BodySchema.nullish(), + _links: CommentLinksSchema.nullish(), +}); + +export type FooterComment = z.infer; diff --git a/packages/cloud/src/models/footerCommentChildren.ts b/packages/cloud/src/models/footerCommentChildren.ts new file mode 100644 index 00000000..66aefc5c --- /dev/null +++ b/packages/cloud/src/models/footerCommentChildren.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ChildrenCommentSchema } from './childrenComment.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const FooterCommentChildrenSchema = apiObject({ + results: z.array(ChildrenCommentSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type FooterCommentChildren = z.infer; diff --git a/packages/cloud/src/models/footerCommentVersions.ts b/packages/cloud/src/models/footerCommentVersions.ts new file mode 100644 index 00000000..326a0c84 --- /dev/null +++ b/packages/cloud/src/models/footerCommentVersions.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { CommentVersionSchema } from './commentVersion.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const FooterCommentVersionsSchema = apiObject({ + results: z.array(CommentVersionSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type FooterCommentVersions = z.infer; diff --git a/packages/cloud/src/models/footerComments.ts b/packages/cloud/src/models/footerComments.ts new file mode 100644 index 00000000..cd0f4f7b --- /dev/null +++ b/packages/cloud/src/models/footerComments.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { FooterCommentSchema } from './footerComment.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const FooterCommentsSchema = apiObject({ + results: z.array(FooterCommentSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type FooterComments = z.infer; diff --git a/packages/cloud/src/models/footerLikeCount.ts b/packages/cloud/src/models/footerLikeCount.ts new file mode 100644 index 00000000..49427b0e --- /dev/null +++ b/packages/cloud/src/models/footerLikeCount.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const FooterLikeCountSchema = apiObject({ + /** The count number */ + count: z.number().optional(), +}); + +export type FooterLikeCount = z.infer; diff --git a/packages/cloud/src/models/footerLikeUsers.ts b/packages/cloud/src/models/footerLikeUsers.ts new file mode 100644 index 00000000..9cd0ea49 --- /dev/null +++ b/packages/cloud/src/models/footerLikeUsers.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { LikeSchema } from './like.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const FooterLikeUsersSchema = apiObject({ + results: z.array(LikeSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type FooterLikeUsers = z.infer; diff --git a/packages/cloud/src/models/forgeAppProperties.ts b/packages/cloud/src/models/forgeAppProperties.ts new file mode 100644 index 00000000..7f81763b --- /dev/null +++ b/packages/cloud/src/models/forgeAppProperties.ts @@ -0,0 +1,19 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const ForgeAppPropertiesSchema = apiObject({ + results: z + .array( + apiObject({ + /** The key of the property */ + key: z.string().optional(), + /** The value of the property */ + value: z.record(z.string(), z.any()).optional(), + }), + ) + .optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type ForgeAppProperties = z.infer; diff --git a/packages/cloud/src/models/forgeAppProperty.ts b/packages/cloud/src/models/forgeAppProperty.ts new file mode 100644 index 00000000..635384db --- /dev/null +++ b/packages/cloud/src/models/forgeAppProperty.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const ForgeAppPropertySchema = apiObject({ + /** The key of the property */ + key: z.string().optional(), + /** The value of the property */ + value: z.record(z.string(), z.any()).optional(), +}); + +export type ForgeAppProperty = z.infer; diff --git a/packages/cloud/src/models/icon.ts b/packages/cloud/src/models/icon.ts new file mode 100644 index 00000000..fc5df5cf --- /dev/null +++ b/packages/cloud/src/models/icon.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +/** + * This object represents an icon. If used as a profilePicture, this may be returned as null, depending on the user's + * privacy setting. + */ + +export const IconSchema = apiObject({ + path: z.string(), + isDefault: z.boolean(), +}); + +export type Icon = z.infer; diff --git a/packages/cloud/src/models/index.ts b/packages/cloud/src/models/index.ts new file mode 100644 index 00000000..c7e77cf8 --- /dev/null +++ b/packages/cloud/src/models/index.ts @@ -0,0 +1,455 @@ +export * from './abstractPageLinks.js'; + +export * from './accessByEmail.js'; + +export * from './accountStatus.js'; + +export * from './accountType.js'; + +export * from './adminKey.js'; + +export * from './ancestor.js'; + +export * from './ancestorType.js'; + +export * from './attachment.js'; + +export * from './attachmentComment.js'; + +export * from './attachmentComments.js'; + +export * from './attachmentContentProperties.js'; + +export * from './attachmentLabels.js'; + +export * from './attachmentLinks.js'; + +export * from './attachmentSortOrder.js'; + +export * from './attachmentSummary.js'; + +export * from './attachmentVersion.js'; + +export * from './attachmentVersions.js'; + +export * from './attachments.js'; + +export * from './availableSpacePermissions.js'; + +export * from './availableSpaceRoles.js'; + +export * from './blogPost.js'; + +export * from './blogPostBodyWrite.js'; + +export * from './blogPostComment.js'; + +export * from './blogPostContentStatus.js'; + +export * from './blogPostFooterComments.js'; + +export * from './blogPostInlineComment.js'; + +export * from './blogPostInlineComments.js'; + +export * from './blogPostLabels.js'; + +export * from './blogPostLikeCount.js'; + +export * from './blogPostLikeUsers.js'; + +export * from './blogPostNestedBodyWrite.js'; + +export * from './blogPostSortOrder.js'; + +export * from './blogPostSummary.js'; + +export * from './blogPostVersion.js'; + +export * from './blogPostVersions.js'; + +export * from './blogPosts.js'; + +export * from './blogPostsInSpace.js'; + +export * from './blogpostAttachments.js'; + +export * from './blogpostContentProperties.js'; + +export * from './body.js'; + +export * from './bodySummary.js'; + +export * from './bodyType.js'; + +export * from './bulkAssignRoles.js'; + +export * from './bulkRemoveAccess.js'; + +export * from './bulkTransitionCombinationEntry.js'; + +export * from './bulkTransitionDecodedPermission.js'; + +export * from './bulkTransitionPrincipalTypeAssignment.js'; + +export * from './bulkTransitionRoleAssignment.js'; + +export * from './bulkTransitionSpaceSelection.js'; + +export * from './bulkTransitionSpaceTarget.js'; + +export * from './bulkTransitionTask.js'; + +export * from './bulkTransitionTaskStatus.js'; + +export * from './bulkUserLookup.js'; + +export * from './childCustomContent.js'; + +export * from './childCustomContentGet.js'; + +export * from './childCustomContentSortOrder.js'; + +export * from './childPage.js'; + +export * from './childPageSortOrder.js'; + +export * from './childPages.js'; + +export * from './children.js'; + +export * from './childrenComment.js'; + +export * from './classificationLevel.js'; + +export * from './classificationLevelColor.js'; + +export * from './classificationLevelStatus.js'; + +export * from './commentBodyWrite.js'; + +export * from './commentContentProperties.js'; + +export * from './commentLinks.js'; + +export * from './commentNestedBodyWrite.js'; + +export * from './commentSortOrder.js'; + +export * from './commentVersion.js'; + +export * from './contentIdToContentType.js'; + +export * from './contentProperty.js'; + +export * from './contentPropertyCreate.js'; + +export * from './contentPropertySortOrder.js'; + +export * from './contentPropertyUpdate.js'; + +export * from './contentSortOrder.js'; + +export * from './contentStatus.js'; + +export * from './createFooterCommentModel.js'; + +export * from './createInlineCommentModel.js'; + +export * from './customContent.js'; + +export * from './customContentAttachments.js'; + +export * from './customContentBody.js'; + +export * from './customContentBodyRepresentation.js'; + +export * from './customContentBodyRepresentationSingle.js'; + +export * from './customContentBodySummary.js'; + +export * from './customContentBodyWrite.js'; + +export * from './customContentByType.js'; + +export * from './customContentByTypeInBlogPost.js'; + +export * from './customContentByTypeInPage.js'; + +export * from './customContentByTypeInSpace.js'; + +export * from './customContentComment.js'; + +export * from './customContentComments.js'; + +export * from './customContentContentProperties.js'; + +export * from './customContentLabels.js'; + +export * from './customContentLinks.js'; + +export * from './customContentNestedBodyWrite.js'; + +export * from './customContentSortOrder.js'; + +export * from './customContentSummary.js'; + +export * from './customContentVersion.js'; + +export * from './customContentVersions.js'; + +export * from './dataPolicyMetadata.js'; + +export * from './dataPolicySpace.js'; + +export * from './dataPolicySpaces.js'; + +export * from './database.js'; + +export * from './databaseAncestors.js'; + +export * from './databaseContentProperties.js'; + +export * from './databaseDescendants.js'; + +export * from './databaseDirectChildren.js'; + +export * from './databaseLinks.js'; + +export * from './deleteSpaceRoleResponse.js'; + +export * from './descendants.js'; + +export * from './detailedVersion.js'; + +export * from './folder.js'; + +export * from './folderAncestors.js'; + +export * from './folderContentProperties.js'; + +export * from './folderDescendants.js'; + +export * from './folderDirectChildren.js'; + +export * from './folderLinks.js'; + +export * from './footerComment.js'; + +export * from './footerCommentChildren.js'; + +export * from './footerCommentVersions.js'; + +export * from './footerComments.js'; + +export * from './footerLikeCount.js'; + +export * from './footerLikeUsers.js'; + +export * from './forgeAppProperties.js'; + +export * from './forgeAppProperty.js'; + +export * from './icon.js'; + +export * from './inlineComment.js'; + +export * from './inlineCommentChildren.js'; + +export * from './inlineCommentChildrenGet.js'; + +export * from './inlineCommentProperties.js'; + +export * from './inlineCommentResolutionStatus.js'; + +export * from './inlineCommentVersions.js'; + +export * from './inlineComments.js'; + +export * from './inlineLikeCount.js'; + +export * from './inlineLikeUsers.js'; + +export * from './label.js'; + +export * from './labelAttachments.js'; + +export * from './labelBlogPosts.js'; + +export * from './labelPages.js'; + +export * from './labelSortOrder.js'; + +export * from './labels.js'; + +export * from './like.js'; + +export * from './listSpacePermissionCombinationsResponse.js'; + +export * from './multiEntityLinks.js'; + +export * from './onlyArchivedAndCurrentContentStatus.js'; + +export * from './operation.js'; + +export * from './optionalFieldLinks.js'; + +export * from './optionalFieldMeta.js'; + +export * from './page.js'; + +export * from './pageAncestors.js'; + +export * from './pageAttachments.js'; + +export * from './pageBodyWrite.js'; + +export * from './pageComment.js'; + +export * from './pageContentProperties.js'; + +export * from './pageDescendants.js'; + +export * from './pageDirectChildren.js'; + +export * from './pageFooterComments.js'; + +export * from './pageInlineComment.js'; + +export * from './pageInlineComments.js'; + +export * from './pageLabels.js'; + +export * from './pageLikeCount.js'; + +export * from './pageLikeUsers.js'; + +export * from './pageNestedBodyWrite.js'; + +export * from './pageSortOrder.js'; + +export * from './pageSummary.js'; + +export * from './pageVersion.js'; + +export * from './pageVersions.js'; + +export * from './pages.js'; + +export * from './pagesInSpace.js'; + +export * from './parentContentType.js'; + +export * from './permittedOperations.js'; + +export * from './primaryBodyRepresentation.js'; + +export * from './primaryBodyRepresentationSingle.js'; + +export * from './principal.js'; + +export * from './principalType.js'; + +export * from './redaction.js'; + +export * from './redactionPointer.js'; + +export * from './redactionPointerResponse.js'; + +export * from './redactionResponse.js'; + +export * from './redactionSection.js'; + +export * from './roleType.js'; + +export * from './smartLink.js'; + +export * from './smartLinkAncestors.js'; + +export * from './smartLinkContentProperties.js'; + +export * from './smartLinkDescendants.js'; + +export * from './smartLinkDirectChildren.js'; + +export * from './smartLinkLinks.js'; + +export * from './space.js'; + +export * from './spaceContentLabels.js'; + +export * from './spaceDescription.js'; + +export * from './spaceDescriptionBodyRepresentation.js'; + +export * from './spaceIcon.js'; + +export * from './spaceLabels.js'; + +export * from './spaceLinks.js'; + +export * from './spacePermission.js'; + +export * from './spacePermissionAssignment.js'; + +export * from './spacePermissionsAssignments.js'; + +export * from './spaceProperties.js'; + +export * from './spaceProperty.js'; + +export * from './spacePropertyCreate.js'; + +export * from './spacePropertyUpdate.js'; + +export * from './spaceRole.js'; + +export * from './spaceRoleAssignment.js'; + +export * from './spaceRoleAssignmentsGet.js'; + +export * from './spaceRoleAssignmentsSet.js'; + +export * from './spaceRoleMode.js'; + +export * from './spaceSortOrder.js'; + +export * from './spaceStatus.js'; + +export * from './spaceSummary.js'; + +export * from './spaceType.js'; + +export * from './spaces.js'; + +export * from './task.js'; + +export * from './taskBody.js'; + +export * from './tasks.js'; + +export * from './updateFooterCommentModel.js'; + +export * from './updateInlineCommentModel.js'; + +export * from './updateSpaceRoleResponse.js'; + +export * from './user.js'; + +export * from './version.js'; + +export * from './versionSortOrder.js'; + +export * from './versionedEntity.js'; + +export * from './whiteboard.js'; + +export * from './whiteboardAncestors.js'; + +export * from './whiteboardContentProperties.js'; + +export * from './whiteboardDescendants.js'; + +export * from './whiteboardDirectChildren.js'; + +export * from './whiteboardLinks.js'; diff --git a/packages/cloud/src/models/inlineComment.ts b/packages/cloud/src/models/inlineComment.ts new file mode 100644 index 00000000..767dee49 --- /dev/null +++ b/packages/cloud/src/models/inlineComment.ts @@ -0,0 +1,66 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { VersionSchema } from '#/models/version'; +import { BodySchema } from '#/models/body'; +import { InlineCommentResolutionStatusSchema } from '#/models/inlineCommentResolutionStatus'; +import { ContentPropertySchema } from '#/models/contentProperty'; +import { OptionalFieldMetaSchema } from '#/models/optionalFieldMeta'; +import { OptionalFieldLinksSchema } from '#/models/optionalFieldLinks'; +import { OperationSchema } from '#/models/operation'; +import { LikeSchema } from '#/models/like'; +import { CommentLinksSchema } from '#/models/commentLinks'; + +export const InlineCommentSchema = apiObject({ + /** ID of the comment. */ + id: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the comment. */ + title: z.string().optional(), + /** ID of the blog post containing the comment if the comment is on a blog post. */ + blogPostId: z.string().optional(), + /** ID of the page containing the comment if the comment is on a page. */ + pageId: z.string().optional(), + /** ID of the parent comment if the comment is a reply. */ + parentCommentId: z.string().optional(), + version: VersionSchema.nullish(), + body: BodySchema.nullish(), + /** + * Atlassian Account ID of last person who modified the resolve state of the comment. Null until comment is resolved + * or reopened. + */ + resolutionLastModifierId: z.string().optional(), + /** + * Timestamp of the last modification to the comment's resolution status. Null until comment is resolved or + * reopened. + */ + resolutionLastModifiedAt: z.coerce.date().optional(), + resolutionStatus: InlineCommentResolutionStatusSchema.optional(), + properties: apiObject({ + results: z.array(ContentPropertySchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + /** Property value used to reference the highlighted element in DOM. */ + inlineMarkerRef: z.string().optional(), + /** Text that is highlighted. */ + inlineOriginalSelection: z.string().optional(), + }).nullish(), + operations: apiObject({ + results: z.array(OperationSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + likes: apiObject({ + results: z.array(LikeSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + versions: apiObject({ + results: z.array(VersionSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + _links: CommentLinksSchema.nullish(), +}); + +export type InlineComment = z.infer; diff --git a/packages/cloud/src/models/inlineCommentChildren.ts b/packages/cloud/src/models/inlineCommentChildren.ts new file mode 100644 index 00000000..3547c912 --- /dev/null +++ b/packages/cloud/src/models/inlineCommentChildren.ts @@ -0,0 +1,25 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { VersionSchema } from '#/models/version'; +import { BodySummarySchema } from '#/models/bodySummary'; +import { InlineCommentResolutionStatusSchema } from '#/models/inlineCommentResolutionStatus'; +import { InlineCommentPropertiesSchema } from '#/models/inlineCommentProperties'; +import { CommentLinksSchema } from '#/models/commentLinks'; + +export const InlineCommentChildrenSchema = apiObject({ + /** ID of the comment. */ + id: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the comment. */ + title: z.string().optional(), + /** ID of the parent comment the child comment is in. */ + parentCommentId: z.string().optional(), + version: VersionSchema.nullish(), + body: BodySummarySchema.nullish(), + resolutionStatus: InlineCommentResolutionStatusSchema.optional(), + properties: InlineCommentPropertiesSchema.nullish(), + _links: CommentLinksSchema.nullish(), +}); + +export type InlineCommentChildren = z.infer; diff --git a/packages/cloud/src/models/inlineCommentChildrenGet.ts b/packages/cloud/src/models/inlineCommentChildrenGet.ts new file mode 100644 index 00000000..9fad2012 --- /dev/null +++ b/packages/cloud/src/models/inlineCommentChildrenGet.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { InlineCommentChildrenSchema } from './inlineCommentChildren.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const InlineCommentChildrenGetSchema = apiObject({ + results: z.array(InlineCommentChildrenSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type InlineCommentChildrenGet = z.infer; diff --git a/packages/cloud/src/models/inlineCommentProperties.ts b/packages/cloud/src/models/inlineCommentProperties.ts new file mode 100644 index 00000000..50e5cabf --- /dev/null +++ b/packages/cloud/src/models/inlineCommentProperties.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const InlineCommentPropertiesSchema = apiObject({ + /** Property value used to reference the highlighted element in DOM. */ + inlineMarkerRef: z.string().optional(), + /** Text that is highlighted. */ + inlineOriginalSelection: z.string().optional(), +}); + +export type InlineCommentProperties = z.infer; diff --git a/packages/cloud/src/models/inlineCommentResolutionStatus.ts b/packages/cloud/src/models/inlineCommentResolutionStatus.ts new file mode 100644 index 00000000..03ad66c8 --- /dev/null +++ b/packages/cloud/src/models/inlineCommentResolutionStatus.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +/** Inline comment resolution status */ + +export const InlineCommentResolutionStatusSchema = z.enum(['open', 'reopened', 'resolved', 'dangling']); + +export type InlineCommentResolutionStatus = z.infer; diff --git a/packages/cloud/src/models/inlineCommentVersions.ts b/packages/cloud/src/models/inlineCommentVersions.ts new file mode 100644 index 00000000..14039eed --- /dev/null +++ b/packages/cloud/src/models/inlineCommentVersions.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { CommentVersionSchema } from './commentVersion.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const InlineCommentVersionsSchema = apiObject({ + results: z.array(CommentVersionSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type InlineCommentVersions = z.infer; diff --git a/packages/cloud/src/models/inlineComments.ts b/packages/cloud/src/models/inlineComments.ts new file mode 100644 index 00000000..f1d0ecef --- /dev/null +++ b/packages/cloud/src/models/inlineComments.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { InlineCommentSchema } from './inlineComment.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const InlineCommentsSchema = apiObject({ + results: z.array(InlineCommentSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type InlineComments = z.infer; diff --git a/packages/cloud/src/models/inlineLikeCount.ts b/packages/cloud/src/models/inlineLikeCount.ts new file mode 100644 index 00000000..2ae24328 --- /dev/null +++ b/packages/cloud/src/models/inlineLikeCount.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const InlineLikeCountSchema = apiObject({ + /** The count number */ + count: z.number().optional(), +}); + +export type InlineLikeCount = z.infer; diff --git a/packages/cloud/src/models/inlineLikeUsers.ts b/packages/cloud/src/models/inlineLikeUsers.ts new file mode 100644 index 00000000..fbc35977 --- /dev/null +++ b/packages/cloud/src/models/inlineLikeUsers.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { LikeSchema } from './like.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const InlineLikeUsersSchema = apiObject({ + results: z.array(LikeSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type InlineLikeUsers = z.infer; diff --git a/packages/cloud/src/models/label.ts b/packages/cloud/src/models/label.ts new file mode 100644 index 00000000..6354c36d --- /dev/null +++ b/packages/cloud/src/models/label.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const LabelSchema = apiObject({ + /** ID of the label. */ + id: z.string().optional(), + /** Name of the label. */ + name: z.string().optional(), + /** Prefix of the label. */ + prefix: z.string().optional(), +}); + +export type Label = z.infer; diff --git a/packages/cloud/src/models/labelAttachments.ts b/packages/cloud/src/models/labelAttachments.ts new file mode 100644 index 00000000..06745cf8 --- /dev/null +++ b/packages/cloud/src/models/labelAttachments.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { AttachmentSummarySchema } from './attachmentSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const LabelAttachmentsSchema = apiObject({ + results: z.array(AttachmentSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type LabelAttachments = z.infer; diff --git a/packages/cloud/src/models/labelBlogPosts.ts b/packages/cloud/src/models/labelBlogPosts.ts new file mode 100644 index 00000000..b7934d5a --- /dev/null +++ b/packages/cloud/src/models/labelBlogPosts.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BlogPostSummarySchema } from './blogPostSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const LabelBlogPostsSchema = apiObject({ + results: z.array(BlogPostSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type LabelBlogPosts = z.infer; diff --git a/packages/cloud/src/models/labelPages.ts b/packages/cloud/src/models/labelPages.ts new file mode 100644 index 00000000..8ebfb055 --- /dev/null +++ b/packages/cloud/src/models/labelPages.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { PageSummarySchema } from './pageSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const LabelPagesSchema = apiObject({ + results: z.array(PageSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type LabelPages = z.infer; diff --git a/packages/cloud/src/models/labelSortOrder.ts b/packages/cloud/src/models/labelSortOrder.ts new file mode 100644 index 00000000..24869853 --- /dev/null +++ b/packages/cloud/src/models/labelSortOrder.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +/** + * The sort fields for labels. The default sort direction is ascending. To sort in descending order, append a `-` + * character before the sort field. For example, `fieldName` or `-fieldName`. + */ + +export const LabelSortOrderSchema = z.enum(['created-date', '-created-date', 'id', '-id', 'name', '-name']); + +export type LabelSortOrder = z.infer; diff --git a/packages/cloud/src/models/labels.ts b/packages/cloud/src/models/labels.ts new file mode 100644 index 00000000..fe5e088a --- /dev/null +++ b/packages/cloud/src/models/labels.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { LabelSchema } from './label.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const LabelsSchema = apiObject({ + results: z.array(LabelSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type Labels = z.infer; diff --git a/packages/cloud/src/models/like.ts b/packages/cloud/src/models/like.ts new file mode 100644 index 00000000..51b3a92c --- /dev/null +++ b/packages/cloud/src/models/like.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const LikeSchema = apiObject({ + /** Account ID. */ + accountId: z.string().optional(), +}); + +export type Like = z.infer; diff --git a/packages/cloud/src/models/listSpacePermissionCombinationsResponse.ts b/packages/cloud/src/models/listSpacePermissionCombinationsResponse.ts new file mode 100644 index 00000000..0d155b96 --- /dev/null +++ b/packages/cloud/src/models/listSpacePermissionCombinationsResponse.ts @@ -0,0 +1,17 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BulkTransitionCombinationEntrySchema } from '#/models/bulkTransitionCombinationEntry'; + +export const ListSpacePermissionCombinationsResponseSchema = apiObject({ + /** One page of unassigned permission combinations, sorted by principalCount descending. */ + results: z.array(BulkTransitionCombinationEntrySchema), + /** + * ISO-8601 timestamp of the last audit run that populated the combinations table. Absent if the audit task has + * never run on this tenant. + */ + generatedAt: z.string().nullish(), + /** Opaque cursor for the next page. Absent when no further results exist. */ + cursor: z.string().nullish(), +}); + +export type ListSpacePermissionCombinationsResponse = z.infer; diff --git a/packages/cloud/src/models/multiEntityLinks.ts b/packages/cloud/src/models/multiEntityLinks.ts new file mode 100644 index 00000000..ba59cc53 --- /dev/null +++ b/packages/cloud/src/models/multiEntityLinks.ts @@ -0,0 +1,14 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const MultiEntityLinksSchema = apiObject({ + /** + * Used for pagination. Contains the relative URL for the next set of results, using a cursor query parameter. This + * property will not be present if there is no additional data available. + */ + next: z.string().optional(), + /** Base url of the Confluence site. */ + base: z.string().optional(), +}); + +export type MultiEntityLinks = z.infer; diff --git a/packages/cloud/src/models/onlyArchivedAndCurrentContentStatus.ts b/packages/cloud/src/models/onlyArchivedAndCurrentContentStatus.ts new file mode 100644 index 00000000..55622b20 --- /dev/null +++ b/packages/cloud/src/models/onlyArchivedAndCurrentContentStatus.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +/** The status of the content. */ + +export const OnlyArchivedAndCurrentContentStatusSchema = z.enum(['current', 'archived']); + +export type OnlyArchivedAndCurrentContentStatus = z.infer; diff --git a/packages/cloud/src/models/operation.ts b/packages/cloud/src/models/operation.ts new file mode 100644 index 00000000..a977b9d0 --- /dev/null +++ b/packages/cloud/src/models/operation.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const OperationSchema = apiObject({ + /** The type of operation. */ + operation: z.string().optional(), + /** The type of entity the operation type targets. */ + targetType: z.string().optional(), +}); + +export type Operation = z.infer; diff --git a/packages/cloud/src/models/optionalFieldLinks.ts b/packages/cloud/src/models/optionalFieldLinks.ts new file mode 100644 index 00000000..91b2cf08 --- /dev/null +++ b/packages/cloud/src/models/optionalFieldLinks.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const OptionalFieldLinksSchema = apiObject({ + /** A relative URL that can be used to fetch results beyond what this include parameter retrieves. */ + self: z.string().optional(), +}); + +export type OptionalFieldLinks = z.infer; diff --git a/packages/cloud/src/models/optionalFieldMeta.ts b/packages/cloud/src/models/optionalFieldMeta.ts new file mode 100644 index 00000000..ae581ab9 --- /dev/null +++ b/packages/cloud/src/models/optionalFieldMeta.ts @@ -0,0 +1,14 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const OptionalFieldMetaSchema = apiObject({ + /** Indicates if there are more available results that can be fetched. */ + hasMore: z.boolean().optional(), + /** + * A token that can be used in the query parameter of the endpoint returned in the `_links` property to retrieve the + * next set of results. + */ + cursor: z.string().optional(), +}); + +export type OptionalFieldMeta = z.infer; diff --git a/packages/cloud/src/models/page.ts b/packages/cloud/src/models/page.ts new file mode 100644 index 00000000..3b126fa4 --- /dev/null +++ b/packages/cloud/src/models/page.ts @@ -0,0 +1,68 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { ParentContentTypeSchema } from '#/models/parentContentType'; +import { VersionSchema } from '#/models/version'; +import { BodySchema } from '#/models/body'; +import { LabelSchema } from '#/models/label'; +import { OptionalFieldMetaSchema } from '#/models/optionalFieldMeta'; +import { OptionalFieldLinksSchema } from '#/models/optionalFieldLinks'; +import { ContentPropertySchema } from '#/models/contentProperty'; +import { OperationSchema } from '#/models/operation'; +import { LikeSchema } from '#/models/like'; +import { AbstractPageLinksSchema } from '#/models/abstractPageLinks'; + +export const PageSchema = apiObject({ + /** ID of the page. */ + id: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the page. */ + title: z.string().optional(), + /** ID of the space the page is in. */ + spaceId: z.string().optional(), + /** ID of the parent page, or null if there is no parent page. */ + parentId: z.string().nullish(), + parentType: ParentContentTypeSchema.nullish(), + /** Position of child page within the given parent page tree. */ + position: z.number().nullish(), + /** The account ID of the user who created this page originally. */ + authorId: z.string().optional(), + /** The account ID of the user who owns this page. */ + ownerId: z.string().nullish(), + /** The account ID of the user who owned this page previously, or null if there is no previous owner. */ + lastOwnerId: z.string().nullish(), + /** Date and time when the page was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + version: VersionSchema.nullish(), + body: BodySchema.nullish(), + labels: apiObject({ + results: z.array(LabelSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + properties: apiObject({ + results: z.array(ContentPropertySchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + operations: apiObject({ + results: z.array(OperationSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + likes: apiObject({ + results: z.array(LikeSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + versions: apiObject({ + results: z.array(VersionSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + /** Whether the page has been favorited by the current user. */ + isFavoritedByCurrentUser: z.boolean().optional(), + _links: AbstractPageLinksSchema.nullish(), +}); + +export type Page = z.infer; diff --git a/packages/cloud/src/models/pageAncestors.ts b/packages/cloud/src/models/pageAncestors.ts new file mode 100644 index 00000000..36642f00 --- /dev/null +++ b/packages/cloud/src/models/pageAncestors.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { AncestorSchema } from './ancestor.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const PageAncestorsSchema = apiObject({ + results: z.array(AncestorSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type PageAncestors = z.infer; diff --git a/packages/cloud/src/models/pageAttachments.ts b/packages/cloud/src/models/pageAttachments.ts new file mode 100644 index 00000000..7b701bc1 --- /dev/null +++ b/packages/cloud/src/models/pageAttachments.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { AttachmentSummarySchema } from './attachmentSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const PageAttachmentsSchema = apiObject({ + results: z.array(AttachmentSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type PageAttachments = z.infer; diff --git a/packages/cloud/src/models/pageBodyWrite.ts b/packages/cloud/src/models/pageBodyWrite.ts new file mode 100644 index 00000000..0d873a86 --- /dev/null +++ b/packages/cloud/src/models/pageBodyWrite.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const PageBodyWriteSchema = apiObject({ + /** Type of content representation used for the value field. */ + representation: z.enum(['storage', 'atlas_doc_format', 'wiki']).optional(), + /** Body of the page, in the format found in the representation field. */ + value: z.string().optional(), +}); + +export type PageBodyWrite = z.infer; diff --git a/packages/cloud/src/models/pageComment.ts b/packages/cloud/src/models/pageComment.ts new file mode 100644 index 00000000..d9f1a9b2 --- /dev/null +++ b/packages/cloud/src/models/pageComment.ts @@ -0,0 +1,21 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { VersionSchema } from '#/models/version'; +import { BodySummarySchema } from '#/models/bodySummary'; +import { CommentLinksSchema } from '#/models/commentLinks'; + +export const PageCommentSchema = apiObject({ + /** ID of the comment. */ + id: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the comment. */ + title: z.string().optional(), + /** ID of the page the comment is in. */ + pageId: z.string().optional(), + version: VersionSchema.nullish(), + body: BodySummarySchema.nullish(), + _links: CommentLinksSchema.nullish(), +}); + +export type PageComment = z.infer; diff --git a/packages/cloud/src/models/pageContentProperties.ts b/packages/cloud/src/models/pageContentProperties.ts new file mode 100644 index 00000000..c2fd0cc0 --- /dev/null +++ b/packages/cloud/src/models/pageContentProperties.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentPropertySchema } from './contentProperty.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const PageContentPropertiesSchema = apiObject({ + results: z.array(ContentPropertySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type PageContentProperties = z.infer; diff --git a/packages/cloud/src/models/pageDescendants.ts b/packages/cloud/src/models/pageDescendants.ts new file mode 100644 index 00000000..27dc6960 --- /dev/null +++ b/packages/cloud/src/models/pageDescendants.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { DescendantsSchema } from './descendants.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const PageDescendantsSchema = apiObject({ + results: z.array(DescendantsSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type PageDescendants = z.infer; diff --git a/packages/cloud/src/models/pageDirectChildren.ts b/packages/cloud/src/models/pageDirectChildren.ts new file mode 100644 index 00000000..9524b213 --- /dev/null +++ b/packages/cloud/src/models/pageDirectChildren.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ChildrenSchema } from './children.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const PageDirectChildrenSchema = apiObject({ + results: z.array(ChildrenSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type PageDirectChildren = z.infer; diff --git a/packages/cloud/src/models/pageFooterComments.ts b/packages/cloud/src/models/pageFooterComments.ts new file mode 100644 index 00000000..53987946 --- /dev/null +++ b/packages/cloud/src/models/pageFooterComments.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { PageCommentSchema } from './pageComment.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const PageFooterCommentsSchema = apiObject({ + results: z.array(PageCommentSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type PageFooterComments = z.infer; diff --git a/packages/cloud/src/models/pageInlineComment.ts b/packages/cloud/src/models/pageInlineComment.ts new file mode 100644 index 00000000..19947d12 --- /dev/null +++ b/packages/cloud/src/models/pageInlineComment.ts @@ -0,0 +1,25 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { VersionSchema } from '#/models/version'; +import { BodySummarySchema } from '#/models/bodySummary'; +import { InlineCommentResolutionStatusSchema } from '#/models/inlineCommentResolutionStatus'; +import { InlineCommentPropertiesSchema } from '#/models/inlineCommentProperties'; +import { CommentLinksSchema } from '#/models/commentLinks'; + +export const PageInlineCommentSchema = apiObject({ + /** ID of the comment. */ + id: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the comment. */ + title: z.string().optional(), + /** ID of the page the comment is in. */ + pageId: z.string().optional(), + version: VersionSchema.nullish(), + body: BodySummarySchema.nullish(), + resolutionStatus: InlineCommentResolutionStatusSchema.optional(), + properties: InlineCommentPropertiesSchema.nullish(), + _links: CommentLinksSchema.nullish(), +}); + +export type PageInlineComment = z.infer; diff --git a/packages/cloud/src/models/pageInlineComments.ts b/packages/cloud/src/models/pageInlineComments.ts new file mode 100644 index 00000000..4a92b225 --- /dev/null +++ b/packages/cloud/src/models/pageInlineComments.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { PageInlineCommentSchema } from './pageInlineComment.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const PageInlineCommentsSchema = apiObject({ + results: z.array(PageInlineCommentSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type PageInlineComments = z.infer; diff --git a/packages/cloud/src/models/pageLabels.ts b/packages/cloud/src/models/pageLabels.ts new file mode 100644 index 00000000..646b7663 --- /dev/null +++ b/packages/cloud/src/models/pageLabels.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { LabelSchema } from './label.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const PageLabelsSchema = apiObject({ + results: z.array(LabelSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type PageLabels = z.infer; diff --git a/packages/cloud/src/models/pageLikeCount.ts b/packages/cloud/src/models/pageLikeCount.ts new file mode 100644 index 00000000..254d930a --- /dev/null +++ b/packages/cloud/src/models/pageLikeCount.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const PageLikeCountSchema = apiObject({ + /** The count number */ + count: z.number().optional(), +}); + +export type PageLikeCount = z.infer; diff --git a/packages/cloud/src/models/pageLikeUsers.ts b/packages/cloud/src/models/pageLikeUsers.ts new file mode 100644 index 00000000..1ed99da7 --- /dev/null +++ b/packages/cloud/src/models/pageLikeUsers.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { LikeSchema } from './like.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const PageLikeUsersSchema = apiObject({ + results: z.array(LikeSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type PageLikeUsers = z.infer; diff --git a/packages/cloud/src/models/pageNestedBodyWrite.ts b/packages/cloud/src/models/pageNestedBodyWrite.ts new file mode 100644 index 00000000..e55e80b3 --- /dev/null +++ b/packages/cloud/src/models/pageNestedBodyWrite.ts @@ -0,0 +1,12 @@ +import type { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { PageBodyWriteSchema } from '#/models/pageBodyWrite'; +/** Body of the page. Only one body format should be specified as the property* for this object, e.g. `storage`. */ + +export const PageNestedBodyWriteSchema = apiObject({ + storage: PageBodyWriteSchema.nullish(), + atlas_doc_format: PageBodyWriteSchema.nullish(), + wiki: PageBodyWriteSchema.nullish(), +}); + +export type PageNestedBodyWrite = z.infer; diff --git a/packages/cloud/src/models/pageSortOrder.ts b/packages/cloud/src/models/pageSortOrder.ts new file mode 100644 index 00000000..7c0a96e7 --- /dev/null +++ b/packages/cloud/src/models/pageSortOrder.ts @@ -0,0 +1,18 @@ +import { z } from 'zod'; +/** + * The sort fields for pages. The default sort direction is ascending. To sort in descending order, append a `-` + * character before the sort field. For example, `fieldName` or `-fieldName`. + */ + +export const PageSortOrderSchema = z.enum([ + 'id', + '-id', + 'created-date', + '-created-date', + 'modified-date', + '-modified-date', + 'title', + '-title', +]); + +export type PageSortOrder = z.infer; diff --git a/packages/cloud/src/models/pageSummary.ts b/packages/cloud/src/models/pageSummary.ts new file mode 100644 index 00000000..f9bb40af --- /dev/null +++ b/packages/cloud/src/models/pageSummary.ts @@ -0,0 +1,37 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { ParentContentTypeSchema } from '#/models/parentContentType'; +import { VersionSchema } from '#/models/version'; +import { BodySummarySchema } from '#/models/bodySummary'; +import { AbstractPageLinksSchema } from '#/models/abstractPageLinks'; + +export const PageSummarySchema = apiObject({ + /** ID of the page. */ + id: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the page. */ + title: z.string().optional(), + /** ID of the space the page is in. */ + spaceId: z.string().optional(), + /** ID of the parent page, or null if there is no parent page. */ + parentId: z.string().nullish(), + parentType: ParentContentTypeSchema.nullish(), + /** Position of child page within the given parent page tree. */ + position: z.number().nullish(), + /** The account ID of the user who created this page originally. */ + authorId: z.string().optional(), + /** The account ID of the user who owns this page. */ + ownerId: z.string().nullish(), + /** The account ID of the user who owned this page previously, or null if there is no previous owner. */ + lastOwnerId: z.string().nullish(), + /** The subtype of the page. */ + subtype: z.string().nullish(), + /** Date and time when the page was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + version: VersionSchema.nullish(), + body: BodySummarySchema.nullish(), + _links: AbstractPageLinksSchema.nullish(), +}); + +export type PageSummary = z.infer; diff --git a/packages/cloud/src/models/pageVersion.ts b/packages/cloud/src/models/pageVersion.ts new file mode 100644 index 00000000..65e75a3d --- /dev/null +++ b/packages/cloud/src/models/pageVersion.ts @@ -0,0 +1,22 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { VersionedEntitySchema } from '#/models/versionedEntity'; + +export const PageVersionSchema = apiObject({ + /** Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** Message associated with the current version. */ + message: z.string().optional(), + /** The version number. */ + number: z.number().optional(), + /** + * Describes if this version is a minor version. Email notifications and activity stream updates are not created for + * minor versions. + */ + minorEdit: z.boolean().optional(), + /** The account ID of the user who created this version. */ + authorId: z.string().optional(), + page: VersionedEntitySchema.nullish(), +}); + +export type PageVersion = z.infer; diff --git a/packages/cloud/src/models/pageVersions.ts b/packages/cloud/src/models/pageVersions.ts new file mode 100644 index 00000000..90265e33 --- /dev/null +++ b/packages/cloud/src/models/pageVersions.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { PageVersionSchema } from './pageVersion.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const PageVersionsSchema = apiObject({ + results: z.array(PageVersionSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type PageVersions = z.infer; diff --git a/packages/cloud/src/models/pages.ts b/packages/cloud/src/models/pages.ts new file mode 100644 index 00000000..fc3a4073 --- /dev/null +++ b/packages/cloud/src/models/pages.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { PageSummarySchema } from './pageSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const PagesSchema = apiObject({ + results: z.array(PageSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type Pages = z.infer; diff --git a/packages/cloud/src/models/pagesInSpace.ts b/packages/cloud/src/models/pagesInSpace.ts new file mode 100644 index 00000000..14f76655 --- /dev/null +++ b/packages/cloud/src/models/pagesInSpace.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { PageSummarySchema } from './pageSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const PagesInSpaceSchema = apiObject({ + results: z.array(PageSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type PagesInSpace = z.infer; diff --git a/packages/cloud/src/models/parentContentType.ts b/packages/cloud/src/models/parentContentType.ts new file mode 100644 index 00000000..a280bf43 --- /dev/null +++ b/packages/cloud/src/models/parentContentType.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +/** Content type of the parent, or null if there is no parent. */ + +export const ParentContentTypeSchema = z.enum(['page', 'whiteboard', 'database', 'embed', 'folder']); + +export type ParentContentType = z.infer; diff --git a/packages/cloud/src/models/permittedOperations.ts b/packages/cloud/src/models/permittedOperations.ts new file mode 100644 index 00000000..c3836081 --- /dev/null +++ b/packages/cloud/src/models/permittedOperations.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { OperationSchema } from '#/models/operation'; +/** The list of operations permitted on entity. */ + +export const PermittedOperationsSchema = apiObject({ + operations: z.array(OperationSchema).nullish(), +}); + +export type PermittedOperations = z.infer; diff --git a/packages/cloud/src/models/primaryBodyRepresentation.ts b/packages/cloud/src/models/primaryBodyRepresentation.ts new file mode 100644 index 00000000..bb8f6277 --- /dev/null +++ b/packages/cloud/src/models/primaryBodyRepresentation.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +/** + * The primary formats a body can be represented as. A subset of BodyRepresentation. These formats are the only allowed + * formats in certain use cases. + */ + +export const PrimaryBodyRepresentationSchema = z.enum(['storage', 'atlas_doc_format']); + +export type PrimaryBodyRepresentation = z.infer; diff --git a/packages/cloud/src/models/primaryBodyRepresentationSingle.ts b/packages/cloud/src/models/primaryBodyRepresentationSingle.ts new file mode 100644 index 00000000..a06fb15a --- /dev/null +++ b/packages/cloud/src/models/primaryBodyRepresentationSingle.ts @@ -0,0 +1,17 @@ +import { z } from 'zod'; +/** + * The primary formats a body can be represented as. A subset of BodyRepresentation. These formats are the only allowed + * formats in certain use cases. + */ + +export const PrimaryBodyRepresentationSingleSchema = z.enum([ + 'storage', + 'atlas_doc_format', + 'view', + 'export_view', + 'anonymous_export_view', + 'styled_view', + 'editor', +]); + +export type PrimaryBodyRepresentationSingle = z.infer; diff --git a/packages/cloud/src/models/principal.ts b/packages/cloud/src/models/principal.ts new file mode 100644 index 00000000..4301577d --- /dev/null +++ b/packages/cloud/src/models/principal.ts @@ -0,0 +1,12 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { PrincipalTypeSchema } from '#/models/principalType'; +/** The principal of the role assignment. */ + +export const PrincipalSchema = apiObject({ + principalType: PrincipalTypeSchema.optional(), + /** The principal ID. */ + principalId: z.string().optional(), +}); + +export type Principal = z.infer; diff --git a/packages/cloud/src/models/principalType.ts b/packages/cloud/src/models/principalType.ts new file mode 100644 index 00000000..6519852d --- /dev/null +++ b/packages/cloud/src/models/principalType.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +/** The principal type. */ + +export const PrincipalTypeSchema = z.enum(['USER', 'GROUP', 'ACCESS_CLASS']); + +export type PrincipalType = z.infer; diff --git a/packages/cloud/src/models/redaction.ts b/packages/cloud/src/models/redaction.ts new file mode 100644 index 00000000..faedda6a --- /dev/null +++ b/packages/cloud/src/models/redaction.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { RedactionPointerSchema } from '#/models/redactionPointer'; + +export const RedactionSchema = apiObject({ + /** List of specific text ranges to redact within this section */ + redactions: z.array(RedactionPointerSchema).nullish(), +}); + +export type Redaction = z.infer; diff --git a/packages/cloud/src/models/redactionPointer.ts b/packages/cloud/src/models/redactionPointer.ts new file mode 100644 index 00000000..dd20e5a4 --- /dev/null +++ b/packages/cloud/src/models/redactionPointer.ts @@ -0,0 +1,21 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const RedactionPointerSchema = apiObject({ + /** + * JSON pointer indicating the exact location within the content structure where redaction should be applied. Points + * to the text node containing the content to redact. + */ + pointer: z.string(), + /** Starting character index (zero-based) within the target text where redaction begins. */ + from: z.number().optional(), + /** + * Ending character index (zero-based) within the target text where redaction ends (exclusive). Must be greater than + * or equal to 'from' value. + */ + to: z.number().optional(), + /** Optional human-readable reason for the redaction. Used for audit trails and compliance documentation. */ + reason: z.string().nullish(), +}); + +export type RedactionPointer = z.infer; diff --git a/packages/cloud/src/models/redactionPointerResponse.ts b/packages/cloud/src/models/redactionPointerResponse.ts new file mode 100644 index 00000000..9e42ca2f --- /dev/null +++ b/packages/cloud/src/models/redactionPointerResponse.ts @@ -0,0 +1,17 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const RedactionPointerResponseSchema = apiObject({ + /** JSON pointer indicating where the redaction was applied */ + pointer: z.string().optional(), + /** Starting character index where redaction was applied */ + from: z.number().optional(), + /** Ending character index where redaction was applied */ + to: z.number().optional(), + /** Reason for the redaction */ + reason: z.string().optional(), + /** Unique identifier for this redaction. Can be used to restore the redacted content later. */ + redactionId: z.string().optional(), +}); + +export type RedactionPointerResponse = z.infer; diff --git a/packages/cloud/src/models/redactionResponse.ts b/packages/cloud/src/models/redactionResponse.ts new file mode 100644 index 00000000..435128bb --- /dev/null +++ b/packages/cloud/src/models/redactionResponse.ts @@ -0,0 +1,14 @@ +import type { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { RedactionSectionSchema } from '#/models/redactionSection'; +/** + * Response containing details of all redactions that were applied to the content.* Each redaction includes a unique ID + * for restoration, except that code block redactions cannot be restored.* + */ + +export const RedactionResponseSchema = apiObject({ + body: RedactionSectionSchema.nullish(), + title: RedactionSectionSchema.nullish(), +}); + +export type RedactionResponse = z.infer; diff --git a/packages/cloud/src/models/redactionSection.ts b/packages/cloud/src/models/redactionSection.ts new file mode 100644 index 00000000..54d79246 --- /dev/null +++ b/packages/cloud/src/models/redactionSection.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { RedactionPointerResponseSchema } from '#/models/redactionPointerResponse'; + +export const RedactionSectionSchema = apiObject({ + /** List of redactions that were applied to this section */ + redactions: z.array(RedactionPointerResponseSchema).nullish(), +}); + +export type RedactionSection = z.infer; diff --git a/packages/cloud/src/models/roleType.ts b/packages/cloud/src/models/roleType.ts new file mode 100644 index 00000000..d82a1830 --- /dev/null +++ b/packages/cloud/src/models/roleType.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +/** The role type. */ + +export const RoleTypeSchema = z.enum(['SYSTEM', 'CUSTOM']); + +export type RoleType = z.infer; diff --git a/packages/cloud/src/models/smartLink.ts b/packages/cloud/src/models/smartLink.ts new file mode 100644 index 00000000..03a00f03 --- /dev/null +++ b/packages/cloud/src/models/smartLink.ts @@ -0,0 +1,38 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { ParentContentTypeSchema } from '#/models/parentContentType'; +import { VersionSchema } from '#/models/version'; +import { SmartLinkLinksSchema } from '#/models/smartLinkLinks'; + +export const SmartLinkSchema = apiObject({ + /** ID of the Smart Link in the content tree. */ + id: z.string().optional(), + /** The content type of the object. */ + type: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the Smart Link in the content tree. */ + title: z.string().optional(), + /** ID of the parent content, or null if there is no parent content. */ + parentId: z.string().nullish(), + parentType: ParentContentTypeSchema.nullish(), + /** Position of the Smart Link within the given parent page tree. */ + position: z.number().nullish(), + /** The account ID of the user who created this Smart Link in the content tree originally. */ + authorId: z.string().optional(), + /** The account ID of the user who owns this Smart Link in the content tree. */ + ownerId: z.string().optional(), + /** Date and time when the Smart Link in the content tree was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** + * The embedded URL of the Smart Link. If the Smart Link does not have an embedded URL, this property will not be + * included in the response. + */ + embedUrl: z.string().optional(), + /** ID of the space the Smart Link is in. */ + spaceId: z.string().optional(), + version: VersionSchema.nullish(), + _links: SmartLinkLinksSchema.nullish(), +}); + +export type SmartLink = z.infer; diff --git a/packages/cloud/src/models/smartLinkAncestors.ts b/packages/cloud/src/models/smartLinkAncestors.ts new file mode 100644 index 00000000..028fc26b --- /dev/null +++ b/packages/cloud/src/models/smartLinkAncestors.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { AncestorSchema } from './ancestor.js'; + +export const SmartLinkAncestorsSchema = apiObject({ + results: z.array(AncestorSchema).optional(), +}); + +export type SmartLinkAncestors = z.infer; diff --git a/packages/cloud/src/models/smartLinkContentProperties.ts b/packages/cloud/src/models/smartLinkContentProperties.ts new file mode 100644 index 00000000..ff6cf5a6 --- /dev/null +++ b/packages/cloud/src/models/smartLinkContentProperties.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentPropertySchema } from './contentProperty.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const SmartLinkContentPropertiesSchema = apiObject({ + results: z.array(ContentPropertySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type SmartLinkContentProperties = z.infer; diff --git a/packages/cloud/src/models/smartLinkDescendants.ts b/packages/cloud/src/models/smartLinkDescendants.ts new file mode 100644 index 00000000..a0ebe777 --- /dev/null +++ b/packages/cloud/src/models/smartLinkDescendants.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { DescendantsSchema } from './descendants.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const SmartLinkDescendantsSchema = apiObject({ + results: z.array(DescendantsSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type SmartLinkDescendants = z.infer; diff --git a/packages/cloud/src/models/smartLinkDirectChildren.ts b/packages/cloud/src/models/smartLinkDirectChildren.ts new file mode 100644 index 00000000..06a4a4b3 --- /dev/null +++ b/packages/cloud/src/models/smartLinkDirectChildren.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ChildrenSchema } from './children.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const SmartLinkDirectChildrenSchema = apiObject({ + results: z.array(ChildrenSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type SmartLinkDirectChildren = z.infer; diff --git a/packages/cloud/src/models/smartLinkLinks.ts b/packages/cloud/src/models/smartLinkLinks.ts new file mode 100644 index 00000000..dde336b9 --- /dev/null +++ b/packages/cloud/src/models/smartLinkLinks.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const SmartLinkLinksSchema = apiObject({ + /** Web UI link of the content. */ + webui: z.string().optional(), +}); + +export type SmartLinkLinks = z.infer; diff --git a/packages/cloud/src/models/space.ts b/packages/cloud/src/models/space.ts new file mode 100644 index 00000000..85d6f438 --- /dev/null +++ b/packages/cloud/src/models/space.ts @@ -0,0 +1,57 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { SpaceTypeSchema } from '#/models/spaceType'; +import { SpaceStatusSchema } from '#/models/spaceStatus'; +import { SpaceDescriptionSchema } from '#/models/spaceDescription'; +import { SpaceIconSchema } from '#/models/spaceIcon'; +import { LabelSchema } from '#/models/label'; +import { OptionalFieldMetaSchema } from '#/models/optionalFieldMeta'; +import { OptionalFieldLinksSchema } from '#/models/optionalFieldLinks'; +import { SpacePropertySchema } from '#/models/spaceProperty'; +import { OperationSchema } from '#/models/operation'; +import { SpacePermissionAssignmentSchema } from '#/models/spacePermissionAssignment'; +import { SpaceLinksSchema } from '#/models/spaceLinks'; + +export const SpaceSchema = apiObject({ + /** ID of the space. */ + id: z.string().optional(), + /** Key of the space. */ + key: z.string().optional(), + /** Name of the space. */ + name: z.string().optional(), + type: SpaceTypeSchema.optional(), + status: SpaceStatusSchema.optional(), + /** The account ID of the user who created this space originally. */ + authorId: z.string().optional(), + /** The account ID of the user who owns this space. */ + spaceOwnerId: z.string().optional(), + /** Date and time when the space was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** ID of the space's homepage. */ + homepageId: z.string().optional(), + description: SpaceDescriptionSchema.nullish(), + icon: SpaceIconSchema.nullish(), + labels: apiObject({ + results: z.array(LabelSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + properties: apiObject({ + results: z.array(SpacePropertySchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + operations: apiObject({ + results: z.array(OperationSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + permissions: apiObject({ + results: z.array(SpacePermissionAssignmentSchema).nullish(), + meta: OptionalFieldMetaSchema.nullish(), + _links: OptionalFieldLinksSchema.nullish(), + }).nullish(), + _links: SpaceLinksSchema.nullish(), +}); + +export type Space = z.infer; diff --git a/packages/cloud/src/models/spaceContentLabels.ts b/packages/cloud/src/models/spaceContentLabels.ts new file mode 100644 index 00000000..926846cb --- /dev/null +++ b/packages/cloud/src/models/spaceContentLabels.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { LabelSchema } from './label.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const SpaceContentLabelsSchema = apiObject({ + results: z.array(LabelSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type SpaceContentLabels = z.infer; diff --git a/packages/cloud/src/models/spaceDescription.ts b/packages/cloud/src/models/spaceDescription.ts new file mode 100644 index 00000000..6940ebbf --- /dev/null +++ b/packages/cloud/src/models/spaceDescription.ts @@ -0,0 +1,11 @@ +import type { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BodyTypeSchema } from '#/models/bodyType'; +/** Contains fields for each representation type requested. */ + +export const SpaceDescriptionSchema = apiObject({ + plain: BodyTypeSchema.nullish(), + view: BodyTypeSchema.nullish(), +}); + +export type SpaceDescription = z.infer; diff --git a/packages/cloud/src/models/spaceDescriptionBodyRepresentation.ts b/packages/cloud/src/models/spaceDescriptionBodyRepresentation.ts new file mode 100644 index 00000000..a5f8c3f8 --- /dev/null +++ b/packages/cloud/src/models/spaceDescriptionBodyRepresentation.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +/** The formats a space description can be represented as. A subset of BodyRepresentation. */ + +export const SpaceDescriptionBodyRepresentationSchema = z.enum(['plain', 'view']); + +export type SpaceDescriptionBodyRepresentation = z.infer; diff --git a/packages/cloud/src/models/spaceIcon.ts b/packages/cloud/src/models/spaceIcon.ts new file mode 100644 index 00000000..82dd18d7 --- /dev/null +++ b/packages/cloud/src/models/spaceIcon.ts @@ -0,0 +1,20 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +/** The icon of the space */ + +export const SpaceIconSchema = apiObject({ + /** + * The path (relative to base URL) at which the space's icon can be retrieved. The format should be like + * `/wiki/download/...` or `/wiki/aa-avatar/...` + */ + path: z.string().optional(), + /** + * The path (relative to base URL) that can be used to retrieve a link to download the space icon. 3LO apps should + * use this link instead of the value provided in the `path` property to retrieve the icon. + * + * Currently this field is only returned for `global` spaces and not `personal` spaces. + */ + apiDownloadLink: z.string().optional(), +}); + +export type SpaceIcon = z.infer; diff --git a/packages/cloud/src/models/spaceLabels.ts b/packages/cloud/src/models/spaceLabels.ts new file mode 100644 index 00000000..9880da51 --- /dev/null +++ b/packages/cloud/src/models/spaceLabels.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { LabelSchema } from './label.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const SpaceLabelsSchema = apiObject({ + results: z.array(LabelSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type SpaceLabels = z.infer; diff --git a/packages/cloud/src/models/spaceLinks.ts b/packages/cloud/src/models/spaceLinks.ts new file mode 100644 index 00000000..898a55fc --- /dev/null +++ b/packages/cloud/src/models/spaceLinks.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const SpaceLinksSchema = apiObject({ + /** Web UI link of the space. */ + webui: z.string().optional(), +}); + +export type SpaceLinks = z.infer; diff --git a/packages/cloud/src/models/spacePermission.ts b/packages/cloud/src/models/spacePermission.ts new file mode 100644 index 00000000..e2b25e1f --- /dev/null +++ b/packages/cloud/src/models/spacePermission.ts @@ -0,0 +1,15 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const SpacePermissionSchema = apiObject({ + /** The identifier for the space permission. */ + id: z.string().optional(), + /** The display name for the space permission. */ + displayName: z.string().optional(), + /** Describes the space permission’s usage. */ + description: z.string().optional(), + /** The permissions required for this permission to be enabled. */ + requiredPermissionIds: z.array(z.string()).nullish(), +}); + +export type SpacePermission = z.infer; diff --git a/packages/cloud/src/models/spacePermissionAssignment.ts b/packages/cloud/src/models/spacePermissionAssignment.ts new file mode 100644 index 00000000..c3a4c36e --- /dev/null +++ b/packages/cloud/src/models/spacePermissionAssignment.ts @@ -0,0 +1,36 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const SpacePermissionAssignmentSchema = apiObject({ + /** ID of the space permission. */ + id: z.string().optional(), + /** The entity the space permissions corresponds to. */ + principal: apiObject({ + type: z.string().optional(), + /** ID of the entity. */ + id: z.string().optional(), + }).nullish(), + /** The operation the space permission corresponds to. */ + operation: apiObject({ + /** The type of operation. */ + key: z.string().optional(), + /** The type of entity the operation type targets. */ + targetType: z + .enum([ + 'page', + 'blogpost', + 'comment', + 'attachment', + 'whiteboard', + 'database', + 'embed', + 'folder', + 'space', + 'application', + 'userProfile', + ]) + .optional(), + }).nullish(), +}); + +export type SpacePermissionAssignment = z.infer; diff --git a/packages/cloud/src/models/spacePermissionsAssignments.ts b/packages/cloud/src/models/spacePermissionsAssignments.ts new file mode 100644 index 00000000..e4a7a53e --- /dev/null +++ b/packages/cloud/src/models/spacePermissionsAssignments.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { SpacePermissionAssignmentSchema } from './spacePermissionAssignment.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const SpacePermissionsAssignmentsSchema = apiObject({ + results: z.array(SpacePermissionAssignmentSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type SpacePermissionsAssignments = z.infer; diff --git a/packages/cloud/src/models/spaceProperties.ts b/packages/cloud/src/models/spaceProperties.ts new file mode 100644 index 00000000..3935a0b4 --- /dev/null +++ b/packages/cloud/src/models/spaceProperties.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { SpacePropertySchema } from './spaceProperty.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const SpacePropertiesSchema = apiObject({ + results: z.array(SpacePropertySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type SpaceProperties = z.infer; diff --git a/packages/cloud/src/models/spaceProperty.ts b/packages/cloud/src/models/spaceProperty.ts new file mode 100644 index 00000000..bac386e5 --- /dev/null +++ b/packages/cloud/src/models/spaceProperty.ts @@ -0,0 +1,27 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const SpacePropertySchema = apiObject({ + /** ID of the space property. */ + id: z.string().optional(), + /** Key of the space property. */ + key: z.string().optional(), + /** Value of the space property. */ + value: z.unknown().optional(), + /** RFC3339 compliant date time at which the property was created. */ + createdAt: z.coerce.date().optional(), + version: apiObject({ + /** RFC3339 compliant date time at which the property's current version was created. */ + createdAt: z.coerce.date().optional(), + /** Message associated with the current version. */ + message: z.string().optional(), + /** The space property's current version number. */ + number: z.number().optional(), + /** Atlassian account ID of the user that created the space property's current version. */ + authorId: z.string().optional(), + }).nullish(), + /** Atlassian account ID of the user that created the space property. */ + authorId: z.string().optional(), +}); + +export type SpaceProperty = z.infer; diff --git a/packages/cloud/src/models/spacePropertyCreate.ts b/packages/cloud/src/models/spacePropertyCreate.ts new file mode 100644 index 00000000..6b9d9480 --- /dev/null +++ b/packages/cloud/src/models/spacePropertyCreate.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const SpacePropertyCreateSchema = apiObject({ + /** Key of the space property */ + key: z.string().optional(), + /** Value of the space property. */ + value: z.unknown().optional(), +}); + +export type SpacePropertyCreate = z.infer; diff --git a/packages/cloud/src/models/spacePropertyUpdate.ts b/packages/cloud/src/models/spacePropertyUpdate.ts new file mode 100644 index 00000000..7144b4ee --- /dev/null +++ b/packages/cloud/src/models/spacePropertyUpdate.ts @@ -0,0 +1,18 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const SpacePropertyUpdateSchema = apiObject({ + /** Key of the space property */ + key: z.string().optional(), + /** Value of the space property. */ + value: z.unknown().optional(), + /** New version number and associated message */ + version: apiObject({ + /** Version number of the new version. Should be 1 more than the current version number. */ + number: z.number().optional(), + /** Message to be associated with the new version. */ + message: z.string().optional(), + }).nullish(), +}); + +export type SpacePropertyUpdate = z.infer; diff --git a/packages/cloud/src/models/spaceRole.ts b/packages/cloud/src/models/spaceRole.ts new file mode 100644 index 00000000..8b2a3ac3 --- /dev/null +++ b/packages/cloud/src/models/spaceRole.ts @@ -0,0 +1,17 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { RoleTypeSchema } from '#/models/roleType'; + +export const SpaceRoleSchema = apiObject({ + /** The identifier for the space role. */ + id: z.string().optional(), + type: RoleTypeSchema.optional(), + /** The name for the space role. */ + name: z.string().optional(), + /** The description for the space role’s usage. */ + description: z.string().optional(), + /** The space permissions the space role is comprised of. */ + spacePermissions: z.array(z.string()).nullish(), +}); + +export type SpaceRole = z.infer; diff --git a/packages/cloud/src/models/spaceRoleAssignment.ts b/packages/cloud/src/models/spaceRoleAssignment.ts new file mode 100644 index 00000000..93537ad5 --- /dev/null +++ b/packages/cloud/src/models/spaceRoleAssignment.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { PrincipalSchema } from '#/models/principal'; + +export const SpaceRoleAssignmentSchema = apiObject({ + principal: PrincipalSchema.nullish(), + /** The role to which the principal is assigned. */ + roleId: z.string().optional(), +}); + +export type SpaceRoleAssignment = z.infer; diff --git a/packages/cloud/src/models/spaceRoleAssignmentsGet.ts b/packages/cloud/src/models/spaceRoleAssignmentsGet.ts new file mode 100644 index 00000000..8d3eb70b --- /dev/null +++ b/packages/cloud/src/models/spaceRoleAssignmentsGet.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { SpaceRoleAssignmentSchema } from './spaceRoleAssignment.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const SpaceRoleAssignmentsGetSchema = apiObject({ + results: z.array(SpaceRoleAssignmentSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type SpaceRoleAssignmentsGet = z.infer; diff --git a/packages/cloud/src/models/spaceRoleAssignmentsSet.ts b/packages/cloud/src/models/spaceRoleAssignmentsSet.ts new file mode 100644 index 00000000..446121ea --- /dev/null +++ b/packages/cloud/src/models/spaceRoleAssignmentsSet.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { SpaceRoleAssignmentSchema } from './spaceRoleAssignment.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const SpaceRoleAssignmentsSetSchema = apiObject({ + results: z.array(SpaceRoleAssignmentSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type SpaceRoleAssignmentsSet = z.infer; diff --git a/packages/cloud/src/models/spaceRoleMode.ts b/packages/cloud/src/models/spaceRoleMode.ts new file mode 100644 index 00000000..f0c41b3e --- /dev/null +++ b/packages/cloud/src/models/spaceRoleMode.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const SpaceRoleModeSchema = apiObject({ + /** The space role mode. */ + mode: z.enum(['PRE_ROLES', 'ROLES_TRANSITION', 'ROLES']).optional(), +}); + +export type SpaceRoleMode = z.infer; diff --git a/packages/cloud/src/models/spaceSortOrder.ts b/packages/cloud/src/models/spaceSortOrder.ts new file mode 100644 index 00000000..2a70ebd2 --- /dev/null +++ b/packages/cloud/src/models/spaceSortOrder.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +/** + * The sort fields for spaces. The default sort direction is ascending. To sort in descending order, append a `-` + * character before the sort field. For example, `fieldName` or `-fieldName`. + */ + +export const SpaceSortOrderSchema = z.enum(['id', '-id', 'key', '-key', 'name', '-name']); + +export type SpaceSortOrder = z.infer; diff --git a/packages/cloud/src/models/spaceStatus.ts b/packages/cloud/src/models/spaceStatus.ts new file mode 100644 index 00000000..fbe0dd39 --- /dev/null +++ b/packages/cloud/src/models/spaceStatus.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +/** The status of the space. */ + +export const SpaceStatusSchema = z.enum(['current', 'archived']); + +export type SpaceStatus = z.infer; diff --git a/packages/cloud/src/models/spaceSummary.ts b/packages/cloud/src/models/spaceSummary.ts new file mode 100644 index 00000000..f61bd608 --- /dev/null +++ b/packages/cloud/src/models/spaceSummary.ts @@ -0,0 +1,33 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { SpaceTypeSchema } from '#/models/spaceType'; +import { SpaceStatusSchema } from '#/models/spaceStatus'; +import { SpaceDescriptionSchema } from '#/models/spaceDescription'; +import { SpaceIconSchema } from '#/models/spaceIcon'; +import { SpaceLinksSchema } from '#/models/spaceLinks'; + +export const SpaceSummarySchema = apiObject({ + /** ID of the space. */ + id: z.string().optional(), + /** Key of the space. */ + key: z.string().optional(), + /** Name of the space. */ + name: z.string().optional(), + type: SpaceTypeSchema.optional(), + status: SpaceStatusSchema.optional(), + /** The account ID of the user who created this space originally. */ + authorId: z.string().optional(), + /** The account ID of the user who owns this space. */ + spaceOwnerId: z.string().optional(), + /** Currently active alias for a Confluence space. */ + currentActiveAlias: z.string().optional(), + /** Date and time when the space was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** ID of the space's homepage. */ + homepageId: z.string().optional(), + description: SpaceDescriptionSchema.nullish(), + icon: SpaceIconSchema.nullish(), + _links: SpaceLinksSchema.nullish(), +}); + +export type SpaceSummary = z.infer; diff --git a/packages/cloud/src/models/spaceType.ts b/packages/cloud/src/models/spaceType.ts new file mode 100644 index 00000000..ba117814 --- /dev/null +++ b/packages/cloud/src/models/spaceType.ts @@ -0,0 +1,14 @@ +import { z } from 'zod'; +/** The type of space. */ + +export const SpaceTypeSchema = z.enum([ + 'global', + 'collaboration', + 'knowledge_base', + 'personal', + 'system', + 'onboarding', + 'xflow_sample_space', +]); + +export type SpaceType = z.infer; diff --git a/packages/cloud/src/models/spaces.ts b/packages/cloud/src/models/spaces.ts new file mode 100644 index 00000000..c969de50 --- /dev/null +++ b/packages/cloud/src/models/spaces.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { SpaceSummarySchema } from './spaceSummary.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const SpacesSchema = apiObject({ + results: z.array(SpaceSummarySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type Spaces = z.infer; diff --git a/packages/cloud/src/models/task.ts b/packages/cloud/src/models/task.ts new file mode 100644 index 00000000..ccc243a5 --- /dev/null +++ b/packages/cloud/src/models/task.ts @@ -0,0 +1,35 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { TaskBodySchema } from '#/models/taskBody'; + +export const TaskSchema = apiObject({ + /** ID of the task. */ + id: z.string().optional(), + /** Local ID of the task. This ID is local to the corresponding page or blog post. */ + localId: z.string().optional(), + /** ID of the space the task is in. */ + spaceId: z.string().optional(), + /** ID of the page the task is in. */ + pageId: z.string().optional(), + /** ID of the blog post the task is in. */ + blogPostId: z.string().optional(), + /** Status of the task. */ + status: z.enum(['complete', 'incomplete']).optional(), + body: TaskBodySchema.nullish(), + /** Account ID of the user who created this task. */ + createdBy: z.string().optional(), + /** Account ID of the user to whom this task is assigned. */ + assignedTo: z.string().nullish(), + /** Account ID of the user who completed this task. */ + completedBy: z.string().nullish(), + /** Date and time when the task was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** Date and time when the task was updated. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + updatedAt: z.coerce.date().optional(), + /** Date and time when the task is due. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + dueAt: z.coerce.date().nullish(), + /** Date and time when the task was completed. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + completedAt: z.coerce.date().nullish(), +}); + +export type Task = z.infer; diff --git a/packages/cloud/src/models/taskBody.ts b/packages/cloud/src/models/taskBody.ts new file mode 100644 index 00000000..3b093070 --- /dev/null +++ b/packages/cloud/src/models/taskBody.ts @@ -0,0 +1,11 @@ +import type { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BodyTypeSchema } from '#/models/bodyType'; +/** Contains fields for each representation type requested. */ + +export const TaskBodySchema = apiObject({ + storage: BodyTypeSchema.nullish(), + atlas_doc_format: BodyTypeSchema.nullish(), +}); + +export type TaskBody = z.infer; diff --git a/packages/cloud/src/models/tasks.ts b/packages/cloud/src/models/tasks.ts new file mode 100644 index 00000000..d42fb248 --- /dev/null +++ b/packages/cloud/src/models/tasks.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { TaskSchema } from './task.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const TasksSchema = apiObject({ + results: z.array(TaskSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type Tasks = z.infer; diff --git a/packages/cloud/src/models/updateFooterCommentModel.ts b/packages/cloud/src/models/updateFooterCommentModel.ts new file mode 100644 index 00000000..4fab9d44 --- /dev/null +++ b/packages/cloud/src/models/updateFooterCommentModel.ts @@ -0,0 +1,16 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { CommentBodyWriteSchema } from '#/models/commentBodyWrite'; +import { CommentNestedBodyWriteSchema } from '#/models/commentNestedBodyWrite'; + +export const UpdateFooterCommentModelSchema = apiObject({ + version: apiObject({ + /** Number of new version. Should be 1 higher than current version of the comment. */ + number: z.number().optional(), + /** Optional message store for the new version. */ + message: z.string().optional(), + }).nullish(), + body: z.union([CommentBodyWriteSchema, CommentNestedBodyWriteSchema]).nullish(), +}); + +export type UpdateFooterCommentModel = z.infer; diff --git a/packages/cloud/src/models/updateInlineCommentModel.ts b/packages/cloud/src/models/updateInlineCommentModel.ts new file mode 100644 index 00000000..43dcd531 --- /dev/null +++ b/packages/cloud/src/models/updateInlineCommentModel.ts @@ -0,0 +1,22 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { CommentBodyWriteSchema } from '#/models/commentBodyWrite'; +import { CommentNestedBodyWriteSchema } from '#/models/commentNestedBodyWrite'; + +export const UpdateInlineCommentModelSchema = apiObject({ + version: apiObject({ + /** Number of new version. Should be 1 higher than current version of the comment. */ + number: z.number().optional(), + /** Optional message store for the new version. */ + message: z.string().optional(), + }).nullish(), + body: z.union([CommentBodyWriteSchema, CommentNestedBodyWriteSchema]).nullish(), + /** + * Resolved state of the comment. Set to true to resolve the comment, set to false to reopen it. If matching the + * existing state (i.e. true -> resolved or false -> open/reopened) , no change will occur. A dangling comment + * cannot be updated. + */ + resolved: z.boolean().optional(), +}); + +export type UpdateInlineCommentModel = z.infer; diff --git a/packages/cloud/src/models/updateSpaceRoleResponse.ts b/packages/cloud/src/models/updateSpaceRoleResponse.ts new file mode 100644 index 00000000..e56a4d7b --- /dev/null +++ b/packages/cloud/src/models/updateSpaceRoleResponse.ts @@ -0,0 +1,17 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { RoleTypeSchema } from '#/models/roleType'; + +export const UpdateSpaceRoleResponseSchema = apiObject({ + /** Id of the space role */ + id: z.string().optional(), + type: RoleTypeSchema.optional(), + /** Name of the space role */ + name: z.string().optional(), + /** Description for the space role */ + description: z.string().optional(), + /** Id of the task to update the space permissions associated with the space role */ + taskId: z.string().optional(), +}); + +export type UpdateSpaceRoleResponse = z.infer; diff --git a/packages/cloud/src/models/user.ts b/packages/cloud/src/models/user.ts new file mode 100644 index 00000000..20483dcb --- /dev/null +++ b/packages/cloud/src/models/user.ts @@ -0,0 +1,27 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { AccountStatusSchema } from '#/models/accountStatus'; +import { AccountTypeSchema } from '#/models/accountType'; +import { IconSchema } from '#/models/icon'; + +export const UserSchema = apiObject({ + /** Display name of the user. */ + displayName: z.string().optional(), + /** Time zone of the user. Depending on the user's privacy setting, this may return null. */ + timeZone: z.string().nullish(), + /** Space ID of the user's personal space. Returns null, if no personal space for the user. */ + personalSpaceId: z.string().nullish(), + /** Whether the user is an external collaborator. */ + isExternalCollaborator: z.boolean().optional(), + accountStatus: AccountStatusSchema.optional(), + /** Account ID of the user. */ + accountId: z.string().optional(), + /** The email address of the user. Depending on the user's privacy setting, this may return an empty string. */ + email: z.string().optional(), + accountType: AccountTypeSchema.optional(), + /** Public name of the user. */ + publicName: z.string().optional(), + profilePicture: IconSchema.nullish(), +}); + +export type User = z.infer; diff --git a/packages/cloud/src/models/version.ts b/packages/cloud/src/models/version.ts new file mode 100644 index 00000000..1ed22eab --- /dev/null +++ b/packages/cloud/src/models/version.ts @@ -0,0 +1,20 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const VersionSchema = apiObject({ + /** Date and time when the version was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** Message associated with the current version. */ + message: z.string().nullish(), + /** The version number. */ + number: z.number().optional(), + /** + * Describes if this version is a minor version. Email notifications and activity stream updates are not created for + * minor versions. + */ + minorEdit: z.boolean().optional(), + /** The account ID of the user who created this version. */ + authorId: z.string().optional(), +}); + +export type Version = z.infer; diff --git a/packages/cloud/src/models/versionSortOrder.ts b/packages/cloud/src/models/versionSortOrder.ts new file mode 100644 index 00000000..07987dc4 --- /dev/null +++ b/packages/cloud/src/models/versionSortOrder.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +/** + * The sort fields for versions. The default sort direction is ascending. To sort in descending order, append a `-` + * character before the sort field. For example, `fieldName` or `-fieldName`. + */ + +export const VersionSortOrderSchema = z.enum(['modified-date', '-modified-date']); + +export type VersionSortOrder = z.infer; diff --git a/packages/cloud/src/models/versionedEntity.ts b/packages/cloud/src/models/versionedEntity.ts new file mode 100644 index 00000000..19311198 --- /dev/null +++ b/packages/cloud/src/models/versionedEntity.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { BodySummarySchema } from '#/models/bodySummary'; + +export const VersionedEntitySchema = apiObject({ + /** Title of the entity. */ + title: z.string().nullish(), + /** ID of the entity. */ + id: z.string().optional(), + body: BodySummarySchema.nullish(), +}); + +export type VersionedEntity = z.infer; diff --git a/packages/cloud/src/models/whiteboard.ts b/packages/cloud/src/models/whiteboard.ts new file mode 100644 index 00000000..06264d5f --- /dev/null +++ b/packages/cloud/src/models/whiteboard.ts @@ -0,0 +1,33 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentStatusSchema } from '#/models/contentStatus'; +import { ParentContentTypeSchema } from '#/models/parentContentType'; +import { VersionSchema } from '#/models/version'; +import { WhiteboardLinksSchema } from '#/models/whiteboardLinks'; + +export const WhiteboardSchema = apiObject({ + /** ID of the whiteboard. */ + id: z.string().optional(), + /** The content type of the object. */ + type: z.string().optional(), + status: ContentStatusSchema.optional(), + /** Title of the whiteboard. */ + title: z.string().optional(), + /** ID of the parent content, or null if there is no parent content. */ + parentId: z.string().nullish(), + parentType: ParentContentTypeSchema.nullish(), + /** Position of the whiteboard within the given parent page tree. */ + position: z.number().nullish(), + /** The account ID of the user who created this whiteboard originally. */ + authorId: z.string().optional(), + /** The account ID of the user who owns this whiteboard. */ + ownerId: z.string().optional(), + /** Date and time when the whiteboard was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ + createdAt: z.coerce.date().optional(), + /** ID of the space the whiteboard is in. */ + spaceId: z.string().optional(), + version: VersionSchema.nullish(), + _links: WhiteboardLinksSchema.nullish(), +}); + +export type Whiteboard = z.infer; diff --git a/packages/cloud/src/models/whiteboardAncestors.ts b/packages/cloud/src/models/whiteboardAncestors.ts new file mode 100644 index 00000000..c1c4f1c5 --- /dev/null +++ b/packages/cloud/src/models/whiteboardAncestors.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { AncestorSchema } from './ancestor.js'; + +export const WhiteboardAncestorsSchema = apiObject({ + results: z.array(AncestorSchema).optional(), +}); + +export type WhiteboardAncestors = z.infer; diff --git a/packages/cloud/src/models/whiteboardContentProperties.ts b/packages/cloud/src/models/whiteboardContentProperties.ts new file mode 100644 index 00000000..cdae07df --- /dev/null +++ b/packages/cloud/src/models/whiteboardContentProperties.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ContentPropertySchema } from './contentProperty.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const WhiteboardContentPropertiesSchema = apiObject({ + results: z.array(ContentPropertySchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type WhiteboardContentProperties = z.infer; diff --git a/packages/cloud/src/models/whiteboardDescendants.ts b/packages/cloud/src/models/whiteboardDescendants.ts new file mode 100644 index 00000000..f663ec54 --- /dev/null +++ b/packages/cloud/src/models/whiteboardDescendants.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { DescendantsSchema } from './descendants.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const WhiteboardDescendantsSchema = apiObject({ + results: z.array(DescendantsSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type WhiteboardDescendants = z.infer; diff --git a/packages/cloud/src/models/whiteboardDirectChildren.ts b/packages/cloud/src/models/whiteboardDirectChildren.ts new file mode 100644 index 00000000..fe6c9831 --- /dev/null +++ b/packages/cloud/src/models/whiteboardDirectChildren.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; +import { ChildrenSchema } from './children.js'; +import { MultiEntityLinksSchema } from './multiEntityLinks.js'; + +export const WhiteboardDirectChildrenSchema = apiObject({ + results: z.array(ChildrenSchema).optional(), + _links: MultiEntityLinksSchema.optional(), +}); + +export type WhiteboardDirectChildren = z.infer; diff --git a/packages/cloud/src/models/whiteboardLinks.ts b/packages/cloud/src/models/whiteboardLinks.ts new file mode 100644 index 00000000..6656a60f --- /dev/null +++ b/packages/cloud/src/models/whiteboardLinks.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { apiObject } from '@confluence.js/core'; + +export const WhiteboardLinksSchema = apiObject({ + /** Web UI link of the content. */ + webui: z.string().optional(), + /** Edit UI link of the content. */ + editui: z.string().optional(), +}); + +export type WhiteboardLinks = z.infer; diff --git a/packages/cloud/src/parameters/bulkAssignSpacePermissionRoles.ts b/packages/cloud/src/parameters/bulkAssignSpacePermissionRoles.ts new file mode 100644 index 00000000..4ccf7dd3 --- /dev/null +++ b/packages/cloud/src/parameters/bulkAssignSpacePermissionRoles.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +import { BulkAssignRolesSchema } from '../models/index.js'; + +export const BulkAssignSpacePermissionRolesSchema = z.object({}).extend(BulkAssignRolesSchema.shape); + +export type BulkAssignSpacePermissionRoles = z.input; diff --git a/packages/cloud/src/parameters/bulkRemoveSpacePermissionAccess.ts b/packages/cloud/src/parameters/bulkRemoveSpacePermissionAccess.ts new file mode 100644 index 00000000..c819ff3c --- /dev/null +++ b/packages/cloud/src/parameters/bulkRemoveSpacePermissionAccess.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +import { BulkRemoveAccessSchema } from '../models/index.js'; + +export const BulkRemoveSpacePermissionAccessSchema = z.object({}).extend(BulkRemoveAccessSchema.shape); + +export type BulkRemoveSpacePermissionAccess = z.input; diff --git a/packages/cloud/src/parameters/checkAccessByEmail.ts b/packages/cloud/src/parameters/checkAccessByEmail.ts new file mode 100644 index 00000000..6662eff8 --- /dev/null +++ b/packages/cloud/src/parameters/checkAccessByEmail.ts @@ -0,0 +1,7 @@ +import { z } from 'zod'; + +export const CheckAccessByEmailSchema = z.object({ + body: z.record(z.string(), z.any()).optional(), +}); + +export type CheckAccessByEmail = z.input; diff --git a/packages/cloud/src/parameters/convertContentIdsToContentTypes.ts b/packages/cloud/src/parameters/convertContentIdsToContentTypes.ts new file mode 100644 index 00000000..bb816074 --- /dev/null +++ b/packages/cloud/src/parameters/convertContentIdsToContentTypes.ts @@ -0,0 +1,7 @@ +import { z } from 'zod'; + +export const ConvertContentIdsToContentTypesSchema = z.object({ + body: z.record(z.string(), z.any()).optional(), +}); + +export type ConvertContentIdsToContentTypes = z.input; diff --git a/packages/cloud/src/parameters/createAttachmentProperty.ts b/packages/cloud/src/parameters/createAttachmentProperty.ts new file mode 100644 index 00000000..5a8524fb --- /dev/null +++ b/packages/cloud/src/parameters/createAttachmentProperty.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { ContentPropertyCreateSchema } from '../models/index.js'; + +export const CreateAttachmentPropertySchema = z + .object({ + /** The ID of the attachment to create a property for. */ + attachmentId: z.string(), + }) + .extend(ContentPropertyCreateSchema.shape); + +export type CreateAttachmentProperty = z.input; diff --git a/packages/cloud/src/parameters/createBlogPost.ts b/packages/cloud/src/parameters/createBlogPost.ts new file mode 100644 index 00000000..ec47030a --- /dev/null +++ b/packages/cloud/src/parameters/createBlogPost.ts @@ -0,0 +1,12 @@ +import { z } from 'zod'; + +export const CreateBlogPostSchema = z.object({ + /** + * The blog post will be private. Only the user who creates this blog post will have permission to view and edit + * one. + */ + private: z.boolean().optional(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type CreateBlogPost = z.input; diff --git a/packages/cloud/src/parameters/createBlogpostProperty.ts b/packages/cloud/src/parameters/createBlogpostProperty.ts new file mode 100644 index 00000000..97ead993 --- /dev/null +++ b/packages/cloud/src/parameters/createBlogpostProperty.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { ContentPropertyCreateSchema } from '../models/index.js'; + +export const CreateBlogpostPropertySchema = z + .object({ + /** The ID of the blog post to create a property for. */ + blogpostId: z.number(), + }) + .extend(ContentPropertyCreateSchema.shape); + +export type CreateBlogpostProperty = z.input; diff --git a/packages/cloud/src/parameters/createBulkUserLookup.ts b/packages/cloud/src/parameters/createBulkUserLookup.ts new file mode 100644 index 00000000..bddbf7a1 --- /dev/null +++ b/packages/cloud/src/parameters/createBulkUserLookup.ts @@ -0,0 +1,7 @@ +import { z } from 'zod'; + +export const CreateBulkUserLookupSchema = z.object({ + body: z.record(z.string(), z.any()).optional(), +}); + +export type CreateBulkUserLookup = z.input; diff --git a/packages/cloud/src/parameters/createCommentProperty.ts b/packages/cloud/src/parameters/createCommentProperty.ts new file mode 100644 index 00000000..11b6c860 --- /dev/null +++ b/packages/cloud/src/parameters/createCommentProperty.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { ContentPropertyCreateSchema } from '../models/index.js'; + +export const CreateCommentPropertySchema = z + .object({ + /** The ID of the comment to create a property for. */ + commentId: z.number(), + }) + .extend(ContentPropertyCreateSchema.shape); + +export type CreateCommentProperty = z.input; diff --git a/packages/cloud/src/parameters/createCustomContent.ts b/packages/cloud/src/parameters/createCustomContent.ts new file mode 100644 index 00000000..f90eac80 --- /dev/null +++ b/packages/cloud/src/parameters/createCustomContent.ts @@ -0,0 +1,7 @@ +import { z } from 'zod'; + +export const CreateCustomContentSchema = z.object({ + body: z.record(z.string(), z.any()).optional(), +}); + +export type CreateCustomContent = z.input; diff --git a/packages/cloud/src/parameters/createCustomContentProperty.ts b/packages/cloud/src/parameters/createCustomContentProperty.ts new file mode 100644 index 00000000..47b88fa5 --- /dev/null +++ b/packages/cloud/src/parameters/createCustomContentProperty.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { ContentPropertyCreateSchema } from '../models/index.js'; + +export const CreateCustomContentPropertySchema = z + .object({ + /** The ID of the custom content to create a property for. */ + customContentId: z.number(), + }) + .extend(ContentPropertyCreateSchema.shape); + +export type CreateCustomContentProperty = z.input; diff --git a/packages/cloud/src/parameters/createDatabase.ts b/packages/cloud/src/parameters/createDatabase.ts new file mode 100644 index 00000000..05a20bc6 --- /dev/null +++ b/packages/cloud/src/parameters/createDatabase.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const CreateDatabaseSchema = z.object({ + /** The database will be private. Only the user who creates this database will have permission to view and edit one. */ + private: z.boolean().optional(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type CreateDatabase = z.input; diff --git a/packages/cloud/src/parameters/createDatabaseProperty.ts b/packages/cloud/src/parameters/createDatabaseProperty.ts new file mode 100644 index 00000000..66eb737b --- /dev/null +++ b/packages/cloud/src/parameters/createDatabaseProperty.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { ContentPropertyCreateSchema } from '../models/index.js'; + +export const CreateDatabasePropertySchema = z + .object({ + /** The ID of the database to create a property for. */ + id: z.number(), + }) + .extend(ContentPropertyCreateSchema.shape); + +export type CreateDatabaseProperty = z.input; diff --git a/packages/cloud/src/parameters/createFolder.ts b/packages/cloud/src/parameters/createFolder.ts new file mode 100644 index 00000000..c1433d18 --- /dev/null +++ b/packages/cloud/src/parameters/createFolder.ts @@ -0,0 +1,7 @@ +import { z } from 'zod'; + +export const CreateFolderSchema = z.object({ + body: z.record(z.string(), z.any()).optional(), +}); + +export type CreateFolder = z.input; diff --git a/packages/cloud/src/parameters/createFolderProperty.ts b/packages/cloud/src/parameters/createFolderProperty.ts new file mode 100644 index 00000000..84ae7f95 --- /dev/null +++ b/packages/cloud/src/parameters/createFolderProperty.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { ContentPropertyCreateSchema } from '../models/index.js'; + +export const CreateFolderPropertySchema = z + .object({ + /** The ID of the folder to create a property for. */ + id: z.number(), + }) + .extend(ContentPropertyCreateSchema.shape); + +export type CreateFolderProperty = z.input; diff --git a/packages/cloud/src/parameters/createFooterComment.ts b/packages/cloud/src/parameters/createFooterComment.ts new file mode 100644 index 00000000..dbd259d2 --- /dev/null +++ b/packages/cloud/src/parameters/createFooterComment.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +import { CreateFooterCommentModelSchema } from '../models/index.js'; + +export const CreateFooterCommentSchema = z.object({}).extend(CreateFooterCommentModelSchema.shape); + +export type CreateFooterComment = z.input; diff --git a/packages/cloud/src/parameters/createInlineComment.ts b/packages/cloud/src/parameters/createInlineComment.ts new file mode 100644 index 00000000..7fc6578a --- /dev/null +++ b/packages/cloud/src/parameters/createInlineComment.ts @@ -0,0 +1,6 @@ +import { z } from 'zod'; +import { CreateInlineCommentModelSchema } from '../models/index.js'; + +export const CreateInlineCommentSchema = z.object({}).extend(CreateInlineCommentModelSchema.shape); + +export type CreateInlineComment = z.input; diff --git a/packages/cloud/src/parameters/createPage.ts b/packages/cloud/src/parameters/createPage.ts new file mode 100644 index 00000000..6b4d3a82 --- /dev/null +++ b/packages/cloud/src/parameters/createPage.ts @@ -0,0 +1,16 @@ +import { z } from 'zod'; + +export const CreatePageSchema = z.object({ + /** Tag the content as embedded and content will be created in NCS. */ + embedded: z.boolean().optional(), + /** The page will be private. Only the user who creates this page will have permission to view and edit one. */ + private: z.boolean().optional(), + /** + * The page will be created at the root level of the space (outside the space homepage tree). If true, then a value + * may not be supplied for the `parentId` body parameter. + */ + rootLevel: z.boolean().optional(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type CreatePage = z.input; diff --git a/packages/cloud/src/parameters/createPageProperty.ts b/packages/cloud/src/parameters/createPageProperty.ts new file mode 100644 index 00000000..93e13766 --- /dev/null +++ b/packages/cloud/src/parameters/createPageProperty.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { ContentPropertyCreateSchema } from '../models/index.js'; + +export const CreatePagePropertySchema = z + .object({ + /** The ID of the page to create a property for. */ + pageId: z.number(), + }) + .extend(ContentPropertyCreateSchema.shape); + +export type CreatePageProperty = z.input; diff --git a/packages/cloud/src/parameters/createSmartLink.ts b/packages/cloud/src/parameters/createSmartLink.ts new file mode 100644 index 00000000..cb3d42ac --- /dev/null +++ b/packages/cloud/src/parameters/createSmartLink.ts @@ -0,0 +1,7 @@ +import { z } from 'zod'; + +export const CreateSmartLinkSchema = z.object({ + body: z.record(z.string(), z.any()).optional(), +}); + +export type CreateSmartLink = z.input; diff --git a/packages/cloud/src/parameters/createSmartLinkProperty.ts b/packages/cloud/src/parameters/createSmartLinkProperty.ts new file mode 100644 index 00000000..9b63cd3f --- /dev/null +++ b/packages/cloud/src/parameters/createSmartLinkProperty.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { ContentPropertyCreateSchema } from '../models/index.js'; + +export const CreateSmartLinkPropertySchema = z + .object({ + /** The ID of the Smart Link in the content tree to create a property for. */ + id: z.number(), + }) + .extend(ContentPropertyCreateSchema.shape); + +export type CreateSmartLinkProperty = z.input; diff --git a/packages/cloud/src/parameters/createSpace.ts b/packages/cloud/src/parameters/createSpace.ts new file mode 100644 index 00000000..e4729bda --- /dev/null +++ b/packages/cloud/src/parameters/createSpace.ts @@ -0,0 +1,7 @@ +import { z } from 'zod'; + +export const CreateSpaceSchema = z.object({ + body: z.record(z.string(), z.any()).optional(), +}); + +export type CreateSpace = z.input; diff --git a/packages/cloud/src/parameters/createSpaceProperty.ts b/packages/cloud/src/parameters/createSpaceProperty.ts new file mode 100644 index 00000000..3a3818dc --- /dev/null +++ b/packages/cloud/src/parameters/createSpaceProperty.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { SpacePropertyCreateSchema } from '../models/index.js'; + +export const CreateSpacePropertySchema = z + .object({ + /** The ID of the space for which space properties should be returned. */ + spaceId: z.number(), + }) + .extend(SpacePropertyCreateSchema.shape); + +export type CreateSpaceProperty = z.input; diff --git a/packages/cloud/src/parameters/createSpaceRole.ts b/packages/cloud/src/parameters/createSpaceRole.ts new file mode 100644 index 00000000..fef3a9c0 --- /dev/null +++ b/packages/cloud/src/parameters/createSpaceRole.ts @@ -0,0 +1,17 @@ +import { z } from 'zod'; + +export const CreateSpaceRoleSchema = z.object({ + /** Name of the space role */ + name: z.string(), + /** Description for the space role */ + description: z.string(), + /** + * The ids of the space permissions associated with the space role. Sample value "read/space"; retrieve ids from + * responses returned by [GET + * /space-permissions](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) + * endpoint + */ + spacePermissions: z.array(z.string()), +}); + +export type CreateSpaceRole = z.input; diff --git a/packages/cloud/src/parameters/createWhiteboard.ts b/packages/cloud/src/parameters/createWhiteboard.ts new file mode 100644 index 00000000..4a52b0cd --- /dev/null +++ b/packages/cloud/src/parameters/createWhiteboard.ts @@ -0,0 +1,12 @@ +import { z } from 'zod'; + +export const CreateWhiteboardSchema = z.object({ + /** + * The whiteboard will be private. Only the user who creates this whiteboard will have permission to view and edit + * one. + */ + private: z.boolean().optional(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type CreateWhiteboard = z.input; diff --git a/packages/cloud/src/parameters/createWhiteboardProperty.ts b/packages/cloud/src/parameters/createWhiteboardProperty.ts new file mode 100644 index 00000000..70c6081a --- /dev/null +++ b/packages/cloud/src/parameters/createWhiteboardProperty.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { ContentPropertyCreateSchema } from '../models/index.js'; + +export const CreateWhiteboardPropertySchema = z + .object({ + /** The ID of the whiteboard to create a property for. */ + id: z.number(), + }) + .extend(ContentPropertyCreateSchema.shape); + +export type CreateWhiteboardProperty = z.input; diff --git a/packages/cloud/src/parameters/deleteAttachment.ts b/packages/cloud/src/parameters/deleteAttachment.ts new file mode 100644 index 00000000..a34b165c --- /dev/null +++ b/packages/cloud/src/parameters/deleteAttachment.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const DeleteAttachmentSchema = z.object({ + /** The ID of the attachment to be deleted. */ + id: z.string(), + /** If attempting to purge the attachment. */ + purge: z.boolean().optional(), +}); + +export type DeleteAttachment = z.input; diff --git a/packages/cloud/src/parameters/deleteAttachmentPropertyById.ts b/packages/cloud/src/parameters/deleteAttachmentPropertyById.ts new file mode 100644 index 00000000..249e34bf --- /dev/null +++ b/packages/cloud/src/parameters/deleteAttachmentPropertyById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const DeleteAttachmentPropertyByIdSchema = z.object({ + /** The ID of the attachment the property belongs to. */ + attachmentId: z.string(), + /** The ID of the property to be deleted. */ + propertyId: z.number(), +}); + +export type DeleteAttachmentPropertyById = z.input; diff --git a/packages/cloud/src/parameters/deleteBlogPost.ts b/packages/cloud/src/parameters/deleteBlogPost.ts new file mode 100644 index 00000000..47d9e8de --- /dev/null +++ b/packages/cloud/src/parameters/deleteBlogPost.ts @@ -0,0 +1,12 @@ +import { z } from 'zod'; + +export const DeleteBlogPostSchema = z.object({ + /** The ID of the blog post to be deleted. */ + id: z.number(), + /** If attempting to purge the blog post. */ + purge: z.boolean().optional(), + /** If attempting to delete a blog post that is a draft. */ + draft: z.boolean().optional(), +}); + +export type DeleteBlogPost = z.input; diff --git a/packages/cloud/src/parameters/deleteBlogpostPropertyById.ts b/packages/cloud/src/parameters/deleteBlogpostPropertyById.ts new file mode 100644 index 00000000..4716083b --- /dev/null +++ b/packages/cloud/src/parameters/deleteBlogpostPropertyById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const DeleteBlogpostPropertyByIdSchema = z.object({ + /** The ID of the blog post the property belongs to. */ + blogpostId: z.number(), + /** The ID of the property to be deleted. */ + propertyId: z.number(), +}); + +export type DeleteBlogpostPropertyById = z.input; diff --git a/packages/cloud/src/parameters/deleteCommentPropertyById.ts b/packages/cloud/src/parameters/deleteCommentPropertyById.ts new file mode 100644 index 00000000..315c35a7 --- /dev/null +++ b/packages/cloud/src/parameters/deleteCommentPropertyById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const DeleteCommentPropertyByIdSchema = z.object({ + /** The ID of the comment the property belongs to. */ + commentId: z.number(), + /** The ID of the property to be deleted. */ + propertyId: z.number(), +}); + +export type DeleteCommentPropertyById = z.input; diff --git a/packages/cloud/src/parameters/deleteCustomContent.ts b/packages/cloud/src/parameters/deleteCustomContent.ts new file mode 100644 index 00000000..eb94bbaf --- /dev/null +++ b/packages/cloud/src/parameters/deleteCustomContent.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const DeleteCustomContentSchema = z.object({ + /** The ID of the custom content to be deleted. */ + id: z.number(), + /** If attempting to purge the custom content. */ + purge: z.boolean().optional(), +}); + +export type DeleteCustomContent = z.input; diff --git a/packages/cloud/src/parameters/deleteCustomContentPropertyById.ts b/packages/cloud/src/parameters/deleteCustomContentPropertyById.ts new file mode 100644 index 00000000..57fc002b --- /dev/null +++ b/packages/cloud/src/parameters/deleteCustomContentPropertyById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const DeleteCustomContentPropertyByIdSchema = z.object({ + /** The ID of the custom content the property belongs to. */ + customContentId: z.number(), + /** The ID of the property to be deleted. */ + propertyId: z.number(), +}); + +export type DeleteCustomContentPropertyById = z.input; diff --git a/packages/cloud/src/parameters/deleteDatabase.ts b/packages/cloud/src/parameters/deleteDatabase.ts new file mode 100644 index 00000000..bcc5a424 --- /dev/null +++ b/packages/cloud/src/parameters/deleteDatabase.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const DeleteDatabaseSchema = z.object({ + /** The ID of the database to be deleted. */ + id: z.number(), +}); + +export type DeleteDatabase = z.input; diff --git a/packages/cloud/src/parameters/deleteDatabasePropertyById.ts b/packages/cloud/src/parameters/deleteDatabasePropertyById.ts new file mode 100644 index 00000000..cb9c239b --- /dev/null +++ b/packages/cloud/src/parameters/deleteDatabasePropertyById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const DeleteDatabasePropertyByIdSchema = z.object({ + /** The ID of the database the property belongs to. */ + databaseId: z.number(), + /** The ID of the property to be deleted. */ + propertyId: z.number(), +}); + +export type DeleteDatabasePropertyById = z.input; diff --git a/packages/cloud/src/parameters/deleteFolder.ts b/packages/cloud/src/parameters/deleteFolder.ts new file mode 100644 index 00000000..34128849 --- /dev/null +++ b/packages/cloud/src/parameters/deleteFolder.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const DeleteFolderSchema = z.object({ + /** The ID of the folder to be deleted. */ + id: z.number(), +}); + +export type DeleteFolder = z.input; diff --git a/packages/cloud/src/parameters/deleteFolderPropertyById.ts b/packages/cloud/src/parameters/deleteFolderPropertyById.ts new file mode 100644 index 00000000..73a6efc4 --- /dev/null +++ b/packages/cloud/src/parameters/deleteFolderPropertyById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const DeleteFolderPropertyByIdSchema = z.object({ + /** The ID of the folder the property belongs to. */ + folderId: z.number(), + /** The ID of the property to be deleted. */ + propertyId: z.number(), +}); + +export type DeleteFolderPropertyById = z.input; diff --git a/packages/cloud/src/parameters/deleteFooterComment.ts b/packages/cloud/src/parameters/deleteFooterComment.ts new file mode 100644 index 00000000..680136df --- /dev/null +++ b/packages/cloud/src/parameters/deleteFooterComment.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const DeleteFooterCommentSchema = z.object({ + /** The ID of the comment to be retrieved. */ + commentId: z.number(), +}); + +export type DeleteFooterComment = z.input; diff --git a/packages/cloud/src/parameters/deleteForgeAppProperty.ts b/packages/cloud/src/parameters/deleteForgeAppProperty.ts new file mode 100644 index 00000000..62d78039 --- /dev/null +++ b/packages/cloud/src/parameters/deleteForgeAppProperty.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const DeleteForgeAppPropertySchema = z.object({ + /** The key of the property */ + propertyKey: z.string(), +}); + +export type DeleteForgeAppProperty = z.input; diff --git a/packages/cloud/src/parameters/deleteInlineComment.ts b/packages/cloud/src/parameters/deleteInlineComment.ts new file mode 100644 index 00000000..71fe1f15 --- /dev/null +++ b/packages/cloud/src/parameters/deleteInlineComment.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const DeleteInlineCommentSchema = z.object({ + /** The ID of the comment to be deleted. */ + commentId: z.number(), +}); + +export type DeleteInlineComment = z.input; diff --git a/packages/cloud/src/parameters/deletePage.ts b/packages/cloud/src/parameters/deletePage.ts new file mode 100644 index 00000000..264cc2f4 --- /dev/null +++ b/packages/cloud/src/parameters/deletePage.ts @@ -0,0 +1,12 @@ +import { z } from 'zod'; + +export const DeletePageSchema = z.object({ + /** The ID of the page to be deleted. */ + id: z.number(), + /** If attempting to purge the page. */ + purge: z.boolean().optional(), + /** If attempting to delete a page that is a draft. */ + draft: z.boolean().optional(), +}); + +export type DeletePage = z.input; diff --git a/packages/cloud/src/parameters/deletePagePropertyById.ts b/packages/cloud/src/parameters/deletePagePropertyById.ts new file mode 100644 index 00000000..aeac218f --- /dev/null +++ b/packages/cloud/src/parameters/deletePagePropertyById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const DeletePagePropertyByIdSchema = z.object({ + /** The ID of the page the property belongs to. */ + pageId: z.number(), + /** The ID of the property to be deleted. */ + propertyId: z.number(), +}); + +export type DeletePagePropertyById = z.input; diff --git a/packages/cloud/src/parameters/deleteSmartLink.ts b/packages/cloud/src/parameters/deleteSmartLink.ts new file mode 100644 index 00000000..aaac9b47 --- /dev/null +++ b/packages/cloud/src/parameters/deleteSmartLink.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const DeleteSmartLinkSchema = z.object({ + /** The ID of the Smart Link in the content tree to be deleted. */ + id: z.number(), +}); + +export type DeleteSmartLink = z.input; diff --git a/packages/cloud/src/parameters/deleteSmartLinkPropertyById.ts b/packages/cloud/src/parameters/deleteSmartLinkPropertyById.ts new file mode 100644 index 00000000..e34a49df --- /dev/null +++ b/packages/cloud/src/parameters/deleteSmartLinkPropertyById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const DeleteSmartLinkPropertyByIdSchema = z.object({ + /** The ID of the Smart Link in the content tree the property belongs to. */ + embedId: z.number(), + /** The ID of the property to be deleted. */ + propertyId: z.number(), +}); + +export type DeleteSmartLinkPropertyById = z.input; diff --git a/packages/cloud/src/parameters/deleteSpaceDefaultClassificationLevel.ts b/packages/cloud/src/parameters/deleteSpaceDefaultClassificationLevel.ts new file mode 100644 index 00000000..fa2a6651 --- /dev/null +++ b/packages/cloud/src/parameters/deleteSpaceDefaultClassificationLevel.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const DeleteSpaceDefaultClassificationLevelSchema = z.object({ + /** The ID of the space for which default classification level should be deleted. */ + id: z.number(), +}); + +export type DeleteSpaceDefaultClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/deleteSpacePropertyById.ts b/packages/cloud/src/parameters/deleteSpacePropertyById.ts new file mode 100644 index 00000000..409fbf06 --- /dev/null +++ b/packages/cloud/src/parameters/deleteSpacePropertyById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const DeleteSpacePropertyByIdSchema = z.object({ + /** The ID of the space the property belongs to. */ + spaceId: z.number(), + /** The ID of the property to be deleted. */ + propertyId: z.number(), +}); + +export type DeleteSpacePropertyById = z.input; diff --git a/packages/cloud/src/parameters/deleteSpaceRole.ts b/packages/cloud/src/parameters/deleteSpaceRole.ts new file mode 100644 index 00000000..901696e2 --- /dev/null +++ b/packages/cloud/src/parameters/deleteSpaceRole.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const DeleteSpaceRoleSchema = z.object({ + /** Id of the space role */ + id: z.string(), +}); + +export type DeleteSpaceRole = z.input; diff --git a/packages/cloud/src/parameters/deleteWhiteboard.ts b/packages/cloud/src/parameters/deleteWhiteboard.ts new file mode 100644 index 00000000..5f63a1e0 --- /dev/null +++ b/packages/cloud/src/parameters/deleteWhiteboard.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const DeleteWhiteboardSchema = z.object({ + /** The ID of the whiteboard to be deleted. */ + id: z.number(), +}); + +export type DeleteWhiteboard = z.input; diff --git a/packages/cloud/src/parameters/deleteWhiteboardPropertyById.ts b/packages/cloud/src/parameters/deleteWhiteboardPropertyById.ts new file mode 100644 index 00000000..2904984c --- /dev/null +++ b/packages/cloud/src/parameters/deleteWhiteboardPropertyById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const DeleteWhiteboardPropertyByIdSchema = z.object({ + /** The ID of the whiteboard the property belongs to. */ + whiteboardId: z.number(), + /** The ID of the property to be deleted. */ + propertyId: z.number(), +}); + +export type DeleteWhiteboardPropertyById = z.input; diff --git a/packages/cloud/src/parameters/enableAdminKey.ts b/packages/cloud/src/parameters/enableAdminKey.ts new file mode 100644 index 00000000..b2c870a1 --- /dev/null +++ b/packages/cloud/src/parameters/enableAdminKey.ts @@ -0,0 +1,7 @@ +import { z } from 'zod'; + +export const EnableAdminKeySchema = z.object({ + body: z.record(z.string(), z.any()).optional(), +}); + +export type EnableAdminKey = z.input; diff --git a/packages/cloud/src/parameters/getAttachmentById.ts b/packages/cloud/src/parameters/getAttachmentById.ts new file mode 100644 index 00000000..1dc3ad43 --- /dev/null +++ b/packages/cloud/src/parameters/getAttachmentById.ts @@ -0,0 +1,47 @@ +import { z } from 'zod'; + +export const GetAttachmentByIdSchema = z.object({ + /** + * The ID of the attachment to be returned. If you don't know the attachment's ID, use Get attachments for + * page/blogpost/custom content. + */ + id: z.string(), + /** + * Allows you to retrieve a previously published version. Specify the previous version's number to retrieve its + * details. + */ + version: z.number().optional(), + /** + * Includes labels associated with this attachment in the response. The number of results will be limited to 50 and + * sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more results are + * available and a link to retrieve the rest of the results. + */ + includeLabels: z.boolean().optional(), + /** + * Includes content properties associated with this attachment in the response. The number of results will be + * limited to 50 and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if + * more results are available and a link to retrieve the rest of the results. + */ + includeProperties: z.boolean().optional(), + /** + * Includes operations associated with this attachment in the response, as defined in the `Operation` object. The + * number of results will be limited to 50 and sorted in the default sort order. A `meta` and `_links` property will + * be present to indicate if more results are available and a link to retrieve the rest of the results. + */ + includeOperations: z.boolean().optional(), + /** + * Includes versions associated with this attachment in the response. The number of results will be limited to 50 + * and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more results + * are available and a link to retrieve the rest of the results. + */ + includeVersions: z.boolean().optional(), + /** + * Includes the current version associated with this attachment in the response. By default this is included and can + * be omitted by setting the value to `false`. + */ + includeVersion: z.boolean().optional(), + /** Includes collaborators on the attachment. */ + includeCollaborators: z.boolean().optional(), +}); + +export type GetAttachmentById = z.input; diff --git a/packages/cloud/src/parameters/getAttachmentComments.ts b/packages/cloud/src/parameters/getAttachmentComments.ts new file mode 100644 index 00000000..4108a293 --- /dev/null +++ b/packages/cloud/src/parameters/getAttachmentComments.ts @@ -0,0 +1,32 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { CommentSortOrderSchema } from '../models/index.js'; + +export const GetAttachmentCommentsSchema = z.object({ + /** The ID of the attachment for which comments should be returned. */ + id: z.string(), + /** + * The content format type to be returned in the `body` field of the response. If available, the representation will + * be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of comments per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: CommentSortOrderSchema.optional(), + /** + * Version number of the attachment to retrieve comments for. If no version provided, retrieves comments for the + * latest version. + */ + version: z.number().optional(), +}); + +export type GetAttachmentComments = z.input; diff --git a/packages/cloud/src/parameters/getAttachmentContentProperties.ts b/packages/cloud/src/parameters/getAttachmentContentProperties.ts new file mode 100644 index 00000000..da93f7fa --- /dev/null +++ b/packages/cloud/src/parameters/getAttachmentContentProperties.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; +import { ContentPropertySortOrderSchema } from '../models/index.js'; + +export const GetAttachmentContentPropertiesSchema = z.object({ + /** The ID of the attachment for which content properties should be returned. */ + attachmentId: z.string(), + /** Filters the response to return a specific content property with matching key (case sensitive). */ + key: z.string().optional(), + /** Used to sort the result by a particular field. */ + sort: ContentPropertySortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of attachments per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetAttachmentContentProperties = z.input; diff --git a/packages/cloud/src/parameters/getAttachmentContentPropertiesById.ts b/packages/cloud/src/parameters/getAttachmentContentPropertiesById.ts new file mode 100644 index 00000000..d25e78cd --- /dev/null +++ b/packages/cloud/src/parameters/getAttachmentContentPropertiesById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetAttachmentContentPropertiesByIdSchema = z.object({ + /** The ID of the attachment for which content properties should be returned. */ + attachmentId: z.string(), + /** The ID of the content property to be returned */ + propertyId: z.number(), +}); + +export type GetAttachmentContentPropertiesById = z.input; diff --git a/packages/cloud/src/parameters/getAttachmentLabels.ts b/packages/cloud/src/parameters/getAttachmentLabels.ts new file mode 100644 index 00000000..e9bac3b1 --- /dev/null +++ b/packages/cloud/src/parameters/getAttachmentLabels.ts @@ -0,0 +1,22 @@ +import { z } from 'zod'; + +export const GetAttachmentLabelsSchema = z.object({ + /** The ID of the attachment for which labels should be returned. */ + id: z.string(), + /** Filter the results to labels based on their prefix. */ + prefix: z.enum(['my', 'team', 'global', 'system']).optional(), + /** Used to sort the result by a particular field. */ + sort: z.string().optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of labels per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetAttachmentLabels = z.input; diff --git a/packages/cloud/src/parameters/getAttachmentOperations.ts b/packages/cloud/src/parameters/getAttachmentOperations.ts new file mode 100644 index 00000000..e31aa784 --- /dev/null +++ b/packages/cloud/src/parameters/getAttachmentOperations.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetAttachmentOperationsSchema = z.object({ + /** The ID of the attachment for which operations should be returned. */ + id: z.string(), +}); + +export type GetAttachmentOperations = z.input; diff --git a/packages/cloud/src/parameters/getAttachmentThumbnailById.ts b/packages/cloud/src/parameters/getAttachmentThumbnailById.ts new file mode 100644 index 00000000..8263006d --- /dev/null +++ b/packages/cloud/src/parameters/getAttachmentThumbnailById.ts @@ -0,0 +1,20 @@ +import { z } from 'zod'; + +export const GetAttachmentThumbnailByIdSchema = z.object({ + /** + * The ID of the attachment to be returned. If you don't know the attachment's ID, use Get attachments for + * page/blogpost/custom content. + */ + id: z.string(), + /** + * Allows you to retrieve a previously published version. Specify the previous version's number to retrieve its + * details. + */ + version: z.number().optional(), + /** Allows you to define the thumbnail height. */ + height: z.number().optional(), + /** Allows you to define the thumbnail width. */ + width: z.number().optional(), +}); + +export type GetAttachmentThumbnailById = z.input; diff --git a/packages/cloud/src/parameters/getAttachmentVersionDetails.ts b/packages/cloud/src/parameters/getAttachmentVersionDetails.ts new file mode 100644 index 00000000..d99b0601 --- /dev/null +++ b/packages/cloud/src/parameters/getAttachmentVersionDetails.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetAttachmentVersionDetailsSchema = z.object({ + /** The ID of the attachment for which version details should be returned. */ + attachmentId: z.string(), + /** The version number of the attachment to be returned. */ + versionNumber: z.number(), +}); + +export type GetAttachmentVersionDetails = z.input; diff --git a/packages/cloud/src/parameters/getAttachmentVersions.ts b/packages/cloud/src/parameters/getAttachmentVersions.ts new file mode 100644 index 00000000..0ce3c0a8 --- /dev/null +++ b/packages/cloud/src/parameters/getAttachmentVersions.ts @@ -0,0 +1,24 @@ +import { z } from 'zod'; +import { VersionSortOrderSchema } from '../models/index.js'; + +export const GetAttachmentVersionsSchema = z.object({ + /** + * The ID of the attachment to be queried for its versions. If you don't know the attachment ID, use Get attachments + * and filter the results. + */ + id: z.string(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of versions per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: VersionSortOrderSchema.optional(), +}); + +export type GetAttachmentVersions = z.input; diff --git a/packages/cloud/src/parameters/getAttachments.ts b/packages/cloud/src/parameters/getAttachments.ts new file mode 100644 index 00000000..3cdb9cac --- /dev/null +++ b/packages/cloud/src/parameters/getAttachments.ts @@ -0,0 +1,25 @@ +import { z } from 'zod'; +import { AttachmentSortOrderSchema } from '../models/index.js'; + +export const GetAttachmentsSchema = z.object({ + /** Used to sort the result by a particular field. */ + sort: AttachmentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** Filter the results to attachments based on their status. By default, `current` and `archived` are used. */ + status: z.array(z.enum(['current', 'archived', 'trashed'])).optional(), + /** Filters on the mediaType of attachments. Only one may be specified. */ + mediaType: z.string().optional(), + /** Filters on the file-name of attachments. Only one may be specified. */ + filename: z.string().optional(), + /** + * Maximum number of attachments per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetAttachments = z.input; diff --git a/packages/cloud/src/parameters/getAvailableSpacePermissions.ts b/packages/cloud/src/parameters/getAvailableSpacePermissions.ts new file mode 100644 index 00000000..19b9a317 --- /dev/null +++ b/packages/cloud/src/parameters/getAvailableSpacePermissions.ts @@ -0,0 +1,16 @@ +import { z } from 'zod'; + +export const GetAvailableSpacePermissionsSchema = z.object({ + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of space permissions to return. If more results exist, use the `Link` response header to retrieve + * a relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetAvailableSpacePermissions = z.input; diff --git a/packages/cloud/src/parameters/getAvailableSpaceRoles.ts b/packages/cloud/src/parameters/getAvailableSpaceRoles.ts new file mode 100644 index 00000000..4fb838f5 --- /dev/null +++ b/packages/cloud/src/parameters/getAvailableSpaceRoles.ts @@ -0,0 +1,32 @@ +import { z } from 'zod'; +import { PrincipalTypeSchema } from '../models/index.js'; + +export const GetAvailableSpaceRolesSchema = z.object({ + /** + * The space ID for which to filter available space roles; if empty, return all available space roles for the + * tenant. + */ + spaceId: z.string().optional(), + /** The space role type to filter results by. */ + roleType: z.string().optional(), + /** + * The principal ID to filter results by. If specified, a principal-type must also be specified. Paired with a + * `principal-type` of `ACCESS_CLASS`, valid values include [`anonymous-users`, `jsm-project-admins`, + * `authenticated-users`, `all-licensed-users`, `all-product-admins`] + */ + principalId: z.string().optional(), + /** The principal type to filter results by. If specified, a principal-id must also be specified. */ + principalType: PrincipalTypeSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of space roles to return. If more results exist, use the `Link` response header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetAvailableSpaceRoles = z.input; diff --git a/packages/cloud/src/parameters/getBlogPostById.ts b/packages/cloud/src/parameters/getBlogPostById.ts new file mode 100644 index 00000000..07facc8d --- /dev/null +++ b/packages/cloud/src/parameters/getBlogPostById.ts @@ -0,0 +1,67 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSingleSchema } from '../models/index.js'; + +export const GetBlogPostByIdSchema = z.object({ + /** + * The ID of the blog post to be returned. If you don't know the blog post ID, use Get blog posts and filter the + * results. + */ + id: z.number(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSingleSchema.optional(), + /** Retrieve the draft version of this blog post. */ + getDraft: z.boolean().optional(), + /** Filter the blog post being retrieved by its status. */ + status: z.array(z.enum(['current', 'trashed', 'deleted', 'historical', 'draft'])).optional(), + /** + * Allows you to retrieve a previously published version. Specify the previous version's number to retrieve its + * details. + */ + version: z.number().optional(), + /** + * Includes labels associated with this blog post in the response. The number of results will be limited to 50 and + * sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more results are + * available and a link to retrieve the rest of the results. + */ + includeLabels: z.boolean().optional(), + /** + * Includes content properties associated with this blog post in the response. The number of results will be limited + * to 50 and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more + * results are available and a link to retrieve the rest of the results. + */ + includeProperties: z.boolean().optional(), + /** + * Includes operations associated with this blog post in the response, as defined in the `Operation` object. The + * number of results will be limited to 50 and sorted in the default sort order. A `meta` and `_links` property will + * be present to indicate if more results are available and a link to retrieve the rest of the results. + */ + includeOperations: z.boolean().optional(), + /** + * Includes likes associated with this blog post in the response. The number of results will be limited to 50 and + * sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more results are + * available and a link to retrieve the rest of the results. + */ + includeLikes: z.boolean().optional(), + /** + * Includes versions associated with this blog post in the response. The number of results will be limited to 50 and + * sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more results are + * available and a link to retrieve the rest of the results. + */ + includeVersions: z.boolean().optional(), + /** + * Includes the current version associated with this blog post in the response. By default this is included and can + * be omitted by setting the value to `false`. + */ + includeVersion: z.boolean().optional(), + /** Includes whether this blog post has been favorited by the current user. */ + includeFavoritedByCurrentUserStatus: z.boolean().optional(), + /** Includes web resources that can be used to render blog post content on a client. */ + includeWebresources: z.boolean().optional(), + /** Includes collaborators on the blog post. */ + includeCollaborators: z.boolean().optional(), +}); + +export type GetBlogPostById = z.input; diff --git a/packages/cloud/src/parameters/getBlogPostClassificationLevel.ts b/packages/cloud/src/parameters/getBlogPostClassificationLevel.ts new file mode 100644 index 00000000..86e0690f --- /dev/null +++ b/packages/cloud/src/parameters/getBlogPostClassificationLevel.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetBlogPostClassificationLevelSchema = z.object({ + /** The ID of the blog post for which classification level should be returned. */ + id: z.number(), + /** Status of blog post from which classification level will fetched. */ + status: z.enum(['current', 'draft', 'archived']).optional(), +}); + +export type GetBlogPostClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/getBlogPostFooterComments.ts b/packages/cloud/src/parameters/getBlogPostFooterComments.ts new file mode 100644 index 00000000..01fc539b --- /dev/null +++ b/packages/cloud/src/parameters/getBlogPostFooterComments.ts @@ -0,0 +1,29 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { CommentSortOrderSchema } from '../models/index.js'; + +export const GetBlogPostFooterCommentsSchema = z.object({ + /** The ID of the blog post for which footer comments should be returned. */ + id: z.number(), + /** + * The content format type to be returned in the `body` field of the response. If available, the representation will + * be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** Filter the footer comment being retrieved by its status. */ + status: z.array(z.enum(['current', 'deleted', 'trashed', 'historical', 'draft'])).optional(), + /** Used to sort the result by a particular field. */ + sort: CommentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of footer comments per result to return. If more results exist, use the `Link` header to retrieve + * a relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetBlogPostFooterComments = z.input; diff --git a/packages/cloud/src/parameters/getBlogPostInlineComments.ts b/packages/cloud/src/parameters/getBlogPostInlineComments.ts new file mode 100644 index 00000000..cf8f37ec --- /dev/null +++ b/packages/cloud/src/parameters/getBlogPostInlineComments.ts @@ -0,0 +1,31 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { CommentSortOrderSchema } from '../models/index.js'; + +export const GetBlogPostInlineCommentsSchema = z.object({ + /** The ID of the blog post for which inline comments should be returned. */ + id: z.number(), + /** + * The content format type to be returned in the `body` field of the response. If available, the representation will + * be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** Filter the inline comment being retrieved by its status. */ + status: z.array(z.enum(['current', 'deleted', 'trashed', 'historical', 'draft'])).optional(), + /** Filter the inline comment being retrieved by its resolution status. */ + resolutionStatus: z.array(z.enum(['resolved', 'open', 'dangling', 'reopened'])).optional(), + /** Used to sort the result by a particular field. */ + sort: CommentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of inline comments per result to return. If more results exist, use the `Link` header to retrieve + * a relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetBlogPostInlineComments = z.input; diff --git a/packages/cloud/src/parameters/getBlogPostLabels.ts b/packages/cloud/src/parameters/getBlogPostLabels.ts new file mode 100644 index 00000000..bda42da9 --- /dev/null +++ b/packages/cloud/src/parameters/getBlogPostLabels.ts @@ -0,0 +1,22 @@ +import { z } from 'zod'; + +export const GetBlogPostLabelsSchema = z.object({ + /** The ID of the blog post for which labels should be returned. */ + id: z.number(), + /** Filter the results to labels based on their prefix. */ + prefix: z.enum(['my', 'team', 'global', 'system']).optional(), + /** Used to sort the result by a particular field. */ + sort: z.string().optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of labels per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetBlogPostLabels = z.input; diff --git a/packages/cloud/src/parameters/getBlogPostLikeCount.ts b/packages/cloud/src/parameters/getBlogPostLikeCount.ts new file mode 100644 index 00000000..f41725bf --- /dev/null +++ b/packages/cloud/src/parameters/getBlogPostLikeCount.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetBlogPostLikeCountSchema = z.object({ + /** The ID of the blog post for which like count should be returned. */ + id: z.number(), +}); + +export type GetBlogPostLikeCount = z.input; diff --git a/packages/cloud/src/parameters/getBlogPostLikeUsers.ts b/packages/cloud/src/parameters/getBlogPostLikeUsers.ts new file mode 100644 index 00000000..1078d7b7 --- /dev/null +++ b/packages/cloud/src/parameters/getBlogPostLikeUsers.ts @@ -0,0 +1,18 @@ +import { z } from 'zod'; + +export const GetBlogPostLikeUsersSchema = z.object({ + /** The ID of the blog post for which account IDs should be returned. */ + id: z.number(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of account IDs per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetBlogPostLikeUsers = z.input; diff --git a/packages/cloud/src/parameters/getBlogPostOperations.ts b/packages/cloud/src/parameters/getBlogPostOperations.ts new file mode 100644 index 00000000..19ed1ece --- /dev/null +++ b/packages/cloud/src/parameters/getBlogPostOperations.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetBlogPostOperationsSchema = z.object({ + /** The ID of the blog post for which operations should be returned. */ + id: z.number(), +}); + +export type GetBlogPostOperations = z.input; diff --git a/packages/cloud/src/parameters/getBlogPostVersionDetails.ts b/packages/cloud/src/parameters/getBlogPostVersionDetails.ts new file mode 100644 index 00000000..807dfac2 --- /dev/null +++ b/packages/cloud/src/parameters/getBlogPostVersionDetails.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetBlogPostVersionDetailsSchema = z.object({ + /** The ID of the blog post for which version details should be returned. */ + blogpostId: z.number(), + /** The version number of the blog post to be returned. */ + versionNumber: z.number(), +}); + +export type GetBlogPostVersionDetails = z.input; diff --git a/packages/cloud/src/parameters/getBlogPostVersions.ts b/packages/cloud/src/parameters/getBlogPostVersions.ts new file mode 100644 index 00000000..663d17d0 --- /dev/null +++ b/packages/cloud/src/parameters/getBlogPostVersions.ts @@ -0,0 +1,30 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { VersionSortOrderSchema } from '../models/index.js'; + +export const GetBlogPostVersionsSchema = z.object({ + /** + * The ID of the blog post to be queried for its versions. If you don't know the blog post ID, use Get blog posts + * and filter the results. + */ + id: z.number(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of versions per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: VersionSortOrderSchema.optional(), +}); + +export type GetBlogPostVersions = z.input; diff --git a/packages/cloud/src/parameters/getBlogPosts.ts b/packages/cloud/src/parameters/getBlogPosts.ts new file mode 100644 index 00000000..927eccb6 --- /dev/null +++ b/packages/cloud/src/parameters/getBlogPosts.ts @@ -0,0 +1,33 @@ +import { z } from 'zod'; +import { BlogPostSortOrderSchema } from '../models/index.js'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; + +export const GetBlogPostsSchema = z.object({ + /** Filter the results based on blog post ids. Multiple blog post ids can be specified as a comma-separated list. */ + id: z.array(z.number()).optional(), + /** Filter the results based on space ids. Multiple space ids can be specified as a comma-separated list. */ + spaceId: z.array(z.number()).optional(), + /** Used to sort the result by a particular field. */ + sort: BlogPostSortOrderSchema.optional(), + /** Filter the results to blog posts based on their status. By default, `current` is used. */ + status: z.array(z.enum(['current', 'deleted', 'trashed'])).optional(), + /** Filter the results to blog posts based on their title. */ + title: z.string().optional(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of blog posts per result to return. If more results exist, use the `Link` response header to + * retrieve a relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetBlogPosts = z.input; diff --git a/packages/cloud/src/parameters/getBlogPostsInSpace.ts b/packages/cloud/src/parameters/getBlogPostsInSpace.ts new file mode 100644 index 00000000..d2ea277d --- /dev/null +++ b/packages/cloud/src/parameters/getBlogPostsInSpace.ts @@ -0,0 +1,31 @@ +import { z } from 'zod'; +import { BlogPostSortOrderSchema } from '../models/index.js'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; + +export const GetBlogPostsInSpaceSchema = z.object({ + /** The ID of the space for which blog posts should be returned. */ + id: z.number(), + /** Used to sort the result by a particular field. */ + sort: BlogPostSortOrderSchema.optional(), + /** Filter the results to blog posts based on their status. By default, `current` is used. */ + status: z.array(z.enum(['current', 'deleted', 'trashed'])).optional(), + /** Filter the results to blog posts based on their title. */ + title: z.string().optional(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of blog posts per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetBlogPostsInSpace = z.input; diff --git a/packages/cloud/src/parameters/getBlogpostAttachments.ts b/packages/cloud/src/parameters/getBlogpostAttachments.ts new file mode 100644 index 00000000..c09aa2be --- /dev/null +++ b/packages/cloud/src/parameters/getBlogpostAttachments.ts @@ -0,0 +1,27 @@ +import { z } from 'zod'; +import { AttachmentSortOrderSchema } from '../models/index.js'; + +export const GetBlogpostAttachmentsSchema = z.object({ + /** The ID of the blog post for which attachments should be returned. */ + id: z.number(), + /** Used to sort the result by a particular field. */ + sort: AttachmentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** Filter the results to attachments based on their status. By default, `current` and `archived` are used. */ + status: z.array(z.enum(['current', 'archived', 'trashed'])).optional(), + /** Filters on the mediaType of attachments. Only one may be specified. */ + mediaType: z.string().optional(), + /** Filters on the file-name of attachments. Only one may be specified. */ + filename: z.string().optional(), + /** + * Maximum number of attachments per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetBlogpostAttachments = z.input; diff --git a/packages/cloud/src/parameters/getBlogpostContentProperties.ts b/packages/cloud/src/parameters/getBlogpostContentProperties.ts new file mode 100644 index 00000000..09163a25 --- /dev/null +++ b/packages/cloud/src/parameters/getBlogpostContentProperties.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; +import { ContentPropertySortOrderSchema } from '../models/index.js'; + +export const GetBlogpostContentPropertiesSchema = z.object({ + /** The ID of the blog post for which content properties should be returned. */ + blogpostId: z.number(), + /** Filters the response to return a specific content property with matching key (case sensitive). */ + key: z.string().optional(), + /** Used to sort the result by a particular field. */ + sort: ContentPropertySortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of attachments per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetBlogpostContentProperties = z.input; diff --git a/packages/cloud/src/parameters/getBlogpostContentPropertiesById.ts b/packages/cloud/src/parameters/getBlogpostContentPropertiesById.ts new file mode 100644 index 00000000..9d2314c0 --- /dev/null +++ b/packages/cloud/src/parameters/getBlogpostContentPropertiesById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetBlogpostContentPropertiesByIdSchema = z.object({ + /** The ID of the blog post for which content properties should be returned. */ + blogpostId: z.number(), + /** The ID of the property being requested */ + propertyId: z.number(), +}); + +export type GetBlogpostContentPropertiesById = z.input; diff --git a/packages/cloud/src/parameters/getChildCustomContent.ts b/packages/cloud/src/parameters/getChildCustomContent.ts new file mode 100644 index 00000000..e406f4fc --- /dev/null +++ b/packages/cloud/src/parameters/getChildCustomContent.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; + +export const GetChildCustomContentSchema = z.object({ + /** + * The ID of the parent custom content. If you don't know the custom content ID, use Get custom-content and filter + * the results. + */ + id: z.number(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of pages per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: z.string().optional(), +}); + +export type GetChildCustomContent = z.input; diff --git a/packages/cloud/src/parameters/getChildPages.ts b/packages/cloud/src/parameters/getChildPages.ts new file mode 100644 index 00000000..c7649975 --- /dev/null +++ b/packages/cloud/src/parameters/getChildPages.ts @@ -0,0 +1,20 @@ +import { z } from 'zod'; + +export const GetChildPagesSchema = z.object({ + /** The ID of the parent page. If you don't know the page ID, use Get pages and filter the results. */ + id: z.number(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of pages per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: z.string().optional(), +}); + +export type GetChildPages = z.input; diff --git a/packages/cloud/src/parameters/getCommentContentProperties.ts b/packages/cloud/src/parameters/getCommentContentProperties.ts new file mode 100644 index 00000000..6a819de6 --- /dev/null +++ b/packages/cloud/src/parameters/getCommentContentProperties.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; +import { ContentPropertySortOrderSchema } from '../models/index.js'; + +export const GetCommentContentPropertiesSchema = z.object({ + /** The ID of the comment for which content properties should be returned. */ + commentId: z.number(), + /** Filters the response to return a specific content property with matching key (case sensitive). */ + key: z.string().optional(), + /** Used to sort the result by a particular field. */ + sort: ContentPropertySortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of attachments per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetCommentContentProperties = z.input; diff --git a/packages/cloud/src/parameters/getCommentContentPropertiesById.ts b/packages/cloud/src/parameters/getCommentContentPropertiesById.ts new file mode 100644 index 00000000..e5a97ed5 --- /dev/null +++ b/packages/cloud/src/parameters/getCommentContentPropertiesById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetCommentContentPropertiesByIdSchema = z.object({ + /** The ID of the comment for which content properties should be returned. */ + commentId: z.number(), + /** The ID of the content property being requested. */ + propertyId: z.number(), +}); + +export type GetCommentContentPropertiesById = z.input; diff --git a/packages/cloud/src/parameters/getCustomContentAttachments.ts b/packages/cloud/src/parameters/getCustomContentAttachments.ts new file mode 100644 index 00000000..8708c7bf --- /dev/null +++ b/packages/cloud/src/parameters/getCustomContentAttachments.ts @@ -0,0 +1,27 @@ +import { z } from 'zod'; +import { AttachmentSortOrderSchema } from '../models/index.js'; + +export const GetCustomContentAttachmentsSchema = z.object({ + /** The ID of the custom content for which attachments should be returned. */ + id: z.number(), + /** Used to sort the result by a particular field. */ + sort: AttachmentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** Filter the results to attachments based on their status. By default, `current` and `archived` are used. */ + status: z.array(z.enum(['current', 'archived', 'trashed'])).optional(), + /** Filters on the mediaType of attachments. Only one may be specified. */ + mediaType: z.string().optional(), + /** Filters on the file-name of attachments. Only one may be specified. */ + filename: z.string().optional(), + /** + * Maximum number of attachments per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetCustomContentAttachments = z.input; diff --git a/packages/cloud/src/parameters/getCustomContentById.ts b/packages/cloud/src/parameters/getCustomContentById.ts new file mode 100644 index 00000000..1f1315d3 --- /dev/null +++ b/packages/cloud/src/parameters/getCustomContentById.ts @@ -0,0 +1,56 @@ +import { z } from 'zod'; +import { CustomContentBodyRepresentationSingleSchema } from '../models/index.js'; + +export const GetCustomContentByIdSchema = z.object({ + /** + * The ID of the custom content to be returned. If you don't know the custom content ID, use Get Custom Content by + * Type and filter the results. + */ + id: z.number(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + * + * Note: If the custom content body type is `storage`, the `storage` and `atlas_doc_format` body formats are able to + * be returned. If the custom content body type is `raw`, only the `raw` body format is able to be returned. + */ + bodyFormat: CustomContentBodyRepresentationSingleSchema.optional(), + /** + * Allows you to retrieve a previously published version. Specify the previous version's number to retrieve its + * details. + */ + version: z.number().optional(), + /** + * Includes labels associated with this custom content in the response. The number of results will be limited to 50 + * and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more results + * are available and a link to retrieve the rest of the results. + */ + includeLabels: z.boolean().optional(), + /** + * Includes content properties associated with this custom content in the response. The number of results will be + * limited to 50 and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if + * more results are available and a link to retrieve the rest of the results. + */ + includeProperties: z.boolean().optional(), + /** + * Includes operations associated with this custom content in the response, as defined in the `Operation` object. + * The number of results will be limited to 50 and sorted in the default sort order. A `meta` and `_links` property + * will be present to indicate if more results are available and a link to retrieve the rest of the results. + */ + includeOperations: z.boolean().optional(), + /** + * Includes versions associated with this custom content in the response. The number of results will be limited to + * 50 and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more + * results are available and a link to retrieve the rest of the results. + */ + includeVersions: z.boolean().optional(), + /** + * Includes the current version associated with this custom content in the response. By default this is included and + * can be omitted by setting the value to `false`. + */ + includeVersion: z.boolean().optional(), + /** Includes collaborators on the custom content. */ + includeCollaborators: z.boolean().optional(), +}); + +export type GetCustomContentById = z.input; diff --git a/packages/cloud/src/parameters/getCustomContentByType.ts b/packages/cloud/src/parameters/getCustomContentByType.ts new file mode 100644 index 00000000..552ed59c --- /dev/null +++ b/packages/cloud/src/parameters/getCustomContentByType.ts @@ -0,0 +1,40 @@ +import { z } from 'zod'; +import { CustomContentSortOrderSchema } from '../models/index.js'; +import { CustomContentBodyRepresentationSchema } from '../models/index.js'; + +export const GetCustomContentByTypeSchema = z.object({ + /** + * The type of custom content being requested. See: https://developer.atlassian.com/cloud/confluence/custom-content/ + * for additional details on custom content. + */ + type: z.string(), + /** + * Filter the results based on custom content ids. Multiple custom content ids can be specified as a comma-separated + * list. + */ + id: z.array(z.number()).optional(), + /** Filter the results based on space ids. Multiple space ids can be specified as a comma-separated list. */ + spaceId: z.array(z.number()).optional(), + /** Used to sort the result by a particular field. */ + sort: CustomContentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of pages per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + * + * Note: If the custom content body type is `storage`, the `storage` and `atlas_doc_format` body formats are able to + * be returned. If the custom content body type is `raw`, only the `raw` body format is able to be returned. + */ + bodyFormat: CustomContentBodyRepresentationSchema.optional(), +}); + +export type GetCustomContentByType = z.input; diff --git a/packages/cloud/src/parameters/getCustomContentByTypeInBlogPost.ts b/packages/cloud/src/parameters/getCustomContentByTypeInBlogPost.ts new file mode 100644 index 00000000..6246f906 --- /dev/null +++ b/packages/cloud/src/parameters/getCustomContentByTypeInBlogPost.ts @@ -0,0 +1,35 @@ +import { z } from 'zod'; +import { CustomContentSortOrderSchema } from '../models/index.js'; +import { CustomContentBodyRepresentationSchema } from '../models/index.js'; + +export const GetCustomContentByTypeInBlogPostSchema = z.object({ + /** The ID of the blog post for which custom content should be returned. */ + id: z.number(), + /** + * The type of custom content being requested. See: https://developer.atlassian.com/cloud/confluence/custom-content/ + * for additional details on custom content. + */ + type: z.string(), + /** Used to sort the result by a particular field. */ + sort: CustomContentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of pages per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + * + * Note: If the custom content body type is `storage`, the `storage` and `atlas_doc_format` body formats are able to + * be returned. If the custom content body type is `raw`, only the `raw` body format is able to be returned. + */ + bodyFormat: CustomContentBodyRepresentationSchema.optional(), +}); + +export type GetCustomContentByTypeInBlogPost = z.input; diff --git a/packages/cloud/src/parameters/getCustomContentByTypeInPage.ts b/packages/cloud/src/parameters/getCustomContentByTypeInPage.ts new file mode 100644 index 00000000..b0d73643 --- /dev/null +++ b/packages/cloud/src/parameters/getCustomContentByTypeInPage.ts @@ -0,0 +1,35 @@ +import { z } from 'zod'; +import { CustomContentSortOrderSchema } from '../models/index.js'; +import { CustomContentBodyRepresentationSchema } from '../models/index.js'; + +export const GetCustomContentByTypeInPageSchema = z.object({ + /** The ID of the page for which custom content should be returned. */ + id: z.number(), + /** + * The type of custom content being requested. See: https://developer.atlassian.com/cloud/confluence/custom-content/ + * for additional details on custom content. + */ + type: z.string(), + /** Used to sort the result by a particular field. */ + sort: CustomContentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of pages per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + * + * Note: If the custom content body type is `storage`, the `storage` and `atlas_doc_format` body formats are able to + * be returned. If the custom content body type is `raw`, only the `raw` body format is able to be returned. + */ + bodyFormat: CustomContentBodyRepresentationSchema.optional(), +}); + +export type GetCustomContentByTypeInPage = z.input; diff --git a/packages/cloud/src/parameters/getCustomContentByTypeInSpace.ts b/packages/cloud/src/parameters/getCustomContentByTypeInSpace.ts new file mode 100644 index 00000000..5e43da79 --- /dev/null +++ b/packages/cloud/src/parameters/getCustomContentByTypeInSpace.ts @@ -0,0 +1,32 @@ +import { z } from 'zod'; +import { CustomContentBodyRepresentationSchema } from '../models/index.js'; + +export const GetCustomContentByTypeInSpaceSchema = z.object({ + /** The ID of the space for which custom content should be returned. */ + id: z.number(), + /** + * The type of custom content being requested. See: https://developer.atlassian.com/cloud/confluence/custom-content/ + * for additional details on custom content. + */ + type: z.string(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of pages per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + * + * Note: If the custom content body type is `storage`, the `storage` and `atlas_doc_format` body formats are able to + * be returned. If the custom content body type is `raw`, only the `raw` body format is able to be returned. + */ + bodyFormat: CustomContentBodyRepresentationSchema.optional(), +}); + +export type GetCustomContentByTypeInSpace = z.input; diff --git a/packages/cloud/src/parameters/getCustomContentComments.ts b/packages/cloud/src/parameters/getCustomContentComments.ts new file mode 100644 index 00000000..d7041648 --- /dev/null +++ b/packages/cloud/src/parameters/getCustomContentComments.ts @@ -0,0 +1,27 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { CommentSortOrderSchema } from '../models/index.js'; + +export const GetCustomContentCommentsSchema = z.object({ + /** The ID of the custom content for which comments should be returned. */ + id: z.number(), + /** + * The content format type to be returned in the `body` field of the response. If available, the representation will + * be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of comments per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: CommentSortOrderSchema.optional(), +}); + +export type GetCustomContentComments = z.input; diff --git a/packages/cloud/src/parameters/getCustomContentContentProperties.ts b/packages/cloud/src/parameters/getCustomContentContentProperties.ts new file mode 100644 index 00000000..9f83f4eb --- /dev/null +++ b/packages/cloud/src/parameters/getCustomContentContentProperties.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; +import { ContentPropertySortOrderSchema } from '../models/index.js'; + +export const GetCustomContentContentPropertiesSchema = z.object({ + /** The ID of the custom content for which content properties should be returned. */ + customContentId: z.number(), + /** Filters the response to return a specific content property with matching key (case sensitive). */ + key: z.string().optional(), + /** Used to sort the result by a particular field. */ + sort: ContentPropertySortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of attachments per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetCustomContentContentProperties = z.input; diff --git a/packages/cloud/src/parameters/getCustomContentContentPropertiesById.ts b/packages/cloud/src/parameters/getCustomContentContentPropertiesById.ts new file mode 100644 index 00000000..7553e43e --- /dev/null +++ b/packages/cloud/src/parameters/getCustomContentContentPropertiesById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetCustomContentContentPropertiesByIdSchema = z.object({ + /** The ID of the custom content for which content properties should be returned. */ + customContentId: z.number(), + /** The ID of the content property being requested. */ + propertyId: z.number(), +}); + +export type GetCustomContentContentPropertiesById = z.input; diff --git a/packages/cloud/src/parameters/getCustomContentLabels.ts b/packages/cloud/src/parameters/getCustomContentLabels.ts new file mode 100644 index 00000000..7d0d50dc --- /dev/null +++ b/packages/cloud/src/parameters/getCustomContentLabels.ts @@ -0,0 +1,22 @@ +import { z } from 'zod'; + +export const GetCustomContentLabelsSchema = z.object({ + /** The ID of the custom content for which labels should be returned. */ + id: z.number(), + /** Filter the results to labels based on their prefix. */ + prefix: z.enum(['my', 'team', 'global', 'system']).optional(), + /** Used to sort the result by a particular field. */ + sort: z.string().optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of labels per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetCustomContentLabels = z.input; diff --git a/packages/cloud/src/parameters/getCustomContentOperations.ts b/packages/cloud/src/parameters/getCustomContentOperations.ts new file mode 100644 index 00000000..20c50955 --- /dev/null +++ b/packages/cloud/src/parameters/getCustomContentOperations.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetCustomContentOperationsSchema = z.object({ + /** The ID of the custom content for which operations should be returned. */ + id: z.number(), +}); + +export type GetCustomContentOperations = z.input; diff --git a/packages/cloud/src/parameters/getCustomContentVersionDetails.ts b/packages/cloud/src/parameters/getCustomContentVersionDetails.ts new file mode 100644 index 00000000..6c38e58e --- /dev/null +++ b/packages/cloud/src/parameters/getCustomContentVersionDetails.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetCustomContentVersionDetailsSchema = z.object({ + /** The ID of the custom content for which version details should be returned. */ + customContentId: z.number(), + /** The version number of the custom content to be returned. */ + versionNumber: z.number(), +}); + +export type GetCustomContentVersionDetails = z.input; diff --git a/packages/cloud/src/parameters/getCustomContentVersions.ts b/packages/cloud/src/parameters/getCustomContentVersions.ts new file mode 100644 index 00000000..0b6ecbdb --- /dev/null +++ b/packages/cloud/src/parameters/getCustomContentVersions.ts @@ -0,0 +1,33 @@ +import { z } from 'zod'; +import { CustomContentBodyRepresentationSchema } from '../models/index.js'; +import { VersionSortOrderSchema } from '../models/index.js'; + +export const GetCustomContentVersionsSchema = z.object({ + /** + * The ID of the custom content to be queried for its versions. If you don't know the custom content ID, use Get + * custom-content by type and filter the results. + */ + customContentId: z.number(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + * + * Note: If the custom content body type is `storage`, the `storage` and `atlas_doc_format` body formats are able to + * be returned. If the custom content body type is `raw`, only the `raw` body format is able to be returned. + */ + bodyFormat: CustomContentBodyRepresentationSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of versions per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: VersionSortOrderSchema.optional(), +}); + +export type GetCustomContentVersions = z.input; diff --git a/packages/cloud/src/parameters/getDataPolicySpaces.ts b/packages/cloud/src/parameters/getDataPolicySpaces.ts new file mode 100644 index 00000000..972355ac --- /dev/null +++ b/packages/cloud/src/parameters/getDataPolicySpaces.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; +import { SpaceSortOrderSchema } from '../models/index.js'; + +export const GetDataPolicySpacesSchema = z.object({ + /** Filter the results to spaces based on their IDs. Multiple IDs can be specified as a comma-separated list. */ + ids: z.array(z.number()).optional(), + /** Filter the results to spaces based on their keys. Multiple keys can be specified as a comma-separated list. */ + keys: z.array(z.string()).optional(), + /** Used to sort the result by a particular field. */ + sort: SpaceSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of spaces per result to return. If more results exist, use the `Link` response header to retrieve + * a relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetDataPolicySpaces = z.input; diff --git a/packages/cloud/src/parameters/getDatabaseAncestors.ts b/packages/cloud/src/parameters/getDatabaseAncestors.ts new file mode 100644 index 00000000..869b4b61 --- /dev/null +++ b/packages/cloud/src/parameters/getDatabaseAncestors.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; + +export const GetDatabaseAncestorsSchema = z.object({ + /** The ID of the database. */ + id: z.number(), + /** + * Maximum number of items per result to return. If more results exist, call the endpoint with the highest + * ancestor's ID to fetch the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetDatabaseAncestors = z.input; diff --git a/packages/cloud/src/parameters/getDatabaseById.ts b/packages/cloud/src/parameters/getDatabaseById.ts new file mode 100644 index 00000000..5909a625 --- /dev/null +++ b/packages/cloud/src/parameters/getDatabaseById.ts @@ -0,0 +1,24 @@ +import { z } from 'zod'; + +export const GetDatabaseByIdSchema = z.object({ + /** The ID of the database to be returned */ + id: z.number(), + /** Includes collaborators on the database. */ + includeCollaborators: z.boolean().optional(), + /** Includes direct children of the database, as defined in the `ChildrenResponse` object. */ + includeDirectChildren: z.boolean().optional(), + /** + * Includes operations associated with this database in the response, as defined in the `Operation` object. The + * number of results will be limited to 50 and sorted in the default sort order. A `meta` and `_links` property will + * be present to indicate if more results are available and a link to retrieve the rest of the results. + */ + includeOperations: z.boolean().optional(), + /** + * Includes content properties associated with this database in the response. The number of results will be limited + * to 50 and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more + * results are available and a link to retrieve the rest of the results. + */ + includeProperties: z.boolean().optional(), +}); + +export type GetDatabaseById = z.input; diff --git a/packages/cloud/src/parameters/getDatabaseClassificationLevel.ts b/packages/cloud/src/parameters/getDatabaseClassificationLevel.ts new file mode 100644 index 00000000..35451b29 --- /dev/null +++ b/packages/cloud/src/parameters/getDatabaseClassificationLevel.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetDatabaseClassificationLevelSchema = z.object({ + /** The ID of the database for which classification level should be returned. */ + id: z.number(), +}); + +export type GetDatabaseClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/getDatabaseContentProperties.ts b/packages/cloud/src/parameters/getDatabaseContentProperties.ts new file mode 100644 index 00000000..1f601735 --- /dev/null +++ b/packages/cloud/src/parameters/getDatabaseContentProperties.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; +import { ContentPropertySortOrderSchema } from '../models/index.js'; + +export const GetDatabaseContentPropertiesSchema = z.object({ + /** The ID of the database for which content properties should be returned. */ + id: z.number(), + /** Filters the response to return a specific content property with matching key (case sensitive). */ + key: z.string().optional(), + /** Used to sort the result by a particular field. */ + sort: ContentPropertySortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of attachments per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetDatabaseContentProperties = z.input; diff --git a/packages/cloud/src/parameters/getDatabaseContentPropertiesById.ts b/packages/cloud/src/parameters/getDatabaseContentPropertiesById.ts new file mode 100644 index 00000000..6a055866 --- /dev/null +++ b/packages/cloud/src/parameters/getDatabaseContentPropertiesById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetDatabaseContentPropertiesByIdSchema = z.object({ + /** The ID of the database for which content properties should be returned. */ + databaseId: z.number(), + /** The ID of the content property being requested. */ + propertyId: z.number(), +}); + +export type GetDatabaseContentPropertiesById = z.input; diff --git a/packages/cloud/src/parameters/getDatabaseDescendants.ts b/packages/cloud/src/parameters/getDatabaseDescendants.ts new file mode 100644 index 00000000..fd418805 --- /dev/null +++ b/packages/cloud/src/parameters/getDatabaseDescendants.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; + +export const GetDatabaseDescendantsSchema = z.object({ + /** The ID of the database. */ + id: z.number(), + /** + * Maximum number of items per result to return. If more results exist, call the endpoint with the cursor to fetch + * the next set of results. + */ + limit: z.number().optional(), + /** + * Maximum depth of descendants to return. If more results are required, use the endpoint corresponding to the + * content type of the deepest descendant to fetch more descendants. + */ + depth: z.number().optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), +}); + +export type GetDatabaseDescendants = z.input; diff --git a/packages/cloud/src/parameters/getDatabaseDirectChildren.ts b/packages/cloud/src/parameters/getDatabaseDirectChildren.ts new file mode 100644 index 00000000..c2f107dc --- /dev/null +++ b/packages/cloud/src/parameters/getDatabaseDirectChildren.ts @@ -0,0 +1,20 @@ +import { z } from 'zod'; + +export const GetDatabaseDirectChildrenSchema = z.object({ + /** The ID of the parent database. */ + id: z.number(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of items per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: z.string().optional(), +}); + +export type GetDatabaseDirectChildren = z.input; diff --git a/packages/cloud/src/parameters/getDatabaseOperations.ts b/packages/cloud/src/parameters/getDatabaseOperations.ts new file mode 100644 index 00000000..a5951801 --- /dev/null +++ b/packages/cloud/src/parameters/getDatabaseOperations.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetDatabaseOperationsSchema = z.object({ + /** The ID of the database for which operations should be returned. */ + id: z.number(), +}); + +export type GetDatabaseOperations = z.input; diff --git a/packages/cloud/src/parameters/getFolderAncestors.ts b/packages/cloud/src/parameters/getFolderAncestors.ts new file mode 100644 index 00000000..a1da60c5 --- /dev/null +++ b/packages/cloud/src/parameters/getFolderAncestors.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; + +export const GetFolderAncestorsSchema = z.object({ + /** The ID of the folder. */ + id: z.number(), + /** + * Maximum number of items per result to return. If more results exist, call the endpoint with the highest + * ancestor's ID to fetch the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetFolderAncestors = z.input; diff --git a/packages/cloud/src/parameters/getFolderById.ts b/packages/cloud/src/parameters/getFolderById.ts new file mode 100644 index 00000000..37ceffc4 --- /dev/null +++ b/packages/cloud/src/parameters/getFolderById.ts @@ -0,0 +1,24 @@ +import { z } from 'zod'; + +export const GetFolderByIdSchema = z.object({ + /** The ID of the folder to be returned. */ + id: z.number(), + /** Includes collaborators on the folder. */ + includeCollaborators: z.boolean().optional(), + /** Includes direct children of the folder, as defined in the `ChildrenResponse` object. */ + includeDirectChildren: z.boolean().optional(), + /** + * Includes operations associated with this folder in the response, as defined in the `Operation` object. The number + * of results will be limited to 50 and sorted in the default sort order. A `meta` and `_links` property will be + * present to indicate if more results are available and a link to retrieve the rest of the results. + */ + includeOperations: z.boolean().optional(), + /** + * Includes content properties associated with this folder in the response. The number of results will be limited to + * 50 and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more + * results are available and a link to retrieve the rest of the results. + */ + includeProperties: z.boolean().optional(), +}); + +export type GetFolderById = z.input; diff --git a/packages/cloud/src/parameters/getFolderContentProperties.ts b/packages/cloud/src/parameters/getFolderContentProperties.ts new file mode 100644 index 00000000..b652a15f --- /dev/null +++ b/packages/cloud/src/parameters/getFolderContentProperties.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; +import { ContentPropertySortOrderSchema } from '../models/index.js'; + +export const GetFolderContentPropertiesSchema = z.object({ + /** The ID of the folder for which content properties should be returned. */ + id: z.number(), + /** Filters the response to return a specific content property with matching key (case sensitive). */ + key: z.string().optional(), + /** Used to sort the result by a particular field. */ + sort: ContentPropertySortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of attachments per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetFolderContentProperties = z.input; diff --git a/packages/cloud/src/parameters/getFolderContentPropertiesById.ts b/packages/cloud/src/parameters/getFolderContentPropertiesById.ts new file mode 100644 index 00000000..3bb39eed --- /dev/null +++ b/packages/cloud/src/parameters/getFolderContentPropertiesById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetFolderContentPropertiesByIdSchema = z.object({ + /** The ID of the folder for which content properties should be returned. */ + folderId: z.number(), + /** The ID of the content property being requested. */ + propertyId: z.number(), +}); + +export type GetFolderContentPropertiesById = z.input; diff --git a/packages/cloud/src/parameters/getFolderDescendants.ts b/packages/cloud/src/parameters/getFolderDescendants.ts new file mode 100644 index 00000000..b3b9e074 --- /dev/null +++ b/packages/cloud/src/parameters/getFolderDescendants.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; + +export const GetFolderDescendantsSchema = z.object({ + /** The ID of the folder. */ + id: z.number(), + /** + * Maximum number of items per result to return. If more results exist, call the endpoint with the cursor to fetch + * the next set of results. + */ + limit: z.number().optional(), + /** + * Maximum depth of descendants to return. If more results are required, use the endpoint corresponding to the + * content type of the deepest descendant to fetch more descendants. + */ + depth: z.number().optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), +}); + +export type GetFolderDescendants = z.input; diff --git a/packages/cloud/src/parameters/getFolderDirectChildren.ts b/packages/cloud/src/parameters/getFolderDirectChildren.ts new file mode 100644 index 00000000..c81e32d2 --- /dev/null +++ b/packages/cloud/src/parameters/getFolderDirectChildren.ts @@ -0,0 +1,20 @@ +import { z } from 'zod'; + +export const GetFolderDirectChildrenSchema = z.object({ + /** The ID of the parent folder. */ + id: z.number(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of items per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: z.string().optional(), +}); + +export type GetFolderDirectChildren = z.input; diff --git a/packages/cloud/src/parameters/getFolderOperations.ts b/packages/cloud/src/parameters/getFolderOperations.ts new file mode 100644 index 00000000..9fea9297 --- /dev/null +++ b/packages/cloud/src/parameters/getFolderOperations.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetFolderOperationsSchema = z.object({ + /** The ID of the folder for which operations should be returned. */ + id: z.number(), +}); + +export type GetFolderOperations = z.input; diff --git a/packages/cloud/src/parameters/getFooterCommentById.ts b/packages/cloud/src/parameters/getFooterCommentById.ts new file mode 100644 index 00000000..6bb74a62 --- /dev/null +++ b/packages/cloud/src/parameters/getFooterCommentById.ts @@ -0,0 +1,48 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSingleSchema } from '../models/index.js'; + +export const GetFooterCommentByIdSchema = z.object({ + /** The ID of the comment to be retrieved. */ + commentId: z.number(), + /** + * The content format type to be returned in the `body` field of the response. If available, the representation will + * be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSingleSchema.optional(), + /** + * Allows you to retrieve a previously published version. Specify the previous version's number to retrieve its + * details. + */ + version: z.number().optional(), + /** + * Includes content properties associated with this footer comment in the response. The number of results will be + * limited to 50 and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if + * more results are available and a link to retrieve the rest of the results. + */ + includeProperties: z.boolean().optional(), + /** + * Includes operations associated with this footer comment in the response, as defined in the `Operation` object. + * The number of results will be limited to 50 and sorted in the default sort order. A `meta` and `_links` property + * will be present to indicate if more results are available and a link to retrieve the rest of the results. + */ + includeOperations: z.boolean().optional(), + /** + * Includes likes associated with this footer comment in the response. The number of results will be limited to 50 + * and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more results + * are available and a link to retrieve the rest of the results. + */ + includeLikes: z.boolean().optional(), + /** + * Includes versions associated with this footer comment in the response. The number of results will be limited to + * 50 and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more + * results are available and a link to retrieve the rest of the results. + */ + includeVersions: z.boolean().optional(), + /** + * Includes the current version associated with this footer comment in the response. By default this is included and + * can be omitted by setting the value to `false`. + */ + includeVersion: z.boolean().optional(), +}); + +export type GetFooterCommentById = z.input; diff --git a/packages/cloud/src/parameters/getFooterCommentChildren.ts b/packages/cloud/src/parameters/getFooterCommentChildren.ts new file mode 100644 index 00000000..1711676b --- /dev/null +++ b/packages/cloud/src/parameters/getFooterCommentChildren.ts @@ -0,0 +1,27 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { CommentSortOrderSchema } from '../models/index.js'; + +export const GetFooterCommentChildrenSchema = z.object({ + /** The ID of the parent comment for which footer comment children should be returned. */ + id: z.number(), + /** + * The content format type to be returned in the `body` field of the response. If available, the representation will + * be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** Used to sort the result by a particular field. */ + sort: CommentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of footer comments per result to return. If more results exist, use the `Link` header to retrieve + * a relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetFooterCommentChildren = z.input; diff --git a/packages/cloud/src/parameters/getFooterCommentOperations.ts b/packages/cloud/src/parameters/getFooterCommentOperations.ts new file mode 100644 index 00000000..21f7737b --- /dev/null +++ b/packages/cloud/src/parameters/getFooterCommentOperations.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetFooterCommentOperationsSchema = z.object({ + /** The ID of the footer comment for which operations should be returned. */ + id: z.number(), +}); + +export type GetFooterCommentOperations = z.input; diff --git a/packages/cloud/src/parameters/getFooterCommentVersionDetails.ts b/packages/cloud/src/parameters/getFooterCommentVersionDetails.ts new file mode 100644 index 00000000..4abf7d45 --- /dev/null +++ b/packages/cloud/src/parameters/getFooterCommentVersionDetails.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetFooterCommentVersionDetailsSchema = z.object({ + /** The ID of the footer comment for which version details should be returned. */ + id: z.number(), + /** The version number of the footer comment to be returned. */ + versionNumber: z.number(), +}); + +export type GetFooterCommentVersionDetails = z.input; diff --git a/packages/cloud/src/parameters/getFooterCommentVersions.ts b/packages/cloud/src/parameters/getFooterCommentVersions.ts new file mode 100644 index 00000000..8c8e8b19 --- /dev/null +++ b/packages/cloud/src/parameters/getFooterCommentVersions.ts @@ -0,0 +1,27 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { VersionSortOrderSchema } from '../models/index.js'; + +export const GetFooterCommentVersionsSchema = z.object({ + /** The ID of the footer comment for which versions should be returned */ + id: z.number(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of versions per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: VersionSortOrderSchema.optional(), +}); + +export type GetFooterCommentVersions = z.input; diff --git a/packages/cloud/src/parameters/getFooterComments.ts b/packages/cloud/src/parameters/getFooterComments.ts new file mode 100644 index 00000000..ccd578d3 --- /dev/null +++ b/packages/cloud/src/parameters/getFooterComments.ts @@ -0,0 +1,25 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { CommentSortOrderSchema } from '../models/index.js'; + +export const GetFooterCommentsSchema = z.object({ + /** + * The content format type to be returned in the `body` field of the response. If available, the representation will + * be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** Used to sort the result by a particular field. */ + sort: CommentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of footer comments per result to return. If more results exist, use the `Link` header to retrieve + * a relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetFooterComments = z.input; diff --git a/packages/cloud/src/parameters/getFooterLikeCount.ts b/packages/cloud/src/parameters/getFooterLikeCount.ts new file mode 100644 index 00000000..3d6958ac --- /dev/null +++ b/packages/cloud/src/parameters/getFooterLikeCount.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetFooterLikeCountSchema = z.object({ + /** The ID of the footer comment for which like count should be returned. */ + id: z.number(), +}); + +export type GetFooterLikeCount = z.input; diff --git a/packages/cloud/src/parameters/getFooterLikeUsers.ts b/packages/cloud/src/parameters/getFooterLikeUsers.ts new file mode 100644 index 00000000..30539d31 --- /dev/null +++ b/packages/cloud/src/parameters/getFooterLikeUsers.ts @@ -0,0 +1,18 @@ +import { z } from 'zod'; + +export const GetFooterLikeUsersSchema = z.object({ + /** The ID of the footer comment for which like count should be returned. */ + id: z.number(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of account IDs per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetFooterLikeUsers = z.input; diff --git a/packages/cloud/src/parameters/getForgeAppProperties.ts b/packages/cloud/src/parameters/getForgeAppProperties.ts new file mode 100644 index 00000000..88231d7e --- /dev/null +++ b/packages/cloud/src/parameters/getForgeAppProperties.ts @@ -0,0 +1,16 @@ +import { z } from 'zod'; + +export const GetForgeAppPropertiesSchema = z.object({ + /** + * Used for pagination, this opaque cursor represents the last returned property key. It will be included in the + * response body as the next link. Use this key to request the next set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of app properties per result to return. If more results exist, use the last returned property key + * from the Link field in the response body as a cursor to retrieve the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetForgeAppProperties = z.input; diff --git a/packages/cloud/src/parameters/getForgeAppProperty.ts b/packages/cloud/src/parameters/getForgeAppProperty.ts new file mode 100644 index 00000000..187aba50 --- /dev/null +++ b/packages/cloud/src/parameters/getForgeAppProperty.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetForgeAppPropertySchema = z.object({ + /** The key of the property */ + propertyKey: z.string(), +}); + +export type GetForgeAppProperty = z.input; diff --git a/packages/cloud/src/parameters/getInlineCommentById.ts b/packages/cloud/src/parameters/getInlineCommentById.ts new file mode 100644 index 00000000..8bab17a8 --- /dev/null +++ b/packages/cloud/src/parameters/getInlineCommentById.ts @@ -0,0 +1,48 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSingleSchema } from '../models/index.js'; + +export const GetInlineCommentByIdSchema = z.object({ + /** The ID of the comment to be retrieved. */ + commentId: z.number(), + /** + * The content format type to be returned in the `body` field of the response. If available, the representation will + * be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSingleSchema.optional(), + /** + * Allows you to retrieve a previously published version. Specify the previous version's number to retrieve its + * details. + */ + version: z.number().optional(), + /** + * Includes content properties associated with this inline comment in the response. The number of results will be + * limited to 50 and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if + * more results are available and a link to retrieve the rest of the results. + */ + includeProperties: z.boolean().optional(), + /** + * Includes operations associated with this inline comment in the response, as defined in the `Operation` object. + * The number of results will be limited to 50 and sorted in the default sort order. A `meta` and `_links` property + * will be present to indicate if more results are available and a link to retrieve the rest of the results. + */ + includeOperations: z.boolean().optional(), + /** + * Includes likes associated with this inline comment in the response. The number of results will be limited to 50 + * and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more results + * are available and a link to retrieve the rest of the results. + */ + includeLikes: z.boolean().optional(), + /** + * Includes versions associated with this inline comment in the response. The number of results will be limited to + * 50 and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more + * results are available and a link to retrieve the rest of the results. + */ + includeVersions: z.boolean().optional(), + /** + * Includes the current version associated with this inline comment in the response. By default this is included and + * can be omitted by setting the value to `false`. + */ + includeVersion: z.boolean().optional(), +}); + +export type GetInlineCommentById = z.input; diff --git a/packages/cloud/src/parameters/getInlineCommentChildren.ts b/packages/cloud/src/parameters/getInlineCommentChildren.ts new file mode 100644 index 00000000..a2e1129d --- /dev/null +++ b/packages/cloud/src/parameters/getInlineCommentChildren.ts @@ -0,0 +1,27 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { CommentSortOrderSchema } from '../models/index.js'; + +export const GetInlineCommentChildrenSchema = z.object({ + /** The ID of the parent comment for which inline comment children should be returned. */ + id: z.number(), + /** + * The content format type to be returned in the `body` field of the response. If available, the representation will + * be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** Used to sort the result by a particular field. */ + sort: CommentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of footer comments per result to return. If more results exist, use the `Link` header to retrieve + * a relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetInlineCommentChildren = z.input; diff --git a/packages/cloud/src/parameters/getInlineCommentOperations.ts b/packages/cloud/src/parameters/getInlineCommentOperations.ts new file mode 100644 index 00000000..264a0067 --- /dev/null +++ b/packages/cloud/src/parameters/getInlineCommentOperations.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetInlineCommentOperationsSchema = z.object({ + /** The ID of the inline comment for which operations should be returned. */ + id: z.number(), +}); + +export type GetInlineCommentOperations = z.input; diff --git a/packages/cloud/src/parameters/getInlineCommentVersionDetails.ts b/packages/cloud/src/parameters/getInlineCommentVersionDetails.ts new file mode 100644 index 00000000..aa985b26 --- /dev/null +++ b/packages/cloud/src/parameters/getInlineCommentVersionDetails.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetInlineCommentVersionDetailsSchema = z.object({ + /** The ID of the inline comment for which version details should be returned. */ + id: z.number(), + /** The version number of the inline comment to be returned. */ + versionNumber: z.number(), +}); + +export type GetInlineCommentVersionDetails = z.input; diff --git a/packages/cloud/src/parameters/getInlineCommentVersions.ts b/packages/cloud/src/parameters/getInlineCommentVersions.ts new file mode 100644 index 00000000..fba9b6ff --- /dev/null +++ b/packages/cloud/src/parameters/getInlineCommentVersions.ts @@ -0,0 +1,27 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { VersionSortOrderSchema } from '../models/index.js'; + +export const GetInlineCommentVersionsSchema = z.object({ + /** The ID of the inline comment for which versions should be returned */ + id: z.number(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of versions per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: VersionSortOrderSchema.optional(), +}); + +export type GetInlineCommentVersions = z.input; diff --git a/packages/cloud/src/parameters/getInlineComments.ts b/packages/cloud/src/parameters/getInlineComments.ts new file mode 100644 index 00000000..180a94c8 --- /dev/null +++ b/packages/cloud/src/parameters/getInlineComments.ts @@ -0,0 +1,25 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { CommentSortOrderSchema } from '../models/index.js'; + +export const GetInlineCommentsSchema = z.object({ + /** + * The content format type to be returned in the `body` field of the response. If available, the representation will + * be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** Used to sort the result by a particular field. */ + sort: CommentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of footer comments per result to return. If more results exist, use the `Link` header to retrieve + * a relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetInlineComments = z.input; diff --git a/packages/cloud/src/parameters/getInlineLikeCount.ts b/packages/cloud/src/parameters/getInlineLikeCount.ts new file mode 100644 index 00000000..5510ebbb --- /dev/null +++ b/packages/cloud/src/parameters/getInlineLikeCount.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetInlineLikeCountSchema = z.object({ + /** The ID of the inline comment for which like count should be returned. */ + id: z.number(), +}); + +export type GetInlineLikeCount = z.input; diff --git a/packages/cloud/src/parameters/getInlineLikeUsers.ts b/packages/cloud/src/parameters/getInlineLikeUsers.ts new file mode 100644 index 00000000..e3877b44 --- /dev/null +++ b/packages/cloud/src/parameters/getInlineLikeUsers.ts @@ -0,0 +1,18 @@ +import { z } from 'zod'; + +export const GetInlineLikeUsersSchema = z.object({ + /** The ID of the inline comment for which like count should be returned. */ + id: z.number(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of account IDs per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetInlineLikeUsers = z.input; diff --git a/packages/cloud/src/parameters/getLabelAttachments.ts b/packages/cloud/src/parameters/getLabelAttachments.ts new file mode 100644 index 00000000..bc46e1b2 --- /dev/null +++ b/packages/cloud/src/parameters/getLabelAttachments.ts @@ -0,0 +1,21 @@ +import { z } from 'zod'; +import { AttachmentSortOrderSchema } from '../models/index.js'; + +export const GetLabelAttachmentsSchema = z.object({ + /** The ID of the label for which attachments should be returned. */ + id: z.number(), + /** Used to sort the result by a particular field. */ + sort: AttachmentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of pages per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetLabelAttachments = z.input; diff --git a/packages/cloud/src/parameters/getLabelBlogPosts.ts b/packages/cloud/src/parameters/getLabelBlogPosts.ts new file mode 100644 index 00000000..9ec81bf2 --- /dev/null +++ b/packages/cloud/src/parameters/getLabelBlogPosts.ts @@ -0,0 +1,29 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { BlogPostSortOrderSchema } from '../models/index.js'; + +export const GetLabelBlogPostsSchema = z.object({ + /** The ID of the label for which blog posts should be returned. */ + id: z.number(), + /** Filter the results based on space ids. Multiple space ids can be specified as a comma-separated list. */ + spaceId: z.array(z.number()).optional(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** Used to sort the result by a particular field. */ + sort: BlogPostSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of blog posts per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetLabelBlogPosts = z.input; diff --git a/packages/cloud/src/parameters/getLabelPages.ts b/packages/cloud/src/parameters/getLabelPages.ts new file mode 100644 index 00000000..b3dc2734 --- /dev/null +++ b/packages/cloud/src/parameters/getLabelPages.ts @@ -0,0 +1,29 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { PageSortOrderSchema } from '../models/index.js'; + +export const GetLabelPagesSchema = z.object({ + /** The ID of the label for which pages should be returned. */ + id: z.number(), + /** Filter the results based on space ids. Multiple space ids can be specified as a comma-separated list. */ + spaceId: z.array(z.number()).optional(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** Used to sort the result by a particular field. */ + sort: PageSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of pages per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetLabelPages = z.input; diff --git a/packages/cloud/src/parameters/getLabels.ts b/packages/cloud/src/parameters/getLabels.ts new file mode 100644 index 00000000..3243cc08 --- /dev/null +++ b/packages/cloud/src/parameters/getLabels.ts @@ -0,0 +1,22 @@ +import { z } from 'zod'; + +export const GetLabelsSchema = z.object({ + /** Filters on label ID. Multiple IDs can be specified as a comma-separated list. */ + labelId: z.array(z.number()).optional(), + /** Filters on label prefix. Multiple IDs can be specified as a comma-separated list. */ + prefix: z.array(z.string()).optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** Used to sort the result by a particular field. */ + sort: z.string().optional(), + /** + * Maximum number of labels per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetLabels = z.input; diff --git a/packages/cloud/src/parameters/getPageAncestors.ts b/packages/cloud/src/parameters/getPageAncestors.ts new file mode 100644 index 00000000..34f08246 --- /dev/null +++ b/packages/cloud/src/parameters/getPageAncestors.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; + +export const GetPageAncestorsSchema = z.object({ + /** The ID of the page. */ + id: z.number(), + /** + * Maximum number of pages per result to return. If more results exist, call this endpoint with the highest + * ancestor's ID to fetch the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetPageAncestors = z.input; diff --git a/packages/cloud/src/parameters/getPageAttachments.ts b/packages/cloud/src/parameters/getPageAttachments.ts new file mode 100644 index 00000000..5945853b --- /dev/null +++ b/packages/cloud/src/parameters/getPageAttachments.ts @@ -0,0 +1,27 @@ +import { z } from 'zod'; +import { AttachmentSortOrderSchema } from '../models/index.js'; + +export const GetPageAttachmentsSchema = z.object({ + /** The ID of the page for which attachments should be returned. */ + id: z.number(), + /** Used to sort the result by a particular field. */ + sort: AttachmentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** Filter the results to attachments based on their status. By default, `current` and `archived` are used. */ + status: z.array(z.enum(['current', 'archived', 'trashed'])).optional(), + /** Filters on the mediaType of attachments. Only one may be specified. */ + mediaType: z.string().optional(), + /** Filters on the file-name of attachments. Only one may be specified. */ + filename: z.string().optional(), + /** + * Maximum number of attachments per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetPageAttachments = z.input; diff --git a/packages/cloud/src/parameters/getPageById.ts b/packages/cloud/src/parameters/getPageById.ts new file mode 100644 index 00000000..b97e99bd --- /dev/null +++ b/packages/cloud/src/parameters/getPageById.ts @@ -0,0 +1,66 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSingleSchema } from '../models/index.js'; + +export const GetPageByIdSchema = z.object({ + /** The ID of the page to be returned. If you don't know the page ID, use Get pages and filter the results. */ + id: z.number(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSingleSchema.optional(), + /** Retrieve the draft version of this page. */ + getDraft: z.boolean().optional(), + /** Filter the page being retrieved by its status. */ + status: z.array(z.enum(['current', 'archived', 'trashed', 'deleted', 'historical', 'draft'])).optional(), + /** + * Allows you to retrieve a previously published version. Specify the previous version's number to retrieve its + * details. + */ + version: z.number().optional(), + /** + * Includes labels associated with this page in the response. The number of results will be limited to 50 and sorted + * in the default sort order. A `meta` and `_links` property will be present to indicate if more results are + * available and a link to retrieve the rest of the results. + */ + includeLabels: z.boolean().optional(), + /** + * Includes content properties associated with this page in the response. The number of results will be limited to + * 50 and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more + * results are available and a link to retrieve the rest of the results. + */ + includeProperties: z.boolean().optional(), + /** + * Includes operations associated with this page in the response, as defined in the `Operation` object. The number + * of results will be limited to 50 and sorted in the default sort order. A `meta` and `_links` property will be + * present to indicate if more results are available and a link to retrieve the rest of the results. + */ + includeOperations: z.boolean().optional(), + /** + * Includes likes associated with this page in the response. The number of results will be limited to 50 and sorted + * in the default sort order. A `meta` and `_links` property will be present to indicate if more results are + * available and a link to retrieve the rest of the results. + */ + includeLikes: z.boolean().optional(), + /** + * Includes versions associated with this page in the response. The number of results will be limited to 50 and + * sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more results are + * available and a link to retrieve the rest of the results. + */ + includeVersions: z.boolean().optional(), + /** + * Includes the current version associated with this page in the response. By default this is included and can be + * omitted by setting the value to `false`. + */ + includeVersion: z.boolean().optional(), + /** Includes whether this page has been favorited by the current user. */ + includeFavoritedByCurrentUserStatus: z.boolean().optional(), + /** Includes web resources that can be used to render page content on a client. */ + includeWebresources: z.boolean().optional(), + /** Includes collaborators on the page. */ + includeCollaborators: z.boolean().optional(), + /** Includes direct children of the page, as defined in the `ChildrenResponse` object. */ + includeDirectChildren: z.boolean().optional(), +}); + +export type GetPageById = z.input; diff --git a/packages/cloud/src/parameters/getPageClassificationLevel.ts b/packages/cloud/src/parameters/getPageClassificationLevel.ts new file mode 100644 index 00000000..d3ad57c6 --- /dev/null +++ b/packages/cloud/src/parameters/getPageClassificationLevel.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetPageClassificationLevelSchema = z.object({ + /** The ID of the page for which classification level should be returned. */ + id: z.number(), + /** Status of page from which classification level will fetched. */ + status: z.enum(['current', 'draft', 'archived']).optional(), +}); + +export type GetPageClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/getPageContentProperties.ts b/packages/cloud/src/parameters/getPageContentProperties.ts new file mode 100644 index 00000000..2cc280b0 --- /dev/null +++ b/packages/cloud/src/parameters/getPageContentProperties.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; +import { ContentPropertySortOrderSchema } from '../models/index.js'; + +export const GetPageContentPropertiesSchema = z.object({ + /** The ID of the page for which content properties should be returned. */ + pageId: z.number(), + /** Filters the response to return a specific content property with matching key (case sensitive). */ + key: z.string().optional(), + /** Used to sort the result by a particular field. */ + sort: ContentPropertySortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of attachments per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetPageContentProperties = z.input; diff --git a/packages/cloud/src/parameters/getPageContentPropertiesById.ts b/packages/cloud/src/parameters/getPageContentPropertiesById.ts new file mode 100644 index 00000000..ce091089 --- /dev/null +++ b/packages/cloud/src/parameters/getPageContentPropertiesById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetPageContentPropertiesByIdSchema = z.object({ + /** The ID of the page for which content properties should be returned. */ + pageId: z.number(), + /** The ID of the content property being requested. */ + propertyId: z.number(), +}); + +export type GetPageContentPropertiesById = z.input; diff --git a/packages/cloud/src/parameters/getPageDescendants.ts b/packages/cloud/src/parameters/getPageDescendants.ts new file mode 100644 index 00000000..94a61415 --- /dev/null +++ b/packages/cloud/src/parameters/getPageDescendants.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; + +export const GetPageDescendantsSchema = z.object({ + /** The ID of the page. */ + id: z.number(), + /** + * Maximum number of items per result to return. If more results exist, call the endpoint with the cursor to fetch + * the next set of results. + */ + limit: z.number().optional(), + /** + * Maximum depth of descendants to return. If more results are required, use the endpoint corresponding to the + * content type of the deepest descendant to fetch more descendants. + */ + depth: z.number().optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), +}); + +export type GetPageDescendants = z.input; diff --git a/packages/cloud/src/parameters/getPageDirectChildren.ts b/packages/cloud/src/parameters/getPageDirectChildren.ts new file mode 100644 index 00000000..21905d25 --- /dev/null +++ b/packages/cloud/src/parameters/getPageDirectChildren.ts @@ -0,0 +1,20 @@ +import { z } from 'zod'; + +export const GetPageDirectChildrenSchema = z.object({ + /** The ID of the parent page. */ + id: z.number(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of items per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: z.string().optional(), +}); + +export type GetPageDirectChildren = z.input; diff --git a/packages/cloud/src/parameters/getPageFooterComments.ts b/packages/cloud/src/parameters/getPageFooterComments.ts new file mode 100644 index 00000000..19f8cfc5 --- /dev/null +++ b/packages/cloud/src/parameters/getPageFooterComments.ts @@ -0,0 +1,29 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { CommentSortOrderSchema } from '../models/index.js'; + +export const GetPageFooterCommentsSchema = z.object({ + /** The ID of the page for which footer comments should be returned. */ + id: z.number(), + /** + * The content format type to be returned in the `body` field of the response. If available, the representation will + * be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** Filter the footer comment being retrieved by its status. */ + status: z.array(z.enum(['current', 'archived', 'trashed', 'deleted', 'historical', 'draft'])).optional(), + /** Used to sort the result by a particular field. */ + sort: CommentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of footer comments per result to return. If more results exist, use the `Link` header to retrieve + * a relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetPageFooterComments = z.input; diff --git a/packages/cloud/src/parameters/getPageInlineComments.ts b/packages/cloud/src/parameters/getPageInlineComments.ts new file mode 100644 index 00000000..74f5f2d4 --- /dev/null +++ b/packages/cloud/src/parameters/getPageInlineComments.ts @@ -0,0 +1,31 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { CommentSortOrderSchema } from '../models/index.js'; + +export const GetPageInlineCommentsSchema = z.object({ + /** The ID of the page for which inline comments should be returned. */ + id: z.number(), + /** + * The content format type to be returned in the `body` field of the response. If available, the representation will + * be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** Filter the inline comment being retrieved by its status. */ + status: z.array(z.enum(['current', 'archived', 'trashed', 'deleted', 'historical', 'draft'])).optional(), + /** Filter the inline comment being retrieved by its resolution status. */ + resolutionStatus: z.array(z.enum(['resolved', 'open', 'dangling', 'reopened'])).optional(), + /** Used to sort the result by a particular field. */ + sort: CommentSortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of inline comments per result to return. If more results exist, use the `Link` header to retrieve + * a relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetPageInlineComments = z.input; diff --git a/packages/cloud/src/parameters/getPageLabels.ts b/packages/cloud/src/parameters/getPageLabels.ts new file mode 100644 index 00000000..605fd6c5 --- /dev/null +++ b/packages/cloud/src/parameters/getPageLabels.ts @@ -0,0 +1,22 @@ +import { z } from 'zod'; + +export const GetPageLabelsSchema = z.object({ + /** The ID of the page for which labels should be returned. */ + id: z.number(), + /** Filter the results to labels based on their prefix. */ + prefix: z.enum(['my', 'team', 'global', 'system']).optional(), + /** Used to sort the result by a particular field. */ + sort: z.string().optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of labels per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetPageLabels = z.input; diff --git a/packages/cloud/src/parameters/getPageLikeCount.ts b/packages/cloud/src/parameters/getPageLikeCount.ts new file mode 100644 index 00000000..7b87b7b2 --- /dev/null +++ b/packages/cloud/src/parameters/getPageLikeCount.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetPageLikeCountSchema = z.object({ + /** The ID of the page for which like count should be returned. */ + id: z.number(), +}); + +export type GetPageLikeCount = z.input; diff --git a/packages/cloud/src/parameters/getPageLikeUsers.ts b/packages/cloud/src/parameters/getPageLikeUsers.ts new file mode 100644 index 00000000..c055c496 --- /dev/null +++ b/packages/cloud/src/parameters/getPageLikeUsers.ts @@ -0,0 +1,18 @@ +import { z } from 'zod'; + +export const GetPageLikeUsersSchema = z.object({ + /** The ID of the page for which like count should be returned. */ + id: z.number(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of account IDs per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetPageLikeUsers = z.input; diff --git a/packages/cloud/src/parameters/getPageOperations.ts b/packages/cloud/src/parameters/getPageOperations.ts new file mode 100644 index 00000000..bb6e35fc --- /dev/null +++ b/packages/cloud/src/parameters/getPageOperations.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetPageOperationsSchema = z.object({ + /** The ID of the page for which operations should be returned. */ + id: z.number(), +}); + +export type GetPageOperations = z.input; diff --git a/packages/cloud/src/parameters/getPageVersionDetails.ts b/packages/cloud/src/parameters/getPageVersionDetails.ts new file mode 100644 index 00000000..768162da --- /dev/null +++ b/packages/cloud/src/parameters/getPageVersionDetails.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetPageVersionDetailsSchema = z.object({ + /** The ID of the page for which version details should be returned. */ + pageId: z.number(), + /** The version number of the page to be returned. */ + versionNumber: z.number(), +}); + +export type GetPageVersionDetails = z.input; diff --git a/packages/cloud/src/parameters/getPageVersions.ts b/packages/cloud/src/parameters/getPageVersions.ts new file mode 100644 index 00000000..5ae4cac8 --- /dev/null +++ b/packages/cloud/src/parameters/getPageVersions.ts @@ -0,0 +1,30 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; +import { VersionSortOrderSchema } from '../models/index.js'; + +export const GetPageVersionsSchema = z.object({ + /** + * The ID of the page to be queried for its versions. If you don't know the page ID, use Get pages and filter the + * results. + */ + id: z.number(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of versions per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: VersionSortOrderSchema.optional(), +}); + +export type GetPageVersions = z.input; diff --git a/packages/cloud/src/parameters/getPages.ts b/packages/cloud/src/parameters/getPages.ts new file mode 100644 index 00000000..f01a021f --- /dev/null +++ b/packages/cloud/src/parameters/getPages.ts @@ -0,0 +1,35 @@ +import { z } from 'zod'; +import { PageSortOrderSchema } from '../models/index.js'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; + +export const GetPagesSchema = z.object({ + /** Filter the results based on page ids. Multiple page ids can be specified as a comma-separated list. */ + id: z.array(z.number()).optional(), + /** Filter the results based on space ids. Multiple space ids can be specified as a comma-separated list. */ + spaceId: z.array(z.number()).optional(), + /** Used to sort the result by a particular field. */ + sort: PageSortOrderSchema.optional(), + /** Filter the results to pages based on their status. By default, `current` and `archived` are used. */ + status: z.array(z.enum(['current', 'archived', 'deleted', 'trashed'])).optional(), + /** Filter the results to pages based on their title. */ + title: z.string().optional(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** Filter the results to pages based on their subtype. */ + subtype: z.enum(['live', 'page']).optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of pages per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetPages = z.input; diff --git a/packages/cloud/src/parameters/getPagesInSpace.ts b/packages/cloud/src/parameters/getPagesInSpace.ts new file mode 100644 index 00000000..91c14cf6 --- /dev/null +++ b/packages/cloud/src/parameters/getPagesInSpace.ts @@ -0,0 +1,33 @@ +import { z } from 'zod'; +import { PageSortOrderSchema } from '../models/index.js'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; + +export const GetPagesInSpaceSchema = z.object({ + /** The ID of the space for which pages should be returned. */ + id: z.number(), + /** Filter the results to pages at the root level of the space or to all pages in the space. */ + depth: z.enum(['all', 'root']).optional(), + /** Used to sort the result by a particular field. */ + sort: PageSortOrderSchema.optional(), + /** Filter the results to pages based on their status. By default, `current` and `archived` are used. */ + status: z.array(z.enum(['current', 'archived', 'deleted', 'trashed'])).optional(), + /** Filter the results to pages based on their title. */ + title: z.string().optional(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of pages per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetPagesInSpace = z.input; diff --git a/packages/cloud/src/parameters/getSmartLinkAncestors.ts b/packages/cloud/src/parameters/getSmartLinkAncestors.ts new file mode 100644 index 00000000..e2c95a47 --- /dev/null +++ b/packages/cloud/src/parameters/getSmartLinkAncestors.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; + +export const GetSmartLinkAncestorsSchema = z.object({ + /** The ID of the Smart Link in the content tree. */ + id: z.number(), + /** + * Maximum number of items per result to return. If more results exist, call the endpoint with the highest + * ancestor's ID to fetch the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetSmartLinkAncestors = z.input; diff --git a/packages/cloud/src/parameters/getSmartLinkById.ts b/packages/cloud/src/parameters/getSmartLinkById.ts new file mode 100644 index 00000000..00f79eaf --- /dev/null +++ b/packages/cloud/src/parameters/getSmartLinkById.ts @@ -0,0 +1,24 @@ +import { z } from 'zod'; + +export const GetSmartLinkByIdSchema = z.object({ + /** The ID of the Smart Link in the content tree to be returned. */ + id: z.number(), + /** Includes collaborators on the Smart Link. */ + includeCollaborators: z.boolean().optional(), + /** Includes direct children of the Smart Link, as defined in the `ChildrenResponse` object. */ + includeDirectChildren: z.boolean().optional(), + /** + * Includes operations associated with this Smart Link in the response, as defined in the `Operation` object. The + * number of results will be limited to 50 and sorted in the default sort order. A `meta` and `_links` property will + * be present to indicate if more results are available and a link to retrieve the rest of the results. + */ + includeOperations: z.boolean().optional(), + /** + * Includes content properties associated with this Smart Link in the response. The number of results will be + * limited to 50 and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if + * more results are available and a link to retrieve the rest of the results. + */ + includeProperties: z.boolean().optional(), +}); + +export type GetSmartLinkById = z.input; diff --git a/packages/cloud/src/parameters/getSmartLinkContentProperties.ts b/packages/cloud/src/parameters/getSmartLinkContentProperties.ts new file mode 100644 index 00000000..eab227cd --- /dev/null +++ b/packages/cloud/src/parameters/getSmartLinkContentProperties.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; +import { ContentPropertySortOrderSchema } from '../models/index.js'; + +export const GetSmartLinkContentPropertiesSchema = z.object({ + /** The ID of the Smart Link in the content tree for which content properties should be returned. */ + id: z.number(), + /** Filters the response to return a specific content property with matching key (case sensitive). */ + key: z.string().optional(), + /** Used to sort the result by a particular field. */ + sort: ContentPropertySortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of Smart Links per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetSmartLinkContentProperties = z.input; diff --git a/packages/cloud/src/parameters/getSmartLinkContentPropertiesById.ts b/packages/cloud/src/parameters/getSmartLinkContentPropertiesById.ts new file mode 100644 index 00000000..d23aa681 --- /dev/null +++ b/packages/cloud/src/parameters/getSmartLinkContentPropertiesById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetSmartLinkContentPropertiesByIdSchema = z.object({ + /** The ID of the Smart Link in the content tree for which content properties should be returned. */ + embedId: z.number(), + /** The ID of the content property being requested. */ + propertyId: z.number(), +}); + +export type GetSmartLinkContentPropertiesById = z.input; diff --git a/packages/cloud/src/parameters/getSmartLinkDescendants.ts b/packages/cloud/src/parameters/getSmartLinkDescendants.ts new file mode 100644 index 00000000..2af23a19 --- /dev/null +++ b/packages/cloud/src/parameters/getSmartLinkDescendants.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; + +export const GetSmartLinkDescendantsSchema = z.object({ + /** The ID of the smart link. */ + id: z.number(), + /** + * Maximum number of items per result to return. If more results exist, call the endpoint with the cursor to fetch + * the next set of results. + */ + limit: z.number().optional(), + /** + * Maximum depth of descendants to return. If more results are required, use the endpoint corresponding to the + * content type of the deepest descendant to fetch more descendants. + */ + depth: z.number().optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), +}); + +export type GetSmartLinkDescendants = z.input; diff --git a/packages/cloud/src/parameters/getSmartLinkDirectChildren.ts b/packages/cloud/src/parameters/getSmartLinkDirectChildren.ts new file mode 100644 index 00000000..aaa1587a --- /dev/null +++ b/packages/cloud/src/parameters/getSmartLinkDirectChildren.ts @@ -0,0 +1,20 @@ +import { z } from 'zod'; + +export const GetSmartLinkDirectChildrenSchema = z.object({ + /** The ID of the parent smart link. */ + id: z.number(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of items per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: z.string().optional(), +}); + +export type GetSmartLinkDirectChildren = z.input; diff --git a/packages/cloud/src/parameters/getSmartLinkOperations.ts b/packages/cloud/src/parameters/getSmartLinkOperations.ts new file mode 100644 index 00000000..53b360f8 --- /dev/null +++ b/packages/cloud/src/parameters/getSmartLinkOperations.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetSmartLinkOperationsSchema = z.object({ + /** The ID of the Smart Link in the content tree for which operations should be returned. */ + id: z.number(), +}); + +export type GetSmartLinkOperations = z.input; diff --git a/packages/cloud/src/parameters/getSpaceById.ts b/packages/cloud/src/parameters/getSpaceById.ts new file mode 100644 index 00000000..4a1abdcb --- /dev/null +++ b/packages/cloud/src/parameters/getSpaceById.ts @@ -0,0 +1,47 @@ +import { z } from 'zod'; +import { SpaceDescriptionBodyRepresentationSchema } from '../models/index.js'; + +export const GetSpaceByIdSchema = z.object({ + /** The ID of the space to be returned. */ + id: z.number(), + /** + * The content format type to be returned in the `description` field of the response. If available, the + * representation will be available under a response field of the same name under the `description` field. + */ + descriptionFormat: SpaceDescriptionBodyRepresentationSchema.optional(), + /** If the icon for the space should be fetched or not. */ + includeIcon: z.boolean().optional(), + /** + * Includes operations associated with this space in the response, as defined in the `Operation` object. The number + * of results will be limited to 50 and sorted in the default sort order. A `meta` and `_links` property will be + * present to indicate if more results are available and a link to retrieve the rest of the results. + */ + includeOperations: z.boolean().optional(), + /** + * Includes space properties associated with this space in the response. The number of results will be limited to 50 + * and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more results + * are available and a link to retrieve the rest of the results. + */ + includeProperties: z.boolean().optional(), + /** + * Includes space permissions associated with this space in the response. The number of results will be limited to + * 50 and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more + * results are available and a link to retrieve the rest of the results. + */ + includePermissions: z.boolean().optional(), + /** + * Includes role assignments associated with this space in the response. This parameter is only accepted for EAP + * sites. The number of results will be limited to 50 and sorted in the default sort order. A `meta` and `_links` + * property will be present to indicate if more results are available and a link to retrieve the rest of the + * results. + */ + includeRoleAssignments: z.boolean().optional(), + /** + * Includes labels associated with this space in the response. The number of results will be limited to 50 and + * sorted in the default sort order. A `meta` and `_links` property will be present to indicate if more results are + * available and a link to retrieve the rest of the results. + */ + includeLabels: z.boolean().optional(), +}); + +export type GetSpaceById = z.input; diff --git a/packages/cloud/src/parameters/getSpaceContentLabels.ts b/packages/cloud/src/parameters/getSpaceContentLabels.ts new file mode 100644 index 00000000..b2d9dea2 --- /dev/null +++ b/packages/cloud/src/parameters/getSpaceContentLabels.ts @@ -0,0 +1,22 @@ +import { z } from 'zod'; + +export const GetSpaceContentLabelsSchema = z.object({ + /** The ID of the space for which labels should be returned. */ + id: z.number(), + /** Filter the results to labels based on their prefix. */ + prefix: z.enum(['my', 'team']).optional(), + /** Used to sort the result by a particular field. */ + sort: z.string().optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of labels per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetSpaceContentLabels = z.input; diff --git a/packages/cloud/src/parameters/getSpaceDefaultClassificationLevel.ts b/packages/cloud/src/parameters/getSpaceDefaultClassificationLevel.ts new file mode 100644 index 00000000..ebbf8dd2 --- /dev/null +++ b/packages/cloud/src/parameters/getSpaceDefaultClassificationLevel.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetSpaceDefaultClassificationLevelSchema = z.object({ + /** The ID of the space for which default classification level should be returned. */ + id: z.number(), +}); + +export type GetSpaceDefaultClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/getSpaceLabels.ts b/packages/cloud/src/parameters/getSpaceLabels.ts new file mode 100644 index 00000000..14ac9cc1 --- /dev/null +++ b/packages/cloud/src/parameters/getSpaceLabels.ts @@ -0,0 +1,22 @@ +import { z } from 'zod'; + +export const GetSpaceLabelsSchema = z.object({ + /** The ID of the space for which labels should be returned. */ + id: z.number(), + /** Filter the results to labels based on their prefix. */ + prefix: z.enum(['my', 'team']).optional(), + /** Used to sort the result by a particular field. */ + sort: z.string().optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of labels per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetSpaceLabels = z.input; diff --git a/packages/cloud/src/parameters/getSpaceOperations.ts b/packages/cloud/src/parameters/getSpaceOperations.ts new file mode 100644 index 00000000..5d3517b0 --- /dev/null +++ b/packages/cloud/src/parameters/getSpaceOperations.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetSpaceOperationsSchema = z.object({ + /** The ID of the space for which operations should be returned. */ + id: z.number(), +}); + +export type GetSpaceOperations = z.input; diff --git a/packages/cloud/src/parameters/getSpacePermissionTransitionTaskStatus.ts b/packages/cloud/src/parameters/getSpacePermissionTransitionTaskStatus.ts new file mode 100644 index 00000000..2e71e84b --- /dev/null +++ b/packages/cloud/src/parameters/getSpacePermissionTransitionTaskStatus.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetSpacePermissionTransitionTaskStatusSchema = z.object({ + /** The ID of the async task, as returned by the generate-combinations, assign-roles, or remove-access endpoints. */ + taskId: z.string(), +}); + +export type GetSpacePermissionTransitionTaskStatus = z.input; diff --git a/packages/cloud/src/parameters/getSpacePermissionsAssignments.ts b/packages/cloud/src/parameters/getSpacePermissionsAssignments.ts new file mode 100644 index 00000000..038d811c --- /dev/null +++ b/packages/cloud/src/parameters/getSpacePermissionsAssignments.ts @@ -0,0 +1,18 @@ +import { z } from 'zod'; + +export const GetSpacePermissionsAssignmentsSchema = z.object({ + /** The ID of the space to be returned. */ + id: z.number(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of assignments to return. If more results exist, use the `Link` response header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetSpacePermissionsAssignments = z.input; diff --git a/packages/cloud/src/parameters/getSpaceProperties.ts b/packages/cloud/src/parameters/getSpaceProperties.ts new file mode 100644 index 00000000..6439ad1f --- /dev/null +++ b/packages/cloud/src/parameters/getSpaceProperties.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; + +export const GetSpacePropertiesSchema = z.object({ + /** The ID of the space for which space properties should be returned. */ + spaceId: z.number(), + /** + * The key of the space property to retrieve. This should be used when a user knows the key of their property, but + * needs to retrieve the id for use in other methods. + */ + key: z.string().optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of pages per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetSpaceProperties = z.input; diff --git a/packages/cloud/src/parameters/getSpacePropertyById.ts b/packages/cloud/src/parameters/getSpacePropertyById.ts new file mode 100644 index 00000000..6edee726 --- /dev/null +++ b/packages/cloud/src/parameters/getSpacePropertyById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetSpacePropertyByIdSchema = z.object({ + /** The ID of the space the property belongs to. */ + spaceId: z.number(), + /** The ID of the property to be retrieved. */ + propertyId: z.number(), +}); + +export type GetSpacePropertyById = z.input; diff --git a/packages/cloud/src/parameters/getSpaceRoleAssignments.ts b/packages/cloud/src/parameters/getSpaceRoleAssignments.ts new file mode 100644 index 00000000..6e458efa --- /dev/null +++ b/packages/cloud/src/parameters/getSpaceRoleAssignments.ts @@ -0,0 +1,34 @@ +import { z } from 'zod'; +import { PrincipalTypeSchema } from '../models/index.js'; + +export const GetSpaceRoleAssignmentsSchema = z.object({ + /** The ID of the space for which to retrieve assignments. */ + id: z.number(), + /** Filters the returned role assignments to the provided role ID. */ + roleId: z.string().optional(), + /** Filters the returned role assignments to the provided role type. */ + roleType: z.string().optional(), + /** + * Filters the returned role assignments to the provided principal id. If specified, a principal-type must also be + * specified. Paired with a `principal-type` of `ACCESS_CLASS`, valid values include [`anonymous-users`, + * `jsm-project-admins`, `authenticated-users`, `all-licensed-users`, `all-product-admins`] + */ + principalId: z.string().optional(), + /** + * Filters the returned role assignments to the provided principal type. If specified, a principal-id must also be + * specified. + */ + principalType: PrincipalTypeSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of space roles to return. If more results exist, use the `Link` response header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetSpaceRoleAssignments = z.input; diff --git a/packages/cloud/src/parameters/getSpaceRolesById.ts b/packages/cloud/src/parameters/getSpaceRolesById.ts new file mode 100644 index 00000000..70f8341d --- /dev/null +++ b/packages/cloud/src/parameters/getSpaceRolesById.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetSpaceRolesByIdSchema = z.object({ + /** The ID of the space role to retrieve. */ + id: z.string(), +}); + +export type GetSpaceRolesById = z.input; diff --git a/packages/cloud/src/parameters/getSpaces.ts b/packages/cloud/src/parameters/getSpaces.ts new file mode 100644 index 00000000..9830e643 --- /dev/null +++ b/packages/cloud/src/parameters/getSpaces.ts @@ -0,0 +1,43 @@ +import { z } from 'zod'; +import { SpaceSortOrderSchema } from '../models/index.js'; +import { SpaceDescriptionBodyRepresentationSchema } from '../models/index.js'; + +export const GetSpacesSchema = z.object({ + /** Filter the results to spaces based on their IDs. Multiple IDs can be specified as a comma-separated list. */ + ids: z.array(z.number()).optional(), + /** Filter the results to spaces based on their keys. Multiple keys can be specified as a comma-separated list. */ + keys: z.array(z.string()).optional(), + /** Filter the results to spaces based on their type. */ + type: z + .enum(['global', 'collaboration', 'knowledge_base', 'personal', 'system', 'onboarding', 'xflow_sample_space']) + .optional(), + /** Filter the results to spaces based on their status. */ + status: z.enum(['current', 'archived']).optional(), + /** Filter the results to spaces based on their labels. Multiple labels can be specified as a comma-separated list. */ + labels: z.array(z.string()).optional(), + /** Filter the results to spaces favorited by the user with the specified account ID. */ + favoritedBy: z.string().optional(), + /** Filter the results to spaces NOT favorited by the user with the specified account ID. */ + notFavoritedBy: z.string().optional(), + /** Used to sort the result by a particular field. */ + sort: SpaceSortOrderSchema.optional(), + /** + * The content format type to be returned in the `description` field of the response. If available, the + * representation will be available under a response field of the same name under the `description` field. + */ + descriptionFormat: SpaceDescriptionBodyRepresentationSchema.optional(), + /** If the icon for the space should be fetched or not. */ + includeIcon: z.boolean().optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of spaces per result to return. If more results exist, use the `Link` response header to retrieve + * a relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetSpaces = z.input; diff --git a/packages/cloud/src/parameters/getTaskById.ts b/packages/cloud/src/parameters/getTaskById.ts new file mode 100644 index 00000000..c906b7a7 --- /dev/null +++ b/packages/cloud/src/parameters/getTaskById.ts @@ -0,0 +1,14 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; + +export const GetTaskByIdSchema = z.object({ + /** The ID of the task to be returned. If you don't know the task ID, use Get tasks and filter the results. */ + id: z.number(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), +}); + +export type GetTaskById = z.input; diff --git a/packages/cloud/src/parameters/getTasks.ts b/packages/cloud/src/parameters/getTasks.ts new file mode 100644 index 00000000..9334b15b --- /dev/null +++ b/packages/cloud/src/parameters/getTasks.ts @@ -0,0 +1,70 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; + +export const GetTasksSchema = z.object({ + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + /** Specifies whether to include blank tasks in the response. Defaults to `true`. */ + includeBlankTasks: z.boolean().optional(), + /** Filters on the status of the task. */ + status: z.enum(['complete', 'incomplete']).optional(), + /** Filters on task ID. Multiple IDs can be specified. */ + taskId: z.array(z.number()).optional(), + /** Filters on the space ID of the task. Multiple IDs can be specified. */ + spaceId: z.array(z.number()).optional(), + /** + * Filters on the page ID of the task. Multiple IDs can be specified. Note - page and blog post filters can be used + * in conjunction. + */ + pageId: z.array(z.number()).optional(), + /** + * Filters on the blog post ID of the task. Multiple IDs can be specified. Note - page and blog post filters can be + * used in conjunction. + */ + blogpostId: z.array(z.number()).optional(), + /** Filters on the Account ID of the user who created this task. Multiple IDs can be specified. */ + createdBy: z.array(z.string()).optional(), + /** Filters on the Account ID of the user to whom this task is assigned. Multiple IDs can be specified. */ + assignedTo: z.array(z.string()).optional(), + /** Filters on the Account ID of the user who completed this task. Multiple IDs can be specified. */ + completedBy: z.array(z.string()).optional(), + /** + * Filters on start of date-time range of task based on creation date (inclusive). Input is epoch time in + * milliseconds. + */ + createdAtFrom: z.number().optional(), + /** + * Filters on end of date-time range of task based on creation date (inclusive). Input is epoch time in + * milliseconds. + */ + createdAtTo: z.number().optional(), + /** Filters on start of date-time range of task based on due date (inclusive). Input is epoch time in milliseconds. */ + dueAtFrom: z.number().optional(), + /** Filters on end of date-time range of task based on due date (inclusive). Input is epoch time in milliseconds. */ + dueAtTo: z.number().optional(), + /** + * Filters on start of date-time range of task based on completion date (inclusive). Input is epoch time in + * milliseconds. + */ + completedAtFrom: z.number().optional(), + /** + * Filters on end of date-time range of task based on completion date (inclusive). Input is epoch time in + * milliseconds. + */ + completedAtTo: z.number().optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of tasks per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetTasks = z.input; diff --git a/packages/cloud/src/parameters/getWhiteboardAncestors.ts b/packages/cloud/src/parameters/getWhiteboardAncestors.ts new file mode 100644 index 00000000..416b3e8e --- /dev/null +++ b/packages/cloud/src/parameters/getWhiteboardAncestors.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; + +export const GetWhiteboardAncestorsSchema = z.object({ + /** The ID of the whiteboard. */ + id: z.number(), + /** + * Maximum number of items per result to return. If more results exist, call the endpoint with the highest + * ancestor's ID to fetch the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetWhiteboardAncestors = z.input; diff --git a/packages/cloud/src/parameters/getWhiteboardById.ts b/packages/cloud/src/parameters/getWhiteboardById.ts new file mode 100644 index 00000000..d2bd7017 --- /dev/null +++ b/packages/cloud/src/parameters/getWhiteboardById.ts @@ -0,0 +1,24 @@ +import { z } from 'zod'; + +export const GetWhiteboardByIdSchema = z.object({ + /** The ID of the whiteboard to be returned */ + id: z.number(), + /** Includes collaborators on the whiteboard. */ + includeCollaborators: z.boolean().optional(), + /** Includes direct children of the whiteboard, as defined in the `ChildrenResponse` object. */ + includeDirectChildren: z.boolean().optional(), + /** + * Includes operations associated with this whiteboard in the response, as defined in the `Operation` object. The + * number of results will be limited to 50 and sorted in the default sort order. A `meta` and `_links` property will + * be present to indicate if more results are available and a link to retrieve the rest of the results. + */ + includeOperations: z.boolean().optional(), + /** + * Includes content properties associated with this whiteboard in the response. The number of results will be + * limited to 50 and sorted in the default sort order. A `meta` and `_links` property will be present to indicate if + * more results are available and a link to retrieve the rest of the results. + */ + includeProperties: z.boolean().optional(), +}); + +export type GetWhiteboardById = z.input; diff --git a/packages/cloud/src/parameters/getWhiteboardClassificationLevel.ts b/packages/cloud/src/parameters/getWhiteboardClassificationLevel.ts new file mode 100644 index 00000000..d3c520a3 --- /dev/null +++ b/packages/cloud/src/parameters/getWhiteboardClassificationLevel.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetWhiteboardClassificationLevelSchema = z.object({ + /** The ID of the whiteboard for which classification level should be returned. */ + id: z.number(), +}); + +export type GetWhiteboardClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/getWhiteboardContentProperties.ts b/packages/cloud/src/parameters/getWhiteboardContentProperties.ts new file mode 100644 index 00000000..47f14b84 --- /dev/null +++ b/packages/cloud/src/parameters/getWhiteboardContentProperties.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; +import { ContentPropertySortOrderSchema } from '../models/index.js'; + +export const GetWhiteboardContentPropertiesSchema = z.object({ + /** The ID of the whiteboard for which content properties should be returned. */ + id: z.number(), + /** Filters the response to return a specific content property with matching key (case sensitive). */ + key: z.string().optional(), + /** Used to sort the result by a particular field. */ + sort: ContentPropertySortOrderSchema.optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of attachments per result to return. If more results exist, use the `Link` header to retrieve a + * relative URL that will return the next set of results. + */ + limit: z.number().optional(), +}); + +export type GetWhiteboardContentProperties = z.input; diff --git a/packages/cloud/src/parameters/getWhiteboardContentPropertiesById.ts b/packages/cloud/src/parameters/getWhiteboardContentPropertiesById.ts new file mode 100644 index 00000000..e826100e --- /dev/null +++ b/packages/cloud/src/parameters/getWhiteboardContentPropertiesById.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const GetWhiteboardContentPropertiesByIdSchema = z.object({ + /** The ID of the whiteboard for which content properties should be returned. */ + whiteboardId: z.number(), + /** The ID of the content property being requested. */ + propertyId: z.number(), +}); + +export type GetWhiteboardContentPropertiesById = z.input; diff --git a/packages/cloud/src/parameters/getWhiteboardDescendants.ts b/packages/cloud/src/parameters/getWhiteboardDescendants.ts new file mode 100644 index 00000000..30a41825 --- /dev/null +++ b/packages/cloud/src/parameters/getWhiteboardDescendants.ts @@ -0,0 +1,23 @@ +import { z } from 'zod'; + +export const GetWhiteboardDescendantsSchema = z.object({ + /** The ID of the whiteboard. */ + id: z.number(), + /** + * Maximum number of items per result to return. If more results exist, call the endpoint with the cursor to fetch + * the next set of results. + */ + limit: z.number().optional(), + /** + * Maximum depth of descendants to return. If more results are required, use the endpoint corresponding to the + * content type of the deepest descendant to fetch more descendants. + */ + depth: z.number().optional(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), +}); + +export type GetWhiteboardDescendants = z.input; diff --git a/packages/cloud/src/parameters/getWhiteboardDirectChildren.ts b/packages/cloud/src/parameters/getWhiteboardDirectChildren.ts new file mode 100644 index 00000000..0806ea1d --- /dev/null +++ b/packages/cloud/src/parameters/getWhiteboardDirectChildren.ts @@ -0,0 +1,20 @@ +import { z } from 'zod'; + +export const GetWhiteboardDirectChildrenSchema = z.object({ + /** The ID of the parent whiteboard. */ + id: z.number(), + /** + * Used for pagination, this opaque cursor will be returned in the `next` URL in the `Link` response header. Use the + * relative URL in the `Link` header to retrieve the `next` set of results. + */ + cursor: z.string().optional(), + /** + * Maximum number of items per result to return. If more results exist, use the `Link` header to retrieve a relative + * URL that will return the next set of results. + */ + limit: z.number().optional(), + /** Used to sort the result by a particular field. */ + sort: z.string().optional(), +}); + +export type GetWhiteboardDirectChildren = z.input; diff --git a/packages/cloud/src/parameters/getWhiteboardOperations.ts b/packages/cloud/src/parameters/getWhiteboardOperations.ts new file mode 100644 index 00000000..d006512b --- /dev/null +++ b/packages/cloud/src/parameters/getWhiteboardOperations.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; + +export const GetWhiteboardOperationsSchema = z.object({ + /** The ID of the whiteboard for which operations should be returned. */ + id: z.number(), +}); + +export type GetWhiteboardOperations = z.input; diff --git a/packages/cloud/src/parameters/index.ts b/packages/cloud/src/parameters/index.ts new file mode 100644 index 00000000..615a1e35 --- /dev/null +++ b/packages/cloud/src/parameters/index.ts @@ -0,0 +1,423 @@ +export * from './bulkAssignSpacePermissionRoles.js'; + +export * from './bulkRemoveSpacePermissionAccess.js'; + +export * from './checkAccessByEmail.js'; + +export * from './convertContentIdsToContentTypes.js'; + +export * from './createAttachmentProperty.js'; + +export * from './createBlogPost.js'; + +export * from './createBlogpostProperty.js'; + +export * from './createBulkUserLookup.js'; + +export * from './createCommentProperty.js'; + +export * from './createCustomContent.js'; + +export * from './createCustomContentProperty.js'; + +export * from './createDatabase.js'; + +export * from './createDatabaseProperty.js'; + +export * from './createFolder.js'; + +export * from './createFolderProperty.js'; + +export * from './createFooterComment.js'; + +export * from './createInlineComment.js'; + +export * from './createPage.js'; + +export * from './createPageProperty.js'; + +export * from './createSmartLink.js'; + +export * from './createSmartLinkProperty.js'; + +export * from './createSpace.js'; + +export * from './createSpaceProperty.js'; + +export * from './createSpaceRole.js'; + +export * from './createWhiteboard.js'; + +export * from './createWhiteboardProperty.js'; + +export * from './deleteAttachment.js'; + +export * from './deleteAttachmentPropertyById.js'; + +export * from './deleteBlogPost.js'; + +export * from './deleteBlogpostPropertyById.js'; + +export * from './deleteCommentPropertyById.js'; + +export * from './deleteCustomContent.js'; + +export * from './deleteCustomContentPropertyById.js'; + +export * from './deleteDatabase.js'; + +export * from './deleteDatabasePropertyById.js'; + +export * from './deleteFolder.js'; + +export * from './deleteFolderPropertyById.js'; + +export * from './deleteFooterComment.js'; + +export * from './deleteForgeAppProperty.js'; + +export * from './deleteInlineComment.js'; + +export * from './deletePage.js'; + +export * from './deletePagePropertyById.js'; + +export * from './deleteSmartLink.js'; + +export * from './deleteSmartLinkPropertyById.js'; + +export * from './deleteSpaceDefaultClassificationLevel.js'; + +export * from './deleteSpacePropertyById.js'; + +export * from './deleteSpaceRole.js'; + +export * from './deleteWhiteboard.js'; + +export * from './deleteWhiteboardPropertyById.js'; + +export * from './enableAdminKey.js'; + +export * from './getAttachmentById.js'; + +export * from './getAttachmentComments.js'; + +export * from './getAttachmentContentProperties.js'; + +export * from './getAttachmentContentPropertiesById.js'; + +export * from './getAttachmentLabels.js'; + +export * from './getAttachmentOperations.js'; + +export * from './getAttachmentThumbnailById.js'; + +export * from './getAttachmentVersionDetails.js'; + +export * from './getAttachmentVersions.js'; + +export * from './getAttachments.js'; + +export * from './getAvailableSpacePermissions.js'; + +export * from './getAvailableSpaceRoles.js'; + +export * from './getBlogPostById.js'; + +export * from './getBlogPostClassificationLevel.js'; + +export * from './getBlogPostFooterComments.js'; + +export * from './getBlogPostInlineComments.js'; + +export * from './getBlogPostLabels.js'; + +export * from './getBlogPostLikeCount.js'; + +export * from './getBlogPostLikeUsers.js'; + +export * from './getBlogPostOperations.js'; + +export * from './getBlogPostVersionDetails.js'; + +export * from './getBlogPostVersions.js'; + +export * from './getBlogPosts.js'; + +export * from './getBlogPostsInSpace.js'; + +export * from './getBlogpostAttachments.js'; + +export * from './getBlogpostContentProperties.js'; + +export * from './getBlogpostContentPropertiesById.js'; + +export * from './getChildCustomContent.js'; + +export * from './getChildPages.js'; + +export * from './getCommentContentProperties.js'; + +export * from './getCommentContentPropertiesById.js'; + +export * from './getCustomContentAttachments.js'; + +export * from './getCustomContentById.js'; + +export * from './getCustomContentByType.js'; + +export * from './getCustomContentByTypeInBlogPost.js'; + +export * from './getCustomContentByTypeInPage.js'; + +export * from './getCustomContentByTypeInSpace.js'; + +export * from './getCustomContentComments.js'; + +export * from './getCustomContentContentProperties.js'; + +export * from './getCustomContentContentPropertiesById.js'; + +export * from './getCustomContentLabels.js'; + +export * from './getCustomContentOperations.js'; + +export * from './getCustomContentVersionDetails.js'; + +export * from './getCustomContentVersions.js'; + +export * from './getDataPolicySpaces.js'; + +export * from './getDatabaseAncestors.js'; + +export * from './getDatabaseById.js'; + +export * from './getDatabaseClassificationLevel.js'; + +export * from './getDatabaseContentProperties.js'; + +export * from './getDatabaseContentPropertiesById.js'; + +export * from './getDatabaseDescendants.js'; + +export * from './getDatabaseDirectChildren.js'; + +export * from './getDatabaseOperations.js'; + +export * from './getFolderAncestors.js'; + +export * from './getFolderById.js'; + +export * from './getFolderContentProperties.js'; + +export * from './getFolderContentPropertiesById.js'; + +export * from './getFolderDescendants.js'; + +export * from './getFolderDirectChildren.js'; + +export * from './getFolderOperations.js'; + +export * from './getFooterCommentById.js'; + +export * from './getFooterCommentChildren.js'; + +export * from './getFooterCommentOperations.js'; + +export * from './getFooterCommentVersionDetails.js'; + +export * from './getFooterCommentVersions.js'; + +export * from './getFooterComments.js'; + +export * from './getFooterLikeCount.js'; + +export * from './getFooterLikeUsers.js'; + +export * from './getForgeAppProperties.js'; + +export * from './getForgeAppProperty.js'; + +export * from './getInlineCommentById.js'; + +export * from './getInlineCommentChildren.js'; + +export * from './getInlineCommentOperations.js'; + +export * from './getInlineCommentVersionDetails.js'; + +export * from './getInlineCommentVersions.js'; + +export * from './getInlineComments.js'; + +export * from './getInlineLikeCount.js'; + +export * from './getInlineLikeUsers.js'; + +export * from './getLabelAttachments.js'; + +export * from './getLabelBlogPosts.js'; + +export * from './getLabelPages.js'; + +export * from './getLabels.js'; + +export * from './getPageAncestors.js'; + +export * from './getPageAttachments.js'; + +export * from './getPageById.js'; + +export * from './getPageClassificationLevel.js'; + +export * from './getPageContentProperties.js'; + +export * from './getPageContentPropertiesById.js'; + +export * from './getPageDescendants.js'; + +export * from './getPageDirectChildren.js'; + +export * from './getPageFooterComments.js'; + +export * from './getPageInlineComments.js'; + +export * from './getPageLabels.js'; + +export * from './getPageLikeCount.js'; + +export * from './getPageLikeUsers.js'; + +export * from './getPageOperations.js'; + +export * from './getPageVersionDetails.js'; + +export * from './getPageVersions.js'; + +export * from './getPages.js'; + +export * from './getPagesInSpace.js'; + +export * from './getSmartLinkAncestors.js'; + +export * from './getSmartLinkById.js'; + +export * from './getSmartLinkContentProperties.js'; + +export * from './getSmartLinkContentPropertiesById.js'; + +export * from './getSmartLinkDescendants.js'; + +export * from './getSmartLinkDirectChildren.js'; + +export * from './getSmartLinkOperations.js'; + +export * from './getSpaceById.js'; + +export * from './getSpaceContentLabels.js'; + +export * from './getSpaceDefaultClassificationLevel.js'; + +export * from './getSpaceLabels.js'; + +export * from './getSpaceOperations.js'; + +export * from './getSpacePermissionTransitionTaskStatus.js'; + +export * from './getSpacePermissionsAssignments.js'; + +export * from './getSpaceProperties.js'; + +export * from './getSpacePropertyById.js'; + +export * from './getSpaceRoleAssignments.js'; + +export * from './getSpaceRolesById.js'; + +export * from './getSpaces.js'; + +export * from './getTaskById.js'; + +export * from './getTasks.js'; + +export * from './getWhiteboardAncestors.js'; + +export * from './getWhiteboardById.js'; + +export * from './getWhiteboardClassificationLevel.js'; + +export * from './getWhiteboardContentProperties.js'; + +export * from './getWhiteboardContentPropertiesById.js'; + +export * from './getWhiteboardDescendants.js'; + +export * from './getWhiteboardDirectChildren.js'; + +export * from './getWhiteboardOperations.js'; + +export * from './inviteByEmail.js'; + +export * from './listSpacePermissionCombinations.js'; + +export * from './postBlogPostClassificationLevel.js'; + +export * from './postDatabaseClassificationLevel.js'; + +export * from './postPageClassificationLevel.js'; + +export * from './postRedactBlog.js'; + +export * from './postRedactPage.js'; + +export * from './postWhiteboardClassificationLevel.js'; + +export * from './putBlogPostClassificationLevel.js'; + +export * from './putDatabaseClassificationLevel.js'; + +export * from './putForgeAppProperty.js'; + +export * from './putPageClassificationLevel.js'; + +export * from './putSpaceDefaultClassificationLevel.js'; + +export * from './putWhiteboardClassificationLevel.js'; + +export * from './setSpaceRoleAssignments.js'; + +export * from './updateAttachmentPropertyById.js'; + +export * from './updateBlogPost.js'; + +export * from './updateBlogpostPropertyById.js'; + +export * from './updateCommentPropertyById.js'; + +export * from './updateCustomContent.js'; + +export * from './updateCustomContentPropertyById.js'; + +export * from './updateDatabasePropertyById.js'; + +export * from './updateFolderPropertyById.js'; + +export * from './updateFooterComment.js'; + +export * from './updateInlineComment.js'; + +export * from './updatePage.js'; + +export * from './updatePagePropertyById.js'; + +export * from './updatePageTitle.js'; + +export * from './updateSmartLinkPropertyById.js'; + +export * from './updateSpacePropertyById.js'; + +export * from './updateSpaceRole.js'; + +export * from './updateTask.js'; + +export * from './updateWhiteboardPropertyById.js'; diff --git a/packages/cloud/src/parameters/inviteByEmail.ts b/packages/cloud/src/parameters/inviteByEmail.ts new file mode 100644 index 00000000..786e5d0f --- /dev/null +++ b/packages/cloud/src/parameters/inviteByEmail.ts @@ -0,0 +1,7 @@ +import { z } from 'zod'; + +export const InviteByEmailSchema = z.object({ + body: z.record(z.string(), z.any()).optional(), +}); + +export type InviteByEmail = z.input; diff --git a/packages/cloud/src/parameters/listSpacePermissionCombinations.ts b/packages/cloud/src/parameters/listSpacePermissionCombinations.ts new file mode 100644 index 00000000..d7bae609 --- /dev/null +++ b/packages/cloud/src/parameters/listSpacePermissionCombinations.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; + +export const ListSpacePermissionCombinationsSchema = z.object({ + /** Opaque cursor returned from a previous page in the `cursor` field of the response. Omit for the first page. */ + cursor: z.string().optional(), + /** The maximum number of combinations to return per page. Requests outside the supported range return `400`. */ + limit: z.number().optional(), +}); + +export type ListSpacePermissionCombinations = z.input; diff --git a/packages/cloud/src/parameters/postBlogPostClassificationLevel.ts b/packages/cloud/src/parameters/postBlogPostClassificationLevel.ts new file mode 100644 index 00000000..8f748934 --- /dev/null +++ b/packages/cloud/src/parameters/postBlogPostClassificationLevel.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const PostBlogPostClassificationLevelSchema = z.object({ + /** The ID of the blog post for which classification level should be updated. */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type PostBlogPostClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/postDatabaseClassificationLevel.ts b/packages/cloud/src/parameters/postDatabaseClassificationLevel.ts new file mode 100644 index 00000000..5e6db228 --- /dev/null +++ b/packages/cloud/src/parameters/postDatabaseClassificationLevel.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const PostDatabaseClassificationLevelSchema = z.object({ + /** The ID of the database for which classification level should be updated. */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type PostDatabaseClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/postPageClassificationLevel.ts b/packages/cloud/src/parameters/postPageClassificationLevel.ts new file mode 100644 index 00000000..935b8d66 --- /dev/null +++ b/packages/cloud/src/parameters/postPageClassificationLevel.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const PostPageClassificationLevelSchema = z.object({ + /** The ID of the page for which classification level should be updated. */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type PostPageClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/postRedactBlog.ts b/packages/cloud/src/parameters/postRedactBlog.ts new file mode 100644 index 00000000..a98a98b5 --- /dev/null +++ b/packages/cloud/src/parameters/postRedactBlog.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const PostRedactBlogSchema = z.object({ + /** The ID of the blog post to redact content from. */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type PostRedactBlog = z.input; diff --git a/packages/cloud/src/parameters/postRedactPage.ts b/packages/cloud/src/parameters/postRedactPage.ts new file mode 100644 index 00000000..cbb68bbf --- /dev/null +++ b/packages/cloud/src/parameters/postRedactPage.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const PostRedactPageSchema = z.object({ + /** The ID of the page to redact content from. */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type PostRedactPage = z.input; diff --git a/packages/cloud/src/parameters/postWhiteboardClassificationLevel.ts b/packages/cloud/src/parameters/postWhiteboardClassificationLevel.ts new file mode 100644 index 00000000..64104406 --- /dev/null +++ b/packages/cloud/src/parameters/postWhiteboardClassificationLevel.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const PostWhiteboardClassificationLevelSchema = z.object({ + /** The ID of the whiteboard for which classification level should be updated. */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type PostWhiteboardClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/putBlogPostClassificationLevel.ts b/packages/cloud/src/parameters/putBlogPostClassificationLevel.ts new file mode 100644 index 00000000..00641b07 --- /dev/null +++ b/packages/cloud/src/parameters/putBlogPostClassificationLevel.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const PutBlogPostClassificationLevelSchema = z.object({ + /** The ID of the blog post for which classification level should be updated. */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type PutBlogPostClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/putDatabaseClassificationLevel.ts b/packages/cloud/src/parameters/putDatabaseClassificationLevel.ts new file mode 100644 index 00000000..e925b3a6 --- /dev/null +++ b/packages/cloud/src/parameters/putDatabaseClassificationLevel.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const PutDatabaseClassificationLevelSchema = z.object({ + /** The ID of the database for which classification level should be updated. */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type PutDatabaseClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/putForgeAppProperty.ts b/packages/cloud/src/parameters/putForgeAppProperty.ts new file mode 100644 index 00000000..2f8e6cb7 --- /dev/null +++ b/packages/cloud/src/parameters/putForgeAppProperty.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const PutForgeAppPropertySchema = z.object({ + /** The key of the property */ + propertyKey: z.string(), + body: z.record(z.string(), z.any()), +}); + +export type PutForgeAppProperty = z.input; diff --git a/packages/cloud/src/parameters/putPageClassificationLevel.ts b/packages/cloud/src/parameters/putPageClassificationLevel.ts new file mode 100644 index 00000000..58c240ef --- /dev/null +++ b/packages/cloud/src/parameters/putPageClassificationLevel.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const PutPageClassificationLevelSchema = z.object({ + /** The ID of the page for which classification level should be updated. */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type PutPageClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/putSpaceDefaultClassificationLevel.ts b/packages/cloud/src/parameters/putSpaceDefaultClassificationLevel.ts new file mode 100644 index 00000000..4d7f643e --- /dev/null +++ b/packages/cloud/src/parameters/putSpaceDefaultClassificationLevel.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const PutSpaceDefaultClassificationLevelSchema = z.object({ + /** The ID of the space for which default classification level should be updated. */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type PutSpaceDefaultClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/putWhiteboardClassificationLevel.ts b/packages/cloud/src/parameters/putWhiteboardClassificationLevel.ts new file mode 100644 index 00000000..96b1cf91 --- /dev/null +++ b/packages/cloud/src/parameters/putWhiteboardClassificationLevel.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const PutWhiteboardClassificationLevelSchema = z.object({ + /** The ID of the whiteboard for which classification level should be updated. */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type PutWhiteboardClassificationLevel = z.input; diff --git a/packages/cloud/src/parameters/setSpaceRoleAssignments.ts b/packages/cloud/src/parameters/setSpaceRoleAssignments.ts new file mode 100644 index 00000000..b501d25d --- /dev/null +++ b/packages/cloud/src/parameters/setSpaceRoleAssignments.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const SetSpaceRoleAssignmentsSchema = z.object({ + /** The ID of the space for which to retrieve assignments. */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type SetSpaceRoleAssignments = z.input; diff --git a/packages/cloud/src/parameters/updateAttachmentPropertyById.ts b/packages/cloud/src/parameters/updateAttachmentPropertyById.ts new file mode 100644 index 00000000..4f92578e --- /dev/null +++ b/packages/cloud/src/parameters/updateAttachmentPropertyById.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { ContentPropertyUpdateSchema } from '../models/index.js'; + +export const UpdateAttachmentPropertyByIdSchema = z + .object({ + /** The ID of the attachment the property belongs to. */ + attachmentId: z.string(), + /** The ID of the property to be updated. */ + propertyId: z.number(), + }) + .extend(ContentPropertyUpdateSchema.shape); + +export type UpdateAttachmentPropertyById = z.input; diff --git a/packages/cloud/src/parameters/updateBlogPost.ts b/packages/cloud/src/parameters/updateBlogPost.ts new file mode 100644 index 00000000..438fbbc1 --- /dev/null +++ b/packages/cloud/src/parameters/updateBlogPost.ts @@ -0,0 +1,12 @@ +import { z } from 'zod'; + +export const UpdateBlogPostSchema = z.object({ + /** + * The ID of the blog post to be updated. If you don't know the blog post ID, use Get Blog Posts and filter the + * results. + */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type UpdateBlogPost = z.input; diff --git a/packages/cloud/src/parameters/updateBlogpostPropertyById.ts b/packages/cloud/src/parameters/updateBlogpostPropertyById.ts new file mode 100644 index 00000000..544a979d --- /dev/null +++ b/packages/cloud/src/parameters/updateBlogpostPropertyById.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { ContentPropertyUpdateSchema } from '../models/index.js'; + +export const UpdateBlogpostPropertyByIdSchema = z + .object({ + /** The ID of the blog post the property belongs to. */ + blogpostId: z.number(), + /** The ID of the property to be updated. */ + propertyId: z.number(), + }) + .extend(ContentPropertyUpdateSchema.shape); + +export type UpdateBlogpostPropertyById = z.input; diff --git a/packages/cloud/src/parameters/updateCommentPropertyById.ts b/packages/cloud/src/parameters/updateCommentPropertyById.ts new file mode 100644 index 00000000..dedb9fd4 --- /dev/null +++ b/packages/cloud/src/parameters/updateCommentPropertyById.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { ContentPropertyUpdateSchema } from '../models/index.js'; + +export const UpdateCommentPropertyByIdSchema = z + .object({ + /** The ID of the comment the property belongs to. */ + commentId: z.number(), + /** The ID of the property to be updated. */ + propertyId: z.number(), + }) + .extend(ContentPropertyUpdateSchema.shape); + +export type UpdateCommentPropertyById = z.input; diff --git a/packages/cloud/src/parameters/updateCustomContent.ts b/packages/cloud/src/parameters/updateCustomContent.ts new file mode 100644 index 00000000..6e9e8097 --- /dev/null +++ b/packages/cloud/src/parameters/updateCustomContent.ts @@ -0,0 +1,12 @@ +import { z } from 'zod'; + +export const UpdateCustomContentSchema = z.object({ + /** + * The ID of the custom content to be updated. If you don't know the custom content ID, use Get Custom Content by + * Type and filter the results. + */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type UpdateCustomContent = z.input; diff --git a/packages/cloud/src/parameters/updateCustomContentPropertyById.ts b/packages/cloud/src/parameters/updateCustomContentPropertyById.ts new file mode 100644 index 00000000..2847fc2a --- /dev/null +++ b/packages/cloud/src/parameters/updateCustomContentPropertyById.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { ContentPropertyUpdateSchema } from '../models/index.js'; + +export const UpdateCustomContentPropertyByIdSchema = z + .object({ + /** The ID of the custom content the property belongs to. */ + customContentId: z.number(), + /** The ID of the property to be updated. */ + propertyId: z.number(), + }) + .extend(ContentPropertyUpdateSchema.shape); + +export type UpdateCustomContentPropertyById = z.input; diff --git a/packages/cloud/src/parameters/updateDatabasePropertyById.ts b/packages/cloud/src/parameters/updateDatabasePropertyById.ts new file mode 100644 index 00000000..4c804d6a --- /dev/null +++ b/packages/cloud/src/parameters/updateDatabasePropertyById.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { ContentPropertyUpdateSchema } from '../models/index.js'; + +export const UpdateDatabasePropertyByIdSchema = z + .object({ + /** The ID of the database the property belongs to. */ + databaseId: z.number(), + /** The ID of the property to be updated. */ + propertyId: z.number(), + }) + .extend(ContentPropertyUpdateSchema.shape); + +export type UpdateDatabasePropertyById = z.input; diff --git a/packages/cloud/src/parameters/updateFolderPropertyById.ts b/packages/cloud/src/parameters/updateFolderPropertyById.ts new file mode 100644 index 00000000..ce690523 --- /dev/null +++ b/packages/cloud/src/parameters/updateFolderPropertyById.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { ContentPropertyUpdateSchema } from '../models/index.js'; + +export const UpdateFolderPropertyByIdSchema = z + .object({ + /** The ID of the folder the property belongs to. */ + folderId: z.number(), + /** The ID of the property to be updated. */ + propertyId: z.number(), + }) + .extend(ContentPropertyUpdateSchema.shape); + +export type UpdateFolderPropertyById = z.input; diff --git a/packages/cloud/src/parameters/updateFooterComment.ts b/packages/cloud/src/parameters/updateFooterComment.ts new file mode 100644 index 00000000..8af24920 --- /dev/null +++ b/packages/cloud/src/parameters/updateFooterComment.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const UpdateFooterCommentSchema = z.object({ + /** The ID of the comment to be retrieved. */ + commentId: z.number(), + body: z.record(z.string(), z.any()), +}); + +export type UpdateFooterComment = z.input; diff --git a/packages/cloud/src/parameters/updateInlineComment.ts b/packages/cloud/src/parameters/updateInlineComment.ts new file mode 100644 index 00000000..b0391c17 --- /dev/null +++ b/packages/cloud/src/parameters/updateInlineComment.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; +import { UpdateInlineCommentModelSchema } from '../models/index.js'; + +export const UpdateInlineCommentSchema = z + .object({ + /** The ID of the comment to be retrieved. */ + commentId: z.number(), + }) + .extend(UpdateInlineCommentModelSchema.shape); + +export type UpdateInlineComment = z.input; diff --git a/packages/cloud/src/parameters/updatePage.ts b/packages/cloud/src/parameters/updatePage.ts new file mode 100644 index 00000000..1750b8b6 --- /dev/null +++ b/packages/cloud/src/parameters/updatePage.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const UpdatePageSchema = z.object({ + /** The ID of the page to be updated. If you don't know the page ID, use Get Pages and filter the results. */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type UpdatePage = z.input; diff --git a/packages/cloud/src/parameters/updatePagePropertyById.ts b/packages/cloud/src/parameters/updatePagePropertyById.ts new file mode 100644 index 00000000..4c9cc469 --- /dev/null +++ b/packages/cloud/src/parameters/updatePagePropertyById.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { ContentPropertyUpdateSchema } from '../models/index.js'; + +export const UpdatePagePropertyByIdSchema = z + .object({ + /** The ID of the page the property belongs to. */ + pageId: z.number(), + /** The ID of the property to be updated. */ + propertyId: z.number(), + }) + .extend(ContentPropertyUpdateSchema.shape); + +export type UpdatePagePropertyById = z.input; diff --git a/packages/cloud/src/parameters/updatePageTitle.ts b/packages/cloud/src/parameters/updatePageTitle.ts new file mode 100644 index 00000000..2975e32b --- /dev/null +++ b/packages/cloud/src/parameters/updatePageTitle.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; + +export const UpdatePageTitleSchema = z.object({ + /** The ID of the page to be updated. If you don't know the page ID, use Get Pages and filter the results */ + id: z.number(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type UpdatePageTitle = z.input; diff --git a/packages/cloud/src/parameters/updateSmartLinkPropertyById.ts b/packages/cloud/src/parameters/updateSmartLinkPropertyById.ts new file mode 100644 index 00000000..10ee5f67 --- /dev/null +++ b/packages/cloud/src/parameters/updateSmartLinkPropertyById.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { ContentPropertyUpdateSchema } from '../models/index.js'; + +export const UpdateSmartLinkPropertyByIdSchema = z + .object({ + /** The ID of the Smart Link in the content tree the property belongs to. */ + embedId: z.number(), + /** The ID of the property to be updated. */ + propertyId: z.number(), + }) + .extend(ContentPropertyUpdateSchema.shape); + +export type UpdateSmartLinkPropertyById = z.input; diff --git a/packages/cloud/src/parameters/updateSpacePropertyById.ts b/packages/cloud/src/parameters/updateSpacePropertyById.ts new file mode 100644 index 00000000..66e28c55 --- /dev/null +++ b/packages/cloud/src/parameters/updateSpacePropertyById.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { SpacePropertyUpdateSchema } from '../models/index.js'; + +export const UpdateSpacePropertyByIdSchema = z + .object({ + /** The ID of the space the property belongs to. */ + spaceId: z.number(), + /** The ID of the property to be updated. */ + propertyId: z.number(), + }) + .extend(SpacePropertyUpdateSchema.shape); + +export type UpdateSpacePropertyById = z.input; diff --git a/packages/cloud/src/parameters/updateSpaceRole.ts b/packages/cloud/src/parameters/updateSpaceRole.ts new file mode 100644 index 00000000..15bec34d --- /dev/null +++ b/packages/cloud/src/parameters/updateSpaceRole.ts @@ -0,0 +1,29 @@ +import { z } from 'zod'; + +export const UpdateSpaceRoleSchema = z.object({ + /** Id of the space role */ + id: z.string(), + /** Name of the space role */ + name: z.string(), + /** Description for the space role */ + description: z.string(), + /** + * The ids of the space permissions associated with the space role. Sample value "read/space"; retrieve ids from + * responses returned by [GET + * /space-permissions](https://developer.atlassian.com/cloud/confluence/rest/v2/api-group-space-permissions/#api-space-permissions-get) + * endpoint + */ + spacePermissions: z.array(z.string()), + /** + * If space anonymous access is assigned to the role being modified, the Id of a role to migrate those assignments + * to can be specified. Anonymous access role assignments left unchanged if unspecified. + */ + anonymousReassignmentRoleId: z.string().optional(), + /** + * If guests are assigned to the role being modified, the Id of a role to migrate those assignments to can be + * specified. Guest role assignments left unchanged if unspecified. + */ + guestReassignmentRoleId: z.string().optional(), +}); + +export type UpdateSpaceRole = z.input; diff --git a/packages/cloud/src/parameters/updateTask.ts b/packages/cloud/src/parameters/updateTask.ts new file mode 100644 index 00000000..c3fa8307 --- /dev/null +++ b/packages/cloud/src/parameters/updateTask.ts @@ -0,0 +1,15 @@ +import { z } from 'zod'; +import { PrimaryBodyRepresentationSchema } from '../models/index.js'; + +export const UpdateTaskSchema = z.object({ + /** The ID of the task to be updated. If you don't know the task ID, use Get tasks and filter the results. */ + id: z.number(), + /** + * The content format types to be returned in the `body` field of the response. If available, the representation + * will be available under a response field of the same name under the `body` field. + */ + bodyFormat: PrimaryBodyRepresentationSchema.optional(), + body: z.record(z.string(), z.any()).optional(), +}); + +export type UpdateTask = z.input; diff --git a/packages/cloud/src/parameters/updateWhiteboardPropertyById.ts b/packages/cloud/src/parameters/updateWhiteboardPropertyById.ts new file mode 100644 index 00000000..a54a9b50 --- /dev/null +++ b/packages/cloud/src/parameters/updateWhiteboardPropertyById.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { ContentPropertyUpdateSchema } from '../models/index.js'; + +export const UpdateWhiteboardPropertyByIdSchema = z + .object({ + /** The ID of the whiteboard the property belongs to. */ + whiteboardId: z.number(), + /** The ID of the property to be updated. */ + propertyId: z.number(), + }) + .extend(ContentPropertyUpdateSchema.shape); + +export type UpdateWhiteboardPropertyById = z.input; diff --git a/packages/cloud/tests/integration/adminKey.test.ts b/packages/cloud/tests/integration/adminKey.test.ts new file mode 100644 index 00000000..06a281f5 --- /dev/null +++ b/packages/cloud/tests/integration/adminKey.test.ts @@ -0,0 +1,177 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; + +/** + * Live integration suite for the Confluence Cloud v2 `adminKey` API + * (`getAdminKey`, `enableAdminKey`, `disableAdminKey`). + * + * The "admin key" is an *organization / site admin* feature that grants elevated + * access for a short, self-expiring window. On a standard Cloud site — or with a + * token that is not an org-or-site admin — every endpoint here is gated and the + * server answers 403/404. This suite is therefore written **gated-graceful**: + * every method is still CALLED (to exercise typing + request serialization), but + * each assertion accepts BOTH branches: + * + * - the feature is available → the response is a typed `AdminKey` + * (`AdminKeySchema`: `accountId?: string`, `expirationTime?: Date`), or a + * `void` for `disableAdminKey`; or + * - the feature is gated → a typed `ApiError` with status 403 or 404. + * + * SAFETY: enabling an admin key grants elevated access. If `enableAdminKey` + * succeeds we register `disableAdminKey` on the {@link ResourceTracker} so the + * site is restored to its prior state on teardown, no matter how the run exits. + * + * Shared infrastructure (see `./setup`): + * - `getLiveClient()` — singleton v2 client (host + retry policy); + * - `ResourceTracker` — LIFO, retried teardown. + */ + +let client: ReturnType; +/** The shape returned by the admin-key endpoints, derived from the client. */ +type AdminKey = Awaited>; + +const tracker = new ResourceTracker(); + +/** Whether this token can actually enable an admin key — set by the enable suite. */ +let enableSucceeded = false; + +/** Asserts a value is a structurally valid `AdminKey` per `AdminKeySchema`. */ +function expectWellFormedAdminKey(key: AdminKey) { + // `AdminKeySchema` is a *loose* `apiObject`: declared fields are typed (extras + // are preserved at runtime but untyped). Both declared fields are optional. + expect(key).toBeTypeOf('object'); + expect(key).not.toBeNull(); + + if (key.accountId !== undefined) { + expect(typeof key.accountId).toBe('string'); + expect(key.accountId.length).toBeGreaterThan(0); + } + + if (key.expirationTime !== undefined) { + // Declared `z.coerce.date()` → a parsed response yields a real Date. + expect(key.expirationTime).toBeInstanceOf(Date); + expect(Number.isNaN(key.expirationTime.getTime())).toBe(false); + } +} + +/** Asserts an error is the typed `ApiError` an org-admin-gated endpoint throws. */ +function expectGatedApiError(error: unknown) { + expect(error).toBeInstanceOf(ApiError); + expect([403, 404]).toContain((error as ApiError).status); +} + +beforeAll(() => { + client = getLiveClient(); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — adminKey.getAdminKey (live, gated-graceful)', () => { + it('returns either a typed AdminKey or a typed 403/404 ApiError when gated', async () => { + let result: AdminKey | undefined; + let caught: unknown; + + try { + // No params: `getAdminKey(client)` issues `GET /admin-key`. + result = await client.adminKey.getAdminKey(); + } catch (error) { + caught = error; + } + + if (caught !== undefined) { + // Gated: caller is not an org/site admin, or no key is currently enabled. + expectGatedApiError(caught); + } else { + // A key is enabled and visible: the model must be honored exactly. + expect(result).toBeDefined(); + expectWellFormedAdminKey(result!); + } + }); +}); + +describe('Confluence Cloud v2 — adminKey.enableAdminKey (live, gated-graceful, self-restoring)', () => { + let enabled: AdminKey | undefined; + let caught: unknown; + + beforeAll(async () => { + try { + // Body is optional; `durationInMinutes` controls the window (0/empty → 10m + // default). `EnableAdminKeySchema.body` is a free-form `Record`. + enabled = await client.adminKey.enableAdminKey({ body: { durationInMinutes: 10 } }); + enableSucceeded = true; + + // SAFETY / cleanup: an enabled admin key must always be revoked afterwards. + tracker.defer(async () => { + await client.adminKey.disableAdminKey().catch(() => undefined); + }); + } catch (error) { + caught = error; + } + }); + + it('either issues a typed AdminKey or fails with a typed 403/404 ApiError', () => { + if (enableSucceeded) { + expect(enabled).toBeDefined(); + expectWellFormedAdminKey(enabled!); + } else { + expectGatedApiError(caught); + } + }); + + it('makes getAdminKey report an active key once enabled', async () => { + if (!enableSucceeded) return; // gated: nothing was enabled, nothing to observe + + const active = await client.adminKey.getAdminKey(); + + expectWellFormedAdminKey(active); + // An active key identifies the calling user and carries a future expiry. + expect(active.accountId).toBeTruthy(); + expect(active.expirationTime).toBeInstanceOf(Date); + // Allow a minute of clock skew; the key was just (re)issued. + expect(active.expirationTime!.getTime()).toBeGreaterThan(Date.now() - 60_000); + }); +}); + +describe('Confluence Cloud v2 — adminKey.disableAdminKey (live, gated-graceful)', () => { + it('revokes the active key (when enabled) or fails with a typed ApiError when gated', async () => { + if (enableSucceeded) { + // Explicitly exercise disable; `disableAdminKey(client)` issues + // `DELETE /admin-key` and resolves `void`. + await expect(client.adminKey.disableAdminKey()).resolves.toBeUndefined(); + + // After revocation getAdminKey should no longer surface an active key: + // tolerate either a 404 (typical) or a still-well-formed shell. + let caught: unknown; + try { + const after = await client.adminKey.getAdminKey(); + expectWellFormedAdminKey(after); + } catch (error) { + caught = error; + } + + if (caught !== undefined) { + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + } + } else { + // Gated: still call it to prove typing/serialization; accept a void + // resolution OR a typed 403/404 ApiError, nothing else. + let caught: unknown; + try { + await client.adminKey.disableAdminKey(); + } catch (error) { + caught = error; + } + + if (caught !== undefined) { + expectGatedApiError(caught); + } else { + // A void resolution is itself the contract: the request was accepted. + expect(caught).toBeUndefined(); + } + } + }); +}); diff --git a/packages/cloud/tests/integration/ancestors.test.ts b/packages/cloud/tests/integration/ancestors.test.ts new file mode 100644 index 00000000..52cb109f --- /dev/null +++ b/packages/cloud/tests/integration/ancestors.test.ts @@ -0,0 +1,127 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage } from './setup/fixtures'; +import { testName } from './helpers/naming'; +import { waitFor } from './helpers/poll'; + +/** + * Live integration suite for the Confluence Cloud v2 `ancestors` API + * (`getPageAncestors`, `getWhiteboardAncestors`, `getDatabaseAncestors`, + * `getSmartLinkAncestors`, `getFolderAncestors`). + * + * The suite builds a real two-level page tree — a PARENT page with a single CHILD + * page (`createPage` with a body `parentId`) — and verifies the *contract* of the + * ancestor chain: querying the CHILD's ancestors returns the PARENT, each ancestor + * is minimally typed per the `Ancestor` model (`id` numeric string, `type` from + * the `AncestorType` enum), and the parent's entry carries `type: 'page'`. + * + * Coverage notes: + * - DEEP on pages: `getPageAncestors` is asserted against the live parent/child. + * - whiteboard/database/smart-link/folder ancestors have no cheap fixture on a + * standard Cloud site, so each is called with a real page id (wrong content + * type) purely to exercise typing + URL/param serialization; a correct + * response is a typed empty page or a typed 404/400 ApiError. + * + * The page tree is eventually consistent, so the ancestor read polls via + * {@link waitFor}. + */ + +const ANCESTOR_TYPES = ['page', 'whiteboard', 'database', 'embed', 'folder'] as const; + +let client: ReturnType; +const tracker = new ResourceTracker(); + +let space: Awaited>; +let parent: Awaited>; +let child: Awaited>; + +/** + * Assert that an ancestor listing called with a wrong-type id either resolves to + * a typed empty page or fails as a typed ApiError (404/400). + */ +async function expectEmptyOrApiError(call: () => Promise<{ results?: unknown[] }>): Promise { + try { + const page = await call(); + expect(Array.isArray(page.results ?? [])).toBe(true); + expect(page.results ?? []).toHaveLength(0); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((error as ApiError).status); + } +} + +beforeAll(async () => { + client = getLiveClient(); + space = await createTestSpace(tracker); + parent = await createTestPage(tracker, space.id, { title: testName('ancestors-parent') }); + child = await createTestPage(tracker, space.id, { + title: testName('ancestors-child'), + parentId: String(parent.id), + }); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — ancestors.getPageAncestors (live, deep)', () => { + it('returns the parent page in the child page ancestor chain, typed', async () => { + const page = await waitFor( + () => client.ancestors.getPageAncestors({ id: Number(child.id) }), + result => (result.results ?? []).some(a => a.id === parent.id), + ); + + const ancestors = page.results ?? []; + expect(ancestors.length).toBeGreaterThan(0); + + // Every ancestor is minimally typed per the `Ancestor` model. + ancestors.forEach(ancestor => { + expect(typeof ancestor.id).toBe('string'); + expect(ancestor.id).toBeTruthy(); + expect(ANCESTOR_TYPES).toContain(ancestor.type); + }); + + const found = ancestors.find(a => a.id === parent.id); + expect(found).toBeDefined(); + expect(found!.id).toBe(parent.id); + expect(found!.type).toBe('page'); + }); + + it('honors `limit` — never returns more ancestors than requested', async () => { + const page = await client.ancestors.getPageAncestors({ id: Number(child.id), limit: 1 }); + + expect((page.results ?? []).length).toBeLessThanOrEqual(1); + }); + + it('rejects a non-existent page id with a 404 ApiError', async () => { + let caught: unknown; + + try { + await client.ancestors.getPageAncestors({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — ancestors — non-page content-tree nodes (gated-graceful)', () => { + it('getWhiteboardAncestors — typed empty page or typed ApiError', async () => { + await expectEmptyOrApiError(() => client.ancestors.getWhiteboardAncestors({ id: Number(child.id) })); + }); + + it('getDatabaseAncestors — typed empty page or typed ApiError', async () => { + await expectEmptyOrApiError(() => client.ancestors.getDatabaseAncestors({ id: Number(child.id) })); + }); + + it('getSmartLinkAncestors — typed empty page or typed ApiError', async () => { + await expectEmptyOrApiError(() => client.ancestors.getSmartLinkAncestors({ id: Number(child.id) })); + }); + + it('getFolderAncestors — typed empty page or typed ApiError', async () => { + await expectEmptyOrApiError(() => client.ancestors.getFolderAncestors({ id: Number(child.id) })); + }); +}); diff --git a/packages/cloud/tests/integration/appProperties.test.ts b/packages/cloud/tests/integration/appProperties.test.ts new file mode 100644 index 00000000..026cb5be --- /dev/null +++ b/packages/cloud/tests/integration/appProperties.test.ts @@ -0,0 +1,118 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { testName } from './helpers/naming'; + +/** + * Live integration suite for the Confluence Cloud v2 `appProperties` API + * (`getForgeAppProperties`, `getForgeAppProperty`, `putForgeAppProperty`, + * `deleteForgeAppProperty`). + * + * This is a FORGE-APP-SCOPED, ENVIRONMENT-GATED module. The endpoints are + * documented as accessible ONLY via `asApp()` requests from a Forge app — there + * is no app context behind the live suite's basic-auth (user) credentials, so + * on a standard Cloud site EVERY call is expected to surface a typed `ApiError` + * (almost certainly 401/403/404; 451/501 accepted where the surface is entirely + * absent). The gated narrative is the point of this suite: each method is still + * CALLED (so request serialization + the Zod `ForgeAppProperties` / + * `ForgeAppProperty` parse are type-checked end to end), and the result is + * asserted to be either the exact typed shape OR a typed `ApiError`. A success + * branch is provided for completeness should the credentials ever carry an app + * context, but the realistic outcome on basic auth is the gate. + * + * Shared infrastructure (see `./setup` and `./helpers`): + * - `getLiveClient()` — singleton v2 client; + * - `ResourceTracker` — LIFO teardown; + * - `testName()` — run-scoped, marker-tagged unique property key. + */ + +const GATED_STATUSES = [400, 401, 403, 404, 451, 501] as const; + +let client: ReturnType; +const tracker = new ResourceTracker(); + +/** A run-scoped, marker-tagged property key (Forge property keys allow these chars). */ +const propertyKey = testName('app-prop').replace(/[^A-Za-z0-9._-]/g, '-'); +const propertyValue = { marker: 'cfjs', enabled: true }; + +beforeAll(() => { + client = getLiveClient(); + + // Best-effort cleanup in case the credentials unexpectedly carry an app + // context and the property is actually created. + tracker.defer(async () => { + await client.appProperties.deleteForgeAppProperty({ propertyKey }).catch(() => undefined); + }); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — appProperties.getForgeAppProperties (live, forge-gated)', () => { + it('lists app properties as a typed page, or surfaces a typed ApiError without an app context', async () => { + try { + const page = await client.appProperties.getForgeAppProperties({ limit: 10 }); + + // `ForgeAppPropertiesSchema`: optional `results` of `{ key?, value? }` + `_links`. + expect(typeof page).toBe('object'); + + if (page.results !== undefined) { + expect(Array.isArray(page.results)).toBe(true); + page.results.forEach(prop => { + if (prop.key !== undefined) expect(typeof prop.key).toBe('string'); + + if (prop.value !== undefined) expect(typeof prop.value).toBe('object'); + }); + } + + if (page._links !== undefined) expect(typeof page._links).toBe('object'); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); +}); + +describe('Confluence Cloud v2 — appProperties property lifecycle (live, forge-gated)', () => { + it('putForgeAppProperty creates/updates a property, or surfaces a typed ApiError', async () => { + try { + const result = await client.appProperties.putForgeAppProperty({ propertyKey, body: propertyValue }); + // Declared `Promise` — success resolves with no body. + expect(result).toBeUndefined(); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); + + it('getForgeAppProperty fetches the property by key as a typed ForgeAppProperty, or a typed ApiError', async () => { + try { + const prop = await client.appProperties.getForgeAppProperty({ propertyKey }); + + // `ForgeAppPropertySchema`: `{ key?, value? }`. When the property round-trips + // it must carry the key we wrote and an object value. + expect(typeof prop).toBe('object'); + + if (prop.key !== undefined) { + expect(typeof prop.key).toBe('string'); + expect(prop.key).toBe(propertyKey); + } + + if (prop.value !== undefined) expect(typeof prop.value).toBe('object'); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); + + it('deleteForgeAppProperty removes the property, or surfaces a typed ApiError', async () => { + try { + const result = await client.appProperties.deleteForgeAppProperty({ propertyKey }); + expect(result).toBeUndefined(); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); +}); diff --git a/packages/cloud/tests/integration/attachment.test.ts b/packages/cloud/tests/integration/attachment.test.ts new file mode 100644 index 00000000..3a162002 --- /dev/null +++ b/packages/cloud/tests/integration/attachment.test.ts @@ -0,0 +1,434 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient, v1Request } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, createTestBlogPost } from './setup/fixtures'; +import { testName } from './helpers/naming'; +import { waitFor } from './helpers/poll'; + +/** + * Live integration suite for the Confluence Cloud v2 `attachment` API + * (`getAttachments`, `getAttachmentById`, `deleteAttachment`, + * `getPageAttachments`, `getBlogpostAttachments`, `getCustomContentAttachments`, + * `getLabelAttachments`, `getAttachmentThumbnailById`). + * + * v2 has NO attachment-upload endpoint, so every attachment under test is created + * through the v1 REST multipart endpoint (`POST content/{id}/child/attachment`) + * and then *read and deleted* through v2 — the SDK surface this suite verifies. + * + * The assertions verify the *contract* of each function, not merely that a call + * resolves: returned attachments are typed exactly as the Zod `AttachmentSummary` + * / `Attachment` models declare (id/title/mediaType/fileSize/version/_links); + * a freshly uploaded attachment appears in the page/blogpost listings and is + * canonically consistent across `getAttachmentById`, `getPageAttachments` and the + * site-wide `getAttachments`; query params (`filename`, `limit`, `include-*`) have + * a real, observable effect; and error responses surface as a typed `ApiError`. + * + * Shared infrastructure: see `./setup` (live client, v1 REST gap-filler, LIFO + * resource tracker, space/page/blog fixtures) and `./helpers` (run-scoped naming, + * eventually-consistent polling). + */ + +const ATT_BODY = 'cfjs attachment body'; +/** Byte length of {@link ATT_BODY} — used to assert the reported `fileSize`. */ +const ATT_BYTES = Buffer.byteLength(ATT_BODY); +const ATT_MEDIA_TYPE = 'text/plain'; + +const ATTACHMENT_STATUSES = ['current', 'draft', 'archived', 'historical', 'trashed', 'deleted', 'any'] as const; + +let client: ReturnType; + +/** A single attachment summary as returned inside a page/blogpost listing. */ +type AttachmentSummary = NonNullable< + Awaited>['results'] +>[number]; + +const tracker = new ResourceTracker(); + +let space: Awaited>; +let page: Awaited>; + +/** The canonical attachment uploaded onto {@link page}, discovered via v2. */ +let pageAttachment: AttachmentSummary; +let pageAttachmentFilename: string; + +/** + * Upload a small text file onto a v1 content container (page / blog post). + * v2 exposes no upload endpoint, so this is the only way to materialize an + * attachment the v2 read/delete endpoints can then operate on. We deliberately + * do NOT set `Content-Type` — `fetch` derives the multipart boundary from the + * `FormData` body itself. + */ +async function uploadV1Attachment(parentId: string, filename: string): Promise { + const form = new FormData(); + form.append('file', new Blob([ATT_BODY], { type: ATT_MEDIA_TYPE }), filename); + + await v1Request(`content/${parentId}/child/attachment`, { + method: 'POST', + raw: form, + headers: { 'X-Atlassian-Token': 'no-check' }, + }); +} + +/** A meaningful structural check for an attachment summary/entity. */ +function expectWellFormedAttachment(attachment: AttachmentSummary) { + expect(typeof attachment.id).toBe('string'); + expect(attachment.id).toBeTruthy(); + expect(typeof attachment.title).toBe('string'); + expect(attachment.title).toBeTruthy(); + // `createdAt` is `z.coerce.date()` → a parsed response is a real Date. + expect(attachment.createdAt).toBeInstanceOf(Date); + expect(ATTACHMENT_STATUSES).toContain(attachment.status); +} + +beforeAll(async () => { + client = getLiveClient(); + + space = await createTestSpace(tracker); + page = await createTestPage(tracker, space.id); + + pageAttachmentFilename = testName('att.txt'); + await uploadV1Attachment(page.id!, pageAttachmentFilename); + + // Prefer discovering the attachment (and its real v2 id) by reading it back, + // rather than trusting the v1 response id format. Indexing is not read-your-write. + const listing = await waitFor( + () => client.attachment.getPageAttachments({ id: Number(page.id) }), + res => (res.results ?? []).some(a => a.title === pageAttachmentFilename), + { maxAttempts: 8 }, + ); + + pageAttachment = listing.results!.find(a => a.title === pageAttachmentFilename)!; +}, 60_000); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — attachment.getPageAttachments (live)', () => { + it('returns the uploaded attachment with correctly-typed fields', () => { + expectWellFormedAttachment(pageAttachment); + + expect(pageAttachment.title).toBe(pageAttachmentFilename); + // Only the page container id is populated for a page attachment. + expect(pageAttachment.pageId).toBe(String(page.id)); + expect(pageAttachment.blogPostId).toBeUndefined(); + expect(pageAttachment.customContentId).toBeUndefined(); + + // mediaType / fileSize are declared `.optional()` but a real attachment carries them. + expect(typeof pageAttachment.mediaType).toBe('string'); + expect(pageAttachment.mediaType).toContain('text/plain'); + expect(typeof pageAttachment.fileSize).toBe('number'); + expect(pageAttachment.fileSize).toBe(ATT_BYTES); + + // `version` is `.nullish()`; a current attachment exposes version 1. + expect(pageAttachment.version).toBeTruthy(); + expect(typeof pageAttachment.version?.number).toBe('number'); + expect(pageAttachment.version?.number).toBe(1); + + // `_links` is `.nullish()`; the download link is the load-bearing field. + expect(typeof pageAttachment._links?.download).toBe('string'); + expect(pageAttachment._links?.download).toBeTruthy(); + }); + + it('returns a typed page envelope with `_links`', async () => { + const listing = await client.attachment.getPageAttachments({ id: Number(page.id) }); + + expect(Array.isArray(listing.results)).toBe(true); + expect(listing.results!.length).toBeGreaterThan(0); + expect(listing._links).toBeDefined(); + listing.results!.forEach(expectWellFormedAttachment); + }); + + it('honors `limit` (results never exceed the requested page size)', async () => { + const limited = await client.attachment.getPageAttachments({ id: Number(page.id), limit: 1 }); + + expect(limited.results!.length).toBeLessThanOrEqual(1); + }); + + it('filters by `filename` to the uploaded attachment', async () => { + const filtered = await client.attachment.getPageAttachments({ + id: Number(page.id), + filename: pageAttachmentFilename, + }); + + expect(filtered.results!.length).toBeGreaterThan(0); + expect(filtered.results!.every(a => a.title === pageAttachmentFilename)).toBe(true); + expect(filtered.results!.some(a => a.id === pageAttachment.id)).toBe(true); + }); + + it('rejects a non-existent page id with a typed ApiError', async () => { + let caught: unknown; + + try { + await client.attachment.getPageAttachments({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — attachment.getAttachmentById (live)', () => { + it('returns the same canonical entity as the getPageAttachments summary', async () => { + const full = await client.attachment.getAttachmentById({ id: pageAttachment.id! }); + + expect(full.id).toBe(pageAttachment.id); + expect(full.title).toBe(pageAttachment.title); + expect(full.pageId).toBe(String(page.id)); + expect(full.mediaType).toBe(pageAttachment.mediaType); + expect(full.fileSize).toBe(ATT_BYTES); + expect(full.status).toBe(pageAttachment.status); + expect(typeof full._links?.download).toBe('string'); + }); + + it('expands labels/properties/operations/versions only when the include-* flags are set', async () => { + const base = await client.attachment.getAttachmentById({ id: pageAttachment.id! }); + expect(base.labels).toBeUndefined(); + expect(base.properties).toBeUndefined(); + expect(base.operations).toBeUndefined(); + expect(base.versions).toBeUndefined(); + + const expanded = await client.attachment.getAttachmentById({ + id: pageAttachment.id!, + includeLabels: true, + includeProperties: true, + includeOperations: true, + includeVersions: true, + }); + + expect(expanded.labels).toBeDefined(); + expect(Array.isArray(expanded.labels?.results)).toBe(true); + expect(expanded.properties).toBeDefined(); + expect(Array.isArray(expanded.properties?.results)).toBe(true); + expect(expanded.operations).toBeDefined(); + expect(Array.isArray(expanded.operations?.results)).toBe(true); + expect(expanded.versions).toBeDefined(); + expect(Array.isArray(expanded.versions?.results)).toBe(true); + }); + + it('retrieves a specific historical version via `version`', async () => { + const v1 = await client.attachment.getAttachmentById({ id: pageAttachment.id!, version: 1 }); + + expect(v1.id).toBe(pageAttachment.id); + expect(v1.version?.number).toBe(1); + }); + + it('rejects a non-existent attachment id with a typed ApiError', async () => { + let caught: unknown; + + try { + await client.attachment.getAttachmentById({ id: 'att999999999999' }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — attachment.getAttachments (live, site-wide)', () => { + it('returns a typed page of attachment summaries with `_links`', async () => { + const listing = await client.attachment.getAttachments({ limit: 25 }); + + expect(Array.isArray(listing.results)).toBe(true); + expect(listing._links).toBeDefined(); + listing.results!.forEach(expectWellFormedAttachment); + }); + + it('honors `limit` and surfaces a pagination cursor when more results exist', async () => { + const firstPage = await client.attachment.getAttachments({ limit: 1 }); + + expect(firstPage.results!.length).toBeLessThanOrEqual(1); + + // If the site holds more than one attachment, the `Link`-header cursor is + // surfaced as `_links.next`. + if (firstPage._links?.next !== undefined) { + expect(typeof firstPage._links.next).toBe('string'); + expect(firstPage._links.next.length).toBeGreaterThan(0); + } + }); + + it('finds the uploaded attachment when filtered by `filename`', async () => { + const found = await waitFor( + () => client.attachment.getAttachments({ filename: pageAttachmentFilename, limit: 50 }), + res => (res.results ?? []).some(a => a.id === pageAttachment.id), + { maxAttempts: 8 }, + ); + + const match = found.results!.find(a => a.id === pageAttachment.id)!; + expect(match.title).toBe(pageAttachmentFilename); + expect(match.pageId).toBe(String(page.id)); + }); +}); + +describe('Confluence Cloud v2 — attachment.getAttachmentThumbnailById (live, gated-graceful)', () => { + it('either returns binary thumbnail data or a typed ApiError for a non-image file', async () => { + // Our attachment is `text/plain`; Confluence only renders thumbnails for + // images, so a 400/404 is the expected outcome here. Still exercise the call + // to verify typing + serialization, then assert on whichever shape comes back. + let result: Awaited> | undefined; + let caught: unknown; + + try { + result = await client.attachment.getAttachmentThumbnailById({ id: pageAttachment.id! }); + } catch (error) { + caught = error; + } + + if (caught !== undefined) { + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404, 500]).toContain((caught as ApiError).status); + } else { + // A non-image (text/plain) attachment has no rendered thumbnail. The v2 + // endpoint still resolves, but for a non-image it returns a non-binary/empty + // body rather than image bytes — so we do NOT demand binary here. The real + // contract for a resolved call: it came back as a binary buffer OR some + // defined/empty non-binary value, never a thrown error. + // The declared return type is binary; a non-image may still resolve to an + // empty/non-binary body at runtime, so widen to `unknown` before probing. + const value: unknown = result; + const isBinary = value instanceof ArrayBuffer || ArrayBuffer.isView(value); + const isAcceptableNonBinary = + value === undefined || value === null || typeof value === 'string' || typeof value === 'object'; + expect(isBinary || isAcceptableNonBinary).toBe(true); + } + }); +}); + +describe('Confluence Cloud v2 — attachment.getBlogpostAttachments (live)', () => { + const blogTracker = new ResourceTracker(); + let blog: Awaited>; + let blogAttachmentFilename: string; + let blogAttachment: AttachmentSummary; + + beforeAll(async () => { + blog = await createTestBlogPost(blogTracker, space.id); + blogAttachmentFilename = testName('blog-att.txt'); + await uploadV1Attachment(blog.id!, blogAttachmentFilename); + + const listing = await waitFor( + () => client.attachment.getBlogpostAttachments({ id: Number(blog.id) }), + res => (res.results ?? []).some(a => a.title === blogAttachmentFilename), + { maxAttempts: 8 }, + ); + + blogAttachment = listing.results!.find(a => a.title === blogAttachmentFilename)!; + }, 60_000); + + afterAll(() => blogTracker.cleanup()); + + it('returns the uploaded blog-post attachment with the blog container id set', () => { + expectWellFormedAttachment(blogAttachment); + + expect(blogAttachment.title).toBe(blogAttachmentFilename); + // For a blog-post attachment only `blogPostId` is populated. + expect(blogAttachment.blogPostId).toBe(String(blog.id)); + expect(blogAttachment.pageId).toBeUndefined(); + expect(blogAttachment.fileSize).toBe(ATT_BYTES); + expect(typeof blogAttachment._links?.download).toBe('string'); + }); + + it('rejects a non-existent blog-post id with a typed ApiError', async () => { + let caught: unknown; + + try { + await client.attachment.getBlogpostAttachments({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — attachment.getCustomContentAttachments (live, graceful)', () => { + it('returns a typed (possibly empty) page or a typed ApiError', async () => { + // We create no custom content; a plausible-but-unrelated id either returns an + // empty typed page or 404s. Either way the call must exercise typing cleanly. + let result: Awaited> | undefined; + let caught: unknown; + + try { + result = await client.attachment.getCustomContentAttachments({ id: Number(page.id), limit: 10 }); + } catch (error) { + caught = error; + } + + if (caught !== undefined) { + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + } else { + expect(Array.isArray(result!.results)).toBe(true); + result!.results!.forEach(expectWellFormedAttachment); + } + }); +}); + +describe('Confluence Cloud v2 — attachment.getLabelAttachments (live, graceful)', () => { + it('returns a typed (possibly empty) page or a typed ApiError', async () => { + // No label is guaranteed to exist; call with a plausible numeric id and accept + // either an empty typed page or a typed error. + let result: Awaited> | undefined; + let caught: unknown; + + try { + result = await client.attachment.getLabelAttachments({ id: 999_999_999, limit: 10 }); + } catch (error) { + caught = error; + } + + if (caught !== undefined) { + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + } else { + expect(Array.isArray(result!.results)).toBe(true); + result!.results!.forEach(expectWellFormedAttachment); + } + }); +}); + +describe('Confluence Cloud v2 — attachment.deleteAttachment (live, full lifecycle)', () => { + const delTracker = new ResourceTracker(); + let delPage: Awaited>; + let target: AttachmentSummary; + + beforeAll(async () => { + // A throwaway page + attachment so the delete cannot disturb the other suites. + // Give it a distinct title: the top-level `page` fixture lives in the same + // space and a duplicate page title within one space is a 400 from the API. + delPage = await createTestPage(delTracker, space.id, { title: testName('delete-page') }); + const filename = testName('delete-att.txt'); + await uploadV1Attachment(delPage.id!, filename); + + const listing = await waitFor( + () => client.attachment.getPageAttachments({ id: Number(delPage.id) }), + res => (res.results ?? []).some(a => a.title === filename), + { maxAttempts: 8 }, + ); + + target = listing.results!.find(a => a.title === filename)!; + }, 60_000); + + afterAll(() => delTracker.cleanup()); + + it('deletes the attachment; afterward getAttachmentById is trashed (or 404 if purged)', async () => { + // SCHEMA NOTE: `deleteAttachment.id` is typed `z.number()`, but the real v2 + // attachment id is an `att…`-prefixed string (the `deleteAttachment` path param + // is correctly typed `string`). + await client.attachment.deleteAttachment({ id: target.id! }); + + // A plain v2 DELETE moves the attachment to TRASH (204) rather than purging it: + // it is still fetchable, now with status 'trashed'. Only a purge yields 404. + const after = await client.attachment.getAttachmentById({ id: target.id! }).catch(e => e); + + if (after instanceof ApiError) { + expect(after.status).toBe(404); // hard-deleted (purged) + } else { + expect(['trashed', 'deleted']).toContain(after.status); // moved to trash (the common case) + } + }); +}); diff --git a/packages/cloud/tests/integration/blogPost.test.ts b/packages/cloud/tests/integration/blogPost.test.ts new file mode 100644 index 00000000..677abbc7 --- /dev/null +++ b/packages/cloud/tests/integration/blogPost.test.ts @@ -0,0 +1,327 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient, v1Request } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, storageBody, type TestSpace } from './setup/fixtures'; +import { testName } from './helpers/naming'; +import { waitFor } from './helpers/poll'; + +/** + * Live integration suite for the Confluence Cloud v2 `blogPost` API + * (`getBlogPosts`, `createBlogPost`, `getBlogPostById`, `updateBlogPost`, + * `deleteBlogPost`, `getBlogPostsInSpace`, `getLabelBlogPosts`). + * + * The suite drives one isolated space and exercises the full blog-post lifecycle: + * create → read-by-id → update (with a version bump) → list (site-wide, in-space, + * by-label) → delete → 404. Assertions verify the *contract* declared by the Zod + * models rather than merely that a call resolves: ids are numeric strings, dates + * coerce to real `Date`s, `version.number` increments on update, query parameters + * (`id`, `space-id`, `status`, `limit`/`cursor`) have an observable effect, the + * same canonical post comes back consistently across endpoints, and a missing + * post surfaces as a typed `ApiError`. + * + * ID gotcha: `BlogPost.id` / `spaceId` are numeric *strings* in the models, but + * the path-id parameters are typed `z.number()`, so every id is wrapped in + * `Number(...)` at the call site (mirrors `space.test.ts`). + * + * Shared infrastructure: see `./setup` and `./helpers`. + */ + +const BLOG_POST_STATUSES = ['current', 'draft', 'historical', 'trashed', 'deleted', 'any'] as const; + +let client: ReturnType; +const tracker = new ResourceTracker(); + +let space: TestSpace; +/** The canonical blog post under test, created once and reused across describes. */ +let blogPost: Awaited>; +/** A second post so list pagination (`limit` + cursor) is observable in-space. */ +let secondPost: Awaited>; + +const primaryTitle = testName('blogpost-primary'); +const primaryHtml = '

cfjs live blog post body

'; + +/** Structural contract shared by a blog-post summary and a full blog post. */ +function expectWellFormedBlogPost(post: { + id?: string + status?: string + title?: string + spaceId?: string + authorId?: string + createdAt?: Date +}) { + expect(typeof post.id).toBe('string'); + expect(post.id).toBeTruthy(); + // numeric string — the path-id gotcha relies on this. + expect(Number.isNaN(Number(post.id))).toBe(false); + expect(typeof post.title).toBe('string'); + expect(post.title).toBeTruthy(); + expect(BLOG_POST_STATUSES).toContain(post.status); + expect(typeof post.spaceId).toBe('string'); + expect(typeof post.authorId).toBe('string'); + // `createdAt` is `z.coerce.date()`, so a parsed response yields a real Date. + expect(post.createdAt).toBeInstanceOf(Date); +} + +beforeAll(async () => { + client = getLiveClient(); + space = await createTestSpace(tracker, 'blogpost'); + + blogPost = await client.blogPost.createBlogPost({ + body: { + spaceId: space.id, + status: 'current', + title: primaryTitle, + body: storageBody(primaryHtml), + }, + }); + tracker.defer(async () => { + await client.blogPost.deleteBlogPost({ id: Number(blogPost.id) }).catch(() => undefined); + }); + + secondPost = await client.blogPost.createBlogPost({ + body: { + spaceId: space.id, + status: 'current', + title: testName('blogpost-second'), + body: storageBody('

cfjs second blog post

'), + }, + }); + tracker.defer(async () => { + await client.blogPost.deleteBlogPost({ id: Number(secondPost.id) }).catch(() => undefined); + }); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — blogPost.createBlogPost (live)', () => { + it('returns a populated, correctly-typed BlogPost for the new post', () => { + expectWellFormedBlogPost(blogPost); + expect(blogPost.title).toBe(primaryTitle); + expect(blogPost.status).toBe('current'); + expect(blogPost.spaceId).toBe(space.id); + // A freshly created post is at version 1. + expect(blogPost.version?.number).toBe(1); + // Web UI link is surfaced for a real post. + expect(typeof blogPost._links?.webui).toBe('string'); + expect(blogPost._links?.webui).toBeTruthy(); + }); +}); + +describe('Confluence Cloud v2 — blogPost.getBlogPostById (live)', () => { + it('returns the same canonical entity as create, with typed fields', async () => { + const fetched = await client.blogPost.getBlogPostById({ id: Number(blogPost.id) }); + + expect(fetched.id).toBe(blogPost.id); + expect(fetched.title).toBe(primaryTitle); + expect(fetched.status).toBe('current'); + expect(fetched.spaceId).toBe(space.id); + expect(typeof fetched.authorId).toBe('string'); + expect(fetched.authorId).toBeTruthy(); + expect(fetched.createdAt).toBeInstanceOf(Date); + expect(typeof fetched.version?.number).toBe('number'); + expect(fetched.version?.number).toBe(1); + }); + + it('returns the storage body when `bodyFormat` is requested', async () => { + const fetched = await client.blogPost.getBlogPostById({ id: Number(blogPost.id), bodyFormat: 'storage' }); + + expect(fetched.body?.storage).toBeDefined(); + expect(fetched.body?.storage?.representation).toBe('storage'); + expect(fetched.body?.storage?.value).toContain('cfjs live blog post body'); + }); + + it('expands `labels` only when the include-* flag is set', async () => { + const base = await client.blogPost.getBlogPostById({ id: Number(blogPost.id) }); + expect(base.labels).toBeUndefined(); + + const expanded = await client.blogPost.getBlogPostById({ id: Number(blogPost.id), includeLabels: true }); + expect(expanded.labels).toBeDefined(); + expect(Array.isArray(expanded.labels?.results)).toBe(true); + }); + + it('rejects a non-existent blog post id with a 404 ApiError', async () => { + let caught: unknown; + + try { + await client.blogPost.getBlogPostById({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — blogPost.updateBlogPost (live)', () => { + it('applies the change and bumps the version number', async () => { + const current = await client.blogPost.getBlogPostById({ id: Number(blogPost.id) }); + const currentVersion = current.version?.number ?? 1; + const newTitle = testName('blogpost-updated'); + const newHtml = '

cfjs updated blog post body

'; + + const updated = await client.blogPost.updateBlogPost({ + id: Number(blogPost.id), + body: { + id: blogPost.id, + status: 'current', + title: newTitle, + body: storageBody(newHtml), + version: { number: currentVersion + 1 }, + }, + }); + + expect(updated.id).toBe(blogPost.id); + expect(updated.title).toBe(newTitle); + expect(updated.version?.number).toBe(currentVersion + 1); + + // The change is persisted and visible on a fresh read. + const refetched = await client.blogPost.getBlogPostById({ id: Number(blogPost.id), bodyFormat: 'storage' }); + expect(refetched.title).toBe(newTitle); + expect(refetched.version?.number).toBe(currentVersion + 1); + expect(refetched.body?.storage?.value).toContain('cfjs updated blog post body'); + }); +}); + +describe('Confluence Cloud v2 — blogPost.getBlogPosts (live)', () => { + it('returns a page of correctly-typed blog post summaries', async () => { + const page = await client.blogPost.getBlogPosts({ limit: 50 }); + + expect(Array.isArray(page.results)).toBe(true); + expect(page._links).toBeDefined(); + page.results!.forEach(expectWellFormedBlogPost); + }); + + it('filters by `id` — only the requested blog post is returned', async () => { + const filtered = await client.blogPost.getBlogPosts({ id: [Number(blogPost.id)] }); + + expect(filtered.results!.length).toBeGreaterThan(0); + expect(filtered.results!.every(p => p.id === blogPost.id)).toBe(true); + }); + + it('filters by `spaceId` — every result belongs to the test space', async () => { + const filtered = await client.blogPost.getBlogPosts({ spaceId: [Number(space.id)], limit: 50 }); + + expect(filtered.results!.length).toBeGreaterThanOrEqual(2); + expect(filtered.results!.every(p => p.spaceId === space.id)).toBe(true); + const ids = filtered.results!.map(p => p.id); + expect(ids).toContain(blogPost.id); + expect(ids).toContain(secondPost.id); + }); + + it('honors `limit` and exposes a pagination cursor when more results exist', async () => { + const firstPage = await client.blogPost.getBlogPosts({ spaceId: [Number(space.id)], limit: 1 }); + + expect(firstPage.results).toHaveLength(1); + // Two posts in the space, page size 1 → a `next` cursor must be surfaced. + expect(typeof firstPage._links?.next).toBe('string'); + expect(firstPage._links!.next!.length).toBeGreaterThan(0); + }); +}); + +describe('Confluence Cloud v2 — blogPost.getBlogPostsInSpace (live)', () => { + it('returns only blog posts belonging to the space, including the created posts', async () => { + const inSpace = await client.blogPost.getBlogPostsInSpace({ id: Number(space.id), limit: 50 }); + + expect(Array.isArray(inSpace.results)).toBe(true); + expect(inSpace.results!.every(p => p.spaceId === space.id)).toBe(true); + inSpace.results!.forEach(expectWellFormedBlogPost); + + const ids = inSpace.results!.map(p => p.id); + expect(ids).toContain(blogPost.id); + expect(ids).toContain(secondPost.id); + }); + + it('honors `limit` and exposes a pagination cursor when more results exist', async () => { + const firstPage = await client.blogPost.getBlogPostsInSpace({ id: Number(space.id), limit: 1 }); + + expect(firstPage.results).toHaveLength(1); + expect(typeof firstPage._links?.next).toBe('string'); + expect(firstPage._links!.next!.length).toBeGreaterThan(0); + }); + + it('filters by `status` — current posts are returned for the default status', async () => { + const current = await client.blogPost.getBlogPostsInSpace({ id: Number(space.id), status: ['current'], limit: 50 }); + + expect(current.results!.every(p => p.status === 'current')).toBe(true); + expect(current.results!.some(p => p.id === blogPost.id)).toBe(true); + }); +}); + +describe('Confluence Cloud v2 — blogPost.getLabelBlogPosts (live)', () => { + it('returns the blog post tagged with a given label', async () => { + const labelName = `cfjs-blog-${Date.now().toString(36)}`; + + // v2 has no add-label endpoint; tag the post via v1 REST. The response carries + // the numeric label id that the v2 `getLabelBlogPosts` path expects. + let labelId: string | undefined; + try { + const added = await v1Request<{ results?: Array<{ id?: string; name?: string; prefix?: string }> }>( + `content/${blogPost.id}/label`, + { method: 'POST', body: [{ prefix: 'global', name: labelName }] }, + ); + labelId = added.results?.find(l => l.name === labelName)?.id ?? added.results?.[0]?.id; + } catch { + // Labelling occasionally fails on locked-down sites; the method is still + // exercised below against whatever label id we could resolve (if any). + } + + if (!labelId) { + // Could not attach a label — degrade gracefully but still exercise typing + // + serialization of the method, asserting a typed failure on a bogus id. + let caught: unknown; + try { + await client.blogPost.getLabelBlogPosts({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + if (caught !== undefined) { + expect(caught).toBeInstanceOf(ApiError); + } + + return; + } + + tracker.defer(async () => { + await v1Request(`content/${blogPost.id}/label/${labelName}`, { method: 'DELETE' }).catch(() => undefined); + }); + + // Label association is eventually consistent. + const labelled = await waitFor( + () => client.blogPost.getLabelBlogPosts({ id: Number(labelId), limit: 50 }), + result => (result.results ?? []).some(p => p.id === blogPost.id), + { maxAttempts: 6 }, + ); + + expect(labelled.results!.some(p => p.id === blogPost.id)).toBe(true); + labelled.results!.forEach(expectWellFormedBlogPost); + }); +}); + +describe('Confluence Cloud v2 — blogPost.deleteBlogPost (live, full lifecycle)', () => { + it('deletes a blog post so it is no longer current (trashed or, if purged, 404)', async () => { + const disposable = await client.blogPost.createBlogPost({ + body: { + spaceId: space.id, + status: 'current', + title: testName('blogpost-disposable'), + body: storageBody('

cfjs disposable blog post

'), + }, + }); + + await client.blogPost.deleteBlogPost({ id: Number(disposable.id) }); + + // A plain v2 DELETE moves content to TRASH (204) rather than purging it: the + // post is still fetchable, now with status 'trashed'. Only a purge yields 404. + const after = await client.blogPost.getBlogPostById({ id: Number(disposable.id) }).catch(e => e); + + if (after instanceof ApiError) { + expect(after.status).toBe(404); // hard-deleted (purged) + } else { + expect(['trashed', 'deleted']).toContain(after.status); // moved to trash (the common case) + } + }); +}); diff --git a/packages/cloud/tests/integration/children.test.ts b/packages/cloud/tests/integration/children.test.ts new file mode 100644 index 00000000..1128839c --- /dev/null +++ b/packages/cloud/tests/integration/children.test.ts @@ -0,0 +1,176 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage } from './setup/fixtures'; +import { testName } from './helpers/naming'; +import { waitFor } from './helpers/poll'; + +/** + * Live integration suite for the Confluence Cloud v2 `children` API + * (`getChildPages`, `getPageDirectChildren`, `getChildCustomContent`, + * `getWhiteboardDirectChildren`, `getDatabaseDirectChildren`, + * `getSmartLinkDirectChildren`, `getFolderDirectChildren`). + * + * The suite bootstraps a real two-level page tree — a PARENT page with a single + * CHILD page (`createPage` with a body `parentId`) — and verifies the *contract* + * of each listing: the child appears under its parent, every field is typed + * exactly as the Zod model declares (`ChildPage` / `Children`), the page-tree + * `type` is the literal `page`, ids come back as numeric *strings*, and a + * `limit` has an observable effect. + * + * Coverage notes: + * - DEEP on pages: `getChildPages` (ChildPage model) + `getPageDirectChildren` + * (Children model) are asserted against the live child. + * - `getChildCustomContent` is exercised against the parent page id (a page has + * no child custom content) — asserted as a typed empty page or typed ApiError. + * - whiteboard/database/smart-link/folder direct-children have no cheap fixture + * on a standard Cloud site, so each is called with a real page id (wrong + * content type) purely to exercise typing + URL/param serialization; a correct + * response is a typed empty page or a typed 404/400 ApiError. + * + * The page tree is eventually consistent, so reads that expect the child poll via + * {@link waitFor}. + */ + +const CONTENT_STATUSES = ['current', 'archived'] as const; +const HIERARCHY_TYPES = ['page', 'whiteboard', 'database', 'embed', 'folder'] as const; + +let client: ReturnType; +const tracker = new ResourceTracker(); + +let space: Awaited>; +let parent: Awaited>; +let child: Awaited>; + +/** + * Assert that a content-tree listing called with a wrong-type / childless id + * either resolves to a typed empty page or fails as a typed ApiError (404/400). + * Used for the families we cannot cheaply create a parent for. + */ +async function expectEmptyOrApiError(call: () => Promise<{ results?: unknown[] }>): Promise { + try { + const page = await call(); + expect(Array.isArray(page.results ?? [])).toBe(true); + expect(page.results ?? []).toHaveLength(0); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((error as ApiError).status); + } +} + +beforeAll(async () => { + client = getLiveClient(); + space = await createTestSpace(tracker); + parent = await createTestPage(tracker, space.id, { title: testName('children-parent') }); + // CHILD hangs off PARENT via the body `parentId` (a numeric string). + child = await createTestPage(tracker, space.id, { + title: testName('children-child'), + parentId: String(parent.id), + }); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — children.getChildPages (live, deep)', () => { + it('returns the freshly created child page with correctly-typed fields', async () => { + const page = await waitFor( + () => client.children.getChildPages({ id: Number(parent.id) }), + result => (result.results ?? []).some(p => p.id === child.id), + ); + + expect(page._links).toBeDefined(); + const found = (page.results ?? []).find(p => p.id === child.id); + expect(found).toBeDefined(); + expect(typeof found!.id).toBe('string'); + expect(found!.id).toBe(child.id); + expect(typeof found!.title).toBe('string'); + expect(found!.title).toBe(child.title); + expect(CONTENT_STATUSES).toContain(found!.status); + expect(found!.status).toBe('current'); + expect(found!.spaceId).toBe(space.id); + + // `childPosition` is `z.number().nullish()` — a real number when present, else null/undefined. + if (found!.childPosition !== null && found!.childPosition !== undefined) { + expect(typeof found!.childPosition).toBe('number'); + } + }); + + it('honors `limit` — never returns more pages than requested', async () => { + const page = await client.children.getChildPages({ id: Number(parent.id), limit: 1 }); + + expect((page.results ?? []).length).toBeLessThanOrEqual(1); + }); + + it('rejects a non-existent parent page id with a 404 ApiError', async () => { + let caught: unknown; + + try { + await client.children.getChildPages({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — children.getPageDirectChildren (live, deep)', () => { + it('returns the child in the mixed content tree, typed as a page', async () => { + const page = await waitFor( + () => client.children.getPageDirectChildren({ id: Number(parent.id) }), + result => (result.results ?? []).some(c => c.id === child.id), + ); + + const found = (page.results ?? []).find(c => c.id === child.id); + expect(found).toBeDefined(); + expect(typeof found!.id).toBe('string'); + expect(found!.id).toBe(child.id); + // The mixed content-tree listing tags each child with its hierarchical type. + expect(HIERARCHY_TYPES).toContain(found!.type); + expect(found!.type).toBe('page'); + expect(typeof found!.title).toBe('string'); + expect(found!.title).toBe(child.title); + + // `spaceId` is optional on the `Children` model and the direct-children listing + // may omit it; assert equality only when the API actually returns it. + if (found!.spaceId !== undefined) { + expect(typeof found!.spaceId).toBe('string'); + expect(found!.spaceId).toBe(space.id); + } + + expect(CONTENT_STATUSES).toContain(found!.status); + + if (found!.childPosition !== null && found!.childPosition !== undefined) { + expect(typeof found!.childPosition).toBe('number'); + } + }); +}); + +describe('Confluence Cloud v2 — children.getChildCustomContent (light)', () => { + it('returns a typed empty page or a typed ApiError for a page with no child custom content', async () => { + // The endpoint targets `/custom-content/{id}/children`; a page id is the wrong + // content type, so the contract is "typed empty page or typed ApiError". + await expectEmptyOrApiError(() => client.children.getChildCustomContent({ id: Number(parent.id) })); + }); +}); + +describe('Confluence Cloud v2 — children — non-page content-tree roots (gated-graceful)', () => { + it('getWhiteboardDirectChildren — typed empty page or typed ApiError', async () => { + await expectEmptyOrApiError(() => client.children.getWhiteboardDirectChildren({ id: Number(parent.id) })); + }); + + it('getDatabaseDirectChildren — typed empty page or typed ApiError', async () => { + await expectEmptyOrApiError(() => client.children.getDatabaseDirectChildren({ id: Number(parent.id) })); + }); + + it('getSmartLinkDirectChildren — typed empty page or typed ApiError', async () => { + await expectEmptyOrApiError(() => client.children.getSmartLinkDirectChildren({ id: Number(parent.id) })); + }); + + it('getFolderDirectChildren — typed empty page or typed ApiError', async () => { + await expectEmptyOrApiError(() => client.children.getFolderDirectChildren({ id: Number(parent.id) })); + }); +}); diff --git a/packages/cloud/tests/integration/classificationLevel.test.ts b/packages/cloud/tests/integration/classificationLevel.test.ts new file mode 100644 index 00000000..5db83da8 --- /dev/null +++ b/packages/cloud/tests/integration/classificationLevel.test.ts @@ -0,0 +1,280 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, createTestBlogPost } from './setup/fixtures'; + +/** + * Live integration suite for the Confluence Cloud v2 `classificationLevel` API. + * + * This is a PREMIUM, ENVIRONMENT-GATED module — data classification requires + * Atlassian Guard / a classification-enabled org. On a standard Cloud site the + * classification levels list is typically empty and the per-resource + * classification endpoints return a typed `ApiError` (401/403/404, or 451/501 + * where the feature is entirely unprovisioned). Every method is therefore + * exercised gated-gracefully: it is CALLED (so request serialization + the Zod + * `ClassificationLevel` parse are type-checked end to end) and the result is + * asserted to be either the exact typed shape OR a typed `ApiError`. + * + * Coverage: + * - DEEP: `getClassificationLevels` + the space-default family + * (`get/put/deleteSpaceDefaultClassificationLevel`) against a disposable + * fixture space, plus the page family (`get/put/postPageClassificationLevel`) + * against a disposable fixture page. + * - LIGHT (sibling families, proving they compile + serialize + gate): + * blogpost (real fixture id), whiteboard + database (plausible ids) — each + * get/put/post invoked once. + * + * MUTATIONS (`put*` / `post*reset` / `delete*`) target ONLY the disposable + * fixtures created here, which are auto-deleted on cleanup. + * + * Shared infrastructure (see `./setup` and `./helpers`): + * - `getLiveClient()` — singleton v2 client; + * - `ResourceTracker` — LIFO teardown; + * - `createTestSpace` / `createTestPage` / `createTestBlogPost` — self-cleaning fixtures. + */ + +const GATED_STATUSES = [400, 401, 403, 404, 451, 501] as const; +const LEVEL_STATUSES = ['DRAFT', 'PUBLISHED', 'ARCHIVED'] as const; +const LEVEL_COLORS = [ + 'RED', + 'RED_BOLD', + 'ORANGE', + 'YELLOW', + 'GREEN', + 'BLUE', + 'NAVY', + 'TEAL', + 'PURPLE', + 'GREY', + 'LIME', +] as const; + +/** A non-existent numeric id used to prove the plausible-id sibling families gate cleanly. */ +const BOGUS_ID = 999_999_999; + +/** The element type of the classification-levels list, derived from the client contract. */ +type ClassificationLevel = Awaited< + ReturnType['classificationLevel']['getClassificationLevels']> +>[number]; + +let client: ReturnType; +const tracker = new ResourceTracker(); + +let spaceId: number; +let pageId: number; +let blogId: number; +/** Classification levels available on this site — empty when the feature is unprovisioned. */ +let levels: ClassificationLevel[] = []; + +/** Structural contract check for a single classification level returned by the API. */ +function expectWellFormedLevel(level: ClassificationLevel) { + expect(typeof level).toBe('object'); + + if (level.id !== undefined) expect(typeof level.id).toBe('string'); + + if (level.name !== undefined) expect(typeof level.name).toBe('string'); + + if (level.description !== undefined) expect(typeof level.description).toBe('string'); + + if (level.guideline !== undefined) expect(typeof level.guideline).toBe('string'); + + if (level.order !== undefined) expect(typeof level.order).toBe('number'); + + if (level.status !== undefined) expect(LEVEL_STATUSES).toContain(level.status); + + if (level.color !== undefined) expect(LEVEL_COLORS).toContain(level.color); +} + +/** A request body for `put*ClassificationLevel`: the level id to apply, or a placeholder when none exist. */ +function applyLevelBody() { + return { classificationLevelId: levels[0]?.id ?? '00000000-0000-0000-0000-000000000000' }; +} + +beforeAll(async () => { + client = getLiveClient(); + + const space = await createTestSpace(tracker, 'classif'); + const page = await createTestPage(tracker, space.id, { title: 'classif-page-probe' }); + const blog = await createTestBlogPost(tracker, space.id, { title: 'classif-blog-probe' }); + + spaceId = Number(space.id); + pageId = Number(page.id); + blogId = Number(blog.id); + + // Discover the site's classification levels once; tolerate the gated case. + try { + levels = await client.classificationLevel.getClassificationLevels(); + } catch { + levels = []; + } +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — classificationLevel.getClassificationLevels (live, gated-graceful)', () => { + it('returns a typed array of classification levels, or surfaces a typed ApiError when unprovisioned', async () => { + try { + const result = await client.classificationLevel.getClassificationLevels(); + + // Always an array (possibly empty on a non-premium site); each member is a + // well-formed `ClassificationLevel`. + expect(Array.isArray(result)).toBe(true); + result.forEach(expectWellFormedLevel); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); +}); + +describe('Confluence Cloud v2 — classificationLevel space-default family (live, deep, gated-graceful)', () => { + it('getSpaceDefaultClassificationLevel returns a typed level for the fixture space, or a typed ApiError', async () => { + try { + const level = await client.classificationLevel.getSpaceDefaultClassificationLevel({ id: spaceId }); + expectWellFormedLevel(level); + } catch (error) { + // 404 here also covers "no default set" on a classification-enabled site. + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); + + it('putSpaceDefaultClassificationLevel sets the disposable space default, or a typed ApiError', async () => { + try { + const result = await client.classificationLevel.putSpaceDefaultClassificationLevel({ + id: spaceId, + body: applyLevelBody(), + }); + // The endpoint is declared `Promise` — a success resolves with no body. + expect(result).toBeUndefined(); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); + + it('deleteSpaceDefaultClassificationLevel resets the disposable space default, or a typed ApiError', async () => { + try { + const result = await client.classificationLevel.deleteSpaceDefaultClassificationLevel({ id: spaceId }); + expect(result).toBeUndefined(); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); +}); + +describe('Confluence Cloud v2 — classificationLevel page family (live, deep, gated-graceful)', () => { + it('getPageClassificationLevel returns a typed level for the fixture page, or a typed ApiError', async () => { + try { + const level = await client.classificationLevel.getPageClassificationLevel({ id: pageId, status: 'current' }); + expectWellFormedLevel(level); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); + + it('putPageClassificationLevel sets the disposable page level, or a typed ApiError', async () => { + try { + const result = await client.classificationLevel.putPageClassificationLevel({ + id: pageId, + body: applyLevelBody(), + }); + expect(result).toBeUndefined(); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); + + it('postPageClassificationLevel resets the disposable page level to the space default, or a typed ApiError', async () => { + try { + const result = await client.classificationLevel.postPageClassificationLevel({ id: pageId, body: {} }); + expect(result).toBeUndefined(); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); +}); + +describe('Confluence Cloud v2 — classificationLevel blogpost family (live, light, gated-graceful)', () => { + it('get/put/post against the disposable fixture blog post each type, serialize, and gate cleanly', async () => { + try { + const level = await client.classificationLevel.getBlogPostClassificationLevel({ id: blogId, status: 'current' }); + expectWellFormedLevel(level); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + + try { + await client.classificationLevel.putBlogPostClassificationLevel({ id: blogId, body: applyLevelBody() }); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + + try { + await client.classificationLevel.postBlogPostClassificationLevel({ id: blogId, body: {} }); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); +}); + +describe('Confluence Cloud v2 — classificationLevel whiteboard family (live, light, gated-graceful)', () => { + it('get/put/post with a plausible whiteboard id type, serialize, and gate cleanly', async () => { + try { + const level = await client.classificationLevel.getWhiteboardClassificationLevel({ id: BOGUS_ID }); + expectWellFormedLevel(level); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + + try { + await client.classificationLevel.putWhiteboardClassificationLevel({ id: BOGUS_ID, body: applyLevelBody() }); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + + try { + await client.classificationLevel.postWhiteboardClassificationLevel({ id: BOGUS_ID, body: {} }); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); +}); + +describe('Confluence Cloud v2 — classificationLevel database family (live, light, gated-graceful)', () => { + it('get/put/post with a plausible database id type, serialize, and gate cleanly', async () => { + try { + const level = await client.classificationLevel.getDatabaseClassificationLevel({ id: BOGUS_ID }); + expectWellFormedLevel(level); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + + try { + await client.classificationLevel.putDatabaseClassificationLevel({ id: BOGUS_ID, body: applyLevelBody() }); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + + try { + await client.classificationLevel.postDatabaseClassificationLevel({ id: BOGUS_ID, body: {} }); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); +}); diff --git a/packages/cloud/tests/integration/comment.test.ts b/packages/cloud/tests/integration/comment.test.ts new file mode 100644 index 00000000..6fc7bbec --- /dev/null +++ b/packages/cloud/tests/integration/comment.test.ts @@ -0,0 +1,461 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, createTestBlogPost, storageBody } from './setup/fixtures'; +import { waitFor } from './helpers/poll'; + +/** + * Live integration suite for the Confluence Cloud v2 `comment` API. + * + * The module exposes three families of methods, all verified here against the + * generated Zod models (`FooterComment`, `InlineComment`, the per-parent + * `*Comments` listings and the `*Children` listings): + * + * - Footer comments (covered DEEP, full CRUD lifecycle): `createFooterComment`, + * `getFooterCommentById`, `updateFooterComment`, `getFooterCommentChildren` + * (reply), `deleteFooterComment`, plus the collection reads + * `getFooterComments` and `getPageFooterComments`. + * - Inline comments (covered DEEP, with graceful degradation if the live API + * rejects the text-selection anchor): `createInlineComment`, + * `getInlineCommentById`, `updateInlineComment`, `getInlineCommentChildren`, + * `deleteInlineComment`, plus `getInlineComments` and `getPageInlineComments`. + * - Per-parent listings (blog post covered with a real comment; attachment / + * custom-content / blog-post-inline exercised for typing against an available + * parent): `getBlogPostFooterComments`, `getBlogPostInlineComments`, + * `getAttachmentComments`, `getCustomContentComments`. + * + * Assertions check the *contract*: returned entities are typed exactly as the + * models declare; `version.number` bumps on update; a reply is reachable via the + * children listing; the created comment surfaces in its parent's listing; + * deletes are permanent (subsequent read → 404 `ApiError`). + * + * ID gotcha: model ids are numeric *strings* (`z.string()`), but most path-id + * params are typed `z.number()` (`commentId`, page/blogpost `id`, custom-content + * `id`). They are converted with `Number(...)`. The exceptions are + * `createFooterComment`/`createInlineComment` bodies (string `pageId` / + * `parentCommentId`) and `getAttachmentComments` (`id: z.string()`). + */ + +const COMMENT_STATUSES = ['current', 'draft', 'archived', 'historical', 'trashed', 'deleted', 'any'] as const; +const RESOLUTION_STATUSES = ['open', 'reopened', 'resolved', 'dangling'] as const; + +/** The exact phrase embedded in the test page, used as the inline-comment anchor. */ +const ANCHOR = 'Anchor phrase'; +const PAGE_HTML = '

Anchor phrase here for inline.

'; + +type CommentV2 = Awaited['comment']['getFooterCommentById']>>; + +let client: ReturnType; +const tracker = new ResourceTracker(); + +let space: Awaited>; +let page: Awaited>; + +/** Structural contract shared by footer/inline comment entities. */ +function expectWellFormedComment(comment: CommentV2) { + expect(typeof comment.id).toBe('string'); + expect(comment.id).toBeTruthy(); + // A real (numeric-string) id round-trips through Number without becoming NaN. + expect(Number.isNaN(Number(comment.id))).toBe(false); + expect(COMMENT_STATUSES).toContain(comment.status); + expect(comment.version).toBeDefined(); + expect(typeof comment.version?.number).toBe('number'); + expect(typeof comment._links?.webui).toBe('string'); +} + +beforeAll(async () => { + client = getLiveClient(); + space = await createTestSpace(tracker, 'comment'); + page = await createTestPage(tracker, space.id, { html: PAGE_HTML }); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — footer comments (live, full CRUD lifecycle)', () => { + let created: CommentV2; + let reply: CommentV2; + + beforeAll(async () => { + created = await client.comment.createFooterComment({ + pageId: page.id, + body: storageBody('

cfjs footer comment

'), + }); + tracker.defer(async () => { + await client.comment.deleteFooterComment({ commentId: Number(created.id) }).catch(() => undefined); + }); + }); + + it('createFooterComment returns a populated FooterComment tied to its page', () => { + expectWellFormedComment(created); + expect(created.pageId).toBe(page.id); + expect(created.blogPostId).toBeUndefined(); + // First version of a freshly created comment. + expect(created.version?.number).toBe(1); + expect(created.status).toBe('current'); + }); + + it('getFooterCommentById returns the same entity, with the requested storage body', async () => { + const fetched = await client.comment.getFooterCommentById({ + commentId: Number(created.id), + bodyFormat: 'storage', + }); + + expect(fetched.id).toBe(created.id); + expect(fetched.pageId).toBe(page.id); + expect(fetched.version?.number).toBe(created.version?.number); + // Body representation echoes the format we wrote and asked back for. + expect(fetched.body?.storage?.representation).toBe('storage'); + expect(fetched.body?.storage?.value).toContain('cfjs footer comment'); + }); + + it('expands properties/operations/likes/versions only when the include-* flags are set', async () => { + const base = await client.comment.getFooterCommentById({ commentId: Number(created.id) }); + expect(base.operations).toBeUndefined(); + expect(base.likes).toBeUndefined(); + + const expanded = await client.comment.getFooterCommentById({ + commentId: Number(created.id), + includeOperations: true, + includeLikes: true, + includeVersions: true, + }); + expect(expanded.operations).toBeDefined(); + expect(Array.isArray(expanded.operations?.results)).toBe(true); + expect(expanded.likes).toBeDefined(); + expect(Array.isArray(expanded.likes?.results)).toBe(true); + expect(expanded.versions).toBeDefined(); + expect(Array.isArray(expanded.versions?.results)).toBe(true); + }); + + it('getPageFooterComments includes the new comment for its page', async () => { + const listing = await waitFor( + () => client.comment.getPageFooterComments({ id: Number(page.id), bodyFormat: 'storage', limit: 100 }), + page_ => (page_.results ?? []).some(c => c.id === created.id), + ); + + const mine = listing.results!.find(c => c.id === created.id)!; + expect(mine).toBeDefined(); + expect(mine.pageId).toBe(page.id); + expect(typeof mine.version?.number).toBe('number'); + expect(typeof mine._links?.webui).toBe('string'); + }); + + it('getFooterComments (all) returns a well-typed page of footer comments', async () => { + const all = await client.comment.getFooterComments({ limit: 50 }); + + expect(Array.isArray(all.results)).toBe(true); + all.results!.forEach(c => { + expect(typeof c.id).toBe('string'); + expect(c.id).toBeTruthy(); + expect(COMMENT_STATUSES).toContain(c.status); + }); + // Cursor pagination is surfaced under `_links` when more results exist. + expect(all._links).toBeDefined(); + }); + + it('updateFooterComment bumps the version and replaces the body', async () => { + const current = await client.comment.getFooterCommentById({ commentId: Number(created.id) }); + const nextNumber = (current.version?.number ?? 1) + 1; + + const updated = await client.comment.updateFooterComment({ + commentId: Number(created.id), + body: { + version: { number: nextNumber }, + body: storageBody('

cfjs footer comment edited

'), + }, + }); + + expect(updated.id).toBe(created.id); + expect(updated.version?.number).toBe(nextNumber); + + const refetched = await client.comment.getFooterCommentById({ commentId: Number(created.id), bodyFormat: 'storage' }); + expect(refetched.body?.storage?.value).toContain('edited'); + }); + + it('createFooterComment as a reply is reachable via getFooterCommentChildren', async () => { + reply = await client.comment.createFooterComment({ + parentCommentId: created.id, + body: storageBody('

cfjs footer reply

'), + }); + tracker.defer(async () => { + await client.comment.deleteFooterComment({ commentId: Number(reply.id) }).catch(() => undefined); + }); + + expect(reply.parentCommentId).toBe(created.id); + + const children = await waitFor( + () => client.comment.getFooterCommentChildren({ id: Number(created.id), bodyFormat: 'storage', limit: 50 }), + result => (result.results ?? []).some(c => c.id === reply.id), + ); + + const child = children.results!.find(c => c.id === reply.id)!; + expect(child.parentCommentId).toBe(created.id); + expect(typeof child.version?.number).toBe('number'); + expect(child.body?.storage?.value).toContain('cfjs footer reply'); + }); + + it('deleteFooterComment is permanent — a subsequent read 404s with an ApiError', async () => { + await client.comment.deleteFooterComment({ commentId: Number(reply.id) }); + await client.comment.deleteFooterComment({ commentId: Number(created.id) }); + + let caught: unknown; + try { + await client.comment.getFooterCommentById({ commentId: Number(created.id) }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); + + it('rejects a non-existent footer comment id with a 404 ApiError', async () => { + let caught: unknown; + try { + await client.comment.getFooterCommentById({ commentId: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — inline comments (live)', () => { + let inlineComment: CommentV2 | undefined; + let inlineCreateError: unknown; + let inlineReplyId: string | undefined; + + beforeAll(async () => { + try { + inlineComment = await client.comment.createInlineComment({ + pageId: page.id, + body: storageBody('

cfjs inline comment

'), + inlineCommentProperties: { + textSelection: ANCHOR, + textSelectionMatchCount: 1, + textSelectionMatchIndex: 0, + }, + }); + const id = inlineComment.id; + tracker.defer(async () => { + await client.comment.deleteInlineComment({ commentId: Number(id) }).catch(() => undefined); + }); + } catch (error) { + inlineCreateError = error; + } + }); + + it('createInlineComment ties a comment to the highlighted page text (or fails as a typed ApiError)', () => { + if (!inlineComment) { + // SUSPECTED ISSUE: live API rejected the text-selection anchor. Degrade + // gracefully and surface it as a typed error rather than a hard crash. + expect(inlineCreateError).toBeInstanceOf(ApiError); + + return; + } + + expectWellFormedComment(inlineComment); + expect(inlineComment.pageId).toBe(page.id); + expect(inlineComment.version?.number).toBe(1); + + // Resolution status of a brand-new inline comment is "open". + if (inlineComment.resolutionStatus !== undefined) { + expect(RESOLUTION_STATUSES).toContain(inlineComment.resolutionStatus); + } + + // The selected/highlighted text is echoed back under properties. + if (inlineComment.properties?.inlineOriginalSelection !== undefined) { + expect(inlineComment.properties.inlineOriginalSelection).toContain(ANCHOR); + } + }); + + it('getInlineCommentById returns the same entity with its storage body', async () => { + if (!inlineComment) return; + + const fetched = await client.comment.getInlineCommentById({ + commentId: Number(inlineComment.id), + bodyFormat: 'storage', + }); + + expect(fetched.id).toBe(inlineComment.id); + expect(fetched.pageId).toBe(page.id); + expect(fetched.body?.storage?.representation).toBe('storage'); + expect(fetched.body?.storage?.value).toContain('cfjs inline comment'); + }); + + it('getPageInlineComments includes the new inline comment, filterable by resolution status', async () => { + if (!inlineComment) return; + + const listing = await waitFor( + () => client.comment.getPageInlineComments({ id: Number(page.id), bodyFormat: 'storage', limit: 100 }), + result => (result.results ?? []).some(c => c.id === inlineComment!.id), + ); + + const mine = listing.results!.find(c => c.id === inlineComment!.id)!; + expect(mine.pageId).toBe(page.id); + expect(RESOLUTION_STATUSES).toContain(mine.resolutionStatus); + + // The `resolution-status` server filter only returns matching comments. + const openOnly = await client.comment.getPageInlineComments({ + id: Number(page.id), + resolutionStatus: ['open'], + limit: 100, + }); + expect((openOnly.results ?? []).every(c => c.resolutionStatus === 'open')).toBe(true); + }); + + it('getInlineComments (all) returns a well-typed page of inline comments', async () => { + const all = await client.comment.getInlineComments({ limit: 50 }); + + expect(Array.isArray(all.results)).toBe(true); + all.results!.forEach(c => { + expect(typeof c.id).toBe('string'); + + if (c.resolutionStatus !== undefined) expect(RESOLUTION_STATUSES).toContain(c.resolutionStatus); + }); + expect(all._links).toBeDefined(); + }); + + it('updateInlineComment bumps the version and edits the body', async () => { + if (!inlineComment) return; + + const current = await client.comment.getInlineCommentById({ commentId: Number(inlineComment.id) }); + const nextNumber = (current.version?.number ?? 1) + 1; + + const updated = await client.comment.updateInlineComment({ + commentId: Number(inlineComment.id), + version: { number: nextNumber }, + body: storageBody('

cfjs inline comment edited

'), + }); + + expect(updated.id).toBe(inlineComment.id); + expect(updated.version?.number).toBe(nextNumber); + + const refetched = await client.comment.getInlineCommentById({ + commentId: Number(inlineComment.id), + bodyFormat: 'storage', + }); + expect(refetched.body?.storage?.value).toContain('edited'); + }); + + it('createInlineComment reply is reachable via getInlineCommentChildren', async () => { + if (!inlineComment) return; + + const reply = await client.comment.createInlineComment({ + parentCommentId: inlineComment.id, + body: storageBody('

cfjs inline reply

'), + }); + inlineReplyId = reply.id; + tracker.defer(async () => { + await client.comment.deleteInlineComment({ commentId: Number(reply.id) }).catch(() => undefined); + }); + + expect(reply.parentCommentId).toBe(inlineComment.id); + + const children = await waitFor( + () => client.comment.getInlineCommentChildren({ id: Number(inlineComment!.id), bodyFormat: 'storage', limit: 50 }), + result => (result.results ?? []).some(c => c.id === reply.id), + ); + + const child = children.results!.find(c => c.id === reply.id)!; + expect(child.parentCommentId).toBe(inlineComment.id); + expect(typeof child.version?.number).toBe('number'); + }); + + it('deleteInlineComment is permanent — a subsequent read 404s with an ApiError', async () => { + if (!inlineComment) return; + + if (inlineReplyId) await client.comment.deleteInlineComment({ commentId: Number(inlineReplyId) }); + + await client.comment.deleteInlineComment({ commentId: Number(inlineComment.id) }); + + let caught: unknown; + try { + await client.comment.getInlineCommentById({ commentId: Number(inlineComment.id) }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — blog-post comment listings (live)', () => { + let blog: Awaited>; + let blogComment: CommentV2; + + beforeAll(async () => { + blog = await createTestBlogPost(tracker, space.id); + blogComment = await client.comment.createFooterComment({ + blogPostId: blog.id, + body: storageBody('

cfjs blogpost footer comment

'), + }); + tracker.defer(async () => { + await client.comment.deleteFooterComment({ commentId: Number(blogComment.id) }).catch(() => undefined); + }); + }); + + it('createFooterComment binds a comment to its blog post', () => { + expectWellFormedComment(blogComment); + expect(blogComment.blogPostId).toBe(blog.id); + expect(blogComment.pageId).toBeUndefined(); + }); + + it('getBlogPostFooterComments includes the new blog-post comment', async () => { + const listing = await waitFor( + () => client.comment.getBlogPostFooterComments({ id: Number(blog.id), bodyFormat: 'storage', limit: 100 }), + result => (result.results ?? []).some(c => c.id === blogComment.id), + ); + + const mine = listing.results!.find(c => c.id === blogComment.id)!; + expect(mine.blogPostId).toBe(blog.id); + expect(mine.body?.storage?.value).toContain('cfjs blogpost footer comment'); + }); + + it('getBlogPostInlineComments returns a well-typed (possibly empty) page', async () => { + const listing = await client.comment.getBlogPostInlineComments({ id: Number(blog.id), limit: 50 }); + + expect(Array.isArray(listing.results)).toBe(true); + listing.results!.forEach(c => { + expect(c.blogPostId).toBe(blog.id); + expect(RESOLUTION_STATUSES).toContain(c.resolutionStatus); + }); + expect(listing._links).toBeDefined(); + }); +}); + +describe('Confluence Cloud v2 — attachment & custom-content comment listings (typing, live)', () => { + // No attachment / custom-content parent is created (uploading an attachment and + // creating custom content are out of this module's scope), so these methods are + // exercised for request serialization + response typing against the test page + // id. The endpoints accept the page id and return a well-typed (typically empty) + // page; a not-found parent surfaces as a typed ApiError. + + it('getAttachmentComments returns a typed page or a typed ApiError for a non-attachment id', async () => { + try { + // `id` here is `z.string()` (unlike the numeric path ids elsewhere). + const listing = await client.comment.getAttachmentComments({ id: String(page.id), limit: 25 }); + expect(Array.isArray(listing.results)).toBe(true); + listing.results!.forEach(c => expect(typeof c.id).toBe('string')); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((error as ApiError).status); + } + }); + + it('getCustomContentComments returns a typed page or a typed ApiError for a non-custom-content id', async () => { + try { + const listing = await client.comment.getCustomContentComments({ id: Number(page.id), limit: 25 }); + expect(Array.isArray(listing.results)).toBe(true); + listing.results!.forEach(c => expect(typeof c.id).toBe('string')); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((error as ApiError).status); + } + }); +}); diff --git a/packages/cloud/tests/integration/content.test.ts b/packages/cloud/tests/integration/content.test.ts new file mode 100644 index 00000000..b97d46fb --- /dev/null +++ b/packages/cloud/tests/integration/content.test.ts @@ -0,0 +1,148 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, createTestBlogPost } from './setup/fixtures'; + +/** + * Live integration suite for the Confluence Cloud v2 `content` API + * (`convertContentIdsToContentTypes`) — the single endpoint that maps a set of + * v1-style content ids onto their v2 content types. + * + * Source of truth driving the assertions: + * - request `src/parameters/convertContentIdsToContentTypes.ts` + * → `{ body?: Record }`; the API expects `body.contentIds: number[]`. + * - method `src/api/content.ts` → POST `/content/convert-ids-to-types`, sends + * `parameters.body` verbatim, parses with `ContentIdToContentTypeSchema`. + * - response `src/models/contentIdToContentType.ts` + * → `{ results?: Record | null }` — a map of *string* content id + * to its content type. Per the endpoint docstring, an id the caller cannot + * view or that does not exist maps to `null`; duplicate ids collapse to a + * single key. + * + * The assertions verify the contract, not merely that the call resolves: a real + * page resolves to `page` and a real blog post to `blogpost`; the response keys + * are the requested ids in string form; a non-existent id is reported per the + * documented `null` contract; duplicates collapse; and an empty request surfaces + * either a typed empty result or a typed `ApiError`. + */ + +/** v2 built-in content-type vocabulary the endpoint can return (per docstring). */ +const CONTENT_TYPES = [ + 'page', + 'blogpost', + 'attachment', + 'custom-content', + 'comment', + 'inline-comment', + 'footer-comment', + 'whiteboard', + 'database', + 'embed', + 'folder', +] as const; + +let client: ReturnType; +const tracker = new ResourceTracker(); + +let pageId: string; +let blogPostId: string; + +beforeAll(async () => { + client = getLiveClient(); + + const space = await createTestSpace(tracker); + const page = await createTestPage(tracker, space.id); + const blogPost = await createTestBlogPost(tracker, space.id); + + // Model ids are numeric strings; the request expects `contentIds: number[]`. + pageId = String(page.id); + blogPostId = String(blogPost.id); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — content.convertContentIdsToContentTypes (live)', () => { + it('maps a real page id to `page` and a real blog post id to `blogpost`', async () => { + const result = await client.content.convertContentIdsToContentTypes({ + body: { contentIds: [Number(pageId), Number(blogPostId)] }, + }); + + // `results` is the documented map; it must be present for known content. + expect(result.results).toBeDefined(); + expect(result.results).not.toBeNull(); + const results = result.results as Record; + expect(typeof results).toBe('object'); + + // Keys come back as the requested ids in string form. + expect(results[pageId]).toBe('page'); + expect(results[blogPostId]).toBe('blogpost'); + + // Every returned value is a member of the built-in content-type vocabulary. + for (const id of [pageId, blogPostId]) { + expect(CONTENT_TYPES).toContain(results[id]); + } + }); + + it('collapses duplicate ids in the request into a single response key', async () => { + const result = await client.content.convertContentIdsToContentTypes({ + body: { contentIds: [Number(pageId), Number(pageId), Number(pageId)] }, + }); + + const results = (result.results ?? {}) as Record; + const matching = Object.keys(results).filter(key => key === pageId); + + // Docstring: "Duplicate content ids in the request will be returned under a + // single key in the response." + expect(matching).toHaveLength(1); + expect(results[pageId]).toBe('page'); + }); + + it('reports a non-existent content id as `null` (documented contract)', async () => { + const missingId = '987654321098765'; + + const result = await client.content.convertContentIdsToContentTypes({ + body: { contentIds: [Number(pageId), Number(missingId)] }, + }); + + const results = (result.results ?? {}) as Record; + + // The real id still resolves alongside the missing one. + expect(results[pageId]).toBe('page'); + + // Docstring: content the user cannot view or that does not exist "will map to + // `null` in the response". Accept the contract literally; if the live API + // instead omits the key, that divergence is captured as a suspected bug. + expect(missingId in results ? results[missingId] : null).toBeNull(); + // Whatever form it takes, a missing id must never resolve to a real type. + expect(CONTENT_TYPES).not.toContain(results[missingId]); + }); + + it('handles an empty id list as a typed empty result or a typed ApiError', async () => { + let result: Awaited> | undefined; + let caught: unknown; + + try { + result = await client.content.convertContentIdsToContentTypes({ body: { contentIds: [] } }); + } catch (error) { + caught = error; + } + + if (caught !== undefined) { + // Server rejected the empty request — must surface as a typed ApiError. + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBeGreaterThanOrEqual(400); + expect((caught as ApiError).status).toBeLessThan(500); + } else { + // Otherwise the parsed result is well-formed: `results` is the empty map + // (or nullish, which the `.nullish()` model permits). + const results = result!.results; + + if (results != null) { + expect(typeof results).toBe('object'); + expect(Object.keys(results)).toHaveLength(0); + } + } + }); +}); diff --git a/packages/cloud/tests/integration/contentProperties.test.ts b/packages/cloud/tests/integration/contentProperties.test.ts new file mode 100644 index 00000000..cf0f4a46 --- /dev/null +++ b/packages/cloud/tests/integration/contentProperties.test.ts @@ -0,0 +1,307 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, createTestBlogPost } from './setup/fixtures'; +import { waitFor } from './helpers/poll'; + +/** + * Live integration suite for the Confluence Cloud v2 `contentProperties` API. + * + * `contentProperties` is the same property-CRUD surface repeated across nine + * content types (page, blogpost, attachment, customContent, whiteboard, + * database, smartLink, folder, comment): `getContentProperties` (list), + * `createProperty`, `getContentPropertiesById`, + * `updatePropertyById`, `deletePropertyById`. + * + * Per the suite coverage convention, ONE representative family is verified + * deeply and a sibling is exercised lightly: + * - PAGE family — full lifecycle (create → list → get-by-id → update → delete + * → 404), asserting the `ContentProperty` contract: `id`/`key` are strings, + * `value` round-trips an arbitrary JSON object verbatim, `version.number` + * starts at 1 and increments on update. + * - BLOGPOST family — create + read (list & by-id) + update + delete, proving + * the structurally-identical sibling methods serialize and route correctly. + * + * The remaining seven families (attachment, customContent, whiteboard, database, + * smartLink, folder, comment) have no cheaply-bootstrappable parent here, so + * their list endpoint is invoked against a non-existent parent id purely to + * exercise param serialization + response typing: each must either return a + * well-typed empty page or surface a typed `ApiError` (404/400). Their + * create/get-by-id/update/delete methods are validated by the compiler only. + * + * Shared infrastructure: `getLiveClient()` (singleton v2 client), + * `ResourceTracker` (LIFO retried teardown), `createTestSpace/Page/BlogPost` + * fixtures (self-cleaning), `waitFor` (eventually-consistent reads). + */ + +const PROP_KEY = 'cfjs.test'; +/** Arbitrary JSON the API must store and return verbatim (`value` is free-form). */ +const PROP_VALUE = { any: 'json', n: 1, nested: { ok: true }, list: [1, 2, 3] }; + +let client: ReturnType; +const tracker = new ResourceTracker(); + +let pageId: number; +let blogId: number; + +/** Structural contract of a single `ContentProperty` returned by the API. */ +function expectWellFormedProperty( + property: { id?: string; key?: string; value?: unknown; version?: { number?: number } | null }, + expectedKey: string, +) { + expect(typeof property.id).toBe('string'); + expect(property.id).toBeTruthy(); + // a numeric-string id — must survive `Number()` for the by-id/delete params. + expect(Number.isNaN(Number(property.id))).toBe(false); + expect(property.key).toBe(expectedKey); + // `version` is `VersionSchema.nullish()`; a fresh property carries a real version. + expect(property.version).toBeTruthy(); + expect(typeof property.version?.number).toBe('number'); +} + +beforeAll(async () => { + client = getLiveClient(); + + const space = await createTestSpace(tracker); + const page = await createTestPage(tracker, space.id); + const blog = await createTestBlogPost(tracker, space.id); + + pageId = Number(page.id); + blogId = Number(blog.id); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — contentProperties page family (live, full lifecycle)', () => { + let propertyId: number; + + it('createPageProperty returns a typed ContentProperty echoing key and arbitrary JSON value', async () => { + const created = await client.contentProperties.createPageProperty({ + pageId, + key: PROP_KEY, + value: PROP_VALUE, + }); + + // ensure teardown even if a later step throws before the explicit delete. + propertyId = Number(created.id); + tracker.defer(async () => { + await client.contentProperties + .deletePagePropertyById({ pageId, propertyId }) + .catch(() => undefined); + }); + + expectWellFormedProperty(created, PROP_KEY); + // free-form JSON must come back byte-for-byte equal. + expect(created.value).toEqual(PROP_VALUE); + // first version of a freshly created property is 1. + expect(created.version?.number).toBe(1); + }); + + it('getPageContentProperties lists the new property (typed page) and `key` filters to it', async () => { + // listing is eventually consistent — poll until the new property appears. + const listed = await waitFor( + () => client.contentProperties.getPageContentProperties({ pageId }), + page => (page.results ?? []).some(p => Number(p.id) === propertyId), + ); + + expect(Array.isArray(listed.results)).toBe(true); + expect(listed._links).toBeDefined(); + const mine = listed.results!.find(p => Number(p.id) === propertyId)!; + expectWellFormedProperty(mine, PROP_KEY); + expect(mine.value).toEqual(PROP_VALUE); + + // server-side `key` filter returns only the matching property. + const filtered = await client.contentProperties.getPageContentProperties({ pageId, key: PROP_KEY }); + expect(filtered.results!.length).toBeGreaterThan(0); + expect(filtered.results!.every(p => p.key === PROP_KEY)).toBe(true); + expect(filtered.results!.some(p => Number(p.id) === propertyId)).toBe(true); + }); + + it('getPageContentPropertiesById returns the same canonical entity as the listing', async () => { + const fetched = await client.contentProperties.getPageContentPropertiesById({ pageId, propertyId }); + + expect(Number(fetched.id)).toBe(propertyId); + expect(fetched.key).toBe(PROP_KEY); + expect(fetched.value).toEqual(PROP_VALUE); + expect(fetched.version?.number).toBe(1); + }); + + it('updatePagePropertyById bumps the version and replaces the value', async () => { + const current = await client.contentProperties.getPageContentPropertiesById({ pageId, propertyId }); + const nextVersion = (current.version?.number ?? 0) + 1; + const newValue = { any: 'json', n: 2, updated: true }; + + const updated = await client.contentProperties.updatePagePropertyById({ + pageId, + propertyId, + key: PROP_KEY, + value: newValue, + version: { number: nextVersion }, + }); + + expect(Number(updated.id)).toBe(propertyId); + expect(updated.key).toBe(PROP_KEY); + expect(updated.value).toEqual(newValue); + expect(updated.value).not.toEqual(PROP_VALUE); + expect(updated.version?.number).toBe(nextVersion); + + // the change is observable on a fresh read. + const reread = await client.contentProperties.getPageContentPropertiesById({ pageId, propertyId }); + expect(reread.value).toEqual(newValue); + expect(reread.version?.number).toBe(nextVersion); + }); + + it('deletePagePropertyById removes the property; a subsequent read is a 404 ApiError', async () => { + await expect(client.contentProperties.deletePagePropertyById({ pageId, propertyId })).resolves.toBeUndefined(); + + let caught: unknown; + try { + await client.contentProperties.getPageContentPropertiesById({ pageId, propertyId }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — contentProperties blogpost family (live, light CRUD)', () => { + const key = 'cfjs.blog'; + let propertyId: number; + + it('createBlogpostProperty + getBlogpostContentPropertiesById round-trip a property', async () => { + const created = await client.contentProperties.createBlogpostProperty({ + blogpostId: blogId, + key, + value: { from: 'blogpost' }, + }); + + propertyId = Number(created.id); + tracker.defer(async () => { + await client.contentProperties + .deleteBlogpostPropertyById({ blogpostId: blogId, propertyId }) + .catch(() => undefined); + }); + + expectWellFormedProperty(created, key); + expect(created.value).toEqual({ from: 'blogpost' }); + expect(created.version?.number).toBe(1); + + const fetched = await client.contentProperties.getBlogpostContentPropertiesById({ blogpostId: blogId, propertyId }); + expect(Number(fetched.id)).toBe(propertyId); + expect(fetched.key).toBe(key); + expect(fetched.value).toEqual({ from: 'blogpost' }); + }); + + it('getBlogpostContentProperties lists the property in a typed page', async () => { + const listed = await waitFor( + () => client.contentProperties.getBlogpostContentProperties({ blogpostId: blogId }), + page => (page.results ?? []).some(p => Number(p.id) === propertyId), + ); + + expect(Array.isArray(listed.results)).toBe(true); + expect(listed.results!.some(p => Number(p.id) === propertyId && p.key === key)).toBe(true); + }); + + it('updateBlogpostPropertyById bumps the version, then deleteBlogpostPropertyById removes it', async () => { + const current = await client.contentProperties.getBlogpostContentPropertiesById({ blogpostId: blogId, propertyId }); + const nextVersion = (current.version?.number ?? 0) + 1; + + const updated = await client.contentProperties.updateBlogpostPropertyById({ + blogpostId: blogId, + propertyId, + key, + value: { from: 'blogpost', v: 2 }, + version: { number: nextVersion }, + }); + expect(updated.value).toEqual({ from: 'blogpost', v: 2 }); + expect(updated.version?.number).toBe(nextVersion); + + await expect( + client.contentProperties.deleteBlogpostPropertyById({ blogpostId: blogId, propertyId }), + ).resolves.toBeUndefined(); + + let caught: unknown; + try { + await client.contentProperties.getBlogpostContentPropertiesById({ blogpostId: blogId, propertyId }); + } catch (error) { + caught = error; + } + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — contentProperties remaining-family listers (live, type-exercise)', () => { + /** + * Each remaining family lacks a cheaply-bootstrappable parent in this suite, so + * we drive its list endpoint against a non-existent parent id. A correct + * implementation either returns a typed empty page or throws a typed `ApiError` + * (404 for a missing parent, occasionally 400 for an unparseable id). Either + * outcome proves param serialization + response decoding line up. + */ + const MISSING_NUMERIC = 999_999_999; + const MISSING_ATTACHMENT = 'att999999999'; + + async function expectEmptyPageOrApiError(call: () => Promise<{ results?: unknown[] }>) { + let caught: unknown; + let value: { results?: unknown[] } | undefined; + try { + value = await call(); + } catch (error) { + caught = error; + } + + if (caught !== undefined) { + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + } else { + expect(Array.isArray(value!.results)).toBe(true); + } + } + + it('getAttachmentContentProperties (string parent id)', async () => { + await expectEmptyPageOrApiError(() => + client.contentProperties.getAttachmentContentProperties({ attachmentId: MISSING_ATTACHMENT }), + ); + }); + + it('getCustomContentContentProperties', async () => { + await expectEmptyPageOrApiError(() => + client.contentProperties.getCustomContentContentProperties({ customContentId: MISSING_NUMERIC }), + ); + }); + + it('getWhiteboardContentProperties', async () => { + await expectEmptyPageOrApiError(() => + client.contentProperties.getWhiteboardContentProperties({ id: MISSING_NUMERIC }), + ); + }); + + it('getDatabaseContentProperties', async () => { + await expectEmptyPageOrApiError(() => + client.contentProperties.getDatabaseContentProperties({ id: MISSING_NUMERIC }), + ); + }); + + it('getSmartLinkContentProperties', async () => { + await expectEmptyPageOrApiError(() => + client.contentProperties.getSmartLinkContentProperties({ id: MISSING_NUMERIC }), + ); + }); + + it('getFolderContentProperties', async () => { + await expectEmptyPageOrApiError(() => + client.contentProperties.getFolderContentProperties({ id: MISSING_NUMERIC }), + ); + }); + + it('getCommentContentProperties', async () => { + await expectEmptyPageOrApiError(() => + client.contentProperties.getCommentContentProperties({ commentId: MISSING_NUMERIC }), + ); + }); +}); diff --git a/packages/cloud/tests/integration/customContent.test.ts b/packages/cloud/tests/integration/customContent.test.ts new file mode 100644 index 00000000..b6e4f0d9 --- /dev/null +++ b/packages/cloud/tests/integration/customContent.test.ts @@ -0,0 +1,371 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, createTestBlogPost, storageBody } from './setup/fixtures'; +import { testName } from './helpers/naming'; +import { waitFor } from './helpers/poll'; + +/** + * Live integration suite for the Confluence Cloud v2 `customContent` API + * (`createCustomContent`, `getCustomContentById`, `updateCustomContent`, + * `deleteCustomContent`, `getCustomContentByType`, `getCustomContentByTypeInSpace`, + * `getCustomContentByTypeInPage`, `getCustomContentByTypeInBlogPost`). + * + * CENTRAL NARRATIVE — this module is ENVIRONMENT-GATED. Custom content `type`s are + * registered by a Forge/Connect app module (`forge:*` / `connect:*`). On a plain + * Cloud site with no such app installed, `createCustomContent` with an arbitrary + * type is typically rejected (400/403/404). The suite therefore *always attempts* + * a create to exercise serialization, then BRANCHES: + * + * - CREATE SUCCEEDED → full CRUD contract: read-back consistency + typed fields, + * version-bumping update, type/space-scoped listings include it, delete → + * subsequent getById 404s. + * - CREATE GATED → assert the failure is a typed `ApiError` with an expected + * status, then still CALL every getter (with a real `type` query + container id) + * and assert each resolves to a typed (usually empty) page or a typed `ApiError`, + * and that getById/update/delete on a non-existent id surface a typed `ApiError`. + * This keeps every exported method exercised for typing + serialization. + * + * Source-of-truth shapes: `src/api/customContent.ts`, `src/parameters/*CustomContent*.ts`, + * `src/models/customContent.ts` + `customContentSummary.ts`. ID gotcha: model ids are + * numeric `string`s but path-id params are `z.number()` — converted via `Number(id)`. + */ + +const TYPE = 'forge:cfjs-live-test'; + +/** `ContentStatusSchema` enum — the only values `status` may legally take. */ +const CONTENT_STATUSES = ['current', 'draft', 'archived', 'historical', 'trashed', 'deleted', 'any'] as const; + +/** Statuses a standard Cloud site plausibly returns when the custom content type is not registered. */ +const GATED_STATUSES = [400, 403, 404, 501] as const; + +let client: ReturnType; +const tracker = new ResourceTracker(); + +let space: Awaited>; +let page: Awaited>; +let blog: Awaited>; + +type CustomContentEntity = Awaited>; +type CustomContentSummary = NonNullable< + Awaited>['results'] +>[number]; + +/** Set iff `createCustomContent` succeeded (the type is registered on this site). */ +let created: CustomContentEntity | null = null; +/** Set iff `createCustomContent` was rejected (the gated path). */ +let createError: unknown = null; + +const ccTitle = testName('custom-content'); + +/** A summary returned by any of the list endpoints must be typed as the model declares. */ +function expectWellFormedCustomContent(cc: CustomContentSummary) { + expect(typeof cc.id).toBe('string'); + expect(cc.id).toBeTruthy(); + expect(typeof cc.type).toBe('string'); + expect(cc.type).toBeTruthy(); + // `spaceId` is documented as always returned, regardless of container. + expect(typeof cc.spaceId).toBe('string'); + + if (cc.status !== undefined) expect(CONTENT_STATUSES).toContain(cc.status); + + // `createdAt` is `z.coerce.date()` — a parsed response yields a real Date. + if (cc.createdAt !== undefined) expect(cc.createdAt).toBeInstanceOf(Date); +} + +/** + * Call a list endpoint and assert the response is a typed page: `results` (when + * present) is an array of well-formed summaries. In the gated environment the + * endpoint may instead reject — that is accepted as a typed `ApiError`. Returns the + * page on success (for inclusion assertions), or `null` if it surfaced an ApiError. + */ +async function callListing( + call: () => Promise<{ results?: CustomContentSummary[]; _links?: unknown }>, +): Promise<{ results?: CustomContentSummary[]; _links?: unknown } | null> { + try { + const pageResult = await call(); + expect(Array.isArray(pageResult.results ?? [])).toBe(true) + ;(pageResult.results ?? []).forEach(expectWellFormedCustomContent); + + return pageResult; + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + + return null; + } +} + +beforeAll(async () => { + client = getLiveClient(); + + space = await createTestSpace(tracker); + page = await createTestPage(tracker, space.id); + blog = await createTestBlogPost(tracker, space.id); + + // Always attempt creation — exercises param/body serialization either way. + // Container = the space (`spaceId`), so the content is reachable via the + // type-scoped and space-scoped listings (per the model, `spaceId` is always + // returned), but NOT via the page/blogpost listings. + try { + created = await client.customContent.createCustomContent({ + body: { + type: TYPE, + status: 'current', + spaceId: space.id, + title: ccTitle, + body: storageBody('

cc

'), + }, + }); + + const id = Number(created.id); + tracker.defer(async () => { + await client.customContent.deleteCustomContent({ id, purge: true }).catch(() => undefined); + }); + } catch (error) { + createError = error; + } +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — customContent.createCustomContent (live, gated)', () => { + it('either creates typed custom content or rejects with a typed ApiError', () => { + if (created) { + expect(typeof created.id).toBe('string'); + expect(created.id).toBeTruthy(); + expect(created.type).toBe(TYPE); + expect(created.title).toBe(ccTitle); + // `spaceId` is always returned and must echo the container space. + expect(created.spaceId).toBe(space.id); + expect(CONTENT_STATUSES).toContain(created.status); + expect(created.createdAt).toBeInstanceOf(Date); + // A freshly created entity is version 1. + expect(created.version?.number).toBe(1); + expect(typeof created.authorId).toBe('string'); + + return; + } + + // Gated path — creation rejected because the type is not registered here. + expect(createError, 'create neither succeeded nor threw').toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((createError as ApiError).status); + }); +}); + +describe('Confluence Cloud v2 — customContent.getCustomContentById (live)', () => { + it('returns the canonical entity created above with model-typed fields', async () => { + if (!created) return; // covered by the dedicated 404 case below in the gated path + + const fetched = await client.customContent.getCustomContentById({ id: Number(created.id) }); + + expect(fetched.id).toBe(created.id); + expect(fetched.type).toBe(TYPE); + expect(fetched.title).toBe(ccTitle); + expect(fetched.spaceId).toBe(space.id); + expect(CONTENT_STATUSES).toContain(fetched.status); + expect(fetched.createdAt).toBeInstanceOf(Date); + expect(fetched.version?.number).toBe(1); + // No `pageId`/`blogPostId` since the container is a space. + expect(fetched.pageId).toBeUndefined(); + expect(fetched.blogPostId).toBeUndefined(); + }); + + it('returns the requested body representation when `body-format` is set', async () => { + if (!created) return; + + const fetched = await client.customContent.getCustomContentById({ + id: Number(created.id), + bodyFormat: 'storage', + }); + + expect(fetched.body).toBeDefined(); + expect(fetched.body?.storage).toBeDefined(); + expect(fetched.body?.storage?.representation).toBe('storage'); + expect(typeof fetched.body?.storage?.value).toBe('string'); + }); + + it('expands labels/properties/operations only when the include-* flags are set', async () => { + if (!created) return; + + const expanded = await client.customContent.getCustomContentById({ + id: Number(created.id), + includeLabels: true, + includeProperties: true, + includeOperations: true, + }); + + expect(expanded.labels).toBeDefined(); + expect(Array.isArray(expanded.labels?.results ?? [])).toBe(true); + expect(expanded.properties).toBeDefined(); + expect(Array.isArray(expanded.properties?.results ?? [])).toBe(true); + expect(expanded.operations).toBeDefined(); + expect(Array.isArray(expanded.operations?.results ?? [])).toBe(true); + }); + + it('rejects a non-existent custom content id with a typed ApiError', async () => { + let caught: unknown; + + try { + await client.customContent.getCustomContentById({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + }); +}); + +describe('Confluence Cloud v2 — customContent.updateCustomContent (live)', () => { + it('bumps the version and applies the new title (or surfaces a typed ApiError when gated)', async () => { + if (!created) { + // Gated path — exercise the method's serialization against a missing entity. + let caught: unknown; + try { + await client.customContent.updateCustomContent({ + id: 999_999_999, + body: { + id: '999999999', + type: TYPE, + status: 'current', + title: ccTitle, + body: storageBody('

cc

'), + version: { number: 2 }, + }, + }); + } catch (error) { + caught = error; + } + expect(caught).toBeInstanceOf(ApiError); + expect([400, 403, 404]).toContain((caught as ApiError).status); + + return; + } + + const current = await client.customContent.getCustomContentById({ id: Number(created.id) }); + const nextVersion = (current.version?.number ?? 1) + 1; + const newTitle = testName('custom-content-updated'); + + const updated = await client.customContent.updateCustomContent({ + id: Number(created.id), + body: { + id: created.id, + type: TYPE, + status: 'current', + title: newTitle, + spaceId: space.id, + body: storageBody('

cc updated

'), + version: { number: nextVersion }, + }, + }); + + expect(updated.id).toBe(created.id); + expect(updated.title).toBe(newTitle); + expect(updated.version?.number).toBe(nextVersion); + + // The bump is observable on a fresh read. + const reread = await client.customContent.getCustomContentById({ id: Number(created.id) }); + expect(reread.title).toBe(newTitle); + expect(reread.version?.number).toBe(nextVersion); + }); +}); + +describe('Confluence Cloud v2 — customContent.getCustomContentByType (live)', () => { + it('returns a typed page and (when created) contains the new content filtered by space', async () => { + const result = await callListing(() => + client.customContent.getCustomContentByType({ type: TYPE, spaceId: [Number(space.id)], limit: 50 }), + ); + + if (created && result) { + const found = await waitFor( + () => client.customContent.getCustomContentByType({ type: TYPE, spaceId: [Number(space.id)], limit: 50 }), + r => (r.results ?? []).some(c => c.id === created!.id), + ); + const match = found.results!.find(c => c.id === created!.id)!; + expect(match.type).toBe(TYPE); + expect(match.spaceId).toBe(space.id); + } + }); +}); + +describe('Confluence Cloud v2 — customContent.getCustomContentByTypeInSpace (live)', () => { + it('returns a typed page for the space and (when created) contains the new content', async () => { + const result = await callListing(() => + client.customContent.getCustomContentByTypeInSpace({ id: Number(space.id), type: TYPE, limit: 50 }), + ); + + if (created && result) { + const found = await waitFor( + () => client.customContent.getCustomContentByTypeInSpace({ id: Number(space.id), type: TYPE, limit: 50 }), + r => (r.results ?? []).some(c => c.id === created!.id), + ); + expect(found.results!.some(c => c.id === created!.id)).toBe(true); + } + }); +}); + +describe('Confluence Cloud v2 — customContent.getCustomContentByTypeInPage (live)', () => { + it('returns a typed page for the page (space-container content is absent here)', async () => { + const result = await callListing(() => + client.customContent.getCustomContentByTypeInPage({ id: Number(page.id), type: TYPE, limit: 50 }), + ); + + // Container is the space, not this page, so the created item must NOT appear. + if (created && result) { + expect((result.results ?? []).some(c => c.id === created!.id)).toBe(false); + } + }); +}); + +describe('Confluence Cloud v2 — customContent.getCustomContentByTypeInBlogPost (live)', () => { + it('returns a typed page for the blog post (space-container content is absent here)', async () => { + const result = await callListing(() => + client.customContent.getCustomContentByTypeInBlogPost({ id: Number(blog.id), type: TYPE, limit: 50 }), + ); + + if (created && result) { + expect((result.results ?? []).some(c => c.id === created!.id)).toBe(false); + } + }); +}); + +describe('Confluence Cloud v2 — customContent.deleteCustomContent (live)', () => { + it('deletes the content so a later getById 404s (or surfaces a typed ApiError when gated)', async () => { + if (!created) { + // Gated path — exercise delete serialization against a missing entity. + let caught: unknown; + try { + await client.customContent.deleteCustomContent({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + expect(caught).toBeInstanceOf(ApiError); + expect([400, 403, 404]).toContain((caught as ApiError).status); + + return; + } + + // Move to trash, then purge so the read below is unambiguously a 404. + await client.customContent.deleteCustomContent({ id: Number(created.id) }); + await client.customContent.deleteCustomContent({ id: Number(created.id), purge: true }).catch(() => undefined); + + const gone = await waitFor( + async () => { + try { + await client.customContent.getCustomContentById({ id: Number(created!.id) }); + + return null; + } catch (error) { + return error; + } + }, + err => err instanceof ApiError && err.status === 404, + ); + + expect(gone).toBeInstanceOf(ApiError); + expect((gone as ApiError).status).toBe(404); + }); +}); diff --git a/packages/cloud/tests/integration/dataPolicies.test.ts b/packages/cloud/tests/integration/dataPolicies.test.ts new file mode 100644 index 00000000..7bd0ba1d --- /dev/null +++ b/packages/cloud/tests/integration/dataPolicies.test.ts @@ -0,0 +1,111 @@ +import { describe, it, expect, beforeAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; + +/** + * Live integration suite for the Confluence Cloud v2 `dataPolicies` API + * (`getDataPolicyMetadata`, `getDataPolicySpaces`). + * + * This is an ENVIRONMENT-GATED module. Both endpoints are documented as + * *"Only apps can make this request"* (org-level data-residency metadata, + * available through an app/Forge context with the relevant org-admin setup). + * The live suite authenticates with basic auth (a user identity, not an app), + * so on a standard Cloud site these calls are expected to surface a typed + * `ApiError` (401/403/404 — the app-only gate, or 451 when data residency is + * actively blocking). The suite therefore exercises BOTH branches: each method + * is still CALLED (so request serialization + the Zod response parse are + * type-checked end to end), and the result is asserted to be either the exact + * typed success shape OR a typed `ApiError` with an expected status. A gated + * endpoint never hard-fails the suite. + * + * Shared infrastructure (see `./setup` and `./helpers`): + * - `getLiveClient()` — singleton v2 client (host + retry policy). + */ + +/** Statuses an app-only / data-residency endpoint may legitimately return for a non-app caller. */ +const GATED_STATUSES = [401, 403, 404, 451, 501] as const; + +let client: ReturnType; + +beforeAll(() => { + client = getLiveClient(); +}); + +describe('Confluence Cloud v2 — dataPolicies.getDataPolicyMetadata (live, gated-graceful)', () => { + it('returns typed workspace data-policy metadata, or surfaces a typed ApiError when app-gated', async () => { + try { + const metadata = await client.dataPolicies.getDataPolicyMetadata(); + + // `DataPolicyMetadataSchema` declares a single optional boolean + // (`anyContentBlocked`); a successful parse yields exactly that shape. + expect(metadata).toBeDefined(); + expect(typeof metadata).toBe('object'); + + if (metadata.anyContentBlocked !== undefined) { + expect(typeof metadata.anyContentBlocked).toBe('boolean'); + } + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); +}); + +describe('Confluence Cloud v2 — dataPolicies.getDataPolicySpaces (live, gated-graceful)', () => { + it('returns a typed page of data-policy spaces, or surfaces a typed ApiError when app-gated', async () => { + try { + const page = await client.dataPolicies.getDataPolicySpaces({ limit: 5 }); + + // `DataPolicySpacesSchema`: optional `results` array + optional `_links`. + expect(page).toBeDefined(); + + if (page.results !== undefined) { + expect(Array.isArray(page.results)).toBe(true); + page.results.forEach(space => { + // Each entry is a `DataPolicySpace`: id/key/name are numeric-string / + // string ids; `dataPolicy.anyContentBlocked` is the per-space flag. + if (space.id !== undefined) expect(typeof space.id).toBe('string'); + + if (space.key !== undefined) expect(typeof space.key).toBe('string'); + + if (space.name !== undefined) expect(typeof space.name).toBe('string'); + + if (space.dataPolicy?.anyContentBlocked !== undefined) { + expect(typeof space.dataPolicy.anyContentBlocked).toBe('boolean'); + } + }); + } + + // `_links` is the multi-entity links object when present. + if (page._links !== undefined) expect(typeof page._links).toBe('object'); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); + + it('serializes `ids`, `keys`, `sort`, `limit` query params, or gates with a typed ApiError', async () => { + // Exercises param serialization specifically: `ids` is `z.number()[]` while + // space ids are numeric strings (the ID gotcha), `sort` is the closed + // SpaceSortOrder enum, `keys` a string list. + try { + const page = await client.dataPolicies.getDataPolicySpaces({ + ids: [1], + keys: ['DOESNOTEXIST'], + sort: 'id', + limit: 1, + }); + + expect(page).toBeDefined(); + + if (page.results !== undefined) { + expect(Array.isArray(page.results)).toBe(true); + expect(page.results.length).toBeLessThanOrEqual(1); + } + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); +}); diff --git a/packages/cloud/tests/integration/database.test.ts b/packages/cloud/tests/integration/database.test.ts new file mode 100644 index 00000000..38864d0a --- /dev/null +++ b/packages/cloud/tests/integration/database.test.ts @@ -0,0 +1,226 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, type TestSpace } from './setup/fixtures'; +import { testName } from './helpers/naming'; + +/** + * Live integration suite for the Confluence Cloud v2 `database` API, covering its + * full lifecycle: `createDatabase`, `getDatabaseById`, `deleteDatabase`. + * + * The assertions verify the *contract* of each function, not merely that a call + * resolves: a created database is typed exactly as the `Database` Zod model + * declares (`id`/`spaceId`/`authorId`/`ownerId` are numeric strings, `createdAt` + * is a real `Date`, `version.number` is a number, `status` is a `ContentStatus`); + * the same canonical database comes back consistently from `getDatabaseById`; a + * database created under a page reports that page as its `parentId` with + * `parentType: 'page'`; and a deleted database surfaces as a typed 404 `ApiError`. + * + * Environment gating: databases are a premium content type a standard Cloud site + * may not allow creating. Creation is always *attempted* (to exercise param + + * body serialization), but a rejection is accepted as a typed `ApiError` with an + * expected status, and the get/delete typing is still exercised against a + * plausible id. A gated run never hard-fails the suite — see report. + * + * ID gotcha: model ids are numeric *strings* (`database.id: string`), while the + * path params of `getDatabaseById`/`deleteDatabase` are `z.number()` — every such + * call converts with `Number(database.id)`. + */ + +/** Statuses a database may report — the `ContentStatus` enum. */ +const CONTENT_STATUSES = ['current', 'draft', 'archived', 'historical', 'trashed', 'deleted', 'any'] as const; + +/** Statuses accepted when the environment gates database creation. */ +const GATED_STATUSES = [400, 403, 404, 501] as const; + +type Database = Awaited['database']['createDatabase']>>; + +let client: ReturnType; +const tracker = new ResourceTracker(); +let space: TestSpace; +/** A page used as a parent for the nested-creation breadth check. */ +let parentPage: Awaited>; + +/** The canonical database created at the space root, asserted against everywhere. */ +let created: Database | undefined; +let createError: unknown; +const title = testName('database'); + +/** The nested database created under `parentPage` (when not gated). */ +let nested: Database | undefined; + +/** A meaningful structural check for any database returned by the API. */ +function expectWellFormedDatabase(db: Database) { + expect(typeof db.id).toBe('string'); + expect(db.id).toBeTruthy(); + expect(typeof db.spaceId).toBe('string'); + expect(db.spaceId).toBe(space.id); + + if (db.status !== undefined) expect(CONTENT_STATUSES).toContain(db.status); + + // `createdAt` is `z.coerce.date()` — a parsed response yields a real Date. + expect(db.createdAt).toBeInstanceOf(Date); + // A freshly created entity is version 1. + expect(db.version?.number).toBe(1); + expect(typeof db.authorId).toBe('string'); +} + +beforeAll(async () => { + client = getLiveClient(); + + space = await createTestSpace(tracker); + parentPage = await createTestPage(tracker, space.id); + + // Always attempt creation — exercises param/body serialization either way. + try { + created = await client.database.createDatabase({ body: { spaceId: space.id, title } }); + + const id = Number(created.id); + tracker.defer(async () => { + await client.database.deleteDatabase({ id }).catch(() => undefined); + }); + } catch (error) { + createError = error; + } + + // Breadth: a database filed under a page should report the page as its parent. + if (created) { + try { + nested = await client.database.createDatabase({ + body: { spaceId: space.id, title: testName('database-nested'), parentId: parentPage.id }, + }); + + const id = Number(nested.id); + tracker.defer(async () => { + await client.database.deleteDatabase({ id }).catch(() => undefined); + }); + } catch { + nested = undefined; + } + } +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — database.createDatabase (live, lifecycle)', () => { + it('either creates a typed Database or rejects with a typed ApiError when gated', () => { + if (created) { + expect(created.title).toBe(title); + expectWellFormedDatabase(created); + // Created at the space root → no parent content. + expect(created.parentId == null || typeof created.parentId === 'string').toBe(true); + + return; + } + + // Gated path — site does not permit database creation. + expect(createError, 'create neither succeeded nor threw').toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((createError as ApiError).status); + }); + + it('files a database under a page with parentType `page` (breadth)', () => { + if (!nested) return; // gated, or nested creation unsupported here + + expect(nested.parentId).toBe(parentPage.id); + expect(nested.parentType).toBe('page'); + expect(nested.spaceId).toBe(space.id); + expect(nested.version?.number).toBe(1); + }); +}); + +describe('Confluence Cloud v2 — database.getDatabaseById (live)', () => { + it('returns the canonical entity created above with model-typed fields', async () => { + if (!created) return; // covered by the dedicated 404 case below in the gated path + + const fetched = await client.database.getDatabaseById({ id: Number(created.id) }); + + expect(fetched.id).toBe(created.id); + expect(fetched.title).toBe(title); + expect(fetched.spaceId).toBe(space.id); + expect(CONTENT_STATUSES).toContain(fetched.status); + expect(fetched.createdAt).toBeInstanceOf(Date); + expect(fetched.version?.number).toBe(1); + // Every real database exposes a web UI link. + expect(typeof fetched._links?.webui).toBe('string'); + expect(fetched._links?.webui).toBeTruthy(); + }); + + it('expands operations/properties only when the include-* flags are set', async () => { + if (!created) return; + + const expanded = await client.database.getDatabaseById({ + id: Number(created.id), + includeOperations: true, + includeProperties: true, + }); + + expect(expanded.id).toBe(created.id); + // NOTE: `include-operations`/`include-properties` add expansions the `Database` + // model does not declare, so they land on the loose index — read defensively. + const expansions = expanded as Record; + + if (expansions.operations) expect(Array.isArray(expansions.operations.results ?? [])).toBe(true); + + if (expansions.properties) expect(Array.isArray(expansions.properties.results ?? [])).toBe(true); + }); + + it('rejects a non-existent database id with a typed ApiError', async () => { + let caught: unknown; + + try { + await client.database.getDatabaseById({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + }); +}); + +describe('Confluence Cloud v2 — database.deleteDatabase (live)', () => { + it('deletes a database so a subsequent getDatabaseById yields a 404 ApiError', async () => { + let disposable: Database; + + try { + disposable = await client.database.createDatabase({ + body: { spaceId: space.id, title: testName('database-disposable') }, + }); + } catch (error) { + // Gated path — still exercise delete typing against a plausible id. + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + + let caught: unknown; + try { + await client.database.deleteDatabase({ id: 999_999_999 }); + } catch (e) { + caught = e; + } + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + + return; + } + + const id = Number(disposable.id); + // Safety net should the assertion below not run. + tracker.defer(async () => { + await client.database.deleteDatabase({ id }).catch(() => undefined); + }); + + await client.database.deleteDatabase({ id }); + + // A plain v2 DELETE moves content to TRASH (204) rather than purging it: the + // entity is still fetchable, now with status 'trashed'. Only a purge yields 404. + const after = await client.database.getDatabaseById({ id }).catch(e => e); + + if (after instanceof ApiError) { + expect(after.status).toBe(404); // hard-deleted (purged) + } else { + expect(['trashed', 'deleted']).toContain(after.status); // moved to trash (the common case) + } + }); +}); diff --git a/packages/cloud/tests/integration/descendants.test.ts b/packages/cloud/tests/integration/descendants.test.ts new file mode 100644 index 00000000..9e2c9904 --- /dev/null +++ b/packages/cloud/tests/integration/descendants.test.ts @@ -0,0 +1,137 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage } from './setup/fixtures'; +import { testName } from './helpers/naming'; +import { waitFor } from './helpers/poll'; + +/** + * Live integration suite for the Confluence Cloud v2 `descendants` API + * (`getPageDescendants`, `getWhiteboardDescendants`, `getDatabaseDescendants`, + * `getSmartLinkDescendants`, `getFolderDescendants`). + * + * The suite builds a real two-level page tree — a PARENT page with a single CHILD + * page (`createPage` with a body `parentId`) — and verifies the *contract* of the + * descendant tree: querying the PARENT's descendants returns the CHILD, each + * descendant is typed per the `Descendants` model (`id` numeric string, hierarchy + * `type`, `parentId`, `depth`), and the child entry reports `type: 'page'`, + * `parentId === parent.id`, and `depth === 1` (a direct child). + * + * Coverage notes: + * - DEEP on pages: `getPageDescendants` is asserted against the live parent/child. + * - whiteboard/database/smart-link/folder descendants have no cheap fixture on a + * standard Cloud site, so each is called with a real page id (wrong content + * type) purely to exercise typing + URL/param serialization; a correct + * response is a typed empty page or a typed 404/400 ApiError. + * + * The page tree is eventually consistent, so the descendant read polls via + * {@link waitFor}. + */ + +const CONTENT_STATUSES = ['current', 'archived'] as const; +const HIERARCHY_TYPES = ['page', 'whiteboard', 'database', 'embed', 'folder'] as const; + +let client: ReturnType; +const tracker = new ResourceTracker(); + +let space: Awaited>; +let parent: Awaited>; +let child: Awaited>; + +/** + * Assert that a descendant listing called with a wrong-type id either resolves to + * a typed empty page or fails as a typed ApiError (404/400). + */ +async function expectEmptyOrApiError(call: () => Promise<{ results?: unknown[] }>): Promise { + try { + const page = await call(); + expect(Array.isArray(page.results ?? [])).toBe(true); + expect(page.results ?? []).toHaveLength(0); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((error as ApiError).status); + } +} + +beforeAll(async () => { + client = getLiveClient(); + space = await createTestSpace(tracker); + parent = await createTestPage(tracker, space.id, { title: testName('descendants-parent') }); + child = await createTestPage(tracker, space.id, { + title: testName('descendants-child'), + parentId: String(parent.id), + }); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — descendants.getPageDescendants (live, deep)', () => { + it('returns the child page in the parent descendant tree, fully typed', async () => { + const page = await waitFor( + () => client.descendants.getPageDescendants({ id: Number(parent.id) }), + result => (result.results ?? []).some(d => d.id === child.id), + ); + + const found = (page.results ?? []).find(d => d.id === child.id); + expect(found).toBeDefined(); + expect(typeof found!.id).toBe('string'); + expect(found!.id).toBe(child.id); + expect(HIERARCHY_TYPES).toContain(found!.type); + expect(found!.type).toBe('page'); + expect(typeof found!.title).toBe('string'); + expect(found!.title).toBe(child.title); + // The descendant carries the id of its immediate parent and its tree depth. + expect(found!.parentId).toBe(parent.id); + expect(typeof found!.depth).toBe('number'); + expect(found!.depth).toBe(1); + expect(CONTENT_STATUSES).toContain(found!.status); + + if (found!.childPosition !== null && found!.childPosition !== undefined) { + expect(typeof found!.childPosition).toBe('number'); + } + }); + + it('honors `depth` — a depth of 1 still surfaces the direct child', async () => { + const page = await waitFor( + () => client.descendants.getPageDescendants({ id: Number(parent.id), depth: 1 }), + result => (result.results ?? []).some(d => d.id === child.id), + ); + + const found = (page.results ?? []).find(d => d.id === child.id); + expect(found).toBeDefined(); + expect(found!.depth).toBe(1); + }); + + it('rejects a non-existent page id with a 404 ApiError', async () => { + let caught: unknown; + + try { + await client.descendants.getPageDescendants({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — descendants — non-page content-tree roots (gated-graceful)', () => { + it('getWhiteboardDescendants — typed empty page or typed ApiError', async () => { + await expectEmptyOrApiError(() => client.descendants.getWhiteboardDescendants({ id: Number(parent.id) })); + }); + + it('getDatabaseDescendants — typed empty page or typed ApiError', async () => { + await expectEmptyOrApiError(() => client.descendants.getDatabaseDescendants({ id: Number(parent.id) })); + }); + + it('getSmartLinkDescendants — typed empty page or typed ApiError', async () => { + await expectEmptyOrApiError(() => client.descendants.getSmartLinkDescendants({ id: Number(parent.id) })); + }); + + it('getFolderDescendants — typed empty page or typed ApiError', async () => { + await expectEmptyOrApiError(() => client.descendants.getFolderDescendants({ id: Number(parent.id) })); + }); +}); diff --git a/packages/cloud/tests/integration/folder.test.ts b/packages/cloud/tests/integration/folder.test.ts new file mode 100644 index 00000000..5c65bcb9 --- /dev/null +++ b/packages/cloud/tests/integration/folder.test.ts @@ -0,0 +1,225 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, type TestSpace } from './setup/fixtures'; +import { testName } from './helpers/naming'; + +/** + * Live integration suite for the Confluence Cloud v2 `folder` API, covering its + * full lifecycle: `createFolder`, `getFolderById`, `deleteFolder`. + * + * The assertions verify the *contract* of each function, not merely that a call + * resolves: a created folder is typed exactly as the `Folder` Zod model declares + * (`id`/`spaceId`/`authorId`/`ownerId` are numeric strings, `createdAt` is a real + * `Date`, `version.number` is a number, `status` is a `ContentStatus`); the same + * canonical folder comes back consistently from `getFolderById`; a folder created + * under a page reports that page as its `parentId` with `parentType: 'page'`; and + * a deleted folder surfaces as a typed 404 `ApiError`. + * + * Environment gating: folders are generally available on standard Cloud sites, + * but creation is still wrapped defensively — a rejection is accepted as a typed + * `ApiError` with an expected status, and the get/delete typing is exercised + * against a plausible id. A gated run never hard-fails the suite — see report. + * + * ID gotcha: model ids are numeric *strings* (`folder.id: string`), while the + * path params of `getFolderById`/`deleteFolder` are `z.number()` — every such + * call converts with `Number(folder.id)`. + */ + +/** Statuses a folder may report — the `ContentStatus` enum. */ +const CONTENT_STATUSES = ['current', 'draft', 'archived', 'historical', 'trashed', 'deleted', 'any'] as const; + +/** Statuses accepted when the environment gates folder creation. */ +const GATED_STATUSES = [400, 403, 404, 501] as const; + +type Folder = Awaited['folder']['createFolder']>>; + +let client: ReturnType; +const tracker = new ResourceTracker(); +let space: TestSpace; +/** A page used as a parent for the nested-creation breadth check. */ +let parentPage: Awaited>; + +/** The canonical folder created at the space root, asserted against everywhere. */ +let created: Folder | undefined; +let createError: unknown; +const title = testName('folder'); + +/** The nested folder created under `parentPage` (when not gated). */ +let nested: Folder | undefined; + +/** A meaningful structural check for any folder returned by the API. */ +function expectWellFormedFolder(folder: Folder) { + expect(typeof folder.id).toBe('string'); + expect(folder.id).toBeTruthy(); + expect(typeof folder.spaceId).toBe('string'); + expect(folder.spaceId).toBe(space.id); + + if (folder.status !== undefined) expect(CONTENT_STATUSES).toContain(folder.status); + + // `createdAt` is `z.coerce.date()` — a parsed response yields a real Date. + expect(folder.createdAt).toBeInstanceOf(Date); + // A freshly created entity is version 1. + expect(folder.version?.number).toBe(1); + expect(typeof folder.authorId).toBe('string'); +} + +beforeAll(async () => { + client = getLiveClient(); + + space = await createTestSpace(tracker); + parentPage = await createTestPage(tracker, space.id); + + // Always attempt creation — exercises param/body serialization either way. + try { + created = await client.folder.createFolder({ body: { spaceId: space.id, title } }); + + const id = Number(created.id); + tracker.defer(async () => { + await client.folder.deleteFolder({ id }).catch(() => undefined); + }); + } catch (error) { + createError = error; + } + + // Breadth: a folder filed under a page should report the page as its parent. + if (created) { + try { + nested = await client.folder.createFolder({ + body: { spaceId: space.id, title: testName('folder-nested'), parentId: parentPage.id }, + }); + + const id = Number(nested.id); + tracker.defer(async () => { + await client.folder.deleteFolder({ id }).catch(() => undefined); + }); + } catch { + nested = undefined; + } + } +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — folder.createFolder (live, lifecycle)', () => { + it('either creates a typed Folder or rejects with a typed ApiError when gated', () => { + if (created) { + expect(created.title).toBe(title); + expectWellFormedFolder(created); + // Created at the space root → no parent content. + expect(created.parentId == null || typeof created.parentId === 'string').toBe(true); + + return; + } + + // Gated path — site does not permit folder creation. + expect(createError, 'create neither succeeded nor threw').toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((createError as ApiError).status); + }); + + it('files a folder under a page with parentType `page` (breadth)', () => { + if (!nested) return; // gated, or nested creation unsupported here + + expect(nested.parentId).toBe(parentPage.id); + expect(nested.parentType).toBe('page'); + expect(nested.spaceId).toBe(space.id); + expect(nested.version?.number).toBe(1); + }); +}); + +describe('Confluence Cloud v2 — folder.getFolderById (live)', () => { + it('returns the canonical entity created above with model-typed fields', async () => { + if (!created) return; // covered by the dedicated 404 case below in the gated path + + const fetched = await client.folder.getFolderById({ id: Number(created.id) }); + + expect(fetched.id).toBe(created.id); + expect(fetched.title).toBe(title); + expect(fetched.spaceId).toBe(space.id); + expect(CONTENT_STATUSES).toContain(fetched.status); + expect(fetched.createdAt).toBeInstanceOf(Date); + expect(fetched.version?.number).toBe(1); + // Every real folder exposes a web UI link. + expect(typeof fetched._links?.webui).toBe('string'); + expect(fetched._links?.webui).toBeTruthy(); + }); + + it('expands operations/properties only when the include-* flags are set', async () => { + if (!created) return; + + const expanded = await client.folder.getFolderById({ + id: Number(created.id), + includeOperations: true, + includeProperties: true, + }); + + expect(expanded.id).toBe(created.id); + // NOTE: `include-operations`/`include-properties` add expansions the `Folder` + // model does not declare, so they land on the loose index — read defensively. + const expansions = expanded as Record; + + if (expansions.operations) expect(Array.isArray(expansions.operations.results ?? [])).toBe(true); + + if (expansions.properties) expect(Array.isArray(expansions.properties.results ?? [])).toBe(true); + }); + + it('rejects a non-existent folder id with a typed ApiError', async () => { + let caught: unknown; + + try { + await client.folder.getFolderById({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + }); +}); + +describe('Confluence Cloud v2 — folder.deleteFolder (live)', () => { + it('deletes a folder so a subsequent getFolderById yields a 404 ApiError', async () => { + let disposable: Folder; + + try { + disposable = await client.folder.createFolder({ + body: { spaceId: space.id, title: testName('folder-disposable') }, + }); + } catch (error) { + // Gated path — still exercise delete typing against a plausible id. + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + + let caught: unknown; + try { + await client.folder.deleteFolder({ id: 999_999_999 }); + } catch (e) { + caught = e; + } + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + + return; + } + + const id = Number(disposable.id); + // Safety net should the assertion below not run. + tracker.defer(async () => { + await client.folder.deleteFolder({ id }).catch(() => undefined); + }); + + await client.folder.deleteFolder({ id }); + + // A plain v2 DELETE moves content to TRASH (204) rather than purging it: the + // entity is still fetchable, now with status 'trashed'. Only a purge yields 404. + const after = await client.folder.getFolderById({ id }).catch(e => e); + + if (after instanceof ApiError) { + expect(after.status).toBe(404); // hard-deleted (purged) + } else { + expect(['trashed', 'deleted']).toContain(after.status); // moved to trash (the common case) + } + }); +}); diff --git a/packages/cloud/tests/integration/helpers/naming.ts b/packages/cloud/tests/integration/helpers/naming.ts new file mode 100644 index 00000000..b5bc8fc5 --- /dev/null +++ b/packages/cloud/tests/integration/helpers/naming.ts @@ -0,0 +1,32 @@ +/** + * Run-scoped unique names for live-test resources. + * + * Every name carries a per-process `RUN_ID` so concurrent or repeated runs never + * collide, and a shared `cfjs` marker so the global-setup purge can recognize and + * sweep anything a crashed run left behind. + */ +const RUN_ID = `${Date.now().toString(36)}${Math.floor(Math.random() * 1e6).toString(36)}`; + +/** Marker embedded in every resource name/key created by the live suite. */ +export const RESOURCE_MARKER = 'cfjs'; + +/** Stable id for the current test process. */ +export function runId(): string { + return RUN_ID; +} + +/** Human-readable, run-scoped resource name, e.g. `[cfjs:abc123] my-page`. */ +export function testName(label: string): string { + return `[${RESOURCE_MARKER}:${RUN_ID}] ${label}`; +} + +/** + * A valid, unique Confluence space key: uppercase alphanumeric, starts with a + * letter, well under the 255-char limit. `label` disambiguates keys created + * within the same run (e.g. a suite that needs two spaces). + */ +export function spaceKey(label = ''): string { + const suffix = `${RUN_ID}${label}`.replace(/[^A-Za-z0-9]/g, '').toUpperCase(); + + return `CFJS${suffix}`.slice(0, 50); +} diff --git a/packages/cloud/tests/integration/helpers/poll.ts b/packages/cloud/tests/integration/helpers/poll.ts new file mode 100644 index 00000000..0d4350ff --- /dev/null +++ b/packages/cloud/tests/integration/helpers/poll.ts @@ -0,0 +1,36 @@ +/** + * Exponential-backoff polling for eventually-consistent reads. + * + * Confluence Cloud is not read-your-write for every endpoint — a freshly created + * page can take a moment to appear in a listing, a delete to propagate, a task to + * finish. {@link waitFor} re-runs `fn` until `predicate` holds (or attempts run + * out), so suites assert on settled state instead of racing the API. + */ +export interface PollOptions { + maxAttempts?: number; + initialDelayMs?: number; + factor?: number; +} + +export async function waitFor( + fn: () => Promise, + predicate: (value: T) => boolean, + options: PollOptions = {}, +): Promise { + const { maxAttempts = 6, initialDelayMs = 500, factor = 1.8 } = options; + let delay = initialDelayMs; + let last: T | undefined; + + for (let attempt = 0; attempt < maxAttempts; attempt++) { + last = await fn(); + + if (predicate(last)) return last; + + if (attempt < maxAttempts - 1) { + await new Promise(resolve => setTimeout(resolve, delay)); + delay = Math.round(delay * factor); + } + } + + throw new Error(`waitFor: condition not satisfied after ${maxAttempts} attempts`); +} diff --git a/packages/cloud/tests/integration/label.test.ts b/packages/cloud/tests/integration/label.test.ts new file mode 100644 index 00000000..072d9b4f --- /dev/null +++ b/packages/cloud/tests/integration/label.test.ts @@ -0,0 +1,271 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient, v1Request } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, createTestBlogPost, type TestSpace } from './setup/fixtures'; +import { runId } from './helpers/naming'; +import { waitFor } from './helpers/poll'; + +/** + * Live integration suite for the Confluence Cloud v2 `label` API + * (`getLabels`, `getPageLabels`, `getBlogPostLabels`, `getAttachmentLabels`, + * `getCustomContentLabels`, `getSpaceLabels`, `getSpaceContentLabels`). + * + * v2 exposes labels read-only — there is no create-label endpoint. So the suite + * first *attaches* real labels to a freshly created page and blog post via the + * v1 REST endpoint (`POST content/{id}/label`), then asserts the v2 read paths + * return them with the exact shape the Zod models declare. + * + * What is verified: + * - `getPageLabels` (deep): added labels surface, every `Label` field is a + * populated string, the `prefix` query filter and `limit` have an observable + * effect, and a missing page id yields a typed 404 `ApiError`. + * - `getBlogPostLabels` (light): a label added to a blog post surfaces, typed. + * - `getLabels` (medium): the site-wide listing, filtered by the `label-id` + * derived from the label we created, returns that exact label. + * - `getSpaceLabels` / `getSpaceContentLabels` (shape): the fresh space yields a + * well-typed (possibly empty) result page. + * - `getAttachmentLabels` / `getCustomContentLabels` (gated-graceful): called + * with a plausible id, asserted to be either a typed empty page or a 404 + * `ApiError` — we have no cheap attachment / custom-content parent here. + * + * Labels are eventually consistent: a just-attached label is not always in the + * very next read, so `waitFor` polls the listing until they settle. + * + * Shared infra: `getLiveClient` (singleton v2 client), `v1Request` (auth'd v1 + * REST, for the add-label gap), `ResourceTracker` (LIFO retried teardown), + * fixtures (`createTestSpace`/`createTestPage`/`createTestBlogPost`, self-cleaning). + */ + +/** A label name Confluence accepts: lowercase alphanumeric, run-scoped & unique. */ +function labelName(suffix: string): string { + return `cfjs${runId()}${suffix}`.toLowerCase().replace(/[^a-z0-9]/g, ''); +} + +type LabelEntity = { id?: string; name?: string; prefix?: string }; +type LabelPage = { results?: LabelEntity[]; _links?: { next?: string; base?: string } }; + +/** Every `Label` field is declared `z.string().optional()`; a real label populates all three. */ +function expectWellFormedLabel(label: LabelEntity) { + expect(typeof label.id).toBe('string'); + expect(label.id).toBeTruthy(); + // ids are numeric strings even though the model only says `string`. + expect(label.id).toMatch(/^\d+$/); + expect(typeof label.name).toBe('string'); + expect(label.name).toBeTruthy(); + expect(typeof label.prefix).toBe('string'); + expect(label.prefix).toBeTruthy(); +} + +/** A label listing is `{ results?: Label[], _links?: MultiEntityLinks }`. */ +function expectWellFormedLabelPage(page: LabelPage) { + expect(Array.isArray(page.results)).toBe(true) + ;(page.results ?? []).forEach(expectWellFormedLabel); + + if (page._links !== undefined) { + expect(typeof page._links).toBe('object'); + + if (page._links.next !== undefined) expect(typeof page._links.next).toBe('string'); + + if (page._links.base !== undefined) expect(typeof page._links.base).toBe('string'); + } +} + +/** Attach a `global`-prefixed label to a piece of content via the v1 REST gap. */ +async function addLabel(contentId: string, name: string): Promise { + await v1Request(`content/${contentId}/label`, { + method: 'POST', + body: [{ prefix: 'global', name }], + }); +} + +let client: ReturnType; +const tracker = new ResourceTracker(); + +let space: TestSpace; +let page: Awaited>; +let blog: Awaited>; + +const pageLabelA = labelName('pagea'); +const pageLabelB = labelName('pageb'); +const blogLabelName = labelName('blog'); + +/** The settled page-label listing captured after the labels become visible. */ +let settledPageLabels: LabelEntity[] = []; + +beforeAll(async () => { + client = getLiveClient(); + + space = await createTestSpace(tracker, 'label'); + page = await createTestPage(tracker, space.id); + blog = await createTestBlogPost(tracker, space.id); + + await addLabel(page.id!, pageLabelA); + await addLabel(page.id!, pageLabelB); + await addLabel(blog.id!, blogLabelName); + + // Labels are eventually consistent — poll until both page labels appear. + const settled = await waitFor( + () => client.label.getPageLabels({ id: Number(page.id) }), + res => [pageLabelA, pageLabelB].every(n => (res.results ?? []).some(l => l.name === n)), + { maxAttempts: 8 }, + ); + settledPageLabels = settled.results ?? []; +}, 60_000); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — label.getPageLabels (live)', () => { + it('returns the labels attached to the page, each fully typed', () => { + expectWellFormedLabelPage({ results: settledPageLabels }); + + const a = settledPageLabels.find(l => l.name === pageLabelA); + const b = settledPageLabels.find(l => l.name === pageLabelB); + expect(a, 'first added label must be present').toBeDefined(); + expect(b, 'second added label must be present').toBeDefined(); + // Added with `prefix: 'global'`, so that is the prefix that comes back. + expect(a!.prefix).toBe('global'); + expect(b!.prefix).toBe('global'); + }); + + it('filters by `prefix` — `global` includes our labels, `my` excludes them', async () => { + const globalPage = await client.label.getPageLabels({ id: Number(page.id), prefix: 'global' }); + expectWellFormedLabelPage(globalPage); + expect(globalPage.results!.every(l => l.prefix === 'global')).toBe(true); + expect(globalPage.results!.some(l => l.name === pageLabelA)).toBe(true); + expect(globalPage.results!.some(l => l.name === pageLabelB)).toBe(true); + + // Personal (`my`) labels are a different namespace — our global labels must not leak in. + const myPage = await client.label.getPageLabels({ id: Number(page.id), prefix: 'my' }); + expectWellFormedLabelPage(myPage); + expect(myPage.results!.some(l => l.name === pageLabelA || l.name === pageLabelB)).toBe(false); + }); + + it('honors `limit` — never returns more rows than requested', async () => { + const limited = await client.label.getPageLabels({ id: Number(page.id), limit: 1 }); + + expect(limited.results?.length ?? 0).toBeLessThanOrEqual(1); + expectWellFormedLabelPage(limited); + }); + + it('rejects a non-existent page id with a 404 ApiError', async () => { + let caught: unknown; + + try { + await client.label.getPageLabels({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — label.getBlogPostLabels (live)', () => { + it('returns the label attached to the blog post, fully typed', async () => { + const settled = await waitFor( + () => client.label.getBlogPostLabels({ id: Number(blog.id) }), + res => (res.results ?? []).some(l => l.name === blogLabelName), + { maxAttempts: 8 }, + ); + + expectWellFormedLabelPage(settled); + const added = settled.results!.find(l => l.name === blogLabelName); + expect(added, 'label added to the blog post must be present').toBeDefined(); + expect(added!.prefix).toBe('global'); + }); + + it('rejects a non-existent blog post id with a 404 ApiError', async () => { + let caught: unknown; + + try { + await client.label.getBlogPostLabels({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — label.getLabels (live)', () => { + it('returns a well-typed page of site-wide labels', async () => { + const all = await client.label.getLabels({ limit: 25 }); + expectWellFormedLabelPage(all); + }); + + it('filters by `label-id` — returns exactly the label we created', async () => { + const target = settledPageLabels.find(l => l.name === pageLabelA); + expect(target, 'page label must have been captured in beforeAll').toBeDefined(); + expect(target!.id).toMatch(/^\d+$/); + + const filtered = await client.label.getLabels({ labelId: [Number(target!.id)] }); + + expectWellFormedLabelPage(filtered); + expect(filtered.results!.length).toBeGreaterThan(0); + // The `label-id` filter is exact — every row is the one label we asked for. + expect(filtered.results!.every(l => l.id === target!.id)).toBe(true); + const match = filtered.results!.find(l => l.id === target!.id); + expect(match!.name).toBe(pageLabelA); + }); +}); + +describe('Confluence Cloud v2 — label.getSpaceLabels (live)', () => { + it('returns a well-typed (possibly empty) result page for the fresh space', async () => { + const labels = await client.label.getSpaceLabels({ id: Number(space.id) }); + expectWellFormedLabelPage(labels); + }); + + it('rejects a non-existent space id with a 404 ApiError', async () => { + let caught: unknown; + + try { + await client.label.getSpaceLabels({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — label.getSpaceContentLabels (live)', () => { + it('returns a well-typed result page for content within the space', async () => { + const labels = await client.label.getSpaceContentLabels({ id: Number(space.id) }); + expectWellFormedLabelPage(labels); + }); +}); + +/** + * Gated-graceful: no cheap attachment / custom-content parent is available in this + * suite, so each method is still invoked (to exercise typing + URL serialization) + * against a plausible-but-nonexistent id, and the outcome is asserted to be either + * a typed empty page or a typed 404 `ApiError`. + */ +describe('Confluence Cloud v2 — label.getAttachmentLabels / getCustomContentLabels (live, gated)', () => { + it('getAttachmentLabels yields a typed empty page or a 404 ApiError', async () => { + try { + const labels = await client.label.getAttachmentLabels({ id: 'att999999999' }); + expectWellFormedLabelPage(labels); + expect(labels.results ?? []).toHaveLength(0); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect((error as ApiError).status).toBe(404); + } + }); + + it('getCustomContentLabels yields a typed empty page or a 404 ApiError', async () => { + try { + const labels = await client.label.getCustomContentLabels({ id: 999_999_999 }); + expectWellFormedLabelPage(labels); + expect(labels.results ?? []).toHaveLength(0); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect((error as ApiError).status).toBe(404); + } + }); +}); diff --git a/packages/cloud/tests/integration/like.test.ts b/packages/cloud/tests/integration/like.test.ts new file mode 100644 index 00000000..81e598f0 --- /dev/null +++ b/packages/cloud/tests/integration/like.test.ts @@ -0,0 +1,289 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, createTestBlogPost, storageBody } from './setup/fixtures'; +import { testName } from './helpers/naming'; + +/** + * Live integration suite for the Confluence Cloud v2 `like` API: + * `getPageLikeCount`, `getPageLikeUsers`, `getBlogPostLikeCount`, `getBlogPostLikeUsers`, + * `getFooterLikeCount`, `getFooterLikeUsers`, `getInlineLikeCount`, `getInlineLikeUsers`. + * + * v2 exposes NO endpoint to *add* a like, so freshly created content is unliked. The + * suite therefore verifies the *contract* of each reader rather than a positive count: + * - the `*LikeCount` family returns a `{ count }` object whose `count` is a `number >= 0` + * (model: `apiObject({ count: z.number().optional() })`); + * - the `*LikeUsers` family returns a well-typed result page — a `results` array (likely + * empty) plus a `_links` (`MultiEntityLinks`) object — and each entry, when present, is a + * `Like` (`{ accountId?: string }`); + * - the `id` path param is declared `z.number()` while entity ids are numeric *strings*, so + * every call converts with `Number(entity.id)` (the v2 "ID gotcha"); + * - a non-existent id surfaces as a typed `ApiError`. + * + * Bootstrap: one space → one page (carrying a unique anchor phrase) → one blog post → one + * footer comment on the page → (best-effort) one inline comment anchored to the page phrase. + * Inline-comment creation can be environment-sensitive, so it is guarded: when it succeeds the + * inline likes are tested deeply, otherwise they are exercised gated-graceful against a + * non-existent id (asserting a 404 `ApiError`). + */ + +let client: ReturnType; +const tracker = new ResourceTracker(); + +let pageId: number; +let blogPostId: number; +let footerCommentId: number; +/** Set only if the inline comment bootstrap succeeded. */ +let inlineCommentId: number | undefined; +/** Captured reason the inline comment could not be created, for the skip message. */ +let inlineBootstrapError: unknown; + +/** The unique text rendered into the page body and reused as the inline-comment anchor. */ +const ANCHOR = `cfjs-like-anchor-${Date.now().toString(36)}`; + +/** A `{ count }` like-count payload is well-formed iff `count` is a non-negative number. */ +function expectWellFormedLikeCount(payload: { count?: number }) { + expect(payload).toBeDefined(); + expect(typeof payload.count).toBe('number'); + expect(Number.isFinite(payload.count)).toBe(true); + expect(payload.count).toBeGreaterThanOrEqual(0); +} + +/** A like-users page exposes a `results` array and a `_links` object; entries are typed `Like`. */ +function expectWellFormedLikeUsers(page: { results?: { accountId?: string }[]; _links?: unknown }) { + expect(page).toBeDefined(); + expect(Array.isArray(page.results)).toBe(true); + expect(page._links).toBeDefined(); + expect(typeof page._links).toBe('object'); + page.results!.forEach(user => { + // `Like.accountId` is `z.string().optional()`. + if (user.accountId !== undefined) { + expect(typeof user.accountId).toBe('string'); + expect(user.accountId.length).toBeGreaterThan(0); + } + }); +} + +beforeAll(async () => { + client = getLiveClient(); + + const space = await createTestSpace(tracker); + + const page = await createTestPage(tracker, space.id, { + html: `

cfjs live like test — ${ANCHOR}

`, + }); + pageId = Number(page.id); + + const blogPost = await createTestBlogPost(tracker, space.id); + blogPostId = Number(blogPost.id); + + const footerComment = await client.comment.createFooterComment({ + pageId: page.id, + body: storageBody(testName('footer-like-comment')), + }); + footerCommentId = Number(footerComment.id); + tracker.defer(async () => { + await client.comment.deleteFooterComment({ commentId: footerCommentId }).catch(() => undefined); + }); + + // Best-effort inline comment anchored to the unique phrase in the page body. Inline-comment + // creation depends on the highlight resolving server-side, so failures are tolerated. + try { + const inlineComment = await client.comment.createInlineComment({ + pageId: page.id, + body: storageBody(testName('inline-like-comment')), + inlineCommentProperties: { + textSelection: ANCHOR, + textSelectionMatchCount: 1, + textSelectionMatchIndex: 0, + }, + }); + inlineCommentId = Number(inlineComment.id); + tracker.defer(async () => { + await client.comment.deleteInlineComment({ commentId: inlineCommentId! }).catch(() => undefined); + }); + } catch (error) { + inlineBootstrapError = error; + } +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — like.getPageLikeCount (live)', () => { + it('returns a non-negative numeric like count for a fresh, unliked page', async () => { + const result = await client.like.getPageLikeCount({ id: pageId }); + + expectWellFormedLikeCount(result); + // No v2 add-like endpoint exists, so a brand-new page must have zero likes. + expect(result.count).toBe(0); + }); + + it('rejects a non-existent page id with a 404 ApiError', async () => { + let caught: unknown; + + try { + await client.like.getPageLikeCount({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — like.getPageLikeUsers (live)', () => { + it('returns a well-typed (and, for an unliked page, empty) users page', async () => { + const page = await client.like.getPageLikeUsers({ id: pageId }); + + expectWellFormedLikeUsers(page); + expect(page.results).toHaveLength(0); + }); + + it('honors the `limit` query parameter', async () => { + const page = await client.like.getPageLikeUsers({ id: pageId, limit: 1 }); + + expectWellFormedLikeUsers(page); + expect(page.results!.length).toBeLessThanOrEqual(1); + }); + + it('is consistent with the like count (no users ⇒ zero count)', async () => { + const [users, count] = await Promise.all([ + client.like.getPageLikeUsers({ id: pageId }), + client.like.getPageLikeCount({ id: pageId }), + ]); + + expect(users.results!.length).toBe(count.count); + }); +}); + +describe('Confluence Cloud v2 — like.getBlogPostLikeCount (live)', () => { + it('returns a non-negative numeric like count for a fresh blog post', async () => { + const result = await client.like.getBlogPostLikeCount({ id: blogPostId }); + + expectWellFormedLikeCount(result); + expect(result.count).toBe(0); + }); + + it('rejects a non-existent blog post id with a 404 ApiError', async () => { + let caught: unknown; + + try { + await client.like.getBlogPostLikeCount({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — like.getBlogPostLikeUsers (live)', () => { + it('returns a well-typed, empty users page for a fresh blog post', async () => { + const page = await client.like.getBlogPostLikeUsers({ id: blogPostId }); + + expectWellFormedLikeUsers(page); + expect(page.results).toHaveLength(0); + }); + + it('honors the `limit` query parameter', async () => { + const page = await client.like.getBlogPostLikeUsers({ id: blogPostId, limit: 1 }); + + expectWellFormedLikeUsers(page); + expect(page.results!.length).toBeLessThanOrEqual(1); + }); +}); + +describe('Confluence Cloud v2 — like.getFooterLikeCount (live)', () => { + it('returns a non-negative numeric like count for a fresh footer comment', async () => { + const result = await client.like.getFooterLikeCount({ id: footerCommentId }); + + expectWellFormedLikeCount(result); + expect(result.count).toBe(0); + }); + + it('rejects a non-existent footer comment id with a 404 ApiError', async () => { + let caught: unknown; + + try { + await client.like.getFooterLikeCount({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — like.getFooterLikeUsers (live)', () => { + it('returns a well-typed, empty users page for a fresh footer comment', async () => { + const page = await client.like.getFooterLikeUsers({ id: footerCommentId }); + + expectWellFormedLikeUsers(page); + expect(page.results).toHaveLength(0); + }); + + it('is consistent with the footer like count', async () => { + const [users, count] = await Promise.all([ + client.like.getFooterLikeUsers({ id: footerCommentId }), + client.like.getFooterLikeCount({ id: footerCommentId }), + ]); + + expect(users.results!.length).toBe(count.count); + }); +}); + +describe('Confluence Cloud v2 — like.getInlineLikeCount / getInlineLikeUsers (live)', () => { + it('reads the inline like count + users for a created inline comment, or 404s on a bogus id', async () => { + if (inlineCommentId === undefined) { + // Inline-comment bootstrap failed in this environment; still exercise typing + + // serialization and assert the failure is a typed 404 ApiError. + + console.warn('like.test: inline comment bootstrap unavailable, falling back to 404 check', inlineBootstrapError); + + let caught: unknown; + try { + await client.like.getInlineLikeCount({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + + let caughtUsers: unknown; + try { + await client.like.getInlineLikeUsers({ id: 999_999_999 }); + } catch (error) { + caughtUsers = error; + } + expect(caughtUsers).toBeInstanceOf(ApiError); + expect((caughtUsers as ApiError).status).toBe(404); + + return; + } + + const count = await client.like.getInlineLikeCount({ id: inlineCommentId }); + expectWellFormedLikeCount(count); + expect(count.count).toBe(0); + + const users = await client.like.getInlineLikeUsers({ id: inlineCommentId }); + expectWellFormedLikeUsers(users); + expect(users.results).toHaveLength(0); + + // Cross-endpoint consistency: an unliked inline comment has no users and a zero count. + expect(users.results!.length).toBe(count.count); + }); + + it('honors the `limit` query parameter on getInlineLikeUsers when an inline comment exists', async () => { + if (inlineCommentId === undefined) return; + + const users = await client.like.getInlineLikeUsers({ id: inlineCommentId, limit: 1 }); + + expectWellFormedLikeUsers(users); + expect(users.results!.length).toBeLessThanOrEqual(1); + }); +}); diff --git a/packages/cloud/tests/integration/operation.test.ts b/packages/cloud/tests/integration/operation.test.ts new file mode 100644 index 00000000..292f7fa5 --- /dev/null +++ b/packages/cloud/tests/integration/operation.test.ts @@ -0,0 +1,278 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, createTestBlogPost, storageBody } from './setup/fixtures'; +import { testName } from './helpers/naming'; + +/** + * Live integration suite for the Confluence Cloud v2 `operation` API — the family + * of `getOperations` endpoints that report which actions the current user + * is permitted to perform on a given entity (`getPageOperations`, + * `getBlogPostOperations`, `getSpaceOperations`, `getAttachmentOperations`, + * `getCustomContentOperations`, `getWhiteboardOperations`, `getDatabaseOperations`, + * `getSmartLinkOperations`, `getFolderOperations`, `getFooterCommentOperations`, + * `getInlineCommentOperations`). + * + * Every method shares one response contract: `PermittedOperations`, i.e. + * `{ operations?: Operation[] | null }` where each `Operation` is + * `{ operation?: string, targetType?: string }`. The assertions verify that + * contract against real, owner-created entities (page, blog post, space, footer + * comment, inline comment): the list is non-empty, every entry exposes string + * `operation` + `targetType`, the well-known `read` operation is present for the + * owner, and `targetType` matches the entity kind. For the content types whose + * parents are not cheaply available (attachment, custom content, whiteboard, + * database, smart link, folder) the method is still invoked to exercise typing + + * serialization, asserting either a typed `PermittedOperations` or a typed + * `ApiError` (404/400). + * + * ID gotcha: every `get*Operations` parameter is typed `id: z.number()` while the + * entity ids in the models are numeric *strings*; ids are converted with + * `Number(entity.id)` before being passed. + */ + +let client: ReturnType; +const tracker = new ResourceTracker(); + +let space: Awaited>; +let page: Awaited>; +let blog: Awaited>; +let footerComment: Awaited>; + +/** Unique anchor phrase embedded in the page body so an inline comment can target it. */ +const INLINE_ANCHOR = `cfjs-inline-anchor-${Date.now().toString(36)}`; + +type Operations = Awaited>; + +/** + * A meaningful structural check for a `PermittedOperations` response: the list is + * present + non-empty, and every entry is a well-formed `Operation`. Returns the + * flat list of operation names for further assertions. + */ +function expectWellFormedOperations(result: Operations): string[] { + expect(result).toBeDefined(); + expect(Array.isArray(result.operations)).toBe(true); + const operations = result.operations ?? []; + expect(operations.length).toBeGreaterThan(0); + + for (const entry of operations) { + expect(typeof entry.operation).toBe('string'); + expect(entry.operation).toBeTruthy(); + expect(typeof entry.targetType).toBe('string'); + expect(entry.targetType).toBeTruthy(); + } + + return operations.map(entry => entry.operation!); +} + +/** + * Invoke a `get*Operations` method for a content type whose parent is not cheaply + * available. The call must either resolve to a typed `PermittedOperations` (when + * the id happens to exist) or reject with a typed `ApiError` carrying a 4xx + * status. Either outcome proves the method's typing + serialization are correct. + */ +async function expectOperationsOrApiError(call: () => Promise, label: string) { + let result: Operations | undefined; + let caught: unknown; + + try { + result = await call(); + } catch (error) { + caught = error; + } + + if (caught) { + expect(caught, `${label} should fail with a typed ApiError`).toBeInstanceOf(ApiError); + const status = (caught as ApiError).status; + expect([400, 401, 403, 404], `${label} unexpected status ${status}`).toContain(status); + + return; + } + + // When it resolves, the response must still satisfy the model shape. + expect(result).toBeDefined(); + expect(Array.isArray(result!.operations ?? [])).toBe(true); + + for (const entry of result!.operations ?? []) { + expect(typeof entry.operation).toBe('string'); + expect(typeof entry.targetType).toBe('string'); + } +} + +beforeAll(async () => { + client = getLiveClient(); + + space = await createTestSpace(tracker); + page = await createTestPage(tracker, space.id, { + html: `

cfjs live operation test ${INLINE_ANCHOR} body

`, + }); + blog = await createTestBlogPost(tracker, space.id); + + footerComment = await client.comment.createFooterComment({ + pageId: String(page.id), + body: storageBody(testName('footer-comment-for-operations')), + }); + tracker.defer(async () => { + await client.comment.deleteFooterComment({ commentId: Number(footerComment.id) }).catch(() => undefined); + }); +}, 60_000); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — operation.getPageOperations (live)', () => { + it('returns the owner-permitted operations for the created page', async () => { + const result = await client.operation.getPageOperations({ id: Number(page.id) }); + + const names = expectWellFormedOperations(result); + // The creating account owns the page, so it can at minimum read it. + expect(names).toContain('read'); + // The page-scoped operations should advertise the page as their target. + expect(result.operations!.some(op => op.targetType === 'page')).toBe(true); + }); + + it('rejects a non-existent page id with a typed ApiError', async () => { + let caught: unknown; + + try { + await client.operation.getPageOperations({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + }); +}); + +describe('Confluence Cloud v2 — operation.getSpaceOperations (live)', () => { + it('returns the owner-permitted operations for the created space', async () => { + const result = await client.operation.getSpaceOperations({ id: Number(space.id) }); + + const names = expectWellFormedOperations(result); + expect(names).toContain('read'); + // A space exposes operations targeting both the space and its contents. + expect(result.operations!.some(op => op.targetType === 'space')).toBe(true); + }); +}); + +describe('Confluence Cloud v2 — operation.getBlogPostOperations (live)', () => { + it('returns the owner-permitted operations for the created blog post', async () => { + const result = await client.operation.getBlogPostOperations({ id: Number(blog.id) }); + + const names = expectWellFormedOperations(result); + expect(names).toContain('read'); + expect(result.operations!.some(op => op.targetType === 'blogpost')).toBe(true); + }); +}); + +describe('Confluence Cloud v2 — operation.getFooterCommentOperations (live)', () => { + it('returns the owner-permitted operations for the created footer comment', async () => { + const result = await client.operation.getFooterCommentOperations({ id: Number(footerComment.id) }); + + const names = expectWellFormedOperations(result); + // The author of a comment can at least read it. + expect(names).toContain('read'); + expect(result.operations!.some(op => op.targetType === 'comment')).toBe(true); + }); + + it('rejects a non-existent footer comment id with a typed ApiError', async () => { + let caught: unknown; + + try { + await client.operation.getFooterCommentOperations({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + }); +}); + +describe('Confluence Cloud v2 — operation.getInlineCommentOperations (live)', () => { + let inlineCommentId: number | undefined; + + beforeAll(async () => { + // Anchor an inline comment to the unique phrase planted in the page body. + try { + const inline = await client.comment.createInlineComment({ + pageId: String(page.id), + body: storageBody(testName('inline-comment-for-operations')), + inlineCommentProperties: { + textSelection: INLINE_ANCHOR, + textSelectionMatchCount: 1, + textSelectionMatchIndex: 0, + }, + }); + inlineCommentId = Number(inline.id); + tracker.defer(async () => { + await client.comment.deleteInlineComment({ commentId: Number(inline.id) }).catch(() => undefined); + }); + } catch { + inlineCommentId = undefined; + } + }, 30_000); + + it('returns the owner-permitted operations for the created inline comment, or a typed ApiError', async () => { + if (inlineCommentId !== undefined) { + const result = await client.operation.getInlineCommentOperations({ id: inlineCommentId }); + + const names = expectWellFormedOperations(result); + expect(names).toContain('read'); + expect(result.operations!.some(op => op.targetType === 'comment')).toBe(true); + + return; + } + + // Inline comment creation was not feasible on this site — exercise the method + // with a plausible id and assert it fails as a typed ApiError. + await expectOperationsOrApiError( + () => client.operation.getInlineCommentOperations({ id: 999_999_999 }), + 'getInlineCommentOperations', + ); + }); +}); + +describe('Confluence Cloud v2 — operation: content types without a cheap parent (typing + ApiError)', () => { + // These targets (attachment, custom content, whiteboard, database, smart link, + // folder) are not created by the bootstrap, so each method is called with a + // plausible id. The contract is: a typed PermittedOperations OR a typed ApiError. + // NOTE: unlike every sibling endpoint, getAttachmentOperations types `id` as a + // string (attachment ids are non-numeric, e.g. `att123`); pass a string here. + it('getAttachmentOperations resolves to PermittedOperations or a typed ApiError', () => + expectOperationsOrApiError( + () => client.operation.getAttachmentOperations({ id: 'att999999999' }), + 'getAttachmentOperations', + )); + + it('getCustomContentOperations resolves to PermittedOperations or a typed ApiError', () => + expectOperationsOrApiError( + () => client.operation.getCustomContentOperations({ id: 999_999_999 }), + 'getCustomContentOperations', + )); + + it('getWhiteboardOperations resolves to PermittedOperations or a typed ApiError', () => + expectOperationsOrApiError( + () => client.operation.getWhiteboardOperations({ id: 999_999_999 }), + 'getWhiteboardOperations', + )); + + it('getDatabaseOperations resolves to PermittedOperations or a typed ApiError', () => + expectOperationsOrApiError( + () => client.operation.getDatabaseOperations({ id: 999_999_999 }), + 'getDatabaseOperations', + )); + + it('getSmartLinkOperations resolves to PermittedOperations or a typed ApiError', () => + expectOperationsOrApiError( + () => client.operation.getSmartLinkOperations({ id: 999_999_999 }), + 'getSmartLinkOperations', + )); + + it('getFolderOperations resolves to PermittedOperations or a typed ApiError', () => + expectOperationsOrApiError( + () => client.operation.getFolderOperations({ id: 999_999_999 }), + 'getFolderOperations', + )); +}); diff --git a/packages/cloud/tests/integration/page.test.ts b/packages/cloud/tests/integration/page.test.ts new file mode 100644 index 00000000..93d845c2 --- /dev/null +++ b/packages/cloud/tests/integration/page.test.ts @@ -0,0 +1,412 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient, v1Request } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, storageBody, type TestSpace } from './setup/fixtures'; +import { testName } from './helpers/naming'; +import { waitFor } from './helpers/poll'; + +/** + * Live integration suite for the Confluence Cloud v2 `page` API — the central + * content type — covering its full lifecycle: + * `createPage`, `getPageById`, `getPages`, `getPagesInSpace`, `getLabelPages`, + * `updatePage`, `updatePageTitle`, `deletePage`. + * + * The assertions verify the *contract* of each function, not merely that a call + * resolves: a created page is typed exactly as the `Page` Zod model declares + * (`id`/`spaceId`/`authorId` are numeric strings, `createdAt` is a real `Date`, + * `version.number` is a number); the same canonical page comes back consistently + * across endpoints; mutations bump `version.number` and change the observable + * title/body; query parameters (`spaceId`, `status`, `limit` + pagination cursor) + * have a real, observable effect; a page filed under a label is found via + * `getLabelPages`; and a deleted page surfaces as a typed 404 `ApiError`. + * + * Shared infrastructure (see `./setup` and `./helpers`): + * - `getLiveClient()` — singleton v2 client; + * - `createTestSpace` / `createTestPage` / `storageBody` — fixtures that + * self-register teardown on the suite's `ResourceTracker`; + * - `v1Request` — authenticated v1 REST fetch for the label gap v2 lacks; + * - `testName()` — run-scoped, marker-tagged unique names so a crashed run is + * swept by the global setup. + * + * ID gotcha: model ids are numeric *strings* (`page.id: string`), while the path + * params of `getPageById`/`updatePage`/`deletePage` are `z.number()` — every such + * call converts with `Number(page.id)`. + */ + +/** Statuses a page may report — the `ContentStatus` enum. */ +const PAGE_STATUSES = ['current', 'draft', 'archived', 'historical', 'trashed', 'deleted', 'any'] as const; + +type Page = Awaited['page']['createPage']>>; + +/** Shape of the v1 `POST /content/{id}/label` response we rely on for label ids. */ +interface V1LabelResponse { + results: Array<{ prefix: string; name: string; id: string; label: string }> +} + +let client: ReturnType; +const tracker = new ResourceTracker(); +let space: TestSpace; +/** The canonical page created directly via `createPage`, asserted against everywhere. */ +let primaryPage: Page; +const primaryHtml = '

cfjs page lifecycle — created

'; + +/** Extract the opaque `cursor` query value from a `_links.next` relative URL. */ +function cursorOf(next?: string | null): string | undefined { + if (!next) return undefined; + + try { + return new URL(next, 'https://confluence.invalid').searchParams.get('cursor') ?? undefined; + } catch { + return undefined; + } +} + +/** A meaningful structural check for any page/page-summary returned by the API. */ +function expectWellFormedPage(page: { + id?: string; + status?: string; + title?: string; + spaceId?: string; + authorId?: string; + createdAt?: Date; + version?: { number?: number } | null; +}) { + expect(typeof page.id).toBe('string'); + expect(page.id).toBeTruthy(); + // Numeric string id — convertible to a finite number. + expect(Number.isFinite(Number(page.id))).toBe(true); + expect(typeof page.title).toBe('string'); + expect(PAGE_STATUSES).toContain(page.status); + expect(typeof page.spaceId).toBe('string'); + // `createdAt` is declared `z.coerce.date()`, so a parsed response yields a real Date. + expect(page.createdAt).toBeInstanceOf(Date); + expect(typeof page.version?.number).toBe('number'); +} + +beforeAll(async () => { + client = getLiveClient(); + + // One isolated space holds every page this suite creates. + space = await createTestSpace(tracker, 'page'); + + primaryPage = await client.page.createPage({ + body: { + spaceId: space.id, + status: 'current', + title: testName('page-primary'), + body: storageBody(primaryHtml), + }, + }); + tracker.defer(async () => { + await client.page.deletePage({ id: Number(primaryPage.id) }).catch(() => undefined); + }); + + // A second page guarantees the space holds >1 page so in-space pagination has a cursor. + await createTestPage(tracker, space.id, { title: testName('page-secondary') }); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — page.createPage (live)', () => { + it('returns a populated, correctly-typed Page for the newly created page', () => { + expect(primaryPage.spaceId).toBe(space.id); + expect(primaryPage.status).toBe('current'); + expect(primaryPage.title).toBe(testName('page-primary')); + expect(typeof primaryPage.authorId).toBe('string'); + expect(primaryPage.authorId).toBeTruthy(); + // A freshly published page starts at version 1. + expect(primaryPage.version?.number).toBe(1); + expectWellFormedPage(primaryPage); + // Every real page exposes a web UI link. + expect(typeof primaryPage._links?.webui).toBe('string'); + expect(primaryPage._links?.webui).toBeTruthy(); + }); +}); + +describe('Confluence Cloud v2 — page.getPageById (live)', () => { + it('returns the same canonical entity that createPage produced', async () => { + const fetched = await client.page.getPageById({ id: Number(primaryPage.id) }); + + expect(fetched.id).toBe(primaryPage.id); + expect(fetched.title).toBe(primaryPage.title); + expect(fetched.status).toBe('current'); + expect(fetched.spaceId).toBe(space.id); + expect(fetched.authorId).toBe(primaryPage.authorId); + expect(fetched.version?.number).toBe(1); + expectWellFormedPage(fetched); + }); + + it('returns the storage body when `bodyFormat: storage` is requested', async () => { + const fetched = await client.page.getPageById({ id: Number(primaryPage.id), bodyFormat: 'storage' }); + + expect(fetched.body?.storage?.representation).toBe('storage'); + expect(typeof fetched.body?.storage?.value).toBe('string'); + expect(fetched.body?.storage?.value).toContain('created'); + }); + + it('expands `labels` only when the include flag is set', async () => { + const base = await client.page.getPageById({ id: Number(primaryPage.id) }); + expect(base.labels).toBeUndefined(); + + const expanded = await client.page.getPageById({ id: Number(primaryPage.id), includeLabels: true }); + expect(expanded.labels).toBeDefined(); + expect(Array.isArray(expanded.labels?.results)).toBe(true); + }); + + it('rejects a non-existent page id with a 404 ApiError', async () => { + let caught: unknown; + + try { + await client.page.getPageById({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — page.getPages (live)', () => { + it('returns a page of correctly-typed page summaries', async () => { + const result = await client.page.getPages({ limit: 25 }); + + expect(Array.isArray(result.results)).toBe(true); + expect(result.results!.length).toBeGreaterThan(0); + expect(result._links).toBeDefined(); + result.results!.forEach(expectWellFormedPage); + }); + + it('honors `limit` and exposes a pagination cursor when more results exist', async () => { + const firstPage = await client.page.getPages({ limit: 1 }); + + expect(firstPage.results?.length ?? 0).toBeLessThanOrEqual(1); + + const cursor = cursorOf(firstPage._links?.next); + + if (cursor) { + // The cursor surfaced from the `Link` header advances to a distinct result. + expect(firstPage.results).toHaveLength(1); + const secondPage = await client.page.getPages({ limit: 1, cursor }); + expect(secondPage.results?.[0]?.id).not.toBe(firstPage.results?.[0]?.id); + } + }); + + it('filters by `spaceId` — every returned page belongs to that space', async () => { + const result = await waitFor( + () => client.page.getPages({ spaceId: [Number(space.id)], limit: 100 }), + r => (r.results ?? []).some(p => p.id === primaryPage.id), + ); + + expect(result.results!.length).toBeGreaterThan(0); + expect(result.results!.every(p => p.spaceId === space.id)).toBe(true); + expect(result.results!.some(p => p.id === primaryPage.id)).toBe(true); + }); + + it('filters by `status` — only `current` pages are returned', async () => { + const result = await client.page.getPages({ spaceId: [Number(space.id)], status: ['current'], limit: 100 }); + + expect(result.results!.every(p => p.status === 'current')).toBe(true); + }); +}); + +describe('Confluence Cloud v2 — page.getPagesInSpace (live)', () => { + it('returns only pages from the requested space', async () => { + const result = await waitFor( + () => client.page.getPagesInSpace({ id: Number(space.id), limit: 100 }), + r => (r.results ?? []).some(p => p.id === primaryPage.id), + ); + + expect(result.results!.length).toBeGreaterThanOrEqual(2); + expect(result.results!.every(p => p.spaceId === space.id)).toBe(true); + expect(result.results!.some(p => p.id === primaryPage.id)).toBe(true); + result.results!.forEach(expectWellFormedPage); + }); + + it('honors `limit` and walks the `_links.next` pagination cursor', async () => { + const firstPage = await client.page.getPagesInSpace({ id: Number(space.id), limit: 1 }); + + expect(firstPage.results).toHaveLength(1); + // The space holds >1 page, so a cursor to the next set must be present. + expect(typeof firstPage._links?.next).toBe('string'); + + const cursor = cursorOf(firstPage._links?.next); + expect(cursor).toBeTruthy(); + + const secondPage = await client.page.getPagesInSpace({ id: Number(space.id), limit: 1, cursor }); + expect(secondPage.results).toHaveLength(1); + expect(secondPage.results?.[0]?.id).not.toBe(firstPage.results?.[0]?.id); + }); + + it('filters by `status` — `current` excludes nothing this suite created', async () => { + const result = await client.page.getPagesInSpace({ id: Number(space.id), status: ['current'], limit: 100 }); + + expect(result.results!.every(p => p.status === 'current')).toBe(true); + expect(result.results!.some(p => p.id === primaryPage.id)).toBe(true); + }); +}); + +describe('Confluence Cloud v2 — page.getLabelPages (live)', () => { + const labelName = testName('lbl').replace(/[^a-z0-9]/gi, ''); + let labelId: number | undefined; + + beforeAll(async () => { + // v2 has no add-label endpoint, so the label is attached via v1 REST. + const response = await v1Request(`content/${primaryPage.id}/label`, { + method: 'POST', + body: [{ prefix: 'global', name: labelName }], + }).catch(() => undefined); + + const match = response?.results.find(l => l.name === labelName) ?? response?.results[0]; + labelId = match?.id !== undefined ? Number(match.id) : undefined; + }); + + it('lists the page filed under the freshly added label', async () => { + // Degrade gracefully: if the label id could not be resolved, only prove the + // endpoint is well-typed against a benign id rather than hard-failing. + if (labelId === undefined || !Number.isFinite(labelId)) { + const fallback = await client.page.getLabelPages({ id: 0 }).catch(error => error); + expect(fallback === null || fallback instanceof ApiError || Array.isArray(fallback.results)).toBe(true); + + return; + } + + const result = await waitFor( + () => client.page.getLabelPages({ id: labelId! }), + r => (r.results ?? []).some(p => p.id === primaryPage.id), + { maxAttempts: 8 }, + ); + + expect(result.results!.some(p => p.id === primaryPage.id)).toBe(true); + result.results!.forEach(expectWellFormedPage); + }); + + it('scopes results to the requested space via `spaceId`', async () => { + if (labelId === undefined || !Number.isFinite(labelId)) return; + + const result = await client.page.getLabelPages({ id: labelId, spaceId: [Number(space.id)], limit: 100 }); + + expect(Array.isArray(result.results)).toBe(true); + expect(result.results!.every(p => p.spaceId === space.id)).toBe(true); + }); +}); + +describe('Confluence Cloud v2 — page.updatePage (live)', () => { + it('changes the title and body and increments the version number', async () => { + const current = await client.page.getPageById({ id: Number(primaryPage.id) }); + const currentVersion = current.version!.number!; + const newTitle = testName('page-updated'); + const newHtml = '

cfjs page lifecycle — body replaced

'; + + const updated = await client.page.updatePage({ + id: Number(primaryPage.id), + body: { + id: primaryPage.id, + status: 'current', + title: newTitle, + body: storageBody(newHtml), + version: { number: currentVersion + 1 }, + }, + }); + + expect(updated.id).toBe(primaryPage.id); + expect(updated.title).toBe(newTitle); + expect(updated.version?.number).toBe(currentVersion + 1); + + // Re-fetch with the body to confirm the change actually persisted server-side. + const refetched = await client.page.getPageById({ id: Number(primaryPage.id), bodyFormat: 'storage' }); + expect(refetched.title).toBe(newTitle); + expect(refetched.version?.number).toBe(currentVersion + 1); + expect(refetched.body?.storage?.value).toContain('replaced'); + }); +}); + +describe('Confluence Cloud v2 — page.updatePageTitle (live)', () => { + it('changes the title and bumps the version without touching the body', async () => { + const current = await client.page.getPageById({ id: Number(primaryPage.id), bodyFormat: 'storage' }); + const currentVersion = current.version!.number!; + const currentBody = current.body?.storage?.value; + const newTitle = testName('page-retitled'); + + const updated = await client.page.updatePageTitle({ + id: Number(primaryPage.id), + body: { + id: primaryPage.id, + status: 'current', + title: newTitle, + version: { number: currentVersion + 1 }, + }, + }); + + expect(updated.id).toBe(primaryPage.id); + expect(updated.title).toBe(newTitle); + expect(updated.version?.number).toBe(currentVersion + 1); + + const refetched = await client.page.getPageById({ id: Number(primaryPage.id), bodyFormat: 'storage' }); + expect(refetched.title).toBe(newTitle); + expect(refetched.version?.number).toBe(currentVersion + 1); + // The body is preserved by a title-only update. + expect(refetched.body?.storage?.value).toBe(currentBody); + }); +}); + +describe('Confluence Cloud v2 — page hierarchy / breadth (live)', () => { + it('creates a minimal page (spaceId + title + body) and re-fetches it', async () => { + const minimal = await createTestPage(tracker, space.id, { title: testName('page-minimal') }); + + const fetched = await client.page.getPageById({ id: Number(minimal.id) }); + expect(fetched.id).toBe(minimal.id); + expect(fetched.spaceId).toBe(space.id); + expect(fetched.title).toBe(testName('page-minimal')); + expectWellFormedPage(fetched); + }); + + it('creates a child page under a parent and reports the parent linkage', async () => { + const child = await createTestPage(tracker, space.id, { + title: testName('page-child'), + parentId: primaryPage.id, + }); + + expect(child.parentId).toBe(primaryPage.id); + + const fetched = await client.page.getPageById({ id: Number(child.id) }); + expect(fetched.parentId).toBe(primaryPage.id); + expect(fetched.parentType).toBe('page'); + expectWellFormedPage(fetched); + }); +}); + +describe('Confluence Cloud v2 — page.deletePage (live)', () => { + let disposable: Page; + + beforeAll(async () => { + disposable = await client.page.createPage({ + body: { + spaceId: space.id, + status: 'current', + title: testName('page-disposable'), + body: storageBody('

cfjs page to be deleted

'), + }, + }); + // Safety net in case the assertion below never runs (e.g. create succeeded but delete throws). + tracker.defer(async () => { + await client.page.deletePage({ id: Number(disposable.id) }).catch(() => undefined); + }); + }); + + it('deletes the page so it is no longer current (trashed or, if purged, 404)', async () => { + await client.page.deletePage({ id: Number(disposable.id) }); + + // A plain v2 DELETE moves content to TRASH (204) rather than purging it: the + // page is still fetchable, now with status 'trashed'. Only a purge yields 404. + const after = await client.page.getPageById({ id: Number(disposable.id) }).catch(e => e); + + if (after instanceof ApiError) { + expect(after.status).toBe(404); // hard-deleted (purged) + } else { + expect(['trashed', 'deleted']).toContain(after.status); // moved to trash (the common case) + } + }); +}); diff --git a/packages/cloud/tests/integration/redactions.test.ts b/packages/cloud/tests/integration/redactions.test.ts new file mode 100644 index 00000000..14a065b5 --- /dev/null +++ b/packages/cloud/tests/integration/redactions.test.ts @@ -0,0 +1,115 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, createTestBlogPost } from './setup/fixtures'; + +/** + * Live integration suite for the Confluence Cloud v2 `redactions` API + * (`postRedactPage`, `postRedactBlog`). + * + * This is a PREMIUM, ENVIRONMENT-GATED module — both endpoints require + * **Atlassian Guard Premium** and PERMANENTLY alter content. On a standard + * Cloud site they are expected to surface a typed `ApiError` + * (401/403/404, or 451/501 where the feature is unprovisioned; 400 for a body + * the non-premium endpoint rejects outright). + * + * SAFETY: redaction is destructive, so the calls target ONLY disposable + * fixtures — a throwaway page and a throwaway blog post created in a throwaway + * space, all auto-deleted on cleanup. Even on the success branch the mutated + * content is disposable. No shared or pre-existing content is ever touched. + * + * Both methods are exercised gated-gracefully: each is CALLED (so request + * serialization + the Zod `RedactionResponse` parse are type-checked end to + * end) and the result is asserted to be either the exact typed shape OR a typed + * `ApiError`. + * + * Shared infrastructure (see `./setup` and `./helpers`): + * - `getLiveClient()` — singleton v2 client; + * - `ResourceTracker` — LIFO teardown; + * - `createTestSpace` / `createTestPage` / `createTestBlogPost` — self-cleaning fixtures. + */ + +const GATED_STATUSES = [400, 401, 403, 404, 451, 501] as const; + +/** A plausible redaction request body (the param body is an opaque record). */ +const REDACT_BODY = { redactions: [{ pointer: '/body', from: 0, to: 1, reason: 'cfjs live test' }] }; + +let client: ReturnType; +const tracker = new ResourceTracker(); + +let pageId: number; +let blogId: number; + +/** Structural contract check for a `RedactionResponse` (used on the success branch). */ +function expectWellFormedRedactionResponse(response: { body?: unknown; title?: unknown }) { + expect(typeof response).toBe('object'); + + // `body` / `title` are `RedactionSection.nullish()` — absent, null, or a + // section whose `redactions` is a nullish array of typed pointer responses. + for (const section of [response.body, response.title]) { + if (section != null) { + const redactions = (section as { redactions?: unknown }).redactions; + + if (redactions != null) { + expect(Array.isArray(redactions)).toBe(true); + (redactions as Array>).forEach(r => { + if (r.pointer !== undefined) expect(typeof r.pointer).toBe('string'); + + if (r.from !== undefined) expect(typeof r.from).toBe('number'); + + if (r.to !== undefined) expect(typeof r.to).toBe('number'); + + if (r.reason !== undefined) expect(typeof r.reason).toBe('string'); + + if (r.redactionId !== undefined) expect(typeof r.redactionId).toBe('string'); + }); + } + } + } +} + +beforeAll(async () => { + client = getLiveClient(); + + const space = await createTestSpace(tracker, 'redact'); + const page = await createTestPage(tracker, space.id, { + title: 'redact-page-probe', + html: '

sensitive content to redact

', + }); + const blog = await createTestBlogPost(tracker, space.id, { + title: 'redact-blog-probe', + html: '

sensitive content to redact

', + }); + + pageId = Number(page.id); + blogId = Number(blog.id); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — redactions.postRedactPage (live, premium-gated, SAFE)', () => { + it('redacts the disposable fixture page returning a typed RedactionResponse, or a typed ApiError', async () => { + try { + const response = await client.redactions.postRedactPage({ id: pageId, body: REDACT_BODY }); + expectWellFormedRedactionResponse(response); + } catch (error) { + // Premium gate (Atlassian Guard Premium) on a standard site. + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); +}); + +describe('Confluence Cloud v2 — redactions.postRedactBlog (live, premium-gated, SAFE)', () => { + it('redacts the disposable fixture blog post returning a typed RedactionResponse, or a typed ApiError', async () => { + try { + const response = await client.redactions.postRedactBlog({ id: blogId, body: REDACT_BODY }); + expectWellFormedRedactionResponse(response); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); +}); diff --git a/packages/cloud/tests/integration/setup/client.ts b/packages/cloud/tests/integration/setup/client.ts new file mode 100644 index 00000000..8cb8e64f --- /dev/null +++ b/packages/cloud/tests/integration/setup/client.ts @@ -0,0 +1,88 @@ +/** + * Shared live clients for the cloud integration suite. + * + * Every suite calls {@link getLiveClient} in `beforeAll` rather than constructing + * its own client, so retry/auth policy is defined once. A second, thin v1 REST + * helper ({@link v1Request}) covers the handful of operations the v2 API does not + * expose but the tests still need — deleting a space and uploading an attachment. + */ +import { createCloudV2Client } from '@confluence.js/cloud'; +import { requireLiveEnv } from './env'; + +type CloudV2Client = ReturnType; + +let cachedClient: CloudV2Client | null = null; + +/** + * Singleton v2 client pointed at `${HOST}/wiki/api/v2`. + * + * `retry` rides out the occasional transient TLS reset / 5xx Atlassian Cloud + * throws without masking real 4xx failures. + */ +export function getLiveClient(): CloudV2Client { + if (!cachedClient) { + const { host, email, apiToken } = requireLiveEnv(); + + cachedClient = createCloudV2Client({ + host: `${host}/wiki/api/v2`, + auth: { type: 'basic', email, apiToken }, + retry: { maxAttempts: 3, initialDelayMs: 300 }, + }); + } + + return cachedClient; +} + +/** Basic-auth header value for raw v1 REST calls. */ +function authHeader(): string { + const { email, apiToken } = requireLiveEnv(); + + return `Basic ${Buffer.from(`${email}:${apiToken}`).toString('base64')}`; +} + +export interface V1RequestOptions { + method?: string; + /** JSON body — serialized and sent with `Content-Type: application/json`. */ + body?: unknown; + /** Pre-built body (e.g. `FormData`) sent as-is; takes precedence over `body`. */ + raw?: BodyInit; + headers?: Record; +} + +/** + * Minimal authenticated fetch against the v1 REST API + * (`${HOST}/wiki/rest/api/`). Used only for the gaps in v2 — chiefly + * `DELETE /space/{key}` (v2 has no deleteSpace) and multipart attachment upload. + * Returns the parsed JSON body, or the raw `Response` for callers that need the + * status. Throws on a non-2xx response with the status and body text. + */ +export async function v1Request(path: string, options: V1RequestOptions = {}): Promise { + const { host } = requireLiveEnv(); + const headers: Record = { + Authorization: authHeader(), + Accept: 'application/json', + ...options.headers, + }; + + let body: BodyInit | undefined = options.raw; + + if (body === undefined && options.body !== undefined) { + body = JSON.stringify(options.body); + headers['Content-Type'] = 'application/json'; + } + + const response = await fetch(`${host}/wiki/rest/api/${path.replace(/^\/+/, '')}`, { + method: options.method ?? 'GET', + headers, + body, + }); + + if (!response.ok) { + const text = await response.text().catch(() => ''); + throw new Error(`v1 ${options.method ?? 'GET'} ${path} → ${response.status} ${response.statusText} ${text}`); + } + + const text = await response.text(); + + return (text ? JSON.parse(text) : undefined) as T; +} diff --git a/packages/cloud/tests/integration/setup/env.ts b/packages/cloud/tests/integration/setup/env.ts new file mode 100644 index 00000000..e7043049 --- /dev/null +++ b/packages/cloud/tests/integration/setup/env.ts @@ -0,0 +1,38 @@ +/** + * Live-test environment resolution. + * + * The cloud vitest config injects the repo-root `.env` into `process.env` + * (via `loadEnv`), so the three Confluence Cloud credentials are read straight + * from there. A single, well-typed accessor keeps every suite honest: a missing + * credential fails loudly and uniformly instead of producing a confusing 401. + */ + +export interface LiveTestEnv { + /** Site base URL, e.g. `https://your-site.atlassian.net` (no trailing slash, no API path). */ + host: string; + /** Atlassian account email used for basic auth. */ + email: string; + /** Atlassian API token paired with `email`. */ + apiToken: string; +} + +/** True when all credentials required for live tests are present. */ +export function hasLiveEnv(): boolean { + return Boolean(process.env.HOST && process.env.EMAIL && process.env.API_TOKEN); +} + +/** Resolve live credentials, throwing a single actionable error when absent. */ +export function requireLiveEnv(): LiveTestEnv { + const host = process.env.HOST?.replace(/\/+$/, ''); + const email = process.env.EMAIL; + const apiToken = process.env.API_TOKEN; + + if (!host || !email || !apiToken) { + throw new Error( + 'Live cloud tests require HOST, EMAIL and API_TOKEN in the repo-root .env.\n' + + 'HOST must be the bare site URL (e.g. https://your-site.atlassian.net) — the suites append the API paths.', + ); + } + + return { host, email, apiToken }; +} diff --git a/packages/cloud/tests/integration/setup/fixtures.ts b/packages/cloud/tests/integration/setup/fixtures.ts new file mode 100644 index 00000000..5f8cd742 --- /dev/null +++ b/packages/cloud/tests/integration/setup/fixtures.ts @@ -0,0 +1,99 @@ +/** + * Resource fixtures shared across the live cloud suite. + * + * Most v2 resources hang off a space (pages, blog posts, custom content, + * properties, permissions) and many off a page (attachments, comments, labels, + * versions, children). These helpers create the common parents in one call, + * register their teardown on the suite's {@link ResourceTracker}, and return the + * created entity so a suite can get to its actual subject in two or three lines. + * + * They deliberately use only the public v2 client (plus the v1 delete-space gap), + * so a fixture that breaks is itself a signal worth surfacing. + */ +import { getLiveClient, v1Request } from './client'; +import type { ResourceTracker } from './resources'; +import { spaceKey, testName } from '../helpers/naming'; + +/** Confluence "storage" representation body for a page/blog post/comment. */ +export function storageBody(html: string) { + return { representation: 'storage' as const, value: html }; +} + +export interface TestSpace { + id: string; + key: string; + name: string; +} + +/** + * Create an isolated space and register its deletion (via v1 REST — v2 has no + * deleteSpace). `label` disambiguates the key/name when a suite needs several. + */ +export async function createTestSpace(tracker: ResourceTracker, label = 'space'): Promise { + const client = getLiveClient(); + const key = spaceKey(label); + const space = await client.space.createSpace({ body: { key, name: testName(label) } }); + + tracker.defer(async () => { + await v1Request(`space/${key}`, { method: 'DELETE' }).catch(() => undefined); + }); + + return { id: String(space.id), key: space.key!, name: space.name! }; +} + +export interface CreateTestPageOptions { + title?: string; + /** Storage-format HTML; defaults to a small paragraph. */ + html?: string; + parentId?: string; + status?: 'current' | 'draft'; +} + +/** Create a page in `spaceId` and register its deletion. */ +export async function createTestPage(tracker: ResourceTracker, spaceId: string, options: CreateTestPageOptions = {}) { + const client = getLiveClient(); + const page = await client.page.createPage({ + body: { + spaceId, + status: options.status ?? 'current', + title: options.title ?? testName('page'), + ...(options.parentId ? { parentId: options.parentId } : {}), + body: storageBody(options.html ?? '

cfjs live test page

'), + }, + }); + + tracker.defer(async () => { + await client.page.deletePage({ id: Number(page.id) }).catch(() => undefined); + }); + + return page; +} + +export interface CreateTestBlogPostOptions { + title?: string; + html?: string; + status?: 'current' | 'draft'; +} + +/** Create a blog post in `spaceId` and register its deletion. */ +export async function createTestBlogPost( + tracker: ResourceTracker, + spaceId: string, + options: CreateTestBlogPostOptions = {}, +) { + const client = getLiveClient(); + const blogPost = await client.blogPost.createBlogPost({ + body: { + spaceId, + status: options.status ?? 'current', + title: options.title ?? testName('blogpost'), + body: storageBody(options.html ?? '

cfjs live test blog post

'), + }, + }); + + tracker.defer(async () => { + await client.blogPost.deleteBlogPost({ id: Number(blogPost.id) }).catch(() => undefined); + }); + + return blogPost; +} diff --git a/packages/cloud/tests/integration/setup/globalSetup.ts b/packages/cloud/tests/integration/setup/globalSetup.ts new file mode 100644 index 00000000..6e8033ed --- /dev/null +++ b/packages/cloud/tests/integration/setup/globalSetup.ts @@ -0,0 +1,82 @@ +/** + * Global setup for the live cloud suite. + * + * Spaces are the heaviest resource the suites create, and Confluence deletes are + * async — a crashed run can leave a `[cfjs:…]` space behind. This sweep deletes + * every leftover marker-tagged space once before the run and once after, so the + * site never accumulates test debris regardless of how a run ends. Per-suite + * teardown (via ResourceTracker) still does the bulk of cleanup; this is the net. + */ +import { config } from 'dotenv'; +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { RESOURCE_MARKER } from '../helpers/naming'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const DELETE_ATTEMPTS = 3; + +interface V1Space { + key: string; + name?: string; +} + +interface V1SpaceList { + results?: V1Space[]; + _links?: { next?: string }; +} + +function auth(email: string, apiToken: string): string { + return `Basic ${Buffer.from(`${email}:${apiToken}`).toString('base64')}`; +} + +async function purgeLeftoverSpaces(host: string, email: string, apiToken: string): Promise { + const headers = { Authorization: auth(email, apiToken), Accept: 'application/json' }; + const leftovers: string[] = []; + + // Page through every space; collect those whose name carries our run marker. + let url: string | undefined = `${host}/wiki/rest/api/space?limit=100`; + + while (url) { + const response = await fetch(url, { headers }); + + if (!response.ok) return; + + const page = (await response.json()) as V1SpaceList; + + for (const space of page.results ?? []) { + if (space.name?.includes(`${RESOURCE_MARKER}:`) || space.key.startsWith('CFJS')) { + leftovers.push(space.key); + } + } + + url = page._links?.next ? `${host}/wiki${page._links.next}` : undefined; + } + + for (const key of leftovers) { + for (let attempt = 0; attempt < DELETE_ATTEMPTS; attempt++) { + const deletion = await fetch(`${host}/wiki/rest/api/space/${key}`, { method: 'DELETE', headers }); + + if (deletion.ok || deletion.status === 404) break; + + if (attempt < DELETE_ATTEMPTS - 1) { + await new Promise(r => setTimeout(r, 500 * (attempt + 1))); + } + } + } +} + +export default async function globalSetup(): Promise<() => Promise> { + config({ path: resolve(__dirname, '../../../../../.env'), override: false }); + + const host = process.env.HOST?.replace(/\/+$/, ''); + const email = process.env.EMAIL; + const apiToken = process.env.API_TOKEN; + + if (!host || !email || !apiToken) return async () => {}; + + await purgeLeftoverSpaces(host, email, apiToken); + + return async () => { + await purgeLeftoverSpaces(host, email, apiToken); + }; +} diff --git a/packages/cloud/tests/integration/setup/resources.ts b/packages/cloud/tests/integration/setup/resources.ts new file mode 100644 index 00000000..05f0bb99 --- /dev/null +++ b/packages/cloud/tests/integration/setup/resources.ts @@ -0,0 +1,39 @@ +/** + * LIFO cleanup stack for live-test resources. + * + * Suites register teardown closures with {@link ResourceTracker.defer} as they + * create resources, then call {@link ResourceTracker.cleanup} in `afterAll`. + * Cleanup runs in reverse creation order (children before parents) and retries + * each closure a few times — Confluence Cloud deletes are frequently async and a + * just-created resource can briefly 404/409 on delete. + */ +type CleanupFn = () => Promise; + +const CLEANUP_ATTEMPTS = 4; + +export class ResourceTracker { + private readonly stack: CleanupFn[] = []; + + /** Register a teardown closure; runs before everything deferred before it. */ + defer(fn: CleanupFn): void { + this.stack.push(fn); + } + + /** Run every deferred closure in reverse order, retrying transient failures. */ + async cleanup(): Promise { + const fns = this.stack.splice(0).reverse(); + + for (const fn of fns) { + for (let attempt = 0; attempt < CLEANUP_ATTEMPTS; attempt++) { + try { + await fn(); + break; + } catch { + if (attempt < CLEANUP_ATTEMPTS - 1) { + await new Promise(resolve => setTimeout(resolve, 500 * (attempt + 1))); + } + } + } + } + } +} diff --git a/packages/cloud/tests/integration/smartLink.test.ts b/packages/cloud/tests/integration/smartLink.test.ts new file mode 100644 index 00000000..114b231b --- /dev/null +++ b/packages/cloud/tests/integration/smartLink.test.ts @@ -0,0 +1,236 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, type TestSpace } from './setup/fixtures'; + +/** + * Live integration suite for the Confluence Cloud v2 `smartLink` API (Smart Links + * in the content tree / "embeds"), covering its full lifecycle: `createSmartLink`, + * `getSmartLinkById`, `deleteSmartLink`. + * + * The assertions verify the *contract* of each function, not merely that a call + * resolves: a created Smart Link is typed exactly as the `SmartLink` Zod model + * declares (`id`/`spaceId`/`authorId`/`ownerId` are numeric strings, `embedUrl` + * echoes the requested URL, `createdAt` is a real `Date`, `version.number` is a + * number, `status` is a `ContentStatus`); the same canonical Smart Link comes + * back consistently from `getSmartLinkById`; a Smart Link created under a page + * reports that page as its `parentId` with `parentType: 'page'`; and a deleted + * Smart Link surfaces as a typed 404 `ApiError`. + * + * Environment gating: Smart Link creation is wrapped defensively — a rejection is + * accepted as a typed `ApiError` with an expected status, and the get/delete + * typing is exercised against a plausible id. A gated run never hard-fails the + * suite — see report. + * + * ID gotcha: model ids are numeric *strings* (`smartLink.id: string`), while the + * path params of `getSmartLinkById`/`deleteSmartLink` are `z.number()` — every + * such call converts with `Number(smartLink.id)`. + */ + +/** Statuses a Smart Link may report — the `ContentStatus` enum. */ +const CONTENT_STATUSES = ['current', 'draft', 'archived', 'historical', 'trashed', 'deleted', 'any'] as const; + +/** Statuses accepted when the environment gates Smart Link creation. */ +const GATED_STATUSES = [400, 403, 404, 501] as const; + +/** A real, resolvable URL the Smart Link embeds. */ +const EMBED_URL = 'https://www.atlassian.com'; + +type SmartLink = Awaited['smartLink']['createSmartLink']>>; + +let client: ReturnType; +const tracker = new ResourceTracker(); +let space: TestSpace; +/** A page used as a parent for the nested-creation breadth check. */ +let parentPage: Awaited>; + +/** The canonical Smart Link created at the space root, asserted against everywhere. */ +let created: SmartLink | undefined; +let createError: unknown; + +/** The nested Smart Link created under `parentPage` (when not gated). */ +let nested: SmartLink | undefined; + +/** A meaningful structural check for any Smart Link returned by the API. */ +function expectWellFormedSmartLink(link: SmartLink) { + expect(typeof link.id).toBe('string'); + expect(link.id).toBeTruthy(); + expect(typeof link.spaceId).toBe('string'); + expect(link.spaceId).toBe(space.id); + + if (link.status !== undefined) expect(CONTENT_STATUSES).toContain(link.status); + + // `createdAt` is `z.coerce.date()` — a parsed response yields a real Date. + expect(link.createdAt).toBeInstanceOf(Date); + // A freshly created entity is version 1. + expect(link.version?.number).toBe(1); + expect(typeof link.authorId).toBe('string'); +} + +beforeAll(async () => { + client = getLiveClient(); + + space = await createTestSpace(tracker); + parentPage = await createTestPage(tracker, space.id); + + // Always attempt creation — exercises param/body serialization either way. + try { + created = await client.smartLink.createSmartLink({ body: { spaceId: space.id, embedUrl: EMBED_URL } }); + + const id = Number(created.id); + tracker.defer(async () => { + await client.smartLink.deleteSmartLink({ id }).catch(() => undefined); + }); + } catch (error) { + createError = error; + } + + // Breadth: a Smart Link filed under a page should report the page as its parent. + if (created) { + try { + nested = await client.smartLink.createSmartLink({ + body: { spaceId: space.id, embedUrl: EMBED_URL, parentId: parentPage.id }, + }); + + const id = Number(nested.id); + tracker.defer(async () => { + await client.smartLink.deleteSmartLink({ id }).catch(() => undefined); + }); + } catch { + nested = undefined; + } + } +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — smartLink.createSmartLink (live, lifecycle)', () => { + it('either creates a typed SmartLink or rejects with a typed ApiError when gated', () => { + if (created) { + expectWellFormedSmartLink(created); + + // The embedded URL echoes the requested one (per the model, omitted only when absent). + if (created.embedUrl !== undefined) expect(created.embedUrl).toBe(EMBED_URL); + + // A title is derived from the link target — a string when present. + if (created.title !== undefined) expect(typeof created.title).toBe('string'); + + // Created at the space root → no parent content. + expect(created.parentId == null || typeof created.parentId === 'string').toBe(true); + + return; + } + + // Gated path — site does not permit Smart Link creation. + expect(createError, 'create neither succeeded nor threw').toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((createError as ApiError).status); + }); + + it('files a Smart Link under a page with parentType `page` (breadth)', () => { + if (!nested) return; // gated, or nested creation unsupported here + + expect(nested.parentId).toBe(parentPage.id); + expect(nested.parentType).toBe('page'); + expect(nested.spaceId).toBe(space.id); + expect(nested.version?.number).toBe(1); + }); +}); + +describe('Confluence Cloud v2 — smartLink.getSmartLinkById (live)', () => { + it('returns the canonical entity created above with model-typed fields', async () => { + if (!created) return; // covered by the dedicated 404 case below in the gated path + + const fetched = await client.smartLink.getSmartLinkById({ id: Number(created.id) }); + + expect(fetched.id).toBe(created.id); + expect(fetched.spaceId).toBe(space.id); + + if (fetched.embedUrl !== undefined) expect(fetched.embedUrl).toBe(EMBED_URL); + + expect(CONTENT_STATUSES).toContain(fetched.status); + expect(fetched.createdAt).toBeInstanceOf(Date); + expect(fetched.version?.number).toBe(1); + // Every real Smart Link exposes a web UI link. + expect(typeof fetched._links?.webui).toBe('string'); + expect(fetched._links?.webui).toBeTruthy(); + }); + + it('expands operations/properties only when the include-* flags are set', async () => { + if (!created) return; + + const expanded = await client.smartLink.getSmartLinkById({ + id: Number(created.id), + includeOperations: true, + includeProperties: true, + }); + + expect(expanded.id).toBe(created.id); + // NOTE: `include-operations`/`include-properties` add expansions the `SmartLink` + // model does not declare, so they land on the loose index — read defensively. + const expansions = expanded as Record; + + if (expansions.operations) expect(Array.isArray(expansions.operations.results ?? [])).toBe(true); + + if (expansions.properties) expect(Array.isArray(expansions.properties.results ?? [])).toBe(true); + }); + + it('rejects a non-existent Smart Link id with a typed ApiError', async () => { + let caught: unknown; + + try { + await client.smartLink.getSmartLinkById({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + }); +}); + +describe('Confluence Cloud v2 — smartLink.deleteSmartLink (live)', () => { + it('deletes a Smart Link so a subsequent getSmartLinkById yields a 404 ApiError', async () => { + let disposable: SmartLink; + + try { + disposable = await client.smartLink.createSmartLink({ + body: { spaceId: space.id, embedUrl: EMBED_URL }, + }); + } catch (error) { + // Gated path — still exercise delete typing against a plausible id. + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + + let caught: unknown; + try { + await client.smartLink.deleteSmartLink({ id: 999_999_999 }); + } catch (e) { + caught = e; + } + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + + return; + } + + const id = Number(disposable.id); + // Safety net should the assertion below not run. + tracker.defer(async () => { + await client.smartLink.deleteSmartLink({ id }).catch(() => undefined); + }); + + await client.smartLink.deleteSmartLink({ id }); + + // A plain v2 DELETE moves content to TRASH (204) rather than purging it: the + // entity is still fetchable, now with status 'trashed'. Only a purge yields 404. + const after = await client.smartLink.getSmartLinkById({ id }).catch(e => e); + + if (after instanceof ApiError) { + expect(after.status).toBe(404); // hard-deleted (purged) + } else { + expect(['trashed', 'deleted']).toContain(after.status); // moved to trash (the common case) + } + }); +}); diff --git a/packages/cloud/tests/integration/space.test.ts b/packages/cloud/tests/integration/space.test.ts new file mode 100644 index 00000000..eb3c6c8e --- /dev/null +++ b/packages/cloud/tests/integration/space.test.ts @@ -0,0 +1,217 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient, v1Request } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { spaceKey, testName } from './helpers/naming'; + +/** + * Reference live integration suite for the Confluence Cloud v2 `space` API + * (`getSpaces`, `getSpaceById`, `createSpace`) — the template every other + * cloud suite follows. + * + * The assertions verify the *contract* of each function, not merely that a call + * resolves: returned entities are typed exactly as the Zod models declare; query + * parameters (`keys`, `type`, `ids`, `limit`, `sort`, `include-*`) have a real, + * observable effect; the same canonical space comes back consistently across + * endpoints; and error responses surface as a typed `ApiError`. + * + * Shared infrastructure (see `./setup` and `./helpers`): + * - `getLiveClient()` — singleton v2 client (host + retry policy); + * - `ResourceTracker` — LIFO teardown, retried; + * - `testName()` / `spaceKey()` — run-scoped, marker-tagged unique names so a + * crashed run is swept by the global setup. + */ + +const SPACE_TYPES = [ + 'global', + 'collaboration', + 'knowledge_base', + 'personal', + 'system', + 'onboarding', + 'xflow_sample_space', +] as const; + +const SPACE_STATUSES = ['current', 'archived'] as const; + +let client: ReturnType; +/** Every space visible to the account — discovered once, used to drive assertions. */ +let allSpaces: NonNullable>['results']>; + +/** A meaningful structural check for a space summary returned by the API. */ +function expectWellFormedSpace(space: { id?: string; key?: string; type?: string; status?: string; createdAt?: Date }) { + expect(typeof space.id).toBe('string'); + expect(space.id).toBeTruthy(); + expect(typeof space.key).toBe('string'); + expect(space.key).toBeTruthy(); + expect(SPACE_TYPES).toContain(space.type); + expect(SPACE_STATUSES).toContain(space.status); + // `createdAt` is declared `z.coerce.date()`, so a parsed response yields a real Date. + expect(space.createdAt).toBeInstanceOf(Date); +} + +beforeAll(async () => { + client = getLiveClient(); + + allSpaces = (await client.space.getSpaces({ limit: 250 })).results ?? []; + expect(allSpaces.length, 'the account must have at least one visible space to test against').toBeGreaterThan(0); +}); + +describe('Confluence Cloud v2 — space.getSpaces (live)', () => { + it('returns a page of correctly-typed space summaries', async () => { + const page = await client.space.getSpaces(); + + expect(Array.isArray(page.results)).toBe(true); + expect(page.results!.length).toBeGreaterThan(0); + // `_links` is the multi-entity links object; `base` is the site URL. + expect(page._links).toBeDefined(); + page.results!.forEach(expectWellFormedSpace); + }); + + it('honors `limit` and exposes a pagination cursor when more results exist', async () => { + const firstPage = await client.space.getSpaces({ limit: 1 }); + + expect(firstPage.results?.length ?? 0).toBeLessThanOrEqual(1); + + if (allSpaces.length > 1) { + // With more spaces than the page size, exactly one comes back and the + // `Link`-header cursor is surfaced as `_links.next`. + expect(firstPage.results).toHaveLength(1); + expect(typeof firstPage._links?.next).toBe('string'); + expect(firstPage._links!.next!.length).toBeGreaterThan(0); + } + }); + + it('filters by `keys` — only spaces with the requested key are returned', async () => { + const sample = allSpaces[0]; + + const filtered = await client.space.getSpaces({ keys: [sample.key!] }); + + expect(filtered.results!.length).toBeGreaterThan(0); + expect(filtered.results!.every(s => s.key === sample.key)).toBe(true); + expect(filtered.results!.some(s => s.id === sample.id)).toBe(true); + }); + + it('filters by `type` — server-side filter matches a client-side filter of the full list', async () => { + const sampleType = allSpaces[0].type; + const expectedCount = allSpaces.filter(s => s.type === sampleType).length; + + const filtered = await client.space.getSpaces({ type: sampleType, limit: 250 }); + + expect(filtered.results!.every(s => s.type === sampleType)).toBe(true); + expect(filtered.results!.length).toBe(expectedCount); + }); + + it('filters by `ids` consistently with the unfiltered listing', async () => { + const sample = allSpaces[0]; + + const filtered = await client.space.getSpaces({ ids: [Number(sample.id)] }); + + expect(filtered.results!.every(s => s.id === sample.id)).toBe(true); + expect(filtered.results!.some(s => s.id === sample.id)).toBe(true); + }); + + it('applies `sort` direction — ascending and descending are mirror orderings', async () => { + // Capture both orderings back-to-back so they observe the same set of spaces + // — other suites in the serial run may create/trash spaces, so the snapshot + // taken in `beforeAll` is not a reliable count here. + const asc = (await client.space.getSpaces({ sort: 'key', limit: 250 })).results ?? []; + const desc = (await client.space.getSpaces({ sort: '-key', limit: 250 })).results ?? []; + + if (asc.length < 2) return; // ordering is unobservable with a single space + + const ascKeys = asc.map(s => s.key); + const descKeys = desc.map(s => s.key); + + // Avoids assuming a specific collation (personal `~`-keys sort unusually): + // a correct sort param simply makes the two directions exact reverses. + expect(ascKeys).toHaveLength(descKeys.length); + expect(ascKeys).toEqual([...descKeys].reverse()); + }); +}); + +describe('Confluence Cloud v2 — space.getSpaceById (live)', () => { + it('returns the same canonical entity as the corresponding getSpaces summary', async () => { + const summary = allSpaces[0]; + + const full = await client.space.getSpaceById({ id: Number(summary.id) }); + + expect(full.id).toBe(summary.id); + expect(full.key).toBe(summary.key); + expect(full.name).toBe(summary.name); + expect(full.type).toBe(summary.type); + expect(full.status).toBe(summary.status); + // Every real space exposes a web UI link. + expect(typeof full._links?.webui).toBe('string'); + expect(full._links!.webui).toBeTruthy(); + }); + + it('expands `operations` and `labels` only when the include-* flags are set', async () => { + const id = Number(allSpaces[0].id); + + const base = await client.space.getSpaceById({ id }); + expect(base.operations).toBeUndefined(); + expect(base.labels).toBeUndefined(); + + const expanded = await client.space.getSpaceById({ id, includeOperations: true, includeLabels: true }); + expect(expanded.operations).toBeDefined(); + expect(Array.isArray(expanded.operations?.results)).toBe(true); + expect(expanded.labels).toBeDefined(); + expect(Array.isArray(expanded.labels?.results)).toBe(true); + }); + + it('rejects a non-existent space id with a 404 ApiError', async () => { + let caught: unknown; + + try { + await client.space.getSpaceById({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — space.createSpace (live, full lifecycle)', () => { + const tracker = new ResourceTracker(); + const key = spaceKey('create'); + const name = testName('create-space'); + let created: Awaited>; + + beforeAll(async () => { + created = await client.space.createSpace({ body: { key, name } }); + // v2 has no deleteSpace, so the space is torn down via the v1 REST endpoint. + tracker.defer(async () => { + await v1Request(`space/${key}`, { method: 'DELETE' }).catch(() => undefined); + }); + }); + + afterAll(() => tracker.cleanup()); + + it('returns a populated SpaceSummary for the newly created space', () => { + expect(created.key).toBe(key); + expect(created.name).toBe(name); + expect(created.type).toBe('global'); + expect(created.status).toBe('current'); + expect(typeof created.authorId).toBe('string'); + expectWellFormedSpace(created); + expect(created._links?.webui).toContain(key); + }); + + it('is immediately retrievable via getSpaceById by its returned id', async () => { + const fetched = await client.space.getSpaceById({ id: Number(created.id) }); + + expect(fetched.id).toBe(created.id); + expect(fetched.key).toBe(key); + expect(fetched.name).toBe(name); + }); + + it('appears in getSpaces when filtered by its key', async () => { + const listed = await client.space.getSpaces({ keys: [key] }); + + expect(listed.results?.some(s => s.id === created.id)).toBe(true); + }); +}); diff --git a/packages/cloud/tests/integration/spacePermissionTransition.test.ts b/packages/cloud/tests/integration/spacePermissionTransition.test.ts new file mode 100644 index 00000000..b2799a98 --- /dev/null +++ b/packages/cloud/tests/integration/spacePermissionTransition.test.ts @@ -0,0 +1,228 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, type TestSpace } from './setup/fixtures'; +import { waitFor } from './helpers/poll'; + +/** + * Live integration suite for the Confluence Cloud v2 `spacePermissionTransition` + * API — the premium "bulk space-permission transition" tooling + * (`listSpacePermissionCombinations`, `generateSpacePermissionCombinations`, + * `bulkAssignSpacePermissionRoles`, `bulkRemoveSpacePermissionAccess`, + * `getSpacePermissionTransitionTaskStatus`). + * + * Every endpoint requires the caller to be a **Confluence administrator**, so on + * a standard site/API-token these almost always return 403/404/501. The two bulk + * write endpoints are additionally *async, site-wide mutations* — they are + * therefore strictly confined to the disposable test space via a + * `spaceSelection` of `{ spaceType: 'SPECIFIC', selectedSpaces: [testSpace] }`, + * and only ever run if the gate is open. Each call is wrapped: the method is + * invoked to exercise typing + serialization, and a failure must surface as a + * typed `ApiError` with an expected status. + * + * On the happy path, a write returns a `BulkTransitionTask` ({ taskId, status, + * statusUrl }); its `taskId` is then polled through + * `getSpacePermissionTransitionTaskStatus` until it settles. + */ + +const TASK_STATUSES = ['IN_PROGRESS', 'COMPLETED', 'FAILED'] as const; +const COMBINATION_PRINCIPAL_TYPES = [ + 'USER', + 'GROUP', + 'GUEST', + 'ANONYMOUS', + 'ALL_LICENSED_USERS_USER_CLASS', + 'ALL_PRODUCT_ADMINS_USER_CLASS', + 'APP', + 'TEAM', +] as const; +const GATED_STATUSES = [400, 403, 404, 405, 501]; + +let client: ReturnType; +const tracker = new ResourceTracker(); +let space: TestSpace; + +/** A permission-combination id discovered from the listing (if the gate is open), reused by the bulk writes. */ +let sampleCombinationId: string | undefined; +/** A task id produced by any write that succeeds, reused to exercise the status endpoint. */ +let producedTaskId: string | undefined; + +function expectGatedError(error: unknown) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); +} + +function expectWellFormedTask(task: { taskId: string; status: string; statusUrl: string }) { + expect(typeof task.taskId).toBe('string'); + expect(task.taskId).toBeTruthy(); + expect(TASK_STATUSES).toContain(task.status); + expect(typeof task.statusUrl).toBe('string'); + expect(task.statusUrl).toBeTruthy(); +} + +beforeAll(async () => { + client = getLiveClient(); + space = await createTestSpace(tracker, 'perm-transition'); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — spacePermissionTransition.listSpacePermissionCombinations (live, admin-gated)', () => { + it('returns a typed page of permission combinations, or a typed ApiError', async () => { + let result: Awaited> | undefined; + let caught: unknown; + + try { + result = await client.spacePermissionTransition.listSpacePermissionCombinations({ limit: 25 }); + } catch (error) { + caught = error; + } + + if (caught) { + expectGatedError(caught); + + return; + } + + // `results` is a *required* array of combination entries. + expect(Array.isArray(result!.results)).toBe(true); + + // `generatedAt` / `cursor` are `.nullish()`. + if (result!.generatedAt !== undefined && result!.generatedAt !== null) { + expect(typeof result!.generatedAt).toBe('string'); + } + + if (result!.cursor !== undefined && result!.cursor !== null) { + expect(typeof result!.cursor).toBe('string'); + } + + for (const entry of result!.results) { + expect(typeof entry.combinationId).toBe('string'); + expect(entry.combinationId).toBeTruthy(); + expect(typeof entry.spaceCount).toBe('number'); + expect(typeof entry.principalCount).toBe('number'); + + expect(Array.isArray(entry.permissions)).toBe(true); + + for (const permission of entry.permissions) { + expect(typeof permission.id).toBe('string'); + expect(typeof permission.displayName).toBe('string'); + } + + expect(Array.isArray(entry.principalTypes)).toBe(true); + + for (const principalType of entry.principalTypes) { + expect(COMBINATION_PRINCIPAL_TYPES).toContain(principalType); + } + } + + // Stash a combination id for the bulk-write attempts below. + sampleCombinationId = result!.results[0]?.combinationId; + }); +}); + +describe('Confluence Cloud v2 — spacePermissionTransition.generateSpacePermissionCombinations (live, admin-gated)', () => { + it('submits the refresh task and returns a typed BulkTransitionTask, or a typed ApiError', async () => { + try { + const task = await client.spacePermissionTransition.generateSpacePermissionCombinations(); + + expectWellFormedTask(task); + producedTaskId ??= task.taskId; + } catch (error) { + expectGatedError(error); + } + }); +}); + +describe('Confluence Cloud v2 — spacePermissionTransition.bulkAssignSpacePermissionRoles (live, admin-gated mutation)', () => { + it('attempts a bulk role assignment scoped to the test space, asserting a typed task or ApiError', async () => { + // Confined to the disposable test space only. + const assignments = [ + { + permissionCombinationId: sampleCombinationId ?? 'cfjs-nonexistent-combination', + principalTypeAssignments: [ + { principalType: 'USER' as const, removeAccess: false, roleId: 'cfjs-nonexistent-role' }, + ], + }, + ]; + + try { + const task = await client.spacePermissionTransition.bulkAssignSpacePermissionRoles({ + assignments, + spaceSelection: { + spaceType: 'SPECIFIC', + selectedSpaces: [{ id: space.id, key: space.key }], + }, + }); + + expectWellFormedTask(task); + producedTaskId ??= task.taskId; + } catch (error) { + expectGatedError(error); + } + }); +}); + +describe('Confluence Cloud v2 — spacePermissionTransition.bulkRemoveSpacePermissionAccess (live, admin-gated mutation)', () => { + it('attempts a bulk access removal scoped to the test space, asserting a typed task or ApiError', async () => { + try { + const task = await client.spacePermissionTransition.bulkRemoveSpacePermissionAccess({ + permissionCombinationIds: [sampleCombinationId ?? 'cfjs-nonexistent-combination'], + spaceSelection: { + spaceType: 'SPECIFIC', + selectedSpaces: [{ id: space.id, key: space.key }], + }, + }); + + expectWellFormedTask(task); + producedTaskId ??= task.taskId; + } catch (error) { + expectGatedError(error); + } + }); +}); + +describe('Confluence Cloud v2 — spacePermissionTransition.getSpacePermissionTransitionTaskStatus (live, admin-gated)', () => { + it('polls a produced task to a settled state, or asserts a typed ApiError for an unknown task', async () => { + if (producedTaskId) { + // A real task was produced by a write above — poll it until it leaves IN_PROGRESS. + try { + const status = await waitFor( + () => client.spacePermissionTransition.getSpacePermissionTransitionTaskStatus({ taskId: producedTaskId! }), + s => s.status === 'COMPLETED' || s.status === 'FAILED', + { maxAttempts: 6 }, + ); + + expect(status.taskId).toBe(producedTaskId); + expect(TASK_STATUSES).toContain(status.status); + + // `errorMessage` is `.nullish()` and only present on FAILED. + if (status.errorMessage !== undefined && status.errorMessage !== null) { + expect(typeof status.errorMessage).toBe('string'); + expect(status.status).toBe('FAILED'); + } + } catch (error) { + // waitFor can also throw its own timeout Error; only an ApiError is a contract signal. + if (error instanceof ApiError) { + expect(GATED_STATUSES).toContain(error.status); + } else { + expect(error).toBeInstanceOf(Error); + } + } + + return; + } + + // No task was produced (endpoints gated) — exercise the status path with a plausible id. + try { + await client.spacePermissionTransition.getSpacePermissionTransitionTaskStatus({ + taskId: 'cfjs-nonexistent-task-id', + }); + throw new Error('expected getSpacePermissionTransitionTaskStatus to reject an unknown task id'); + } catch (error) { + expectGatedError(error); + } + }); +}); diff --git a/packages/cloud/tests/integration/spacePermissions.test.ts b/packages/cloud/tests/integration/spacePermissions.test.ts new file mode 100644 index 00000000..424b855e --- /dev/null +++ b/packages/cloud/tests/integration/spacePermissions.test.ts @@ -0,0 +1,185 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, type TestSpace } from './setup/fixtures'; + +/** + * Live integration suite for the Confluence Cloud v2 `spacePermissions` API + * (`getSpacePermissionsAssignments`, `getAvailableSpacePermissions`). + * + * Both endpoints are *read-only*, so every assertion is exercised against a + * freshly created, disposable test space (auto-deleted on cleanup) — no existing + * space is ever read from or mutated. + * + * Contract verified against the generated Zod source of truth: + * - `getSpacePermissionsAssignments` returns a typed page of + * `SpacePermissionAssignment` rows — each with an optional `principal` + * ({ type ∈ user|group|role, id }) and `operation` ({ key, targetType }) whose + * enum members must match the model exactly. + * - `getAvailableSpacePermissions` returns the tenant permission *catalog* + * (`SpacePermission`: id / displayName / description / requiredPermissionIds). + * This endpoint is **RBAC-gated** ("Available on tenants with Role-Based + * Access Control") so it is wrapped: on a non-RBAC site it must surface a + * typed `ApiError`, never an untyped throw. + * + * ID gotcha: space ids are numeric *strings* in models but the `id` path param is + * typed `z.number()`, so it is passed as `Number(space.id)`. + */ + +// `principal.type` and `operation.key` are open strings on the live API (the +// permission vocabulary is large/evolving — e.g. `access-class`, `manage_users`), +// so they are asserted structurally rather than against a fixed set. + +/** `SpacePermissionAssignment.operation.targetType` enum (still bounded). */ +const OPERATION_TARGET_TYPES = [ + 'page', + 'blogpost', + 'comment', + 'attachment', + 'whiteboard', + 'database', + 'embed', + 'folder', + 'space', + 'application', + 'userProfile', +] as const; + +/** Statuses an RBAC-/permission-gated endpoint may legitimately return on a site that lacks the feature. */ +const GATED_STATUSES = [400, 403, 404, 405, 501]; + +let client: ReturnType; +const tracker = new ResourceTracker(); +let space: TestSpace; + +beforeAll(async () => { + client = getLiveClient(); + space = await createTestSpace(tracker, 'space-perms'); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — spacePermissions.getSpacePermissionsAssignments (live)', () => { + it('returns a typed page of permission assignments for the created space', async () => { + const page = await client.spacePermissions.getSpacePermissionsAssignments({ id: Number(space.id) }); + + // Page envelope: optional `results` array + multi-entity `_links`. + expect(Array.isArray(page.results)).toBe(true); + + // A brand-new space always grants its creator/admin at least one permission. + expect(page.results!.length).toBeGreaterThan(0); + + for (const assignment of page.results!) { + // `id` is the opaque permission-assignment id. + if (assignment.id !== undefined) { + expect(typeof assignment.id).toBe('string'); + } + + // `principal` is `.nullish()` — present in practice; assert its typed shape when present. + if (assignment.principal !== undefined && assignment.principal !== null) { + if (assignment.principal.type !== undefined) { + // `principal.type` is an open string: beyond user/group/role the live API + // also returns values like `access-class`, so assert a non-empty string, + // not membership of the (illustrative) PRINCIPAL_TYPES set. + expect(typeof assignment.principal.type).toBe('string'); + expect(assignment.principal.type.length).toBeGreaterThan(0); + } + + if (assignment.principal.id !== undefined) { + expect(typeof assignment.principal.id).toBe('string'); + } + } + + // `operation` is `.nullish()`. `key` is an open string (the live permission + // vocabulary is large/evolving — `manage_users`, `archive_space`, …), so assert + // a non-empty string; `targetType` remains a bounded enum and is checked. + if (assignment.operation !== undefined && assignment.operation !== null) { + if (assignment.operation.key !== undefined) { + expect(typeof assignment.operation.key).toBe('string'); + expect(assignment.operation.key.length).toBeGreaterThan(0); + } + + if (assignment.operation.targetType !== undefined) { + expect(OPERATION_TARGET_TYPES).toContain(assignment.operation.targetType); + } + } + } + }); + + it('honors the `limit` query parameter', async () => { + const page = await client.spacePermissions.getSpacePermissionsAssignments({ id: Number(space.id), limit: 1 }); + + expect(Array.isArray(page.results)).toBe(true); + expect(page.results!.length).toBeLessThanOrEqual(1); + }); + + it('rejects a non-existent space id with a typed ApiError', async () => { + let caught: unknown; + + try { + await client.spacePermissions.getSpacePermissionsAssignments({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect([403, 404]).toContain((caught as ApiError).status); + }); +}); + +describe('Confluence Cloud v2 — spacePermissions.getAvailableSpacePermissions (live, RBAC-gated)', () => { + it('returns the typed permission catalog, or a typed ApiError on a non-RBAC site', async () => { + let result: Awaited> | undefined; + let caught: unknown; + + try { + result = await client.spacePermissions.getAvailableSpacePermissions(); + } catch (error) { + caught = error; + } + + if (caught) { + // Feature unavailable on this tenant — must still be a typed failure. + expect(caught).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((caught as ApiError).status); + + return; + } + + expect(Array.isArray(result!.results)).toBe(true); + + for (const permission of result!.results!) { + if (permission.id !== undefined) { + expect(typeof permission.id).toBe('string'); + } + + if (permission.displayName !== undefined) { + expect(typeof permission.displayName).toBe('string'); + } + + if (permission.description !== undefined) { + expect(typeof permission.description).toBe('string'); + } + + // `requiredPermissionIds` is `.nullish()` — an array of permission ids when present. + if (permission.requiredPermissionIds !== undefined && permission.requiredPermissionIds !== null) { + expect(Array.isArray(permission.requiredPermissionIds)).toBe(true); + permission.requiredPermissionIds.forEach(id => expect(typeof id).toBe('string')); + } + } + }); + + it('passes the `limit` parameter through (typed result or gated ApiError)', async () => { + try { + const page = await client.spacePermissions.getAvailableSpacePermissions({ limit: 1 }); + + expect(Array.isArray(page.results)).toBe(true); + expect(page.results!.length).toBeLessThanOrEqual(1); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + } + }); +}); diff --git a/packages/cloud/tests/integration/spaceProperties.test.ts b/packages/cloud/tests/integration/spaceProperties.test.ts new file mode 100644 index 00000000..d6b110b1 --- /dev/null +++ b/packages/cloud/tests/integration/spaceProperties.test.ts @@ -0,0 +1,263 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, type TestSpace } from './setup/fixtures'; +import { runId } from './helpers/naming'; +import { waitFor } from './helpers/poll'; + +/** + * Live integration suite for the Confluence Cloud v2 `spaceProperties` API (`getSpaceProperties`, + * `createSpaceProperty`, `getSpacePropertyById`, `updateSpacePropertyById`, `deleteSpacePropertyById`). + * + * Space properties are an arbitrary key/value (JSON) store hung off a space. The suite drives the full CRUD lifecycle + * against a throwaway space and asserts the _contract_ of each method rather than mere resolution: + * + * - Created entities are typed exactly as the Zod `SpaceProperty` model declares (`id`/`key`/`authorId` strings, + * `version.number` a number, `createdAt` a Date); + * - The `value` payload round-trips byte-for-byte for both an object and a primitive (the value is `z.unknown()`, so the + * server echoes arbitrary JSON); + * - A freshly created property is discoverable via both the listing and the canonical by-id read, and the two agree; + * - `updateSpacePropertyById` bumps `version.number` and replaces `value`; + * - `deleteSpacePropertyById` removes it, after which a by-id read 404s as a typed `ApiError`. + * + * ID gotcha: model ids are numeric _strings_ (`SpaceProperty.id`, `space.id`), but every path-id parameter is + * `z.number()`, so each is wrapped in `Number(...)`. + */ + +let client: ReturnType; +const tracker = new ResourceTracker(); +let space: TestSpace; + +/** A meaningful structural check for a SpaceProperty returned by the API. */ +function expectWellFormedProperty(property: Awaited>) { + expect(typeof property.id).toBe('string'); + expect(property.id).toBeTruthy(); + expect(typeof property.key).toBe('string'); + expect(property.key).toBeTruthy(); + // `version` is `.nullish()` in the model; a real property always carries one. + expect(property.version).toBeTruthy(); + expect(typeof property.version?.number).toBe('number'); + // `createdAt` is declared `z.coerce.date()`, so a parsed response yields a real Date. + expect(property.createdAt).toBeInstanceOf(Date); + // The live API returns the creator as `authorId` (top-level and inside `version`). + expect(typeof property.authorId).toBe('string'); +} + +beforeAll(async () => { + client = getLiveClient(); + space = await createTestSpace(tracker); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — spaceProperties CRUD (live, full lifecycle)', () => { + const key = 'cfjs.test'; + const initialValue = { any: 'json', n: 1 }; + let created: Awaited>; + + beforeAll(async () => { + created = await client.spaceProperties.createSpaceProperty({ + spaceId: Number(space.id), + key, + value: initialValue, + }); + + tracker.defer(async () => { + await client.spaceProperties + .deleteSpacePropertyById({ spaceId: Number(space.id), propertyId: Number(created.id) }) + .catch(() => undefined); + }); + }); + + describe('createSpaceProperty', () => { + it('returns a populated, correctly-typed SpaceProperty echoing the submitted key/value', () => { + expectWellFormedProperty(created); + expect(created.key).toBe(key); + // `value` is `z.unknown()`; arbitrary JSON is echoed back verbatim. + expect(created.value).toEqual(initialValue); + // A brand-new property starts at version 1. + expect(created.version?.number).toBe(1); + }); + }); + + describe('getSpaceProperties', () => { + it('lists the freshly created property with its typed fields intact', async () => { + const page = await waitFor( + () => client.spaceProperties.getSpaceProperties({ spaceId: Number(space.id) }), + p => (p.results ?? []).some(prop => prop.id === created.id), + ); + + expect(Array.isArray(page.results)).toBe(true); + expect(page._links).toBeDefined(); + + const listed = page.results!.find(prop => prop.id === created.id); + expect(listed).toBeDefined(); + expect(listed!.key).toBe(key); + expect(listed!.value).toEqual(initialValue); + expect(listed!.version?.number).toBe(1); + }); + + it('filters by `key` — returns only the matching property', async () => { + const page = await client.spaceProperties.getSpaceProperties({ spaceId: Number(space.id), key }); + + expect(page.results!.length).toBeGreaterThan(0); + expect(page.results!.every(prop => prop.key === key)).toBe(true); + expect(page.results!.some(prop => prop.id === created.id)).toBe(true); + }); + + it('honors `limit` without erroring on a small page size', async () => { + const page = await client.spaceProperties.getSpaceProperties({ spaceId: Number(space.id), limit: 1 }); + + expect(page.results?.length ?? 0).toBeLessThanOrEqual(1); + }); + }); + + describe('getSpacePropertyById', () => { + it('returns the same canonical entity as the create response', async () => { + const fetched = await client.spaceProperties.getSpacePropertyById({ + spaceId: Number(space.id), + propertyId: Number(created.id), + }); + + expectWellFormedProperty(fetched); + expect(fetched.id).toBe(created.id); + expect(fetched.key).toBe(created.key); + expect(fetched.value).toEqual(initialValue); + expect(fetched.version?.number).toBe(created.version?.number); + }); + }); + + describe('updateSpacePropertyById', () => { + const updatedValue = { any: 'changed', n: 2, nested: { ok: true } }; + let updated: Awaited>; + + beforeAll(async () => { + const current = await client.spaceProperties.getSpacePropertyById({ + spaceId: Number(space.id), + propertyId: Number(created.id), + }); + + updated = await client.spaceProperties.updateSpacePropertyById({ + spaceId: Number(space.id), + propertyId: Number(created.id), + key, + value: updatedValue, + version: { number: (current.version!.number ?? 1) + 1 }, + }); + }); + + it('replaces the value and bumps the version number', () => { + expectWellFormedProperty(updated); + expect(updated.id).toBe(created.id); + expect(updated.key).toBe(key); + expect(updated.value).toEqual(updatedValue); + expect(updated.version?.number).toBe(2); + }); + + it('persists the new value and version on a subsequent by-id read', async () => { + const refetched = await client.spaceProperties.getSpacePropertyById({ + spaceId: Number(space.id), + propertyId: Number(created.id), + }); + + expect(refetched.value).toEqual(updatedValue); + expect(refetched.value).not.toEqual(initialValue); + expect(refetched.version?.number).toBe(2); + }); + }); + + describe('deleteSpacePropertyById', () => { + it('removes the property — a subsequent by-id read 404s as a typed ApiError', async () => { + await client.spaceProperties.deleteSpacePropertyById({ + spaceId: Number(space.id), + propertyId: Number(created.id), + }); + + let caught: unknown; + try { + await client.spaceProperties.getSpacePropertyById({ + spaceId: Number(space.id), + propertyId: Number(created.id), + }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); + }); +}); + +describe('Confluence Cloud v2 — spaceProperties value round-trip (live)', () => { + it('round-trips an object value through create → get unchanged', async () => { + const objectValue = { kind: 'object', items: [1, 2, 3], flag: false, meta: { a: 'b' } }; + + const property = await client.spaceProperties.createSpaceProperty({ + spaceId: Number(space.id), + key: `cfjs.obj.${runId()}`, + value: objectValue, + }); + tracker.defer(async () => { + await client.spaceProperties + .deleteSpacePropertyById({ spaceId: Number(space.id), propertyId: Number(property.id) }) + .catch(() => undefined); + }); + + expect(property.value).toEqual(objectValue); + + const fetched = await client.spaceProperties.getSpacePropertyById({ + spaceId: Number(space.id), + propertyId: Number(property.id), + }); + expect(fetched.value).toEqual(objectValue); + }); + + it('round-trips a primitive (string) value through create → get unchanged', async () => { + const primitiveValue = 'just-a-plain-string'; + + const property = await client.spaceProperties.createSpaceProperty({ + spaceId: Number(space.id), + key: `cfjs.str.${runId()}`, + value: primitiveValue, + }); + tracker.defer(async () => { + await client.spaceProperties + .deleteSpacePropertyById({ spaceId: Number(space.id), propertyId: Number(property.id) }) + .catch(() => undefined); + }); + + expect(property.value).toBe(primitiveValue); + + const fetched = await client.spaceProperties.getSpacePropertyById({ + spaceId: Number(space.id), + propertyId: Number(property.id), + }); + expect(fetched.value).toBe(primitiveValue); + }); + + it('round-trips a primitive (number) value through create → get unchanged', async () => { + const numberValue = 42; + + const property = await client.spaceProperties.createSpaceProperty({ + spaceId: Number(space.id), + key: `cfjs.num.${runId()}`, + value: numberValue, + }); + tracker.defer(async () => { + await client.spaceProperties + .deleteSpacePropertyById({ spaceId: Number(space.id), propertyId: Number(property.id) }) + .catch(() => undefined); + }); + + expect(property.value).toBe(numberValue); + + const fetched = await client.spaceProperties.getSpacePropertyById({ + spaceId: Number(space.id), + propertyId: Number(property.id), + }); + expect(fetched.value).toBe(numberValue); + }); +}); diff --git a/packages/cloud/tests/integration/spaceRoles.test.ts b/packages/cloud/tests/integration/spaceRoles.test.ts new file mode 100644 index 00000000..7d094cac --- /dev/null +++ b/packages/cloud/tests/integration/spaceRoles.test.ts @@ -0,0 +1,290 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, type TestSpace } from './setup/fixtures'; +import { testName } from './helpers/naming'; + +/** + * Live integration suite for the Confluence Cloud v2 `spaceRoles` API + * (Role-Based Access Control — RBAC). + * + * The whole module is gated: every endpoint is "Available on tenants with + * Role-Based Access Control", and the create/update/delete/set mutations + * additionally require an *organization or site admin* (Connect/Forge app users + * are explicitly rejected). A standard Cloud site / API-token therefore commonly + * returns 403/404/501. Each call is consequently guarded: the method is still + * invoked (to exercise typing + path/search serialization) but a failure must + * surface as a typed `ApiError` with an expected status — never an untyped throw. + * + * Reads covered deeply when the feature is present: + * - `getAvailableSpaceRoles` → typed `SpaceRole[]` (type ∈ SYSTEM|CUSTOM); + * - `getSpaceRoleMode` → { mode ∈ PRE_ROLES|ROLES_TRANSITION|ROLES }; + * - `getSpaceRoleAssignments`→ typed `SpaceRoleAssignment[]` for the test space; + * - `getSpaceRolesById` → cross-checked against a role from the listing. + * + * Mutations (custom space roles — premium): a clean create → get → update → + * delete lifecycle is attempted on success; on a gated site a typed `ApiError` + * is asserted instead. All deletes are also registered for teardown. + * + * ID gotchas: `getSpaceRolesById` / `getSpaceRoleAssignments` path ids are + * `z.number()` → `Number(...)`; but create/update/delete role ids are + * `z.string()` (the API may return them as UUIDs — see report). + */ + +const ROLE_TYPES = ['SYSTEM', 'CUSTOM'] as const; +const ROLE_MODES = ['PRE_ROLES', 'ROLES_TRANSITION', 'ROLES'] as const; +const PRINCIPAL_TYPES = ['USER', 'GROUP', 'ACCESS_CLASS'] as const; +// On a non-RBAC tenant `space-roles/{id}` can surface a 500: the role id is a UUID +// but the path param is typed `z.number()`, so the id resolves oddly server-side. +const GATED_STATUSES = [400, 403, 404, 405, 500, 501]; + +let client: ReturnType; +const tracker = new ResourceTracker(); +let space: TestSpace; + +/** Asserts a thrown value is the typed, gated failure we expect on a non-RBAC / non-admin site. */ +function expectGatedError(error: unknown) { + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); +} + +/** Structural check for a `SpaceRole` returned by the API. */ +function expectWellFormedRole(role: { id?: string; type?: string; name?: string; description?: string; spacePermissions?: string[] | null }) { + if (role.id !== undefined) expect(typeof role.id).toBe('string'); + + if (role.type !== undefined) expect(ROLE_TYPES).toContain(role.type); + + if (role.name !== undefined) expect(typeof role.name).toBe('string'); + + if (role.description !== undefined) expect(typeof role.description).toBe('string'); + + // `spacePermissions` is `.nullish()` — an array of permission id strings when present. + if (role.spacePermissions !== undefined && role.spacePermissions !== null) { + expect(Array.isArray(role.spacePermissions)).toBe(true); + role.spacePermissions.forEach(p => expect(typeof p).toBe('string')); + } +} + +beforeAll(async () => { + client = getLiveClient(); + space = await createTestSpace(tracker, 'space-roles'); +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — spaceRoles.getAvailableSpaceRoles (live, RBAC-gated)', () => { + it('returns a typed page of space roles, or a typed ApiError on a non-RBAC site', async () => { + let caught: unknown; + let result: Awaited> | undefined; + + try { + result = await client.spaceRoles.getAvailableSpaceRoles(); + } catch (error) { + caught = error; + } + + if (caught) { + expectGatedError(caught); + + return; + } + + expect(Array.isArray(result!.results)).toBe(true); + result!.results!.forEach(expectWellFormedRole); + }); + + it('passes `space-id` / `role-type` filters through (typed result or gated ApiError)', async () => { + try { + // `spaceId` is a string search param (not the numeric path id). + const page = await client.spaceRoles.getAvailableSpaceRoles({ spaceId: space.id, limit: 50 }); + + expect(Array.isArray(page.results)).toBe(true); + page.results!.forEach(expectWellFormedRole); + } catch (error) { + expectGatedError(error); + } + }); +}); + +describe('Confluence Cloud v2 — spaceRoles.getSpaceRoleMode (live)', () => { + it('returns a typed role mode, or a typed ApiError when unavailable', async () => { + try { + const result = await client.spaceRoles.getSpaceRoleMode(); + + // `mode` is optional in the model; when present it must be one of the enum members. + if (result.mode !== undefined) { + expect(ROLE_MODES).toContain(result.mode); + } + } catch (error) { + expectGatedError(error); + } + }); +}); + +describe('Confluence Cloud v2 — spaceRoles.getSpaceRoleAssignments (live, RBAC-gated)', () => { + it('returns typed role assignments for the test space, or a typed ApiError', async () => { + try { + const page = await client.spaceRoles.getSpaceRoleAssignments({ id: Number(space.id) }); + + expect(Array.isArray(page.results)).toBe(true); + + for (const assignment of page.results!) { + if (assignment.roleId !== undefined) { + expect(typeof assignment.roleId).toBe('string'); + } + + // `principal` is `.nullish()`; `principalType` ∈ USER|GROUP|ACCESS_CLASS. + if (assignment.principal !== undefined && assignment.principal !== null) { + if (assignment.principal.principalType !== undefined) { + expect(PRINCIPAL_TYPES).toContain(assignment.principal.principalType); + } + + if (assignment.principal.principalId !== undefined) { + expect(typeof assignment.principal.principalId).toBe('string'); + } + } + } + } catch (error) { + expectGatedError(error); + } + }); +}); + +describe('Confluence Cloud v2 — spaceRoles.getSpaceRolesById (live, RBAC-gated)', () => { + it('fetches a role derived from the listing and is consistent with it', async () => { + // First obtain a role id from the available-roles listing; skip if the feature is gated. + let roles: Awaited>; + + try { + roles = await client.spaceRoles.getAvailableSpaceRoles(); + } catch (error) { + expectGatedError(error); + + return; + } + + const source = roles.results?.find(r => r.id !== undefined); + + if (!source) return; // RBAC enabled but no roles defined — nothing to cross-check. + + // The role id is a string (UUID for custom roles); the path param is now typed + // `string`, so it is passed through directly. + try { + const byId = await client.spaceRoles.getSpaceRolesById({ id: source.id! }); + + expectWellFormedRole(byId); + expect(byId.id).toBe(source.id); + expect(byId.type).toBe(source.type); + expect(byId.name).toBe(source.name); + } catch (error) { + expectGatedError(error); + } + }); + + it('rejects an unknown role id with a typed ApiError', async () => { + try { + await client.spaceRoles.getSpaceRolesById({ id: '00000000-0000-0000-0000-000000000000' }); + throw new Error('expected getSpaceRolesById to reject an unknown id'); + } catch (error) { + expectGatedError(error); + } + }); +}); + +describe('Confluence Cloud v2 — spaceRoles custom-role lifecycle (live, premium-gated mutations)', () => { + const lifecycleTracker = new ResourceTracker(); + + afterAll(() => lifecycleTracker.cleanup()); + + it('attempts create → get → update → delete, asserting a typed ApiError when gated', async () => { + // `spacePermissions` ids must be real permission ids ("read/space"-style). Prefer a + // value harvested from an existing role; fall back to a documented sample id. + let seedPermissions: string[] = ['read/space']; + try { + const roles = await client.spaceRoles.getAvailableSpaceRoles(); + const withPerms = roles.results?.find(r => Array.isArray(r.spacePermissions) && r.spacePermissions.length > 0); + + if (withPerms?.spacePermissions && withPerms.spacePermissions.length > 0) { + seedPermissions = withPerms.spacePermissions.slice(0, 1); + } + } catch { + // listing gated — proceed with the fallback; create will fail in the same gated way. + } + + let created: Awaited>; + try { + created = await client.spaceRoles.createSpaceRole({ + name: testName('role'), + description: 'cfjs live custom space role', + spacePermissions: seedPermissions, + }); + } catch (error) { + // Most sites: not RBAC / not org-admin / Connect app — must be a typed failure. + expectGatedError(error); + + return; + } + + // Success path: register teardown immediately so a later assertion failure still cleans up. + expect(typeof created.id).toBe('string'); + expect(created.id).toBeTruthy(); + const roleId = created.id!; + lifecycleTracker.defer(async () => { + await client.spaceRoles.deleteSpaceRole({ id: roleId }).catch(() => undefined); + }); + + expectWellFormedRole(created); + expect(created.name).toContain('role'); + + // get — the created role is retrievable (the path id is a string). + try { + const fetched = await client.spaceRoles.getSpaceRolesById({ id: roleId }); + expect(fetched.id).toBe(roleId); + } catch (error) { + expectGatedError(error); + } + + // update — returns an async-task envelope ({ id, type, name, description, taskId }). + const updated = await client.spaceRoles.updateSpaceRole({ + id: roleId, + name: testName('role-updated'), + description: 'cfjs live custom space role (updated)', + spacePermissions: seedPermissions, + }); + expect(updated.id).toBe(roleId); + + if (updated.name !== undefined) expect(updated.name).toContain('role-updated'); + + if (updated.taskId !== undefined) expect(typeof updated.taskId).toBe('string'); + + // delete — returns an async-task envelope ({ taskId }). + const deleted = await client.spaceRoles.deleteSpaceRole({ id: roleId }); + + if (deleted.taskId !== undefined) expect(typeof deleted.taskId).toBe('string'); + }); +}); + +describe('Confluence Cloud v2 — spaceRoles.setSpaceRoleAssignments (live, premium-gated mutation)', () => { + it('attempts a role assignment on the test space, asserting a typed result or ApiError', async () => { + // The body is an opaque `z.record(string, any)` in the generated parameters; the live + // shape is a role-assignment payload. We send a minimal, well-formed-looking body and + // tolerate either a typed result page or a typed ApiError (gated / validation). + try { + const result = await client.spaceRoles.setSpaceRoleAssignments({ + id: Number(space.id), + body: { roleAssignments: [] }, + }); + + // On success this echoes the resulting assignments as a typed page. + expect(Array.isArray(result.results)).toBe(true); + + for (const assignment of result.results!) { + if (assignment.roleId !== undefined) expect(typeof assignment.roleId).toBe('string'); + } + } catch (error) { + expectGatedError(error); + } + }); +}); diff --git a/packages/cloud/tests/integration/task.test.ts b/packages/cloud/tests/integration/task.test.ts new file mode 100644 index 00000000..7d7f1cc3 --- /dev/null +++ b/packages/cloud/tests/integration/task.test.ts @@ -0,0 +1,257 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, type TestSpace } from './setup/fixtures'; +import { waitFor } from './helpers/poll'; + +/** + * Live integration suite for the Confluence Cloud v2 `task` API + * (`getTasks`, `getTaskById`, `updateTask`). + * + * Confluence "tasks" are action items embedded in content via the `ac:task-list` + * storage markup — there is no create-task endpoint. So the suite bootstraps a + * fresh space and a page whose storage body carries a single task list, then lets + * Confluence index it into a real, server-assigned task. Once the task surfaces in + * the listing (it is eventually consistent, hence `waitFor`), the assertions verify + * the *contract* of each method against the Zod models: + * + * - `getTasks` (deep): the created task surfaces with every field typed exactly as + * `TaskSchema` declares (numeric-string `id`/`localId`/`spaceId`/`pageId`, + * `status` ∈ {complete, incomplete}, `createdAt` a real `Date`, `body.storage` + * carrying our text); the `spaceId`, `pageId` and `status` query filters each + * have a real, observable effect; `limit` is honored. + * - `getTaskById` (deep): fetching by the task's own id returns the same canonical + * entity as the listing summary; a bogus id is a typed 404 `ApiError`. + * - `updateTask` (deep): marking the task `complete` flips `status`, and a re-fetch + * confirms the change persisted (read-your-write across endpoints). + * + * Graceful degradation: if the task never materializes from the storage markup on + * this site (markup rejected / slow indexing), `createdTask` stays undefined; the + * deep assertions short-circuit but every method is still invoked against a typed + * result page or asserted to be a typed `ApiError`, so the suite still exercises + * serialization + parsing. The report flags whether a real task was created. + * + * ID gotcha: model ids are numeric *strings* but the path/filter params are + * `z.number()` — converted with `Number(task.id)` (see `space.test.ts`). + * + * Shared infra: `getLiveClient` (singleton v2 client), `ResourceTracker` (LIFO + * retried teardown), fixtures (`createTestSpace`/`createTestPage`, self-cleaning), + * `waitFor` (eventually-consistent polling). + */ + +const TASK_STATUSES = ['complete', 'incomplete'] as const; + +/** Marker text embedded in the task body so we can recognize our own task. */ +const TASK_BODY_TEXT = 'cfjs live test task'; + +const TASK_LIST_HTML = + '1' + + 'incomplete' + + `${TASK_BODY_TEXT}`; + +let client: ReturnType; + +type TaskEntity = NonNullable>['results']>[number]; +type TaskPage = Awaited>; + +const tracker = new ResourceTracker(); +let space: TestSpace; +let page: Awaited>; +/** The created task as first observed in the listing — undefined if it never surfaced. */ +let createdTask: TaskEntity | undefined; + +/** + * Structural check tolerant of "blank" tasks the listing may also contain: assert + * the *type* of every field that is present without requiring optional fields. + */ +function expectTaskShape(task: TaskEntity) { + if (task.id !== undefined) { + expect(typeof task.id).toBe('string'); + // ids come back as numeric strings even though many params are `z.number()`. + expect(task.id).toMatch(/^\d+$/); + } + + if (task.localId !== undefined) expect(typeof task.localId).toBe('string'); + + if (task.spaceId !== undefined) expect(task.spaceId).toMatch(/^\d+$/); + + if (task.pageId !== undefined) expect(task.pageId).toMatch(/^\d+$/); + + if (task.blogPostId !== undefined) expect(task.blogPostId).toMatch(/^\d+$/); + + if (task.status !== undefined) expect(TASK_STATUSES).toContain(task.status); + + // The four timestamps are all `z.coerce.date()` — a parsed response is a real Date. + for (const ts of [task.createdAt, task.updatedAt, task.dueAt, task.completedAt]) { + if (ts !== undefined && ts !== null) expect(ts).toBeInstanceOf(Date); + } +} + +/** A task listing is `{ results?: Task[], _links?: MultiEntityLinks }`. */ +function expectWellFormedTaskPage(taskPage: TaskPage) { + expect(Array.isArray(taskPage.results)).toBe(true); + (taskPage.results ?? []).forEach(expectTaskShape); + + if (taskPage._links !== undefined) { + expect(typeof taskPage._links).toBe('object'); + + if (taskPage._links.next !== undefined) expect(typeof taskPage._links.next).toBe('string'); + + if (taskPage._links.base !== undefined) expect(typeof taskPage._links.base).toBe('string'); + } +} + +beforeAll(async () => { + client = getLiveClient(); + + space = await createTestSpace(tracker, 'task'); + page = await createTestPage(tracker, space.id, { html: TASK_LIST_HTML }); + + // The task list is indexed asynchronously: poll the page's tasks until our + // marker task appears. If it never does, degrade gracefully (createdTask stays + // undefined) rather than failing the whole suite. + try { + const settled = await waitFor( + () => client.task.getTasks({ pageId: [Number(page.id)], bodyFormat: 'storage' }), + res => (res.results ?? []).some(t => t.body?.storage?.value?.includes(TASK_BODY_TEXT)), + { maxAttempts: 8 }, + ); + createdTask = settled.results!.find(t => t.body?.storage?.value?.includes(TASK_BODY_TEXT)); + } catch { + createdTask = undefined; + } +}, 90_000); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — task.getTasks (live)', () => { + it('returns a well-typed page of tasks', async () => { + const tasks = await client.task.getTasks({ limit: 25 }); + expectWellFormedTaskPage(tasks); + }); + + it('surfaces the created task with every field typed as TaskSchema declares', () => { + if (!createdTask) return; // graceful: no real task — covered by the typed-page test above + + const task = createdTask; + // id: numeric string (model: z.string()). + expect(typeof task.id).toBe('string'); + expect(task.id).toMatch(/^\d+$/); + // localId is the in-page id from the `1` markup. + expect(task.localId).toBe('1'); + // status: the markup created it `incomplete`; it must not yet be complete here. + expect(task.status).toBe('incomplete'); + // createdAt: declared z.coerce.date() — a real Date on a parsed response. + expect(task.createdAt).toBeInstanceOf(Date); + // body: requested as `storage`, so the storage representation carries our text. + expect(task.body?.storage?.value).toContain(TASK_BODY_TEXT); + expect(task.body?.storage?.representation).toBe('storage'); + // It belongs to the page/space we created it in. + expect(task.spaceId).toBe(space.id); + expect(task.pageId).toBe(page.id); + }); + + it('filters by `spaceId` — the created task is scoped to its space', async () => { + if (!createdTask) return; + + const filtered = await client.task.getTasks({ spaceId: [Number(space.id)], bodyFormat: 'storage' }); + expectWellFormedTaskPage(filtered); + + // Every returned task is in the requested space, and ours is among them. + expect(filtered.results!.every(t => t.spaceId === space.id)).toBe(true); + expect(filtered.results!.some(t => t.id === createdTask!.id)).toBe(true); + }); + + it('filters by `status` — `incomplete` includes our task, `complete` excludes it', async () => { + if (!createdTask) return; + + const incomplete = await client.task.getTasks({ pageId: [Number(page.id)], status: 'incomplete' }); + expectWellFormedTaskPage(incomplete); + expect(incomplete.results!.every(t => t.status === 'incomplete')).toBe(true); + expect(incomplete.results!.some(t => t.id === createdTask!.id)).toBe(true); + + const complete = await client.task.getTasks({ pageId: [Number(page.id)], status: 'complete' }); + expectWellFormedTaskPage(complete); + // The task is still incomplete at this point, so the `complete` filter must drop it. + expect(complete.results!.some(t => t.id === createdTask!.id)).toBe(false); + }); + + it('honors `limit` — never returns more rows than requested', async () => { + const limited = await client.task.getTasks({ limit: 1 }); + + expect(limited.results?.length ?? 0).toBeLessThanOrEqual(1); + expectWellFormedTaskPage(limited); + }); +}); + +describe('Confluence Cloud v2 — task.getTaskById (live)', () => { + it('returns the same canonical entity as the getTasks summary', async () => { + if (!createdTask) return; + + const full = await client.task.getTaskById({ id: Number(createdTask.id), bodyFormat: 'storage' }); + + expect(full.id).toBe(createdTask.id); + expect(full.localId).toBe(createdTask.localId); + expect(full.spaceId).toBe(createdTask.spaceId); + expect(full.pageId).toBe(createdTask.pageId); + expect(full.status).toBe(createdTask.status); + expect(full.createdAt).toBeInstanceOf(Date); + expect(full.body?.storage?.value).toContain(TASK_BODY_TEXT); + }); + + it('rejects a non-existent task id with a 404 ApiError', async () => { + let caught: unknown; + + try { + await client.task.getTaskById({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — task.updateTask (live)', () => { + it('marks the task complete and the change persists across a re-fetch', async () => { + if (!createdTask) return; + + // The endpoint only supports updating status; body is `z.record(z.string(), z.any())`. + const updated = await client.task.updateTask({ + id: Number(createdTask.id), + bodyFormat: 'storage', + body: { status: 'complete' }, + }); + + expect(updated.id).toBe(createdTask.id); + expect(updated.status).toBe('complete'); + // Completing a task stamps `completedAt`/`completedBy`. + expect(updated.completedAt).toBeInstanceOf(Date); + expect(typeof updated.completedBy).toBe('string'); + + // Read-your-write: an independent fetch must report the new status. + const refetched = await waitFor( + () => client.task.getTaskById({ id: Number(createdTask!.id) }), + t => t.status === 'complete', + { maxAttempts: 6 }, + ); + expect(refetched.status).toBe('complete'); + }); + + it('rejects updating a non-existent task id with a typed ApiError', async () => { + let caught: unknown; + + try { + await client.task.updateTask({ id: 999_999_999, body: { status: 'complete' } }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + // Updating a task that does not exist is a 404 (no edit permission to grant otherwise). + expect([404, 400]).toContain((caught as ApiError).status); + }); +}); diff --git a/packages/cloud/tests/integration/user.test.ts b/packages/cloud/tests/integration/user.test.ts new file mode 100644 index 00000000..6917f28a --- /dev/null +++ b/packages/cloud/tests/integration/user.test.ts @@ -0,0 +1,161 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage } from './setup/fixtures'; + +/** + * Live integration suite for the Confluence Cloud v2 `user` API + * (`createBulkUserLookup`, `checkAccessByEmail`, `inviteByEmail`). + * + * The `user` module has no GET endpoint that surfaces the *current* account, so + * the suite bootstraps a real accountId the only way the v2 client can: it + * creates a space + page fixture and reads `page.authorId` — the account ID of + * the user who created the content, i.e. the credentials behind the client. That + * id then drives the bulk-lookup contract assertions. + * + * The assertions verify the *contract* of each function, not merely that a call + * resolves: the user returned from a bulk lookup is typed exactly as the + * `UserSchema` Zod model declares and round-trips the requested accountId; the + * access-check response is the typed `AccessByEmail` shape; and the two + * admin-sensitive endpoints (`checkAccessByEmail`, `inviteByEmail`) are still + * *called* — exercising serialization + typing — but guarded so an admin-gated + * site surfaces a typed `ApiError` instead of hard-failing the suite. + * + * SAFETY — `inviteByEmail` can send a REAL invitation email and provision a new + * user. This suite therefore invites ONLY the account's own email + * (`process.env.EMAIL`), which already belongs to the site: per the endpoint's + * own contract ("no action is taken for emails that already have access") this + * is a no-op that creates no new user and sends no invite. A fabricated external + * address is NEVER used. + * + * Shared infrastructure (see `./setup` and `./helpers`): + * - `getLiveClient()` — singleton v2 client (host + retry policy); + * - `ResourceTracker` — LIFO teardown, retried; + * - `createTestSpace` / `createTestPage` — self-cleaning fixtures. + */ + +const ACCOUNT_TYPES = ['atlassian', 'app', 'customer', 'unknown'] as const; +const ACCOUNT_STATUSES = ['active', 'inactive', 'closed', 'unknown'] as const; + +let client: ReturnType; +const tracker = new ResourceTracker(); + +/** The current account's accountId, discovered from a created page's author. */ +let authorId: string; +/** The current account's email (basic-auth identity, owns the site). */ +const ownEmail = process.env.EMAIL ?? ''; + +beforeAll(async () => { + client = getLiveClient(); + + const space = await createTestSpace(tracker, 'user'); + const page = await createTestPage(tracker, space.id, { title: 'user-author-probe' }); + + // `authorId` is the account ID of the user who created the page — i.e. the + // credentials driving this client. It is the one real accountId we can mint + // without an admin-only user-directory endpoint. + expect(typeof page.authorId, 'created page must expose the author accountId').toBe('string'); + expect(page.authorId).toBeTruthy(); + authorId = page.authorId!; +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — user.createBulkUserLookup (live)', () => { + it('returns a typed User for the requested accountId, round-tripping the id', async () => { + const lookup = await client.user.createBulkUserLookup({ body: { accountIds: [authorId] } }); + + expect(Array.isArray(lookup.results)).toBe(true); + expect(lookup.results!.length).toBeGreaterThan(0); + + const user = lookup.results!.find(u => u.accountId === authorId); + expect(user, 'the requested accountId must be present in the lookup results').toBeDefined(); + + // accountId is the join key and must be a non-empty string. + expect(typeof user!.accountId).toBe('string'); + expect(user!.accountId).toBe(authorId); + + // displayName is the human label every real user carries. + expect(typeof user!.displayName).toBe('string'); + expect(user!.displayName).toBeTruthy(); + + // accountType / accountStatus are closed enums in the model — when present + // the live value must be a member. + if (user!.accountType !== undefined) expect(ACCOUNT_TYPES).toContain(user!.accountType); + + if (user!.accountStatus !== undefined) expect(ACCOUNT_STATUSES).toContain(user!.accountStatus); + + // email is `z.string().optional()` and (per the model doc) may be an empty + // string under a privacy setting — so only its *type* is guaranteed. + if (user!.email !== undefined) expect(typeof user!.email).toBe('string'); + + // profilePicture is `IconSchema.nullish()`: absent, null, or a typed Icon. + if (user!.profilePicture != null) { + expect(typeof user!.profilePicture.path).toBe('string'); + expect(typeof user!.profilePicture.isDefault).toBe('boolean'); + } + }); + + it('returns no matching user for a non-existent accountId', async () => { + // A syntactically-plausible but unused account id: the endpoint silently + // omits unknown ids rather than erroring, so the requested id is simply absent. + const bogus = '000000:00000000-0000-0000-0000-000000000000'; + + const lookup = await client.user.createBulkUserLookup({ body: { accountIds: [bogus] } }); + + expect(Array.isArray(lookup.results)).toBe(true); + expect(lookup.results!.some(u => u.accountId === bogus)).toBe(false); + }); +}); + +describe('Confluence Cloud v2 — user.checkAccessByEmail (live, gated-graceful)', () => { + it('reports the account\'s own email as having access, or surfaces a typed ApiError when admin-gated', async () => { + expect(ownEmail, 'EMAIL must be set for the user suite').toBeTruthy(); + + try { + const access = await client.user.checkAccessByEmail({ body: { emails: [ownEmail] } }); + + // Typed `AccessByEmail`: both fields are optional string arrays. + if (access.emailsWithoutAccess !== undefined) { + expect(Array.isArray(access.emailsWithoutAccess)).toBe(true); + access.emailsWithoutAccess.forEach(e => expect(typeof e).toBe('string')); + // The credentials' own email demonstrably *has* access to the site. + expect(access.emailsWithoutAccess).not.toContain(ownEmail); + } + + if (access.invalidEmails !== undefined) { + expect(Array.isArray(access.invalidEmails)).toBe(true); + access.invalidEmails.forEach(e => expect(typeof e).toBe('string')); + // A valid, site-owning email must not be flagged invalid. + expect(access.invalidEmails).not.toContain(ownEmail); + } + } catch (error) { + // The endpoint is org-admin sensitive on some sites; accept a typed gate. + expect(error).toBeInstanceOf(ApiError); + expect([401, 403, 404]).toContain((error as ApiError).status); + } + }); +}); + +describe('Confluence Cloud v2 — user.inviteByEmail (live, gated-graceful, SAFE)', () => { + it('accepts the account\'s own (already-onboarded) email as a no-op, or surfaces a typed ApiError', async () => { + expect(ownEmail, 'EMAIL must be set for the user suite').toBeTruthy(); + + // SAFETY: only the account's own email is invited. It already has site + // access, so per the endpoint contract no invite is sent and no user is + // created. We assert the call *types/serializes* and resolves (void) or + // fails with a typed admin gate — never that a new invite was created. + try { + const result = await client.user.inviteByEmail({ body: { emails: [ownEmail] } }); + + // The model declares `Promise`: a successful (async-accepted) call + // resolves with no body. + expect(result).toBeUndefined(); + } catch (error) { + expect(error).toBeInstanceOf(ApiError); + expect([401, 403, 404]).toContain((error as ApiError).status); + } + }); +}); diff --git a/packages/cloud/tests/integration/version.test.ts b/packages/cloud/tests/integration/version.test.ts new file mode 100644 index 00000000..cdeac07b --- /dev/null +++ b/packages/cloud/tests/integration/version.test.ts @@ -0,0 +1,415 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, createTestBlogPost, storageBody } from './setup/fixtures'; + +/** + * Live integration suite for the Confluence Cloud v2 `version` API. + * + * The module is a fan of structurally-identical read endpoints over six content + * families (page, blog post, attachment, custom content, footer comment, inline + * comment): a `getVersions` listing returning a `*Versions` page, and a + * `getVersionDetails` returning the shared `DetailedVersion`. + * + * Strategy (see the suite brief): + * - **page** — DEEP. A page is mutated to a 2nd version, then `getPageVersions` + * is verified for typing (`number` numeric, `createdAt` Date, `authorId` + * string, `minorEdit` boolean), completeness (numbers are exactly 1..N), + * ordering (the `sort` param produces mirror orderings), and pagination + * (`limit` + `_links.next`); `getPageVersionDetails` is fetched for both + * versions and cross-checked (returned `number` matches the request, the v2 + * details point back at v1 via `prevVersion`). + * - **blog post** & **footer comment** & **inline comment** — exercised with a + * real create+update so each listing has >= 2 versions and each details call + * resolves to the requested version number. + * - **attachment** & **custom content** — gated-graceful: no cheap parent, so + * each method is still CALLED (to exercise typing + URL/serialization) and is + * asserted to either return a typed result page or surface a 404 `ApiError`. + * + * Every version summary (`PageVersion`, `BlogPostVersion`, `CommentVersion`) and + * the `DetailedVersion` declare `number` as `z.number()`, `createdAt` as + * `z.coerce.date()`, `authorId` as `z.string()`, `minorEdit` as `z.boolean()`. + */ + +let client: ReturnType; +const tracker = new ResourceTracker(); + +/** Shared subjects, each already bumped to version 2 in `beforeAll`. */ +let page: Awaited>; +let blogPost: Awaited>; +let footerComment: Awaited>; +/** Inline-comment creation is more fragile (needs a text selection); may stay undefined. */ +let inlineCommentId: number | undefined; + +/** + * A meaningful structural check for a version summary as returned by any of the + * `getVersions` listings (the page/blog/comment summaries share this shape). + */ +function expectWellFormedVersion(version: { + number?: number; + createdAt?: Date; + authorId?: string; + minorEdit?: boolean; + message?: string; +}) { + expect(typeof version.number).toBe('number'); + expect(version.number).toBeGreaterThanOrEqual(1); + // `createdAt` is `z.coerce.date()`, so a parsed response yields a real Date. + expect(version.createdAt).toBeInstanceOf(Date); + expect(Number.isNaN(version.createdAt!.getTime())).toBe(false); + expect(typeof version.authorId).toBe('string'); + expect(version.authorId).toBeTruthy(); + expect(typeof version.minorEdit).toBe('boolean'); +} + +beforeAll(async () => { + client = getLiveClient(); + + const space = await createTestSpace(tracker); + + // --- page: create (v1) then mutate to v2 ------------------------------- + page = await createTestPage(tracker, space.id, { html: '

cfjs version anchor text v1

' }); + const pageV1 = page.version?.number ?? 1; + await client.page.updatePage({ + id: Number(page.id), + body: { + id: page.id, + status: 'current', + title: page.title, + body: storageBody('

cfjs version anchor text v2

'), + version: { number: pageV1 + 1 }, + }, + }); + + // --- blog post: create (v1) then mutate to v2 -------------------------- + blogPost = await createTestBlogPost(tracker, space.id, { html: '

cfjs blog v1

' }); + const blogV1 = blogPost.version?.number ?? 1; + await client.blogPost.updateBlogPost({ + id: Number(blogPost.id), + body: { + id: blogPost.id, + status: 'current', + title: blogPost.title, + body: storageBody('

cfjs blog v2

'), + version: { number: blogV1 + 1 }, + }, + }); + + // --- footer comment: create (v1) then mutate to v2 --------------------- + footerComment = await client.comment.createFooterComment({ + pageId: page.id, + body: storageBody('

cfjs footer comment v1

'), + }); + tracker.defer(async () => { + await client.comment.deleteFooterComment({ commentId: Number(footerComment.id) }).catch(() => undefined); + }); + await client.comment.updateFooterComment({ + commentId: Number(footerComment.id), + body: { + version: { number: (footerComment.version?.number ?? 1) + 1 }, + body: storageBody('

cfjs footer comment v2

'), + }, + }); + + // --- inline comment: best-effort create+update (needs a text selection) - + try { + const inline = await client.comment.createInlineComment({ + pageId: page.id, + body: storageBody('

cfjs inline v1

'), + inlineCommentProperties: { textSelection: 'anchor', textSelectionMatchCount: 1, textSelectionMatchIndex: 0 }, + }); + inlineCommentId = Number(inline.id); + tracker.defer(async () => { + await client.comment.deleteInlineComment({ commentId: Number(inline.id) }).catch(() => undefined); + }); + await client.comment.updateInlineComment({ + commentId: Number(inline.id), + version: { number: (inline.version?.number ?? 1) + 1 }, + body: storageBody('

cfjs inline v2

'), + }); + } catch { + // Highlighting can fail if the selection doesn't resolve on the rendered + // page; the inline-version endpoints are then exercised gated-graceful. + inlineCommentId = undefined; + } +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — version.getPageVersions (live, deep)', () => { + it('lists every version with correctly-typed summaries and complete 1..N numbering', async () => { + const result = await client.version.getPageVersions({ id: Number(page.id) }); + + expect(Array.isArray(result.results)).toBe(true); + const versions = result.results!; + expect(versions.length).toBeGreaterThanOrEqual(2); + versions.forEach(expectWellFormedVersion); + + // The full set of version numbers is exactly 1..N with no gaps/dupes. + const numbers = versions.map(v => v.number!).sort((a, b) => a - b); + const expected = Array.from({ length: versions.length }, (_, i) => i + 1); + expect(numbers).toEqual(expected); + + // The `page` back-reference, when present, points at the same page. + const withEntity = versions.find(v => v.page != null); + + if (withEntity?.page) { + expect(withEntity.page.id).toBe(page.id); + } + + // Multi-entity links object is present on the listing. + expect(result._links).toBeDefined(); + }); + + it('applies `sort` direction — modified-date asc and desc are mirror orderings', async () => { + const asc = (await client.version.getPageVersions({ id: Number(page.id), sort: 'modified-date' })).results ?? []; + const desc = (await client.version.getPageVersions({ id: Number(page.id), sort: '-modified-date' })).results ?? []; + + const ascNumbers = asc.map(v => v.number); + const descNumbers = desc.map(v => v.number); + + expect(ascNumbers.length).toBe(desc.length); + expect(ascNumbers.length).toBeGreaterThanOrEqual(2); + // A correct sort param simply makes the two directions exact reverses. + expect(ascNumbers).toEqual([...descNumbers].reverse()); + }); + + it('honors `limit` and surfaces a pagination cursor when more versions exist', async () => { + const firstPage = await client.version.getPageVersions({ id: Number(page.id), limit: 1 }); + + expect(firstPage.results?.length ?? 0).toBeLessThanOrEqual(1); + expect(firstPage.results).toHaveLength(1); + // With >1 versions and a page size of 1, the `Link` cursor is surfaced. + expect(typeof firstPage._links?.next).toBe('string'); + expect(firstPage._links!.next!.length).toBeGreaterThan(0); + }); + + it('serializes the `body-format` param without breaking the typed response', async () => { + const result = await client.version.getPageVersions({ id: Number(page.id), bodyFormat: 'storage' }); + + expect(result.results!.length).toBeGreaterThanOrEqual(2); + result.results!.forEach(expectWellFormedVersion); + }); + + it('rejects a non-existent page id with a 404 ApiError', async () => { + let caught: unknown; + try { + await client.version.getPageVersions({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — version.getPageVersionDetails (live, deep)', () => { + it('returns the requested version, with cross-version links between v1 and v2', async () => { + const v1 = await client.version.getPageVersionDetails({ pageId: Number(page.id), versionNumber: 1 }); + const v2 = await client.version.getPageVersionDetails({ pageId: Number(page.id), versionNumber: 2 }); + + expect(v1.number).toBe(1); + expect(v2.number).toBe(2); + expect(typeof v1.authorId).toBe('string'); + expect(typeof v2.minorEdit).toBe('boolean'); + expect(v1.createdAt).toBeInstanceOf(Date); + expect(v2.createdAt).toBeInstanceOf(Date); + + // DetailedVersion exposes prev/next links: v2 was published after v1. + expect(v2.prevVersion).toBe(1); + expect(v2.createdAt!.getTime()).toBeGreaterThanOrEqual(v1.createdAt!.getTime()); + }); + + it('rejects a non-existent version number with a 404 ApiError', async () => { + let caught: unknown; + try { + await client.version.getPageVersionDetails({ pageId: Number(page.id), versionNumber: 9_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + }); +}); + +describe('Confluence Cloud v2 — version blog-post family (live)', () => { + it('getBlogPostVersions lists >= 2 typed versions numbered 1..N', async () => { + const result = await client.version.getBlogPostVersions({ id: Number(blogPost.id) }); + + const versions = result.results!; + expect(versions.length).toBeGreaterThanOrEqual(2); + versions.forEach(expectWellFormedVersion); + + const numbers = versions.map(v => v.number!).sort((a, b) => a - b); + expect(numbers).toEqual(Array.from({ length: versions.length }, (_, i) => i + 1)); + }); + + it('getBlogPostVersionDetails returns the requested version number', async () => { + const details = await client.version.getBlogPostVersionDetails({ blogpostId: Number(blogPost.id), versionNumber: 2 }); + + expect(details.number).toBe(2); + expect(details.prevVersion).toBe(1); + expect(typeof details.authorId).toBe('string'); + expect(details.createdAt).toBeInstanceOf(Date); + }); +}); + +describe('Confluence Cloud v2 — version footer-comment family (live)', () => { + it('getFooterCommentVersions lists >= 2 typed versions numbered 1..N', async () => { + const result = await client.version.getFooterCommentVersions({ id: Number(footerComment.id) }); + + const versions = result.results!; + expect(versions.length).toBeGreaterThanOrEqual(2); + versions.forEach(expectWellFormedVersion); + + const numbers = versions.map(v => v.number!).sort((a, b) => a - b); + expect(numbers).toEqual(Array.from({ length: versions.length }, (_, i) => i + 1)); + + // CommentVersion carries a `comment` back-reference to the same comment. + const withEntity = versions.find(v => v.comment != null); + + if (withEntity?.comment) { + expect(withEntity.comment.id).toBe(footerComment.id); + } + }); + + it('getFooterCommentVersionDetails returns the requested version number', async () => { + const details = await client.version.getFooterCommentVersionDetails({ + id: Number(footerComment.id), + versionNumber: 2, + }); + + expect(details.number).toBe(2); + expect(details.prevVersion).toBe(1); + expect(typeof details.authorId).toBe('string'); + expect(details.createdAt).toBeInstanceOf(Date); + }); +}); + +describe('Confluence Cloud v2 — version inline-comment family (live)', () => { + it('getInlineCommentVersions lists typed versions (or 404s for an unknown id)', async () => { + if (inlineCommentId === undefined) { + // No inline comment could be created — exercise typing + 404 path only. + let caught: unknown; + try { + const result = await client.version.getInlineCommentVersions({ id: 999_999_999 }); + expect(Array.isArray(result.results)).toBe(true); + result.results!.forEach(expectWellFormedVersion); + + return; + } catch (error) { + caught = error; + } + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + + return; + } + + const result = await client.version.getInlineCommentVersions({ id: inlineCommentId }); + const versions = result.results!; + expect(versions.length).toBeGreaterThanOrEqual(2); + versions.forEach(expectWellFormedVersion); + const numbers = versions.map(v => v.number!).sort((a, b) => a - b); + expect(numbers).toEqual(Array.from({ length: versions.length }, (_, i) => i + 1)); + }); + + it('getInlineCommentVersionDetails returns the requested version (or 404s for an unknown id)', async () => { + if (inlineCommentId === undefined) { + let caught: unknown; + try { + await client.version.getInlineCommentVersionDetails({ id: 999_999_999, versionNumber: 1 }); + } catch (error) { + caught = error; + } + expect(caught).toBeInstanceOf(ApiError); + expect((caught as ApiError).status).toBe(404); + + return; + } + + const details = await client.version.getInlineCommentVersionDetails({ id: inlineCommentId, versionNumber: 2 }); + expect(details.number).toBe(2); + expect(typeof details.authorId).toBe('string'); + expect(details.createdAt).toBeInstanceOf(Date); + }); +}); + +describe('Confluence Cloud v2 — version attachment family (live, gated-graceful)', () => { + // No cheap attachment parent exists in v2 (upload is a v1 multipart gap), so + // these calls exercise typing + URL/serialization and tolerate a 404. + const missingAttachmentId = '999999999'; + + it('getAttachmentVersions returns a typed page or a 404 ApiError', async () => { + let caught: unknown; + try { + const result = await client.version.getAttachmentVersions({ id: missingAttachmentId }); + expect(Array.isArray(result.results)).toBe(true); + result.results!.forEach(expectWellFormedVersion); + + return; + } catch (error) { + caught = error; + } + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + }); + + it('getAttachmentVersionDetails returns a typed version or a 404 ApiError', async () => { + let caught: unknown; + try { + const details = await client.version.getAttachmentVersionDetails({ + attachmentId: missingAttachmentId, + versionNumber: 1, + }); + expect(details).toBeDefined(); + + return; + } catch (error) { + caught = error; + } + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + }); +}); + +describe('Confluence Cloud v2 — version custom-content family (live, gated-graceful)', () => { + // Likewise no custom-content parent is bootstrapped here. + const missingCustomContentId = 999_999_999; + + it('getCustomContentVersions returns a typed page or a 404 ApiError', async () => { + let caught: unknown; + try { + const result = await client.version.getCustomContentVersions({ customContentId: missingCustomContentId }); + expect(Array.isArray(result.results)).toBe(true); + result.results!.forEach(expectWellFormedVersion); + + return; + } catch (error) { + caught = error; + } + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + }); + + it('getCustomContentVersionDetails returns a typed version or a 404 ApiError', async () => { + let caught: unknown; + try { + const details = await client.version.getCustomContentVersionDetails({ + customContentId: missingCustomContentId, + versionNumber: 1, + }); + expect(details).toBeDefined(); + + return; + } catch (error) { + caught = error; + } + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + }); +}); diff --git a/packages/cloud/tests/integration/whiteboard.test.ts b/packages/cloud/tests/integration/whiteboard.test.ts new file mode 100644 index 00000000..8dd1751b --- /dev/null +++ b/packages/cloud/tests/integration/whiteboard.test.ts @@ -0,0 +1,227 @@ +import { describe, it, expect, beforeAll, afterAll } from 'vitest'; +import { ApiError } from '@confluence.js/core'; +import type { createCloudV2Client } from '@confluence.js/cloud'; +import { getLiveClient } from './setup/client'; +import { ResourceTracker } from './setup/resources'; +import { createTestSpace, createTestPage, type TestSpace } from './setup/fixtures'; +import { testName } from './helpers/naming'; + +/** + * Live integration suite for the Confluence Cloud v2 `whiteboard` API, covering + * its full lifecycle: `createWhiteboard`, `getWhiteboardById`, `deleteWhiteboard`. + * + * The assertions verify the *contract* of each function, not merely that a call + * resolves: a created whiteboard is typed exactly as the `Whiteboard` Zod model + * declares (`id`/`spaceId`/`authorId`/`ownerId` are numeric strings, `createdAt` + * is a real `Date`, `version.number` is a number, `status` is a `ContentStatus`); + * the same canonical whiteboard comes back consistently from `getWhiteboardById`; + * a whiteboard created under a page reports that page as its `parentId` with + * `parentType: 'page'`; and a deleted whiteboard surfaces as a typed 404 + * `ApiError`. + * + * Environment gating: whiteboards are a premium content type a standard Cloud + * site may not allow creating. Creation is always *attempted* (to exercise param + * + body serialization), but a rejection is accepted as a typed `ApiError` with + * an expected status, and the get/delete typing is still exercised against a + * plausible id. A gated run never hard-fails the suite — see report. + * + * ID gotcha: model ids are numeric *strings* (`whiteboard.id: string`), while the + * path params of `getWhiteboardById`/`deleteWhiteboard` are `z.number()` — every + * such call converts with `Number(whiteboard.id)`. + */ + +/** Statuses a whiteboard may report — the `ContentStatus` enum. */ +const CONTENT_STATUSES = ['current', 'draft', 'archived', 'historical', 'trashed', 'deleted', 'any'] as const; + +/** Statuses accepted when the environment gates whiteboard creation. */ +const GATED_STATUSES = [400, 403, 404, 501] as const; + +type Whiteboard = Awaited['whiteboard']['createWhiteboard']>>; + +let client: ReturnType; +const tracker = new ResourceTracker(); +let space: TestSpace; +/** A page used as a parent for the nested-creation breadth check. */ +let parentPage: Awaited>; + +/** The canonical whiteboard created at the space root, asserted against everywhere. */ +let created: Whiteboard | undefined; +let createError: unknown; +const title = testName('whiteboard'); + +/** The nested whiteboard created under `parentPage` (when not gated). */ +let nested: Whiteboard | undefined; + +/** A meaningful structural check for any whiteboard returned by the API. */ +function expectWellFormedWhiteboard(wb: Whiteboard) { + expect(typeof wb.id).toBe('string'); + expect(wb.id).toBeTruthy(); + expect(typeof wb.spaceId).toBe('string'); + expect(wb.spaceId).toBe(space.id); + + if (wb.status !== undefined) expect(CONTENT_STATUSES).toContain(wb.status); + + // `createdAt` is `z.coerce.date()` — a parsed response yields a real Date. + expect(wb.createdAt).toBeInstanceOf(Date); + // A freshly created entity is version 1. + expect(wb.version?.number).toBe(1); + expect(typeof wb.authorId).toBe('string'); +} + +beforeAll(async () => { + client = getLiveClient(); + + space = await createTestSpace(tracker); + parentPage = await createTestPage(tracker, space.id); + + // Always attempt creation — exercises param/body serialization either way. + try { + created = await client.whiteboard.createWhiteboard({ body: { spaceId: space.id, title } }); + + const id = Number(created.id); + tracker.defer(async () => { + await client.whiteboard.deleteWhiteboard({ id }).catch(() => undefined); + }); + } catch (error) { + createError = error; + } + + // Breadth: a whiteboard filed under a page should report the page as its parent. + if (created) { + try { + nested = await client.whiteboard.createWhiteboard({ + body: { spaceId: space.id, title: testName('whiteboard-nested'), parentId: parentPage.id }, + }); + + const id = Number(nested.id); + tracker.defer(async () => { + await client.whiteboard.deleteWhiteboard({ id }).catch(() => undefined); + }); + } catch { + nested = undefined; + } + } +}); + +afterAll(() => tracker.cleanup()); + +describe('Confluence Cloud v2 — whiteboard.createWhiteboard (live, lifecycle)', () => { + it('either creates a typed Whiteboard or rejects with a typed ApiError when gated', () => { + if (created) { + expect(created.title).toBe(title); + expectWellFormedWhiteboard(created); + // Created at the space root → no parent content. + expect(created.parentId == null || typeof created.parentId === 'string').toBe(true); + + return; + } + + // Gated path — site does not permit whiteboard creation. + expect(createError, 'create neither succeeded nor threw').toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((createError as ApiError).status); + }); + + it('files a whiteboard under a page with parentType `page` (breadth)', () => { + if (!nested) return; // gated, or nested creation unsupported here + + expect(nested.parentId).toBe(parentPage.id); + expect(nested.parentType).toBe('page'); + expect(nested.spaceId).toBe(space.id); + expect(nested.version?.number).toBe(1); + }); +}); + +describe('Confluence Cloud v2 — whiteboard.getWhiteboardById (live)', () => { + it('returns the canonical entity created above with model-typed fields', async () => { + if (!created) return; // covered by the dedicated 404 case below in the gated path + + const fetched = await client.whiteboard.getWhiteboardById({ id: Number(created.id) }); + + expect(fetched.id).toBe(created.id); + expect(fetched.title).toBe(title); + expect(fetched.spaceId).toBe(space.id); + expect(CONTENT_STATUSES).toContain(fetched.status); + expect(fetched.createdAt).toBeInstanceOf(Date); + expect(fetched.version?.number).toBe(1); + // Every real whiteboard exposes a web UI link. + expect(typeof fetched._links?.webui).toBe('string'); + expect(fetched._links?.webui).toBeTruthy(); + }); + + it('expands operations/properties only when the include-* flags are set', async () => { + if (!created) return; + + const expanded = await client.whiteboard.getWhiteboardById({ + id: Number(created.id), + includeOperations: true, + includeProperties: true, + }); + + expect(expanded.id).toBe(created.id); + // NOTE: `include-operations`/`include-properties` add expansions the `Whiteboard` + // model does not declare, so they land on the loose index — read defensively. + const expansions = expanded as Record; + + if (expansions.operations) expect(Array.isArray(expansions.operations.results ?? [])).toBe(true); + + if (expansions.properties) expect(Array.isArray(expansions.properties.results ?? [])).toBe(true); + }); + + it('rejects a non-existent whiteboard id with a typed ApiError', async () => { + let caught: unknown; + + try { + await client.whiteboard.getWhiteboardById({ id: 999_999_999 }); + } catch (error) { + caught = error; + } + + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + }); +}); + +describe('Confluence Cloud v2 — whiteboard.deleteWhiteboard (live)', () => { + it('deletes a whiteboard so a subsequent getWhiteboardById yields a 404 ApiError', async () => { + let disposable: Whiteboard; + + try { + disposable = await client.whiteboard.createWhiteboard({ + body: { spaceId: space.id, title: testName('whiteboard-disposable') }, + }); + } catch (error) { + // Gated path — still exercise delete typing against a plausible id. + expect(error).toBeInstanceOf(ApiError); + expect(GATED_STATUSES).toContain((error as ApiError).status); + + let caught: unknown; + try { + await client.whiteboard.deleteWhiteboard({ id: 999_999_999 }); + } catch (e) { + caught = e; + } + expect(caught).toBeInstanceOf(ApiError); + expect([400, 404]).toContain((caught as ApiError).status); + + return; + } + + const id = Number(disposable.id); + // Safety net should the assertion below not run. + tracker.defer(async () => { + await client.whiteboard.deleteWhiteboard({ id }).catch(() => undefined); + }); + + await client.whiteboard.deleteWhiteboard({ id }); + + // A plain v2 DELETE moves content to TRASH (204) rather than purging it: the + // entity is still fetchable, now with status 'trashed'. Only a purge yields 404. + const after = await client.whiteboard.getWhiteboardById({ id }).catch(e => e); + + if (after instanceof ApiError) { + expect(after.status).toBe(404); // hard-deleted (purged) + } else { + expect(['trashed', 'deleted']).toContain(after.status); // moved to trash (the common case) + } + }); +}); diff --git a/packages/cloud/tests/tsconfig.json b/packages/cloud/tests/tsconfig.json new file mode 100644 index 00000000..56ad12ac --- /dev/null +++ b/packages/cloud/tests/tsconfig.json @@ -0,0 +1,13 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "noEmit": true, + "skipLibCheck": true, + "types": ["node"], + "paths": { + "#/*": ["../src/*"], + "@confluence.js/cloud": ["../src/index.ts"] + } + }, + "include": ["integration", "unit"] +} diff --git a/packages/cloud/tsconfig.json b/packages/cloud/tsconfig.json new file mode 100644 index 00000000..bd55e759 --- /dev/null +++ b/packages/cloud/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist", + "paths": { + "#/*": ["./src/*"] + } + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/cloud/vite.config.ts b/packages/cloud/vite.config.ts new file mode 100644 index 00000000..abdf927e --- /dev/null +++ b/packages/cloud/vite.config.ts @@ -0,0 +1,38 @@ +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { defineConfig } from 'vite'; +import { externalizeDeps } from 'vite-plugin-externalize-deps'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const srcRoot = resolve(__dirname, 'src'); +const distRoot = resolve(__dirname, 'dist'); + +export default defineConfig({ + plugins: [externalizeDeps()], + resolve: { + alias: { + '#/': `${srcRoot}/`, + }, + }, + build: { + ssr: true, + copyPublicDir: false, + emptyOutDir: true, + sourcemap: true, + lib: { + entry: resolve(__dirname, 'src/index.ts'), + }, + rolldownOptions: { + output: [ + { + format: 'es', + dir: distRoot, + entryFileNames: '[name].js', + chunkFileNames: '[name].js', + preserveModules: true, + preserveModulesRoot: srcRoot, + }, + ], + }, + }, +}); diff --git a/packages/cloud/vitest.config.ts b/packages/cloud/vitest.config.ts new file mode 100644 index 00000000..77f2c501 --- /dev/null +++ b/packages/cloud/vitest.config.ts @@ -0,0 +1,34 @@ +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { loadEnv } from 'vite'; +import { defineConfig, mergeConfig } from 'vitest/config'; +import { vitestShared } from '../../vitestShared'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const repoRoot = resolve(__dirname, '../..'); + +export default defineConfig(({ mode }) => + mergeConfig( + vitestShared, + defineConfig({ + resolve: { + alias: { + '#/': `${resolve(__dirname, 'src')}/`, + '@confluence.js/cloud': resolve(__dirname, 'src/index.ts'), + }, + }, + test: { + name: 'cloud', + root: __dirname, + include: ['tests/**/*.test.ts'], + env: loadEnv(mode, repoRoot, ''), + // Live suites hit a single shared Confluence Cloud site: run every test + // file serially in one worker ("queued") so suites never race each other + // for rate limits or step on shared state. The global setup sweeps any + // marker-tagged spaces a crashed run left behind. + globalSetup: ['./tests/integration/setup/globalSetup.ts'], + fileParallelism: false, + }, + }), + ), +); diff --git a/packages/core/package.json b/packages/core/package.json new file mode 100644 index 00000000..00a02a0e --- /dev/null +++ b/packages/core/package.json @@ -0,0 +1,31 @@ +{ + "name": "@confluence.js/core", + "version": "0.0.1", + "private": true, + "description": "Shared HTTP client, configuration, and utilities for confluence.js packages", + "type": "module", + "sideEffects": false, + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "scripts": { + "build": "vite build && tsc --emitDeclarationOnly && tsc-alias --resolve-full-paths", + "test": "vitest run --passWithNoTests", + "test:unit": "vitest run tests/unit --passWithNoTests" + }, + "dependencies": { + "zod": "^4.4.3" + }, + "engines": { + "node": ">=22" + } +} diff --git a/packages/core/src/apiError.ts b/packages/core/src/apiError.ts new file mode 100644 index 00000000..d2087f88 --- /dev/null +++ b/packages/core/src/apiError.ts @@ -0,0 +1,19 @@ +/** + * Thrown when Jira returns a non-2xx HTTP response. + * + * @stable + */ +export class ApiError extends Error { + readonly status: number; + readonly statusText: string; + readonly body: unknown; + + constructor(message: string, status: number, statusText: string, body: unknown) { + super(message); + this.name = 'ApiError'; + this.status = status; + this.statusText = statusText; + this.body = body; + Object.setPrototypeOf(this, ApiError.prototype); + } +} diff --git a/packages/core/src/apiObject.ts b/packages/core/src/apiObject.ts new file mode 100644 index 00000000..556552cf --- /dev/null +++ b/packages/core/src/apiObject.ts @@ -0,0 +1,5 @@ +import { z, type ZodRawShape } from 'zod'; + +export function apiObject(shape: Shape) { + return z.object(shape).loose(); +} diff --git a/packages/core/src/bodyToFetchBody.ts b/packages/core/src/bodyToFetchBody.ts new file mode 100644 index 00000000..21f9f14f --- /dev/null +++ b/packages/core/src/bodyToFetchBody.ts @@ -0,0 +1,49 @@ +function isAsyncIterable(value: unknown): value is AsyncIterable { + if (value == null) return false; + + return typeof (value as { [Symbol.asyncIterator]?: unknown })[Symbol.asyncIterator] === 'function'; +} + +function isBinaryBody(body: unknown): boolean { + if (typeof body === 'string') return true; + + if (typeof FormData !== 'undefined' && body instanceof FormData) return true; + + if (typeof URLSearchParams !== 'undefined' && body instanceof URLSearchParams) return true; + + if (typeof Blob !== 'undefined' && body instanceof Blob) return true; + + if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return true; + + if (typeof ArrayBuffer !== 'undefined' && body instanceof ArrayBuffer) return true; + + if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(body as ArrayBufferView)) return true; + + if (typeof Buffer !== 'undefined' && body instanceof Buffer) return true; + + if (isAsyncIterable(body)) return true; + + return false; +} + +export function bodyToFetchBody(body: unknown): BodyInit | AsyncIterable { + if (typeof Buffer !== 'undefined' && body instanceof Buffer) { + return new Uint8Array(body); + } + + if (isBinaryBody(body)) { + return body as BodyInit | AsyncIterable; + } + + return JSON.stringify(body); +} + +export function shouldSetJsonContentType(body: unknown): boolean { + return body !== undefined && body !== null && !isBinaryBody(body); +} + +export function requiresDuplex(body: unknown): boolean { + if (typeof ReadableStream !== 'undefined' && body instanceof ReadableStream) return true; + + return isAsyncIterable(body); +} diff --git a/packages/core/src/createClient.ts b/packages/core/src/createClient.ts new file mode 100644 index 00000000..7ab95fb7 --- /dev/null +++ b/packages/core/src/createClient.ts @@ -0,0 +1,207 @@ +import { bodyToFetchBody, requiresDuplex, shouldSetJsonContentType } from './bodyToFetchBody.js'; +import type { Auth, ClientConfig, SendRequestOptions } from './schemas/index.js'; +import type { Client } from './interfaces/index.js'; +import { ApiError } from './apiError.js'; +import { buildUrlWithSearchParams } from './serializeSearchParams.js'; + +/** Node/undici error codes that signal a recoverable transport-layer failure. */ +const TRANSIENT_NETWORK_CODES = new Set([ + 'ECONNRESET', + 'ECONNREFUSED', + 'ETIMEDOUT', + 'ENOTFOUND', + 'EAI_AGAIN', + 'EPIPE', + 'UND_ERR_SOCKET', + 'UND_ERR_CONNECT_TIMEOUT', + 'UND_ERR_HEADERS_TIMEOUT', + 'UND_ERR_BODY_TIMEOUT', +]); +/** HTTP statuses that signal a recoverable upstream failure. */ +const TRANSIENT_HTTP_STATUSES = new Set([502, 503, 504]); + +function isTransientNetworkError(err: unknown): boolean { + if (!(err instanceof Error)) return false; + + const stack: unknown[] = []; + let cur: unknown = err; + while (cur && stack.length < 5) { + stack.push(cur); + cur = (cur as { cause?: unknown }).cause; + } + + for (const node of stack) { + if (!(node instanceof Error)) continue; + + const code = (node as Error & { code?: string }).code; + + if (code && TRANSIENT_NETWORK_CODES.has(code)) return true; + + // OpenSSL errors surface as ERR_SSL_* — any of them indicates a broken TLS session. + if (code?.startsWith('ERR_SSL_')) return true; + } + + return false; +} + +function base64Encode(str: string): string { + if (typeof Buffer !== 'undefined') { + return Buffer.from(str, 'utf-8').toString('base64'); + } + + return btoa(unescape(encodeURIComponent(str))); +} + +async function getAuthHeaders(auth: Auth): Promise> { + if (auth.type === 'basic') { + const encoded = base64Encode(`${auth.email}:${auth.apiToken}`); + + return { Authorization: `Basic ${encoded}` }; + } + + if ('getToken' in auth) { + const token = await auth.getToken(); + + return { Authorization: `Bearer ${token}` }; + } + + return { Authorization: `Bearer ${auth.token}` }; +} + +/** + * Creates a low-level Jira API client. + * + * Prefer `createCloudClient` from `@jira.js/cloud` or `createAgileClient` + * from `@jira.js/agile` unless you need direct transport control. + * + * @stable + */ +export function createClient(config: ClientConfig): Client { + const { host, auth, headers: configHeaders = {}, getAuthOn401, retry } = config; + const retryMaxAttempts = Math.max(1, retry?.maxAttempts ?? 1); + const retryInitialDelayMs = retry?.initialDelayMs ?? 500; + const retryBackoffFactor = retry?.backoffFactor ?? 2; + + return { + async sendRequest(requestConfig: SendRequestOptions): Promise { + const path = requestConfig.url.startsWith('/') ? requestConfig.url : `/${requestConfig.url}`; + const normalizedHost = host && (host.endsWith('/') ? host.slice(0, -1) : host); + const url = normalizedHost ? normalizedHost + path : requestConfig.url; + const fullUrl = buildUrlWithSearchParams(url, requestConfig.searchParams); + + const rawBody = requestConfig.body; + const body = rawBody === undefined || rawBody === null ? undefined : bodyToFetchBody(rawBody); + + const doRequest = async (authHeaders: Record): Promise => { + const headers: Record = { + Accept: 'application/json', + ...(shouldSetJsonContentType(rawBody) ? { 'Content-Type': 'application/json' } : {}), + ...authHeaders, + ...configHeaders, + ...requestConfig.headers, + }; + + const init: RequestInit & { duplex?: 'half' } = { + method: requestConfig.method, + headers: Object.keys(headers).length > 0 ? headers : undefined, + body: body as BodyInit, + }; + + if (requiresDuplex(rawBody)) { + init.duplex = 'half'; + } + + return fetch(fullUrl, init); + }; + + let derivedAuthHeaders = auth ? await getAuthHeaders(auth) : {}; + let response: Response; + let delayMs = retryInitialDelayMs; + let networkAttempt = 0; + // Retry loop: covers transport-layer failures (TLS/socket/DNS) and + // 502/503/504 upstream failures. Auth re-derivation on 401 happens once + // per response cycle, inside the loop, so a refreshed token survives + // subsequent transient retries. + + // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- intentional retry loop + while (true) { + try { + response = await doRequest(derivedAuthHeaders); + } catch (err) { + if (networkAttempt + 1 < retryMaxAttempts && isTransientNetworkError(err)) { + networkAttempt += 1; + await new Promise(resolve => setTimeout(resolve, delayMs)); + delayMs = Math.round(delayMs * retryBackoffFactor); + continue; + } + + throw err; + } + + if (response.status === 401 && getAuthOn401) { + const newAuth = await getAuthOn401(); + derivedAuthHeaders = await getAuthHeaders(newAuth); + continue; + } + + if (TRANSIENT_HTTP_STATUSES.has(response.status) && networkAttempt + 1 < retryMaxAttempts) { + networkAttempt += 1; + await new Promise(resolve => setTimeout(resolve, delayMs)); + delayMs = Math.round(delayMs * retryBackoffFactor); + continue; + } + + break; + } + + if (!response.ok) { + const text = await response.text(); + let detail: unknown = text; + try { + detail = JSON.parse(text); + } catch { + // + } + throw new ApiError( + `Request failed: ${response.status} ${response.statusText}${text ? ` - ${text}` : ''}`, + response.status, + response.statusText, + detail, + ); + } + + const contentType = response.headers.get('content-type'); + + if (response.status === 204 || (contentType && !contentType.includes('application/json'))) { + return undefined as T; + } + + let data: unknown; + + if (contentType?.includes('application/json')) { + const text = await response.text(); + + try { + data = JSON.parse(text); + } catch (e) { + if (e instanceof SyntaxError) { + // Jira sometimes sends application/json Content-Type with a plain-text body + data = text || undefined; + } else { + throw e; + } + } + } else { + const text = await response.text(); + + data = text || undefined; + } + + if (requestConfig.schema && data !== undefined) { + return requestConfig.schema.parse(data) as T; + } + + return data as T; + }, + }; +} diff --git a/packages/core/src/formData/attachmentInput.ts b/packages/core/src/formData/attachmentInput.ts new file mode 100644 index 00000000..aa77dfd3 --- /dev/null +++ b/packages/core/src/formData/attachmentInput.ts @@ -0,0 +1,15 @@ +import type { Readable } from 'node:stream'; + +export type AttachmentContent = + | File + | Blob + | Buffer + | Readable + | ReadableStream + | AsyncIterable + | string; + +export type AttachmentInput = { + filename: string; + content: AttachmentContent; +}; diff --git a/packages/core/src/formData/bufferSchema.ts b/packages/core/src/formData/bufferSchema.ts new file mode 100644 index 00000000..7a1867c3 --- /dev/null +++ b/packages/core/src/formData/bufferSchema.ts @@ -0,0 +1,11 @@ +import { z } from 'zod'; + +export const BufferSchema = z.custom(val => { + if (val instanceof ArrayBuffer) return true; + + if (typeof ArrayBuffer !== 'undefined' && ArrayBuffer.isView(val)) return true; + + return false; +}); + +export type Buffer = z.infer; diff --git a/packages/core/src/formData/index.ts b/packages/core/src/formData/index.ts new file mode 100644 index 00000000..8d952832 --- /dev/null +++ b/packages/core/src/formData/index.ts @@ -0,0 +1,5 @@ +export type { AttachmentInput } from './attachmentInput.js'; + +export { BufferSchema, type Buffer } from './bufferSchema.js'; + +export { createMultipartRequestBody } from './multipartRequest.js'; diff --git a/packages/core/src/formData/multipartRequest.ts b/packages/core/src/formData/multipartRequest.ts new file mode 100644 index 00000000..abd5e654 --- /dev/null +++ b/packages/core/src/formData/multipartRequest.ts @@ -0,0 +1,201 @@ +import type { AttachmentInput, AttachmentContent } from './attachmentInput.js'; + +export type MultipartRequestBody = { + body: FormData | AsyncIterable | ReadableStream; + headers?: Record; +}; + +const textEncoder = new TextEncoder(); + +function isNodeRuntime(): boolean { + return typeof process !== 'undefined' && !!process.versions.node; +} + +function isAsyncIterable(value: unknown): value is AsyncIterable { + if (value == null) return false; + + return typeof (value as { [Symbol.asyncIterator]?: unknown })[Symbol.asyncIterator] === 'function'; +} + +function isStreamLikeContent(content: AttachmentContent): boolean { + if (typeof content === 'string') return false; + + if (content instanceof Blob) return false; + + if (typeof Buffer !== 'undefined' && content instanceof Buffer) return false; + + if (typeof ReadableStream !== 'undefined' && content instanceof ReadableStream) return true; + + return isAsyncIterable(content); +} + +function toFormDataPart(content: AttachmentContent): Blob { + if (typeof content === 'string') { + return new Blob([content], { type: 'text/plain; charset=utf-8' }); + } + + if (content instanceof Blob) { + return content; + } + + if (typeof Buffer !== 'undefined' && content instanceof Buffer) { + return new Blob([new Uint8Array(content)], { type: 'application/octet-stream' }); + } + + throw new TypeError('Streaming attachment content requires streaming multipart mode'); +} + +function escapeQuotes(value: string): string { + return value.replace(/"/g, '%22'); +} + +function normalizeChunk(chunk: Uint8Array | string): Uint8Array { + if (typeof chunk === 'string') { + return textEncoder.encode(chunk); + } + + return chunk; +} + +async function* readableStreamToAsyncIterable(stream: ReadableStream): AsyncIterable { + const reader = stream.getReader(); + try { + for (;;) { + const { value, done } = await reader.read(); + + if (done) return; + + yield normalizeChunk(value); + } + } finally { + reader.releaseLock(); + } +} + +async function* contentToAsyncIterable(content: AttachmentContent): AsyncIterable { + if (typeof content === 'string') { + yield textEncoder.encode(content); + + return; + } + + if (content instanceof Blob) { + for await (const chunk of readableStreamToAsyncIterable(content.stream() as ReadableStream)) { + yield chunk; + } + + return; + } + + if (typeof Buffer !== 'undefined' && content instanceof Buffer) { + yield new Uint8Array(content); + + return; + } + + if (typeof ReadableStream !== 'undefined' && content instanceof ReadableStream) { + for await (const chunk of readableStreamToAsyncIterable(content as ReadableStream)) { + yield chunk; + } + + return; + } + + if (isAsyncIterable(content)) { + for await (const chunk of content) { + yield normalizeChunk(chunk); + } + + return; + } + + throw new TypeError('Unsupported attachment content type'); +} + +function createBoundary(): string { + const suffix = + typeof crypto !== 'undefined' && 'randomUUID' in crypto + ? crypto.randomUUID().replace(/-/g, '') + : `${Date.now()}${Math.random().toString(16).slice(2)}`; + + return `jira-js-${suffix}`; +} + +function toReadableStream(iterable: AsyncIterable): ReadableStream { + const iterator = iterable[Symbol.asyncIterator](); + + return new ReadableStream({ + async pull(controller) { + const { value, done } = await iterator.next(); + + if (done) { + controller.close(); + + return; + } + + controller.enqueue(value); + }, + async cancel() { + if (typeof iterator.return === 'function') { + await iterator.return(); + } + }, + }); +} + +async function* encodeMultipart(attachments: AttachmentInput[], boundary: string): AsyncIterable { + for (const attachment of attachments) { + const contentType = + typeof attachment.content === 'string' + ? 'text/plain; charset=utf-8' + : attachment.content instanceof Blob && attachment.content.type + ? attachment.content.type + : 'application/octet-stream'; + + const preamble = `--${boundary}\r\nContent-Disposition: form-data; name="file"; filename="${escapeQuotes(attachment.filename)}"\r\nContent-Type: ${contentType}\r\n\r\n`; + yield textEncoder.encode(preamble); + + for await (const chunk of contentToAsyncIterable(attachment.content)) { + yield chunk; + } + + yield textEncoder.encode('\r\n'); + } + + yield textEncoder.encode(`--${boundary}--\r\n`); +} + +export function createMultipartRequestBody(input: AttachmentInput | AttachmentInput[]): MultipartRequestBody { + const attachments = Array.isArray(input) ? input : [input]; + const hasStreamingInput = attachments.some(attachment => isStreamLikeContent(attachment.content)); + + if (!hasStreamingInput && typeof FormData !== 'undefined') { + const formData = new FormData(); + + for (const attachment of attachments) { + formData.append('file', toFormDataPart(attachment.content), attachment.filename); + } + + return { body: formData }; + } + + const boundary = createBoundary(); + const iterable = encodeMultipart(attachments, boundary); + + if (isNodeRuntime()) { + return { + body: iterable, + headers: { + 'Content-Type': `multipart/form-data; boundary=${boundary}`, + }, + }; + } + + return { + body: toReadableStream(iterable), + headers: { + 'Content-Type': `multipart/form-data; boundary=${boundary}`, + }, + }; +} diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts new file mode 100644 index 00000000..a1ddc08d --- /dev/null +++ b/packages/core/src/index.ts @@ -0,0 +1,43 @@ +export { ApiError } from './apiError.js'; + +export { apiObject } from './apiObject.js'; + +export { createClient } from './createClient.js'; + +export type { Client } from './interfaces/index.js'; + +export { sendRequest } from './sendRequest.js'; + +export { + httpMethodSchema, + clientConfigSchema, + authSchema, + sendRequestOptionsSchema, + type HttpMethod, + type ClientConfig, + type Auth, + type SendRequestOptions, +} from './schemas/index.js'; + +export { + buildAtlassianAuthUrl, + parseAtlassianCallbackUrl, + obtainAtlassianOAuthTokens, + refreshAtlassianOAuthTokens, +} from './oauth/index.js'; + +export type { + BuildAtlassianAuthUrlOptions, + AtlassianCallbackParams, + ObtainAtlassianOAuthTokensOptions, + AtlassianOAuthTokens, + RefreshAtlassianOAuthTokensOptions, +} from './oauth/index.js'; + +export { BufferSchema, createMultipartRequestBody } from './formData/index.js'; + +export type { AttachmentInput, Buffer } from './formData/index.js'; + +export { withRetry } from './withRetry.js'; + +export type { RetryOptions } from './withRetry.js'; diff --git a/packages/core/src/interfaces/client.ts b/packages/core/src/interfaces/client.ts new file mode 100644 index 00000000..7b32625f --- /dev/null +++ b/packages/core/src/interfaces/client.ts @@ -0,0 +1,5 @@ +import type { SendRequestOptions } from '../schemas/index.js'; + +export interface Client { + sendRequest(options: SendRequestOptions): Promise; +} diff --git a/packages/core/src/interfaces/index.ts b/packages/core/src/interfaces/index.ts new file mode 100644 index 00000000..8441b9d0 --- /dev/null +++ b/packages/core/src/interfaces/index.ts @@ -0,0 +1 @@ +export type { Client } from './client.js'; diff --git a/packages/core/src/oauth/buildAtlassianAuthUrl.ts b/packages/core/src/oauth/buildAtlassianAuthUrl.ts new file mode 100644 index 00000000..8dbf1cc1 --- /dev/null +++ b/packages/core/src/oauth/buildAtlassianAuthUrl.ts @@ -0,0 +1,22 @@ +const AUTHORIZE_URL = 'https://auth.atlassian.com/authorize'; + +export interface BuildAtlassianAuthUrlOptions { + clientId: string; + redirectUri: string; + scope: string; + state: string; +} + +export function buildAtlassianAuthUrl(options: BuildAtlassianAuthUrlOptions): string { + const { clientId, redirectUri, scope, state } = options; + const params = new URLSearchParams({ + client_id: clientId, + scope, + redirect_uri: redirectUri, + state, + response_type: 'code', + prompt: 'consent', + }); + + return `${AUTHORIZE_URL}?${params.toString()}`; +} diff --git a/packages/core/src/oauth/index.ts b/packages/core/src/oauth/index.ts new file mode 100644 index 00000000..eea35b9f --- /dev/null +++ b/packages/core/src/oauth/index.ts @@ -0,0 +1,15 @@ +export { buildAtlassianAuthUrl } from './buildAtlassianAuthUrl.js'; + +export type { BuildAtlassianAuthUrlOptions } from './buildAtlassianAuthUrl.js'; + +export { parseAtlassianCallbackUrl } from './parseAtlassianCallbackUrl.js'; + +export type { AtlassianCallbackParams } from './parseAtlassianCallbackUrl.js'; + +export { obtainAtlassianOAuthTokens } from './obtainAtlassianOAuthTokens.js'; + +export type { ObtainAtlassianOAuthTokensOptions, AtlassianOAuthTokens } from './obtainAtlassianOAuthTokens.js'; + +export { refreshAtlassianOAuthTokens } from './refreshAtlassianOAuthTokens.js'; + +export type { RefreshAtlassianOAuthTokensOptions } from './refreshAtlassianOAuthTokens.js'; diff --git a/packages/core/src/oauth/obtainAtlassianOAuthTokens.ts b/packages/core/src/oauth/obtainAtlassianOAuthTokens.ts new file mode 100644 index 00000000..100c5c46 --- /dev/null +++ b/packages/core/src/oauth/obtainAtlassianOAuthTokens.ts @@ -0,0 +1,142 @@ +import { exec } from 'node:child_process'; +import { createServer, type IncomingMessage, type ServerResponse } from 'node:http'; +import { buildAtlassianAuthUrl } from './buildAtlassianAuthUrl.js'; + +const TOKEN_URL = 'https://auth.atlassian.com/oauth/token'; +const CALLBACK_TIMEOUT_MS = 5 * 60 * 1000; + +export interface ObtainAtlassianOAuthTokensOptions { + clientId: string; + clientSecret: string; + redirectUri: string; + scope: string; + state?: string; + openBrowser?: boolean; +} + +export interface AtlassianOAuthTokens { + accessToken: string; + expiresIn: number; + scope: string; + refreshToken?: string; +} + +function randomState(): string { + const array = new Uint8Array(24); + + if (typeof crypto !== 'undefined') { + crypto.getRandomValues(array); + } else { + for (let i = 0; i < array.length; i++) { + array[i] = Math.floor(Math.random() * 256); + } + } + + return Array.from(array, b => b.toString(16).padStart(2, '0')).join(''); +} + +function openUrl(url: string): void { + let command: string; + + if (process.platform === 'darwin') { + command = 'open'; + } else if (process.platform === 'win32') { + command = 'start'; + } else { + command = 'xdg-open'; + } + + exec(`${command} "${url}"`); +} + +export async function obtainAtlassianOAuthTokens( + options: ObtainAtlassianOAuthTokensOptions, +): Promise { + const { clientId, clientSecret, redirectUri, scope, openBrowser = false } = options; + const state = options.state ?? randomState(); + + const authUrl = buildAtlassianAuthUrl({ clientId, redirectUri, scope, state }); + const parsedRedirect = new URL(redirectUri); + const host = parsedRedirect.hostname || 'localhost'; + const port = parsedRedirect.port ? parseInt(parsedRedirect.port, 10) : 8765; + const path = parsedRedirect.pathname || '/callback'; + + return new Promise((resolve, reject) => { + const timeout = setTimeout(() => { + server.close(); + reject(new Error('OAuth callback timeout')); + }, CALLBACK_TIMEOUT_MS); + + const server = createServer((req: IncomingMessage, res: ServerResponse) => { + const requestUrl = req.url ?? ''; + const [pathname, query] = requestUrl.split('?'); + + if (pathname !== path && pathname !== `${path}/`) { + res.writeHead(404); + res.end(); + + return; + } + + const params = new URLSearchParams(query); + const code = params.get('code'); + const receivedState = params.get('state'); + + if (!code || receivedState !== state) { + res.writeHead(400); + res.end('Invalid state or missing code'); + server.close(); + clearTimeout(timeout); + reject(new Error('Invalid state or missing code')); + + return; + } + + res.writeHead(200, { 'Content-Type': 'text/html' }); + res.end('

Authorization successful, you can close this window.

'); + server.close(); + clearTimeout(timeout); + + fetch(TOKEN_URL, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + grant_type: 'authorization_code', + client_id: clientId, + client_secret: clientSecret, + code, + redirect_uri: redirectUri, + }), + }) + .then(r => { + if (!r.ok) { + return r.text().then(t => { + throw new Error(`Token exchange failed: ${r.status} ${t}`); + }); + } + + return r.json(); + }) + .then((data: { access_token: string; expires_in: number; scope: string; refresh_token?: string }) => { + resolve({ + accessToken: data.access_token, + expiresIn: data.expires_in, + scope: data.scope, + refreshToken: data.refresh_token, + }); + }) + .catch(reject); + }); + + server.listen(port, host, () => { + if (openBrowser) { + openUrl(authUrl); + } + }); + + server.on('error', err => { + clearTimeout(timeout); + reject(err); + }); + }); +} diff --git a/packages/core/src/oauth/parseAtlassianCallbackUrl.ts b/packages/core/src/oauth/parseAtlassianCallbackUrl.ts new file mode 100644 index 00000000..5e2b7dbe --- /dev/null +++ b/packages/core/src/oauth/parseAtlassianCallbackUrl.ts @@ -0,0 +1,16 @@ +export interface AtlassianCallbackParams { + code: string; + state: string; +} + +export function parseAtlassianCallbackUrl(url: string): AtlassianCallbackParams | null { + const parsed = new URL(url); + const code = parsed.searchParams.get('code'); + const state = parsed.searchParams.get('state'); + + if (!code || !state) { + return null; + } + + return { code, state }; +} diff --git a/packages/core/src/oauth/refreshAtlassianOAuthTokens.ts b/packages/core/src/oauth/refreshAtlassianOAuthTokens.ts new file mode 100644 index 00000000..0102c557 --- /dev/null +++ b/packages/core/src/oauth/refreshAtlassianOAuthTokens.ts @@ -0,0 +1,44 @@ +import type { AtlassianOAuthTokens } from './obtainAtlassianOAuthTokens.js'; + +const TOKEN_URL = 'https://auth.atlassian.com/oauth/token'; + +export interface RefreshAtlassianOAuthTokensOptions { + clientId: string; + clientSecret: string; + refreshToken: string; +} + +export async function refreshAtlassianOAuthTokens( + options: RefreshAtlassianOAuthTokensOptions, +): Promise { + const { clientId, clientSecret, refreshToken } = options; + const response = await fetch(TOKEN_URL, { + method: 'POST', + headers: { 'Content-Type': 'application/json' }, + body: JSON.stringify({ + grant_type: 'refresh_token', + client_id: clientId, + client_secret: clientSecret, + refresh_token: refreshToken, + }), + }); + + if (!response.ok) { + const text = await response.text(); + throw new Error(`Token refresh failed: ${response.status} ${text}`); + } + + const data = (await response.json()) as { + access_token: string; + expires_in: number; + scope: string; + refresh_token?: string; + }; + + return { + accessToken: data.access_token, + expiresIn: data.expires_in, + scope: data.scope, + refreshToken: data.refresh_token, + }; +} diff --git a/packages/core/src/schemas/auth.ts b/packages/core/src/schemas/auth.ts new file mode 100644 index 00000000..6c1a0654 --- /dev/null +++ b/packages/core/src/schemas/auth.ts @@ -0,0 +1,33 @@ +import { z } from 'zod'; + +export const authBasicSchema = z.object({ + type: z.literal('basic'), + email: z.string().email(), + apiToken: z.string().min(1), +}); + +export const authBearerTokenSchema = z.object({ + type: z.literal('bearer'), + token: z.string().min(1), +}); + +export const authBearerProviderSchema = z.object({ + type: z.literal('bearer'), + getToken: z.custom<() => Promise>(val => typeof val === 'function', { + message: 'getToken must be a function', + }), +}); + +export const authBearerSchema = z.union([authBearerTokenSchema, authBearerProviderSchema]); + +export const authSchema = z.union([authBasicSchema, authBearerSchema]); + +export type AuthBasic = z.infer; + +export type AuthBearerToken = z.infer; + +export type AuthBearerProvider = z.infer; + +export type AuthBearer = z.infer; + +export type Auth = z.infer; diff --git a/packages/core/src/schemas/clientConfig.ts b/packages/core/src/schemas/clientConfig.ts new file mode 100644 index 00000000..98840cf7 --- /dev/null +++ b/packages/core/src/schemas/clientConfig.ts @@ -0,0 +1,30 @@ +import { z } from 'zod'; +import { authSchema } from './auth.js'; + +export const transientRetrySchema = z.object({ + /** Total number of attempts including the first. Default: 1 (no retries). */ + maxAttempts: z.number().int().positive().optional(), + /** Delay before the first retry in ms. Default: 500. */ + initialDelayMs: z.number().int().nonnegative().optional(), + /** Exponential backoff multiplier. Default: 2. */ + backoffFactor: z.number().positive().optional(), +}); + +export type TransientRetryConfig = z.infer; + +export const clientConfigSchema = z.object({ + host: z.url(), + auth: authSchema.optional(), + headers: z.record(z.string(), z.string()).optional(), + getAuthOn401: z.custom<() => Promise>>(val => typeof val === 'function').optional(), + /** + * Opt-in retry for transient transport failures only — network errors + * (ECONNRESET, ETIMEDOUT, ENOTFOUND, EAI_AGAIN, EPIPE, UND_ERR_SOCKET, + * ERR_SSL_*) and HTTP 502/503/504. Never retries 4xx (including 401, 429) + * or 5xx other than 502/503/504 — those signal client or server logic and + * masking them would hide real regressions. Disabled by default. + */ + retry: transientRetrySchema.optional(), +}); + +export type ClientConfig = z.infer; diff --git a/packages/core/src/schemas/httpMethod.ts b/packages/core/src/schemas/httpMethod.ts new file mode 100644 index 00000000..17c5f540 --- /dev/null +++ b/packages/core/src/schemas/httpMethod.ts @@ -0,0 +1,5 @@ +import { z } from 'zod'; + +export const httpMethodSchema = z.enum(['GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'HEAD', 'OPTIONS']); + +export type HttpMethod = z.infer; diff --git a/packages/core/src/schemas/index.ts b/packages/core/src/schemas/index.ts new file mode 100644 index 00000000..fefb9a55 --- /dev/null +++ b/packages/core/src/schemas/index.ts @@ -0,0 +1,15 @@ +export { httpMethodSchema } from './httpMethod.js'; + +export type { HttpMethod } from './httpMethod.js'; + +export { authSchema } from './auth.js'; + +export type { Auth } from './auth.js'; + +export { clientConfigSchema } from './clientConfig.js'; + +export type { ClientConfig } from './clientConfig.js'; + +export { sendRequestOptionsSchema } from './sendRequestOptions.js'; + +export type { SendRequestOptions } from './sendRequestOptions.js'; diff --git a/packages/core/src/schemas/sendRequestOptions.ts b/packages/core/src/schemas/sendRequestOptions.ts new file mode 100644 index 00000000..03d3899e --- /dev/null +++ b/packages/core/src/schemas/sendRequestOptions.ts @@ -0,0 +1,14 @@ +import { z } from 'zod'; +import { httpMethodSchema } from './httpMethod.js'; + +export const sendRequestOptionsSchema = z.object({ + url: z.string(), + method: httpMethodSchema.optional(), + headers: z.record(z.string(), z.string()).optional(), + body: z.unknown().optional(), + searchParams: z.record(z.string(), z.unknown()).optional(), +}); + +export type SendRequestOptions = z.infer & { + schema?: z.ZodType; +}; diff --git a/packages/core/src/sendRequest.ts b/packages/core/src/sendRequest.ts new file mode 100644 index 00000000..05288385 --- /dev/null +++ b/packages/core/src/sendRequest.ts @@ -0,0 +1,71 @@ +import { bodyToFetchBody, requiresDuplex, shouldSetJsonContentType } from './bodyToFetchBody.js'; +import { ApiError } from './apiError.js'; +import type { SendRequestOptions } from './schemas/index.js'; +import { buildUrlWithSearchParams } from './serializeSearchParams.js'; + +export async function sendRequest(options: SendRequestOptions): Promise { + const { url, method = 'GET', headers = {}, body, searchParams, schema } = options; + const fullUrl = buildUrlWithSearchParams(url, searchParams); + const init: RequestInit = { + method, + headers: { + ...(shouldSetJsonContentType(body) ? { 'Content-Type': 'application/json' } : {}), + ...headers, + }, + }; + + if (body !== undefined && method !== 'GET') { + init.body = bodyToFetchBody(body) as BodyInit; + + if (requiresDuplex(body)) { + (init as RequestInit & { duplex?: 'half' }).duplex = 'half'; + } + } + + const response = await fetch(fullUrl, init); + + if (!response.ok) { + const text = await response.text(); + let detail: unknown = text; + try { + detail = JSON.parse(text); + } catch { + // + } + throw new ApiError( + `Request failed: ${response.status} ${response.statusText}`, + response.status, + response.statusText, + detail, + ); + } + + const contentType = response.headers.get('content-type'); + + if (contentType?.includes('application/json')) { + let json: unknown; + try { + json = await response.json(); + } catch (e) { + if (e instanceof SyntaxError) { + return undefined as T; + } + + throw e; + } + + if (schema && json !== undefined) { + return schema.parse(json) as T; + } + + return json as T; + } + + const text = await response.text(); + + if (schema) { + throw new ApiError('Schema provided but response is not JSON', 0, '', text); + } + + return text as T; +} diff --git a/packages/core/src/serializeSearchParams.ts b/packages/core/src/serializeSearchParams.ts new file mode 100644 index 00000000..bafd5e90 --- /dev/null +++ b/packages/core/src/serializeSearchParams.ts @@ -0,0 +1,61 @@ +export function serializeSearchParamValue(value: unknown): string | undefined { + if (value === undefined || value === null) { + return undefined; + } + + if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') { + return String(value); + } + + if (Array.isArray(value)) { + if (value.length === 0) { + return undefined; + } + + if (value.every((item): item is string => typeof item === 'string')) { + return value.join(','); + } + + return JSON.stringify(value); + } + + if (typeof value === 'object') { + return JSON.stringify(value); + } + + return String(value); +} + +export function buildUrlWithSearchParams(baseUrl: string, searchParams?: Record): string { + if (!searchParams || Object.keys(searchParams).length === 0) { + return baseUrl; + } + + const params = new URLSearchParams(); + + for (const [key, value] of Object.entries(searchParams)) { + if (Array.isArray(value)) { + for (const item of value) { + if (item !== undefined && item !== null) { + params.append(key, String(item)); + } + } + } else { + const serialized = serializeSearchParamValue(value); + + if (serialized !== undefined) { + params.set(key, serialized); + } + } + } + + const query = params.toString(); + + if (!query) { + return baseUrl; + } + + const separator = baseUrl.includes('?') ? '&' : '?'; + + return `${baseUrl}${separator}${query}`; +} diff --git a/packages/core/src/withRetry.ts b/packages/core/src/withRetry.ts new file mode 100644 index 00000000..0d8de7e8 --- /dev/null +++ b/packages/core/src/withRetry.ts @@ -0,0 +1,56 @@ +import { ApiError } from './apiError.js'; + +const RETRYABLE_STATUS_CODES = new Set([429, 502, 503, 504]); + +export interface RetryOptions { + /** Total number of attempts including the first. Default: 3. */ + maxAttempts?: number; + /** Delay before the first retry in milliseconds. Default: 1000. */ + initialDelayMs?: number; + /** Exponential backoff multiplier. Default: 2. */ + backoffFactor?: number; +} + +/** + * Wraps an async operation with automatic retry on retriable HTTP errors. + * + * Retries only on: 429, 502, 503, 504. Never retries 401, 403, 404, 500, + * or network TypeError. + * + * @stable + * + * @example + * ```typescript + * const issue = await withRetry( + * () => client.issues.getIssue({ issueIdOrKey: 'PROJ-1' }), + * { maxAttempts: 4, initialDelayMs: 500 }, + * ); + * ``` + */ +export async function withRetry( + operation: () => Promise, + options: RetryOptions = {}, +): Promise { + const { maxAttempts = 3, initialDelayMs = 1000, backoffFactor = 2 } = options; + let lastError: unknown; + let delayMs = initialDelayMs; + + for (let attempt = 1; attempt <= maxAttempts; attempt++) { + try { + return await operation(); + } catch (err) { + lastError = err; + + const isRetryable = err instanceof ApiError && RETRYABLE_STATUS_CODES.has(err.status); + + if (!isRetryable || attempt === maxAttempts) { + throw err; + } + + await new Promise(resolve => setTimeout(resolve, delayMs)); + delayMs = Math.round(delayMs * backoffFactor); + } + } + + throw lastError; +} diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json new file mode 100644 index 00000000..4e2f9872 --- /dev/null +++ b/packages/core/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist" + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/core/vite.config.ts b/packages/core/vite.config.ts new file mode 100644 index 00000000..c6b36a1d --- /dev/null +++ b/packages/core/vite.config.ts @@ -0,0 +1,33 @@ +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { defineConfig } from 'vite'; +import { externalizeDeps } from 'vite-plugin-externalize-deps'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const srcRoot = resolve(__dirname, 'src'); +const distRoot = resolve(__dirname, 'dist'); + +export default defineConfig({ + plugins: [externalizeDeps()], + build: { + ssr: true, + copyPublicDir: false, + emptyOutDir: true, + sourcemap: true, + lib: { + entry: resolve(__dirname, 'src/index.ts'), + }, + rolldownOptions: { + output: [ + { + format: 'es', + dir: distRoot, + entryFileNames: '[name].js', + chunkFileNames: '[name].js', + preserveModules: true, + preserveModulesRoot: srcRoot, + }, + ], + }, + }, +}); diff --git a/packages/legacy/package.json b/packages/legacy/package.json new file mode 100644 index 00000000..432f1939 --- /dev/null +++ b/packages/legacy/package.json @@ -0,0 +1,43 @@ +{ + "name": "@confluence.js/legacy", + "version": "0.0.1", + "private": true, + "description": "Confluence Cloud REST API v1 client (legacy)", + "type": "module", + "sideEffects": false, + "main": "./dist/index.js", + "types": "./dist/index.d.ts", + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + }, + "./package.json": "./package.json" + }, + "files": [ + "dist" + ], + "scripts": { + "build": "vite build && tsc --emitDeclarationOnly && tsc-alias --resolve-full-paths", + "test": "vitest run", + "test:unit": "vitest run tests/unit", + "test:integration": "vitest run tests/integration --bail=1 --hookTimeout 100000 --testTimeout 100000", + "prettier": "prettier --write src", + "replace:wiki-rest": "grep -rl '/wiki/rest' src/api | xargs sed -i '' 's|/wiki/rest||g'", + "replace:all": "pnpm run replace:wiki-rest" + }, + "dependencies": { + "@atlassian/atlassian-jwt": "^2.2.0", + "axios": "^1.10.0", + "form-data": "^4.0.3", + "oauth": "^0.10.2", + "zod": "^3.25.76" + }, + "devDependencies": { + "@types/express": "^4.17.23", + "@types/oauth": "^0.9.6" + }, + "engines": { + "node": ">=22" + } +} diff --git a/src/api/analytics.ts b/packages/legacy/src/api/analytics.ts similarity index 85% rename from src/api/analytics.ts rename to packages/legacy/src/api/analytics.ts index 4a279487..f9bc594d 100644 --- a/src/api/analytics.ts +++ b/packages/legacy/src/api/analytics.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class Analytics { constructor(private client: Client) {} diff --git a/src/api/audit.ts b/packages/legacy/src/api/audit.ts similarity index 97% rename from src/api/audit.ts rename to packages/legacy/src/api/audit.ts index 7d20efd9..d631173c 100644 --- a/src/api/audit.ts +++ b/packages/legacy/src/api/audit.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class Audit { constructor(private client: Client) {} diff --git a/src/api/content.ts b/packages/legacy/src/api/content.ts similarity index 98% rename from src/api/content.ts rename to packages/legacy/src/api/content.ts index 86fb8106..5940fd3b 100644 --- a/src/api/content.ts +++ b/packages/legacy/src/api/content.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class Content { constructor(private client: Client) {} diff --git a/src/api/contentAttachments.ts b/packages/legacy/src/api/contentAttachments.ts similarity index 97% rename from src/api/contentAttachments.ts rename to packages/legacy/src/api/contentAttachments.ts index 2f9937d0..79017c09 100644 --- a/src/api/contentAttachments.ts +++ b/packages/legacy/src/api/contentAttachments.ts @@ -1,10 +1,10 @@ /* eslint-disable @typescript-eslint/no-unnecessary-condition */ import FormData from 'form-data'; -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class ContentAttachments { constructor(private client: Client) {} diff --git a/src/api/contentBody.ts b/packages/legacy/src/api/contentBody.ts similarity index 97% rename from src/api/contentBody.ts rename to packages/legacy/src/api/contentBody.ts index a76c40bc..6afba4b9 100644 --- a/src/api/contentBody.ts +++ b/packages/legacy/src/api/contentBody.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class ContentBody { constructor(private client: Client) {} diff --git a/src/api/contentChildrenAndDescendants.ts b/packages/legacy/src/api/contentChildrenAndDescendants.ts similarity index 98% rename from src/api/contentChildrenAndDescendants.ts rename to packages/legacy/src/api/contentChildrenAndDescendants.ts index a5985464..f10c8f81 100644 --- a/src/api/contentChildrenAndDescendants.ts +++ b/packages/legacy/src/api/contentChildrenAndDescendants.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class ContentChildrenAndDescendants { constructor(private client: Client) {} diff --git a/src/api/contentComments.ts b/packages/legacy/src/api/contentComments.ts similarity index 85% rename from src/api/contentComments.ts rename to packages/legacy/src/api/contentComments.ts index 5fd67382..7537ae1e 100644 --- a/src/api/contentComments.ts +++ b/packages/legacy/src/api/contentComments.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Callback } from '../callback'; -import type { Client } from '../clients'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Callback } from '../callback.js'; +import type { Client } from '../clients/index.js'; +import type { RequestConfig } from '../requestConfig.js'; /** @deprecated Will be removed in next major version. */ export class ContentComments { diff --git a/src/api/contentLabels.ts b/packages/legacy/src/api/contentLabels.ts similarity index 96% rename from src/api/contentLabels.ts rename to packages/legacy/src/api/contentLabels.ts index 60a90a44..7ca924bc 100644 --- a/src/api/contentLabels.ts +++ b/packages/legacy/src/api/contentLabels.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class ContentLabels { constructor(private client: Client) {} diff --git a/src/api/contentMacroBody.ts b/packages/legacy/src/api/contentMacroBody.ts similarity index 98% rename from src/api/contentMacroBody.ts rename to packages/legacy/src/api/contentMacroBody.ts index a6b969a0..b92ea066 100644 --- a/src/api/contentMacroBody.ts +++ b/packages/legacy/src/api/contentMacroBody.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class ContentMacroBody { constructor(private client: Client) {} diff --git a/src/api/contentPermissions.ts b/packages/legacy/src/api/contentPermissions.ts similarity index 89% rename from src/api/contentPermissions.ts rename to packages/legacy/src/api/contentPermissions.ts index 87283425..6540114d 100644 --- a/src/api/contentPermissions.ts +++ b/packages/legacy/src/api/contentPermissions.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class ContentPermissions { constructor(private client: Client) {} diff --git a/src/api/contentProperties.ts b/packages/legacy/src/api/contentProperties.ts similarity index 97% rename from src/api/contentProperties.ts rename to packages/legacy/src/api/contentProperties.ts index 109ff46d..c75767b7 100644 --- a/src/api/contentProperties.ts +++ b/packages/legacy/src/api/contentProperties.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Callback } from '../callback'; -import type { Client } from '../clients'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Callback } from '../callback.js'; +import type { Client } from '../clients/index.js'; +import type { RequestConfig } from '../requestConfig.js'; /** @deprecated Will be removed in next major version. */ export class ContentProperties { diff --git a/src/api/contentRestrictions.ts b/packages/legacy/src/api/contentRestrictions.ts similarity index 77% rename from src/api/contentRestrictions.ts rename to packages/legacy/src/api/contentRestrictions.ts index ef8346ad..4b910112 100644 --- a/src/api/contentRestrictions.ts +++ b/packages/legacy/src/api/contentRestrictions.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class ContentRestrictions { constructor(private client: Client) {} @@ -217,120 +217,6 @@ export class ContentRestrictions { return this.client.sendRequest(config, callback); } - /** - * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a - * `read` restriction for the `admins` group, the following request will return `true`: - * - * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/group/admins` - * - * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for - * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence - * permissions](https://confluence.atlassian.com/x/_AozKw). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - * - * @deprecated Will be removed in next major version. - */ - async getContentRestrictionStatusForGroup( - parameters: Parameters.GetContentRestrictionStatusForGroup, - callback: Callback, - ): Promise; - /** - * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a - * `read` restriction for the `admins` group, the following request will return `true`: - * - * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/group/admins` - * - * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for - * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence - * permissions](https://confluence.atlassian.com/x/_AozKw). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - * - * @deprecated Will be removed in next major version. - */ - async getContentRestrictionStatusForGroup( - parameters: Parameters.GetContentRestrictionStatusForGroup, - callback?: never, - ): Promise; - async getContentRestrictionStatusForGroup( - parameters: Parameters.GetContentRestrictionStatusForGroup, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/group/${parameters.groupName}`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds a group to a content restriction. That is, grant read or update permission to the group for a piece of - * content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - * - * @deprecated Will be removed in next major version. - */ - async addGroupToContentRestriction( - parameters: Parameters.AddGroupToContentRestriction, - callback: Callback, - ): Promise; - /** - * Adds a group to a content restriction. That is, grant read or update permission to the group for a piece of - * content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - * - * @deprecated Will be removed in next major version. - */ - async addGroupToContentRestriction( - parameters: Parameters.AddGroupToContentRestriction, - callback?: never, - ): Promise; - async addGroupToContentRestriction( - parameters: Parameters.AddGroupToContentRestriction, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/group/${parameters.groupName}`, - method: 'PUT', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of - * content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - * - * @deprecated Will be removed in next major version. - */ - async removeGroupByName(parameters: Parameters.RemoveGroupByName, callback: Callback): Promise; - /** - * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of - * content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - * - * @deprecated Will be removed in next major version. - */ - async removeGroupByName(parameters: Parameters.RemoveGroupByName, callback?: never): Promise; - async removeGroupByName( - parameters: Parameters.RemoveGroupByName, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/group/${parameters.groupName}`, - method: 'DELETE', - }; - - return this.client.sendRequest(config, callback); - } - /** * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a * `read` restriction for the `123456` group id, the following request will return `true`: diff --git a/src/api/contentStates.ts b/packages/legacy/src/api/contentStates.ts similarity index 97% rename from src/api/contentStates.ts rename to packages/legacy/src/api/contentStates.ts index ce2f69ff..6fb83619 100644 --- a/src/api/contentStates.ts +++ b/packages/legacy/src/api/contentStates.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class ContentStates { constructor(private client: Client) {} diff --git a/src/api/contentVersions.ts b/packages/legacy/src/api/contentVersions.ts similarity index 95% rename from src/api/contentVersions.ts rename to packages/legacy/src/api/contentVersions.ts index 29ef35c6..fd933308 100644 --- a/src/api/contentVersions.ts +++ b/packages/legacy/src/api/contentVersions.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class ContentVersions { constructor(private client: Client) {} diff --git a/src/api/contentWatches.ts b/packages/legacy/src/api/contentWatches.ts similarity index 98% rename from src/api/contentWatches.ts rename to packages/legacy/src/api/contentWatches.ts index 5c16d9b0..df372d2f 100644 --- a/src/api/contentWatches.ts +++ b/packages/legacy/src/api/contentWatches.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class ContentWatches { constructor(private client: Client) {} diff --git a/src/api/dynamicModules.ts b/packages/legacy/src/api/dynamicModules.ts similarity index 93% rename from src/api/dynamicModules.ts rename to packages/legacy/src/api/dynamicModules.ts index 63c1fe93..b20b7556 100644 --- a/src/api/dynamicModules.ts +++ b/packages/legacy/src/api/dynamicModules.ts @@ -1,7 +1,7 @@ -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class DynamicModules { constructor(private client: Client) {} diff --git a/packages/legacy/src/api/experimental.ts b/packages/legacy/src/api/experimental.ts new file mode 100644 index 00000000..ca8fafdf --- /dev/null +++ b/packages/legacy/src/api/experimental.ts @@ -0,0 +1,145 @@ +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; + +export class Experimental { + constructor(private client: Client) {} + + /** + * Moves a pagetree rooted at a page to the space's trash: + * + * - If the content's type is `page` and its status is `current`, it will be trashed including all its descendants. + * - For every other combination of content type and status, this API is not supported. + * + * This API accepts the pageTree delete request and returns a task ID. The delete process happens asynchronously. + * + * Use the `/longtask/` REST API to get the copy task status. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the + * content is in. + */ + async deletePageTree( + parameters: Parameters.DeletePageTree, + callback: Callback, + ): Promise; + /** + * Moves a pagetree rooted at a page to the space's trash: + * + * - If the content's type is `page` and its status is `current`, it will be trashed including all its descendants. + * - For every other combination of content type and status, this API is not supported. + * + * This API accepts the pageTree delete request and returns a task ID. The delete process happens asynchronously. + * + * Use the `/longtask/` REST API to get the copy task status. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the + * content is in. + */ + async deletePageTree(parameters: Parameters.DeletePageTree, callback?: never): Promise; + async deletePageTree( + parameters: Parameters.DeletePageTree, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/api/content/${parameters.id}/pageTree`, + method: 'DELETE', + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different + * types of labels. + */ + async getLabelsForSpace( + parameters: Parameters.GetLabelsForSpace, + callback: Callback, + ): Promise; + /** + * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different + * types of labels. + */ + async getLabelsForSpace( + parameters: Parameters.GetLabelsForSpace, + callback?: never, + ): Promise; + async getLabelsForSpace( + parameters: Parameters.GetLabelsForSpace, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/api/space/${parameters.spaceKey}/label`, + method: 'GET', + params: { + prefix: parameters.prefix, + start: parameters.start, + limit: parameters.limit, + }, + }; + + return this.client.sendRequest(config, callback); + } + + /** + * Adds labels to a piece of content. Does not modify the existing labels. + * + * Notes: + * + * - Labels can also be added when creating content ([Create content](#api-content-post)). + * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing + * labels and replace them with the labels in the request. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async addLabelsToSpace( + parameters: Parameters.AddLabelsToSpace, + callback: Callback, + ): Promise; + /** + * Adds labels to a piece of content. Does not modify the existing labels. + * + * Notes: + * + * - Labels can also be added when creating content ([Create content](#api-content-post)). + * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing + * labels and replace them with the labels in the request. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ + async addLabelsToSpace(parameters: Parameters.AddLabelsToSpace, callback?: never): Promise; + async addLabelsToSpace( + parameters: Parameters.AddLabelsToSpace, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/api/space/${parameters.spaceKey}/label`, + method: 'POST', + }; + + return this.client.sendRequest(config, callback); + } + + async deleteLabelFromSpace( + parameters: Parameters.DeleteLabelFromSpace, + callback: Callback, + ): Promise; + async deleteLabelFromSpace(parameters: Parameters.DeleteLabelFromSpace, callback?: never): Promise; + async deleteLabelFromSpace( + parameters: Parameters.DeleteLabelFromSpace, + callback?: Callback, + ): Promise { + const config: RequestConfig = { + url: `/api/space/${parameters.spaceKey}/label`, + method: 'DELETE', + params: { + name: parameters.name, + prefix: parameters.prefix, + }, + }; + + return this.client.sendRequest(config, callback); + } +} diff --git a/src/api/group.ts b/packages/legacy/src/api/group.ts similarity index 62% rename from src/api/group.ts rename to packages/legacy/src/api/group.ts index dd43c205..c4f475ab 100644 --- a/src/api/group.ts +++ b/packages/legacy/src/api/group.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class Group { constructor(private client: Client) {} @@ -68,73 +68,6 @@ export class Group { return this.client.sendRequest(config, callback); } - /** - * Delete user group. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. - * - * @deprecated Will be removed in next major version. - */ - async removeGroup(parameters: Parameters.RemoveGroup, callback: Callback): Promise; - /** - * Delete user group. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. - * - * @deprecated Will be removed in next major version. - */ - async removeGroup(parameters: Parameters.RemoveGroup, callback?: never): Promise; - async removeGroup(parameters: Parameters.RemoveGroup, callback?: Callback): Promise { - const config: RequestConfig = { - url: '/api/group', - method: 'DELETE', - params: { - name: parameters.name, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns a user group for a given group name. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. - */ - async getGroupByQueryParam( - parameters: Parameters.GetGroupByQueryParam, - callback: Callback, - ): Promise; - /** - * Returns a user group for a given group name. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. - */ - async getGroupByQueryParam( - parameters: Parameters.GetGroupByQueryParam, - callback?: never, - ): Promise; - async getGroupByQueryParam( - parameters: Parameters.GetGroupByQueryParam, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/group/by-name', - method: 'GET', - params: { - name: parameters.name, - }, - }; - - return this.client.sendRequest(config, callback); - } - /** * Returns a user group for a given group id. * @@ -191,82 +124,6 @@ export class Group { return this.client.sendRequest(config, callback); } - /** - * Returns a user group for a given group name. - * - * Use updated Get group API - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. - */ - async getGroupByName(parameters: Parameters.GetGroupByName, callback: Callback): Promise; - /** - * Returns a user group for a given group name. - * - * Use updated Get group API - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. - */ - async getGroupByName(parameters: Parameters.GetGroupByName, callback?: never): Promise; - async getGroupByName( - parameters: Parameters.GetGroupByName, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/group/${parameters.groupName}`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the users that are members of a group. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. - */ - async getMembersByQueryParam( - parameters: Parameters.GetMembersByQueryParam, - callback: Callback, - ): Promise; - /** - * Returns the users that are members of a group. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. - */ - async getMembersByQueryParam( - parameters: Parameters.GetMembersByQueryParam, - callback?: never, - ): Promise; - async getMembersByQueryParam( - parameters: Parameters.GetMembersByQueryParam, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/group/member', - method: 'GET', - params: { - name: parameters.name, - start: parameters.start, - limit: parameters.limit, - shouldReturnTotalSize: parameters.shouldReturnTotalSize, - }, - }; - - return this.client.sendRequest(config, callback); - } - /** Get search results of groups by partial query provided. */ async searchGroups( parameters: Parameters.SearchGroups, @@ -461,45 +318,4 @@ export class Group { return this.client.sendRequest(config, callback); } - - /** - * Returns the users that are members of a group. - * - * Use updated Get group API - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. Use `group.getGroupMembersByGroupId` - */ - async getGroupMembers( - parameters: Parameters.GetGroupMembers, - callback: Callback, - ): Promise; - /** - * Returns the users that are members of a group. - * - * Use updated Get group API - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. Use `group.getGroupMembersByGroupId` - */ - async getGroupMembers(parameters: Parameters.GetGroupMembers, callback?: never): Promise; - async getGroupMembers( - parameters: Parameters.GetGroupMembers, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/group/${parameters.groupName}/member`, - method: 'GET', - params: { - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } } diff --git a/packages/legacy/src/api/index.ts b/packages/legacy/src/api/index.ts new file mode 100644 index 00000000..e69d2387 --- /dev/null +++ b/packages/legacy/src/api/index.ts @@ -0,0 +1,63 @@ +export * from './analytics.js'; + +export * from './audit.js'; + +export * from './content.js'; + +export * from './contentAttachments.js'; + +export * from './contentBody.js'; + +export * from './contentChildrenAndDescendants.js'; + +export * from './contentComments.js'; + +export * from './contentLabels.js'; + +export * from './contentMacroBody.js'; + +export * from './contentPermissions.js'; + +export * from './contentProperties.js'; + +export * from './contentRestrictions.js'; + +export * from './contentStates.js'; + +export * from './contentVersions.js'; + +export * from './contentWatches.js'; + +export * from './dynamicModules.js'; + +export * from './experimental.js'; + +export * from './group.js'; + +export * from './inlineTasks.js'; + +export * from './labelInfo.js'; + +export * from './longRunningTask.js'; + +export * from './relation.js'; + +export * from './search.js'; + +export * from './settings.js'; + +export * from './space.js'; + +export * from './spacePermissions.js'; + +export * from './spaceProperties.js'; + +export * from './spaceSettings.js'; + +export * from './template.js'; + +export * from './themes.js'; + +export * from './users.js'; + +export * from './userProperties.js'; diff --git a/src/api/inlineTasks.ts b/packages/legacy/src/api/inlineTasks.ts similarity index 94% rename from src/api/inlineTasks.ts rename to packages/legacy/src/api/inlineTasks.ts index 599699c0..30788984 100644 --- a/src/api/inlineTasks.ts +++ b/packages/legacy/src/api/inlineTasks.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Callback } from '../callback'; -import type { Client } from '../clients'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Callback } from '../callback.js'; +import type { Client } from '../clients/index.js'; +import type { RequestConfig } from '../requestConfig.js'; /** @deprecated Will be removed in next major version. */ export class InlineTasks { diff --git a/src/api/labelInfo.ts b/packages/legacy/src/api/labelInfo.ts similarity index 84% rename from src/api/labelInfo.ts rename to packages/legacy/src/api/labelInfo.ts index 72fc39e6..f0b8034e 100644 --- a/src/api/labelInfo.ts +++ b/packages/legacy/src/api/labelInfo.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class LabelInfo { constructor(private client: Client) {} diff --git a/src/api/longRunningTask.ts b/packages/legacy/src/api/longRunningTask.ts similarity index 91% rename from src/api/longRunningTask.ts rename to packages/legacy/src/api/longRunningTask.ts index f2a7e0b1..040e1316 100644 --- a/src/api/longRunningTask.ts +++ b/packages/legacy/src/api/longRunningTask.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class LongRunningTask { constructor(private client: Client) {} diff --git a/src/api/models/accountId.ts b/packages/legacy/src/api/models/accountId.ts similarity index 100% rename from src/api/models/accountId.ts rename to packages/legacy/src/api/models/accountId.ts diff --git a/src/api/models/accountIdEmailRecord.ts b/packages/legacy/src/api/models/accountIdEmailRecord.ts similarity index 100% rename from src/api/models/accountIdEmailRecord.ts rename to packages/legacy/src/api/models/accountIdEmailRecord.ts diff --git a/src/api/models/accountIdEmailRecordArray.ts b/packages/legacy/src/api/models/accountIdEmailRecordArray.ts similarity index 94% rename from src/api/models/accountIdEmailRecordArray.ts rename to packages/legacy/src/api/models/accountIdEmailRecordArray.ts index 3253ba21..4ba352be 100644 --- a/src/api/models/accountIdEmailRecordArray.ts +++ b/packages/legacy/src/api/models/accountIdEmailRecordArray.ts @@ -1,3 +1,3 @@ -import type { AccountIdEmailRecord } from './accountIdEmailRecord'; +import type { AccountIdEmailRecord } from './accountIdEmailRecord.js'; export type AccountIdEmailRecordArray = AccountIdEmailRecord[]; diff --git a/src/api/models/addContentRestriction.ts b/packages/legacy/src/api/models/addContentRestriction.ts similarity index 100% rename from src/api/models/addContentRestriction.ts rename to packages/legacy/src/api/models/addContentRestriction.ts diff --git a/src/api/models/addContentRestrictionUpdateArray.ts b/packages/legacy/src/api/models/addContentRestrictionUpdateArray.ts similarity index 93% rename from src/api/models/addContentRestrictionUpdateArray.ts rename to packages/legacy/src/api/models/addContentRestrictionUpdateArray.ts index 84d54eec..8d6af802 100644 --- a/src/api/models/addContentRestrictionUpdateArray.ts +++ b/packages/legacy/src/api/models/addContentRestrictionUpdateArray.ts @@ -1,3 +1,3 @@ -import type { AddContentRestriction } from './addContentRestriction'; +import type { AddContentRestriction } from './addContentRestriction.js'; export type AddContentRestrictionUpdateArray = AddContentRestriction[]; diff --git a/src/api/models/affectedObject.ts b/packages/legacy/src/api/models/affectedObject.ts similarity index 100% rename from src/api/models/affectedObject.ts rename to packages/legacy/src/api/models/affectedObject.ts diff --git a/src/api/models/appDescriptor.ts b/packages/legacy/src/api/models/appDescriptor.ts similarity index 98% rename from src/api/models/appDescriptor.ts rename to packages/legacy/src/api/models/appDescriptor.ts index b673672c..27307426 100644 --- a/src/api/models/appDescriptor.ts +++ b/packages/legacy/src/api/models/appDescriptor.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import type { Lifecycle } from './lifecycle'; +import type { Lifecycle } from './lifecycle.js'; export interface AppDescriptor { /** Defines the authentication type to use when signing requests between the host application and the connect app. */ diff --git a/src/api/models/asyncContentBody.ts b/packages/legacy/src/api/models/asyncContentBody.ts similarity index 85% rename from src/api/models/asyncContentBody.ts rename to packages/legacy/src/api/models/asyncContentBody.ts index c55b8895..f2046c0e 100644 --- a/src/api/models/asyncContentBody.ts +++ b/packages/legacy/src/api/models/asyncContentBody.ts @@ -1,6 +1,6 @@ -import type { EmbeddedContent } from './embeddedContent'; -import type { GenericLinks } from './genericLinks'; -import type { WebResourceDependencies } from './webResourceDependencies'; +import type { EmbeddedContent } from './embeddedContent.js'; +import type { GenericLinks } from './genericLinks.js'; +import type { WebResourceDependencies } from './webResourceDependencies.js'; export interface AsyncContentBody { value?: string; diff --git a/src/api/models/asyncId.ts b/packages/legacy/src/api/models/asyncId.ts similarity index 100% rename from src/api/models/asyncId.ts rename to packages/legacy/src/api/models/asyncId.ts diff --git a/src/api/models/attachment.ts b/packages/legacy/src/api/models/attachment.ts similarity index 85% rename from src/api/models/attachment.ts rename to packages/legacy/src/api/models/attachment.ts index fc2ecc6d..6354f4fa 100644 --- a/src/api/models/attachment.ts +++ b/packages/legacy/src/api/models/attachment.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import type { AttachmentMetadata } from './attachmentMetadata'; -import type { GenericLinks } from './genericLinks'; +import type { AttachmentMetadata } from './attachmentMetadata.js'; +import type { GenericLinks } from './genericLinks.js'; export interface Attachment { id: string; diff --git a/src/api/models/attachmentContainer.ts b/packages/legacy/src/api/models/attachmentContainer.ts similarity index 91% rename from src/api/models/attachmentContainer.ts rename to packages/legacy/src/api/models/attachmentContainer.ts index e069208c..1e91e6d6 100644 --- a/src/api/models/attachmentContainer.ts +++ b/packages/legacy/src/api/models/attachmentContainer.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import type { GenericLinks } from './genericLinks'; +import type { GenericLinks } from './genericLinks.js'; export interface AttachmentContainer { id: string; diff --git a/src/api/models/attachmentMetadata.ts b/packages/legacy/src/api/models/attachmentMetadata.ts similarity index 86% rename from src/api/models/attachmentMetadata.ts rename to packages/legacy/src/api/models/attachmentMetadata.ts index b3c20d90..f0cc2bc7 100644 --- a/src/api/models/attachmentMetadata.ts +++ b/packages/legacy/src/api/models/attachmentMetadata.ts @@ -1,4 +1,4 @@ -import type { GenericLinks } from './genericLinks'; +import type { GenericLinks } from './genericLinks.js'; export interface AttachmentMetadata { comment: string; diff --git a/src/api/models/auditRecord.ts b/packages/legacy/src/api/models/auditRecord.ts similarity index 78% rename from src/api/models/auditRecord.ts rename to packages/legacy/src/api/models/auditRecord.ts index 54198231..0314feda 100644 --- a/src/api/models/auditRecord.ts +++ b/packages/legacy/src/api/models/auditRecord.ts @@ -1,5 +1,5 @@ -import type { AffectedObject } from './affectedObject'; -import type { ChangedValue } from './changedValue'; +import type { AffectedObject } from './affectedObject.js'; +import type { ChangedValue } from './changedValue.js'; export interface AuditRecord { author: { diff --git a/src/api/models/auditRecordArray.ts b/packages/legacy/src/api/models/auditRecordArray.ts similarity index 56% rename from src/api/models/auditRecordArray.ts rename to packages/legacy/src/api/models/auditRecordArray.ts index 758eb1e8..ab1dbeed 100644 --- a/src/api/models/auditRecordArray.ts +++ b/packages/legacy/src/api/models/auditRecordArray.ts @@ -1,5 +1,5 @@ -import type { AuditRecord } from './auditRecord'; -import type { GenericLinks } from './genericLinks'; +import type { AuditRecord } from './auditRecord.js'; +import type { GenericLinks } from './genericLinks.js'; export interface AuditRecordArray { results: AuditRecord[]; diff --git a/src/api/models/auditRecordCreate.ts b/packages/legacy/src/api/models/auditRecordCreate.ts similarity index 93% rename from src/api/models/auditRecordCreate.ts rename to packages/legacy/src/api/models/auditRecordCreate.ts index 907c99a0..393b9075 100644 --- a/src/api/models/auditRecordCreate.ts +++ b/packages/legacy/src/api/models/auditRecordCreate.ts @@ -1,5 +1,5 @@ -import type { AffectedObject } from './affectedObject'; -import type { ChangedValue } from './changedValue'; +import type { AffectedObject } from './affectedObject.js'; +import type { ChangedValue } from './changedValue.js'; export interface AuditRecordCreate { /** diff --git a/src/api/models/availableContentStates.ts b/packages/legacy/src/api/models/availableContentStates.ts similarity index 77% rename from src/api/models/availableContentStates.ts rename to packages/legacy/src/api/models/availableContentStates.ts index c2381296..b713c922 100644 --- a/src/api/models/availableContentStates.ts +++ b/packages/legacy/src/api/models/availableContentStates.ts @@ -1,4 +1,4 @@ -import type { ContentState } from './contentState'; +import type { ContentState } from './contentState.js'; export interface AvailableContentStates { /** Space suggested content states that can be used in the space */ diff --git a/src/api/models/blueprintTemplate.ts b/packages/legacy/src/api/models/blueprintTemplate.ts similarity index 69% rename from src/api/models/blueprintTemplate.ts rename to packages/legacy/src/api/models/blueprintTemplate.ts index 56617e2a..e1775211 100644 --- a/src/api/models/blueprintTemplate.ts +++ b/packages/legacy/src/api/models/blueprintTemplate.ts @@ -1,6 +1,6 @@ -import type { ContentBody } from './contentBody'; -import type { GenericLinks } from './genericLinks'; -import type { Label } from './label'; +import type { ContentBody } from './contentBody.js'; +import type { GenericLinks } from './genericLinks.js'; +import type { Label } from './label.js'; export interface BlueprintTemplate { templateId: string; diff --git a/src/api/models/blueprintTemplateArray.ts b/packages/legacy/src/api/models/blueprintTemplateArray.ts similarity index 55% rename from src/api/models/blueprintTemplateArray.ts rename to packages/legacy/src/api/models/blueprintTemplateArray.ts index 75b32736..7dfdd545 100644 --- a/src/api/models/blueprintTemplateArray.ts +++ b/packages/legacy/src/api/models/blueprintTemplateArray.ts @@ -1,5 +1,5 @@ -import type { BlueprintTemplate } from './blueprintTemplate'; -import type { GenericLinks } from './genericLinks'; +import type { BlueprintTemplate } from './blueprintTemplate.js'; +import type { GenericLinks } from './genericLinks.js'; export interface BlueprintTemplateArray { results: BlueprintTemplate[]; diff --git a/src/api/models/breadcrumb.ts b/packages/legacy/src/api/models/breadcrumb.ts similarity index 100% rename from src/api/models/breadcrumb.ts rename to packages/legacy/src/api/models/breadcrumb.ts diff --git a/src/api/models/bulkUserLookup.ts b/packages/legacy/src/api/models/bulkUserLookup.ts similarity index 91% rename from src/api/models/bulkUserLookup.ts rename to packages/legacy/src/api/models/bulkUserLookup.ts index a9eeb534..a3f84173 100644 --- a/src/api/models/bulkUserLookup.ts +++ b/packages/legacy/src/api/models/bulkUserLookup.ts @@ -1,7 +1,7 @@ -import type { GenericLinks } from './genericLinks'; -import type { Icon } from './icon'; -import type { OperationCheckResult } from './operationCheckResult'; -import type { Space } from './space'; +import type { GenericLinks } from './genericLinks.js'; +import type { Icon } from './icon.js'; +import type { OperationCheckResult } from './operationCheckResult.js'; +import type { Space } from './space.js'; export interface BulkUserLookup { type: string; diff --git a/src/api/models/bulkUserLookupArray.ts b/packages/legacy/src/api/models/bulkUserLookupArray.ts similarity index 55% rename from src/api/models/bulkUserLookupArray.ts rename to packages/legacy/src/api/models/bulkUserLookupArray.ts index 9f4368b7..3cad6147 100644 --- a/src/api/models/bulkUserLookupArray.ts +++ b/packages/legacy/src/api/models/bulkUserLookupArray.ts @@ -1,5 +1,5 @@ -import type { BulkUserLookup } from './bulkUserLookup'; -import type { GenericLinks } from './genericLinks'; +import type { BulkUserLookup } from './bulkUserLookup.js'; +import type { GenericLinks } from './genericLinks.js'; export interface BulkUserLookupArray { results: BulkUserLookup[]; diff --git a/src/api/models/buttonLookAndFeel.ts b/packages/legacy/src/api/models/buttonLookAndFeel.ts similarity index 100% rename from src/api/models/buttonLookAndFeel.ts rename to packages/legacy/src/api/models/buttonLookAndFeel.ts diff --git a/src/api/models/changedValue.ts b/packages/legacy/src/api/models/changedValue.ts similarity index 100% rename from src/api/models/changedValue.ts rename to packages/legacy/src/api/models/changedValue.ts diff --git a/src/api/models/connectModules.ts b/packages/legacy/src/api/models/connectModules.ts similarity index 79% rename from src/api/models/connectModules.ts rename to packages/legacy/src/api/models/connectModules.ts index 15bf47d1..9d9fb7be 100644 --- a/src/api/models/connectModules.ts +++ b/packages/legacy/src/api/models/connectModules.ts @@ -1,4 +1,4 @@ -import type { AppDescriptor } from './appDescriptor'; +import type { AppDescriptor } from './appDescriptor.js'; /** * A list of app modules in the same format as the `modules` property in the [app diff --git a/src/api/models/container.ts b/packages/legacy/src/api/models/container.ts similarity index 100% rename from src/api/models/container.ts rename to packages/legacy/src/api/models/container.ts diff --git a/src/api/models/containerLookAndFeel.ts b/packages/legacy/src/api/models/containerLookAndFeel.ts similarity index 100% rename from src/api/models/containerLookAndFeel.ts rename to packages/legacy/src/api/models/containerLookAndFeel.ts diff --git a/src/api/models/containerSummary.ts b/packages/legacy/src/api/models/containerSummary.ts similarity index 100% rename from src/api/models/containerSummary.ts rename to packages/legacy/src/api/models/containerSummary.ts diff --git a/src/api/models/content.ts b/packages/legacy/src/api/models/content.ts similarity index 73% rename from src/api/models/content.ts rename to packages/legacy/src/api/models/content.ts index e8968524..3d75ef41 100644 --- a/src/api/models/content.ts +++ b/packages/legacy/src/api/models/content.ts @@ -1,13 +1,13 @@ -import type { Container } from './container'; -import type { ContentBody } from './contentBody'; -import type { ContentChildren } from './contentChildren'; -import type { ContentChildType } from './contentChildType'; -import type { ContentHistory } from './contentHistory'; -import type { ContentRestriction } from './contentRestriction'; -import type { GenericLinks } from './genericLinks'; -import type { OperationCheckResult } from './operationCheckResult'; -import type { Space } from './space'; -import type { Version } from './version'; +import type { Container } from './container.js'; +import type { ContentBody } from './contentBody.js'; +import type { ContentChildren } from './contentChildren.js'; +import type { ContentChildType } from './contentChildType.js'; +import type { ContentHistory } from './contentHistory.js'; +import type { ContentRestriction } from './contentRestriction.js'; +import type { GenericLinks } from './genericLinks.js'; +import type { OperationCheckResult } from './operationCheckResult.js'; +import type { Space } from './space.js'; +import type { Version } from './version.js'; /** Base object for all content types. */ export interface Content { diff --git a/src/api/models/contentArray.ts b/packages/legacy/src/api/models/contentArray.ts similarity index 58% rename from src/api/models/contentArray.ts rename to packages/legacy/src/api/models/contentArray.ts index 65f21f54..92530fd6 100644 --- a/src/api/models/contentArray.ts +++ b/packages/legacy/src/api/models/contentArray.ts @@ -1,5 +1,5 @@ -import type { Content } from './content'; -import type { GenericLinks } from './genericLinks'; +import type { Content } from './content.js'; +import type { GenericLinks } from './genericLinks.js'; export interface ContentArray { results: T[]; diff --git a/src/api/models/contentBlueprintDraft.ts b/packages/legacy/src/api/models/contentBlueprintDraft.ts similarity index 100% rename from src/api/models/contentBlueprintDraft.ts rename to packages/legacy/src/api/models/contentBlueprintDraft.ts diff --git a/src/api/models/contentBody.ts b/packages/legacy/src/api/models/contentBody.ts similarity index 78% rename from src/api/models/contentBody.ts rename to packages/legacy/src/api/models/contentBody.ts index 017fbafc..52907481 100644 --- a/src/api/models/contentBody.ts +++ b/packages/legacy/src/api/models/contentBody.ts @@ -1,5 +1,5 @@ -import type { EmbeddedContent } from './embeddedContent'; -import type { WebResourceDependencies } from './webResourceDependencies'; +import type { EmbeddedContent } from './embeddedContent.js'; +import type { WebResourceDependencies } from './webResourceDependencies.js'; export interface ContentBody { value: string; diff --git a/src/api/models/contentBodyCreate.ts b/packages/legacy/src/api/models/contentBodyCreate.ts similarity index 100% rename from src/api/models/contentBodyCreate.ts rename to packages/legacy/src/api/models/contentBodyCreate.ts diff --git a/src/api/models/contentBodyCreateStorage.ts b/packages/legacy/src/api/models/contentBodyCreateStorage.ts similarity index 100% rename from src/api/models/contentBodyCreateStorage.ts rename to packages/legacy/src/api/models/contentBodyCreateStorage.ts diff --git a/src/api/models/contentChildType.ts b/packages/legacy/src/api/models/contentChildType.ts similarity index 89% rename from src/api/models/contentChildType.ts rename to packages/legacy/src/api/models/contentChildType.ts index 2d4a7d9f..ee1b152a 100644 --- a/src/api/models/contentChildType.ts +++ b/packages/legacy/src/api/models/contentChildType.ts @@ -1,4 +1,4 @@ -import type { GenericLinks } from './genericLinks'; +import type { GenericLinks } from './genericLinks.js'; /** * Shows whether a piece of content has attachments, comments, or child pages.* Note, this doesn't actually contain the diff --git a/src/api/models/contentChildren.ts b/packages/legacy/src/api/models/contentChildren.ts similarity index 67% rename from src/api/models/contentChildren.ts rename to packages/legacy/src/api/models/contentChildren.ts index c69e9d46..cf9928ff 100644 --- a/src/api/models/contentChildren.ts +++ b/packages/legacy/src/api/models/contentChildren.ts @@ -1,5 +1,5 @@ -import type { ContentArray } from './contentArray'; -import type { GenericLinks } from './genericLinks'; +import type { ContentArray } from './contentArray.js'; +import type { GenericLinks } from './genericLinks.js'; export interface ContentChildren { attachment?: ContentArray; diff --git a/src/api/models/contentCreate.ts b/packages/legacy/src/api/models/contentCreate.ts similarity index 97% rename from src/api/models/contentCreate.ts rename to packages/legacy/src/api/models/contentCreate.ts index 643764e0..5dd7b1a5 100644 --- a/src/api/models/contentCreate.ts +++ b/packages/legacy/src/api/models/contentCreate.ts @@ -1,4 +1,4 @@ -import type { ContentBodyCreate } from './contentBodyCreate'; +import type { ContentBodyCreate } from './contentBodyCreate.js'; export interface ContentCreate { /** The ID of the draft content. Required when publishing a draft. */ diff --git a/src/api/models/contentHistory.ts b/packages/legacy/src/api/models/contentHistory.ts similarity index 66% rename from src/api/models/contentHistory.ts rename to packages/legacy/src/api/models/contentHistory.ts index bdb79d23..becc0579 100644 --- a/src/api/models/contentHistory.ts +++ b/packages/legacy/src/api/models/contentHistory.ts @@ -1,7 +1,7 @@ -import type { GenericLinks } from './genericLinks'; -import type { User } from './user'; -import type { UsersUserKeys } from './usersUserKeys'; -import type { Version } from './version'; +import type { GenericLinks } from './genericLinks.js'; +import type { User } from './user.js'; +import type { UsersUserKeys } from './usersUserKeys.js'; +import type { Version } from './version.js'; export interface ContentHistory { latest: boolean; diff --git a/src/api/models/contentLookAndFeel.ts b/packages/legacy/src/api/models/contentLookAndFeel.ts similarity index 76% rename from src/api/models/contentLookAndFeel.ts rename to packages/legacy/src/api/models/contentLookAndFeel.ts index 27240ec7..f3cb2b0e 100644 --- a/src/api/models/contentLookAndFeel.ts +++ b/packages/legacy/src/api/models/contentLookAndFeel.ts @@ -1,5 +1,5 @@ -import type { ContainerLookAndFeel } from './containerLookAndFeel'; -import type { ScreenLookAndFeel } from './screenLookAndFeel'; +import type { ContainerLookAndFeel } from './containerLookAndFeel.js'; +import type { ScreenLookAndFeel } from './screenLookAndFeel.js'; export interface ContentLookAndFeel { screen: ScreenLookAndFeel; diff --git a/src/api/models/contentPermissionRequest.ts b/packages/legacy/src/api/models/contentPermissionRequest.ts similarity index 92% rename from src/api/models/contentPermissionRequest.ts rename to packages/legacy/src/api/models/contentPermissionRequest.ts index 2534cb17..bc3b1f59 100644 --- a/src/api/models/contentPermissionRequest.ts +++ b/packages/legacy/src/api/models/contentPermissionRequest.ts @@ -1,4 +1,4 @@ -import type { PermissionSubjectWithGroupId } from './permissionSubjectWithGroupId'; +import type { PermissionSubjectWithGroupId } from './permissionSubjectWithGroupId.js'; /** This object represents the request for the content permission check API. */ export interface ContentPermissionRequest { diff --git a/src/api/models/contentProperty.ts b/packages/legacy/src/api/models/contentProperty.ts similarity index 75% rename from src/api/models/contentProperty.ts rename to packages/legacy/src/api/models/contentProperty.ts index a7db4388..bfac3ebd 100644 --- a/src/api/models/contentProperty.ts +++ b/packages/legacy/src/api/models/contentProperty.ts @@ -1,5 +1,5 @@ -import type { Content } from './content'; -import type { GenericLinks } from './genericLinks'; +import type { Content } from './content.js'; +import type { GenericLinks } from './genericLinks.js'; export interface ContentProperty { id: number; diff --git a/src/api/models/contentPropertyArray.ts b/packages/legacy/src/api/models/contentPropertyArray.ts similarity index 55% rename from src/api/models/contentPropertyArray.ts rename to packages/legacy/src/api/models/contentPropertyArray.ts index 49a3f369..d391cd58 100644 --- a/src/api/models/contentPropertyArray.ts +++ b/packages/legacy/src/api/models/contentPropertyArray.ts @@ -1,5 +1,5 @@ -import type { ContentProperty } from './contentProperty'; -import type { GenericLinks } from './genericLinks'; +import type { ContentProperty } from './contentProperty.js'; +import type { GenericLinks } from './genericLinks.js'; export interface ContentPropertyArray { results: ContentProperty[]; diff --git a/src/api/models/contentPropertyCreate.ts b/packages/legacy/src/api/models/contentPropertyCreate.ts similarity index 67% rename from src/api/models/contentPropertyCreate.ts rename to packages/legacy/src/api/models/contentPropertyCreate.ts index 6789b66c..3bba45a5 100644 --- a/src/api/models/contentPropertyCreate.ts +++ b/packages/legacy/src/api/models/contentPropertyCreate.ts @@ -1,4 +1,4 @@ -import type { PropertyValue } from './propertyValue'; +import type { PropertyValue } from './propertyValue.js'; export interface ContentPropertyCreate { /** The key of the new property. */ diff --git a/src/api/models/contentPropertyCreateNoKey.ts b/packages/legacy/src/api/models/contentPropertyCreateNoKey.ts similarity index 56% rename from src/api/models/contentPropertyCreateNoKey.ts rename to packages/legacy/src/api/models/contentPropertyCreateNoKey.ts index 94f04579..02e311d5 100644 --- a/src/api/models/contentPropertyCreateNoKey.ts +++ b/packages/legacy/src/api/models/contentPropertyCreateNoKey.ts @@ -1,4 +1,4 @@ -import type { PropertyValue } from './propertyValue'; +import type { PropertyValue } from './propertyValue.js'; export interface ContentPropertyCreateNoKey { value: PropertyValue; diff --git a/src/api/models/contentPropertyUpdate.ts b/packages/legacy/src/api/models/contentPropertyUpdate.ts similarity index 100% rename from src/api/models/contentPropertyUpdate.ts rename to packages/legacy/src/api/models/contentPropertyUpdate.ts diff --git a/src/api/models/contentRestriction.ts b/packages/legacy/src/api/models/contentRestriction.ts similarity index 61% rename from src/api/models/contentRestriction.ts rename to packages/legacy/src/api/models/contentRestriction.ts index fc5d1bfa..4b9744b3 100644 --- a/src/api/models/contentRestriction.ts +++ b/packages/legacy/src/api/models/contentRestriction.ts @@ -1,7 +1,7 @@ -import type { Content } from './content'; -import type { GenericLinks } from './genericLinks'; -import type { GroupArray } from './groupArray'; -import type { UserArray } from './userArray'; +import type { Content } from './content.js'; +import type { GenericLinks } from './genericLinks.js'; +import type { GroupArray } from './groupArray.js'; +import type { UserArray } from './userArray.js'; export interface ContentRestriction { operation: string; diff --git a/src/api/models/contentRestrictionArray.ts b/packages/legacy/src/api/models/contentRestrictionArray.ts similarity index 69% rename from src/api/models/contentRestrictionArray.ts rename to packages/legacy/src/api/models/contentRestrictionArray.ts index 9398e92a..90fcf7f1 100644 --- a/src/api/models/contentRestrictionArray.ts +++ b/packages/legacy/src/api/models/contentRestrictionArray.ts @@ -1,5 +1,5 @@ -import type { ContentRestriction } from './contentRestriction'; -import type { GenericLinks } from './genericLinks'; +import type { ContentRestriction } from './contentRestriction.js'; +import type { GenericLinks } from './genericLinks.js'; export interface ContentRestrictionArray { results: ContentRestriction[]; diff --git a/src/api/models/contentRestrictionUpdate.ts b/packages/legacy/src/api/models/contentRestrictionUpdate.ts similarity index 100% rename from src/api/models/contentRestrictionUpdate.ts rename to packages/legacy/src/api/models/contentRestrictionUpdate.ts diff --git a/src/api/models/contentRestrictionUpdateArray.ts b/packages/legacy/src/api/models/contentRestrictionUpdateArray.ts similarity index 90% rename from src/api/models/contentRestrictionUpdateArray.ts rename to packages/legacy/src/api/models/contentRestrictionUpdateArray.ts index c69f4fc2..aaac4189 100644 --- a/src/api/models/contentRestrictionUpdateArray.ts +++ b/packages/legacy/src/api/models/contentRestrictionUpdateArray.ts @@ -1,3 +1,3 @@ -import type { ContentRestrictionUpdate } from './contentRestrictionUpdate'; +import type { ContentRestrictionUpdate } from './contentRestrictionUpdate.js'; export type ContentRestrictionUpdateArray = ContentRestrictionUpdate[]; diff --git a/src/api/models/contentState.ts b/packages/legacy/src/api/models/contentState.ts similarity index 100% rename from src/api/models/contentState.ts rename to packages/legacy/src/api/models/contentState.ts diff --git a/src/api/models/contentStateResponse.ts b/packages/legacy/src/api/models/contentStateResponse.ts similarity index 78% rename from src/api/models/contentStateResponse.ts rename to packages/legacy/src/api/models/contentStateResponse.ts index 71a52000..fe596db0 100644 --- a/src/api/models/contentStateResponse.ts +++ b/packages/legacy/src/api/models/contentStateResponse.ts @@ -1,4 +1,4 @@ -import type { ContentState } from './contentState'; +import type { ContentState } from './contentState.js'; export interface ContentStateResponse { /** Null or content state */ diff --git a/src/api/models/contentStateRestInput.ts b/packages/legacy/src/api/models/contentStateRestInput.ts similarity index 100% rename from src/api/models/contentStateRestInput.ts rename to packages/legacy/src/api/models/contentStateRestInput.ts diff --git a/src/api/models/contentStateSettings.ts b/packages/legacy/src/api/models/contentStateSettings.ts similarity index 89% rename from src/api/models/contentStateSettings.ts rename to packages/legacy/src/api/models/contentStateSettings.ts index 64089036..4a3190bd 100644 --- a/src/api/models/contentStateSettings.ts +++ b/packages/legacy/src/api/models/contentStateSettings.ts @@ -1,4 +1,4 @@ -import type { ContentState } from './contentState'; +import type { ContentState } from './contentState.js'; export interface ContentStateSettings { /** Whether users can place content states on any pages and blog posts in the space */ diff --git a/src/api/models/contentTemplate.ts b/packages/legacy/src/api/models/contentTemplate.ts similarity index 60% rename from src/api/models/contentTemplate.ts rename to packages/legacy/src/api/models/contentTemplate.ts index d450a6d4..682f03f4 100644 --- a/src/api/models/contentTemplate.ts +++ b/packages/legacy/src/api/models/contentTemplate.ts @@ -1,6 +1,6 @@ -import type { ContentBody } from './contentBody'; -import type { GenericLinks } from './genericLinks'; -import type { Label } from './label'; +import type { ContentBody } from './contentBody.js'; +import type { GenericLinks } from './genericLinks.js'; +import type { Label } from './label.js'; export interface ContentTemplate { templateId: string; diff --git a/src/api/models/contentTemplateArray.ts b/packages/legacy/src/api/models/contentTemplateArray.ts similarity index 55% rename from src/api/models/contentTemplateArray.ts rename to packages/legacy/src/api/models/contentTemplateArray.ts index 2cf836b7..fa1cbe92 100644 --- a/src/api/models/contentTemplateArray.ts +++ b/packages/legacy/src/api/models/contentTemplateArray.ts @@ -1,5 +1,5 @@ -import type { ContentTemplate } from './contentTemplate'; -import type { GenericLinks } from './genericLinks'; +import type { ContentTemplate } from './contentTemplate.js'; +import type { GenericLinks } from './genericLinks.js'; export interface ContentTemplateArray { results: ContentTemplate[]; diff --git a/src/api/models/contentTemplateBodyCreate.ts b/packages/legacy/src/api/models/contentTemplateBodyCreate.ts similarity index 68% rename from src/api/models/contentTemplateBodyCreate.ts rename to packages/legacy/src/api/models/contentTemplateBodyCreate.ts index 74b06cda..83158f31 100644 --- a/src/api/models/contentTemplateBodyCreate.ts +++ b/packages/legacy/src/api/models/contentTemplateBodyCreate.ts @@ -1,4 +1,4 @@ -import type { ContentBodyCreate } from './contentBodyCreate'; +import type { ContentBodyCreate } from './contentBodyCreate.js'; /** This object is used when creating or updating content. */ export interface ContentTemplateBodyCreate { diff --git a/src/api/models/contentTemplateCreate.ts b/packages/legacy/src/api/models/contentTemplateCreate.ts similarity index 92% rename from src/api/models/contentTemplateCreate.ts rename to packages/legacy/src/api/models/contentTemplateCreate.ts index 9d598cad..26b0bc7c 100644 --- a/src/api/models/contentTemplateCreate.ts +++ b/packages/legacy/src/api/models/contentTemplateCreate.ts @@ -1,5 +1,5 @@ -import type { ContentTemplateBodyCreate } from './contentTemplateBodyCreate'; -import type { Label } from './label'; +import type { ContentTemplateBodyCreate } from './contentTemplateBodyCreate.js'; +import type { Label } from './label.js'; /** This object is used to create content templates. */ export interface ContentTemplateCreate { diff --git a/src/api/models/contentTemplateUpdate.ts b/packages/legacy/src/api/models/contentTemplateUpdate.ts similarity index 86% rename from src/api/models/contentTemplateUpdate.ts rename to packages/legacy/src/api/models/contentTemplateUpdate.ts index 9e03a268..e39752a6 100644 --- a/src/api/models/contentTemplateUpdate.ts +++ b/packages/legacy/src/api/models/contentTemplateUpdate.ts @@ -1,5 +1,5 @@ -import type { ContentBodyCreate } from './contentBodyCreate'; -import type { Label } from './label'; +import type { ContentBodyCreate } from './contentBodyCreate.js'; +import type { Label } from './label.js'; /** This object is used to update content templates. */ export interface ContentTemplateUpdate { diff --git a/src/api/models/contentUpdate.ts b/packages/legacy/src/api/models/contentUpdate.ts similarity index 95% rename from src/api/models/contentUpdate.ts rename to packages/legacy/src/api/models/contentUpdate.ts index aba00a6a..c3a59f46 100644 --- a/src/api/models/contentUpdate.ts +++ b/packages/legacy/src/api/models/contentUpdate.ts @@ -1,5 +1,5 @@ -import type { ContentBodyCreate } from './contentBodyCreate'; -import type { ContentBodyCreateStorage } from './contentBodyCreateStorage'; +import type { ContentBodyCreate } from './contentBodyCreate.js'; +import type { ContentBodyCreateStorage } from './contentBodyCreateStorage.js'; export interface ContentUpdate { /** diff --git a/src/api/models/copyPageHierarchyRequest.ts b/packages/legacy/src/api/models/copyPageHierarchyRequest.ts similarity index 97% rename from src/api/models/copyPageHierarchyRequest.ts rename to packages/legacy/src/api/models/copyPageHierarchyRequest.ts index dfd46f89..efdd3198 100644 --- a/src/api/models/copyPageHierarchyRequest.ts +++ b/packages/legacy/src/api/models/copyPageHierarchyRequest.ts @@ -1,4 +1,4 @@ -import type { CopyPageHierarchyTitleOptions } from './copyPageHierarchyTitleOptions'; +import type { CopyPageHierarchyTitleOptions } from './copyPageHierarchyTitleOptions.js'; export interface CopyPageHierarchyRequest { /** If set to `true`, attachments are copied to the destination page. */ diff --git a/src/api/models/copyPageHierarchyTitleOptions.ts b/packages/legacy/src/api/models/copyPageHierarchyTitleOptions.ts similarity index 100% rename from src/api/models/copyPageHierarchyTitleOptions.ts rename to packages/legacy/src/api/models/copyPageHierarchyTitleOptions.ts diff --git a/src/api/models/copyPageRequest.ts b/packages/legacy/src/api/models/copyPageRequest.ts similarity index 91% rename from src/api/models/copyPageRequest.ts rename to packages/legacy/src/api/models/copyPageRequest.ts index 21a034ff..45be5f48 100644 --- a/src/api/models/copyPageRequest.ts +++ b/packages/legacy/src/api/models/copyPageRequest.ts @@ -1,5 +1,5 @@ -import type { ContentBodyCreate } from './contentBodyCreate'; -import type { CopyPageRequestDestination } from './copyPageRequestDestination'; +import type { ContentBodyCreate } from './contentBodyCreate.js'; +import type { CopyPageRequestDestination } from './copyPageRequestDestination.js'; export interface CopyPageRequest { /** If set to `true`, attachments are copied to the destination page. */ diff --git a/src/api/models/copyPageRequestDestination.ts b/packages/legacy/src/api/models/copyPageRequestDestination.ts similarity index 100% rename from src/api/models/copyPageRequestDestination.ts rename to packages/legacy/src/api/models/copyPageRequestDestination.ts diff --git a/packages/legacy/src/api/models/createdAttachment.ts b/packages/legacy/src/api/models/createdAttachment.ts new file mode 100644 index 00000000..5aafe1d9 --- /dev/null +++ b/packages/legacy/src/api/models/createdAttachment.ts @@ -0,0 +1,8 @@ +import type { Attachment } from './attachment.js'; +import type { AttachmentContainer } from './attachmentContainer.js'; +import type { Version } from './version.js'; + +export interface CreatedAttachment extends Attachment { + version: Version; + container: AttachmentContainer; +} diff --git a/src/api/models/embeddable.ts b/packages/legacy/src/api/models/embeddable.ts similarity index 100% rename from src/api/models/embeddable.ts rename to packages/legacy/src/api/models/embeddable.ts diff --git a/src/api/models/embeddedContent.ts b/packages/legacy/src/api/models/embeddedContent.ts similarity index 61% rename from src/api/models/embeddedContent.ts rename to packages/legacy/src/api/models/embeddedContent.ts index e21b8345..a6bdf8be 100644 --- a/src/api/models/embeddedContent.ts +++ b/packages/legacy/src/api/models/embeddedContent.ts @@ -1,4 +1,4 @@ -import type { Embeddable } from './embeddable'; +import type { Embeddable } from './embeddable.js'; export interface EmbeddedContent { entityId?: number; diff --git a/src/api/models/genericLinks.ts b/packages/legacy/src/api/models/genericLinks.ts similarity index 100% rename from src/api/models/genericLinks.ts rename to packages/legacy/src/api/models/genericLinks.ts diff --git a/src/api/models/getRestrictionsByOperation.ts b/packages/legacy/src/api/models/getRestrictionsByOperation.ts similarity index 57% rename from src/api/models/getRestrictionsByOperation.ts rename to packages/legacy/src/api/models/getRestrictionsByOperation.ts index 41237170..234caa69 100644 --- a/src/api/models/getRestrictionsByOperation.ts +++ b/packages/legacy/src/api/models/getRestrictionsByOperation.ts @@ -1,4 +1,4 @@ -import type { GenericLinks } from './genericLinks'; +import type { GenericLinks } from './genericLinks.js'; export interface GetRestrictionsByOperation { _links: GenericLinks; diff --git a/src/api/models/getViewers.ts b/packages/legacy/src/api/models/getViewers.ts similarity index 100% rename from src/api/models/getViewers.ts rename to packages/legacy/src/api/models/getViewers.ts diff --git a/src/api/models/getViews.ts b/packages/legacy/src/api/models/getViews.ts similarity index 100% rename from src/api/models/getViews.ts rename to packages/legacy/src/api/models/getViews.ts diff --git a/src/api/models/group.ts b/packages/legacy/src/api/models/group.ts similarity index 64% rename from src/api/models/group.ts rename to packages/legacy/src/api/models/group.ts index 5c62b209..f862ed44 100644 --- a/src/api/models/group.ts +++ b/packages/legacy/src/api/models/group.ts @@ -1,4 +1,4 @@ -import type { GenericLinks } from './genericLinks'; +import type { GenericLinks } from './genericLinks.js'; export interface Group { type: string; diff --git a/src/api/models/groupArray.ts b/packages/legacy/src/api/models/groupArray.ts similarity index 71% rename from src/api/models/groupArray.ts rename to packages/legacy/src/api/models/groupArray.ts index d77106a2..c02d5db5 100644 --- a/src/api/models/groupArray.ts +++ b/packages/legacy/src/api/models/groupArray.ts @@ -1,4 +1,4 @@ -import type { Group } from './group'; +import type { Group } from './group.js'; export interface GroupArray { results: Group[]; diff --git a/src/api/models/groupArrayWithLinks.ts b/packages/legacy/src/api/models/groupArrayWithLinks.ts similarity index 79% rename from src/api/models/groupArrayWithLinks.ts rename to packages/legacy/src/api/models/groupArrayWithLinks.ts index c7c944a3..933e1b63 100644 --- a/src/api/models/groupArrayWithLinks.ts +++ b/packages/legacy/src/api/models/groupArrayWithLinks.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import type { GroupArray } from './groupArray'; +import type { GroupArray } from './groupArray.js'; /** Same as GroupArray but with `_links` property. */ export interface GroupArrayWithLinks extends GroupArray { diff --git a/src/api/models/groupCreate.ts b/packages/legacy/src/api/models/groupCreate.ts similarity index 100% rename from src/api/models/groupCreate.ts rename to packages/legacy/src/api/models/groupCreate.ts diff --git a/src/api/models/groupName.ts b/packages/legacy/src/api/models/groupName.ts similarity index 100% rename from src/api/models/groupName.ts rename to packages/legacy/src/api/models/groupName.ts diff --git a/src/api/models/headerLookAndFeel.ts b/packages/legacy/src/api/models/headerLookAndFeel.ts similarity index 80% rename from src/api/models/headerLookAndFeel.ts rename to packages/legacy/src/api/models/headerLookAndFeel.ts index eabf286f..2447888a 100644 --- a/src/api/models/headerLookAndFeel.ts +++ b/packages/legacy/src/api/models/headerLookAndFeel.ts @@ -1,6 +1,6 @@ -import type { ButtonLookAndFeel } from './buttonLookAndFeel'; -import type { NavigationLookAndFeel } from './navigationLookAndFeel'; -import type { SearchFieldLookAndFeel } from './searchFieldLookAndFeel'; +import type { ButtonLookAndFeel } from './buttonLookAndFeel.js'; +import type { NavigationLookAndFeel } from './navigationLookAndFeel.js'; +import type { SearchFieldLookAndFeel } from './searchFieldLookAndFeel.js'; export interface HeaderLookAndFeel { backgroundColor: string; diff --git a/src/api/models/horizontalHeaderLookAndFeel.ts b/packages/legacy/src/api/models/horizontalHeaderLookAndFeel.ts similarity index 81% rename from src/api/models/horizontalHeaderLookAndFeel.ts rename to packages/legacy/src/api/models/horizontalHeaderLookAndFeel.ts index 4fc6c7b1..0723564b 100644 --- a/src/api/models/horizontalHeaderLookAndFeel.ts +++ b/packages/legacy/src/api/models/horizontalHeaderLookAndFeel.ts @@ -1,7 +1,7 @@ -import type { ButtonLookAndFeel } from './buttonLookAndFeel'; -import type { NavigationLookAndFeel } from './navigationLookAndFeel'; -import type { SearchFieldLookAndFeel } from './searchFieldLookAndFeel'; -import type { TopNavigationLookAndFeel } from './topNavigationLookAndFeel'; +import type { ButtonLookAndFeel } from './buttonLookAndFeel.js'; +import type { NavigationLookAndFeel } from './navigationLookAndFeel.js'; +import type { SearchFieldLookAndFeel } from './searchFieldLookAndFeel.js'; +import type { TopNavigationLookAndFeel } from './topNavigationLookAndFeel.js'; export interface HorizontalHeaderLookAndFeel { backgroundColor: string; diff --git a/src/api/models/icon.ts b/packages/legacy/src/api/models/icon.ts similarity index 100% rename from src/api/models/icon.ts rename to packages/legacy/src/api/models/icon.ts diff --git a/packages/legacy/src/api/models/index.ts b/packages/legacy/src/api/models/index.ts new file mode 100644 index 00000000..bc988b4d --- /dev/null +++ b/packages/legacy/src/api/models/index.ts @@ -0,0 +1,321 @@ +export * from './accountId.js'; + +export * from './accountIdEmailRecord.js'; + +export * from './accountIdEmailRecordArray.js'; + +export * from './addContentRestriction.js'; + +export * from './addContentRestrictionUpdateArray.js'; + +export * from './affectedObject.js'; + +export * from './appDescriptor.js'; + +export * from './asyncContentBody.js'; + +export * from './asyncId.js'; + +export * from './attachment.js'; + +export * from './attachmentContainer.js'; + +export * from './attachmentMetadata.js'; + +export * from './auditRecord.js'; + +export * from './auditRecordArray.js'; + +export * from './auditRecordCreate.js'; + +export * from './availableContentStates.js'; + +export * from './blueprintTemplate.js'; + +export * from './blueprintTemplateArray.js'; + +export * from './breadcrumb.js'; + +export * from './bulkUserLookup.js'; + +export * from './bulkUserLookupArray.js'; + +export * from './buttonLookAndFeel.js'; + +export * from './changedValue.js'; + +export * from './connectModules.js'; + +export * from './container.js'; + +export * from './containerLookAndFeel.js'; + +export * from './containerSummary.js'; + +export * from './content.js'; + +export * from './contentArray.js'; + +export * from './contentBlueprintDraft.js'; + +export * from './contentBody.js'; + +export * from './contentBodyCreate.js'; + +export * from './contentBodyCreateStorage.js'; + +export * from './contentChildren.js'; + +export * from './contentChildType.js'; + +export * from './contentCreate.js'; + +export * from './contentHistory.js'; + +export * from './contentLookAndFeel.js'; + +export * from './contentPermissionRequest.js'; + +export * from './contentProperty.js'; + +export * from './contentPropertyArray.js'; + +export * from './contentPropertyCreate.js'; + +export * from './contentPropertyCreateNoKey.js'; + +export * from './contentPropertyUpdate.js'; + +export * from './contentRestriction.js'; + +export * from './contentRestrictionArray.js'; + +export * from './contentRestrictionUpdate.js'; + +export * from './contentRestrictionUpdateArray.js'; + +export * from './contentState.js'; + +export * from './contentStateResponse.js'; + +export * from './contentStateRestInput.js'; + +export * from './contentStateSettings.js'; + +export * from './contentTemplate.js'; + +export * from './contentTemplateArray.js'; + +export * from './contentTemplateBodyCreate.js'; + +export * from './contentTemplateCreate.js'; + +export * from './contentTemplateUpdate.js'; + +export * from './contentUpdate.js'; + +export * from './copyPageHierarchyRequest.js'; + +export * from './copyPageHierarchyTitleOptions.js'; + +export * from './copyPageRequest.js'; + +export * from './copyPageRequestDestination.js'; + +export * from './createdAttachment.js'; + +export * from './embeddable.js'; + +export * from './embeddedContent.js'; + +export * from './genericLinks.js'; + +export * from './getRestrictionsByOperation.js'; + +export * from './getViewers.js'; + +export * from './getViews.js'; + +export * from './group.js'; + +export * from './groupArray.js'; + +export * from './groupArrayWithLinks.js'; + +export * from './groupCreate.js'; + +export * from './groupName.js'; + +export * from './headerLookAndFeel.js'; + +export * from './horizontalHeaderLookAndFeel.js'; + +export * from './icon.js'; + +export * from './label.js'; + +export * from './labelArray.js'; + +export * from './labelCreate.js'; + +export * from './labelCreateArray.js'; + +export * from './labelDetails.js'; + +export * from './labeledContent.js'; + +export * from './labeledContentPageResponse.js'; + +export * from './labeledContentType.js'; + +export * from './lifecycle.js'; + +export * from './longTask.js'; + +export * from './longTaskStatus.js'; + +export * from './longTaskStatusArray.js'; + +export * from './longTaskStatusWithLinks.js'; + +export * from './lookAndFeel.js'; + +export * from './lookAndFeelSelection.js'; + +export * from './lookAndFeelSettings.js'; + +export * from './macroInstance.js'; + +export * from './menusLookAndFeel.js'; + +export * from './message.js'; + +export * from './migratedUser.js'; + +export * from './migratedUserArray.js'; + +export * from './movePage.js'; + +export * from './navigationLookAndFeel.js'; + +export * from './operationCheckResult.js'; + +export * from './permissionCheckResponse.js'; + +export * from './permissionSubject.js'; + +export * from './permissionSubjectWithGroupId.js'; + +export * from './propertyValue.js'; + +export * from './relation.js'; + +export * from './relationArray.js'; + +export * from './relationData.js'; + +export * from './retentionPeriod.js'; + +export * from './screenLookAndFeel.js'; + +export * from './searchFieldLookAndFeel.js'; + +export * from './searchPageResponseSearchResult.js'; + +export * from './searchResult.js'; + +export * from './space.js'; + +export * from './spaceArray.js'; + +export * from './spaceCreate.js'; + +export * from './spaceDescription.js'; + +export * from './spaceDescriptionCreate.js'; + +export * from './spacePermission.js'; + +export * from './spacePermissionCreate.js'; + +export * from './spacePermissionCustomContent.js'; + +export * from './spacePermissionRequest.js'; + +export * from './spacePermissionV2.js'; + +export * from './spacePrivateCreate.js'; + +export * from './spaceProperty.js'; + +export * from './spacePropertyArray.js'; + +export * from './spacePropertyCreate.js'; + +export * from './spacePropertyCreateNoKey.js'; + +export * from './spacePropertyUpdate.js'; + +export * from './spaceSettings.js'; + +export * from './spaceSettingsUpdate.js'; + +export * from './spaceUpdate.js'; + +export * from './spaceWatch.js'; + +export * from './spaceWatchArray.js'; + +export * from './spaceWatchUser.js'; + +export * from './superBatchWebResources.js'; + +export * from './systemInfoEntity.js'; + +export * from './task.js'; + +export * from './taskPageResponse.js'; + +export * from './taskStatusUpdate.js'; + +export * from './theme.js'; + +export * from './themeArray.js'; + +export * from './themeNoLinks.js'; + +export * from './themeUpdate.js'; + +export * from './topNavigationLookAndFeel.js'; + +export * from './user.js'; + +export * from './userAnonymous.js'; + +export * from './userArray.js'; + +export * from './userProperty.js'; + +export * from './userPropertyCreate.js'; + +export * from './userPropertyKeyArray.js'; + +export * from './userPropertyUpdate.js'; + +export * from './usersUserKeys.js'; + +export * from './userWatch.js'; + +export * from './version.js'; + +export * from './versionArray.js'; + +export * from './versionRestore.js'; + +export * from './watch.js'; + +export * from './watchArray.js'; + +export * from './watchUser.js'; + +export * from './webResourceDependencies.js'; diff --git a/src/api/models/label.ts b/packages/legacy/src/api/models/label.ts similarity index 100% rename from src/api/models/label.ts rename to packages/legacy/src/api/models/label.ts diff --git a/src/api/models/labelArray.ts b/packages/legacy/src/api/models/labelArray.ts similarity index 56% rename from src/api/models/labelArray.ts rename to packages/legacy/src/api/models/labelArray.ts index 75283389..743fbadc 100644 --- a/src/api/models/labelArray.ts +++ b/packages/legacy/src/api/models/labelArray.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { Label } from './label'; +import type { GenericLinks } from './genericLinks.js'; +import type { Label } from './label.js'; export interface LabelArray { results: Label[]; diff --git a/src/api/models/labelCreate.ts b/packages/legacy/src/api/models/labelCreate.ts similarity index 100% rename from src/api/models/labelCreate.ts rename to packages/legacy/src/api/models/labelCreate.ts diff --git a/packages/legacy/src/api/models/labelCreateArray.ts b/packages/legacy/src/api/models/labelCreateArray.ts new file mode 100644 index 00000000..d477bedb --- /dev/null +++ b/packages/legacy/src/api/models/labelCreateArray.ts @@ -0,0 +1,3 @@ +import type { LabelCreate } from './labelCreate.js'; + +export type LabelCreateArray = LabelCreate[]; diff --git a/src/api/models/labelDetails.ts b/packages/legacy/src/api/models/labelDetails.ts similarity index 73% rename from src/api/models/labelDetails.ts rename to packages/legacy/src/api/models/labelDetails.ts index ea09975a..a013bd87 100644 --- a/src/api/models/labelDetails.ts +++ b/packages/legacy/src/api/models/labelDetails.ts @@ -1,5 +1,5 @@ -import type { Label } from './label'; -import type { LabeledContentPageResponse } from './labeledContentPageResponse'; +import type { Label } from './label.js'; +import type { LabeledContentPageResponse } from './labeledContentPageResponse.js'; export interface LabelDetails { label: Label; diff --git a/src/api/models/labeledContent.ts b/packages/legacy/src/api/models/labeledContent.ts similarity index 67% rename from src/api/models/labeledContent.ts rename to packages/legacy/src/api/models/labeledContent.ts index 66345b72..ab623c6e 100644 --- a/src/api/models/labeledContent.ts +++ b/packages/legacy/src/api/models/labeledContent.ts @@ -1,4 +1,4 @@ -import type { LabeledContentType } from './labeledContentType'; +import type { LabeledContentType } from './labeledContentType.js'; export interface LabeledContent { contentType: LabeledContentType; diff --git a/src/api/models/labeledContentPageResponse.ts b/packages/legacy/src/api/models/labeledContentPageResponse.ts similarity index 68% rename from src/api/models/labeledContentPageResponse.ts rename to packages/legacy/src/api/models/labeledContentPageResponse.ts index d80bc8af..94a3a81d 100644 --- a/src/api/models/labeledContentPageResponse.ts +++ b/packages/legacy/src/api/models/labeledContentPageResponse.ts @@ -1,4 +1,4 @@ -import type { LabeledContent } from './labeledContent'; +import type { LabeledContent } from './labeledContent.js'; export interface LabeledContentPageResponse { results: LabeledContent[]; diff --git a/src/api/models/labeledContentType.ts b/packages/legacy/src/api/models/labeledContentType.ts similarity index 100% rename from src/api/models/labeledContentType.ts rename to packages/legacy/src/api/models/labeledContentType.ts diff --git a/src/api/models/lifecycle.ts b/packages/legacy/src/api/models/lifecycle.ts similarity index 100% rename from src/api/models/lifecycle.ts rename to packages/legacy/src/api/models/lifecycle.ts diff --git a/src/api/models/longTask.ts b/packages/legacy/src/api/models/longTask.ts similarity index 100% rename from src/api/models/longTask.ts rename to packages/legacy/src/api/models/longTask.ts diff --git a/src/api/models/longTaskStatus.ts b/packages/legacy/src/api/models/longTaskStatus.ts similarity index 96% rename from src/api/models/longTaskStatus.ts rename to packages/legacy/src/api/models/longTaskStatus.ts index 8df79a17..09ef881d 100644 --- a/src/api/models/longTaskStatus.ts +++ b/packages/legacy/src/api/models/longTaskStatus.ts @@ -1,4 +1,4 @@ -import type { Message } from './message'; +import type { Message } from './message.js'; /** * Current status of a long running task* diff --git a/src/api/models/longTaskStatusArray.ts b/packages/legacy/src/api/models/longTaskStatusArray.ts similarity index 55% rename from src/api/models/longTaskStatusArray.ts rename to packages/legacy/src/api/models/longTaskStatusArray.ts index 5092f161..6983fdb5 100644 --- a/src/api/models/longTaskStatusArray.ts +++ b/packages/legacy/src/api/models/longTaskStatusArray.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { LongTaskStatus } from './longTaskStatus'; +import type { GenericLinks } from './genericLinks.js'; +import type { LongTaskStatus } from './longTaskStatus.js'; export interface LongTaskStatusArray { results: LongTaskStatus[]; diff --git a/src/api/models/longTaskStatusWithLinks.ts b/packages/legacy/src/api/models/longTaskStatusWithLinks.ts similarity index 78% rename from src/api/models/longTaskStatusWithLinks.ts rename to packages/legacy/src/api/models/longTaskStatusWithLinks.ts index 5b7caf61..b94a4f7b 100644 --- a/src/api/models/longTaskStatusWithLinks.ts +++ b/packages/legacy/src/api/models/longTaskStatusWithLinks.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import type { LongTaskStatus } from './longTaskStatus'; +import type { LongTaskStatus } from './longTaskStatus.js'; /** Same as LongTaskStatus but with `_links` property. */ export interface LongTaskStatusWithLinks extends LongTaskStatus { diff --git a/src/api/models/lookAndFeel.ts b/packages/legacy/src/api/models/lookAndFeel.ts similarity index 64% rename from src/api/models/lookAndFeel.ts rename to packages/legacy/src/api/models/lookAndFeel.ts index 39db065b..b53ba5aa 100644 --- a/src/api/models/lookAndFeel.ts +++ b/packages/legacy/src/api/models/lookAndFeel.ts @@ -1,7 +1,7 @@ -import type { ContentLookAndFeel } from './contentLookAndFeel'; -import type { HeaderLookAndFeel } from './headerLookAndFeel'; -import type { HorizontalHeaderLookAndFeel } from './horizontalHeaderLookAndFeel'; -import type { MenusLookAndFeel } from './menusLookAndFeel'; +import type { ContentLookAndFeel } from './contentLookAndFeel.js'; +import type { HeaderLookAndFeel } from './headerLookAndFeel.js'; +import type { HorizontalHeaderLookAndFeel } from './horizontalHeaderLookAndFeel.js'; +import type { MenusLookAndFeel } from './menusLookAndFeel.js'; export interface LookAndFeel { headings: { diff --git a/src/api/models/lookAndFeelSelection.ts b/packages/legacy/src/api/models/lookAndFeelSelection.ts similarity index 100% rename from src/api/models/lookAndFeelSelection.ts rename to packages/legacy/src/api/models/lookAndFeelSelection.ts diff --git a/src/api/models/lookAndFeelSettings.ts b/packages/legacy/src/api/models/lookAndFeelSettings.ts similarity index 71% rename from src/api/models/lookAndFeelSettings.ts rename to packages/legacy/src/api/models/lookAndFeelSettings.ts index f67895c0..3156072e 100644 --- a/src/api/models/lookAndFeelSettings.ts +++ b/packages/legacy/src/api/models/lookAndFeelSettings.ts @@ -1,4 +1,4 @@ -import type { LookAndFeel } from './lookAndFeel'; +import type { LookAndFeel } from './lookAndFeel.js'; export interface LookAndFeelSettings { selected: string; diff --git a/src/api/models/macroInstance.ts b/packages/legacy/src/api/models/macroInstance.ts similarity index 67% rename from src/api/models/macroInstance.ts rename to packages/legacy/src/api/models/macroInstance.ts index 171f0230..2efc30fa 100644 --- a/src/api/models/macroInstance.ts +++ b/packages/legacy/src/api/models/macroInstance.ts @@ -1,4 +1,4 @@ -import type { GenericLinks } from './genericLinks'; +import type { GenericLinks } from './genericLinks.js'; export interface MacroInstance { name?: string; diff --git a/src/api/models/menusLookAndFeel.ts b/packages/legacy/src/api/models/menusLookAndFeel.ts similarity index 100% rename from src/api/models/menusLookAndFeel.ts rename to packages/legacy/src/api/models/menusLookAndFeel.ts diff --git a/src/api/models/message.ts b/packages/legacy/src/api/models/message.ts similarity index 100% rename from src/api/models/message.ts rename to packages/legacy/src/api/models/message.ts diff --git a/src/api/models/migratedUser.ts b/packages/legacy/src/api/models/migratedUser.ts similarity index 100% rename from src/api/models/migratedUser.ts rename to packages/legacy/src/api/models/migratedUser.ts diff --git a/src/api/models/migratedUserArray.ts b/packages/legacy/src/api/models/migratedUserArray.ts similarity index 56% rename from src/api/models/migratedUserArray.ts rename to packages/legacy/src/api/models/migratedUserArray.ts index 02747c6e..3318d2f6 100644 --- a/src/api/models/migratedUserArray.ts +++ b/packages/legacy/src/api/models/migratedUserArray.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { MigratedUser } from './migratedUser'; +import type { GenericLinks } from './genericLinks.js'; +import type { MigratedUser } from './migratedUser.js'; export interface MigratedUserArray { results: MigratedUser[]; diff --git a/src/api/models/movePage.ts b/packages/legacy/src/api/models/movePage.ts similarity index 100% rename from src/api/models/movePage.ts rename to packages/legacy/src/api/models/movePage.ts diff --git a/src/api/models/navigationLookAndFeel.ts b/packages/legacy/src/api/models/navigationLookAndFeel.ts similarity index 100% rename from src/api/models/navigationLookAndFeel.ts rename to packages/legacy/src/api/models/navigationLookAndFeel.ts diff --git a/src/api/models/operationCheckResult.ts b/packages/legacy/src/api/models/operationCheckResult.ts similarity index 100% rename from src/api/models/operationCheckResult.ts rename to packages/legacy/src/api/models/operationCheckResult.ts diff --git a/src/api/models/permissionCheckResponse.ts b/packages/legacy/src/api/models/permissionCheckResponse.ts similarity index 93% rename from src/api/models/permissionCheckResponse.ts rename to packages/legacy/src/api/models/permissionCheckResponse.ts index 39563c64..78c1c015 100644 --- a/src/api/models/permissionCheckResponse.ts +++ b/packages/legacy/src/api/models/permissionCheckResponse.ts @@ -1,4 +1,4 @@ -import type { Message } from './message'; +import type { Message } from './message.js'; /** * This object represents the response for the content permission check API. If the user or group does not have* diff --git a/src/api/models/permissionSubject.ts b/packages/legacy/src/api/models/permissionSubject.ts similarity index 100% rename from src/api/models/permissionSubject.ts rename to packages/legacy/src/api/models/permissionSubject.ts diff --git a/src/api/models/permissionSubjectWithGroupId.ts b/packages/legacy/src/api/models/permissionSubjectWithGroupId.ts similarity index 100% rename from src/api/models/permissionSubjectWithGroupId.ts rename to packages/legacy/src/api/models/permissionSubjectWithGroupId.ts diff --git a/src/api/models/propertyValue.ts b/packages/legacy/src/api/models/propertyValue.ts similarity index 100% rename from src/api/models/propertyValue.ts rename to packages/legacy/src/api/models/propertyValue.ts diff --git a/src/api/models/relation.ts b/packages/legacy/src/api/models/relation.ts similarity index 66% rename from src/api/models/relation.ts rename to packages/legacy/src/api/models/relation.ts index a90de33c..bb23530c 100644 --- a/src/api/models/relation.ts +++ b/packages/legacy/src/api/models/relation.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { RelationData } from './relationData'; +import type { GenericLinks } from './genericLinks.js'; +import type { RelationData } from './relationData.js'; export interface Relation { name: string; diff --git a/src/api/models/relationArray.ts b/packages/legacy/src/api/models/relationArray.ts similarity index 56% rename from src/api/models/relationArray.ts rename to packages/legacy/src/api/models/relationArray.ts index b29d540a..e8e24e36 100644 --- a/src/api/models/relationArray.ts +++ b/packages/legacy/src/api/models/relationArray.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { Relation } from './relation'; +import type { GenericLinks } from './genericLinks.js'; +import type { Relation } from './relation.js'; export interface RelationArray { results: Relation[]; diff --git a/src/api/models/relationData.ts b/packages/legacy/src/api/models/relationData.ts similarity index 74% rename from src/api/models/relationData.ts rename to packages/legacy/src/api/models/relationData.ts index a6a7ea61..3e548a8d 100644 --- a/src/api/models/relationData.ts +++ b/packages/legacy/src/api/models/relationData.ts @@ -1,4 +1,4 @@ -import type { User } from './user'; +import type { User } from './user.js'; export interface RelationData { createdBy?: User; diff --git a/src/api/models/retentionPeriod.ts b/packages/legacy/src/api/models/retentionPeriod.ts similarity index 100% rename from src/api/models/retentionPeriod.ts rename to packages/legacy/src/api/models/retentionPeriod.ts diff --git a/src/api/models/screenLookAndFeel.ts b/packages/legacy/src/api/models/screenLookAndFeel.ts similarity index 100% rename from src/api/models/screenLookAndFeel.ts rename to packages/legacy/src/api/models/screenLookAndFeel.ts diff --git a/src/api/models/searchFieldLookAndFeel.ts b/packages/legacy/src/api/models/searchFieldLookAndFeel.ts similarity index 100% rename from src/api/models/searchFieldLookAndFeel.ts rename to packages/legacy/src/api/models/searchFieldLookAndFeel.ts diff --git a/src/api/models/searchPageResponseSearchResult.ts b/packages/legacy/src/api/models/searchPageResponseSearchResult.ts similarity index 66% rename from src/api/models/searchPageResponseSearchResult.ts rename to packages/legacy/src/api/models/searchPageResponseSearchResult.ts index e50bacb1..432717ae 100644 --- a/src/api/models/searchPageResponseSearchResult.ts +++ b/packages/legacy/src/api/models/searchPageResponseSearchResult.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { SearchResult } from './searchResult'; +import type { GenericLinks } from './genericLinks.js'; +import type { SearchResult } from './searchResult.js'; export interface SearchPageResponseSearchResult { results: SearchResult[]; diff --git a/src/api/models/searchResult.ts b/packages/legacy/src/api/models/searchResult.ts similarity index 67% rename from src/api/models/searchResult.ts rename to packages/legacy/src/api/models/searchResult.ts index fc4dea9f..1abd9c9a 100644 --- a/src/api/models/searchResult.ts +++ b/packages/legacy/src/api/models/searchResult.ts @@ -1,6 +1,6 @@ -import type { Breadcrumb } from './breadcrumb'; -import type { ContainerSummary } from './containerSummary'; -import type { Content } from './content'; +import type { Breadcrumb } from './breadcrumb.js'; +import type { ContainerSummary } from './containerSummary.js'; +import type { Content } from './content.js'; export interface SearchResult { content: Content; diff --git a/src/api/models/space.ts b/packages/legacy/src/api/models/space.ts similarity index 63% rename from src/api/models/space.ts rename to packages/legacy/src/api/models/space.ts index 7b375aec..2da7c08f 100644 --- a/src/api/models/space.ts +++ b/packages/legacy/src/api/models/space.ts @@ -1,13 +1,13 @@ -import type { Content } from './content'; -import type { GenericLinks } from './genericLinks'; -import type { Icon } from './icon'; -import type { LabelArray } from './labelArray'; -import type { LookAndFeel } from './lookAndFeel'; -import type { OperationCheckResult } from './operationCheckResult'; -import type { SpaceDescription } from './spaceDescription'; -import type { SpacePermission } from './spacePermission'; -import type { SpaceSettings } from './spaceSettings'; -import type { Theme } from './theme'; +import type { Content } from './content.js'; +import type { GenericLinks } from './genericLinks.js'; +import type { Icon } from './icon.js'; +import type { LabelArray } from './labelArray.js'; +import type { LookAndFeel } from './lookAndFeel.js'; +import type { OperationCheckResult } from './operationCheckResult.js'; +import type { SpaceDescription } from './spaceDescription.js'; +import type { SpacePermission } from './spacePermission.js'; +import type { SpaceSettings } from './spaceSettings.js'; +import type { Theme } from './theme.js'; export interface Space { id: number; diff --git a/src/api/models/spaceArray.ts b/packages/legacy/src/api/models/spaceArray.ts similarity index 56% rename from src/api/models/spaceArray.ts rename to packages/legacy/src/api/models/spaceArray.ts index de011c88..621a2b6b 100644 --- a/src/api/models/spaceArray.ts +++ b/packages/legacy/src/api/models/spaceArray.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { Space } from './space'; +import type { GenericLinks } from './genericLinks.js'; +import type { Space } from './space.js'; export interface SpaceArray { results: Space[]; diff --git a/src/api/models/spaceCreate.ts b/packages/legacy/src/api/models/spaceCreate.ts similarity index 94% rename from src/api/models/spaceCreate.ts rename to packages/legacy/src/api/models/spaceCreate.ts index 1dd2274d..db510330 100644 --- a/src/api/models/spaceCreate.ts +++ b/packages/legacy/src/api/models/spaceCreate.ts @@ -1,5 +1,5 @@ -import type { SpaceDescriptionCreate } from './spaceDescriptionCreate'; -import type { SpacePermission } from './spacePermission'; +import type { SpaceDescriptionCreate } from './spaceDescriptionCreate.js'; +import type { SpacePermission } from './spacePermission.js'; /** This is the request object used when creating a new space. */ export interface SpaceCreate { diff --git a/src/api/models/spaceDescription.ts b/packages/legacy/src/api/models/spaceDescription.ts similarity index 100% rename from src/api/models/spaceDescription.ts rename to packages/legacy/src/api/models/spaceDescription.ts diff --git a/src/api/models/spaceDescriptionCreate.ts b/packages/legacy/src/api/models/spaceDescriptionCreate.ts similarity index 100% rename from src/api/models/spaceDescriptionCreate.ts rename to packages/legacy/src/api/models/spaceDescriptionCreate.ts diff --git a/src/api/models/spacePermission.ts b/packages/legacy/src/api/models/spacePermission.ts similarity index 92% rename from src/api/models/spacePermission.ts rename to packages/legacy/src/api/models/spacePermission.ts index 58e85f35..473439a6 100644 --- a/src/api/models/spacePermission.ts +++ b/packages/legacy/src/api/models/spacePermission.ts @@ -1,6 +1,6 @@ -import type { Group } from './group'; -import type { OperationCheckResult } from './operationCheckResult'; -import type { User } from './user'; +import type { Group } from './group.js'; +import type { OperationCheckResult } from './operationCheckResult.js'; +import type { User } from './user.js'; /** * This object represents a permission for given space. Permissions consist of* at least one operation object with an diff --git a/src/api/models/spacePermissionCreate.ts b/packages/legacy/src/api/models/spacePermissionCreate.ts similarity index 91% rename from src/api/models/spacePermissionCreate.ts rename to packages/legacy/src/api/models/spacePermissionCreate.ts index c94d8591..647fde5e 100644 --- a/src/api/models/spacePermissionCreate.ts +++ b/packages/legacy/src/api/models/spacePermissionCreate.ts @@ -1,6 +1,6 @@ -import type { GroupCreate } from './groupCreate'; -import type { OperationCheckResult } from './operationCheckResult'; -import type { User } from './user'; +import type { GroupCreate } from './groupCreate.js'; +import type { OperationCheckResult } from './operationCheckResult.js'; +import type { User } from './user.js'; /** * This object represents a permission for given space. Permissions consist of* at least one operation object with an diff --git a/src/api/models/spacePermissionCustomContent.ts b/packages/legacy/src/api/models/spacePermissionCustomContent.ts similarity index 87% rename from src/api/models/spacePermissionCustomContent.ts rename to packages/legacy/src/api/models/spacePermissionCustomContent.ts index 60835ae1..455caef8 100644 --- a/src/api/models/spacePermissionCustomContent.ts +++ b/packages/legacy/src/api/models/spacePermissionCustomContent.ts @@ -1,4 +1,4 @@ -import type { PermissionSubject } from './permissionSubject'; +import type { PermissionSubject } from './permissionSubject.js'; /** * This object represents a list of space permissions for custom content type for an individual user. Permissions diff --git a/src/api/models/spacePermissionRequest.ts b/packages/legacy/src/api/models/spacePermissionRequest.ts similarity index 90% rename from src/api/models/spacePermissionRequest.ts rename to packages/legacy/src/api/models/spacePermissionRequest.ts index a2a7e3e2..f64ca9f9 100644 --- a/src/api/models/spacePermissionRequest.ts +++ b/packages/legacy/src/api/models/spacePermissionRequest.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { PermissionSubject } from './permissionSubject'; +import type { GenericLinks } from './genericLinks.js'; +import type { PermissionSubject } from './permissionSubject.js'; /** * This object represents the request for the single space permission. Permissions consist of* at least one operation diff --git a/src/api/models/spacePermissionV2.ts b/packages/legacy/src/api/models/spacePermissionV2.ts similarity index 85% rename from src/api/models/spacePermissionV2.ts rename to packages/legacy/src/api/models/spacePermissionV2.ts index a822197a..7a507997 100644 --- a/src/api/models/spacePermissionV2.ts +++ b/packages/legacy/src/api/models/spacePermissionV2.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { PermissionSubject } from './permissionSubject'; +import type { GenericLinks } from './genericLinks.js'; +import type { PermissionSubject } from './permissionSubject.js'; /** * This object represents a single space permission. Permissions consist of* at least one operation object with an diff --git a/src/api/models/spacePrivateCreate.ts b/packages/legacy/src/api/models/spacePrivateCreate.ts similarity index 98% rename from src/api/models/spacePrivateCreate.ts rename to packages/legacy/src/api/models/spacePrivateCreate.ts index 700e859d..b6e217d1 100644 --- a/src/api/models/spacePrivateCreate.ts +++ b/packages/legacy/src/api/models/spacePrivateCreate.ts @@ -1,5 +1,5 @@ -import type { SpaceDescriptionCreate } from './spaceDescriptionCreate'; -import type { SpacePermissionCreate } from './spacePermissionCreate'; +import type { SpaceDescriptionCreate } from './spaceDescriptionCreate.js'; +import type { SpacePermissionCreate } from './spacePermissionCreate.js'; /** This is the request object used when creating a new private space. */ export interface SpacePrivateCreate { diff --git a/src/api/models/spaceProperty.ts b/packages/legacy/src/api/models/spaceProperty.ts similarity index 86% rename from src/api/models/spaceProperty.ts rename to packages/legacy/src/api/models/spaceProperty.ts index 02da40ae..c4f61a98 100644 --- a/src/api/models/spaceProperty.ts +++ b/packages/legacy/src/api/models/spaceProperty.ts @@ -1,4 +1,4 @@ -import type { Space } from './space'; +import type { Space } from './space.js'; export interface SpaceProperty { id: number; diff --git a/src/api/models/spacePropertyArray.ts b/packages/legacy/src/api/models/spacePropertyArray.ts similarity index 56% rename from src/api/models/spacePropertyArray.ts rename to packages/legacy/src/api/models/spacePropertyArray.ts index 5a9a1986..a8e40d74 100644 --- a/src/api/models/spacePropertyArray.ts +++ b/packages/legacy/src/api/models/spacePropertyArray.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { SpaceProperty } from './spaceProperty'; +import type { GenericLinks } from './genericLinks.js'; +import type { SpaceProperty } from './spaceProperty.js'; export interface SpacePropertyArray { results: SpaceProperty[]; diff --git a/src/api/models/spacePropertyCreate.ts b/packages/legacy/src/api/models/spacePropertyCreate.ts similarity index 76% rename from src/api/models/spacePropertyCreate.ts rename to packages/legacy/src/api/models/spacePropertyCreate.ts index c2a78732..39d423aa 100644 --- a/src/api/models/spacePropertyCreate.ts +++ b/packages/legacy/src/api/models/spacePropertyCreate.ts @@ -1,4 +1,4 @@ -import type { PropertyValue } from './propertyValue'; +import type { PropertyValue } from './propertyValue.js'; export interface SpacePropertyCreate { /** The key of the new property. */ diff --git a/src/api/models/spacePropertyCreateNoKey.ts b/packages/legacy/src/api/models/spacePropertyCreateNoKey.ts similarity index 55% rename from src/api/models/spacePropertyCreateNoKey.ts rename to packages/legacy/src/api/models/spacePropertyCreateNoKey.ts index 27cace92..d704760d 100644 --- a/src/api/models/spacePropertyCreateNoKey.ts +++ b/packages/legacy/src/api/models/spacePropertyCreateNoKey.ts @@ -1,4 +1,4 @@ -import type { PropertyValue } from './propertyValue'; +import type { PropertyValue } from './propertyValue.js'; export interface SpacePropertyCreateNoKey { value: PropertyValue; diff --git a/src/api/models/spacePropertyUpdate.ts b/packages/legacy/src/api/models/spacePropertyUpdate.ts similarity index 100% rename from src/api/models/spacePropertyUpdate.ts rename to packages/legacy/src/api/models/spacePropertyUpdate.ts diff --git a/src/api/models/spaceSettings.ts b/packages/legacy/src/api/models/spaceSettings.ts similarity index 89% rename from src/api/models/spaceSettings.ts rename to packages/legacy/src/api/models/spaceSettings.ts index 9171385f..1fa1bcc6 100644 --- a/src/api/models/spaceSettings.ts +++ b/packages/legacy/src/api/models/spaceSettings.ts @@ -1,4 +1,4 @@ -import type { GenericLinks } from './genericLinks'; +import type { GenericLinks } from './genericLinks.js'; export interface SpaceSettings { /** diff --git a/src/api/models/spaceSettingsUpdate.ts b/packages/legacy/src/api/models/spaceSettingsUpdate.ts similarity index 100% rename from src/api/models/spaceSettingsUpdate.ts rename to packages/legacy/src/api/models/spaceSettingsUpdate.ts diff --git a/src/api/models/spaceUpdate.ts b/packages/legacy/src/api/models/spaceUpdate.ts similarity index 97% rename from src/api/models/spaceUpdate.ts rename to packages/legacy/src/api/models/spaceUpdate.ts index 5149077b..b26edec2 100644 --- a/src/api/models/spaceUpdate.ts +++ b/packages/legacy/src/api/models/spaceUpdate.ts @@ -1,4 +1,4 @@ -import type { SpaceDescriptionCreate } from './spaceDescriptionCreate'; +import type { SpaceDescriptionCreate } from './spaceDescriptionCreate.js'; export interface SpaceUpdate { /** The name of the space. */ diff --git a/src/api/models/spaceWatch.ts b/packages/legacy/src/api/models/spaceWatch.ts similarity index 66% rename from src/api/models/spaceWatch.ts rename to packages/legacy/src/api/models/spaceWatch.ts index b86fb418..625b23f1 100644 --- a/src/api/models/spaceWatch.ts +++ b/packages/legacy/src/api/models/spaceWatch.ts @@ -1,4 +1,4 @@ -import type { SpaceWatchUser } from './spaceWatchUser'; +import type { SpaceWatchUser } from './spaceWatchUser.js'; export interface SpaceWatch { type: string; diff --git a/src/api/models/spaceWatchArray.ts b/packages/legacy/src/api/models/spaceWatchArray.ts similarity index 56% rename from src/api/models/spaceWatchArray.ts rename to packages/legacy/src/api/models/spaceWatchArray.ts index 264dd7c0..709dc279 100644 --- a/src/api/models/spaceWatchArray.ts +++ b/packages/legacy/src/api/models/spaceWatchArray.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { SpaceWatch } from './spaceWatch'; +import type { GenericLinks } from './genericLinks.js'; +import type { SpaceWatch } from './spaceWatch.js'; export interface SpaceWatchArray { results: SpaceWatch[]; diff --git a/src/api/models/spaceWatchUser.ts b/packages/legacy/src/api/models/spaceWatchUser.ts similarity index 96% rename from src/api/models/spaceWatchUser.ts rename to packages/legacy/src/api/models/spaceWatchUser.ts index d8a624ca..a8d3dd17 100644 --- a/src/api/models/spaceWatchUser.ts +++ b/packages/legacy/src/api/models/spaceWatchUser.ts @@ -1,5 +1,5 @@ -import type { Icon } from './icon'; -import type { OperationCheckResult } from './operationCheckResult'; +import type { Icon } from './icon.js'; +import type { OperationCheckResult } from './operationCheckResult.js'; /** * This essentially the same as the `User` object, but no `_links` property and* no `_expandable` property (therefore, diff --git a/src/api/models/superBatchWebResources.ts b/packages/legacy/src/api/models/superBatchWebResources.ts similarity index 100% rename from src/api/models/superBatchWebResources.ts rename to packages/legacy/src/api/models/superBatchWebResources.ts diff --git a/src/api/models/systemInfoEntity.ts b/packages/legacy/src/api/models/systemInfoEntity.ts similarity index 100% rename from src/api/models/systemInfoEntity.ts rename to packages/legacy/src/api/models/systemInfoEntity.ts diff --git a/src/api/models/task.ts b/packages/legacy/src/api/models/task.ts similarity index 100% rename from src/api/models/task.ts rename to packages/legacy/src/api/models/task.ts diff --git a/src/api/models/taskPageResponse.ts b/packages/legacy/src/api/models/taskPageResponse.ts similarity index 73% rename from src/api/models/taskPageResponse.ts rename to packages/legacy/src/api/models/taskPageResponse.ts index 66cdf250..1def5c27 100644 --- a/src/api/models/taskPageResponse.ts +++ b/packages/legacy/src/api/models/taskPageResponse.ts @@ -1,4 +1,4 @@ -import type { Task } from './task'; +import type { Task } from './task.js'; export interface TaskPageResponse { results: Task[]; diff --git a/src/api/models/taskStatusUpdate.ts b/packages/legacy/src/api/models/taskStatusUpdate.ts similarity index 100% rename from src/api/models/taskStatusUpdate.ts rename to packages/legacy/src/api/models/taskStatusUpdate.ts diff --git a/src/api/models/theme.ts b/packages/legacy/src/api/models/theme.ts similarity index 71% rename from src/api/models/theme.ts rename to packages/legacy/src/api/models/theme.ts index fdefc1cb..d2947066 100644 --- a/src/api/models/theme.ts +++ b/packages/legacy/src/api/models/theme.ts @@ -1,5 +1,5 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import type { ThemeNoLinks } from './themeNoLinks'; +import type { ThemeNoLinks } from './themeNoLinks.js'; export interface Theme extends ThemeNoLinks { _links: Record; diff --git a/src/api/models/themeArray.ts b/packages/legacy/src/api/models/themeArray.ts similarity index 54% rename from src/api/models/themeArray.ts rename to packages/legacy/src/api/models/themeArray.ts index b1c141e3..3096269b 100644 --- a/src/api/models/themeArray.ts +++ b/packages/legacy/src/api/models/themeArray.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { ThemeNoLinks } from './themeNoLinks'; +import type { GenericLinks } from './genericLinks.js'; +import type { ThemeNoLinks } from './themeNoLinks.js'; export interface ThemeArray { results: ThemeNoLinks[]; diff --git a/src/api/models/themeNoLinks.ts b/packages/legacy/src/api/models/themeNoLinks.ts similarity index 80% rename from src/api/models/themeNoLinks.ts rename to packages/legacy/src/api/models/themeNoLinks.ts index fdd2bd8c..3f49b9e5 100644 --- a/src/api/models/themeNoLinks.ts +++ b/packages/legacy/src/api/models/themeNoLinks.ts @@ -1,4 +1,4 @@ -import type { Icon } from './icon'; +import type { Icon } from './icon.js'; /** Theme object without links. Used in ThemeArray. */ export interface ThemeNoLinks { diff --git a/src/api/models/themeUpdate.ts b/packages/legacy/src/api/models/themeUpdate.ts similarity index 100% rename from src/api/models/themeUpdate.ts rename to packages/legacy/src/api/models/themeUpdate.ts diff --git a/src/api/models/topNavigationLookAndFeel.ts b/packages/legacy/src/api/models/topNavigationLookAndFeel.ts similarity index 100% rename from src/api/models/topNavigationLookAndFeel.ts rename to packages/legacy/src/api/models/topNavigationLookAndFeel.ts diff --git a/src/api/models/user.ts b/packages/legacy/src/api/models/user.ts similarity index 91% rename from src/api/models/user.ts rename to packages/legacy/src/api/models/user.ts index 27fbef11..ec7e4da1 100644 --- a/src/api/models/user.ts +++ b/packages/legacy/src/api/models/user.ts @@ -1,7 +1,7 @@ -import type { GenericLinks } from './genericLinks'; -import type { Icon } from './icon'; -import type { OperationCheckResult } from './operationCheckResult'; -import type { Space } from './space'; +import type { GenericLinks } from './genericLinks.js'; +import type { Icon } from './icon.js'; +import type { OperationCheckResult } from './operationCheckResult.js'; +import type { Space } from './space.js'; export interface User { type: string; diff --git a/src/api/models/userAnonymous.ts b/packages/legacy/src/api/models/userAnonymous.ts similarity index 72% rename from src/api/models/userAnonymous.ts rename to packages/legacy/src/api/models/userAnonymous.ts index 5422f99e..d4397f92 100644 --- a/src/api/models/userAnonymous.ts +++ b/packages/legacy/src/api/models/userAnonymous.ts @@ -1,6 +1,6 @@ -import type { GenericLinks } from './genericLinks'; -import type { Icon } from './icon'; -import type { OperationCheckResult } from './operationCheckResult'; +import type { GenericLinks } from './genericLinks.js'; +import type { Icon } from './icon.js'; +import type { OperationCheckResult } from './operationCheckResult.js'; export interface UserAnonymous { type: string; diff --git a/src/api/models/userArray.ts b/packages/legacy/src/api/models/userArray.ts similarity index 72% rename from src/api/models/userArray.ts rename to packages/legacy/src/api/models/userArray.ts index ba056309..ba96dc9d 100644 --- a/src/api/models/userArray.ts +++ b/packages/legacy/src/api/models/userArray.ts @@ -1,4 +1,4 @@ -import type { User } from './user'; +import type { User } from './user.js'; export interface UserArray { results: User[]; diff --git a/src/api/models/userProperty.ts b/packages/legacy/src/api/models/userProperty.ts similarity index 88% rename from src/api/models/userProperty.ts rename to packages/legacy/src/api/models/userProperty.ts index c941e5c4..18f31bff 100644 --- a/src/api/models/userProperty.ts +++ b/packages/legacy/src/api/models/userProperty.ts @@ -1,4 +1,4 @@ -import type { GenericLinks } from './genericLinks'; +import type { GenericLinks } from './genericLinks.js'; export interface UserProperty { key: string; diff --git a/src/api/models/userPropertyCreate.ts b/packages/legacy/src/api/models/userPropertyCreate.ts similarity index 100% rename from src/api/models/userPropertyCreate.ts rename to packages/legacy/src/api/models/userPropertyCreate.ts diff --git a/src/api/models/userPropertyKeyArray.ts b/packages/legacy/src/api/models/userPropertyKeyArray.ts similarity index 74% rename from src/api/models/userPropertyKeyArray.ts rename to packages/legacy/src/api/models/userPropertyKeyArray.ts index 0e4d2322..333f390a 100644 --- a/src/api/models/userPropertyKeyArray.ts +++ b/packages/legacy/src/api/models/userPropertyKeyArray.ts @@ -1,4 +1,4 @@ -import type { GenericLinks } from './genericLinks'; +import type { GenericLinks } from './genericLinks.js'; export interface UserPropertyKeyArray { results: { diff --git a/src/api/models/userPropertyUpdate.ts b/packages/legacy/src/api/models/userPropertyUpdate.ts similarity index 100% rename from src/api/models/userPropertyUpdate.ts rename to packages/legacy/src/api/models/userPropertyUpdate.ts diff --git a/src/api/models/userWatch.ts b/packages/legacy/src/api/models/userWatch.ts similarity index 100% rename from src/api/models/userWatch.ts rename to packages/legacy/src/api/models/userWatch.ts diff --git a/src/api/models/usersUserKeys.ts b/packages/legacy/src/api/models/usersUserKeys.ts similarity index 51% rename from src/api/models/usersUserKeys.ts rename to packages/legacy/src/api/models/usersUserKeys.ts index 889458df..6356e773 100644 --- a/src/api/models/usersUserKeys.ts +++ b/packages/legacy/src/api/models/usersUserKeys.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { User } from './user'; +import type { GenericLinks } from './genericLinks.js'; +import type { User } from './user.js'; export interface UsersUserKeys { users: User[]; diff --git a/src/api/models/version.ts b/packages/legacy/src/api/models/version.ts similarity index 59% rename from src/api/models/version.ts rename to packages/legacy/src/api/models/version.ts index 012cbad3..21288a69 100644 --- a/src/api/models/version.ts +++ b/packages/legacy/src/api/models/version.ts @@ -1,7 +1,7 @@ -import type { Content } from './content'; -import type { GenericLinks } from './genericLinks'; -import type { User } from './user'; -import type { UsersUserKeys } from './usersUserKeys'; +import type { Content } from './content.js'; +import type { GenericLinks } from './genericLinks.js'; +import type { User } from './user.js'; +import type { UsersUserKeys } from './usersUserKeys.js'; export interface Version { by: User; diff --git a/src/api/models/versionArray.ts b/packages/legacy/src/api/models/versionArray.ts similarity index 56% rename from src/api/models/versionArray.ts rename to packages/legacy/src/api/models/versionArray.ts index 744c19a6..abee6079 100644 --- a/src/api/models/versionArray.ts +++ b/packages/legacy/src/api/models/versionArray.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { Version } from './version'; +import type { GenericLinks } from './genericLinks.js'; +import type { Version } from './version.js'; export interface VersionArray { results: Version[]; diff --git a/src/api/models/versionRestore.ts b/packages/legacy/src/api/models/versionRestore.ts similarity index 100% rename from src/api/models/versionRestore.ts rename to packages/legacy/src/api/models/versionRestore.ts diff --git a/src/api/models/watch.ts b/packages/legacy/src/api/models/watch.ts similarity index 63% rename from src/api/models/watch.ts rename to packages/legacy/src/api/models/watch.ts index e7152f31..b968ab1c 100644 --- a/src/api/models/watch.ts +++ b/packages/legacy/src/api/models/watch.ts @@ -1,4 +1,4 @@ -import type { WatchUser } from './watchUser'; +import type { WatchUser } from './watchUser.js'; export interface Watch { type: string; diff --git a/src/api/models/watchArray.ts b/packages/legacy/src/api/models/watchArray.ts similarity index 56% rename from src/api/models/watchArray.ts rename to packages/legacy/src/api/models/watchArray.ts index e126202f..885bf607 100644 --- a/src/api/models/watchArray.ts +++ b/packages/legacy/src/api/models/watchArray.ts @@ -1,5 +1,5 @@ -import type { GenericLinks } from './genericLinks'; -import type { Watch } from './watch'; +import type { GenericLinks } from './genericLinks.js'; +import type { Watch } from './watch.js'; export interface WatchArray { results: Watch[]; diff --git a/src/api/models/watchUser.ts b/packages/legacy/src/api/models/watchUser.ts similarity index 95% rename from src/api/models/watchUser.ts rename to packages/legacy/src/api/models/watchUser.ts index e24bd04f..f9d1eefb 100644 --- a/src/api/models/watchUser.ts +++ b/packages/legacy/src/api/models/watchUser.ts @@ -1,5 +1,5 @@ -import type { Icon } from './icon'; -import type { OperationCheckResult } from './operationCheckResult'; +import type { Icon } from './icon.js'; +import type { OperationCheckResult } from './operationCheckResult.js'; /** * This essentially the same as the `User` object, but no `_links` property and* no `_expandable` property (therefore, diff --git a/src/api/models/webResourceDependencies.ts b/packages/legacy/src/api/models/webResourceDependencies.ts similarity index 96% rename from src/api/models/webResourceDependencies.ts rename to packages/legacy/src/api/models/webResourceDependencies.ts index 1002c4e1..c009edb8 100644 --- a/src/api/models/webResourceDependencies.ts +++ b/packages/legacy/src/api/models/webResourceDependencies.ts @@ -1,4 +1,4 @@ -import type { SuperBatchWebResources } from './superBatchWebResources'; +import type { SuperBatchWebResources } from './superBatchWebResources.js'; export interface WebResourceDependencies { keys?: string[]; diff --git a/src/api/parameters/addContentWatcher.ts b/packages/legacy/src/api/parameters/addContentWatcher.ts similarity index 100% rename from src/api/parameters/addContentWatcher.ts rename to packages/legacy/src/api/parameters/addContentWatcher.ts diff --git a/src/api/parameters/addCustomContentPermissions.ts b/packages/legacy/src/api/parameters/addCustomContentPermissions.ts similarity index 70% rename from src/api/parameters/addCustomContentPermissions.ts rename to packages/legacy/src/api/parameters/addCustomContentPermissions.ts index ef8ad8c7..59c75ee2 100644 --- a/src/api/parameters/addCustomContentPermissions.ts +++ b/packages/legacy/src/api/parameters/addCustomContentPermissions.ts @@ -1,4 +1,4 @@ -import type { SpacePermissionCustomContent } from '../models'; +import type { SpacePermissionCustomContent } from '../models/index.js'; export interface AddCustomContentPermissions extends SpacePermissionCustomContent { /** The key of the space to be queried for its content. */ diff --git a/src/api/parameters/addGroupToContentRestrictionByGroupId.ts b/packages/legacy/src/api/parameters/addGroupToContentRestrictionByGroupId.ts similarity index 100% rename from src/api/parameters/addGroupToContentRestrictionByGroupId.ts rename to packages/legacy/src/api/parameters/addGroupToContentRestrictionByGroupId.ts diff --git a/src/api/parameters/addLabelWatcher.ts b/packages/legacy/src/api/parameters/addLabelWatcher.ts similarity index 100% rename from src/api/parameters/addLabelWatcher.ts rename to packages/legacy/src/api/parameters/addLabelWatcher.ts diff --git a/src/api/parameters/addLabelsToContent.ts b/packages/legacy/src/api/parameters/addLabelsToContent.ts similarity index 92% rename from src/api/parameters/addLabelsToContent.ts rename to packages/legacy/src/api/parameters/addLabelsToContent.ts index a801831a..07935f18 100644 --- a/src/api/parameters/addLabelsToContent.ts +++ b/packages/legacy/src/api/parameters/addLabelsToContent.ts @@ -1,4 +1,4 @@ -import type { LabelCreateArray } from '../models'; +import type { LabelCreateArray } from '../models/index.js'; export interface AddLabelsToContent { /** The ID of the content that will have labels added to it. */ diff --git a/src/api/parameters/addLabelsToSpace.ts b/packages/legacy/src/api/parameters/addLabelsToSpace.ts similarity index 100% rename from src/api/parameters/addLabelsToSpace.ts rename to packages/legacy/src/api/parameters/addLabelsToSpace.ts diff --git a/src/api/parameters/addPermissionToSpace.ts b/packages/legacy/src/api/parameters/addPermissionToSpace.ts similarity index 70% rename from src/api/parameters/addPermissionToSpace.ts rename to packages/legacy/src/api/parameters/addPermissionToSpace.ts index f28b7c13..0cba42ed 100644 --- a/src/api/parameters/addPermissionToSpace.ts +++ b/packages/legacy/src/api/parameters/addPermissionToSpace.ts @@ -1,4 +1,4 @@ -import type { SpacePermissionRequest } from '../models'; +import type { SpacePermissionRequest } from '../models/index.js'; export interface AddPermissionToSpace extends SpacePermissionRequest { /** The key of the space to be queried for its content. */ diff --git a/src/api/parameters/addRestrictions.ts b/packages/legacy/src/api/parameters/addRestrictions.ts similarity index 98% rename from src/api/parameters/addRestrictions.ts rename to packages/legacy/src/api/parameters/addRestrictions.ts index a651b0a5..f19867a3 100644 --- a/src/api/parameters/addRestrictions.ts +++ b/packages/legacy/src/api/parameters/addRestrictions.ts @@ -1,4 +1,4 @@ -import type { AddContentRestrictionUpdateArray } from '../models'; +import type { AddContentRestrictionUpdateArray } from '../models/index.js'; export interface AddRestrictions { /** The ID of the content to add restrictions to. */ diff --git a/src/api/parameters/addSpaceWatcher.ts b/packages/legacy/src/api/parameters/addSpaceWatcher.ts similarity index 100% rename from src/api/parameters/addSpaceWatcher.ts rename to packages/legacy/src/api/parameters/addSpaceWatcher.ts diff --git a/src/api/parameters/addUserToContentRestriction.ts b/packages/legacy/src/api/parameters/addUserToContentRestriction.ts similarity index 100% rename from src/api/parameters/addUserToContentRestriction.ts rename to packages/legacy/src/api/parameters/addUserToContentRestriction.ts diff --git a/src/api/parameters/addUserToGroup.ts b/packages/legacy/src/api/parameters/addUserToGroup.ts similarity index 70% rename from src/api/parameters/addUserToGroup.ts rename to packages/legacy/src/api/parameters/addUserToGroup.ts index 6d5652a3..b0348002 100644 --- a/src/api/parameters/addUserToGroup.ts +++ b/packages/legacy/src/api/parameters/addUserToGroup.ts @@ -1,4 +1,4 @@ -import type { AccountId } from '../models'; +import type { AccountId } from '../models/index.js'; export interface AddUserToGroup extends AccountId { /** Name of the group whose membership is updated */ diff --git a/src/api/parameters/addUserToGroupByGroupId.ts b/packages/legacy/src/api/parameters/addUserToGroupByGroupId.ts similarity index 72% rename from src/api/parameters/addUserToGroupByGroupId.ts rename to packages/legacy/src/api/parameters/addUserToGroupByGroupId.ts index 6e1b761e..1aa07ae0 100644 --- a/src/api/parameters/addUserToGroupByGroupId.ts +++ b/packages/legacy/src/api/parameters/addUserToGroupByGroupId.ts @@ -1,4 +1,4 @@ -import type { AccountId } from '../models'; +import type { AccountId } from '../models/index.js'; export interface AddUserToGroupByGroupId extends AccountId { /** GroupId of the group whose membership is updated */ diff --git a/src/api/parameters/archivePages.ts b/packages/legacy/src/api/parameters/archivePages.ts similarity index 100% rename from src/api/parameters/archivePages.ts rename to packages/legacy/src/api/parameters/archivePages.ts diff --git a/src/api/parameters/asyncConvertContentBodyRequest.ts b/packages/legacy/src/api/parameters/asyncConvertContentBodyRequest.ts similarity index 98% rename from src/api/parameters/asyncConvertContentBodyRequest.ts rename to packages/legacy/src/api/parameters/asyncConvertContentBodyRequest.ts index 97d6e4db..07870de5 100644 --- a/src/api/parameters/asyncConvertContentBodyRequest.ts +++ b/packages/legacy/src/api/parameters/asyncConvertContentBodyRequest.ts @@ -1,4 +1,4 @@ -import type { ContentBodyCreate } from '../models'; +import type { ContentBodyCreate } from '../models/index.js'; export interface AsyncConvertContentBodyRequest extends ContentBodyCreate { /** The name of the target format for the content body. */ diff --git a/src/api/parameters/asyncConvertContentBodyResponse.ts b/packages/legacy/src/api/parameters/asyncConvertContentBodyResponse.ts similarity index 100% rename from src/api/parameters/asyncConvertContentBodyResponse.ts rename to packages/legacy/src/api/parameters/asyncConvertContentBodyResponse.ts diff --git a/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts b/packages/legacy/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts similarity index 98% rename from src/api/parameters/bulkAsyncConvertContentBodyRequest.ts rename to packages/legacy/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts index adeffae0..829a6369 100644 --- a/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts +++ b/packages/legacy/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts @@ -1,4 +1,4 @@ -import type { OneOrMany } from '../../interfaces'; +import type { OneOrMany } from '../../interfaces/index.js'; export interface BulkAsyncConvertContentBodyRequest { /** The name of the target format for the content body conversion. */ diff --git a/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts b/packages/legacy/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts similarity index 100% rename from src/api/parameters/bulkAsyncConvertContentBodyResponse.ts rename to packages/legacy/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts diff --git a/src/api/parameters/checkContentPermission.ts b/packages/legacy/src/api/parameters/checkContentPermission.ts similarity index 69% rename from src/api/parameters/checkContentPermission.ts rename to packages/legacy/src/api/parameters/checkContentPermission.ts index 57e1f179..4bdb9494 100644 --- a/src/api/parameters/checkContentPermission.ts +++ b/packages/legacy/src/api/parameters/checkContentPermission.ts @@ -1,4 +1,4 @@ -import type { ContentPermissionRequest } from '../models'; +import type { ContentPermissionRequest } from '../models/index.js'; export interface CheckContentPermission extends ContentPermissionRequest { /** The ID of the content to check permissions against. */ diff --git a/src/api/parameters/convertContentBody.ts b/packages/legacy/src/api/parameters/convertContentBody.ts similarity index 95% rename from src/api/parameters/convertContentBody.ts rename to packages/legacy/src/api/parameters/convertContentBody.ts index 3e83135e..bf5f3957 100644 --- a/src/api/parameters/convertContentBody.ts +++ b/packages/legacy/src/api/parameters/convertContentBody.ts @@ -1,6 +1,6 @@ /* eslint-disable @typescript-eslint/no-explicit-any */ -import type { ContentBodyCreate } from '../models'; -import type { OneOrMany } from '~/interfaces'; +import type { ContentBodyCreate } from '../models/index.js'; +import type { OneOrMany } from '../../interfaces/index.js'; export interface ConvertContentBody extends ContentBodyCreate { /** The name of the target format for the content body. */ diff --git a/src/api/parameters/copyPage.ts b/packages/legacy/src/api/parameters/copyPage.ts similarity index 68% rename from src/api/parameters/copyPage.ts rename to packages/legacy/src/api/parameters/copyPage.ts index 99781486..1b59f434 100644 --- a/src/api/parameters/copyPage.ts +++ b/packages/legacy/src/api/parameters/copyPage.ts @@ -1,4 +1,4 @@ -import type { CopyPageRequest } from '../models'; +import type { CopyPageRequest } from '../models/index.js'; export interface CopyPage { id: string; diff --git a/src/api/parameters/copyPageHierarchy.ts b/packages/legacy/src/api/parameters/copyPageHierarchy.ts similarity index 56% rename from src/api/parameters/copyPageHierarchy.ts rename to packages/legacy/src/api/parameters/copyPageHierarchy.ts index 02047791..a12890e6 100644 --- a/src/api/parameters/copyPageHierarchy.ts +++ b/packages/legacy/src/api/parameters/copyPageHierarchy.ts @@ -1,4 +1,4 @@ -import type { CopyPageHierarchyRequest } from '../models'; +import type { CopyPageHierarchyRequest } from '../models/index.js'; export interface CopyPageHierarchy extends CopyPageHierarchyRequest { id: string; diff --git a/src/api/parameters/createAttachments.ts b/packages/legacy/src/api/parameters/createAttachments.ts similarity index 88% rename from src/api/parameters/createAttachments.ts rename to packages/legacy/src/api/parameters/createAttachments.ts index fd3fe464..f076a472 100644 --- a/src/api/parameters/createAttachments.ts +++ b/packages/legacy/src/api/parameters/createAttachments.ts @@ -1,4 +1,4 @@ -import type { OneOrMany } from '~/interfaces'; +import type { OneOrMany } from '../../interfaces/index.js'; export interface CreateAttachments { /** The ID of the content to add the attachment to. */ diff --git a/src/api/parameters/createAuditRecord.ts b/packages/legacy/src/api/parameters/createAuditRecord.ts similarity index 51% rename from src/api/parameters/createAuditRecord.ts rename to packages/legacy/src/api/parameters/createAuditRecord.ts index 3014d116..3299722c 100644 --- a/src/api/parameters/createAuditRecord.ts +++ b/packages/legacy/src/api/parameters/createAuditRecord.ts @@ -1,3 +1,3 @@ -import type { AuditRecordCreate } from '../models'; +import type { AuditRecordCreate } from '../models/index.js'; export interface CreateAuditRecord extends AuditRecordCreate {} diff --git a/src/api/parameters/createContent.ts b/packages/legacy/src/api/parameters/createContent.ts similarity index 90% rename from src/api/parameters/createContent.ts rename to packages/legacy/src/api/parameters/createContent.ts index cc5754ec..4630f9a5 100644 --- a/src/api/parameters/createContent.ts +++ b/packages/legacy/src/api/parameters/createContent.ts @@ -1,5 +1,5 @@ -import type { ContentCreate } from '../models'; -import type { OneOrMany } from '~/interfaces'; +import type { ContentCreate } from '../models/index.js'; +import type { OneOrMany } from '../../interfaces/index.js'; export interface CreateContent extends ContentCreate { /** Filter the returned content by status. */ diff --git a/src/api/parameters/createContentProperty.ts b/packages/legacy/src/api/parameters/createContentProperty.ts similarity index 68% rename from src/api/parameters/createContentProperty.ts rename to packages/legacy/src/api/parameters/createContentProperty.ts index 855798ca..1ed47df2 100644 --- a/src/api/parameters/createContentProperty.ts +++ b/packages/legacy/src/api/parameters/createContentProperty.ts @@ -1,4 +1,4 @@ -import type { ContentPropertyCreate } from '../models'; +import type { ContentPropertyCreate } from '../models/index.js'; export interface CreateContentProperty extends ContentPropertyCreate { /** The ID of the content to add the property to. */ diff --git a/src/api/parameters/createContentPropertyForKey.ts b/packages/legacy/src/api/parameters/createContentPropertyForKey.ts similarity index 75% rename from src/api/parameters/createContentPropertyForKey.ts rename to packages/legacy/src/api/parameters/createContentPropertyForKey.ts index f7661e14..fdffb39e 100644 --- a/src/api/parameters/createContentPropertyForKey.ts +++ b/packages/legacy/src/api/parameters/createContentPropertyForKey.ts @@ -1,4 +1,4 @@ -import type { ContentPropertyCreateNoKey } from '../models'; +import type { ContentPropertyCreateNoKey } from '../models/index.js'; export interface CreateContentPropertyForKey extends ContentPropertyCreateNoKey { /** The ID of the content to add the property to. */ diff --git a/src/api/parameters/createContentTemplate.ts b/packages/legacy/src/api/parameters/createContentTemplate.ts similarity index 52% rename from src/api/parameters/createContentTemplate.ts rename to packages/legacy/src/api/parameters/createContentTemplate.ts index 5af8c3c1..37b328a2 100644 --- a/src/api/parameters/createContentTemplate.ts +++ b/packages/legacy/src/api/parameters/createContentTemplate.ts @@ -1,3 +1,3 @@ -import type { ContentTemplateCreate } from '../models'; +import type { ContentTemplateCreate } from '../models/index.js'; export interface CreateContentTemplate extends ContentTemplateCreate {} diff --git a/packages/legacy/src/api/parameters/createGroup.ts b/packages/legacy/src/api/parameters/createGroup.ts new file mode 100644 index 00000000..6cef05e0 --- /dev/null +++ b/packages/legacy/src/api/parameters/createGroup.ts @@ -0,0 +1,3 @@ +import type { GroupName } from '../models/index.js'; + +export interface CreateGroup extends GroupName {} diff --git a/src/api/parameters/createOrUpdateAttachments.ts b/packages/legacy/src/api/parameters/createOrUpdateAttachments.ts similarity index 85% rename from src/api/parameters/createOrUpdateAttachments.ts rename to packages/legacy/src/api/parameters/createOrUpdateAttachments.ts index 8f73b80f..f0f97131 100644 --- a/src/api/parameters/createOrUpdateAttachments.ts +++ b/packages/legacy/src/api/parameters/createOrUpdateAttachments.ts @@ -1,4 +1,4 @@ -import type { CreateAttachments } from './createAttachments'; +import type { CreateAttachments } from './createAttachments.js'; export interface CreateOrUpdateAttachments { /** The ID of the content to add the attachment to. */ diff --git a/src/api/parameters/createPrivateSpace.ts b/packages/legacy/src/api/parameters/createPrivateSpace.ts similarity index 51% rename from src/api/parameters/createPrivateSpace.ts rename to packages/legacy/src/api/parameters/createPrivateSpace.ts index 981fbfcc..0378cafc 100644 --- a/src/api/parameters/createPrivateSpace.ts +++ b/packages/legacy/src/api/parameters/createPrivateSpace.ts @@ -1,3 +1,3 @@ -import type { SpacePrivateCreate } from '../models'; +import type { SpacePrivateCreate } from '../models/index.js'; export interface CreatePrivateSpace extends SpacePrivateCreate {} diff --git a/src/api/parameters/createRelationship.ts b/packages/legacy/src/api/parameters/createRelationship.ts similarity index 100% rename from src/api/parameters/createRelationship.ts rename to packages/legacy/src/api/parameters/createRelationship.ts diff --git a/packages/legacy/src/api/parameters/createSpace.ts b/packages/legacy/src/api/parameters/createSpace.ts new file mode 100644 index 00000000..d9f16cff --- /dev/null +++ b/packages/legacy/src/api/parameters/createSpace.ts @@ -0,0 +1,3 @@ +import type { SpaceCreate } from '../models/index.js'; + +export interface CreateSpace extends SpaceCreate {} diff --git a/src/api/parameters/createSpaceProperty.ts b/packages/legacy/src/api/parameters/createSpaceProperty.ts similarity index 71% rename from src/api/parameters/createSpaceProperty.ts rename to packages/legacy/src/api/parameters/createSpaceProperty.ts index 12d1e355..a250381e 100644 --- a/src/api/parameters/createSpaceProperty.ts +++ b/packages/legacy/src/api/parameters/createSpaceProperty.ts @@ -1,4 +1,4 @@ -import type { SpacePropertyCreate } from '../models'; +import type { SpacePropertyCreate } from '../models/index.js'; export interface CreateSpaceProperty extends SpacePropertyCreate { /** The key of the space that the property will be created in. */ diff --git a/src/api/parameters/createSpacePropertyForKey.ts b/packages/legacy/src/api/parameters/createSpacePropertyForKey.ts similarity index 77% rename from src/api/parameters/createSpacePropertyForKey.ts rename to packages/legacy/src/api/parameters/createSpacePropertyForKey.ts index 90795fa2..cc7d28e6 100644 --- a/src/api/parameters/createSpacePropertyForKey.ts +++ b/packages/legacy/src/api/parameters/createSpacePropertyForKey.ts @@ -1,4 +1,4 @@ -import type { SpacePropertyCreateNoKey } from '../models'; +import type { SpacePropertyCreateNoKey } from '../models/index.js'; export interface CreateSpacePropertyForKey extends SpacePropertyCreateNoKey { /** The key of the space that the property will be created in. */ diff --git a/src/api/parameters/createUserProperty.ts b/packages/legacy/src/api/parameters/createUserProperty.ts similarity index 83% rename from src/api/parameters/createUserProperty.ts rename to packages/legacy/src/api/parameters/createUserProperty.ts index 6fc772b7..4e3e9e69 100644 --- a/src/api/parameters/createUserProperty.ts +++ b/packages/legacy/src/api/parameters/createUserProperty.ts @@ -1,4 +1,4 @@ -import type { UserPropertyCreate } from '../models'; +import type { UserPropertyCreate } from '../models/index.js'; export interface CreateUserProperty extends UserPropertyCreate { /** diff --git a/src/api/parameters/deleteContent.ts b/packages/legacy/src/api/parameters/deleteContent.ts similarity index 100% rename from src/api/parameters/deleteContent.ts rename to packages/legacy/src/api/parameters/deleteContent.ts diff --git a/src/api/parameters/deleteContentProperty.ts b/packages/legacy/src/api/parameters/deleteContentProperty.ts similarity index 100% rename from src/api/parameters/deleteContentProperty.ts rename to packages/legacy/src/api/parameters/deleteContentProperty.ts diff --git a/src/api/parameters/deleteContentVersion.ts b/packages/legacy/src/api/parameters/deleteContentVersion.ts similarity index 100% rename from src/api/parameters/deleteContentVersion.ts rename to packages/legacy/src/api/parameters/deleteContentVersion.ts diff --git a/src/api/parameters/deleteGroupById.ts b/packages/legacy/src/api/parameters/deleteGroupById.ts similarity index 100% rename from src/api/parameters/deleteGroupById.ts rename to packages/legacy/src/api/parameters/deleteGroupById.ts diff --git a/src/api/parameters/deleteLabelFromSpace.ts b/packages/legacy/src/api/parameters/deleteLabelFromSpace.ts similarity index 100% rename from src/api/parameters/deleteLabelFromSpace.ts rename to packages/legacy/src/api/parameters/deleteLabelFromSpace.ts diff --git a/src/api/parameters/deletePageTree.ts b/packages/legacy/src/api/parameters/deletePageTree.ts similarity index 100% rename from src/api/parameters/deletePageTree.ts rename to packages/legacy/src/api/parameters/deletePageTree.ts diff --git a/src/api/parameters/deleteRelationship.ts b/packages/legacy/src/api/parameters/deleteRelationship.ts similarity index 100% rename from src/api/parameters/deleteRelationship.ts rename to packages/legacy/src/api/parameters/deleteRelationship.ts diff --git a/src/api/parameters/deleteRestrictions.ts b/packages/legacy/src/api/parameters/deleteRestrictions.ts similarity index 100% rename from src/api/parameters/deleteRestrictions.ts rename to packages/legacy/src/api/parameters/deleteRestrictions.ts diff --git a/src/api/parameters/deleteSpace.ts b/packages/legacy/src/api/parameters/deleteSpace.ts similarity index 100% rename from src/api/parameters/deleteSpace.ts rename to packages/legacy/src/api/parameters/deleteSpace.ts diff --git a/src/api/parameters/deleteSpaceProperty.ts b/packages/legacy/src/api/parameters/deleteSpaceProperty.ts similarity index 100% rename from src/api/parameters/deleteSpaceProperty.ts rename to packages/legacy/src/api/parameters/deleteSpaceProperty.ts diff --git a/src/api/parameters/deleteUserProperty.ts b/packages/legacy/src/api/parameters/deleteUserProperty.ts similarity index 100% rename from src/api/parameters/deleteUserProperty.ts rename to packages/legacy/src/api/parameters/deleteUserProperty.ts diff --git a/src/api/parameters/downloadAttachment.ts b/packages/legacy/src/api/parameters/downloadAttachment.ts similarity index 100% rename from src/api/parameters/downloadAttachment.ts rename to packages/legacy/src/api/parameters/downloadAttachment.ts diff --git a/src/api/parameters/exportAuditRecords.ts b/packages/legacy/src/api/parameters/exportAuditRecords.ts similarity index 100% rename from src/api/parameters/exportAuditRecords.ts rename to packages/legacy/src/api/parameters/exportAuditRecords.ts diff --git a/src/api/parameters/findSourcesForTarget.ts b/packages/legacy/src/api/parameters/findSourcesForTarget.ts similarity index 100% rename from src/api/parameters/findSourcesForTarget.ts rename to packages/legacy/src/api/parameters/findSourcesForTarget.ts diff --git a/src/api/parameters/findTargetFromSource.ts b/packages/legacy/src/api/parameters/findTargetFromSource.ts similarity index 100% rename from src/api/parameters/findTargetFromSource.ts rename to packages/legacy/src/api/parameters/findTargetFromSource.ts diff --git a/src/api/parameters/getAllLabelContent.ts b/packages/legacy/src/api/parameters/getAllLabelContent.ts similarity index 100% rename from src/api/parameters/getAllLabelContent.ts rename to packages/legacy/src/api/parameters/getAllLabelContent.ts diff --git a/src/api/parameters/getAndAsyncConvertMacroBodyByMacroId.ts b/packages/legacy/src/api/parameters/getAndAsyncConvertMacroBodyByMacroId.ts similarity index 100% rename from src/api/parameters/getAndAsyncConvertMacroBodyByMacroId.ts rename to packages/legacy/src/api/parameters/getAndAsyncConvertMacroBodyByMacroId.ts diff --git a/src/api/parameters/getAndConvertMacroBodyByMacroId.ts b/packages/legacy/src/api/parameters/getAndConvertMacroBodyByMacroId.ts similarity index 100% rename from src/api/parameters/getAndConvertMacroBodyByMacroId.ts rename to packages/legacy/src/api/parameters/getAndConvertMacroBodyByMacroId.ts diff --git a/src/api/parameters/getAnonymousUser.ts b/packages/legacy/src/api/parameters/getAnonymousUser.ts similarity index 100% rename from src/api/parameters/getAnonymousUser.ts rename to packages/legacy/src/api/parameters/getAnonymousUser.ts diff --git a/src/api/parameters/getAttachments.ts b/packages/legacy/src/api/parameters/getAttachments.ts similarity index 96% rename from src/api/parameters/getAttachments.ts rename to packages/legacy/src/api/parameters/getAttachments.ts index 3e161677..dbb59c44 100644 --- a/src/api/parameters/getAttachments.ts +++ b/packages/legacy/src/api/parameters/getAttachments.ts @@ -1,4 +1,4 @@ -import type { OneOrMany } from '~/interfaces'; +import type { OneOrMany } from '../../interfaces/index.js'; export interface GetAttachments { /** The ID of the content to be queried for its attachments. */ diff --git a/src/api/parameters/getAuditRecords.ts b/packages/legacy/src/api/parameters/getAuditRecords.ts similarity index 100% rename from src/api/parameters/getAuditRecords.ts rename to packages/legacy/src/api/parameters/getAuditRecords.ts diff --git a/src/api/parameters/getAuditRecordsForTimePeriod.ts b/packages/legacy/src/api/parameters/getAuditRecordsForTimePeriod.ts similarity index 100% rename from src/api/parameters/getAuditRecordsForTimePeriod.ts rename to packages/legacy/src/api/parameters/getAuditRecordsForTimePeriod.ts diff --git a/src/api/parameters/getAvailableContentStates.ts b/packages/legacy/src/api/parameters/getAvailableContentStates.ts similarity index 100% rename from src/api/parameters/getAvailableContentStates.ts rename to packages/legacy/src/api/parameters/getAvailableContentStates.ts diff --git a/src/api/parameters/getBlueprintTemplates.ts b/packages/legacy/src/api/parameters/getBlueprintTemplates.ts similarity index 100% rename from src/api/parameters/getBlueprintTemplates.ts rename to packages/legacy/src/api/parameters/getBlueprintTemplates.ts diff --git a/src/api/parameters/getBulkUserLookup.ts b/packages/legacy/src/api/parameters/getBulkUserLookup.ts similarity index 100% rename from src/api/parameters/getBulkUserLookup.ts rename to packages/legacy/src/api/parameters/getBulkUserLookup.ts diff --git a/src/api/parameters/getContent.ts b/packages/legacy/src/api/parameters/getContent.ts similarity index 97% rename from src/api/parameters/getContent.ts rename to packages/legacy/src/api/parameters/getContent.ts index bdeed6ab..0c925040 100644 --- a/src/api/parameters/getContent.ts +++ b/packages/legacy/src/api/parameters/getContent.ts @@ -1,4 +1,4 @@ -import type { OneOrMany } from '~/interfaces'; +import type { OneOrMany } from '../../interfaces/index.js'; export interface GetContent { /** The type of content to return. */ diff --git a/src/api/parameters/getContentById.ts b/packages/legacy/src/api/parameters/getContentById.ts similarity index 97% rename from src/api/parameters/getContentById.ts rename to packages/legacy/src/api/parameters/getContentById.ts index 2462202a..272c70dd 100644 --- a/src/api/parameters/getContentById.ts +++ b/packages/legacy/src/api/parameters/getContentById.ts @@ -1,4 +1,4 @@ -import type { OneOrMany } from '~/interfaces'; +import type { OneOrMany } from '../../interfaces/index.js'; export interface GetContentById { /** diff --git a/src/api/parameters/getContentByTypeForSpace.ts b/packages/legacy/src/api/parameters/getContentByTypeForSpace.ts similarity index 100% rename from src/api/parameters/getContentByTypeForSpace.ts rename to packages/legacy/src/api/parameters/getContentByTypeForSpace.ts diff --git a/src/api/parameters/getContentChildren.ts b/packages/legacy/src/api/parameters/getContentChildren.ts similarity index 93% rename from src/api/parameters/getContentChildren.ts rename to packages/legacy/src/api/parameters/getContentChildren.ts index 0e08c893..0e23d081 100644 --- a/src/api/parameters/getContentChildren.ts +++ b/packages/legacy/src/api/parameters/getContentChildren.ts @@ -1,4 +1,4 @@ -import type { OneOrMany } from '../../interfaces'; +import type { OneOrMany } from '../../interfaces/index.js'; export interface GetContentChildren { /** The ID of the content to be queried for its children. */ diff --git a/src/api/parameters/getContentChildrenByType.ts b/packages/legacy/src/api/parameters/getContentChildrenByType.ts similarity index 100% rename from src/api/parameters/getContentChildrenByType.ts rename to packages/legacy/src/api/parameters/getContentChildrenByType.ts diff --git a/src/api/parameters/getContentComments.ts b/packages/legacy/src/api/parameters/getContentComments.ts similarity index 100% rename from src/api/parameters/getContentComments.ts rename to packages/legacy/src/api/parameters/getContentComments.ts diff --git a/src/api/parameters/getContentDescendants.ts b/packages/legacy/src/api/parameters/getContentDescendants.ts similarity index 100% rename from src/api/parameters/getContentDescendants.ts rename to packages/legacy/src/api/parameters/getContentDescendants.ts diff --git a/src/api/parameters/getContentForSpace.ts b/packages/legacy/src/api/parameters/getContentForSpace.ts similarity index 100% rename from src/api/parameters/getContentForSpace.ts rename to packages/legacy/src/api/parameters/getContentForSpace.ts diff --git a/src/api/parameters/getContentProperties.ts b/packages/legacy/src/api/parameters/getContentProperties.ts similarity index 100% rename from src/api/parameters/getContentProperties.ts rename to packages/legacy/src/api/parameters/getContentProperties.ts diff --git a/src/api/parameters/getContentProperty.ts b/packages/legacy/src/api/parameters/getContentProperty.ts similarity index 100% rename from src/api/parameters/getContentProperty.ts rename to packages/legacy/src/api/parameters/getContentProperty.ts diff --git a/src/api/parameters/getContentRestrictionStatusForUser.ts b/packages/legacy/src/api/parameters/getContentRestrictionStatusForUser.ts similarity index 100% rename from src/api/parameters/getContentRestrictionStatusForUser.ts rename to packages/legacy/src/api/parameters/getContentRestrictionStatusForUser.ts diff --git a/src/api/parameters/getContentState.ts b/packages/legacy/src/api/parameters/getContentState.ts similarity index 100% rename from src/api/parameters/getContentState.ts rename to packages/legacy/src/api/parameters/getContentState.ts diff --git a/src/api/parameters/getContentStateSettings.ts b/packages/legacy/src/api/parameters/getContentStateSettings.ts similarity index 100% rename from src/api/parameters/getContentStateSettings.ts rename to packages/legacy/src/api/parameters/getContentStateSettings.ts diff --git a/src/api/parameters/getContentTemplate.ts b/packages/legacy/src/api/parameters/getContentTemplate.ts similarity index 100% rename from src/api/parameters/getContentTemplate.ts rename to packages/legacy/src/api/parameters/getContentTemplate.ts diff --git a/src/api/parameters/getContentTemplates.ts b/packages/legacy/src/api/parameters/getContentTemplates.ts similarity index 100% rename from src/api/parameters/getContentTemplates.ts rename to packages/legacy/src/api/parameters/getContentTemplates.ts diff --git a/src/api/parameters/getContentVersion.ts b/packages/legacy/src/api/parameters/getContentVersion.ts similarity index 100% rename from src/api/parameters/getContentVersion.ts rename to packages/legacy/src/api/parameters/getContentVersion.ts diff --git a/src/api/parameters/getContentVersions.ts b/packages/legacy/src/api/parameters/getContentVersions.ts similarity index 100% rename from src/api/parameters/getContentVersions.ts rename to packages/legacy/src/api/parameters/getContentVersions.ts diff --git a/src/api/parameters/getContentWatchStatus.ts b/packages/legacy/src/api/parameters/getContentWatchStatus.ts similarity index 100% rename from src/api/parameters/getContentWatchStatus.ts rename to packages/legacy/src/api/parameters/getContentWatchStatus.ts diff --git a/src/api/parameters/getContentsWithState.ts b/packages/legacy/src/api/parameters/getContentsWithState.ts similarity index 100% rename from src/api/parameters/getContentsWithState.ts rename to packages/legacy/src/api/parameters/getContentsWithState.ts diff --git a/src/api/parameters/getCurrentUser.ts b/packages/legacy/src/api/parameters/getCurrentUser.ts similarity index 100% rename from src/api/parameters/getCurrentUser.ts rename to packages/legacy/src/api/parameters/getCurrentUser.ts diff --git a/src/api/parameters/getDescendantsOfType.ts b/packages/legacy/src/api/parameters/getDescendantsOfType.ts similarity index 96% rename from src/api/parameters/getDescendantsOfType.ts rename to packages/legacy/src/api/parameters/getDescendantsOfType.ts index 3368c78f..c40b5620 100644 --- a/src/api/parameters/getDescendantsOfType.ts +++ b/packages/legacy/src/api/parameters/getDescendantsOfType.ts @@ -1,4 +1,4 @@ -import type { OneOrMany } from '~/interfaces'; +import type { OneOrMany } from '../../interfaces/index.js'; export interface GetDescendantsOfType { /** The ID of the content to be queried for its descendants. */ diff --git a/src/api/parameters/getGroupByGroupId.ts b/packages/legacy/src/api/parameters/getGroupByGroupId.ts similarity index 100% rename from src/api/parameters/getGroupByGroupId.ts rename to packages/legacy/src/api/parameters/getGroupByGroupId.ts diff --git a/src/api/parameters/getGroupMembersByGroupId.ts b/packages/legacy/src/api/parameters/getGroupMembersByGroupId.ts similarity index 100% rename from src/api/parameters/getGroupMembersByGroupId.ts rename to packages/legacy/src/api/parameters/getGroupMembersByGroupId.ts diff --git a/packages/legacy/src/api/parameters/getGroupMembershipsForUser.ts b/packages/legacy/src/api/parameters/getGroupMembershipsForUser.ts new file mode 100644 index 00000000..1cc1b572 --- /dev/null +++ b/packages/legacy/src/api/parameters/getGroupMembershipsForUser.ts @@ -0,0 +1,11 @@ +export interface GetGroupMembershipsForUser { + /** + * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, + * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. + */ + accountId: string; + /** The starting index of the returned groups. */ + start?: number; + /** The maximum number of groups to return per page. Note, this may be restricted by fixed system limits. */ + limit?: number; +} diff --git a/src/api/parameters/getGroups.ts b/packages/legacy/src/api/parameters/getGroups.ts similarity index 100% rename from src/api/parameters/getGroups.ts rename to packages/legacy/src/api/parameters/getGroups.ts diff --git a/src/api/parameters/getHistoryForContent.ts b/packages/legacy/src/api/parameters/getHistoryForContent.ts similarity index 100% rename from src/api/parameters/getHistoryForContent.ts rename to packages/legacy/src/api/parameters/getHistoryForContent.ts diff --git a/src/api/parameters/getIndividualGroupRestrictionStatusByGroupId.ts b/packages/legacy/src/api/parameters/getIndividualGroupRestrictionStatusByGroupId.ts similarity index 100% rename from src/api/parameters/getIndividualGroupRestrictionStatusByGroupId.ts rename to packages/legacy/src/api/parameters/getIndividualGroupRestrictionStatusByGroupId.ts diff --git a/src/api/parameters/getLabelsForContent.ts b/packages/legacy/src/api/parameters/getLabelsForContent.ts similarity index 100% rename from src/api/parameters/getLabelsForContent.ts rename to packages/legacy/src/api/parameters/getLabelsForContent.ts diff --git a/src/api/parameters/getLabelsForSpace.ts b/packages/legacy/src/api/parameters/getLabelsForSpace.ts similarity index 100% rename from src/api/parameters/getLabelsForSpace.ts rename to packages/legacy/src/api/parameters/getLabelsForSpace.ts diff --git a/src/api/parameters/getLookAndFeelSettings.ts b/packages/legacy/src/api/parameters/getLookAndFeelSettings.ts similarity index 100% rename from src/api/parameters/getLookAndFeelSettings.ts rename to packages/legacy/src/api/parameters/getLookAndFeelSettings.ts diff --git a/src/api/parameters/getMacroBodyByMacroId.ts b/packages/legacy/src/api/parameters/getMacroBodyByMacroId.ts similarity index 100% rename from src/api/parameters/getMacroBodyByMacroId.ts rename to packages/legacy/src/api/parameters/getMacroBodyByMacroId.ts diff --git a/src/api/parameters/getPrivacyUnsafeUserEmail.ts b/packages/legacy/src/api/parameters/getPrivacyUnsafeUserEmail.ts similarity index 100% rename from src/api/parameters/getPrivacyUnsafeUserEmail.ts rename to packages/legacy/src/api/parameters/getPrivacyUnsafeUserEmail.ts diff --git a/src/api/parameters/getPrivacyUnsafeUserEmailBulk.ts b/packages/legacy/src/api/parameters/getPrivacyUnsafeUserEmailBulk.ts similarity index 100% rename from src/api/parameters/getPrivacyUnsafeUserEmailBulk.ts rename to packages/legacy/src/api/parameters/getPrivacyUnsafeUserEmailBulk.ts diff --git a/src/api/parameters/getRelationship.ts b/packages/legacy/src/api/parameters/getRelationship.ts similarity index 100% rename from src/api/parameters/getRelationship.ts rename to packages/legacy/src/api/parameters/getRelationship.ts diff --git a/src/api/parameters/getRestrictions.ts b/packages/legacy/src/api/parameters/getRestrictions.ts similarity index 100% rename from src/api/parameters/getRestrictions.ts rename to packages/legacy/src/api/parameters/getRestrictions.ts diff --git a/src/api/parameters/getRestrictionsByOperation.ts b/packages/legacy/src/api/parameters/getRestrictionsByOperation.ts similarity index 100% rename from src/api/parameters/getRestrictionsByOperation.ts rename to packages/legacy/src/api/parameters/getRestrictionsByOperation.ts diff --git a/src/api/parameters/getRestrictionsForOperation.ts b/packages/legacy/src/api/parameters/getRestrictionsForOperation.ts similarity index 100% rename from src/api/parameters/getRestrictionsForOperation.ts rename to packages/legacy/src/api/parameters/getRestrictionsForOperation.ts diff --git a/src/api/parameters/getSpace.ts b/packages/legacy/src/api/parameters/getSpace.ts similarity index 100% rename from src/api/parameters/getSpace.ts rename to packages/legacy/src/api/parameters/getSpace.ts diff --git a/src/api/parameters/getSpaceContentStates.ts b/packages/legacy/src/api/parameters/getSpaceContentStates.ts similarity index 100% rename from src/api/parameters/getSpaceContentStates.ts rename to packages/legacy/src/api/parameters/getSpaceContentStates.ts diff --git a/src/api/parameters/getSpaceProperties.ts b/packages/legacy/src/api/parameters/getSpaceProperties.ts similarity index 100% rename from src/api/parameters/getSpaceProperties.ts rename to packages/legacy/src/api/parameters/getSpaceProperties.ts diff --git a/src/api/parameters/getSpaceProperty.ts b/packages/legacy/src/api/parameters/getSpaceProperty.ts similarity index 100% rename from src/api/parameters/getSpaceProperty.ts rename to packages/legacy/src/api/parameters/getSpaceProperty.ts diff --git a/src/api/parameters/getSpaceSettings.ts b/packages/legacy/src/api/parameters/getSpaceSettings.ts similarity index 100% rename from src/api/parameters/getSpaceSettings.ts rename to packages/legacy/src/api/parameters/getSpaceSettings.ts diff --git a/src/api/parameters/getSpaceTheme.ts b/packages/legacy/src/api/parameters/getSpaceTheme.ts similarity index 100% rename from src/api/parameters/getSpaceTheme.ts rename to packages/legacy/src/api/parameters/getSpaceTheme.ts diff --git a/src/api/parameters/getSpaces.ts b/packages/legacy/src/api/parameters/getSpaces.ts similarity index 100% rename from src/api/parameters/getSpaces.ts rename to packages/legacy/src/api/parameters/getSpaces.ts diff --git a/src/api/parameters/getTask.ts b/packages/legacy/src/api/parameters/getTask.ts similarity index 100% rename from src/api/parameters/getTask.ts rename to packages/legacy/src/api/parameters/getTask.ts diff --git a/src/api/parameters/getTaskById.ts b/packages/legacy/src/api/parameters/getTaskById.ts similarity index 100% rename from src/api/parameters/getTaskById.ts rename to packages/legacy/src/api/parameters/getTaskById.ts diff --git a/src/api/parameters/getTasks.ts b/packages/legacy/src/api/parameters/getTasks.ts similarity index 100% rename from src/api/parameters/getTasks.ts rename to packages/legacy/src/api/parameters/getTasks.ts diff --git a/src/api/parameters/getTheme.ts b/packages/legacy/src/api/parameters/getTheme.ts similarity index 100% rename from src/api/parameters/getTheme.ts rename to packages/legacy/src/api/parameters/getTheme.ts diff --git a/src/api/parameters/getThemes.ts b/packages/legacy/src/api/parameters/getThemes.ts similarity index 100% rename from src/api/parameters/getThemes.ts rename to packages/legacy/src/api/parameters/getThemes.ts diff --git a/src/api/parameters/getUser.ts b/packages/legacy/src/api/parameters/getUser.ts similarity index 69% rename from src/api/parameters/getUser.ts rename to packages/legacy/src/api/parameters/getUser.ts index 93ac79e9..0290e35f 100644 --- a/src/api/parameters/getUser.ts +++ b/packages/legacy/src/api/parameters/getUser.ts @@ -1,18 +1,4 @@ export interface GetUser { - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - * - * @deprecated Will be removed in next major version. - */ - key?: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - * - * @deprecated Will be removed in next major version. - */ - username?: string; /** * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. diff --git a/src/api/parameters/getUserProperties.ts b/packages/legacy/src/api/parameters/getUserProperties.ts similarity index 100% rename from src/api/parameters/getUserProperties.ts rename to packages/legacy/src/api/parameters/getUserProperties.ts diff --git a/src/api/parameters/getUserProperty.ts b/packages/legacy/src/api/parameters/getUserProperty.ts similarity index 100% rename from src/api/parameters/getUserProperty.ts rename to packages/legacy/src/api/parameters/getUserProperty.ts diff --git a/src/api/parameters/getViewers.ts b/packages/legacy/src/api/parameters/getViewers.ts similarity index 100% rename from src/api/parameters/getViewers.ts rename to packages/legacy/src/api/parameters/getViewers.ts diff --git a/src/api/parameters/getViews.ts b/packages/legacy/src/api/parameters/getViews.ts similarity index 100% rename from src/api/parameters/getViews.ts rename to packages/legacy/src/api/parameters/getViews.ts diff --git a/src/api/parameters/getWatchersForSpace.ts b/packages/legacy/src/api/parameters/getWatchersForSpace.ts similarity index 100% rename from src/api/parameters/getWatchersForSpace.ts rename to packages/legacy/src/api/parameters/getWatchersForSpace.ts diff --git a/src/api/parameters/getWatchesForPage.ts b/packages/legacy/src/api/parameters/getWatchesForPage.ts similarity index 100% rename from src/api/parameters/getWatchesForPage.ts rename to packages/legacy/src/api/parameters/getWatchesForPage.ts diff --git a/src/api/parameters/getWatchesForSpace.ts b/packages/legacy/src/api/parameters/getWatchesForSpace.ts similarity index 100% rename from src/api/parameters/getWatchesForSpace.ts rename to packages/legacy/src/api/parameters/getWatchesForSpace.ts diff --git a/packages/legacy/src/api/parameters/index.ts b/packages/legacy/src/api/parameters/index.ts new file mode 100644 index 00000000..f8c20b4d --- /dev/null +++ b/packages/legacy/src/api/parameters/index.ts @@ -0,0 +1,319 @@ +export * from './addContentWatcher.js'; + +export * from './addCustomContentPermissions.js'; + +export * from './addGroupToContentRestrictionByGroupId.js'; + +export * from './addLabelsToContent.js'; + +export * from './addLabelsToSpace.js'; + +export * from './addLabelWatcher.js'; + +export * from './addPermissionToSpace.js'; + +export * from './addRestrictions.js'; + +export * from './addSpaceWatcher.js'; + +export * from './addUserToContentRestriction.js'; + +export * from './addUserToGroup.js'; + +export * from './addUserToGroupByGroupId.js'; + +export * from './archivePages.js'; + +export * from './asyncConvertContentBodyRequest.js'; + +export * from './asyncConvertContentBodyResponse.js'; + +export * from './bulkAsyncConvertContentBodyRequest.js'; + +export * from './bulkAsyncConvertContentBodyResponse.js'; + +export * from './checkContentPermission.js'; + +export * from './convertContentBody.js'; + +export * from './copyPage.js'; + +export * from './copyPageHierarchy.js'; + +export * from './createAttachments.js'; + +export * from './createAuditRecord.js'; + +export * from './createContent.js'; + +export * from './createContentProperty.js'; + +export * from './createContentPropertyForKey.js'; + +export * from './createContentTemplate.js'; + +export * from './createGroup.js'; + +export * from './createOrUpdateAttachments.js'; + +export * from './createPrivateSpace.js'; + +export * from './createRelationship.js'; + +export * from './createSpace.js'; + +export * from './createSpaceProperty.js'; + +export * from './createSpacePropertyForKey.js'; + +export * from './createUserProperty.js'; + +export * from './deleteContent.js'; + +export * from './deleteContentProperty.js'; + +export * from './deleteContentVersion.js'; + +export * from './deleteGroupById.js'; + +export * from './deleteLabelFromSpace.js'; + +export * from './deletePageTree.js'; + +export * from './deleteRelationship.js'; + +export * from './deleteRestrictions.js'; + +export * from './deleteSpace.js'; + +export * from './deleteSpaceProperty.js'; + +export * from './deleteUserProperty.js'; + +export * from './downloadAttachment.js'; + +export * from './exportAuditRecords.js'; + +export * from './findSourcesForTarget.js'; + +export * from './findTargetFromSource.js'; + +export * from './getAllLabelContent.js'; + +export * from './getAndAsyncConvertMacroBodyByMacroId.js'; + +export * from './getAndConvertMacroBodyByMacroId.js'; + +export * from './getAnonymousUser.js'; + +export * from './getAttachments.js'; + +export * from './getAuditRecords.js'; + +export * from './getAuditRecordsForTimePeriod.js'; + +export * from './getAvailableContentStates.js'; + +export * from './getBlueprintTemplates.js'; + +export * from './getBulkUserLookup.js'; + +export * from './getContent.js'; + +export * from './getContentById.js'; + +export * from './getContentByTypeForSpace.js'; + +export * from './getContentChildren.js'; + +export * from './getContentChildrenByType.js'; + +export * from './getContentComments.js'; + +export * from './getContentDescendants.js'; + +export * from './getContentForSpace.js'; + +export * from './getContentProperties.js'; + +export * from './getContentProperty.js'; + +export * from './getContentRestrictionStatusForUser.js'; + +export * from './getContentState.js'; + +export * from './getContentStateSettings.js'; + +export * from './getContentsWithState.js'; + +export * from './getContentTemplate.js'; + +export * from './getContentTemplates.js'; + +export * from './getContentVersion.js'; + +export * from './getContentVersions.js'; + +export * from './getContentWatchStatus.js'; + +export * from './getCurrentUser.js'; + +export * from './getDescendantsOfType.js'; + +export * from './getGroupByGroupId.js'; + +export * from './getGroupMembersByGroupId.js'; + +export * from './getGroupMembershipsForUser.js'; + +export * from './getGroups.js'; + +export * from './getHistoryForContent.js'; + +export * from './getIndividualGroupRestrictionStatusByGroupId.js'; + +export * from './getLabelsForContent.js'; + +export * from './getLabelsForSpace.js'; + +export * from './getLookAndFeelSettings.js'; + +export * from './getMacroBodyByMacroId.js'; + +export * from './getPrivacyUnsafeUserEmail.js'; + +export * from './getPrivacyUnsafeUserEmailBulk.js'; + +export * from './getRelationship.js'; + +export * from './getRestrictions.js'; + +export * from './getRestrictionsByOperation.js'; + +export * from './getRestrictionsForOperation.js'; + +export * from './getSpace.js'; + +export * from './getSpaceContentStates.js'; + +export * from './getSpaceProperties.js'; + +export * from './getSpaceProperty.js'; + +export * from './getSpaces.js'; + +export * from './getSpaceSettings.js'; + +export * from './getSpaceTheme.js'; + +export * from './getTask.js'; + +export * from './getTaskById.js'; + +export * from './getTasks.js'; + +export * from './getTheme.js'; + +export * from './getThemes.js'; + +export * from './getUser.js'; + +export * from './getUserProperties.js'; + +export * from './getUserProperty.js'; + +export * from './getViewers.js'; + +export * from './getViews.js'; + +export * from './getWatchersForSpace.js'; + +export * from './getWatchesForPage.js'; + +export * from './getWatchesForSpace.js'; + +export * from './isWatchingLabel.js'; + +export * from './isWatchingSpace.js'; + +export * from './movePage.js'; + +export * from './publishLegacyDraft.js'; + +export * from './publishSharedDraft.js'; + +export * from './registerModules.js'; + +export * from './removeContentState.js'; + +export * from './removeContentWatcher.js'; + +export * from './removeGroupById.js'; + +export * from './removeLabelFromContent.js'; + +export * from './removeLabelFromContentUsingQueryParameter.js'; + +export * from './removeLabelWatcher.js'; + +export * from './removeMemberFromGroup.js'; + +export * from './removeMemberFromGroupByGroupId.js'; + +export * from './removeModules.js'; + +export * from './removePermission.js'; + +export * from './removeSpaceWatch.js'; + +export * from './removeTemplate.js'; + +export * from './removeUserFromContentRestriction.js'; + +export * from './resetLookAndFeelSettings.js'; + +export * from './resetSpaceTheme.js'; + +export * from './restoreContentVersion.js'; + +export * from './searchByCQL.js'; + +export * from './searchContentByCQL.js'; + +export * from './searchGroups.js'; + +export * from './searchTasks.js'; + +export * from './searchUser.js'; + +export * from './setContentState.js'; + +export * from './setRetentionPeriod.js'; + +export * from './setSpaceTheme.js'; + +export * from './updateAttachmentData.js'; + +export * from './updateAttachmentProperties.js'; + +export * from './updateContent.js'; + +export * from './updateContentProperty.js'; + +export * from './updateContentTemplate.js'; + +export * from './updateLookAndFeel.js'; + +export * from './updateLookAndFeelSettings.js'; + +export * from './updateRestrictions.js'; + +export * from './updateSpace.js'; + +export * from './updateSpaceProperty.js'; + +export * from './updateSpaceSettings.js'; + +export * from './updateTaskById.js'; + +export * from './updateUserProperty.js'; diff --git a/src/api/parameters/isWatchingLabel.ts b/packages/legacy/src/api/parameters/isWatchingLabel.ts similarity index 100% rename from src/api/parameters/isWatchingLabel.ts rename to packages/legacy/src/api/parameters/isWatchingLabel.ts diff --git a/src/api/parameters/isWatchingSpace.ts b/packages/legacy/src/api/parameters/isWatchingSpace.ts similarity index 100% rename from src/api/parameters/isWatchingSpace.ts rename to packages/legacy/src/api/parameters/isWatchingSpace.ts diff --git a/src/api/parameters/movePage.ts b/packages/legacy/src/api/parameters/movePage.ts similarity index 100% rename from src/api/parameters/movePage.ts rename to packages/legacy/src/api/parameters/movePage.ts diff --git a/src/api/parameters/publishLegacyDraft.ts b/packages/legacy/src/api/parameters/publishLegacyDraft.ts similarity index 89% rename from src/api/parameters/publishLegacyDraft.ts rename to packages/legacy/src/api/parameters/publishLegacyDraft.ts index 81363275..4e8e4693 100644 --- a/src/api/parameters/publishLegacyDraft.ts +++ b/packages/legacy/src/api/parameters/publishLegacyDraft.ts @@ -1,4 +1,4 @@ -import type { ContentBlueprintDraft } from '../models'; +import type { ContentBlueprintDraft } from '../models/index.js'; export interface PublishLegacyDraft extends ContentBlueprintDraft { /** diff --git a/src/api/parameters/publishSharedDraft.ts b/packages/legacy/src/api/parameters/publishSharedDraft.ts similarity index 89% rename from src/api/parameters/publishSharedDraft.ts rename to packages/legacy/src/api/parameters/publishSharedDraft.ts index d49acbf9..f2e665ee 100644 --- a/src/api/parameters/publishSharedDraft.ts +++ b/packages/legacy/src/api/parameters/publishSharedDraft.ts @@ -1,4 +1,4 @@ -import type { ContentBlueprintDraft } from '../models'; +import type { ContentBlueprintDraft } from '../models/index.js'; export interface PublishSharedDraft extends ContentBlueprintDraft { /** diff --git a/packages/legacy/src/api/parameters/registerModules.ts b/packages/legacy/src/api/parameters/registerModules.ts new file mode 100644 index 00000000..294142ed --- /dev/null +++ b/packages/legacy/src/api/parameters/registerModules.ts @@ -0,0 +1,3 @@ +import type { ConnectModules } from '../models/index.js'; + +export type RegisterModules = ConnectModules; diff --git a/src/api/parameters/removeContentState.ts b/packages/legacy/src/api/parameters/removeContentState.ts similarity index 100% rename from src/api/parameters/removeContentState.ts rename to packages/legacy/src/api/parameters/removeContentState.ts diff --git a/src/api/parameters/removeContentWatcher.ts b/packages/legacy/src/api/parameters/removeContentWatcher.ts similarity index 100% rename from src/api/parameters/removeContentWatcher.ts rename to packages/legacy/src/api/parameters/removeContentWatcher.ts diff --git a/src/api/parameters/removeGroupById.ts b/packages/legacy/src/api/parameters/removeGroupById.ts similarity index 100% rename from src/api/parameters/removeGroupById.ts rename to packages/legacy/src/api/parameters/removeGroupById.ts diff --git a/src/api/parameters/removeLabelFromContent.ts b/packages/legacy/src/api/parameters/removeLabelFromContent.ts similarity index 100% rename from src/api/parameters/removeLabelFromContent.ts rename to packages/legacy/src/api/parameters/removeLabelFromContent.ts diff --git a/src/api/parameters/removeLabelFromContentUsingQueryParameter.ts b/packages/legacy/src/api/parameters/removeLabelFromContentUsingQueryParameter.ts similarity index 100% rename from src/api/parameters/removeLabelFromContentUsingQueryParameter.ts rename to packages/legacy/src/api/parameters/removeLabelFromContentUsingQueryParameter.ts diff --git a/src/api/parameters/removeLabelWatcher.ts b/packages/legacy/src/api/parameters/removeLabelWatcher.ts similarity index 100% rename from src/api/parameters/removeLabelWatcher.ts rename to packages/legacy/src/api/parameters/removeLabelWatcher.ts diff --git a/src/api/parameters/removeMemberFromGroup.ts b/packages/legacy/src/api/parameters/removeMemberFromGroup.ts similarity index 100% rename from src/api/parameters/removeMemberFromGroup.ts rename to packages/legacy/src/api/parameters/removeMemberFromGroup.ts diff --git a/src/api/parameters/removeMemberFromGroupByGroupId.ts b/packages/legacy/src/api/parameters/removeMemberFromGroupByGroupId.ts similarity index 100% rename from src/api/parameters/removeMemberFromGroupByGroupId.ts rename to packages/legacy/src/api/parameters/removeMemberFromGroupByGroupId.ts diff --git a/src/api/parameters/removeModules.ts b/packages/legacy/src/api/parameters/removeModules.ts similarity index 100% rename from src/api/parameters/removeModules.ts rename to packages/legacy/src/api/parameters/removeModules.ts diff --git a/src/api/parameters/removePermission.ts b/packages/legacy/src/api/parameters/removePermission.ts similarity index 100% rename from src/api/parameters/removePermission.ts rename to packages/legacy/src/api/parameters/removePermission.ts diff --git a/src/api/parameters/removeSpaceWatch.ts b/packages/legacy/src/api/parameters/removeSpaceWatch.ts similarity index 100% rename from src/api/parameters/removeSpaceWatch.ts rename to packages/legacy/src/api/parameters/removeSpaceWatch.ts diff --git a/src/api/parameters/removeTemplate.ts b/packages/legacy/src/api/parameters/removeTemplate.ts similarity index 100% rename from src/api/parameters/removeTemplate.ts rename to packages/legacy/src/api/parameters/removeTemplate.ts diff --git a/src/api/parameters/removeUserFromContentRestriction.ts b/packages/legacy/src/api/parameters/removeUserFromContentRestriction.ts similarity index 100% rename from src/api/parameters/removeUserFromContentRestriction.ts rename to packages/legacy/src/api/parameters/removeUserFromContentRestriction.ts diff --git a/src/api/parameters/resetLookAndFeelSettings.ts b/packages/legacy/src/api/parameters/resetLookAndFeelSettings.ts similarity index 100% rename from src/api/parameters/resetLookAndFeelSettings.ts rename to packages/legacy/src/api/parameters/resetLookAndFeelSettings.ts diff --git a/src/api/parameters/resetSpaceTheme.ts b/packages/legacy/src/api/parameters/resetSpaceTheme.ts similarity index 100% rename from src/api/parameters/resetSpaceTheme.ts rename to packages/legacy/src/api/parameters/resetSpaceTheme.ts diff --git a/src/api/parameters/restoreContentVersion.ts b/packages/legacy/src/api/parameters/restoreContentVersion.ts similarity index 88% rename from src/api/parameters/restoreContentVersion.ts rename to packages/legacy/src/api/parameters/restoreContentVersion.ts index 5ba0e064..2408a2ab 100644 --- a/src/api/parameters/restoreContentVersion.ts +++ b/packages/legacy/src/api/parameters/restoreContentVersion.ts @@ -1,4 +1,4 @@ -import type { VersionRestore } from '../models'; +import type { VersionRestore } from '../models/index.js'; export interface RestoreContentVersion extends VersionRestore { /** The ID of the content for which the history will be restored. */ diff --git a/src/api/parameters/searchByCQL.ts b/packages/legacy/src/api/parameters/searchByCQL.ts similarity index 100% rename from src/api/parameters/searchByCQL.ts rename to packages/legacy/src/api/parameters/searchByCQL.ts diff --git a/src/api/parameters/searchContentByCQL.ts b/packages/legacy/src/api/parameters/searchContentByCQL.ts similarity index 100% rename from src/api/parameters/searchContentByCQL.ts rename to packages/legacy/src/api/parameters/searchContentByCQL.ts diff --git a/src/api/parameters/searchGroups.ts b/packages/legacy/src/api/parameters/searchGroups.ts similarity index 100% rename from src/api/parameters/searchGroups.ts rename to packages/legacy/src/api/parameters/searchGroups.ts diff --git a/src/api/parameters/searchTasks.ts b/packages/legacy/src/api/parameters/searchTasks.ts similarity index 100% rename from src/api/parameters/searchTasks.ts rename to packages/legacy/src/api/parameters/searchTasks.ts diff --git a/src/api/parameters/searchUser.ts b/packages/legacy/src/api/parameters/searchUser.ts similarity index 100% rename from src/api/parameters/searchUser.ts rename to packages/legacy/src/api/parameters/searchUser.ts diff --git a/src/api/parameters/setContentState.ts b/packages/legacy/src/api/parameters/setContentState.ts similarity index 86% rename from src/api/parameters/setContentState.ts rename to packages/legacy/src/api/parameters/setContentState.ts index b690926a..c38f86da 100644 --- a/src/api/parameters/setContentState.ts +++ b/packages/legacy/src/api/parameters/setContentState.ts @@ -1,4 +1,4 @@ -import type { ContentStateRestInput } from '../models'; +import type { ContentStateRestInput } from '../models/index.js'; export interface SetContentState extends ContentStateRestInput { /** The Id of the content whose content state is to be set. */ diff --git a/src/api/parameters/setRetentionPeriod.ts b/packages/legacy/src/api/parameters/setRetentionPeriod.ts similarity index 52% rename from src/api/parameters/setRetentionPeriod.ts rename to packages/legacy/src/api/parameters/setRetentionPeriod.ts index 63017408..fb69b41f 100644 --- a/src/api/parameters/setRetentionPeriod.ts +++ b/packages/legacy/src/api/parameters/setRetentionPeriod.ts @@ -1,3 +1,3 @@ -import type { RetentionPeriod } from '../models'; +import type { RetentionPeriod } from '../models/index.js'; export interface SetRetentionPeriod extends RetentionPeriod {} diff --git a/src/api/parameters/setSpaceTheme.ts b/packages/legacy/src/api/parameters/setSpaceTheme.ts similarity index 69% rename from src/api/parameters/setSpaceTheme.ts rename to packages/legacy/src/api/parameters/setSpaceTheme.ts index 5dbe0346..00ec228f 100644 --- a/src/api/parameters/setSpaceTheme.ts +++ b/packages/legacy/src/api/parameters/setSpaceTheme.ts @@ -1,4 +1,4 @@ -import type { ThemeUpdate } from '../models'; +import type { ThemeUpdate } from '../models/index.js'; export interface SetSpaceTheme extends ThemeUpdate { /** The key of the space to set the theme for. */ diff --git a/src/api/parameters/updateAttachmentData.ts b/packages/legacy/src/api/parameters/updateAttachmentData.ts similarity index 69% rename from src/api/parameters/updateAttachmentData.ts rename to packages/legacy/src/api/parameters/updateAttachmentData.ts index 8c71db1a..9235465f 100644 --- a/src/api/parameters/updateAttachmentData.ts +++ b/packages/legacy/src/api/parameters/updateAttachmentData.ts @@ -1,5 +1,5 @@ -import type { CreateAttachments } from './createAttachments'; -import type { ExtractBaseType } from '~/interfaces'; +import type { CreateAttachments } from './createAttachments.js'; +import type { ExtractBaseType } from '../../interfaces/index.js'; export interface UpdateAttachmentData { /** The ID of the content that the attachment is attached to. */ diff --git a/src/api/parameters/updateAttachmentProperties.ts b/packages/legacy/src/api/parameters/updateAttachmentProperties.ts similarity index 98% rename from src/api/parameters/updateAttachmentProperties.ts rename to packages/legacy/src/api/parameters/updateAttachmentProperties.ts index 571666a6..18527e32 100644 --- a/src/api/parameters/updateAttachmentProperties.ts +++ b/packages/legacy/src/api/parameters/updateAttachmentProperties.ts @@ -10,7 +10,7 @@ import type { OperationCheckResult, Space, Version, -} from '../models'; +} from '../models/index.js'; export interface UpdateAttachmentProperties { /** The ID of the content that the attachment is attached to. */ diff --git a/src/api/parameters/updateContent.ts b/packages/legacy/src/api/parameters/updateContent.ts similarity index 93% rename from src/api/parameters/updateContent.ts rename to packages/legacy/src/api/parameters/updateContent.ts index a5b2ed89..8188fd64 100644 --- a/src/api/parameters/updateContent.ts +++ b/packages/legacy/src/api/parameters/updateContent.ts @@ -1,4 +1,4 @@ -import type { ContentUpdate } from '../models'; +import type { ContentUpdate } from '../models/index.js'; export interface UpdateContent extends ContentUpdate { /** The ID of the content to be updated. */ diff --git a/src/api/parameters/updateContentProperty.ts b/packages/legacy/src/api/parameters/updateContentProperty.ts similarity index 75% rename from src/api/parameters/updateContentProperty.ts rename to packages/legacy/src/api/parameters/updateContentProperty.ts index a9248224..28d07755 100644 --- a/src/api/parameters/updateContentProperty.ts +++ b/packages/legacy/src/api/parameters/updateContentProperty.ts @@ -1,4 +1,4 @@ -import type { ContentPropertyUpdate } from '../models'; +import type { ContentPropertyUpdate } from '../models/index.js'; export interface UpdateContentProperty extends ContentPropertyUpdate { /** The ID of the content that the property belongs to. */ diff --git a/src/api/parameters/updateContentTemplate.ts b/packages/legacy/src/api/parameters/updateContentTemplate.ts similarity index 66% rename from src/api/parameters/updateContentTemplate.ts rename to packages/legacy/src/api/parameters/updateContentTemplate.ts index 71f92c63..aa40f618 100644 --- a/src/api/parameters/updateContentTemplate.ts +++ b/packages/legacy/src/api/parameters/updateContentTemplate.ts @@ -1,4 +1,4 @@ -import type { ContentTemplateUpdate } from '../models'; +import type { ContentTemplateUpdate } from '../models/index.js'; /** This object is used to update content templates. */ export interface UpdateContentTemplate extends ContentTemplateUpdate {} diff --git a/src/api/parameters/updateLookAndFeel.ts b/packages/legacy/src/api/parameters/updateLookAndFeel.ts similarity index 51% rename from src/api/parameters/updateLookAndFeel.ts rename to packages/legacy/src/api/parameters/updateLookAndFeel.ts index 8116112c..5d251721 100644 --- a/src/api/parameters/updateLookAndFeel.ts +++ b/packages/legacy/src/api/parameters/updateLookAndFeel.ts @@ -1,3 +1,3 @@ -import type { LookAndFeelSelection } from '../models'; +import type { LookAndFeelSelection } from '../models/index.js'; export interface UpdateLookAndFeel extends LookAndFeelSelection {} diff --git a/src/api/parameters/updateLookAndFeelSettings.ts b/packages/legacy/src/api/parameters/updateLookAndFeelSettings.ts similarity index 82% rename from src/api/parameters/updateLookAndFeelSettings.ts rename to packages/legacy/src/api/parameters/updateLookAndFeelSettings.ts index 0bef68af..8a126228 100644 --- a/src/api/parameters/updateLookAndFeelSettings.ts +++ b/packages/legacy/src/api/parameters/updateLookAndFeelSettings.ts @@ -1,4 +1,4 @@ -import type { LookAndFeel } from '../models'; +import type { LookAndFeel } from '../models/index.js'; export interface UpdateLookAndFeelSettings extends LookAndFeel { /** diff --git a/src/api/parameters/updateRestrictions.ts b/packages/legacy/src/api/parameters/updateRestrictions.ts similarity index 89% rename from src/api/parameters/updateRestrictions.ts rename to packages/legacy/src/api/parameters/updateRestrictions.ts index 9e9c907e..eb96a9da 100644 --- a/src/api/parameters/updateRestrictions.ts +++ b/packages/legacy/src/api/parameters/updateRestrictions.ts @@ -1,4 +1,4 @@ -import type { ContentRestrictionUpdateArray } from '../models'; +import type { ContentRestrictionUpdateArray } from '../models/index.js'; export interface UpdateRestrictions { /** The ID of the content to update restrictions for. */ diff --git a/src/api/parameters/updateSpace.ts b/packages/legacy/src/api/parameters/updateSpace.ts similarity index 67% rename from src/api/parameters/updateSpace.ts rename to packages/legacy/src/api/parameters/updateSpace.ts index 02926e8e..28cebcf5 100644 --- a/src/api/parameters/updateSpace.ts +++ b/packages/legacy/src/api/parameters/updateSpace.ts @@ -1,4 +1,4 @@ -import type { SpaceUpdate } from '../models'; +import type { SpaceUpdate } from '../models/index.js'; export interface UpdateSpace extends SpaceUpdate { /** The key of the space to update. */ diff --git a/src/api/parameters/updateSpaceProperty.ts b/packages/legacy/src/api/parameters/updateSpaceProperty.ts similarity index 76% rename from src/api/parameters/updateSpaceProperty.ts rename to packages/legacy/src/api/parameters/updateSpaceProperty.ts index 4c4e095f..9b80a0ae 100644 --- a/src/api/parameters/updateSpaceProperty.ts +++ b/packages/legacy/src/api/parameters/updateSpaceProperty.ts @@ -1,4 +1,4 @@ -import type { SpacePropertyUpdate } from '../models'; +import type { SpacePropertyUpdate } from '../models/index.js'; export interface UpdateSpaceProperty extends SpacePropertyUpdate { /** The key of the space that the property is in. */ diff --git a/src/api/parameters/updateSpaceSettings.ts b/packages/legacy/src/api/parameters/updateSpaceSettings.ts similarity index 70% rename from src/api/parameters/updateSpaceSettings.ts rename to packages/legacy/src/api/parameters/updateSpaceSettings.ts index c835d3f8..92caf0a5 100644 --- a/src/api/parameters/updateSpaceSettings.ts +++ b/packages/legacy/src/api/parameters/updateSpaceSettings.ts @@ -1,4 +1,4 @@ -import type { SpaceSettingsUpdate } from '../models'; +import type { SpaceSettingsUpdate } from '../models/index.js'; export interface UpdateSpaceSettings extends SpaceSettingsUpdate { /** The key of the space whose settings will be updated. */ diff --git a/src/api/parameters/updateTaskById.ts b/packages/legacy/src/api/parameters/updateTaskById.ts similarity index 69% rename from src/api/parameters/updateTaskById.ts rename to packages/legacy/src/api/parameters/updateTaskById.ts index 7de7f4fe..52613a59 100644 --- a/src/api/parameters/updateTaskById.ts +++ b/packages/legacy/src/api/parameters/updateTaskById.ts @@ -1,4 +1,4 @@ -import type { TaskStatusUpdate } from '../models'; +import type { TaskStatusUpdate } from '../models/index.js'; export interface UpdateTaskById extends TaskStatusUpdate { /** Global ID of the inline task to update */ diff --git a/src/api/parameters/updateUserProperty.ts b/packages/legacy/src/api/parameters/updateUserProperty.ts similarity index 83% rename from src/api/parameters/updateUserProperty.ts rename to packages/legacy/src/api/parameters/updateUserProperty.ts index 7968204d..f8de5d4a 100644 --- a/src/api/parameters/updateUserProperty.ts +++ b/packages/legacy/src/api/parameters/updateUserProperty.ts @@ -1,4 +1,4 @@ -import type { UserPropertyUpdate } from '../models'; +import type { UserPropertyUpdate } from '../models/index.js'; export interface UpdateUserProperty extends UserPropertyUpdate { /** diff --git a/src/api/relation.ts b/packages/legacy/src/api/relation.ts similarity index 97% rename from src/api/relation.ts rename to packages/legacy/src/api/relation.ts index 43c0b84e..8c7eca35 100644 --- a/src/api/relation.ts +++ b/packages/legacy/src/api/relation.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class Relation { constructor(private client: Client) {} diff --git a/src/api/search.ts b/packages/legacy/src/api/search.ts similarity index 94% rename from src/api/search.ts rename to packages/legacy/src/api/search.ts index b4df14fc..57feef68 100644 --- a/src/api/search.ts +++ b/packages/legacy/src/api/search.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class Search { constructor(private client: Client) {} diff --git a/src/api/settings.ts b/packages/legacy/src/api/settings.ts similarity index 82% rename from src/api/settings.ts rename to packages/legacy/src/api/settings.ts index d7cdae05..2da5f4fa 100644 --- a/src/api/settings.ts +++ b/packages/legacy/src/api/settings.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class Settings { constructor(private client: Client) {} @@ -175,45 +175,6 @@ export class Settings { return this.client.sendRequest(config, callback); } - /** - * Sets the look and feel settings to either the default settings or the custom settings, for the site or a single - * space. Note, the default space settings are inherited from the current global settings. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async setLookAndFeelSettings( - parameters: Parameters.SetLookAndFeelSettings | undefined, - callback: Callback, - ): Promise; - /** - * Sets the look and feel settings to either the default settings or the custom settings, for the site or a single - * space. Note, the default space settings are inherited from the current global settings. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async setLookAndFeelSettings( - parameters?: Parameters.SetLookAndFeelSettings, - callback?: never, - ): Promise; - async setLookAndFeelSettings( - parameters?: Parameters.SetLookAndFeelSettings, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/settings/lookandfeel/selected', - method: 'PUT', - params: { - spaceKey: parameters?.spaceKey, - }, - }; - - return this.client.sendRequest(config, callback); - } - /** * Returns the system information for the Confluence Cloud tenant. This information is used by Atlassian. * diff --git a/src/api/space.ts b/packages/legacy/src/api/space.ts similarity index 97% rename from src/api/space.ts rename to packages/legacy/src/api/space.ts index ecfeb88e..01096bd3 100644 --- a/src/api/space.ts +++ b/packages/legacy/src/api/space.ts @@ -1,9 +1,9 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import { paramSerializer } from '../paramSerializer'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import { paramSerializer } from '../paramSerializer.js'; +import type { RequestConfig } from '../requestConfig.js'; export class Space { constructor(private client: Client) {} diff --git a/src/api/spacePermissions.ts b/packages/legacy/src/api/spacePermissions.ts similarity index 94% rename from src/api/spacePermissions.ts rename to packages/legacy/src/api/spacePermissions.ts index f1b14c4f..06dfb8a5 100644 --- a/src/api/spacePermissions.ts +++ b/packages/legacy/src/api/spacePermissions.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class SpacePermissions { constructor(private client: Client) {} diff --git a/src/api/spaceProperties.ts b/packages/legacy/src/api/spaceProperties.ts similarity index 96% rename from src/api/spaceProperties.ts rename to packages/legacy/src/api/spaceProperties.ts index b7fe0731..0d461b3f 100644 --- a/src/api/spaceProperties.ts +++ b/packages/legacy/src/api/spaceProperties.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Callback } from '../callback'; -import type { Client } from '../clients'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Callback } from '../callback.js'; +import type { Client } from '../clients/index.js'; +import type { RequestConfig } from '../requestConfig.js'; /** @deprecated Will be removed in next major version. */ export class SpaceProperties { diff --git a/src/api/spaceSettings.ts b/packages/legacy/src/api/spaceSettings.ts similarity index 89% rename from src/api/spaceSettings.ts rename to packages/legacy/src/api/spaceSettings.ts index aab1685b..e5ede67f 100644 --- a/src/api/spaceSettings.ts +++ b/packages/legacy/src/api/spaceSettings.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class SpaceSettings { constructor(private client: Client) {} diff --git a/src/api/template.ts b/packages/legacy/src/api/template.ts similarity index 97% rename from src/api/template.ts rename to packages/legacy/src/api/template.ts index 52975269..47d755cc 100644 --- a/src/api/template.ts +++ b/packages/legacy/src/api/template.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class Template { constructor(private client: Client) {} diff --git a/src/api/themes.ts b/packages/legacy/src/api/themes.ts similarity index 95% rename from src/api/themes.ts rename to packages/legacy/src/api/themes.ts index b95f09e4..0b985d9c 100644 --- a/src/api/themes.ts +++ b/packages/legacy/src/api/themes.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class Themes { constructor(private client: Client) {} diff --git a/src/api/userProperties.ts b/packages/legacy/src/api/userProperties.ts similarity index 97% rename from src/api/userProperties.ts rename to packages/legacy/src/api/userProperties.ts index a5fcba89..b22e33d2 100644 --- a/src/api/userProperties.ts +++ b/packages/legacy/src/api/userProperties.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class UserProperties { constructor(private client: Client) {} diff --git a/src/api/users.ts b/packages/legacy/src/api/users.ts similarity index 83% rename from src/api/users.ts rename to packages/legacy/src/api/users.ts index a2c97e29..f23e3da1 100644 --- a/src/api/users.ts +++ b/packages/legacy/src/api/users.ts @@ -1,8 +1,8 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type * as Models from './models/index.js'; +import type * as Parameters from './parameters/index.js'; +import type { Client } from '../clients/index.js'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export class Users { constructor(private client: Client) {} @@ -34,8 +34,6 @@ export class Users { url: '/api/user', method: 'GET', params: { - key: parameters.key, - username: parameters.username, accountId: parameters.accountId, expand: parameters.expand, }, @@ -141,8 +139,6 @@ export class Users { url: '/api/user/memberof', method: 'GET', params: { - key: parameters.key, - username: parameters.username, accountId: parameters.accountId, start: parameters.start, limit: parameters.limit, @@ -276,48 +272,4 @@ export class Users { return this.client.sendRequest(config, callback); } - - /** - * Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and - * username parameters can be specified. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - * - * @deprecated Will be removed in next major version. - */ - async getBulkUserMigration( - parameters: Parameters.GetBulkUserMigration, - callback: Callback, - ): Promise; - /** - * Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and - * username parameters can be specified. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - * - * @deprecated Will be removed in next major version. - */ - async getBulkUserMigration( - parameters: Parameters.GetBulkUserMigration, - callback?: never, - ): Promise; - async getBulkUserMigration( - parameters: Parameters.GetBulkUserMigration, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/user/bulk/migration', - method: 'GET', - params: { - key: parameters.key, - username: parameters.username, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } } diff --git a/src/callback.ts b/packages/legacy/src/callback.ts similarity index 100% rename from src/callback.ts rename to packages/legacy/src/callback.ts diff --git a/src/clients/baseClient.ts b/packages/legacy/src/clients/baseClient.ts similarity index 93% rename from src/clients/baseClient.ts rename to packages/legacy/src/clients/baseClient.ts index fefa64f8..886a7f39 100644 --- a/src/clients/baseClient.ts +++ b/packages/legacy/src/clients/baseClient.ts @@ -1,11 +1,11 @@ /* eslint-disable @typescript-eslint/no-explicit-any,@typescript-eslint/no-unnecessary-condition */ import type { AxiosInstance } from 'axios'; import axios from 'axios'; -import { getAuthenticationToken } from '~/services'; -import type { Callback } from '~/callback'; -import type { Client } from './client'; -import { ConfigSchema, type Config, type Error as ConfluenceError } from '~/config'; -import type { RequestConfig } from '~/requestConfig'; +import { getAuthenticationToken } from '../services/index.js'; +import type { Callback } from '../callback.js'; +import type { Client } from './client.js'; +import { ConfigSchema, type Config, type Error as ConfluenceError } from '../config.js'; +import type { RequestConfig } from '../requestConfig.js'; import { ZodError } from 'zod'; const ATLASSIAN_TOKEN_CHECK_FLAG = 'X-Atlassian-Token'; @@ -21,7 +21,7 @@ export class BaseClient implements Client { this.config = ConfigSchema.parse(this.config); } catch (e) { if (e instanceof ZodError && e.errors[0].code === 'invalid_string') { - throw new Error(e.errors[0].message); + throw new Error(e.errors[0].message, { cause: e }); } throw e; diff --git a/src/clients/client.ts b/packages/legacy/src/clients/client.ts similarity index 64% rename from src/clients/client.ts rename to packages/legacy/src/clients/client.ts index 1a7b0b37..f09325fe 100644 --- a/src/clients/client.ts +++ b/packages/legacy/src/clients/client.ts @@ -1,5 +1,5 @@ -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; +import type { Callback } from '../callback.js'; +import type { RequestConfig } from '../requestConfig.js'; export interface Client { sendRequest(requestConfig: RequestConfig, callback?: never): Promise; diff --git a/src/clients/confluenceClient.ts b/packages/legacy/src/clients/confluenceClient.ts similarity index 95% rename from src/clients/confluenceClient.ts rename to packages/legacy/src/clients/confluenceClient.ts index 2492e222..ab56cf97 100644 --- a/src/clients/confluenceClient.ts +++ b/packages/legacy/src/clients/confluenceClient.ts @@ -1,5 +1,5 @@ -import { BaseClient } from './baseClient'; -import type { Config } from '../config'; +import { BaseClient } from './baseClient.js'; +import type { Config } from '../config.js'; import { Analytics, Audit, @@ -33,7 +33,7 @@ import { Themes, Users, UserProperties, -} from '../api'; +} from '../api/index.js'; export class ConfluenceClient extends BaseClient { constructor(config: Config) { diff --git a/packages/legacy/src/clients/index.ts b/packages/legacy/src/clients/index.ts new file mode 100644 index 00000000..469f3bab --- /dev/null +++ b/packages/legacy/src/clients/index.ts @@ -0,0 +1,5 @@ +export * from './baseClient.js'; + +export * from './client.js'; + +export * from './confluenceClient.js'; diff --git a/src/config.ts b/packages/legacy/src/config.ts similarity index 99% rename from src/config.ts rename to packages/legacy/src/config.ts index e7ef4313..1a291d74 100644 --- a/src/config.ts +++ b/packages/legacy/src/config.ts @@ -68,8 +68,13 @@ export const ConfigSchema = z.object({ }); export type Config = z.infer; + export type Authentication = z.infer; + export type Basic = z.infer; + export type JWT = z.infer; + export type OAuth2 = z.infer; + export type Error = AxiosError; diff --git a/packages/legacy/src/index.ts b/packages/legacy/src/index.ts new file mode 100644 index 00000000..5ae0bab5 --- /dev/null +++ b/packages/legacy/src/index.ts @@ -0,0 +1,19 @@ +export * from './clients/index.js'; + +export * from './config.js'; + +export * from './requestConfig.js'; + +export * from './callback.js'; + +export * from './pagination.js'; + +export * from './services/index.js'; + +export * from './interfaces/index.js'; + +export * as Api from './api/index.js'; + +export * as Models from './api/models/index.js'; + +export * as Parameters from './api/parameters/index.js'; diff --git a/src/interfaces/extractBaseType.ts b/packages/legacy/src/interfaces/extractBaseType.ts similarity index 100% rename from src/interfaces/extractBaseType.ts rename to packages/legacy/src/interfaces/extractBaseType.ts diff --git a/packages/legacy/src/interfaces/index.ts b/packages/legacy/src/interfaces/index.ts new file mode 100644 index 00000000..3f9f53cd --- /dev/null +++ b/packages/legacy/src/interfaces/index.ts @@ -0,0 +1,3 @@ +export * from './extractBaseType.js'; + +export * from './oneOrMany.js'; diff --git a/src/interfaces/oneOrMany.ts b/packages/legacy/src/interfaces/oneOrMany.ts similarity index 100% rename from src/interfaces/oneOrMany.ts rename to packages/legacy/src/interfaces/oneOrMany.ts diff --git a/src/pagination.ts b/packages/legacy/src/pagination.ts similarity index 100% rename from src/pagination.ts rename to packages/legacy/src/pagination.ts diff --git a/src/paramSerializer.ts b/packages/legacy/src/paramSerializer.ts similarity index 100% rename from src/paramSerializer.ts rename to packages/legacy/src/paramSerializer.ts diff --git a/src/requestConfig.ts b/packages/legacy/src/requestConfig.ts similarity index 100% rename from src/requestConfig.ts rename to packages/legacy/src/requestConfig.ts diff --git a/src/services/authenticationService/authenticationService.ts b/packages/legacy/src/services/authenticationService/authenticationService.ts similarity index 88% rename from src/services/authenticationService/authenticationService.ts rename to packages/legacy/src/services/authenticationService/authenticationService.ts index 7bb0615d..898f7826 100644 --- a/src/services/authenticationService/authenticationService.ts +++ b/packages/legacy/src/services/authenticationService/authenticationService.ts @@ -1,9 +1,9 @@ -import type { Authentication } from '~/config'; +import type { Authentication } from '../../config.js'; import { createBasicAuthenticationToken, createJWTAuthentication, createOAuth2AuthenticationToken, -} from './authentications'; +} from './authentications/index.js'; export async function getAuthenticationToken( authentication: Authentication | undefined, diff --git a/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts b/packages/legacy/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts similarity index 64% rename from src/services/authenticationService/authentications/createBasicAuthenticationToken.ts rename to packages/legacy/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts index bed2946d..bc531bdc 100644 --- a/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts +++ b/packages/legacy/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts @@ -1,5 +1,5 @@ -import { Base64Encoder } from '../base64Encoder'; -import type { Basic } from '~'; +import { Base64Encoder } from '../base64Encoder.js'; +import type { Basic } from '../../../index.js'; export function createBasicAuthenticationToken({ basic: { email, apiToken } }: Basic) { const token = Base64Encoder.encode(`${email}:${apiToken}`); diff --git a/src/services/authenticationService/authentications/createJWTAuthentication.ts b/packages/legacy/src/services/authenticationService/authentications/createJWTAuthentication.ts similarity index 92% rename from src/services/authenticationService/authentications/createJWTAuthentication.ts rename to packages/legacy/src/services/authenticationService/authentications/createJWTAuthentication.ts index ae48f7bd..8f927adc 100644 --- a/src/services/authenticationService/authentications/createJWTAuthentication.ts +++ b/packages/legacy/src/services/authenticationService/authentications/createJWTAuthentication.ts @@ -1,5 +1,5 @@ import * as jwt from '@atlassian/atlassian-jwt'; -import type { JWT } from '~'; +import type { JWT } from '../../../index.js'; export function createJWTAuthentication( { jwt: { issuer, secret, expiryTimeSeconds } }: JWT, diff --git a/src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts b/packages/legacy/src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts similarity index 71% rename from src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts rename to packages/legacy/src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts index 5564180d..a063c7a6 100644 --- a/src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts +++ b/packages/legacy/src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts @@ -1,4 +1,4 @@ -import type { OAuth2 } from '~'; +import type { OAuth2 } from '../../../index.js'; export function createOAuth2AuthenticationToken({ oauth2: { accessToken } }: OAuth2) { return `Bearer ${accessToken}`; diff --git a/packages/legacy/src/services/authenticationService/authentications/index.ts b/packages/legacy/src/services/authenticationService/authentications/index.ts new file mode 100644 index 00000000..5ad81b44 --- /dev/null +++ b/packages/legacy/src/services/authenticationService/authentications/index.ts @@ -0,0 +1,5 @@ +export * from './createBasicAuthenticationToken.js'; + +export * from './createJWTAuthentication.js'; + +export * from './createOAuth2AuthenticationToken.js'; diff --git a/src/services/authenticationService/base64Encoder.ts b/packages/legacy/src/services/authenticationService/base64Encoder.ts similarity index 100% rename from src/services/authenticationService/base64Encoder.ts rename to packages/legacy/src/services/authenticationService/base64Encoder.ts diff --git a/packages/legacy/src/services/authenticationService/index.ts b/packages/legacy/src/services/authenticationService/index.ts new file mode 100644 index 00000000..53b4e45b --- /dev/null +++ b/packages/legacy/src/services/authenticationService/index.ts @@ -0,0 +1 @@ +export * from './authenticationService.js'; diff --git a/packages/legacy/src/services/index.ts b/packages/legacy/src/services/index.ts new file mode 100644 index 00000000..01b99fe3 --- /dev/null +++ b/packages/legacy/src/services/index.ts @@ -0,0 +1 @@ +export * from './authenticationService/index.js'; diff --git a/tests/integration/e2e.test.ts b/packages/legacy/tests/integration/e2e.test.ts similarity index 98% rename from tests/integration/e2e.test.ts rename to packages/legacy/tests/integration/e2e.test.ts index ebd69926..6cbd819a 100644 --- a/tests/integration/e2e.test.ts +++ b/packages/legacy/tests/integration/e2e.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from 'vitest'; import * as fs from 'fs'; -import { ConfluenceClient } from '../../src'; +import { ConfluenceClient } from '../../src/index.js'; const HOST = process.env.HOST!; const EMAIL = process.env.EMAIL!; diff --git a/packages/legacy/tests/tsconfig.json b/packages/legacy/tests/tsconfig.json new file mode 100644 index 00000000..13dc4175 --- /dev/null +++ b/packages/legacy/tests/tsconfig.json @@ -0,0 +1,12 @@ +{ + "extends": "../../../tsconfig.base.json", + "compilerOptions": { + "noEmit": true, + "skipLibCheck": true, + "types": ["node"], + "paths": { + "@confluence.js/legacy": ["../src/index.ts"] + } + }, + "include": ["integration", "unit"] +} diff --git a/tests/unit/api/contentBody.test.ts b/packages/legacy/tests/unit/api/contentBody.test.ts similarity index 97% rename from tests/unit/api/contentBody.test.ts rename to packages/legacy/tests/unit/api/contentBody.test.ts index ec390e31..7f745fd3 100644 --- a/tests/unit/api/contentBody.test.ts +++ b/packages/legacy/tests/unit/api/contentBody.test.ts @@ -1,5 +1,5 @@ import { describe, it, expect, vi } from 'vitest'; -import { ContentBody } from '~/api/contentBody'; +import { ContentBody } from '../../../src/api/contentBody.js'; describe('asyncConvertContentBodyRequest', () => { const mockClient = { diff --git a/tests/unit/api/contentChildrenAndDescendants.test.ts b/packages/legacy/tests/unit/api/contentChildrenAndDescendants.test.ts similarity index 89% rename from tests/unit/api/contentChildrenAndDescendants.test.ts rename to packages/legacy/tests/unit/api/contentChildrenAndDescendants.test.ts index 4313ec99..1477ce2c 100644 --- a/tests/unit/api/contentChildrenAndDescendants.test.ts +++ b/packages/legacy/tests/unit/api/contentChildrenAndDescendants.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect, vi, beforeEach } from 'vitest'; -import { ContentChildrenAndDescendants } from '~/api/contentChildrenAndDescendants'; -import type { RequestConfig } from '~/requestConfig'; +import { ContentChildrenAndDescendants } from '../../../src/api/contentChildrenAndDescendants.js'; +import type { RequestConfig } from '../../../src/requestConfig.js'; describe('getContentChildren', () => { let client: ContentChildrenAndDescendants; diff --git a/tests/unit/api/group.test.ts b/packages/legacy/tests/unit/api/group.test.ts similarity index 68% rename from tests/unit/api/group.test.ts rename to packages/legacy/tests/unit/api/group.test.ts index 87ddb16a..c1e1d0f2 100644 --- a/tests/unit/api/group.test.ts +++ b/packages/legacy/tests/unit/api/group.test.ts @@ -1,6 +1,6 @@ import { beforeEach, describe, expect, it, vi } from 'vitest'; -import { Group } from '~/api'; -import type { Client } from '~/clients'; +import { Group } from '../../../src/api/index.js'; +import type { Client } from '../../../src/clients/index.js'; describe('Group', () => { let mockClient: Client; @@ -24,16 +24,6 @@ describe('Group', () => { expect(typeof group.createGroup).toBe('function'); }); - it('should have removeGroup method', () => { - expect(group.removeGroup).toBeDefined(); - expect(typeof group.removeGroup).toBe('function'); - }); - - it('should have getGroupByQueryParam method', () => { - expect(group.getGroupByQueryParam).toBeDefined(); - expect(typeof group.getGroupByQueryParam).toBe('function'); - }); - it('should have getGroupByGroupId method', () => { expect(group.getGroupByGroupId).toBeDefined(); expect(typeof group.getGroupByGroupId).toBe('function'); @@ -44,21 +34,6 @@ describe('Group', () => { expect(typeof group.removeGroupById).toBe('function'); }); - it('should have getGroupByName method', () => { - expect(group.getGroupByName).toBeDefined(); - expect(typeof group.getGroupByName).toBe('function'); - }); - - it('should have getMembersByQueryParam method', () => { - expect(group.getMembersByQueryParam).toBeDefined(); - expect(typeof group.getMembersByQueryParam).toBe('function'); - }); - - it('should have getGroupMembers method', () => { - expect(group.getGroupMembers).toBeDefined(); - expect(typeof group.getGroupMembers).toBe('function'); - }); - it('should have searchGroups method', () => { expect(group.searchGroups).toBeDefined(); expect(typeof group.searchGroups).toBe('function'); @@ -125,38 +100,6 @@ describe('Group', () => { ); }); - it('removeGroup should call client.sendRequest with correct config', async () => { - const params = { name: 'test-group' }; - await group.removeGroup(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group', - method: 'DELETE', - params: { - name: params.name, - }, - }), - undefined, - ); - }); - - it('getGroupByQueryParam should call client.sendRequest with correct config', async () => { - const params = { name: 'test-group' }; - await group.getGroupByQueryParam(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group/by-name', - method: 'GET', - params: { - name: params.name, - }, - }), - undefined, - ); - }); - it('getGroupByGroupId should call client.sendRequest with correct config', async () => { const params = { id: '12345' }; await group.getGroupByGroupId(params); @@ -189,64 +132,6 @@ describe('Group', () => { ); }); - it('getGroupByName should call client.sendRequest with correct config', async () => { - const params = { groupName: 'test-group' }; - await group.getGroupByName(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group/test-group', - method: 'GET', - }), - undefined, - ); - }); - - it('getMembersByQueryParam should call client.sendRequest with correct config', async () => { - const params = { - name: 'test-group', - start: 0, - limit: 50, - shouldReturnTotalSize: true, - }; - await group.getMembersByQueryParam(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group/member', - method: 'GET', - params: { - name: params.name, - start: params.start, - limit: params.limit, - shouldReturnTotalSize: params.shouldReturnTotalSize, - }, - }), - undefined, - ); - }); - - it('getGroupMembers should call client.sendRequest with correct config', async () => { - const params = { - groupName: 'test-group', - start: 0, - limit: 50, - }; - await group.getGroupMembers(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group/test-group/member', - method: 'GET', - params: { - start: params.start, - limit: params.limit, - }, - }), - undefined, - ); - }); - it('searchGroups should call client.sendRequest with correct config', async () => { const params = { query: 'test', diff --git a/tests/unit/clients/baseClient.test.ts b/packages/legacy/tests/unit/clients/baseClient.test.ts similarity index 89% rename from tests/unit/clients/baseClient.test.ts rename to packages/legacy/tests/unit/clients/baseClient.test.ts index e865567c..b85f2a25 100644 --- a/tests/unit/clients/baseClient.test.ts +++ b/packages/legacy/tests/unit/clients/baseClient.test.ts @@ -1,6 +1,6 @@ import { describe, it, expect } from 'vitest'; -import { BaseClient } from '~/clients/baseClient'; -import type { Config } from '~/config'; +import { BaseClient } from '../../../src/clients/baseClient.js'; +import type { Config } from '../../../src/config.js'; describe('BaseClient', () => { describe('constructor', () => { diff --git a/tests/unit/clients/confluenceClient.test.ts b/packages/legacy/tests/unit/clients/confluenceClient.test.ts similarity index 92% rename from tests/unit/clients/confluenceClient.test.ts rename to packages/legacy/tests/unit/clients/confluenceClient.test.ts index a8936298..ca084f66 100644 --- a/tests/unit/clients/confluenceClient.test.ts +++ b/packages/legacy/tests/unit/clients/confluenceClient.test.ts @@ -1,5 +1,5 @@ import { beforeEach, describe, expect, it } from 'vitest'; -import { ConfluenceClient } from '~/clients'; +import { ConfluenceClient } from '../../../src/clients/index.js'; describe('Confluence Client', () => { let instance: ConfluenceClient; diff --git a/tests/unit/index.test.ts b/packages/legacy/tests/unit/index.test.ts similarity index 94% rename from tests/unit/index.test.ts rename to packages/legacy/tests/unit/index.test.ts index 69fd8061..269c08a6 100644 --- a/tests/unit/index.test.ts +++ b/packages/legacy/tests/unit/index.test.ts @@ -3,11 +3,11 @@ import type { Callback, Client, Config, - RequestConfig } from '../../src'; + RequestConfig } from '../../src/index.js'; import { BaseClient, ConfluenceClient, -} from '../../src'; +} from '../../src/index.js'; describe('Type definitions', () => { it('Callback should be defined', () => { diff --git a/packages/legacy/tsconfig.json b/packages/legacy/tsconfig.json new file mode 100644 index 00000000..4e2f9872 --- /dev/null +++ b/packages/legacy/tsconfig.json @@ -0,0 +1,9 @@ +{ + "extends": "../../tsconfig.base.json", + "compilerOptions": { + "rootDir": "src", + "outDir": "dist" + }, + "include": ["src"], + "exclude": ["node_modules", "dist"] +} diff --git a/packages/legacy/vite.config.ts b/packages/legacy/vite.config.ts new file mode 100644 index 00000000..c6b36a1d --- /dev/null +++ b/packages/legacy/vite.config.ts @@ -0,0 +1,33 @@ +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { defineConfig } from 'vite'; +import { externalizeDeps } from 'vite-plugin-externalize-deps'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const srcRoot = resolve(__dirname, 'src'); +const distRoot = resolve(__dirname, 'dist'); + +export default defineConfig({ + plugins: [externalizeDeps()], + build: { + ssr: true, + copyPublicDir: false, + emptyOutDir: true, + sourcemap: true, + lib: { + entry: resolve(__dirname, 'src/index.ts'), + }, + rolldownOptions: { + output: [ + { + format: 'es', + dir: distRoot, + entryFileNames: '[name].js', + chunkFileNames: '[name].js', + preserveModules: true, + preserveModulesRoot: srcRoot, + }, + ], + }, + }, +}); diff --git a/packages/legacy/vitest.config.ts b/packages/legacy/vitest.config.ts new file mode 100644 index 00000000..39903512 --- /dev/null +++ b/packages/legacy/vitest.config.ts @@ -0,0 +1,27 @@ +import { dirname, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { loadEnv } from 'vite'; +import { defineConfig, mergeConfig } from 'vitest/config'; +import { vitestShared } from '../../vitestShared'; + +const __dirname = dirname(fileURLToPath(import.meta.url)); +const repoRoot = resolve(__dirname, '../..'); + +export default defineConfig(({ mode }) => + mergeConfig( + vitestShared, + defineConfig({ + resolve: { + alias: { + '@confluence.js/legacy': resolve(__dirname, 'src/index.ts'), + }, + }, + test: { + name: 'legacy', + root: __dirname, + include: ['tests/**/*.test.ts'], + env: loadEnv(mode, repoRoot, ''), + }, + }), + ), +); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index bd4dcfce..38d0b4e5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,16 +7,94 @@ settings: importers: .: + devDependencies: + '@arethetypeswrong/cli': + specifier: ^0.18.3 + version: 0.18.3 + '@changesets/cli': + specifier: ^2.31.0 + version: 2.31.0(@types/node@22.20.0) + '@eslint/js': + specifier: ^10.0.1 + version: 10.0.1(eslint@10.5.0(jiti@2.7.0)) + '@stylistic/eslint-plugin': + specifier: ^5.10.0 + version: 5.10.0(eslint@10.5.0(jiti@2.7.0)) + '@types/node': + specifier: ^22.20.0 + version: 22.20.0 + '@vitest/coverage-v8': + specifier: ^4.1.9 + version: 4.1.9(vitest@4.1.9) + dotenv: + specifier: ^17.4.2 + version: 17.4.2 + eslint: + specifier: ^10.5.0 + version: 10.5.0(jiti@2.7.0) + globals: + specifier: ^17.6.0 + version: 17.6.0 + husky: + specifier: ^9.1.7 + version: 9.1.7 + jiti: + specifier: ^2.7.0 + version: 2.7.0 + prettier: + specifier: ^3.8.4 + version: 3.8.4 + prettier-plugin-jsdoc: + specifier: ^1.8.1 + version: 1.8.1(prettier@3.8.4) + tsc-alias: + specifier: ^1.8.17 + version: 1.8.17 + typedoc: + specifier: ^0.28.19 + version: 0.28.19(typescript@6.0.3) + typescript: + specifier: ^6.0.3 + version: 6.0.3 + typescript-eslint: + specifier: ^8.61.1 + version: 8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) + vite: + specifier: ^8.0.16 + version: 8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0) + vite-plugin-externalize-deps: + specifier: ^0.10.0 + version: 0.10.0(vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0)) + vitest: + specifier: ^4.1.9 + version: 4.1.9(@types/node@22.20.0)(@vitest/coverage-v8@4.1.9)(vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0)) + + packages/cloud: + dependencies: + '@confluence.js/core': + specifier: workspace:* + version: link:../core + zod: + specifier: ^4.4.3 + version: 4.4.3 + + packages/core: + dependencies: + zod: + specifier: ^4.4.3 + version: 4.4.3 + + packages/legacy: dependencies: '@atlassian/atlassian-jwt': specifier: ^2.2.0 version: 2.2.0 axios: specifier: ^1.10.0 - version: 1.10.0 + version: 1.18.1 form-data: specifier: ^4.0.3 - version: 4.0.3 + version: 4.0.6 oauth: specifier: ^0.10.2 version: 0.10.2 @@ -24,301 +102,222 @@ importers: specifier: ^3.25.76 version: 3.25.76 devDependencies: - '@eslint/js': - specifier: ^9.31.0 - version: 9.31.0 - '@rollup/plugin-alias': - specifier: ^5.1.1 - version: 5.1.1(rollup@4.45.1) - '@rollup/plugin-commonjs': - specifier: ^28.0.6 - version: 28.0.6(rollup@4.45.1) - '@rollup/plugin-node-resolve': - specifier: ^16.0.1 - version: 16.0.1(rollup@4.45.1) - '@rollup/plugin-typescript': - specifier: ^12.1.4 - version: 12.1.4(rollup@4.45.1)(tslib@2.8.1)(typescript@5.8.3) - '@stylistic/eslint-plugin': - specifier: ^5.2.0 - version: 5.2.0(eslint@9.31.0(jiti@2.4.2)) '@types/express': specifier: ^4.17.23 - version: 4.17.23 - '@types/node': - specifier: ^20.19.8 - version: 20.19.8 + version: 4.17.25 '@types/oauth': specifier: ^0.9.6 version: 0.9.6 - dotenv: - specifier: ^17.2.0 - version: 17.2.0 - eslint: - specifier: ^9.31.0 - version: 9.31.0(jiti@2.4.2) - globals: - specifier: ^16.3.0 - version: 16.3.0 - jiti: - specifier: ^2.4.2 - version: 2.4.2 - prettier: - specifier: ^3.6.2 - version: 3.6.2 - prettier-plugin-jsdoc: - specifier: ^1.3.3 - version: 1.3.3(prettier@3.6.2) - rollup: - specifier: ^4.45.1 - version: 4.45.1 - rollup-plugin-esnext-to-nodenext: - specifier: ^1.0.1 - version: 1.0.1(rollup@4.45.1) - rollup-plugin-node-externals: - specifier: ^8.0.1 - version: 8.0.1(rollup@4.45.1) - tslib: - specifier: ^2.8.1 - version: 2.8.1 - typedoc: - specifier: ^0.28.7 - version: 0.28.7(typescript@5.8.3) - typescript: - specifier: ^5.8.3 - version: 5.8.3 - typescript-eslint: - specifier: ^8.37.0 - version: 8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3) - vitest: - specifier: ^3.2.4 - version: 3.2.4(@types/debug@4.1.12)(@types/node@20.19.8)(jiti@2.4.2)(yaml@2.8.0) packages: + '@andrewbranch/untar.js@1.0.3': + resolution: {integrity: sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw==} + + '@arethetypeswrong/cli@0.18.3': + resolution: {integrity: sha512-GeAlc+lUD4gKHD/LDQNvQY30FfQ+xAXg2inbQKUjFZgTOdI5ygEweaOnGHGBPSKXSLGQC7VLhpXu9zMnYk/4sQ==} + engines: {node: '>=20'} + hasBin: true + + '@arethetypeswrong/core@0.18.3': + resolution: {integrity: sha512-sWBB/tdIktaT5xMq0Dz6CJyqcf6oMNdmiKiuPU1lWoJLTL6gjRSsksBuSgqot21hylkklBQY1wiSu+PkZhW7sw==} + engines: {node: '>=20'} + '@atlassian/atlassian-jwt@2.2.0': resolution: {integrity: sha512-h6hLnbRFTEVOB0xa8n0TfQCDZ1hUPFGClrbQbO9ryIGeEsNGG2Vy2S8BWrYJBQrirMmj+FHfVVsbs1M9DIC80Q==} engines: {node: '>= 0.4.0'} - '@esbuild/aix-ppc64@0.25.6': - resolution: {integrity: sha512-ShbM/3XxwuxjFiuVBHA+d3j5dyac0aEVVq1oluIDf71hUw0aRF59dV/efUsIwFnR6m8JNM2FjZOzmaZ8yG61kw==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] + '@babel/helper-string-parser@7.27.1': + resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} + engines: {node: '>=6.9.0'} - '@esbuild/android-arm64@0.25.6': - resolution: {integrity: sha512-hd5zdUarsK6strW+3Wxi5qWws+rJhCCbMiC9QZyzoxfk5uHRIE8T287giQxzVpEvCwuJ9Qjg6bEjcRJcgfLqoA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] + '@babel/helper-validator-identifier@7.28.5': + resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} + engines: {node: '>=6.9.0'} - '@esbuild/android-arm@0.25.6': - resolution: {integrity: sha512-S8ToEOVfg++AU/bHwdksHNnyLyVM+eMVAOf6yRKFitnwnbwwPNqKr3srzFRe7nzV69RQKb5DgchIX5pt3L53xg==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] + '@babel/parser@7.29.3': + resolution: {integrity: sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA==} + engines: {node: '>=6.0.0'} + hasBin: true - '@esbuild/android-x64@0.25.6': - resolution: {integrity: sha512-0Z7KpHSr3VBIO9A/1wcT3NTy7EB4oNC4upJ5ye3R7taCc2GUdeynSLArnon5G8scPwaU866d3H4BCrE5xLW25A==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] + '@babel/runtime@7.29.2': + resolution: {integrity: sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==} + engines: {node: '>=6.9.0'} - '@esbuild/darwin-arm64@0.25.6': - resolution: {integrity: sha512-FFCssz3XBavjxcFxKsGy2DYK5VSvJqa6y5HXljKzhRZ87LvEi13brPrf/wdyl/BbpbMKJNOr1Sd0jtW4Ge1pAA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] + '@babel/types@7.29.0': + resolution: {integrity: sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==} + engines: {node: '>=6.9.0'} - '@esbuild/darwin-x64@0.25.6': - resolution: {integrity: sha512-GfXs5kry/TkGM2vKqK2oyiLFygJRqKVhawu3+DOCk7OxLy/6jYkWXhlHwOoTb0WqGnWGAS7sooxbZowy+pK9Yg==} + '@bcoe/v8-coverage@1.0.2': + resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - '@esbuild/freebsd-arm64@0.25.6': - resolution: {integrity: sha512-aoLF2c3OvDn2XDTRvn8hN6DRzVVpDlj2B/F66clWd/FHLiHaG3aVZjxQX2DYphA5y/evbdGvC6Us13tvyt4pWg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] + '@braidai/lang@1.1.2': + resolution: {integrity: sha512-qBcknbBufNHlui137Hft8xauQMTZDKdophmLFv05r2eNmdIv/MlPuP4TdUknHG68UdWLgVZwgxVe735HzJNIwA==} - '@esbuild/freebsd-x64@0.25.6': - resolution: {integrity: sha512-2SkqTjTSo2dYi/jzFbU9Plt1vk0+nNg8YC8rOXXea+iA3hfNJWebKYPs3xnOUf9+ZWhKAaxnQNUf2X9LOpeiMQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] + '@changesets/apply-release-plan@7.1.1': + resolution: {integrity: sha512-9qPCm/rLx/xoOFXIHGB229+4GOL76S4MC+7tyOuTsR6+1jYlfFDQORdvwR5hDA6y4FL2BPt3qpbcQIS+dW85LA==} - '@esbuild/linux-arm64@0.25.6': - resolution: {integrity: sha512-b967hU0gqKd9Drsh/UuAm21Khpoh6mPBSgz8mKRq4P5mVK8bpA+hQzmm/ZwGVULSNBzKdZPQBRT3+WuVavcWsQ==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] + '@changesets/assemble-release-plan@6.0.10': + resolution: {integrity: sha512-rSDcqdJ9KbVyjpBIuCidhvZNIiVt1XaIYp73ycVQRIA5n/j6wQaEk0ChRLMUQ1vkxZe51PTQ9OIhbg6HQMW45A==} - '@esbuild/linux-arm@0.25.6': - resolution: {integrity: sha512-SZHQlzvqv4Du5PrKE2faN0qlbsaW/3QQfUUc6yO2EjFcA83xnwm91UbEEVx4ApZ9Z5oG8Bxz4qPE+HFwtVcfyw==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] + '@changesets/changelog-git@0.2.1': + resolution: {integrity: sha512-x/xEleCFLH28c3bQeQIyeZf8lFXyDFVn1SgcBiR2Tw/r4IAWlk1fzxCEZ6NxQAjF2Nwtczoen3OA2qR+UawQ8Q==} - '@esbuild/linux-ia32@0.25.6': - resolution: {integrity: sha512-aHWdQ2AAltRkLPOsKdi3xv0mZ8fUGPdlKEjIEhxCPm5yKEThcUjHpWB1idN74lfXGnZ5SULQSgtr5Qos5B0bPw==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] + '@changesets/cli@2.31.0': + resolution: {integrity: sha512-AhI4enNTgHu2IZr6K4WZyf0EPch4XVMn1yOMFmCD9gsfBGqMYaHXls5HyDv6/CL5axVQABz68eG30eCtbr2wFg==} + hasBin: true - '@esbuild/linux-loong64@0.25.6': - resolution: {integrity: sha512-VgKCsHdXRSQ7E1+QXGdRPlQ/e08bN6WMQb27/TMfV+vPjjTImuT9PmLXupRlC90S1JeNNW5lzkAEO/McKeJ2yg==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] + '@changesets/config@3.1.4': + resolution: {integrity: sha512-pf0bvD/v6WI2cRlZ6hzpjtZdSlXDXMAJ+Iz7xfFzV4ZxJ8OGGAON+1qYc99ZPrijnt4xp3VGG7eNvAOGS24V1Q==} - '@esbuild/linux-mips64el@0.25.6': - resolution: {integrity: sha512-WViNlpivRKT9/py3kCmkHnn44GkGXVdXfdc4drNmRl15zVQ2+D2uFwdlGh6IuK5AAnGTo2qPB1Djppj+t78rzw==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] + '@changesets/errors@0.2.0': + resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} - '@esbuild/linux-ppc64@0.25.6': - resolution: {integrity: sha512-wyYKZ9NTdmAMb5730I38lBqVu6cKl4ZfYXIs31Baf8aoOtB4xSGi3THmDYt4BTFHk7/EcVixkOV2uZfwU3Q2Jw==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] + '@changesets/get-dependents-graph@2.1.4': + resolution: {integrity: sha512-ZsS00x6WvmHq3sQv8oCMwL0f/z3wbXCVuSVTJwCnnmbC/iBdNJGFx1EcbMG4PC6sXRyH69liM4A2WKXzn/kRPg==} - '@esbuild/linux-riscv64@0.25.6': - resolution: {integrity: sha512-KZh7bAGGcrinEj4qzilJ4hqTY3Dg2U82c8bv+e1xqNqZCrCyc+TL9AUEn5WGKDzm3CfC5RODE/qc96OcbIe33w==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] + '@changesets/get-release-plan@4.0.16': + resolution: {integrity: sha512-2K5Om6CrMPm45rtvckfzWo7e9jOVCKLCnXia5eUPaURH7/LWzri7pK1TycdzAuAtehLkW7VPbWLCSExTHmiI6g==} - '@esbuild/linux-s390x@0.25.6': - resolution: {integrity: sha512-9N1LsTwAuE9oj6lHMyyAM+ucxGiVnEqUdp4v7IaMmrwb06ZTEVCIs3oPPplVsnjPfyjmxwHxHMF8b6vzUVAUGw==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] + '@changesets/get-version-range-type@0.4.0': + resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} - '@esbuild/linux-x64@0.25.6': - resolution: {integrity: sha512-A6bJB41b4lKFWRKNrWoP2LHsjVzNiaurf7wyj/XtFNTsnPuxwEBWHLty+ZE0dWBKuSK1fvKgrKaNjBS7qbFKig==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] + '@changesets/git@3.0.4': + resolution: {integrity: sha512-BXANzRFkX+XcC1q/d27NKvlJ1yf7PSAgi8JG6dt8EfbHFHi4neau7mufcSca5zRhwOL8j9s6EqsxmT+s+/E6Sw==} - '@esbuild/netbsd-arm64@0.25.6': - resolution: {integrity: sha512-IjA+DcwoVpjEvyxZddDqBY+uJ2Snc6duLpjmkXm/v4xuS3H+3FkLZlDm9ZsAbF9rsfP3zeA0/ArNDORZgrxR/Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [netbsd] + '@changesets/logger@0.1.1': + resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} - '@esbuild/netbsd-x64@0.25.6': - resolution: {integrity: sha512-dUXuZr5WenIDlMHdMkvDc1FAu4xdWixTCRgP7RQLBOkkGgwuuzaGSYcOpW4jFxzpzL1ejb8yF620UxAqnBrR9g==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] + '@changesets/parse@0.4.3': + resolution: {integrity: sha512-ZDmNc53+dXdWEv7fqIUSgRQOLYoUom5Z40gmLgmATmYR9NbL6FJJHwakcCpzaeCy+1D0m0n7mT4jj2B/MQPl7A==} - '@esbuild/openbsd-arm64@0.25.6': - resolution: {integrity: sha512-l8ZCvXP0tbTJ3iaqdNf3pjaOSd5ex/e6/omLIQCVBLmHTlfXW3zAxQ4fnDmPLOB1x9xrcSi/xtCWFwCZRIaEwg==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] + '@changesets/pre@2.0.2': + resolution: {integrity: sha512-HaL/gEyFVvkf9KFg6484wR9s0qjAXlZ8qWPDkTyKF6+zqjBe/I2mygg3MbpZ++hdi0ToqNUF8cjj7fBy0dg8Ug==} - '@esbuild/openbsd-x64@0.25.6': - resolution: {integrity: sha512-hKrmDa0aOFOr71KQ/19JC7az1P0GWtCN1t2ahYAf4O007DHZt/dW8ym5+CUdJhQ/qkZmI1HAF8KkJbEFtCL7gw==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] + '@changesets/read@0.6.7': + resolution: {integrity: sha512-D1G4AUYGrBEk8vj8MGwf75k9GpN6XL3wg8i42P2jZZwFLXnlr2Pn7r9yuQNbaMCarP7ZQWNJbV6XLeysAIMhTA==} - '@esbuild/openharmony-arm64@0.25.6': - resolution: {integrity: sha512-+SqBcAWoB1fYKmpWoQP4pGtx+pUUC//RNYhFdbcSA16617cchuryuhOCRpPsjCblKukAckWsV+aQ3UKT/RMPcA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openharmony] + '@changesets/should-skip-package@0.1.2': + resolution: {integrity: sha512-qAK/WrqWLNCP22UDdBTMPH5f41elVDlsNyat180A33dWxuUDyNpg6fPi/FyTZwRriVjg0L8gnjJn2F9XAoF0qw==} - '@esbuild/sunos-x64@0.25.6': - resolution: {integrity: sha512-dyCGxv1/Br7MiSC42qinGL8KkG4kX0pEsdb0+TKhmJZgCUDBGmyo1/ArCjNGiOLiIAgdbWgmWgib4HoCi5t7kA==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] + '@changesets/types@4.1.0': + resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} - '@esbuild/win32-arm64@0.25.6': - resolution: {integrity: sha512-42QOgcZeZOvXfsCBJF5Afw73t4veOId//XD3i+/9gSkhSV6Gk3VPlWncctI+JcOyERv85FUo7RxuxGy+z8A43Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] + '@changesets/types@6.1.0': + resolution: {integrity: sha512-rKQcJ+o1nKNgeoYRHKOS07tAMNd3YSN0uHaJOZYjBAgxfV7TUE7JE+z4BzZdQwb5hKaYbayKN5KrYV7ODb2rAA==} - '@esbuild/win32-ia32@0.25.6': - resolution: {integrity: sha512-4AWhgXmDuYN7rJI6ORB+uU9DHLq/erBbuMoAuB4VWJTu5KtCgcKYPynF0YI1VkBNuEfjNlLrFr9KZPJzrtLkrQ==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] + '@changesets/write@0.4.0': + resolution: {integrity: sha512-CdTLvIOPiCNuH71pyDu3rA+Q0n65cmAbXnwWH84rKGiFumFzkmHNT8KHTMEchcxN+Kl8I54xGUhJ7l3E7X396Q==} - '@esbuild/win32-x64@0.25.6': - resolution: {integrity: sha512-NgJPHHbEpLQgDH2MjQu90pzW/5vvXIZ7KOnPyNBm92A6WgZ/7b6fJyUBjoumLqeOQQGqY2QjQxRo97ah4Sj0cA==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] + '@colors/colors@1.5.0': + resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} + engines: {node: '>=0.1.90'} + + '@emnapi/core@1.10.0': + resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} + + '@emnapi/runtime@1.10.0': + resolution: {integrity: sha512-ewvYlk86xUoGI0zQRNq/mC+16R1QeDlKQy21Ki3oSYXNgLb45GV1P6A0M+/s6nyCuNDqe5VpaY84BzXGwVbwFA==} + + '@emnapi/wasi-threads@1.2.1': + resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} - '@eslint-community/eslint-utils@4.7.0': - resolution: {integrity: sha512-dyybb3AcajC7uha6CvhdVRJqaKyn7w2YKqKyAN37NKYgZT36w+iRb0Dymmc5qEJ549c/S31cMMSFd75bteCpCw==} + '@eslint-community/eslint-utils@4.9.1': + resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.12.1': - resolution: {integrity: sha512-CCZCDJuduB9OUkFkY2IgppNZMi2lBQgD2qzwXkEia16cge2pijY/aXi96CJMquDMn3nJdlPV1A5KrJEXwfLNzQ==} + '@eslint-community/regexpp@4.12.2': + resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} - '@eslint/config-array@0.21.0': - resolution: {integrity: sha512-ENIdc4iLu0d93HeYirvKmrzshzofPw6VkZRKQGe9Nv46ZnWUzcF1xV01dcvEg/1wXUR61OmmlSfyeyO7EvjLxQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/config-array@0.23.5': + resolution: {integrity: sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/config-helpers@0.3.0': - resolution: {integrity: sha512-ViuymvFmcJi04qdZeDc2whTHryouGcDlaxPqarTD0ZE10ISpxGUVZGZDx4w01upyIynL3iu6IXH2bS1NhclQMw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/config-helpers@0.6.0': + resolution: {integrity: sha512-ii6Bw9jJ2zi2cWA2Z+9/QZ/+3DX6kwaV5Q986D/CdP3Lap3w/pgQZ373FV7byY/i7L4IRH/G43I5dz1ClsCbpA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/core@0.15.1': - resolution: {integrity: sha512-bkOp+iumZCCbt1K1CmWf0R9pM5yKpDv+ZXtvSyQpudrI9kuFLp+bM2WOPXImuD/ceQuaa8f5pj93Y7zyECIGNA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/core@1.2.1': + resolution: {integrity: sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/eslintrc@3.3.1': - resolution: {integrity: sha512-gtF186CXhIl1p4pJNGZw8Yc6RlshoePRvE0X91oPGb3vZ8pM3qOS9W9NGPat9LziaBV7XrJWGylNQXkGcnM3IQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/js@10.0.1': + resolution: {integrity: sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + peerDependencies: + eslint: ^10.0.0 + peerDependenciesMeta: + eslint: + optional: true - '@eslint/js@9.31.0': - resolution: {integrity: sha512-LOm5OVt7D4qiKCqoiPbA7LWmI+tbw1VbTUowBcUMgQSuM6poJufkFkYDcQpo5KfgD39TnNySV26QjOh7VFpSyw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/object-schema@3.0.5': + resolution: {integrity: sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/object-schema@2.1.6': - resolution: {integrity: sha512-RBMg5FRL0I0gs51M/guSAj5/e14VQ4tpZnQNWwuDT66P14I43ItmPfIZRhO9fUVIPOAQXU47atlywZ/czoqFPA==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@eslint/plugin-kit@0.7.2': + resolution: {integrity: sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} - '@eslint/plugin-kit@0.3.3': - resolution: {integrity: sha512-1+WqvgNMhmlAambTvT3KPtCl/Ibr68VldY2XY40SL1CE0ZXiakFR/cbTspaF5HsnpDMvcYYoJHfl4980NBjGag==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@gerrit0/mini-shiki@3.23.0': + resolution: {integrity: sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==} - '@gerrit0/mini-shiki@3.7.0': - resolution: {integrity: sha512-7iY9wg4FWXmeoFJpUL2u+tsmh0d0jcEJHAIzVxl3TG4KL493JNnisdLAILZ77zcD+z3J0keEXZ+lFzUgzQzPDg==} + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} - '@humanfs/core@0.19.1': - resolution: {integrity: sha512-5DyQ4+1JEUzejeK1JGICcideyfUbGixgS9jNgex5nqkW+cY7WZhxBigmieN5Qnw9ZosSNVC9KQKyb+GUaGyKUA==} + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} engines: {node: '>=18.18.0'} - '@humanfs/node@0.16.6': - resolution: {integrity: sha512-YuI2ZHQL78Q5HbhDiBA1X4LmYdXCKCMQIfw0pw7piHJwyREFebJUvrQN4cMssyES6x+vfUbx1CIpaQUKYdQZOw==} + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} engines: {node: '>=18.18.0'} '@humanwhocodes/module-importer@1.0.1': resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/retry@0.3.1': - resolution: {integrity: sha512-JBxkERygn7Bv/GbN5Rv8Ul6LVknS+5Bp6RgDC/O8gEBU/yeH5Ui5C/OlWrTb6qct7LjjfT6Re2NxB0ln0yYybA==} - engines: {node: '>=18.18'} - '@humanwhocodes/retry@0.4.3': resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} engines: {node: '>=18.18'} - '@jridgewell/sourcemap-codec@1.5.4': - resolution: {integrity: sha512-VT2+G1VQs/9oz078bLrYbecdZKs912zQlkelYpuf+SXF+QvZDYJlbx/LSx+meSAwdDFnF8FVXW92AVjjkVmgFw==} + '@inquirer/external-editor@1.0.3': + resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@loaderkit/resolve@1.0.6': + resolution: {integrity: sha512-G8FdIoF5CypfwmD9rl8BXod5HDn8JqB0CCNBXDTaRZ+yRYhARrrSToX1zg1zy9jX3zLqigsELwhT4gNtkdQAUg==} + + '@manypkg/find-root@1.1.0': + resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} + + '@manypkg/get-packages@1.1.3': + resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} + + '@napi-rs/wasm-runtime@1.1.4': + resolution: {integrity: sha512-3NQNNgA1YSlJb/kMH1ildASP9HW7/7kYnRI2szWJaofaS1hWmbGI4H+d3+22aGzXXN9IJ+n+GiFVcGipJP18ow==} + peerDependencies: + '@emnapi/core': ^1.7.1 + '@emnapi/runtime': ^1.7.1 '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} @@ -332,175 +331,137 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@rollup/plugin-alias@5.1.1': - resolution: {integrity: sha512-PR9zDb+rOzkRb2VD+EuKB7UC41vU5DIwZ5qqCpk0KJudcWAyi8rvYOhS7+L5aZCspw1stTViLgN5v6FF1p5cgQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - - '@rollup/plugin-commonjs@28.0.6': - resolution: {integrity: sha512-XSQB1K7FUU5QP+3lOQmVCE3I0FcbbNvmNT4VJSj93iUjayaARrTQeoRdiYQoftAJBLrR9t2agwAd3ekaTgHNlw==} - engines: {node: '>=16.0.0 || 14 >= 14.17'} - peerDependencies: - rollup: ^2.68.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - - '@rollup/plugin-node-resolve@16.0.1': - resolution: {integrity: sha512-tk5YCxJWIG81umIvNkSod2qK5KyQW19qcBF/B78n1bjtOON6gzKoVeSzAE8yHCZEDmqkHKkxplExA8KzdJLJpA==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.78.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true - - '@rollup/plugin-typescript@12.1.4': - resolution: {integrity: sha512-s5Hx+EtN60LMlDBvl5f04bEiFZmAepk27Q+mr85L/00zPDn1jtzlTV6FWn81MaIwqfWzKxmOJrBWHU6vtQyedQ==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^2.14.0||^3.0.0||^4.0.0 - tslib: '*' - typescript: '>=3.7.0' - peerDependenciesMeta: - rollup: - optional: true - tslib: - optional: true - - '@rollup/pluginutils@5.2.0': - resolution: {integrity: sha512-qWJ2ZTbmumwiLFomfzTyt5Kng4hwPi9rwCYN4SHb6eaRU1KNO4ccxINHr/VhH4GgPlt1XfSTLX2LBTme8ne4Zw==} - engines: {node: '>=14.0.0'} - peerDependencies: - rollup: ^1.20.0||^2.0.0||^3.0.0||^4.0.0 - peerDependenciesMeta: - rollup: - optional: true + '@oxc-project/types@0.133.0': + resolution: {integrity: sha512-KzkdCd6Uxqnf6l3HOw1xfatAlUURA0g14cvBYFyJ5SaNOQbOUvBr9PKArcPcrNIeRsBdgcUzOGrhKveVpvOIGA==} - '@rollup/rollup-android-arm-eabi@4.45.1': - resolution: {integrity: sha512-NEySIFvMY0ZQO+utJkgoMiCAjMrGvnbDLHvcmlA33UXJpYBCvlBEbMMtV837uCkS+plG2umfhn0T5mMAxGrlRA==} - cpu: [arm] - os: [android] - - '@rollup/rollup-android-arm64@4.45.1': - resolution: {integrity: sha512-ujQ+sMXJkg4LRJaYreaVx7Z/VMgBBd89wGS4qMrdtfUFZ+TSY5Rs9asgjitLwzeIbhwdEhyj29zhst3L1lKsRQ==} + '@rolldown/binding-android-arm64@1.0.3': + resolution: {integrity: sha512-454rs7jHngixp/NMxd5srYD57OnzSlZ/eFTETjORQHLwJG1lRtmNOJcBerZlfu4GjKqeq8aCCIQrMdHyhI51Hw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.45.1': - resolution: {integrity: sha512-FSncqHvqTm3lC6Y13xncsdOYfxGSLnP+73k815EfNmpewPs+EyM49haPS105Rh4aF5mJKywk9X0ogzLXZzN9lA==} + '@rolldown/binding-darwin-arm64@1.0.3': + resolution: {integrity: sha512-PcAhP+ynjURNyy8SKGl5DQP94aGuB/7JrXJb/t7P+hanXvQVMWzUvRRhBAcg/lNRadBhoUPqSoP4xw5tR/KBEA==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.45.1': - resolution: {integrity: sha512-2/vVn/husP5XI7Fsf/RlhDaQJ7x9zjvC81anIVbr4b/f0xtSmXQTFcGIQ/B1cXIYM6h2nAhJkdMHTnD7OtQ9Og==} + '@rolldown/binding-darwin-x64@1.0.3': + resolution: {integrity: sha512-9YpfeUvSE2RS7wysJ81uOZkXJz7f7Q55H2Gvp3VEw/EsahqDtrphrZ0EwDLK5vvKOzaCrBsjF8JmnMLcUt78Gg==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [darwin] - '@rollup/rollup-freebsd-arm64@4.45.1': - resolution: {integrity: sha512-4g1kaDxQItZsrkVTdYQ0bxu4ZIQ32cotoQbmsAnW1jAE4XCMbcBPDirX5fyUzdhVCKgPcrwWuucI8yrVRBw2+g==} - cpu: [arm64] - os: [freebsd] - - '@rollup/rollup-freebsd-x64@4.45.1': - resolution: {integrity: sha512-L/6JsfiL74i3uK1Ti2ZFSNsp5NMiM4/kbbGEcOCps99aZx3g8SJMO1/9Y0n/qKlWZfn6sScf98lEOUe2mBvW9A==} + '@rolldown/binding-freebsd-x64@1.0.3': + resolution: {integrity: sha512-yB1IlAsSNHncV6SCTL27/MVGR5htvQsoGxIv5KMGXALp+Ll1wYsn+x98M9MW7qa+NdSbvrrY7ANI4wLJ0n1e6g==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [freebsd] - '@rollup/rollup-linux-arm-gnueabihf@4.45.1': - resolution: {integrity: sha512-RkdOTu2jK7brlu+ZwjMIZfdV2sSYHK2qR08FUWcIoqJC2eywHbXr0L8T/pONFwkGukQqERDheaGTeedG+rra6Q==} - cpu: [arm] - os: [linux] - - '@rollup/rollup-linux-arm-musleabihf@4.45.1': - resolution: {integrity: sha512-3kJ8pgfBt6CIIr1o+HQA7OZ9mp/zDk3ctekGl9qn/pRBgrRgfwiffaUmqioUGN9hv0OHv2gxmvdKOkARCtRb8Q==} + '@rolldown/binding-linux-arm-gnueabihf@1.0.3': + resolution: {integrity: sha512-Yi30IVAAfLUCy2MseFjbB1jAMDl1VMCAas5StnYp8da9+CKvMd2H2cbEjWcw5NPaPqzvYkVIaF1nNUG+b7u/sw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.45.1': - resolution: {integrity: sha512-k3dOKCfIVixWjG7OXTCOmDfJj3vbdhN0QYEqB+OuGArOChek22hn7Uy5A/gTDNAcCy5v2YcXRJ/Qcnm4/ma1xw==} + '@rolldown/binding-linux-arm64-gnu@1.0.3': + resolution: {integrity: sha512-jsO7R8To+AdlYgUmN5sHSCZbfhtMBkO0WUx8iORQnPcMMdgr7qM2DQmMwgabs3GhNztdmoKkMKQFHD6DTMCIQw==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-arm64-musl@4.45.1': - resolution: {integrity: sha512-PmI1vxQetnM58ZmDFl9/Uk2lpBBby6B6rF4muJc65uZbxCs0EA7hhKCk2PKlmZKuyVSHAyIw3+/SiuMLxKxWog==} + '@rolldown/binding-linux-arm64-musl@1.0.3': + resolution: {integrity: sha512-VWkUHwWriDciit80wleYwKILoR/KMvxh/IdwS/paX+ZgpuRpCrKLUdadJbc0NpBEiyhpYawsJ73j9aCvOH+f7Q==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] os: [linux] + libc: [musl] - '@rollup/rollup-linux-loongarch64-gnu@4.45.1': - resolution: {integrity: sha512-9UmI0VzGmNJ28ibHW2GpE2nF0PBQqsyiS4kcJ5vK+wuwGnV5RlqdczVocDSUfGX/Na7/XINRVoUgJyFIgipoRg==} - cpu: [loong64] - os: [linux] - - '@rollup/rollup-linux-powerpc64le-gnu@4.45.1': - resolution: {integrity: sha512-7nR2KY8oEOUTD3pBAxIBBbZr0U7U+R9HDTPNy+5nVVHDXI4ikYniH1oxQz9VoB5PbBU1CZuDGHkLJkd3zLMWsg==} + '@rolldown/binding-linux-ppc64-gnu@1.0.3': + resolution: {integrity: sha512-5f1laC0SlIR0yDbFCd8acUhvJIag6N3zC5P7oUPN6wX0aOma+uKJ0wBDH5aq7I1PVI2ttTlhJwzwRIBnLiSGEg==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [ppc64] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-riscv64-gnu@4.45.1': - resolution: {integrity: sha512-nlcl3jgUultKROfZijKjRQLUu9Ma0PeNv/VFHkZiKbXTBQXhpytS8CIj5/NfBeECZtY2FJQubm6ltIxm/ftxpw==} - cpu: [riscv64] - os: [linux] - - '@rollup/rollup-linux-riscv64-musl@4.45.1': - resolution: {integrity: sha512-HJV65KLS51rW0VY6rvZkiieiBnurSzpzore1bMKAhunQiECPuxsROvyeaot/tcK3A3aGnI+qTHqisrpSgQrpgA==} - cpu: [riscv64] - os: [linux] - - '@rollup/rollup-linux-s390x-gnu@4.45.1': - resolution: {integrity: sha512-NITBOCv3Qqc6hhwFt7jLV78VEO/il4YcBzoMGGNxznLgRQf43VQDae0aAzKiBeEPIxnDrACiMgbqjuihx08OOw==} + '@rolldown/binding-linux-s390x-gnu@1.0.3': + resolution: {integrity: sha512-Iq4ko0r4XsgbrF/LunNgHtAGLRRVE2kXonAXQ/MV0mC6jQpMOhW1SvtZja2EhC/kd05++bP78dsqBeIQyYJ6Yg==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [s390x] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-x64-gnu@4.45.1': - resolution: {integrity: sha512-+E/lYl6qu1zqgPEnTrs4WysQtvc/Sh4fC2nByfFExqgYrqkKWp1tWIbe+ELhixnenSpBbLXNi6vbEEJ8M7fiHw==} + '@rolldown/binding-linux-x64-gnu@1.0.3': + resolution: {integrity: sha512-B8m6tD5+/N5FeNQFbKlLA/2yVq9ycQP1SeedyEYYKWBNR3ZQbkvIUcNnDNM03lO1l5F2roiiFJGgvoLLyZXtSg==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] + libc: [glibc] - '@rollup/rollup-linux-x64-musl@4.45.1': - resolution: {integrity: sha512-a6WIAp89p3kpNoYStITT9RbTbTnqarU7D8N8F2CV+4Cl9fwCOZraLVuVFvlpsW0SbIiYtEnhCZBPLoNdRkjQFw==} + '@rolldown/binding-linux-x64-musl@1.0.3': + resolution: {integrity: sha512-pSdpdUJHkuCxun9LE7jvgUB9qsRgaiyNNCX7m/AvHTcq67AiT/Yhoxvw5zPfhrM8k/BfP8ce/hMOpthKDpEUow==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [linux] + libc: [musl] - '@rollup/rollup-win32-arm64-msvc@4.45.1': - resolution: {integrity: sha512-T5Bi/NS3fQiJeYdGvRpTAP5P02kqSOpqiopwhj0uaXB6nzs5JVi2XMJb18JUSKhCOX8+UE1UKQufyD6Or48dJg==} + '@rolldown/binding-openharmony-arm64@1.0.3': + resolution: {integrity: sha512-OXXS3RKJgX2uLwM+gYyuH5omcH8fL1LJs96pZGgtetVCahON57+d4SJHzTgZiOjxgGkSnpXpOsWuPDGAKAigEg==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [arm64] - os: [win32] + os: [openharmony] + + '@rolldown/binding-wasm32-wasi@1.0.3': + resolution: {integrity: sha512-JTtb8BWFynicNSoPrehsCzBtOKjZ6jhMiPFEmOiuXg1Fl8dn2KHQob+GuPSGR0dryQa1PQJbzjF3dqO/whhjLg==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [wasm32] - '@rollup/rollup-win32-ia32-msvc@4.45.1': - resolution: {integrity: sha512-lxV2Pako3ujjuUe9jiU3/s7KSrDfH6IgTSQOnDWr9aJ92YsFd7EurmClK0ly/t8dzMkDtd04g60WX6yl0sGfdw==} - cpu: [ia32] + '@rolldown/binding-win32-arm64-msvc@1.0.3': + resolution: {integrity: sha512-gEdFFEN70A/jxb2svrWsN3aDL7OUtmvlOy+6fa2jxG8K0wQ1ZbdeLGnidov6Yu5/733dI5ySfzFlQ/cb0bSz1g==} + engines: {node: ^20.19.0 || >=22.12.0} + cpu: [arm64] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.45.1': - resolution: {integrity: sha512-M/fKi4sasCdM8i0aWJjCSFm2qEnYRR8AMLG2kxp6wD13+tMGA4Z1tVAuHkNRjud5SW2EM3naLuK35w9twvf6aA==} + '@rolldown/binding-win32-x64-msvc@1.0.3': + resolution: {integrity: sha512-eXB7CHuaQdqmJcc3koCNtNPmT/bj2gc999kUFgBxG8Ac0NdgXc4rkCHhqrgrhN3zddvvvrgzj1e90SuSfmyIXA==} + engines: {node: ^20.19.0 || >=22.12.0} cpu: [x64] os: [win32] - '@shikijs/engine-oniguruma@3.8.0': - resolution: {integrity: sha512-Tx7kR0oFzqa+rY7t80LjN8ZVtHO3a4+33EUnBVx2qYP3fGxoI9H0bvnln5ySelz9SIUTsS0/Qn+9dg5zcUMsUw==} + '@rolldown/pluginutils@1.0.1': + resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} + + '@shikijs/engine-oniguruma@3.23.0': + resolution: {integrity: sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==} - '@shikijs/langs@3.8.0': - resolution: {integrity: sha512-mfGYuUgjQ5GgXinB5spjGlBVhG2crKRpKkfADlp8r9k/XvZhtNXxyOToSnCEnF0QNiZnJjlt5MmU9PmhRdwAbg==} + '@shikijs/langs@3.23.0': + resolution: {integrity: sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==} - '@shikijs/themes@3.8.0': - resolution: {integrity: sha512-yaZiLuyO23sXe16JFU76KyUMTZCJi4EMQKIrdQt7okoTzI4yAaJhVXT2Uy4k8yBIEFRiia5dtD7gC1t8m6y3oQ==} + '@shikijs/themes@3.23.0': + resolution: {integrity: sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==} - '@shikijs/types@3.8.0': - resolution: {integrity: sha512-I/b/aNg0rP+kznVDo7s3UK8jMcqEGTtoPDdQ+JlQ2bcJIyu/e2iRvl42GLIDMK03/W1YOHOuhlhQ7aM+XbKUeg==} + '@shikijs/types@3.23.0': + resolution: {integrity: sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==} '@shikijs/vscode-textmate@10.0.2': resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} - '@stylistic/eslint-plugin@5.2.0': - resolution: {integrity: sha512-RCEdbREv9EBiToUBQTlRhVYKG093I6ZnnQ990j08eJ6uRZh71DXkOnoxtTLfDQ6utVCVQzrhZFHZP0zfrfOIjA==} + '@sindresorhus/is@4.6.0': + resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} + engines: {node: '>=10'} + + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@stylistic/eslint-plugin@5.10.0': + resolution: {integrity: sha512-nPK52ZHvot8Ju/0A4ucSX1dcPV2/1clx0kLcH5wDmrE4naKso7TUC/voUyU1O9OTKTrR6MYip6LP0ogEMQ9jPQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: '>=9.0.0' + eslint: ^9.0.0 || ^10.0.0 + + '@tybys/wasm-util@0.10.2': + resolution: {integrity: sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==} '@types/body-parser@1.19.6': resolution: {integrity: sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==} @@ -517,14 +478,17 @@ packages: '@types/deep-eql@4.0.2': resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@types/esrecurse@4.3.1': + resolution: {integrity: sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==} + '@types/estree@1.0.8': resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} - '@types/express-serve-static-core@4.19.6': - resolution: {integrity: sha512-N4LZ2xG7DatVqhCZzOGb1Yi5lMbXSZcmdLDe9EzSndPV2HpWYWzRbaerl2n27irrm94EPpprqa8KpskPT085+A==} + '@types/express-serve-static-core@4.19.8': + resolution: {integrity: sha512-02S5fmqeoKzVZCHPZid4b8JH2eM5HzQLZWN2FohQEy/0eXTq8VXZfSN6Pcr3F6N9R/vNrj7cpgbhjie6m/1tCA==} - '@types/express@4.17.23': - resolution: {integrity: sha512-Crp6WY9aTYP3qPi2wGDo9iUe/rceX01UMhnF1jmwDcKCFM6cx7YhGP/Mpr3y9AASpfHixIG0E6azCcL5OcDHsQ==} + '@types/express@4.17.25': + resolution: {integrity: sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==} '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} @@ -544,117 +508,133 @@ packages: '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} - '@types/node@20.19.8': - resolution: {integrity: sha512-HzbgCY53T6bfu4tT7Aq3TvViJyHjLjPNaAS3HOuMc9pw97KHsUtXNX4L+wu59g1WnjsZSko35MbEqnO58rihhw==} + '@types/node@12.20.55': + resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} + + '@types/node@22.20.0': + resolution: {integrity: sha512-QWlFW2wf3nTjC13/DqRnBpR4ZO36VJH/JVBkA/vcnmbTBNQIlnObqyqZE1tUR7+Ni23Lda8R1BxMfbXRpCUx5g==} '@types/oauth@0.9.6': resolution: {integrity: sha512-H9TRCVKBNOhZZmyHLqFt9drPM9l+ShWiqqJijU1B8P3DX3ub84NjxDuy+Hjrz+fEca5Kwip3qPMKNyiLgNJtIA==} - '@types/qs@6.14.0': - resolution: {integrity: sha512-eOunJqu0K1923aExK6y8p6fsihYEn/BYuQ4g0CxAAgFc4b/ZLN4CrsRZ55srTdqoiLzU2B2evC+apEIxprEzkQ==} + '@types/qs@6.15.1': + resolution: {integrity: sha512-GZHUBZR9hckSUhrxmp1nG6NwdpM9fCunJwyThLW1X3AyHgd9IlHb6VANpQQqDr2o/qQp6McZ3y/IA2rVzKzSbw==} '@types/range-parser@1.2.7': resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} - '@types/resolve@1.20.2': - resolution: {integrity: sha512-60BCwRFOZCQhDncwQdxxeOEEkbc5dIMccYLwbxsS4TUNeVECQ/pBJ0j09mrHOl/JJvpRPGwO9SvE4nR2Nb/a4Q==} + '@types/send@0.17.6': + resolution: {integrity: sha512-Uqt8rPBE8SY0RK8JB1EzVOIZ32uqy8HwdxCnoCOsYrvnswqmFZ/k+9Ikidlk/ImhsdvBsloHbAlewb2IEBV/Og==} - '@types/send@0.17.5': - resolution: {integrity: sha512-z6F2D3cOStZvuk2SaP6YrwkNO65iTZcwA2ZkSABegdkAh/lf+Aa/YQndZVfmEXT5vgAp6zv06VQ3ejSVjAny4w==} + '@types/send@1.2.1': + resolution: {integrity: sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==} - '@types/serve-static@1.15.8': - resolution: {integrity: sha512-roei0UY3LhpOJvjbIP6ZZFngyLKl5dskOtDhxY5THRSpO+ZI+nzJ+m5yUMzGrp89YRa7lvknKkMYjqQFGwA7Sg==} + '@types/serve-static@1.15.10': + resolution: {integrity: sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw==} '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} - '@typescript-eslint/eslint-plugin@8.37.0': - resolution: {integrity: sha512-jsuVWeIkb6ggzB+wPCsR4e6loj+rM72ohW6IBn2C+5NCvfUVY8s33iFPySSVXqtm5Hu29Ne/9bnA0JmyLmgenA==} + '@typescript-eslint/eslint-plugin@8.61.1': + resolution: {integrity: sha512-ZPlVl3PB3et/59Ne0fv/sci6ZXz4T4Hp4nTJ56i/Y0gR89ARb+KphojTq6j+56E5PIezmOIOOWyY+aWQFd+IkQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - '@typescript-eslint/parser': ^8.37.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.9.0' + '@typescript-eslint/parser': ^8.61.1 + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/parser@8.37.0': - resolution: {integrity: sha512-kVIaQE9vrN9RLCQMQ3iyRlVJpTiDUY6woHGb30JDkfJErqrQEmtdWH3gV0PBAfGZgQXoqzXOO0T3K6ioApbbAA==} + '@typescript-eslint/parser@8.61.1': + resolution: {integrity: sha512-PJ5vePq5/ognBbrIcoC5+SHO5dfpeLPzP9FpLkzWrguoYQEeeSjlJpVwOpo1JRSTEi7dRcwNy4h4dzV70PqHcg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.9.0' + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/project-service@8.37.0': - resolution: {integrity: sha512-BIUXYsbkl5A1aJDdYJCBAo8rCEbAvdquQ8AnLb6z5Lp1u3x5PNgSSx9A/zqYc++Xnr/0DVpls8iQ2cJs/izTXA==} + '@typescript-eslint/project-service@8.61.1': + resolution: {integrity: sha512-PrC4JYGmR241lYnfhmKGTXkFqv8+ymbTFgSAY0fVXpY82/QkMw5TZPl+vGzuDDU2QYJk9fIDOBTntF+yDv9LEA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - typescript: '>=4.8.4 <5.9.0' + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/scope-manager@8.37.0': - resolution: {integrity: sha512-0vGq0yiU1gbjKob2q691ybTg9JX6ShiVXAAfm2jGf3q0hdP6/BruaFjL/ManAR/lj05AvYCH+5bbVo0VtzmjOA==} + '@typescript-eslint/scope-manager@8.61.1': + resolution: {integrity: sha512-L2bdIeoQS8FlKAvONAr20w6OcLXeB+qiDKbAooS9A0Ben+iSIkBef0FxqwKWYqt5sa0i4KJtxVyVmhMylKzF5w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/tsconfig-utils@8.37.0': - resolution: {integrity: sha512-1/YHvAVTimMM9mmlPvTec9NP4bobA1RkDbMydxG8omqwJJLEW/Iy2C4adsAESIXU3WGLXFHSZUU+C9EoFWl4Zg==} + '@typescript-eslint/tsconfig-utils@8.61.1': + resolution: {integrity: sha512-UN/H4di+OO7EWx2ovME+8t31YO+KVnK0RRKEHR3kOt21/Ay8BOq3M1OMvWs5vNiqcFCYGYoxK3MXPZzmMUE+yg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - typescript: '>=4.8.4 <5.9.0' + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/type-utils@8.37.0': - resolution: {integrity: sha512-SPkXWIkVZxhgwSwVq9rqj/4VFo7MnWwVaRNznfQDc/xPYHjXnPfLWn+4L6FF1cAz6e7dsqBeMawgl7QjUMj4Ow==} + '@typescript-eslint/type-utils@8.61.1': + resolution: {integrity: sha512-GYRicKmVK0C4fsKgaACaknOUAq9Oa2kwsjnpFhFcS/5p4Ht5IP9OVLbgIgcK4SRk92nVHFluurg1lumD9dBcLw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.9.0' + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/types@8.37.0': - resolution: {integrity: sha512-ax0nv7PUF9NOVPs+lmQ7yIE7IQmAf8LGcXbMvHX5Gm+YJUYNAl340XkGnrimxZ0elXyoQJuN5sbg6C4evKA4SQ==} + '@typescript-eslint/types@8.59.4': + resolution: {integrity: sha512-F1o7WJcCq+bc8dwcO/YsSEOudAH8RDtaOhM6wcAQhcUsFhnWQl81JKy48q1hoxAU0qrzM89+31GYh1515Zde3Q==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@8.37.0': - resolution: {integrity: sha512-zuWDMDuzMRbQOM+bHyU4/slw27bAUEcKSKKs3hcv2aNnc/tvE/h7w60dwVw8vnal2Pub6RT1T7BI8tFZ1fE+yg==} + '@typescript-eslint/types@8.61.1': + resolution: {integrity: sha512-G+CRlPqLv7Bz1IZVs03x5K59F1veqL0EJUROAdGhKsEq8qOiRiZbI+HUojPq5l0fEGOKModD9br6lObhB8zkoA==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/typescript-estree@8.61.1': + resolution: {integrity: sha512-u+oQD3BqYWPc8YV9Zab4vaJElJuwOLPRc10Jm1o/qS+6Qwen14HCWwx0Seo4LnSn2wxea2Ik8DxPt2/FHmuhrg==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - typescript: '>=4.8.4 <5.9.0' + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/utils@8.37.0': - resolution: {integrity: sha512-TSFvkIW6gGjN2p6zbXo20FzCABbyUAuq6tBvNRGsKdsSQ6a7rnV6ADfZ7f4iI3lIiXc4F4WWvtUfDw9CJ9pO5A==} + '@typescript-eslint/utils@8.61.1': + resolution: {integrity: sha512-1+P/3Dj6jvtybE1q0HQ6yBt/gq+oKJyLdEv4HdnqasaEXRSYCAsD59mXEVQnM/ULNdQxbX77tdG4jPRjIS6knA==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.9.0' + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' - '@typescript-eslint/visitor-keys@8.37.0': - resolution: {integrity: sha512-YzfhzcTnZVPiLfP/oeKtDp2evwvHLMe0LOy7oe+hb9KKIumLNohYS9Hgp1ifwpu42YWxhZE8yieggz6JpqO/1w==} + '@typescript-eslint/visitor-keys@8.61.1': + resolution: {integrity: sha512-6fJ9MHWtK14C1DSkiMlHUSOmrVebL7150xZJBlJiL62jjhIA4JmOq6flwBgDxIdBKKdoiZRel+dfPD5MLfny3w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@vitest/expect@3.2.4': - resolution: {integrity: sha512-Io0yyORnB6sikFlt8QW5K7slY4OjqNX9jmJQ02QDda8lyM6B5oNgVWoSoKPac8/kgnCUzuHQKrSLtu/uOqqrig==} + '@vitest/coverage-v8@4.1.9': + resolution: {integrity: sha512-G9/lgqibheLVBDRuya45EbsEXTYcWoSG+TLg7i2axuzx0Eq62eXn+aWXyaVdV5vKvFSWd6ywcX8hA7la9Pvu8g==} + peerDependencies: + '@vitest/browser': 4.1.9 + vitest: 4.1.9 + peerDependenciesMeta: + '@vitest/browser': + optional: true - '@vitest/mocker@3.2.4': - resolution: {integrity: sha512-46ryTE9RZO/rfDd7pEqFl7etuyzekzEhUbTW3BvmeO/BcCMEgq59BKhek3dXDWgAj4oMK6OZi+vRr1wPW6qjEQ==} + '@vitest/expect@4.1.9': + resolution: {integrity: sha512-vl/rYsUKcBr3SnQn166+XR5ZQcgMx3DQhFWdfli/cWpLnLUmbxZvyrJZotLFUryib+LtArYMSTJ5RbQ57ZqrlA==} + + '@vitest/mocker@4.1.9': + resolution: {integrity: sha512-EVkXzBjrPGM+cK8/ANWgBrkUCfJfb38/EfTSO8h7pWvKkyPkpWxvR7BkD2MyItMF62C97zAEoqdpUixwR/e+Rw==} peerDependencies: msw: ^2.4.9 - vite: ^5.0.0 || ^6.0.0 || ^7.0.0-0 + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: msw: optional: true vite: optional: true - '@vitest/pretty-format@3.2.4': - resolution: {integrity: sha512-IVNZik8IVRJRTr9fxlitMKeJeXFFFN0JaB9PHPGQ8NKQbGpfjlTx9zO4RefN8gp7eqjNy8nyK3NZmBzOPeIxtA==} + '@vitest/pretty-format@4.1.9': + resolution: {integrity: sha512-s0iufns3iIFitdgm+YR7g1whCAaGtXz459VS9/PqyKDEEFgYIhsHOQmXgIgDuYCt7DeQmiZT0Qe2OA2p4ZPu5A==} - '@vitest/runner@3.2.4': - resolution: {integrity: sha512-oukfKT9Mk41LreEW09vt45f8wx7DordoWUZMYdY/cyAk7w5TWkTRCNZYF7sX7n2wB7jyGAl74OxgwhPgKaqDMQ==} + '@vitest/runner@4.1.9': + resolution: {integrity: sha512-KXLMDtc7oe70+3mJfGrPUWPesswH+3sTxAMAMl8DG7I8IUQT4XW718dY5ID3vPUcmlu27CcKfY4P3h3I29SLJg==} - '@vitest/snapshot@3.2.4': - resolution: {integrity: sha512-dEYtS7qQP2CjU27QBC5oUOxLE/v5eLkGqPE0ZKEIDGMs4vKWe7IjgLOeauHsR0D5YuuycGRO5oSRXnwnmA78fQ==} + '@vitest/snapshot@4.1.9': + resolution: {integrity: sha512-Jc7RKGNBo8Z28WYIm0Niej4xdSPByRf6mU58VpHQkd6Zh05rlnA+twjbK5HyeIGHxrzsc3mJgS43uM0CZKzaIA==} - '@vitest/spy@3.2.4': - resolution: {integrity: sha512-vAfasCOe6AIK70iP5UD11Ac4siNUNJ9i/9PZ3NKx07sG6sUxeag1LWdNrMWeKKYBLlzuK+Gn65Yd5nyL6ds+nw==} + '@vitest/spy@4.1.9': + resolution: {integrity: sha512-fHpsS6mIi+PiEW+vcRVOMkX1oSaPKne3VOclSFICPcGOmfKgXPU5iAah+wcNcj2xPrCCmfq99IDGf+EojhhvhA==} - '@vitest/utils@3.2.4': - resolution: {integrity: sha512-fB2V0JFrQSMsCo9HiSq3Ezpdv4iYaXRG1Sx8edX3MwxfyNn83mKiGzOcH+Fkxt4MHxr3y42fQi1oeAInqgX2QA==} + '@vitest/utils@4.1.9': + resolution: {integrity: sha512-A51o8ymO5PpqlWNnBP9ZHPXDIpuMtTLlGSjN7la4US+LJzoUMyhwjA5QXlm39JexgwHKW4Xjs8Z2d3dLCXOeuA==} accepts@1.3.8: resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} @@ -665,49 +645,89 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn@8.15.0: - resolution: {integrity: sha512-NZyJarBfL7nWwIq+FDL6Zp/yHEhePMNnnJ0y3qfieCrmNvYct8uvtiV41UvlSe6apAfk0fY1FbWx+NwfmpvtTg==} + acorn@8.16.0: + resolution: {integrity: sha512-UVJyE9MttOsBQIDKw1skb9nAwQuR5wuGD3+82K6JgJlm/Y+KI92oNsMNGZCYdDsVtRHSak0pcV5Dno5+4jh9sw==} engines: {node: '>=0.4.0'} hasBin: true - ajv@6.12.6: - resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} + agent-base@6.0.2: + resolution: {integrity: sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==} + engines: {node: '>= 6.0.0'} + + ajv@6.15.0: + resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + + ansi-colors@4.1.3: + resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} + engines: {node: '>=6'} + + ansi-escapes@7.3.0: + resolution: {integrity: sha512-BvU8nYgGQBxcmMuEeUEmNTvrMVjJNSH7RgW24vXexN4Ven6qCvy4TntnvlnwnMLTVlcRQQdbRY8NKnaIoeWDNg==} + engines: {node: '>=18'} + + ansi-regex@5.0.1: + resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} + engines: {node: '>=8'} + + ansi-regex@6.2.2: + resolution: {integrity: sha512-Bq3SmSpyFHaWjPk8If9yc6svM8c56dB5BAtW4Qbw5jHTwwXXcTLoRMkpDJp6VL0XzlWaCHTXrkFURMYmD0sLqg==} + engines: {node: '>=12'} ansi-styles@4.3.0: resolution: {integrity: sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==} engines: {node: '>=8'} + any-promise@1.3.0: + resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} + + anymatch@3.1.3: + resolution: {integrity: sha512-KMReFUr0B4t+D+OBkjR3KYqvocp2XaSzO55UcB6mgQMd3KbcE+mWTyvVV7D/zsdEbNnV6acZUutkiHQXvTr1Rw==} + engines: {node: '>= 8'} + + argparse@1.0.10: + resolution: {integrity: sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==} + argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} array-flatten@1.1.1: resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} - assertion-error@2.0.1: - resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} - engines: {node: '>=12'} + array-union@2.1.0: + resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} + engines: {node: '>=8'} + + ast-v8-to-istanbul@1.0.4: + resolution: {integrity: sha512-0bC0/4bTSrnwdhU3IsZDwEdojvuPrSg59OYZfKsLRtJZ0u8VBx9DebfqqG8bRdCC0I7vjgxmPi41P0lpkhJHtA==} asynckit@0.4.0: resolution: {integrity: sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==} - axios@1.10.0: - resolution: {integrity: sha512-/1xYAC4MP/HEG+3duIhFr4ZQXR4sQXOIe+o6sdqzeykGLx6Upp/1p8MHqhINOvGeP7xyNHe7tsiJByc4SSVUxw==} + axios@1.18.1: + resolution: {integrity: sha512-3nTvFlvpn9Zu/RkHUqtc7/+al4UpRW5az71ap5zccp6e8RAYEzhMTecX8Dz1wWDYrPpUoB1HAQEGEAEvUr7S9g==} + + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} - balanced-match@1.0.2: - resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} + better-path-resolve@1.0.0: + resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} + engines: {node: '>=4'} + + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + engines: {node: '>=8'} binary-searching@2.0.5: resolution: {integrity: sha512-v4N2l3RxL+m4zDxyxz3Ne2aTmiPn8ZUpKFpdPtO+ItW1NcTCXA7JeHG5GMBSvoKSkQZ9ycS+EouDVxYB9ufKWA==} - body-parser@1.20.3: - resolution: {integrity: sha512-7rAxByjUMqQ3/bHJy7D6OGXvx/MMc4IqBn/X0fcM1QUcAItpZrBEYhWGem+tzXH90c+G01ypMcYJBO9Y30203g==} + body-parser@1.20.5: + resolution: {integrity: sha512-3grm+/2tUOvu2cjJkvsIxrv/wVpfXQW4PsQHYm7yk4vfpu7Ekl6nEsYBoJUL6qDwZUx8wUhQ8tR2qz+ad9c9OA==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - brace-expansion@1.1.12: - resolution: {integrity: sha512-9T9UjW3r0UW5c1Q7GTwllptXwhvYmEzFhzMfZ9H7FQWt+uZePjZPjBP/W1ZEyZ1twGWom5/56TF4lPcqjnDHcg==} - - brace-expansion@2.0.2: - resolution: {integrity: sha512-Jt0vHyM+jmUBqojB7E1NIYadt0vI0Qxjxd2TErW94wDz+E2LAm5vKMXXwg6ZZBTHPuUlDgQHKXvjGBdfcF1ZDQ==} + brace-expansion@5.0.6: + resolution: {integrity: sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==} + engines: {node: 18 || 20 || >=22} braces@3.0.3: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} @@ -717,10 +737,6 @@ packages: resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} engines: {node: '>= 0.8'} - cac@6.7.14: - resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} - engines: {node: '>=8'} - call-bind-apply-helpers@1.0.2: resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} engines: {node: '>= 0.4'} @@ -729,24 +745,46 @@ packages: resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} engines: {node: '>= 0.4'} - callsites@3.1.0: - resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} - engines: {node: '>=6'} - - chai@5.2.1: - resolution: {integrity: sha512-5nFxhUrX0PqtyogoYOA8IPswy5sZFTOsBFl/9bNsmDLgsxYTzSZQJDPppDnZPTQbzSEm0hqGjWPzRemQCYbD6A==} + chai@6.2.2: + resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} engines: {node: '>=18'} chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} + chalk@5.6.2: + resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} + engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + + char-regex@1.0.2: + resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} + engines: {node: '>=10'} + character-entities@2.0.2: resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} - check-error@2.1.1: - resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} - engines: {node: '>= 16'} + chardet@2.1.1: + resolution: {integrity: sha512-PsezH1rqdV9VvyNhxxOW32/d75r01NY7TQCmOqomRo15ZSOKbpTFVsfjghxo6JloQUCGnH4k1LGu0R4yCLlWQQ==} + + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + + cjs-module-lexer@1.4.3: + resolution: {integrity: sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==} + + cli-highlight@2.1.11: + resolution: {integrity: sha512-9KDcoEVwyUXrjcJNvHD0NFc/hiwe/WPVYIleQh2O1N2Zro5gWJZ/K+3DGn8w8P/F6FxOgzyC5bxDyHIgCSPhGg==} + engines: {node: '>=8.0.0', npm: '>=5.0.0'} + hasBin: true + + cli-table3@0.6.5: + resolution: {integrity: sha512-+W/5efTR7y5HRD7gACw9yQjqMVvEMLBHmboM/kPWam+H+Hmyrgjh6YncVKK122YZkXrLudzTuAukUw9FnMf7IQ==} + engines: {node: 10.* || >= 12.*} + + cliui@7.0.4: + resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} @@ -759,16 +797,18 @@ packages: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} + commander@10.0.1: + resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} + engines: {node: '>=14'} + + commander@9.5.0: + resolution: {integrity: sha512-KRs7WVDKg86PWiuAqhDrAQnTXZKraVcCc6vFdL14qrZ/DcWwuRo7VoiYXalXO7S5GKpqYiVEwCbgFDfxNHKJBQ==} + engines: {node: ^12.20.0 || >=14} + comment-parser@1.4.1: resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} engines: {node: '>= 12.0.0'} - commondir@1.0.1: - resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} - - concat-map@0.0.1: - resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - content-disposition@0.5.4: resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} engines: {node: '>= 0.6'} @@ -777,11 +817,14 @@ packages: resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} engines: {node: '>= 0.6'} - cookie-signature@1.0.6: - resolution: {integrity: sha512-QADzlaHc8icV8I7vbaJXJwod9HWYp8uCqf1xa4OfNu1T7JVxQIrUgOWtHdNDtPiywmFbiS12VjotIXLrKM3orQ==} + convert-source-map@2.0.0: + resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - cookie@0.7.1: - resolution: {integrity: sha512-6DnInpx7SJ2AK3+CTUE/ZM0vWTUboZCegxhC2xiIydHR9jNuTAASBrfEpHhiGOZw/nX51bHt6YQl8jsGo4y/0w==} + cookie-signature@1.0.7: + resolution: {integrity: sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==} + + cookie@0.7.2: + resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} engines: {node: '>= 0.6'} cross-spawn@7.0.6: @@ -796,8 +839,8 @@ packages: supports-color: optional: true - debug@4.4.1: - resolution: {integrity: sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ==} + debug@4.4.3: + resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} engines: {node: '>=6.0'} peerDependencies: supports-color: '*' @@ -808,17 +851,9 @@ packages: decode-named-character-reference@1.2.0: resolution: {integrity: sha512-c6fcElNV6ShtZXmsgNgFFV5tVX2PaV4g+MOAkb8eXHvn6sryJBrZa9r0zV6+dtTyoCKxtDy5tyQ5ZwQuidtd+Q==} - deep-eql@5.0.2: - resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} - engines: {node: '>=6'} - deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} - deepmerge@4.3.1: - resolution: {integrity: sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==} - engines: {node: '>=0.10.0'} - delayed-stream@1.0.0: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} @@ -835,11 +870,23 @@ packages: resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + detect-indent@6.1.0: + resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} + engines: {node: '>=8'} + + detect-libc@2.1.2: + resolution: {integrity: sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==} + engines: {node: '>=8'} + devlop@1.1.0: resolution: {integrity: sha512-RWmIqhcFf1lRYBvNmr7qTNuyCt/7/ns2jbpp1+PalgE/rDQcBT0fioSMUpJ93irlUhC5hrg4cYqe6U+0ImW0rA==} - dotenv@17.2.0: - resolution: {integrity: sha512-Q4sgBT60gzd0BB0lSyYD3xM4YxrXA9y4uBDof1JNYGzOXrQdQ6yX+7XIAqoFOGQFOTK1D3Hts5OllpxMDZFONQ==} + dir-glob@3.0.1: + resolution: {integrity: sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==} + engines: {node: '>=8'} + + dotenv@17.4.2: + resolution: {integrity: sha512-nI4U3TottKAcAD9LLud4Cb7b2QztQMUEfHbvhTH09bqXTxnSie8WnjPALV/WMCrJZ6UV/qHJ6L03OqO3LcdYZw==} engines: {node: '>=12'} dunder-proto@1.0.1: @@ -849,18 +896,28 @@ packages: ee-first@1.1.1: resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} - encodeurl@1.0.2: - resolution: {integrity: sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==} - engines: {node: '>= 0.8'} + emoji-regex@8.0.0: + resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} + + emojilib@2.4.0: + resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==} encodeurl@2.0.0: resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} engines: {node: '>= 0.8'} + enquirer@2.4.1: + resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} + engines: {node: '>=8.6'} + entities@4.5.0: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + environment@1.1.0: + resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} + engines: {node: '>=18'} + es-define-property@1.0.1: resolution: {integrity: sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==} engines: {node: '>= 0.4'} @@ -869,21 +926,20 @@ packages: resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} engines: {node: '>= 0.4'} - es-module-lexer@1.7.0: - resolution: {integrity: sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==} + es-module-lexer@2.1.0: + resolution: {integrity: sha512-n27zTYMjYu1aj4MjCWzSP7G9r75utsaoc8m61weK+W8JMBGGQybd43GstCXZ3WNmSFtGT9wi59qQTW6mhTR5LQ==} - es-object-atoms@1.1.1: - resolution: {integrity: sha512-FGgH2h8zKNim9ljj7dankFPcICIK9Cp5bm+c2gQSYePhpaG5+esrLODihIorn+Pe6FGJzWhXQotPv73jTaldXA==} + es-object-atoms@1.1.2: + resolution: {integrity: sha512-HWcBoN6NileqtSydK2FqHbS/LoDd2pqrnQHLyJzBj4kOp/ky2MWMN694xOfkK8/SnUsW2DH7EfyVlydKCsm1Zw==} engines: {node: '>= 0.4'} es-set-tostringtag@2.1.0: resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} engines: {node: '>= 0.4'} - esbuild@0.25.6: - resolution: {integrity: sha512-GVuzuUwtdsghE3ocJ9Bs8PNoF13HNQ5TXbEi2AhvVb8xU1Iwt9Fos9FEamfoee+u/TOsn7GUWc04lz46n2bbTg==} - engines: {node: '>=18'} - hasBin: true + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + engines: {node: '>=6'} escape-html@1.0.3: resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} @@ -892,9 +948,9 @@ packages: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} - eslint-scope@8.4.0: - resolution: {integrity: sha512-sNXOfKCn74rt8RICKMvJS7XKV/Xk9kA7DyJr8mJik3S7Cwgy3qlkkmyS2uQB3jiJg6VNdZd/pDBJu0nvG2NlTg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-scope@9.1.2: + resolution: {integrity: sha512-xS90H51cKw0jltxmvmHy2Iai1LIqrfbw57b79w/J7MfvDfkIkFZ+kj6zC3BjtUwh150HsSSdxXZcsuv72miDFQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} eslint-visitor-keys@3.4.3: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} @@ -904,9 +960,13 @@ packages: resolution: {integrity: sha512-Uhdk5sfqcee/9H/rCOJikYz67o0a2Tw2hGRPOG2Y1R2dg7brRe1uG0yaNQDHu+TO/uQPF/5eCapvYSmHUjt7JQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - eslint@9.31.0: - resolution: {integrity: sha512-QldCVh/ztyKJJZLr4jXNUByx3gR+TDYZCRXEktiZoUR3PGy4qCmSbkxcIle8GEwGpb5JBZazlaJ/CxLidXdEbQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + eslint-visitor-keys@5.0.1: + resolution: {integrity: sha512-tD40eHxA35h0PEIZNeIjkHoDR4YjjJp34biM0mDvplBe//mB+IHCqHDGV7pxF+7MklTvighcCPPZC7ynWyjdTA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + eslint@10.5.0: + resolution: {integrity: sha512-1y+7C+vi12bUK1IpZeaV3gsH9fHLBmPvYmPx42pvT/E9yG0IC8g3PUZZgp0+JLJl7ZDK0flc2gc+Aw9dpCvIsQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} hasBin: true peerDependencies: jiti: '*' @@ -918,8 +978,17 @@ packages: resolution: {integrity: sha512-j6PAQ2uUr79PZhBjP5C5fhl8e39FmRnOjsD5lGnWrFU8i2G776tBK7+nP8KuQUTTyAZUwfQqXAgrVH5MbH9CYQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - esquery@1.6.0: - resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + espree@11.2.0: + resolution: {integrity: sha512-7p3DrVEIopW1B1avAGLuCSh1jubc01H2JHc8B4qqGblmg5gI9yumBgACjWo4JlIc04ufug4xJ3SQI8HkS/Rgzw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + esprima@4.0.1: + resolution: {integrity: sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==} + engines: {node: '>=4'} + hasBin: true + + esquery@1.7.0: + resolution: {integrity: sha512-Ap6G0WQwcU/LHsvLwON1fAQX9Zp0A2Y6Y/cJBl9r/JbW90Zyg4/zbG6zzKa2OTALELarYHmKu0GhpM5EO+7T0g==} engines: {node: '>=0.10'} esrecurse@4.3.0: @@ -930,9 +999,6 @@ packages: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} - estree-walker@2.0.2: - resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} - estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} @@ -944,14 +1010,17 @@ packages: resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} engines: {node: '>= 0.6'} - expect-type@1.2.2: - resolution: {integrity: sha512-JhFGDVJ7tmDJItKhYgJCGLOWjuK9vPxiXoUFLwLDc99NlmklilbiQJwoctZtt13+xMw91MCk/REan6MWHqDjyA==} + expect-type@1.3.0: + resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} engines: {node: '>=12.0.0'} - express@4.21.2: - resolution: {integrity: sha512-28HqgMZAmih1Czt9ny7qr6ek2qddF4FclbMzwhCREB6OFfH+rXAnuNCwo1/wFvrtbgsQDb4kSbX9de9lFbrXnA==} + express@4.22.2: + resolution: {integrity: sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q==} engines: {node: '>= 0.10.0'} + extendable-error@0.1.7: + resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -965,17 +1034,21 @@ packages: fast-levenshtein@2.0.6: resolution: {integrity: sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==} - fastq@1.19.1: - resolution: {integrity: sha512-GwLTyxkCXjXbxqIhTsMI2Nui8huMPtnxg7krajPJAjnEG/iiOS7i+zCtWGZR9G0NBKbXKh6X9m9UIsYX/N6vvQ==} + fastq@1.20.1: + resolution: {integrity: sha512-GGToxJ/w1x32s/D2EKND7kTil4n8OVk/9mycTc4VDza13lOvpUZTGX3mFSCtV9ksdGBVzvsyAVLM6mHFThxXxw==} - fdir@6.4.6: - resolution: {integrity: sha512-hiFoqpyZcfNm1yc4u8oWCf9A2c4D3QjCrks3zmoVKVxpQRzmPNar1hUJcBG2RQHvEVGDN+Jm81ZheVLAQMK6+w==} + fdir@6.5.0: + resolution: {integrity: sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==} + engines: {node: '>=12.0.0'} peerDependencies: picomatch: ^3 || ^4 peerDependenciesMeta: picomatch: optional: true + fflate@0.8.3: + resolution: {integrity: sha512-tbZNuJrLwGUp3zshBtdy4W+ORxZuIh8a5ilyIEQDC5rY1f3U20JMry0Ll3WBzU58EZKsEuJFXhb5gwv8CsPvgA==} + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -984,10 +1057,14 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} - finalhandler@1.3.1: - resolution: {integrity: sha512-6BN9trH7bp3qvnrRyzsBz+g3lZxTNZTbVO2EV1CS0WIcDbawYVdYvGflME/9QP0h0pYlCDBCTjYa9nZzMDpyxQ==} + finalhandler@1.3.2: + resolution: {integrity: sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==} engines: {node: '>= 0.8'} + find-up@4.1.0: + resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} + engines: {node: '>=8'} + find-up@5.0.0: resolution: {integrity: sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==} engines: {node: '>=10'} @@ -996,11 +1073,11 @@ packages: resolution: {integrity: sha512-f7ccFPK3SXFHpx15UIGyRJ/FJQctuKZ0zVuN3frBo4HnK3cay9VEW0R6yPYFHC0AgqhukPzKjq22t5DmAyqGyw==} engines: {node: '>=16'} - flatted@3.3.3: - resolution: {integrity: sha512-GX+ysw4PBCz0PzosHDepZGANEuFCMLrnRTiEy9McGjmkCQYwRq4A/X786G/fjM/+OjsWSU1ZrY5qyARZmO/uwg==} + flatted@3.4.2: + resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==} - follow-redirects@1.15.9: - resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} + follow-redirects@1.16.0: + resolution: {integrity: sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==} engines: {node: '>=4.0'} peerDependencies: debug: '*' @@ -1008,8 +1085,8 @@ packages: debug: optional: true - form-data@4.0.3: - resolution: {integrity: sha512-qsITQPfmvMOSAdeyZ+12I1c+CKSstAFAwu+97zrnWAbIr5u8wfsExUzCesVLC8NgHuRUqNN4Zy6UPWUTRGslcA==} + form-data@4.0.6: + resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} engines: {node: '>= 6'} forwarded@0.2.0: @@ -1020,6 +1097,14 @@ packages: resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} engines: {node: '>= 0.6'} + fs-extra@7.0.1: + resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} + engines: {node: '>=6 <7 || >=8'} + + fs-extra@8.1.0: + resolution: {integrity: sha512-yhlQgA6mnOJUKOsRUFsgJdQCvkKhcz8tlZG5HBQfReYZy46OwLcY+Zia0mtdHsOo9y/hP+CxMN0TU9QxoOtG4g==} + engines: {node: '>=6 <7 || >=8'} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} @@ -1028,6 +1113,10 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + get-intrinsic@1.3.0: resolution: {integrity: sha512-9fSjSaos/fRIVIp+xSJlE6lfwhES7LNtKaCBIamHsjr2na1BiABJPo0mOjjz8GJDURarmCPGqaiVg5mfjb98CQ==} engines: {node: '>= 0.4'} @@ -1036,6 +1125,9 @@ packages: resolution: {integrity: sha512-sTSfBjoXBp89JvIKIefqw7U2CCebsc74kiY6awiGogKtoSGbgjYE/G/+l9sF3MWFPNc9IcoOC4ODfKHfxFmp0g==} engines: {node: '>= 0.4'} + get-tsconfig@4.14.0: + resolution: {integrity: sha512-yTb+8DXzDREzgvYmh6s9vHsSVCHeC0G3PI5bEXNBHtmshPnO+S5O7qgLEOn0I5QvMy6kpZN8K1NKGyilLb93wA==} + glob-parent@5.1.2: resolution: {integrity: sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==} engines: {node: '>= 6'} @@ -1044,20 +1136,20 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - globals@14.0.0: - resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} + globals@17.6.0: + resolution: {integrity: sha512-sepffkT8stwnIYbsMBpoCHJuJM5l98FUF2AnE07hfvE0m/qp3R586hw4jF4uadbhvg1ooIdzuu7CsfD2jzCaNA==} engines: {node: '>=18'} - globals@16.3.0: - resolution: {integrity: sha512-bqWEnJ1Nt3neqx2q5SFfGS8r/ahumIakg3HcwtNlrVlwXIeNumWn/c7Pn/wKzGhf6SaW6H6uWXLqC30STCMchQ==} - engines: {node: '>=18'} + globby@11.1.0: + resolution: {integrity: sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g==} + engines: {node: '>=10'} gopd@1.2.0: resolution: {integrity: sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==} engines: {node: '>= 0.4'} - graphemer@1.4.0: - resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} + graceful-fs@4.2.11: + resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} has-flag@4.0.0: resolution: {integrity: sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==} @@ -1071,18 +1163,41 @@ packages: resolution: {integrity: sha512-NqADB8VjPFLM2V0VvHUewwwsw0ZWBaIdgo+ieHtK3hasLz4qeCRjYcqfB6AQrBggRKppKF8L52/VqdVsO47Dlw==} engines: {node: '>= 0.4'} - hasown@2.0.2: - resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + hasown@2.0.4: + resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} engines: {node: '>= 0.4'} - http-errors@2.0.0: - resolution: {integrity: sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==} + highlight.js@10.7.3: + resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} + + html-escaper@2.0.2: + resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} + + http-errors@2.0.1: + resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} engines: {node: '>= 0.8'} + https-proxy-agent@5.0.1: + resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} + engines: {node: '>= 6'} + + human-id@4.1.3: + resolution: {integrity: sha512-tsYlhAYpjCKa//8rXZ9DqKEawhPoSytweBC2eNvcaDK+57RZLHGqNs3PZTQO6yekLFSuvA6AlnAfrw1uBvtb+Q==} + hasBin: true + + husky@9.1.7: + resolution: {integrity: sha512-5gs5ytaNjBrh5Ow3zrvdUUY+0VxIuWVL4i9irt6friV+BqdCfmV11CQTWMiBYWHbXhco+J1kHfTOUkePhCDvMA==} + engines: {node: '>=18'} + hasBin: true + iconv-lite@0.4.24: resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} engines: {node: '>=0.10.0'} + iconv-lite@0.7.2: + resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==} + engines: {node: '>=0.10.0'} + ignore@5.3.2: resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} @@ -1091,10 +1206,6 @@ packages: resolution: {integrity: sha512-Hs59xBNfUIunMFgWAbGX5cq6893IbWg4KnrjbYwX3tx0ztorVgTDA6B2sxf8ejHJ4wz8BqGUMYlnzNBer5NvGg==} engines: {node: '>= 4'} - import-fresh@3.3.1: - resolution: {integrity: sha512-TR3KfrTZTYLPB6jUjfx6MF9WcWrHL9su5TObK4ZkYgBdWKPOFoSoQIdEuTuR82pmtxH2spWG9h6etwfr1pLBqQ==} - engines: {node: '>=6'} - imurmurhash@0.1.4: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} @@ -1106,85 +1217,207 @@ packages: resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} engines: {node: '>= 0.10'} - is-core-module@2.16.1: - resolution: {integrity: sha512-UfoeMA6fIJ8wTYFEUjelnaGI67v6+N7qXJEvQuIGa99l4xsCruSYOVSQ0uPANn4dAzm8lkYPaKLrrijLq7x23w==} - engines: {node: '>= 0.4'} + is-binary-path@2.1.0: + resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} + engines: {node: '>=8'} is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} + is-fullwidth-code-point@3.0.0: + resolution: {integrity: sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==} + engines: {node: '>=8'} + is-glob@4.0.3: resolution: {integrity: sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==} engines: {node: '>=0.10.0'} - is-module@1.0.0: - resolution: {integrity: sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==} - is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} - is-reference@1.2.1: - resolution: {integrity: sha512-U82MsXXiFIrjCK4otLT+o2NA2Cd2g5MLoOVXUZjIOhLurrRxpEXzI8O0KZHr3IjLvlAH1kTPYSuqer5T9ZVBKQ==} + is-subdir@1.2.0: + resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} + engines: {node: '>=4'} + + is-windows@1.0.2: + resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} + engines: {node: '>=0.10.0'} + + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + istanbul-lib-coverage@3.2.2: + resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} + engines: {node: '>=8'} + + istanbul-lib-report@3.0.1: + resolution: {integrity: sha512-GCfE1mtsHGOELCU8e/Z7YWzpmybrx/+dSTfLrvY8qRmaY6zXTKWn6WQIjaAFw069icm6GVMNkgu0NzI4iPZUNw==} + engines: {node: '>=10'} + + istanbul-reports@3.2.0: + resolution: {integrity: sha512-HGYWWS/ehqTV3xN10i23tkPkpH46MLCIMFNCaaKNavAXTF1RkqxawEPtnjnGZ6XKSInBKkiOA5BKS+aZiY3AvA==} + engines: {node: '>=8'} + + jiti@2.7.0: + resolution: {integrity: sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==} + hasBin: true + + js-tokens@10.0.0: + resolution: {integrity: sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==} + + js-yaml@3.14.2: + resolution: {integrity: sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==} + hasBin: true + + js-yaml@4.1.1: + resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} + hasBin: true + + json-buffer@3.0.1: + resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + + json-schema-traverse@0.4.1: + resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + + json-stable-stringify-without-jsonify@1.0.1: + resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + + jsonfile@4.0.0: + resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} + + jsuri@1.3.1: + resolution: {integrity: sha512-LLdAeqOf88/X0hylAI7oSir6QUsz/8kOW0FcJzzu/SJRfORA/oPHycAOthkNp7eLPlTAbqVDFbqNRHkRVzEA3g==} + + keyv@4.5.4: + resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + + levn@0.4.1: + resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} + engines: {node: '>= 0.8.0'} + + lightningcss-android-arm64@1.32.0: + resolution: {integrity: sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [android] + + lightningcss-darwin-arm64@1.32.0: + resolution: {integrity: sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [darwin] + + lightningcss-darwin-x64@1.32.0: + resolution: {integrity: sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [darwin] - isexe@2.0.0: - resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + lightningcss-freebsd-x64@1.32.0: + resolution: {integrity: sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [freebsd] - jiti@2.4.2: - resolution: {integrity: sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A==} - hasBin: true + lightningcss-linux-arm-gnueabihf@1.32.0: + resolution: {integrity: sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==} + engines: {node: '>= 12.0.0'} + cpu: [arm] + os: [linux] - js-tokens@9.0.1: - resolution: {integrity: sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==} + lightningcss-linux-arm64-gnu@1.32.0: + resolution: {integrity: sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [glibc] - js-yaml@4.1.0: - resolution: {integrity: sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA==} - hasBin: true + lightningcss-linux-arm64-musl@1.32.0: + resolution: {integrity: sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [linux] + libc: [musl] - json-buffer@3.0.1: - resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} + lightningcss-linux-x64-gnu@1.32.0: + resolution: {integrity: sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [glibc] - json-schema-traverse@0.4.1: - resolution: {integrity: sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==} + lightningcss-linux-x64-musl@1.32.0: + resolution: {integrity: sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [linux] + libc: [musl] - json-stable-stringify-without-jsonify@1.0.1: - resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + lightningcss-win32-arm64-msvc@1.32.0: + resolution: {integrity: sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==} + engines: {node: '>= 12.0.0'} + cpu: [arm64] + os: [win32] - jsuri@1.3.1: - resolution: {integrity: sha512-LLdAeqOf88/X0hylAI7oSir6QUsz/8kOW0FcJzzu/SJRfORA/oPHycAOthkNp7eLPlTAbqVDFbqNRHkRVzEA3g==} + lightningcss-win32-x64-msvc@1.32.0: + resolution: {integrity: sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==} + engines: {node: '>= 12.0.0'} + cpu: [x64] + os: [win32] - keyv@4.5.4: - resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + lightningcss@1.32.0: + resolution: {integrity: sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==} + engines: {node: '>= 12.0.0'} - levn@0.4.1: - resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} - engines: {node: '>= 0.8.0'} + linkify-it@5.0.1: + resolution: {integrity: sha512-wVoTjP4Q6R0NW5hiZkVJaFZPWgtXfoGF+6LucL3/FtiNjmcHhYjEr5f1Kqjirc1nBW07J/ZuRFumqr2oqccEWg==} - linkify-it@5.0.0: - resolution: {integrity: sha512-5aHCbzQRADcdP+ATqnDuhhJ/MRIqDkZX5pyjFHRRysS8vZ5AbqGEoFIb6pYHPZ+L/OC2Lc+xT8uHVVR5CAK/wQ==} + locate-path@5.0.0: + resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} + engines: {node: '>=8'} locate-path@6.0.0: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} - lodash.merge@4.6.2: - resolution: {integrity: sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ==} + lodash.startcase@4.4.0: + resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} - lodash@4.17.21: - resolution: {integrity: sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==} + lodash@4.18.1: + resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} - loupe@3.1.4: - resolution: {integrity: sha512-wJzkKwJrheKtknCOKNEtDK4iqg/MxmZheEMtSTYvnzRdEYaZzmgH976nenp8WdJRdx5Vc1X/9MO0Oszl6ezeXg==} + lru-cache@11.5.0: + resolution: {integrity: sha512-5YgH9UJd7wVb9hIouI2adWpgqrrICkt070Dnj8EUY1+B4B2P9eRLPAkAAo6NICA7CEhOIeBHl46u9zSNpNu7zA==} + engines: {node: 20 || >=22} lunr@2.3.9: resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} - magic-string@0.30.17: - resolution: {integrity: sha512-sNPKHvyjVf7gyjwS4xGTaW/mCnF8wnjtifKBEhxfZ7E/S8tQ0rssrwGNn6q8JH/ohItJfSQp9mBtQYuTlH5QnA==} + magic-string@0.30.21: + resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + + magicast@0.5.3: + resolution: {integrity: sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw==} + + make-dir@4.0.0: + resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} + engines: {node: '>=10'} + + markdown-it@14.2.0: + resolution: {integrity: sha512-1TGiQiJVRQ3NPmZH6sx5Cfnmg6GQm9jvC1ch4TK511NjSJvjzKLzn5pPfZRNZkRPZP0HqCioSndqH8v2nRaWVQ==} + hasBin: true + + marked-terminal@7.3.0: + resolution: {integrity: sha512-t4rBvPsHc57uE/2nJOLmMbZCQ4tgAccAED3ngXQqW6g+TxA488JzJ+FK3lQkzBQOI1mRV/r/Kq+1ZlJ4D0owQw==} + engines: {node: '>=16.0.0'} + peerDependencies: + marked: '>=1 <16' - markdown-it@14.1.0: - resolution: {integrity: sha512-a54IwgWPaeBCAAsv13YgmALOF1elABB08FxO9i+r4VFk5Vl4pKokRPeX8u5TCgSsPi6ec1otfLjdOpVcgbpshg==} + marked@9.1.6: + resolution: {integrity: sha512-jcByLnIFkd5gSXZmjNvS1TlmRhCXZjIzHYlaGkPlLIekG55JDR2Z4va9tZwCiP+/RDERiNhMOFu01xd6O5ct1Q==} + engines: {node: '>= 16'} hasBin: true math-intrinsics@1.1.0: @@ -1295,12 +1528,13 @@ packages: engines: {node: '>=4'} hasBin: true - minimatch@3.1.2: - resolution: {integrity: sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==} + minimatch@10.2.5: + resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} + engines: {node: 18 || 20 || >=22} - minimatch@9.0.5: - resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} - engines: {node: '>=16 || 14 >=14.17'} + mri@1.2.0: + resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} + engines: {node: '>=4'} ms@2.0.0: resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} @@ -1308,8 +1542,15 @@ packages: ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} - nanoid@3.3.11: - resolution: {integrity: sha512-N8SpfPUnUp1bK+PMYW8qSWdl9U+wwNWI4QKxOYDy9JAro3WMX7p2OeVRF9v+347pnakNevPmiHhNmZ2HbFA76w==} + mylas@2.1.14: + resolution: {integrity: sha512-BzQguy9W9NJgoVn2mRWzbFrFWWztGCcng2QI9+41frfk+Athwgx3qhqhvStz7ExeUUu7Kzw427sNzHpEZNINog==} + engines: {node: '>=16.0.0'} + + mz@2.7.0: + resolution: {integrity: sha512-z81GNO7nnYMEhrGh9LeymoE4+Yr0Wn5McHIZMK5cfQCl+NDX08sCZgUc9/6MHni9IWuFLm1Z3HTCXu2z9fN62Q==} + + nanoid@3.3.12: + resolution: {integrity: sha512-ZB9RH/39qpq5Vu6Y+NmUaFhQR6pp+M2Xt76XBnEwDaGcVAqhlvxrl3B2bKS5D3NH3QR76v3aSrKaF/Kiy7lEtQ==} engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true @@ -1320,13 +1561,29 @@ packages: resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} engines: {node: '>= 0.6'} + node-emoji@2.2.0: + resolution: {integrity: sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw==} + engines: {node: '>=18'} + + normalize-path@3.0.0: + resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} + engines: {node: '>=0.10.0'} + oauth@0.10.2: resolution: {integrity: sha512-JtFnB+8nxDEXgNyniwz573xxbKSOu3R8D40xQKqcjwJ2CDkYqUDI53o6IuzDJBx60Z8VKCm271+t8iFjakrl8Q==} + object-assign@4.1.1: + resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} + engines: {node: '>=0.10.0'} + object-inspect@1.13.4: resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} engines: {node: '>= 0.4'} + obug@2.1.3: + resolution: {integrity: sha512-9miFgM2OFba7hB+pRgvtV84pYTBaoTHohvmIgiRt6dRIzbwEOIaNaP+dIlGs2fNFoB0SeISs0Jz5WFVRid6Xyg==} + engines: {node: '>=12.20.0'} + on-finished@2.4.1: resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} engines: {node: '>= 0.8'} @@ -1335,18 +1592,49 @@ packages: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} + outdent@0.5.0: + resolution: {integrity: sha512-/jHxFIzoMXdqPzTaCpFzAAWhpkSjZPF4Vsn6jAfNpmbH/ymsmd7Qc6VE9BGn0L6YMj6uwpQLxCECpus4ukKS9Q==} + + p-filter@2.1.0: + resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} + engines: {node: '>=8'} + + p-limit@2.3.0: + resolution: {integrity: sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==} + engines: {node: '>=6'} + p-limit@3.1.0: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} + p-locate@4.1.0: + resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} + engines: {node: '>=8'} + p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} - parent-module@1.0.1: - resolution: {integrity: sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==} + p-map@2.1.0: + resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} + engines: {node: '>=6'} + + p-try@2.2.0: + resolution: {integrity: sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==} engines: {node: '>=6'} + package-manager-detector@0.2.11: + resolution: {integrity: sha512-BEnLolu+yuz22S56CU1SUKq3XC3PkwD5wv4ikR4MfGvnRVcmzXR9DwSlW2fEamyTPyXHomBJRzgapeuBvRNzJQ==} + + parse5-htmlparser2-tree-adapter@6.0.1: + resolution: {integrity: sha512-qPuWvbLgvDGilKc5BoicRovlT4MtYT6JfJyBOMDsKoiT+GiuP5qyrPCnR9HcPECIJJmZh5jRndyNThnhhb/vlA==} + + parse5@5.1.1: + resolution: {integrity: sha512-ugq4DFI0Ptb+WWjAdOK16+u/nHfiIrcE+sh8kZMaM0WllQKLI9rOUq6c2b7cwPkXdzfQESqvoqK6ug7U/Yyzug==} + + parse5@6.0.1: + resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} + parseurl@1.3.3: resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} engines: {node: '>= 0.8'} @@ -1359,50 +1647,56 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} - path-parse@1.0.7: - resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + path-to-regexp@0.1.13: + resolution: {integrity: sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==} - path-to-regexp@0.1.12: - resolution: {integrity: sha512-RA1GjUVMnvYFxuqovrEqZoxxW5NUZqbwKtYz/Tt7nXerk0LbLblQmrsgdeOxV5SFHf0UDggjS/bSeOZwt1pmEQ==} + path-type@4.0.0: + resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} + engines: {node: '>=8'} pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} - pathval@2.0.1: - resolution: {integrity: sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==} - engines: {node: '>= 14.16'} - picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} - picomatch@2.3.1: - resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} + picomatch@2.3.2: + resolution: {integrity: sha512-V7+vQEJ06Z+c5tSye8S+nHUfI51xoXIXjHQ99cQtKUkQqqO1kO/KCJUfZXuB47h/YBlDhah2H3hdUGXn8ie0oA==} engines: {node: '>=8.6'} - picomatch@4.0.2: - resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + picomatch@4.0.4: + resolution: {integrity: sha512-QP88BAKvMam/3NxH6vj2o21R6MjxZUAd6nlwAS/pnGvN9IVLocLHxGYIzFhg6fUQ+5th6P4dv4eW9jX3DSIj7A==} engines: {node: '>=12'} - picomatch@4.0.3: - resolution: {integrity: sha512-5gTmgEY/sqK6gFXLIsQNH19lWb4ebPDLA4SdLP7dsWkIXHWlG66oPuVvXSGFPppYZz8ZDZq0dYYrbHfBCVUb1Q==} + pify@4.0.1: + resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} + engines: {node: '>=6'} + + plimit-lit@1.6.1: + resolution: {integrity: sha512-B7+VDyb8Tl6oMJT9oSO2CW8XC/T4UcJGrwOVoNGwOQsQYhlpfajmrMj5xeejqaASq3V/EqThyOeATEOMuSEXiA==} engines: {node: '>=12'} - postcss@8.5.6: - resolution: {integrity: sha512-3Ybi1tAuwAP9s0r1UQ2J4n5Y0G05bJkpUIO0/bI9MhwmD70S5aTWbXGBwxHrelT+XM1k6dM0pk+SwNkpTRN7Pg==} + postcss@8.5.15: + resolution: {integrity: sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==} engines: {node: ^10 || ^12 || >=14} prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier-plugin-jsdoc@1.3.3: - resolution: {integrity: sha512-YIxejcbPYK4N58jHGiXjYvrCzBMyvV2AEMSoF5LvqqeMEI0nsmww57I6NGnpVc0AU9ncFCTEBoYHN/xuBf80YA==} + prettier-plugin-jsdoc@1.8.1: + resolution: {integrity: sha512-XuMqBWTc3b/8eCOe+OlZlFy9Z413a7WOmF4i5hDGtjbtIFOdvRrVtGjXR2Feye3TrLWhkkkHheNXPTyYKxw3nA==} engines: {node: '>=14.13.1 || >=16.0.0'} peerDependencies: prettier: ^3.0.0 - prettier@3.6.2: - resolution: {integrity: sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ==} + prettier@2.8.8: + resolution: {integrity: sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q==} + engines: {node: '>=10.13.0'} + hasBin: true + + prettier@3.8.4: + resolution: {integrity: sha512-N2MylSdi48+5N/6S5j+maeHbUSIzzZ5uOcX5Hm4QpV8Dkb1HFjfAKTKX6yNPJQD9AhcT3ifHNB66tWTTJDi11Q==} engines: {node: '>=14'} hasBin: true @@ -1410,8 +1704,9 @@ packages: resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} engines: {node: '>= 0.10'} - proxy-from-env@1.1.0: - resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==} + proxy-from-env@2.1.0: + resolution: {integrity: sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==} + engines: {node: '>=10'} punycode.js@2.3.1: resolution: {integrity: sha512-uxFIHU0YlHYhDQtV4R9J6a52SLx28BCjT+4ieh7IGbgwVJWO+km431c4yRlREUAsAmt/uMjQUyQHNEPf0M39CA==} @@ -1421,10 +1716,17 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - qs@6.13.0: - resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} + qs@6.15.3: + resolution: {integrity: sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==} engines: {node: '>=0.6'} + quansync@0.2.11: + resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==} + + queue-lit@1.5.2: + resolution: {integrity: sha512-tLc36IOPeMAubu8BkW8YDBV+WyIgKlYU7zUNs0J5Vk9skSZ4JfGlPOqplP0aHdfv7HL0B2Pg6nwiq60Qc6M2Hw==} + engines: {node: '>=12'} + queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} @@ -1432,38 +1734,36 @@ packages: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} - raw-body@2.5.2: - resolution: {integrity: sha512-8zGqypfENjCIqGhgXToC8aB2r7YrBX+AQAfIPs/Mlk+BtPTztOvTS01NRW/3Eh60J+a48lt8qsCzirQ6loCVfA==} + raw-body@2.5.3: + resolution: {integrity: sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==} engines: {node: '>= 0.8'} - resolve-from@4.0.0: - resolution: {integrity: sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==} - engines: {node: '>=4'} + read-yaml-file@1.1.0: + resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} + engines: {node: '>=6'} - resolve@1.22.10: - resolution: {integrity: sha512-NPRy+/ncIMeDlTAsuqwKIiferiawhefFJtkNSW0qZJEqMEb+qBt/77B/jGeeek+F0uOeN05CDa6HXbbIgtVX4w==} - engines: {node: '>= 0.4'} - hasBin: true + readdirp@3.6.0: + resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} + engines: {node: '>=8.10.0'} + + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + + resolve-from@5.0.0: + resolution: {integrity: sha512-qYg9KP24dD5qka9J47d0aVky0N+b4fTU89LN9iDnjB5waksiC49rvMB0PrUJQGoTmH50XPiqOvAjDfaijGxYZw==} + engines: {node: '>=8'} + + resolve-pkg-maps@1.0.0: + resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} reusify@1.1.0: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rollup-plugin-esnext-to-nodenext@1.0.1: - resolution: {integrity: sha512-ZIIIIh1znP3nmM6fGOmKk4Em2SMfM6uZWFq7DQsBqXzescw15jDygrKF2POQgSZ8c0tygXebp/KRbmEPqR2UAA==} - engines: {node: '>=20'} - peerDependencies: - rollup: ^4 - - rollup-plugin-node-externals@8.0.1: - resolution: {integrity: sha512-j6uve/BPEyHCmQuXpu5/LT5qXw69QLIi6YnFrs6F7tmGFXjkFDT0zqZMt0KaMuWSvkcxJFBklsKfYYoKKEPwyw==} - engines: {node: '>= 21 || ^20.6.0 || ^18.19.0'} - peerDependencies: - rollup: ^4.0.0 - - rollup@4.45.1: - resolution: {integrity: sha512-4iya7Jb76fVpQyLoiVpzUrsjQ12r3dM7fIVz+4NwoYvZOShknRmiv+iu9CClZml5ZLGb0XMcYLutK6w9tgxHDw==} - engines: {node: '>=18.0.0', npm: '>=8.0.0'} + rolldown@1.0.3: + resolution: {integrity: sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g==} + engines: {node: ^20.19.0 || >=22.12.0} hasBin: true run-parallel@1.2.0: @@ -1480,12 +1780,17 @@ packages: engines: {node: '>=10'} hasBin: true - send@0.19.0: - resolution: {integrity: sha512-dW41u5VfLXu8SJh5bwRmyYUbAoSB3c9uQh6L8h/KtsFREPWpbX1lrljJo186Jc4nmci/sGUZ9a0a0J2zgfq2hw==} + semver@7.8.1: + resolution: {integrity: sha512-rkVq3IXh+4FDGch+KwzX3aV9W3kO54GyEgpvBzSyctDA6Xtd7RJQV1xmXbeQp5v7+VzLOfVqiutSE6GICgPFvg==} + engines: {node: '>=10'} + hasBin: true + + send@0.19.2: + resolution: {integrity: sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==} engines: {node: '>= 0.8.0'} - serve-static@1.16.2: - resolution: {integrity: sha512-VqpjJZKadQB/PEbEwvFdO43Ax5dFBZ2UECszz8bQ7pi7wt//PWe1P6MN7eCnjsatYtBT6EuiClbjSWP2WrIoTw==} + serve-static@1.16.3: + resolution: {integrity: sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==} engines: {node: '>= 0.8.0'} setprototypeof@1.2.0: @@ -1499,8 +1804,8 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - side-channel-list@1.0.0: - resolution: {integrity: sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==} + side-channel-list@1.0.1: + resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} engines: {node: '>= 0.4'} side-channel-map@1.0.1: @@ -1511,62 +1816,93 @@ packages: resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} engines: {node: '>= 0.4'} - side-channel@1.1.0: - resolution: {integrity: sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==} + side-channel@1.1.1: + resolution: {integrity: sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==} engines: {node: '>= 0.4'} siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + + skin-tone@2.0.0: + resolution: {integrity: sha512-kUMbT1oBJCpgrnKoSr0o6wPtvRWT9W9UKvGLwfJYO2WuahZRHOpEyL1ckyMGgMWh0UdpmaoFqKKD29WTomNEGA==} + engines: {node: '>=8'} + + slash@3.0.0: + resolution: {integrity: sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==} + engines: {node: '>=8'} + source-map-js@1.2.1: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} + spawndamnit@3.0.1: + resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==} + + sprintf-js@1.0.3: + resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} + stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - statuses@2.0.1: - resolution: {integrity: sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==} + statuses@2.0.2: + resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} engines: {node: '>= 0.8'} - std-env@3.9.0: - resolution: {integrity: sha512-UGvjygr6F6tpH7o2qyqR6QYpwraIjKSdtzyBdyytFOHmPZY917kwdwLG0RbOjWOnKmnm3PeHjaoLLMie7kPLQw==} + std-env@4.1.0: + resolution: {integrity: sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==} - strip-json-comments@3.1.1: - resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} + string-width@4.2.3: + resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} - strip-literal@3.0.0: - resolution: {integrity: sha512-TcccoMhJOM3OebGhSBEmp3UZ2SfDMZUEBdRA/9ynfLi8yYajyWX3JiXArcJt4Umh4vISpspkQIY8ZZoCqjbviA==} + strip-ansi@6.0.1: + resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} + engines: {node: '>=8'} + + strip-bom@3.0.0: + resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} + engines: {node: '>=4'} supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} - supports-preserve-symlinks-flag@1.0.0: - resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} - engines: {node: '>= 0.4'} + supports-hyperlinks@3.2.0: + resolution: {integrity: sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==} + engines: {node: '>=14.18'} + + term-size@2.2.1: + resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} + engines: {node: '>=8'} + + thenify-all@1.6.0: + resolution: {integrity: sha512-RNxQH/qI8/t3thXJDwcstUO4zeqo64+Uy/+sNVRBx4Xn2OX+OZ9oP+iJnNFqplFra2ZUVeKCSa2oVWi3T4uVmA==} + engines: {node: '>=0.8'} + + thenify@3.3.1: + resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} - tinyexec@0.3.2: - resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + tinyexec@1.2.4: + resolution: {integrity: sha512-SHf/r48b7vOrjve9PxJo3MN5v5yuyjHvdUcrQffT3WXMUfnGmHDVbC4k3sHJaJTgZCwpUplIaAo5ANtMyp3YHg==} + engines: {node: '>=18'} - tinyglobby@0.2.14: - resolution: {integrity: sha512-tX5e7OM1HnYr2+a2C/4V0htOcSQcoSTH9KgJnVvNm5zm/cyEWKJ7j7YutsH9CxMdtOkkLFy2AHrMci9IM8IPZQ==} + tinyglobby@0.2.16: + resolution: {integrity: sha512-pn99VhoACYR8nFHhxqix+uvsbXineAasWm5ojXoN8xEwK5Kd3/TrhNn1wByuD52UxWRLy8pu+kRMniEi6Eq9Zg==} engines: {node: '>=12.0.0'} - tinypool@1.1.1: - resolution: {integrity: sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==} - engines: {node: ^18.0.0 || >=20.0.0} - - tinyrainbow@2.0.0: - resolution: {integrity: sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==} - engines: {node: '>=14.0.0'} + tinyglobby@0.2.17: + resolution: {integrity: sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==} + engines: {node: '>=12.0.0'} - tinyspy@4.0.3: - resolution: {integrity: sha512-t2T/WLB2WRgZ9EpE4jgPJ9w+i66UZfDc8wHh0xrwiRNN+UwH98GIJkTeZqX9rg0i0ptwzqW+uYeIF0T4F8LR7A==} + tinyrainbow@3.1.0: + resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==} engines: {node: '>=14.0.0'} to-regex-range@5.0.1: @@ -1577,16 +1913,17 @@ packages: resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} engines: {node: '>=0.6'} - ts-add-js-extension@1.6.6: - resolution: {integrity: sha512-rPOBNrOULi/CjVHraGrDa0vuWDmuMszmIXGNaGe2UGfrBH0/bZWTTsh82uQ+INKp9cJYziKNTCG2knzBlWvW4A==} - hasBin: true - - ts-api-utils@2.1.0: - resolution: {integrity: sha512-CUgTZL1irw8u29bzrOD/nH85jqyc74D6SshFgujOIA7osm2Rz7dYH77agkx7H4FBNxDq7Cjf+IjaX/8zwFW+ZQ==} + ts-api-utils@2.5.0: + resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} engines: {node: '>=18.12'} peerDependencies: typescript: '>=4.8.4' + tsc-alias@1.8.17: + resolution: {integrity: sha512-EIduCZHqbNwPm8BZYfq1aD7BQ697A4h6uSGMOFQfYGoQwfrYFTKwYfy9Bv42YxHkduVBcn9Zx0DkX111DKskyg==} + engines: {node: '>=16.20.2'} + hasBin: true + tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} @@ -1598,22 +1935,27 @@ packages: resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} engines: {node: '>= 0.6'} - typedoc@0.28.7: - resolution: {integrity: sha512-lpz0Oxl6aidFkmS90VQDQjk/Qf2iw0IUvFqirdONBdj7jPSN9mGXhy66BcGNDxx5ZMyKKiBVAREvPEzT6Uxipw==} + typedoc@0.28.19: + resolution: {integrity: sha512-wKh+lhdmMFivMlc6vRRcMGXeGEHGU2g8a2CkPTJjJlwRf1iXbimWIPcFolCqe4E0d/FRtGszpIrsp3WLpDB8Pw==} engines: {node: '>= 18', pnpm: '>= 10'} hasBin: true peerDependencies: - typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x + typescript: 5.0.x || 5.1.x || 5.2.x || 5.3.x || 5.4.x || 5.5.x || 5.6.x || 5.7.x || 5.8.x || 5.9.x || 6.0.x - typescript-eslint@8.37.0: - resolution: {integrity: sha512-TnbEjzkE9EmcO0Q2zM+GE8NQLItNAJpMmED1BdgoBMYNdqMhzlbqfdSwiRlAzEK2pA9UzVW0gzaaIzXWg2BjfA==} + typescript-eslint@8.61.1: + resolution: {integrity: sha512-V7PayAfJokV3pEHgN7/v03D1SpujhRfQtYLbLIiBfDDncdg4PAiRBfoS4cnCANK4jmAPncczi59QO3afiXUlNw==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - typescript: '>=4.8.4 <5.9.0' + eslint: ^8.57.0 || ^9.0.0 || ^10.0.0 + typescript: '>=4.8.4 <6.1.0' - typescript@5.8.3: - resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} + typescript@5.6.1-rc: + resolution: {integrity: sha512-E3b2+1zEFu84jB0YQi9BORDjz9+jGbwwy1Zi3G0LUNw7a7cePUrHMRNy8aPh53nXpkFGVHSxIZo5vKTfYaFiBQ==} + engines: {node: '>=14.17'} + hasBin: true + + typescript@6.0.3: + resolution: {integrity: sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==} engines: {node: '>=14.17'} hasBin: true @@ -1623,9 +1965,17 @@ packages: undici-types@6.21.0: resolution: {integrity: sha512-iwDZqg0QAGrg9Rav5H4n0M64c3mkR59cJ6wQp+7C4nI0gsmExaedaYLNO44eT4AtBBwjbTiGPMlt2Md0T9H9JQ==} + unicode-emoji-modifier-base@1.0.0: + resolution: {integrity: sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==} + engines: {node: '>=4'} + unist-util-stringify-position@4.0.0: resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + universalify@0.1.2: + resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} + engines: {node: '>= 4.0.0'} + unpipe@1.0.0: resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} engines: {node: '>= 0.8'} @@ -1637,24 +1987,29 @@ packages: resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} engines: {node: '>= 0.4.0'} + validate-npm-package-name@5.0.1: + resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + vary@1.1.2: resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} engines: {node: '>= 0.8'} - vite-node@3.2.4: - resolution: {integrity: sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} - hasBin: true + vite-plugin-externalize-deps@0.10.0: + resolution: {integrity: sha512-eQrtpT/Do7AvDn76l1yL6ZHyXJ+UWH2LaHVqhAes9go54qaAnPZuMbgxcroQ/7WY3ZyetZzYW2quQnDF0DV5qg==} + peerDependencies: + vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 - vite@7.0.4: - resolution: {integrity: sha512-SkaSguuS7nnmV7mfJ8l81JGBFV7Gvzp8IzgE8A8t23+AxuNX61Q5H1Tpz5efduSN7NHC8nQXD3sKQKZAu5mNEA==} + vite@8.0.16: + resolution: {integrity: sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true peerDependencies: '@types/node': ^20.19.0 || >=22.12.0 + '@vitejs/devtools': ^0.1.18 + esbuild: ^0.27.0 || ^0.28.0 jiti: '>=1.21.0' less: ^4.0.0 - lightningcss: ^1.21.0 sass: ^1.70.0 sass-embedded: ^1.70.0 stylus: '>=0.54.8' @@ -1665,12 +2020,14 @@ packages: peerDependenciesMeta: '@types/node': optional: true + '@vitejs/devtools': + optional: true + esbuild: + optional: true jiti: optional: true less: optional: true - lightningcss: - optional: true sass: optional: true sass-embedded: @@ -1686,26 +2043,39 @@ packages: yaml: optional: true - vitest@3.2.4: - resolution: {integrity: sha512-LUCP5ev3GURDysTWiP47wRRUpLKMOfPh+yKTx3kVIEiu5KOMeqzpnYNsKyOoVrULivR8tLcks4+lga33Whn90A==} - engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} + vitest@4.1.9: + resolution: {integrity: sha512-nE3/LEyc0z87uHYLZebqCUOaJr2hdtuPp7BQ4BosVFnfltxgAvMG08NyrSGlPpOUWvR27c5flSmYFTNr78L9GQ==} + engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' - '@types/debug': ^4.1.12 - '@types/node': ^18.0.0 || ^20.0.0 || >=22.0.0 - '@vitest/browser': 3.2.4 - '@vitest/ui': 3.2.4 + '@opentelemetry/api': ^1.9.0 + '@types/node': ^20.0.0 || ^22.0.0 || >=24.0.0 + '@vitest/browser-playwright': 4.1.9 + '@vitest/browser-preview': 4.1.9 + '@vitest/browser-webdriverio': 4.1.9 + '@vitest/coverage-istanbul': 4.1.9 + '@vitest/coverage-v8': 4.1.9 + '@vitest/ui': 4.1.9 happy-dom: '*' jsdom: '*' + vite: ^6.0.0 || ^7.0.0 || ^8.0.0 peerDependenciesMeta: '@edge-runtime/vm': optional: true - '@types/debug': + '@opentelemetry/api': optional: true '@types/node': optional: true - '@vitest/browser': + '@vitest/browser-playwright': + optional: true + '@vitest/browser-preview': + optional: true + '@vitest/browser-webdriverio': + optional: true + '@vitest/coverage-istanbul': + optional: true + '@vitest/coverage-v8': optional: true '@vitest/ui': optional: true @@ -1728,11 +2098,27 @@ packages: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} - yaml@2.8.0: - resolution: {integrity: sha512-4lLa/EcQCB0cJkyts+FpIRx5G/llPxfP6VQU5KByHEhLxY3IJCH0f0Hy1MHI8sClTvsIb8qwRJ6R/ZdlDJ/leQ==} + wrap-ansi@7.0.0: + resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} + engines: {node: '>=10'} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + + yaml@2.9.0: + resolution: {integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==} engines: {node: '>= 14.6'} hasBin: true + yargs-parser@20.2.9: + resolution: {integrity: sha512-y11nGElTIV+CT3Zv9t7VKl+Q3hTQoT9a1Qzezhhl6Rp21gJ/IVTW7Z3y9EWXhuUBC2Shnf+DX0antecpAwSP8w==} + engines: {node: '>=10'} + + yargs@16.2.0: + resolution: {integrity: sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==} + engines: {node: '>=10'} + yocto-queue@0.1.0: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} @@ -1740,310 +2126,432 @@ packages: zod@3.25.76: resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} + zod@4.4.3: + resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} + snapshots: + '@andrewbranch/untar.js@1.0.3': {} + + '@arethetypeswrong/cli@0.18.3': + dependencies: + '@arethetypeswrong/core': 0.18.3 + chalk: 4.1.2 + cli-table3: 0.6.5 + commander: 10.0.1 + marked: 9.1.6 + marked-terminal: 7.3.0(marked@9.1.6) + semver: 7.8.1 + + '@arethetypeswrong/core@0.18.3': + dependencies: + '@andrewbranch/untar.js': 1.0.3 + '@loaderkit/resolve': 1.0.6 + cjs-module-lexer: 1.4.3 + fflate: 0.8.3 + lru-cache: 11.5.0 + semver: 7.8.1 + typescript: 5.6.1-rc + validate-npm-package-name: 5.0.1 + '@atlassian/atlassian-jwt@2.2.0': dependencies: - express: 4.21.2 + express: 4.22.2 jsuri: 1.3.1 - lodash: 4.17.21 + lodash: 4.18.1 transitivePeerDependencies: - supports-color - '@esbuild/aix-ppc64@0.25.6': - optional: true + '@babel/helper-string-parser@7.27.1': {} - '@esbuild/android-arm64@0.25.6': - optional: true + '@babel/helper-validator-identifier@7.28.5': {} - '@esbuild/android-arm@0.25.6': - optional: true + '@babel/parser@7.29.3': + dependencies: + '@babel/types': 7.29.0 - '@esbuild/android-x64@0.25.6': - optional: true + '@babel/runtime@7.29.2': {} - '@esbuild/darwin-arm64@0.25.6': - optional: true + '@babel/types@7.29.0': + dependencies: + '@babel/helper-string-parser': 7.27.1 + '@babel/helper-validator-identifier': 7.28.5 - '@esbuild/darwin-x64@0.25.6': - optional: true + '@bcoe/v8-coverage@1.0.2': {} - '@esbuild/freebsd-arm64@0.25.6': - optional: true + '@braidai/lang@1.1.2': {} - '@esbuild/freebsd-x64@0.25.6': - optional: true + '@changesets/apply-release-plan@7.1.1': + dependencies: + '@changesets/config': 3.1.4 + '@changesets/get-version-range-type': 0.4.0 + '@changesets/git': 3.0.4 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + detect-indent: 6.1.0 + fs-extra: 7.0.1 + lodash.startcase: 4.4.0 + outdent: 0.5.0 + prettier: 2.8.8 + resolve-from: 5.0.0 + semver: 7.7.2 - '@esbuild/linux-arm64@0.25.6': - optional: true + '@changesets/assemble-release-plan@6.0.10': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.4 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + semver: 7.7.2 - '@esbuild/linux-arm@0.25.6': - optional: true + '@changesets/changelog-git@0.2.1': + dependencies: + '@changesets/types': 6.1.0 + + '@changesets/cli@2.31.0(@types/node@22.20.0)': + dependencies: + '@changesets/apply-release-plan': 7.1.1 + '@changesets/assemble-release-plan': 6.0.10 + '@changesets/changelog-git': 0.2.1 + '@changesets/config': 3.1.4 + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.4 + '@changesets/get-release-plan': 4.0.16 + '@changesets/git': 3.0.4 + '@changesets/logger': 0.1.1 + '@changesets/pre': 2.0.2 + '@changesets/read': 0.6.7 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@changesets/write': 0.4.0 + '@inquirer/external-editor': 1.0.3(@types/node@22.20.0) + '@manypkg/get-packages': 1.1.3 + ansi-colors: 4.1.3 + enquirer: 2.4.1 + fs-extra: 7.0.1 + mri: 1.2.0 + package-manager-detector: 0.2.11 + picocolors: 1.1.1 + resolve-from: 5.0.0 + semver: 7.7.2 + spawndamnit: 3.0.1 + term-size: 2.2.1 + transitivePeerDependencies: + - '@types/node' - '@esbuild/linux-ia32@0.25.6': - optional: true + '@changesets/config@3.1.4': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.4 + '@changesets/logger': 0.1.1 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + micromatch: 4.0.8 - '@esbuild/linux-loong64@0.25.6': - optional: true + '@changesets/errors@0.2.0': + dependencies: + extendable-error: 0.1.7 - '@esbuild/linux-mips64el@0.25.6': - optional: true + '@changesets/get-dependents-graph@2.1.4': + dependencies: + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + picocolors: 1.1.1 + semver: 7.7.2 - '@esbuild/linux-ppc64@0.25.6': - optional: true + '@changesets/get-release-plan@4.0.16': + dependencies: + '@changesets/assemble-release-plan': 6.0.10 + '@changesets/config': 3.1.4 + '@changesets/pre': 2.0.2 + '@changesets/read': 0.6.7 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 - '@esbuild/linux-riscv64@0.25.6': - optional: true + '@changesets/get-version-range-type@0.4.0': {} - '@esbuild/linux-s390x@0.25.6': - optional: true + '@changesets/git@3.0.4': + dependencies: + '@changesets/errors': 0.2.0 + '@manypkg/get-packages': 1.1.3 + is-subdir: 1.2.0 + micromatch: 4.0.8 + spawndamnit: 3.0.1 - '@esbuild/linux-x64@0.25.6': - optional: true + '@changesets/logger@0.1.1': + dependencies: + picocolors: 1.1.1 - '@esbuild/netbsd-arm64@0.25.6': - optional: true + '@changesets/parse@0.4.3': + dependencies: + '@changesets/types': 6.1.0 + js-yaml: 4.1.1 - '@esbuild/netbsd-x64@0.25.6': - optional: true + '@changesets/pre@2.0.2': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 - '@esbuild/openbsd-arm64@0.25.6': - optional: true + '@changesets/read@0.6.7': + dependencies: + '@changesets/git': 3.0.4 + '@changesets/logger': 0.1.1 + '@changesets/parse': 0.4.3 + '@changesets/types': 6.1.0 + fs-extra: 7.0.1 + p-filter: 2.1.0 + picocolors: 1.1.1 - '@esbuild/openbsd-x64@0.25.6': - optional: true + '@changesets/should-skip-package@0.1.2': + dependencies: + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 - '@esbuild/openharmony-arm64@0.25.6': - optional: true + '@changesets/types@4.1.0': {} + + '@changesets/types@6.1.0': {} + + '@changesets/write@0.4.0': + dependencies: + '@changesets/types': 6.1.0 + fs-extra: 7.0.1 + human-id: 4.1.3 + prettier: 2.8.8 - '@esbuild/sunos-x64@0.25.6': + '@colors/colors@1.5.0': optional: true - '@esbuild/win32-arm64@0.25.6': + '@emnapi/core@1.10.0': + dependencies: + '@emnapi/wasi-threads': 1.2.1 + tslib: 2.8.1 optional: true - '@esbuild/win32-ia32@0.25.6': + '@emnapi/runtime@1.10.0': + dependencies: + tslib: 2.8.1 optional: true - '@esbuild/win32-x64@0.25.6': + '@emnapi/wasi-threads@1.2.1': + dependencies: + tslib: 2.8.1 optional: true - '@eslint-community/eslint-utils@4.7.0(eslint@9.31.0(jiti@2.4.2))': + '@eslint-community/eslint-utils@4.9.1(eslint@10.5.0(jiti@2.7.0))': dependencies: - eslint: 9.31.0(jiti@2.4.2) + eslint: 10.5.0(jiti@2.7.0) eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.12.1': {} + '@eslint-community/regexpp@4.12.2': {} - '@eslint/config-array@0.21.0': + '@eslint/config-array@0.23.5': dependencies: - '@eslint/object-schema': 2.1.6 - debug: 4.4.1 - minimatch: 3.1.2 + '@eslint/object-schema': 3.0.5 + debug: 4.4.3 + minimatch: 10.2.5 transitivePeerDependencies: - supports-color - '@eslint/config-helpers@0.3.0': {} - - '@eslint/core@0.15.1': + '@eslint/config-helpers@0.6.0': dependencies: - '@types/json-schema': 7.0.15 + '@eslint/core': 1.2.1 - '@eslint/eslintrc@3.3.1': + '@eslint/core@1.2.1': dependencies: - ajv: 6.12.6 - debug: 4.4.1 - espree: 10.4.0 - globals: 14.0.0 - ignore: 5.3.2 - import-fresh: 3.3.1 - js-yaml: 4.1.0 - minimatch: 3.1.2 - strip-json-comments: 3.1.1 - transitivePeerDependencies: - - supports-color + '@types/json-schema': 7.0.15 - '@eslint/js@9.31.0': {} + '@eslint/js@10.0.1(eslint@10.5.0(jiti@2.7.0))': + optionalDependencies: + eslint: 10.5.0(jiti@2.7.0) - '@eslint/object-schema@2.1.6': {} + '@eslint/object-schema@3.0.5': {} - '@eslint/plugin-kit@0.3.3': + '@eslint/plugin-kit@0.7.2': dependencies: - '@eslint/core': 0.15.1 + '@eslint/core': 1.2.1 levn: 0.4.1 - '@gerrit0/mini-shiki@3.7.0': + '@gerrit0/mini-shiki@3.23.0': dependencies: - '@shikijs/engine-oniguruma': 3.8.0 - '@shikijs/langs': 3.8.0 - '@shikijs/themes': 3.8.0 - '@shikijs/types': 3.8.0 + '@shikijs/engine-oniguruma': 3.23.0 + '@shikijs/langs': 3.23.0 + '@shikijs/themes': 3.23.0 + '@shikijs/types': 3.23.0 '@shikijs/vscode-textmate': 10.0.2 - '@humanfs/core@0.19.1': {} + '@humanfs/core@0.19.2': + dependencies: + '@humanfs/types': 0.15.0 - '@humanfs/node@0.16.6': + '@humanfs/node@0.16.8': dependencies: - '@humanfs/core': 0.19.1 - '@humanwhocodes/retry': 0.3.1 + '@humanfs/core': 0.19.2 + '@humanfs/types': 0.15.0 + '@humanwhocodes/retry': 0.4.3 - '@humanwhocodes/module-importer@1.0.1': {} + '@humanfs/types@0.15.0': {} - '@humanwhocodes/retry@0.3.1': {} + '@humanwhocodes/module-importer@1.0.1': {} '@humanwhocodes/retry@0.4.3': {} - '@jridgewell/sourcemap-codec@1.5.4': {} - - '@nodelib/fs.scandir@2.1.5': + '@inquirer/external-editor@1.0.3(@types/node@22.20.0)': dependencies: - '@nodelib/fs.stat': 2.0.5 - run-parallel: 1.2.0 - - '@nodelib/fs.stat@2.0.5': {} + chardet: 2.1.1 + iconv-lite: 0.7.2 + optionalDependencies: + '@types/node': 22.20.0 - '@nodelib/fs.walk@1.2.8': - dependencies: - '@nodelib/fs.scandir': 2.1.5 - fastq: 1.19.1 + '@jridgewell/resolve-uri@3.1.2': {} - '@rollup/plugin-alias@5.1.1(rollup@4.45.1)': - optionalDependencies: - rollup: 4.45.1 + '@jridgewell/sourcemap-codec@1.5.5': {} - '@rollup/plugin-commonjs@28.0.6(rollup@4.45.1)': + '@jridgewell/trace-mapping@0.3.31': dependencies: - '@rollup/pluginutils': 5.2.0(rollup@4.45.1) - commondir: 1.0.1 - estree-walker: 2.0.2 - fdir: 6.4.6(picomatch@4.0.2) - is-reference: 1.2.1 - magic-string: 0.30.17 - picomatch: 4.0.2 - optionalDependencies: - rollup: 4.45.1 + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.5 - '@rollup/plugin-node-resolve@16.0.1(rollup@4.45.1)': + '@loaderkit/resolve@1.0.6': dependencies: - '@rollup/pluginutils': 5.2.0(rollup@4.45.1) - '@types/resolve': 1.20.2 - deepmerge: 4.3.1 - is-module: 1.0.0 - resolve: 1.22.10 - optionalDependencies: - rollup: 4.45.1 + '@braidai/lang': 1.1.2 - '@rollup/plugin-typescript@12.1.4(rollup@4.45.1)(tslib@2.8.1)(typescript@5.8.3)': + '@manypkg/find-root@1.1.0': dependencies: - '@rollup/pluginutils': 5.2.0(rollup@4.45.1) - resolve: 1.22.10 - typescript: 5.8.3 - optionalDependencies: - rollup: 4.45.1 - tslib: 2.8.1 + '@babel/runtime': 7.29.2 + '@types/node': 12.20.55 + find-up: 4.1.0 + fs-extra: 8.1.0 - '@rollup/pluginutils@5.2.0(rollup@4.45.1)': + '@manypkg/get-packages@1.1.3': dependencies: - '@types/estree': 1.0.8 - estree-walker: 2.0.2 - picomatch: 4.0.2 - optionalDependencies: - rollup: 4.45.1 + '@babel/runtime': 7.29.2 + '@changesets/types': 4.1.0 + '@manypkg/find-root': 1.1.0 + fs-extra: 8.1.0 + globby: 11.1.0 + read-yaml-file: 1.1.0 - '@rollup/rollup-android-arm-eabi@4.45.1': + '@napi-rs/wasm-runtime@1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0)': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@tybys/wasm-util': 0.10.2 optional: true - '@rollup/rollup-android-arm64@4.45.1': - optional: true + '@nodelib/fs.scandir@2.1.5': + dependencies: + '@nodelib/fs.stat': 2.0.5 + run-parallel: 1.2.0 + + '@nodelib/fs.stat@2.0.5': {} - '@rollup/rollup-darwin-arm64@4.45.1': - optional: true + '@nodelib/fs.walk@1.2.8': + dependencies: + '@nodelib/fs.scandir': 2.1.5 + fastq: 1.20.1 - '@rollup/rollup-darwin-x64@4.45.1': - optional: true + '@oxc-project/types@0.133.0': {} - '@rollup/rollup-freebsd-arm64@4.45.1': + '@rolldown/binding-android-arm64@1.0.3': optional: true - '@rollup/rollup-freebsd-x64@4.45.1': + '@rolldown/binding-darwin-arm64@1.0.3': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.45.1': + '@rolldown/binding-darwin-x64@1.0.3': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.45.1': + '@rolldown/binding-freebsd-x64@1.0.3': optional: true - '@rollup/rollup-linux-arm64-gnu@4.45.1': + '@rolldown/binding-linux-arm-gnueabihf@1.0.3': optional: true - '@rollup/rollup-linux-arm64-musl@4.45.1': + '@rolldown/binding-linux-arm64-gnu@1.0.3': optional: true - '@rollup/rollup-linux-loongarch64-gnu@4.45.1': + '@rolldown/binding-linux-arm64-musl@1.0.3': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.45.1': + '@rolldown/binding-linux-ppc64-gnu@1.0.3': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.45.1': + '@rolldown/binding-linux-s390x-gnu@1.0.3': optional: true - '@rollup/rollup-linux-riscv64-musl@4.45.1': + '@rolldown/binding-linux-x64-gnu@1.0.3': optional: true - '@rollup/rollup-linux-s390x-gnu@4.45.1': + '@rolldown/binding-linux-x64-musl@1.0.3': optional: true - '@rollup/rollup-linux-x64-gnu@4.45.1': + '@rolldown/binding-openharmony-arm64@1.0.3': optional: true - '@rollup/rollup-linux-x64-musl@4.45.1': + '@rolldown/binding-wasm32-wasi@1.0.3': + dependencies: + '@emnapi/core': 1.10.0 + '@emnapi/runtime': 1.10.0 + '@napi-rs/wasm-runtime': 1.1.4(@emnapi/core@1.10.0)(@emnapi/runtime@1.10.0) optional: true - '@rollup/rollup-win32-arm64-msvc@4.45.1': + '@rolldown/binding-win32-arm64-msvc@1.0.3': optional: true - '@rollup/rollup-win32-ia32-msvc@4.45.1': + '@rolldown/binding-win32-x64-msvc@1.0.3': optional: true - '@rollup/rollup-win32-x64-msvc@4.45.1': - optional: true + '@rolldown/pluginutils@1.0.1': {} - '@shikijs/engine-oniguruma@3.8.0': + '@shikijs/engine-oniguruma@3.23.0': dependencies: - '@shikijs/types': 3.8.0 + '@shikijs/types': 3.23.0 '@shikijs/vscode-textmate': 10.0.2 - '@shikijs/langs@3.8.0': + '@shikijs/langs@3.23.0': dependencies: - '@shikijs/types': 3.8.0 + '@shikijs/types': 3.23.0 - '@shikijs/themes@3.8.0': + '@shikijs/themes@3.23.0': dependencies: - '@shikijs/types': 3.8.0 + '@shikijs/types': 3.23.0 - '@shikijs/types@3.8.0': + '@shikijs/types@3.23.0': dependencies: '@shikijs/vscode-textmate': 10.0.2 '@types/hast': 3.0.4 '@shikijs/vscode-textmate@10.0.2': {} - '@stylistic/eslint-plugin@5.2.0(eslint@9.31.0(jiti@2.4.2))': + '@sindresorhus/is@4.6.0': {} + + '@standard-schema/spec@1.1.0': {} + + '@stylistic/eslint-plugin@5.10.0(eslint@10.5.0(jiti@2.7.0))': dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.31.0(jiti@2.4.2)) - '@typescript-eslint/types': 8.37.0 - eslint: 9.31.0(jiti@2.4.2) + '@eslint-community/eslint-utils': 4.9.1(eslint@10.5.0(jiti@2.7.0)) + '@typescript-eslint/types': 8.59.4 + eslint: 10.5.0(jiti@2.7.0) eslint-visitor-keys: 4.2.1 espree: 10.4.0 estraverse: 5.3.0 - picomatch: 4.0.3 + picomatch: 4.0.4 + + '@tybys/wasm-util@0.10.2': + dependencies: + tslib: 2.8.1 + optional: true '@types/body-parser@1.19.6': dependencies: '@types/connect': 3.4.38 - '@types/node': 20.19.8 + '@types/node': 22.20.0 '@types/chai@5.2.2': dependencies: @@ -2051,7 +2559,7 @@ snapshots: '@types/connect@3.4.38': dependencies: - '@types/node': 20.19.8 + '@types/node': 22.20.0 '@types/debug@4.1.12': dependencies: @@ -2059,21 +2567,23 @@ snapshots: '@types/deep-eql@4.0.2': {} + '@types/esrecurse@4.3.1': {} + '@types/estree@1.0.8': {} - '@types/express-serve-static-core@4.19.6': + '@types/express-serve-static-core@4.19.8': dependencies: - '@types/node': 20.19.8 - '@types/qs': 6.14.0 + '@types/node': 22.20.0 + '@types/qs': 6.15.1 '@types/range-parser': 1.2.7 - '@types/send': 0.17.5 + '@types/send': 1.2.1 - '@types/express@4.17.23': + '@types/express@4.17.25': dependencies: '@types/body-parser': 1.19.6 - '@types/express-serve-static-core': 4.19.6 - '@types/qs': 6.14.0 - '@types/serve-static': 1.15.8 + '@types/express-serve-static-core': 4.19.8 + '@types/qs': 6.15.1 + '@types/serve-static': 1.15.10 '@types/hast@3.0.4': dependencies: @@ -2091,235 +2601,288 @@ snapshots: '@types/ms@2.1.0': {} - '@types/node@20.19.8': + '@types/node@12.20.55': {} + + '@types/node@22.20.0': dependencies: undici-types: 6.21.0 '@types/oauth@0.9.6': dependencies: - '@types/node': 20.19.8 + '@types/node': 22.20.0 - '@types/qs@6.14.0': {} + '@types/qs@6.15.1': {} '@types/range-parser@1.2.7': {} - '@types/resolve@1.20.2': {} - - '@types/send@0.17.5': + '@types/send@0.17.6': dependencies: '@types/mime': 1.3.5 - '@types/node': 20.19.8 + '@types/node': 22.20.0 - '@types/serve-static@1.15.8': + '@types/send@1.2.1': + dependencies: + '@types/node': 22.20.0 + + '@types/serve-static@1.15.10': dependencies: '@types/http-errors': 2.0.5 - '@types/node': 20.19.8 - '@types/send': 0.17.5 + '@types/node': 22.20.0 + '@types/send': 0.17.6 '@types/unist@3.0.3': {} - '@typescript-eslint/eslint-plugin@8.37.0(@typescript-eslint/parser@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/eslint-plugin@8.61.1(@typescript-eslint/parser@8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3)': dependencies: - '@eslint-community/regexpp': 4.12.1 - '@typescript-eslint/parser': 8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/scope-manager': 8.37.0 - '@typescript-eslint/type-utils': 8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/utils': 8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.37.0 - eslint: 9.31.0(jiti@2.4.2) - graphemer: 1.4.0 + '@eslint-community/regexpp': 4.12.2 + '@typescript-eslint/parser': 8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/scope-manager': 8.61.1 + '@typescript-eslint/type-utils': 8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/utils': 8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/visitor-keys': 8.61.1 + eslint: 10.5.0(jiti@2.7.0) ignore: 7.0.5 natural-compare: 1.4.0 - ts-api-utils: 2.1.0(typescript@5.8.3) - typescript: 5.8.3 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/parser@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/parser@8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3)': dependencies: - '@typescript-eslint/scope-manager': 8.37.0 - '@typescript-eslint/types': 8.37.0 - '@typescript-eslint/typescript-estree': 8.37.0(typescript@5.8.3) - '@typescript-eslint/visitor-keys': 8.37.0 - debug: 4.4.1 - eslint: 9.31.0(jiti@2.4.2) - typescript: 5.8.3 + '@typescript-eslint/scope-manager': 8.61.1 + '@typescript-eslint/types': 8.61.1 + '@typescript-eslint/typescript-estree': 8.61.1(typescript@6.0.3) + '@typescript-eslint/visitor-keys': 8.61.1 + debug: 4.4.3 + eslint: 10.5.0(jiti@2.7.0) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/project-service@8.37.0(typescript@5.8.3)': + '@typescript-eslint/project-service@8.61.1(typescript@6.0.3)': dependencies: - '@typescript-eslint/tsconfig-utils': 8.37.0(typescript@5.8.3) - '@typescript-eslint/types': 8.37.0 - debug: 4.4.1 - typescript: 5.8.3 + '@typescript-eslint/tsconfig-utils': 8.61.1(typescript@6.0.3) + '@typescript-eslint/types': 8.61.1 + debug: 4.4.3 + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/scope-manager@8.37.0': + '@typescript-eslint/scope-manager@8.61.1': dependencies: - '@typescript-eslint/types': 8.37.0 - '@typescript-eslint/visitor-keys': 8.37.0 + '@typescript-eslint/types': 8.61.1 + '@typescript-eslint/visitor-keys': 8.61.1 - '@typescript-eslint/tsconfig-utils@8.37.0(typescript@5.8.3)': + '@typescript-eslint/tsconfig-utils@8.61.1(typescript@6.0.3)': dependencies: - typescript: 5.8.3 + typescript: 6.0.3 - '@typescript-eslint/type-utils@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/type-utils@8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3)': dependencies: - '@typescript-eslint/types': 8.37.0 - '@typescript-eslint/typescript-estree': 8.37.0(typescript@5.8.3) - '@typescript-eslint/utils': 8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3) - debug: 4.4.1 - eslint: 9.31.0(jiti@2.4.2) - ts-api-utils: 2.1.0(typescript@5.8.3) - typescript: 5.8.3 + '@typescript-eslint/types': 8.61.1 + '@typescript-eslint/typescript-estree': 8.61.1(typescript@6.0.3) + '@typescript-eslint/utils': 8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) + debug: 4.4.3 + eslint: 10.5.0(jiti@2.7.0) + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/types@8.37.0': {} + '@typescript-eslint/types@8.59.4': {} - '@typescript-eslint/typescript-estree@8.37.0(typescript@5.8.3)': + '@typescript-eslint/types@8.61.1': {} + + '@typescript-eslint/typescript-estree@8.61.1(typescript@6.0.3)': dependencies: - '@typescript-eslint/project-service': 8.37.0(typescript@5.8.3) - '@typescript-eslint/tsconfig-utils': 8.37.0(typescript@5.8.3) - '@typescript-eslint/types': 8.37.0 - '@typescript-eslint/visitor-keys': 8.37.0 - debug: 4.4.1 - fast-glob: 3.3.3 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.7.2 - ts-api-utils: 2.1.0(typescript@5.8.3) - typescript: 5.8.3 + '@typescript-eslint/project-service': 8.61.1(typescript@6.0.3) + '@typescript-eslint/tsconfig-utils': 8.61.1(typescript@6.0.3) + '@typescript-eslint/types': 8.61.1 + '@typescript-eslint/visitor-keys': 8.61.1 + debug: 4.4.3 + minimatch: 10.2.5 + semver: 7.8.1 + tinyglobby: 0.2.16 + ts-api-utils: 2.5.0(typescript@6.0.3) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/utils@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3)': + '@typescript-eslint/utils@8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3)': dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.31.0(jiti@2.4.2)) - '@typescript-eslint/scope-manager': 8.37.0 - '@typescript-eslint/types': 8.37.0 - '@typescript-eslint/typescript-estree': 8.37.0(typescript@5.8.3) - eslint: 9.31.0(jiti@2.4.2) - typescript: 5.8.3 + '@eslint-community/eslint-utils': 4.9.1(eslint@10.5.0(jiti@2.7.0)) + '@typescript-eslint/scope-manager': 8.61.1 + '@typescript-eslint/types': 8.61.1 + '@typescript-eslint/typescript-estree': 8.61.1(typescript@6.0.3) + eslint: 10.5.0(jiti@2.7.0) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - '@typescript-eslint/visitor-keys@8.37.0': + '@typescript-eslint/visitor-keys@8.61.1': dependencies: - '@typescript-eslint/types': 8.37.0 - eslint-visitor-keys: 4.2.1 + '@typescript-eslint/types': 8.61.1 + eslint-visitor-keys: 5.0.1 + + '@vitest/coverage-v8@4.1.9(vitest@4.1.9)': + dependencies: + '@bcoe/v8-coverage': 1.0.2 + '@vitest/utils': 4.1.9 + ast-v8-to-istanbul: 1.0.4 + istanbul-lib-coverage: 3.2.2 + istanbul-lib-report: 3.0.1 + istanbul-reports: 3.2.0 + magicast: 0.5.3 + obug: 2.1.3 + std-env: 4.1.0 + tinyrainbow: 3.1.0 + vitest: 4.1.9(@types/node@22.20.0)(@vitest/coverage-v8@4.1.9)(vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0)) - '@vitest/expect@3.2.4': + '@vitest/expect@4.1.9': dependencies: + '@standard-schema/spec': 1.1.0 '@types/chai': 5.2.2 - '@vitest/spy': 3.2.4 - '@vitest/utils': 3.2.4 - chai: 5.2.1 - tinyrainbow: 2.0.0 + '@vitest/spy': 4.1.9 + '@vitest/utils': 4.1.9 + chai: 6.2.2 + tinyrainbow: 3.1.0 - '@vitest/mocker@3.2.4(vite@7.0.4(@types/node@20.19.8)(jiti@2.4.2)(yaml@2.8.0))': + '@vitest/mocker@4.1.9(vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0))': dependencies: - '@vitest/spy': 3.2.4 + '@vitest/spy': 4.1.9 estree-walker: 3.0.3 - magic-string: 0.30.17 + magic-string: 0.30.21 optionalDependencies: - vite: 7.0.4(@types/node@20.19.8)(jiti@2.4.2)(yaml@2.8.0) + vite: 8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0) - '@vitest/pretty-format@3.2.4': + '@vitest/pretty-format@4.1.9': dependencies: - tinyrainbow: 2.0.0 + tinyrainbow: 3.1.0 - '@vitest/runner@3.2.4': + '@vitest/runner@4.1.9': dependencies: - '@vitest/utils': 3.2.4 + '@vitest/utils': 4.1.9 pathe: 2.0.3 - strip-literal: 3.0.0 - '@vitest/snapshot@3.2.4': + '@vitest/snapshot@4.1.9': dependencies: - '@vitest/pretty-format': 3.2.4 - magic-string: 0.30.17 + '@vitest/pretty-format': 4.1.9 + '@vitest/utils': 4.1.9 + magic-string: 0.30.21 pathe: 2.0.3 - '@vitest/spy@3.2.4': - dependencies: - tinyspy: 4.0.3 + '@vitest/spy@4.1.9': {} - '@vitest/utils@3.2.4': + '@vitest/utils@4.1.9': dependencies: - '@vitest/pretty-format': 3.2.4 - loupe: 3.1.4 - tinyrainbow: 2.0.0 + '@vitest/pretty-format': 4.1.9 + convert-source-map: 2.0.0 + tinyrainbow: 3.1.0 accepts@1.3.8: dependencies: mime-types: 2.1.35 negotiator: 0.6.3 - acorn-jsx@5.3.2(acorn@8.15.0): + acorn-jsx@5.3.2(acorn@8.16.0): dependencies: - acorn: 8.15.0 + acorn: 8.16.0 - acorn@8.15.0: {} + acorn@8.16.0: {} + + agent-base@6.0.2: + dependencies: + debug: 4.4.3 + transitivePeerDependencies: + - supports-color - ajv@6.12.6: + ajv@6.15.0: dependencies: fast-deep-equal: 3.1.3 fast-json-stable-stringify: 2.1.0 json-schema-traverse: 0.4.1 uri-js: 4.4.1 + ansi-colors@4.1.3: {} + + ansi-escapes@7.3.0: + dependencies: + environment: 1.1.0 + + ansi-regex@5.0.1: {} + + ansi-regex@6.2.2: {} + ansi-styles@4.3.0: dependencies: color-convert: 2.0.1 + any-promise@1.3.0: {} + + anymatch@3.1.3: + dependencies: + normalize-path: 3.0.0 + picomatch: 2.3.2 + + argparse@1.0.10: + dependencies: + sprintf-js: 1.0.3 + argparse@2.0.1: {} array-flatten@1.1.1: {} - assertion-error@2.0.1: {} + array-union@2.1.0: {} + + ast-v8-to-istanbul@1.0.4: + dependencies: + '@jridgewell/trace-mapping': 0.3.31 + estree-walker: 3.0.3 + js-tokens: 10.0.0 asynckit@0.4.0: {} - axios@1.10.0: + axios@1.18.1: dependencies: - follow-redirects: 1.15.9 - form-data: 4.0.3 - proxy-from-env: 1.1.0 + follow-redirects: 1.16.0 + form-data: 4.0.6 + https-proxy-agent: 5.0.1 + proxy-from-env: 2.1.0 transitivePeerDependencies: - debug + - supports-color - balanced-match@1.0.2: {} + balanced-match@4.0.4: {} + + better-path-resolve@1.0.0: + dependencies: + is-windows: 1.0.2 + + binary-extensions@2.3.0: {} binary-searching@2.0.5: {} - body-parser@1.20.3: + body-parser@1.20.5: dependencies: bytes: 3.1.2 content-type: 1.0.5 debug: 2.6.9 depd: 2.0.0 destroy: 1.2.0 - http-errors: 2.0.0 + http-errors: 2.0.1 iconv-lite: 0.4.24 on-finished: 2.4.1 - qs: 6.13.0 - raw-body: 2.5.2 + qs: 6.15.3 + raw-body: 2.5.3 type-is: 1.6.18 unpipe: 1.0.0 transitivePeerDependencies: - supports-color - brace-expansion@1.1.12: - dependencies: - balanced-match: 1.0.2 - concat-map: 0.0.1 - - brace-expansion@2.0.2: + brace-expansion@5.0.6: dependencies: - balanced-match: 1.0.2 + balanced-match: 4.0.4 braces@3.0.3: dependencies: @@ -2327,8 +2890,6 @@ snapshots: bytes@3.1.2: {} - cac@6.7.14: {} - call-bind-apply-helpers@1.0.2: dependencies: es-errors: 1.3.0 @@ -2339,24 +2900,55 @@ snapshots: call-bind-apply-helpers: 1.0.2 get-intrinsic: 1.3.0 - callsites@3.1.0: {} - - chai@5.2.1: - dependencies: - assertion-error: 2.0.1 - check-error: 2.1.1 - deep-eql: 5.0.2 - loupe: 3.1.4 - pathval: 2.0.1 + chai@6.2.2: {} chalk@4.1.2: dependencies: ansi-styles: 4.3.0 supports-color: 7.2.0 + chalk@5.6.2: {} + + char-regex@1.0.2: {} + character-entities@2.0.2: {} - check-error@2.1.1: {} + chardet@2.1.1: {} + + chokidar@3.6.0: + dependencies: + anymatch: 3.1.3 + braces: 3.0.3 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + + cjs-module-lexer@1.4.3: {} + + cli-highlight@2.1.11: + dependencies: + chalk: 4.1.2 + highlight.js: 10.7.3 + mz: 2.7.0 + parse5: 5.1.1 + parse5-htmlparser2-tree-adapter: 6.0.1 + yargs: 16.2.0 + + cli-table3@0.6.5: + dependencies: + string-width: 4.2.3 + optionalDependencies: + '@colors/colors': 1.5.0 + + cliui@7.0.4: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 color-convert@2.0.1: dependencies: @@ -2368,11 +2960,11 @@ snapshots: dependencies: delayed-stream: 1.0.0 - comment-parser@1.4.1: {} + commander@10.0.1: {} - commondir@1.0.1: {} + commander@9.5.0: {} - concat-map@0.0.1: {} + comment-parser@1.4.1: {} content-disposition@0.5.4: dependencies: @@ -2380,9 +2972,11 @@ snapshots: content-type@1.0.5: {} - cookie-signature@1.0.6: {} + convert-source-map@2.0.0: {} - cookie@0.7.1: {} + cookie-signature@1.0.7: {} + + cookie@0.7.2: {} cross-spawn@7.0.6: dependencies: @@ -2394,7 +2988,7 @@ snapshots: dependencies: ms: 2.0.0 - debug@4.4.1: + debug@4.4.3: dependencies: ms: 2.1.3 @@ -2402,12 +2996,8 @@ snapshots: dependencies: character-entities: 2.0.2 - deep-eql@5.0.2: {} - deep-is@0.1.4: {} - deepmerge@4.3.1: {} - delayed-stream@1.0.0: {} depd@2.0.0: {} @@ -2416,11 +3006,19 @@ snapshots: destroy@1.2.0: {} + detect-indent@6.1.0: {} + + detect-libc@2.1.2: {} + devlop@1.1.0: dependencies: dequal: 2.0.3 - dotenv@17.2.0: {} + dir-glob@3.0.1: + dependencies: + path-type: 4.0.0 + + dotenv@17.4.2: {} dunder-proto@1.0.1: dependencies: @@ -2430,19 +3028,28 @@ snapshots: ee-first@1.1.1: {} - encodeurl@1.0.2: {} + emoji-regex@8.0.0: {} + + emojilib@2.4.0: {} encodeurl@2.0.0: {} + enquirer@2.4.1: + dependencies: + ansi-colors: 4.1.3 + strip-ansi: 6.0.1 + entities@4.5.0: {} + environment@1.1.0: {} + es-define-property@1.0.1: {} es-errors@1.3.0: {} - es-module-lexer@1.7.0: {} + es-module-lexer@2.1.0: {} - es-object-atoms@1.1.1: + es-object-atoms@1.1.2: dependencies: es-errors: 1.3.0 @@ -2451,43 +3058,18 @@ snapshots: es-errors: 1.3.0 get-intrinsic: 1.3.0 has-tostringtag: 1.0.2 - hasown: 2.0.2 + hasown: 2.0.4 - esbuild@0.25.6: - optionalDependencies: - '@esbuild/aix-ppc64': 0.25.6 - '@esbuild/android-arm': 0.25.6 - '@esbuild/android-arm64': 0.25.6 - '@esbuild/android-x64': 0.25.6 - '@esbuild/darwin-arm64': 0.25.6 - '@esbuild/darwin-x64': 0.25.6 - '@esbuild/freebsd-arm64': 0.25.6 - '@esbuild/freebsd-x64': 0.25.6 - '@esbuild/linux-arm': 0.25.6 - '@esbuild/linux-arm64': 0.25.6 - '@esbuild/linux-ia32': 0.25.6 - '@esbuild/linux-loong64': 0.25.6 - '@esbuild/linux-mips64el': 0.25.6 - '@esbuild/linux-ppc64': 0.25.6 - '@esbuild/linux-riscv64': 0.25.6 - '@esbuild/linux-s390x': 0.25.6 - '@esbuild/linux-x64': 0.25.6 - '@esbuild/netbsd-arm64': 0.25.6 - '@esbuild/netbsd-x64': 0.25.6 - '@esbuild/openbsd-arm64': 0.25.6 - '@esbuild/openbsd-x64': 0.25.6 - '@esbuild/openharmony-arm64': 0.25.6 - '@esbuild/sunos-x64': 0.25.6 - '@esbuild/win32-arm64': 0.25.6 - '@esbuild/win32-ia32': 0.25.6 - '@esbuild/win32-x64': 0.25.6 + escalade@3.2.0: {} escape-html@1.0.3: {} escape-string-regexp@4.0.0: {} - eslint-scope@8.4.0: + eslint-scope@9.1.2: dependencies: + '@types/esrecurse': 4.3.1 + '@types/estree': 1.0.8 esrecurse: 4.3.0 estraverse: 5.3.0 @@ -2495,30 +3077,28 @@ snapshots: eslint-visitor-keys@4.2.1: {} - eslint@9.31.0(jiti@2.4.2): - dependencies: - '@eslint-community/eslint-utils': 4.7.0(eslint@9.31.0(jiti@2.4.2)) - '@eslint-community/regexpp': 4.12.1 - '@eslint/config-array': 0.21.0 - '@eslint/config-helpers': 0.3.0 - '@eslint/core': 0.15.1 - '@eslint/eslintrc': 3.3.1 - '@eslint/js': 9.31.0 - '@eslint/plugin-kit': 0.3.3 - '@humanfs/node': 0.16.6 + eslint-visitor-keys@5.0.1: {} + + eslint@10.5.0(jiti@2.7.0): + dependencies: + '@eslint-community/eslint-utils': 4.9.1(eslint@10.5.0(jiti@2.7.0)) + '@eslint-community/regexpp': 4.12.2 + '@eslint/config-array': 0.23.5 + '@eslint/config-helpers': 0.6.0 + '@eslint/core': 1.2.1 + '@eslint/plugin-kit': 0.7.2 + '@humanfs/node': 0.16.8 '@humanwhocodes/module-importer': 1.0.1 '@humanwhocodes/retry': 0.4.3 '@types/estree': 1.0.8 - '@types/json-schema': 7.0.15 - ajv: 6.12.6 - chalk: 4.1.2 + ajv: 6.15.0 cross-spawn: 7.0.6 - debug: 4.4.1 + debug: 4.4.3 escape-string-regexp: 4.0.0 - eslint-scope: 8.4.0 - eslint-visitor-keys: 4.2.1 - espree: 10.4.0 - esquery: 1.6.0 + eslint-scope: 9.1.2 + eslint-visitor-keys: 5.0.1 + espree: 11.2.0 + esquery: 1.7.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 8.0.0 @@ -2528,22 +3108,29 @@ snapshots: imurmurhash: 0.1.4 is-glob: 4.0.3 json-stable-stringify-without-jsonify: 1.0.1 - lodash.merge: 4.6.2 - minimatch: 3.1.2 + minimatch: 10.2.5 natural-compare: 1.4.0 optionator: 0.9.4 optionalDependencies: - jiti: 2.4.2 + jiti: 2.7.0 transitivePeerDependencies: - supports-color espree@10.4.0: dependencies: - acorn: 8.15.0 - acorn-jsx: 5.3.2(acorn@8.15.0) + acorn: 8.16.0 + acorn-jsx: 5.3.2(acorn@8.16.0) eslint-visitor-keys: 4.2.1 - esquery@1.6.0: + espree@11.2.0: + dependencies: + acorn: 8.16.0 + acorn-jsx: 5.3.2(acorn@8.16.0) + eslint-visitor-keys: 5.0.1 + + esprima@4.0.1: {} + + esquery@1.7.0: dependencies: estraverse: 5.3.0 @@ -2553,8 +3140,6 @@ snapshots: estraverse@5.3.0: {} - estree-walker@2.0.2: {} - estree-walker@3.0.3: dependencies: '@types/estree': 1.0.8 @@ -2563,44 +3148,46 @@ snapshots: etag@1.8.1: {} - expect-type@1.2.2: {} + expect-type@1.3.0: {} - express@4.21.2: + express@4.22.2: dependencies: accepts: 1.3.8 array-flatten: 1.1.1 - body-parser: 1.20.3 + body-parser: 1.20.5 content-disposition: 0.5.4 content-type: 1.0.5 - cookie: 0.7.1 - cookie-signature: 1.0.6 + cookie: 0.7.2 + cookie-signature: 1.0.7 debug: 2.6.9 depd: 2.0.0 encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 - finalhandler: 1.3.1 + finalhandler: 1.3.2 fresh: 0.5.2 - http-errors: 2.0.0 + http-errors: 2.0.1 merge-descriptors: 1.0.3 methods: 1.1.2 on-finished: 2.4.1 parseurl: 1.3.3 - path-to-regexp: 0.1.12 + path-to-regexp: 0.1.13 proxy-addr: 2.0.7 - qs: 6.13.0 + qs: 6.15.3 range-parser: 1.2.1 safe-buffer: 5.2.1 - send: 0.19.0 - serve-static: 1.16.2 + send: 0.19.2 + serve-static: 1.16.3 setprototypeof: 1.2.0 - statuses: 2.0.1 + statuses: 2.0.2 type-is: 1.6.18 utils-merge: 1.0.1 vary: 1.1.2 transitivePeerDependencies: - supports-color + extendable-error@0.1.7: {} + fast-deep-equal@3.1.3: {} fast-glob@3.3.3: @@ -2615,13 +3202,15 @@ snapshots: fast-levenshtein@2.0.6: {} - fastq@1.19.1: + fastq@1.20.1: dependencies: reusify: 1.1.0 - fdir@6.4.6(picomatch@4.0.2): + fdir@6.5.0(picomatch@4.0.4): optionalDependencies: - picomatch: 4.0.2 + picomatch: 4.0.4 + + fflate@0.8.3: {} file-entry-cache@8.0.0: dependencies: @@ -2631,18 +3220,23 @@ snapshots: dependencies: to-regex-range: 5.0.1 - finalhandler@1.3.1: + finalhandler@1.3.2: dependencies: debug: 2.6.9 encodeurl: 2.0.0 escape-html: 1.0.3 on-finished: 2.4.1 parseurl: 1.3.3 - statuses: 2.0.1 + statuses: 2.0.2 unpipe: 1.0.0 transitivePeerDependencies: - supports-color + find-up@4.1.0: + dependencies: + locate-path: 5.0.0 + path-exists: 4.0.0 + find-up@5.0.0: dependencies: locate-path: 6.0.0 @@ -2650,47 +3244,65 @@ snapshots: flat-cache@4.0.1: dependencies: - flatted: 3.3.3 + flatted: 3.4.2 keyv: 4.5.4 - flatted@3.3.3: {} + flatted@3.4.2: {} - follow-redirects@1.15.9: {} + follow-redirects@1.16.0: {} - form-data@4.0.3: + form-data@4.0.6: dependencies: asynckit: 0.4.0 combined-stream: 1.0.8 es-set-tostringtag: 2.1.0 - hasown: 2.0.2 + hasown: 2.0.4 mime-types: 2.1.35 forwarded@0.2.0: {} fresh@0.5.2: {} + fs-extra@7.0.1: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + + fs-extra@8.1.0: + dependencies: + graceful-fs: 4.2.11 + jsonfile: 4.0.0 + universalify: 0.1.2 + fsevents@2.3.3: optional: true function-bind@1.1.2: {} + get-caller-file@2.0.5: {} + get-intrinsic@1.3.0: dependencies: call-bind-apply-helpers: 1.0.2 es-define-property: 1.0.1 es-errors: 1.3.0 - es-object-atoms: 1.1.1 + es-object-atoms: 1.1.2 function-bind: 1.1.2 get-proto: 1.0.1 gopd: 1.2.0 has-symbols: 1.1.0 - hasown: 2.0.2 + hasown: 2.0.4 math-intrinsics: 1.1.0 get-proto@1.0.1: dependencies: dunder-proto: 1.0.1 - es-object-atoms: 1.1.1 + es-object-atoms: 1.1.2 + + get-tsconfig@4.14.0: + dependencies: + resolve-pkg-maps: 1.0.0 glob-parent@5.1.2: dependencies: @@ -2700,13 +3312,20 @@ snapshots: dependencies: is-glob: 4.0.3 - globals@14.0.0: {} + globals@17.6.0: {} - globals@16.3.0: {} + globby@11.1.0: + dependencies: + array-union: 2.1.0 + dir-glob: 3.0.1 + fast-glob: 3.3.3 + ignore: 5.3.2 + merge2: 1.4.1 + slash: 3.0.0 gopd@1.2.0: {} - graphemer@1.4.0: {} + graceful-fs@4.2.11: {} has-flag@4.0.0: {} @@ -2716,62 +3335,96 @@ snapshots: dependencies: has-symbols: 1.1.0 - hasown@2.0.2: + hasown@2.0.4: dependencies: function-bind: 1.1.2 - http-errors@2.0.0: + highlight.js@10.7.3: {} + + html-escaper@2.0.2: {} + + http-errors@2.0.1: dependencies: depd: 2.0.0 inherits: 2.0.4 setprototypeof: 1.2.0 - statuses: 2.0.1 + statuses: 2.0.2 toidentifier: 1.0.1 + https-proxy-agent@5.0.1: + dependencies: + agent-base: 6.0.2 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + + human-id@4.1.3: {} + + husky@9.1.7: {} + iconv-lite@0.4.24: dependencies: safer-buffer: 2.1.2 + iconv-lite@0.7.2: + dependencies: + safer-buffer: 2.1.2 + ignore@5.3.2: {} ignore@7.0.5: {} - import-fresh@3.3.1: - dependencies: - parent-module: 1.0.1 - resolve-from: 4.0.0 - imurmurhash@0.1.4: {} inherits@2.0.4: {} ipaddr.js@1.9.1: {} - is-core-module@2.16.1: + is-binary-path@2.1.0: dependencies: - hasown: 2.0.2 + binary-extensions: 2.3.0 is-extglob@2.1.1: {} + is-fullwidth-code-point@3.0.0: {} + is-glob@4.0.3: dependencies: is-extglob: 2.1.1 - is-module@1.0.0: {} - is-number@7.0.0: {} - is-reference@1.2.1: + is-subdir@1.2.0: dependencies: - '@types/estree': 1.0.8 + better-path-resolve: 1.0.0 + + is-windows@1.0.2: {} isexe@2.0.0: {} - jiti@2.4.2: {} + istanbul-lib-coverage@3.2.2: {} - js-tokens@9.0.1: {} + istanbul-lib-report@3.0.1: + dependencies: + istanbul-lib-coverage: 3.2.2 + make-dir: 4.0.0 + supports-color: 7.2.0 + + istanbul-reports@3.2.0: + dependencies: + html-escaper: 2.0.2 + istanbul-lib-report: 3.0.1 + + jiti@2.7.0: {} + + js-tokens@10.0.0: {} + + js-yaml@3.14.2: + dependencies: + argparse: 1.0.10 + esprima: 4.0.1 - js-yaml@4.1.0: + js-yaml@4.1.1: dependencies: argparse: 2.0.1 @@ -2781,6 +3434,10 @@ snapshots: json-stable-stringify-without-jsonify@1.0.1: {} + jsonfile@4.0.0: + optionalDependencies: + graceful-fs: 4.2.11 + jsuri@1.3.1: {} keyv@4.5.4: @@ -2792,35 +3449,111 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 - linkify-it@5.0.0: + lightningcss-android-arm64@1.32.0: + optional: true + + lightningcss-darwin-arm64@1.32.0: + optional: true + + lightningcss-darwin-x64@1.32.0: + optional: true + + lightningcss-freebsd-x64@1.32.0: + optional: true + + lightningcss-linux-arm-gnueabihf@1.32.0: + optional: true + + lightningcss-linux-arm64-gnu@1.32.0: + optional: true + + lightningcss-linux-arm64-musl@1.32.0: + optional: true + + lightningcss-linux-x64-gnu@1.32.0: + optional: true + + lightningcss-linux-x64-musl@1.32.0: + optional: true + + lightningcss-win32-arm64-msvc@1.32.0: + optional: true + + lightningcss-win32-x64-msvc@1.32.0: + optional: true + + lightningcss@1.32.0: + dependencies: + detect-libc: 2.1.2 + optionalDependencies: + lightningcss-android-arm64: 1.32.0 + lightningcss-darwin-arm64: 1.32.0 + lightningcss-darwin-x64: 1.32.0 + lightningcss-freebsd-x64: 1.32.0 + lightningcss-linux-arm-gnueabihf: 1.32.0 + lightningcss-linux-arm64-gnu: 1.32.0 + lightningcss-linux-arm64-musl: 1.32.0 + lightningcss-linux-x64-gnu: 1.32.0 + lightningcss-linux-x64-musl: 1.32.0 + lightningcss-win32-arm64-msvc: 1.32.0 + lightningcss-win32-x64-msvc: 1.32.0 + + linkify-it@5.0.1: dependencies: uc.micro: 2.1.0 + locate-path@5.0.0: + dependencies: + p-locate: 4.1.0 + locate-path@6.0.0: dependencies: p-locate: 5.0.0 - lodash.merge@4.6.2: {} + lodash.startcase@4.4.0: {} - lodash@4.17.21: {} + lodash@4.18.1: {} - loupe@3.1.4: {} + lru-cache@11.5.0: {} lunr@2.3.9: {} - magic-string@0.30.17: + magic-string@0.30.21: + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + + magicast@0.5.3: + dependencies: + '@babel/parser': 7.29.3 + '@babel/types': 7.29.0 + source-map-js: 1.2.1 + + make-dir@4.0.0: dependencies: - '@jridgewell/sourcemap-codec': 1.5.4 + semver: 7.8.1 - markdown-it@14.1.0: + markdown-it@14.2.0: dependencies: argparse: 2.0.1 entities: 4.5.0 - linkify-it: 5.0.0 + linkify-it: 5.0.1 mdurl: 2.0.0 punycode.js: 2.3.1 uc.micro: 2.1.0 + marked-terminal@7.3.0(marked@9.1.6): + dependencies: + ansi-escapes: 7.3.0 + ansi-regex: 6.2.2 + chalk: 5.6.2 + cli-highlight: 2.1.11 + cli-table3: 0.6.5 + marked: 9.1.6 + node-emoji: 2.2.0 + supports-hyperlinks: 3.2.0 + + marked@9.1.6: {} + math-intrinsics@1.1.0: {} mdast-util-from-markdown@2.0.2: @@ -2968,7 +3701,7 @@ snapshots: micromark@4.0.2: dependencies: '@types/debug': 4.1.12 - debug: 4.4.1 + debug: 4.4.3 decode-named-character-reference: 1.2.0 devlop: 1.1.0 micromark-core-commonmark: 2.0.3 @@ -2990,7 +3723,7 @@ snapshots: micromatch@4.0.8: dependencies: braces: 3.0.3 - picomatch: 2.3.1 + picomatch: 2.3.2 mime-db@1.52.0: {} @@ -3000,28 +3733,47 @@ snapshots: mime@1.6.0: {} - minimatch@3.1.2: + minimatch@10.2.5: dependencies: - brace-expansion: 1.1.12 + brace-expansion: 5.0.6 - minimatch@9.0.5: - dependencies: - brace-expansion: 2.0.2 + mri@1.2.0: {} ms@2.0.0: {} ms@2.1.3: {} - nanoid@3.3.11: {} + mylas@2.1.14: {} + + mz@2.7.0: + dependencies: + any-promise: 1.3.0 + object-assign: 4.1.1 + thenify-all: 1.6.0 + + nanoid@3.3.12: {} natural-compare@1.4.0: {} negotiator@0.6.3: {} + node-emoji@2.2.0: + dependencies: + '@sindresorhus/is': 4.6.0 + char-regex: 1.0.2 + emojilib: 2.4.0 + skin-tone: 2.0.0 + + normalize-path@3.0.0: {} + oauth@0.10.2: {} + object-assign@4.1.1: {} + object-inspect@1.13.4: {} + obug@2.1.3: {} + on-finished@2.4.1: dependencies: ee-first: 1.1.1 @@ -3035,17 +3787,43 @@ snapshots: type-check: 0.4.0 word-wrap: 1.2.5 + outdent@0.5.0: {} + + p-filter@2.1.0: + dependencies: + p-map: 2.1.0 + + p-limit@2.3.0: + dependencies: + p-try: 2.2.0 + p-limit@3.1.0: dependencies: yocto-queue: 0.1.0 + p-locate@4.1.0: + dependencies: + p-limit: 2.3.0 + p-locate@5.0.0: dependencies: p-limit: 3.1.0 - parent-module@1.0.1: + p-map@2.1.0: {} + + p-try@2.2.0: {} + + package-manager-detector@0.2.11: + dependencies: + quansync: 0.2.11 + + parse5-htmlparser2-tree-adapter@6.0.1: dependencies: - callsites: 3.1.0 + parse5: 6.0.1 + + parse5@5.1.1: {} + + parse5@6.0.1: {} parseurl@1.3.3: {} @@ -3053,111 +3831,115 @@ snapshots: path-key@3.1.1: {} - path-parse@1.0.7: {} + path-to-regexp@0.1.13: {} - path-to-regexp@0.1.12: {} + path-type@4.0.0: {} pathe@2.0.3: {} - pathval@2.0.1: {} - picocolors@1.1.1: {} - picomatch@2.3.1: {} + picomatch@2.3.2: {} + + picomatch@4.0.4: {} - picomatch@4.0.2: {} + pify@4.0.1: {} - picomatch@4.0.3: {} + plimit-lit@1.6.1: + dependencies: + queue-lit: 1.5.2 - postcss@8.5.6: + postcss@8.5.15: dependencies: - nanoid: 3.3.11 + nanoid: 3.3.12 picocolors: 1.1.1 source-map-js: 1.2.1 prelude-ls@1.2.1: {} - prettier-plugin-jsdoc@1.3.3(prettier@3.6.2): + prettier-plugin-jsdoc@1.8.1(prettier@3.8.4): dependencies: binary-searching: 2.0.5 comment-parser: 1.4.1 mdast-util-from-markdown: 2.0.2 - prettier: 3.6.2 + prettier: 3.8.4 transitivePeerDependencies: - supports-color - prettier@3.6.2: {} + prettier@2.8.8: {} + + prettier@3.8.4: {} proxy-addr@2.0.7: dependencies: forwarded: 0.2.0 ipaddr.js: 1.9.1 - proxy-from-env@1.1.0: {} + proxy-from-env@2.1.0: {} punycode.js@2.3.1: {} punycode@2.3.1: {} - qs@6.13.0: + qs@6.15.3: dependencies: - side-channel: 1.1.0 + es-define-property: 1.0.1 + side-channel: 1.1.1 + + quansync@0.2.11: {} + + queue-lit@1.5.2: {} queue-microtask@1.2.3: {} range-parser@1.2.1: {} - raw-body@2.5.2: + raw-body@2.5.3: dependencies: bytes: 3.1.2 - http-errors: 2.0.0 + http-errors: 2.0.1 iconv-lite: 0.4.24 unpipe: 1.0.0 - resolve-from@4.0.0: {} + read-yaml-file@1.1.0: + dependencies: + graceful-fs: 4.2.11 + js-yaml: 3.14.2 + pify: 4.0.1 + strip-bom: 3.0.0 - resolve@1.22.10: + readdirp@3.6.0: dependencies: - is-core-module: 2.16.1 - path-parse: 1.0.7 - supports-preserve-symlinks-flag: 1.0.0 + picomatch: 2.3.2 - reusify@1.1.0: {} + require-directory@2.1.1: {} - rollup-plugin-esnext-to-nodenext@1.0.1(rollup@4.45.1): - dependencies: - rollup: 4.45.1 - ts-add-js-extension: 1.6.6 + resolve-from@5.0.0: {} - rollup-plugin-node-externals@8.0.1(rollup@4.45.1): - dependencies: - rollup: 4.45.1 + resolve-pkg-maps@1.0.0: {} + + reusify@1.1.0: {} - rollup@4.45.1: + rolldown@1.0.3: dependencies: - '@types/estree': 1.0.8 + '@oxc-project/types': 0.133.0 + '@rolldown/pluginutils': 1.0.1 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.45.1 - '@rollup/rollup-android-arm64': 4.45.1 - '@rollup/rollup-darwin-arm64': 4.45.1 - '@rollup/rollup-darwin-x64': 4.45.1 - '@rollup/rollup-freebsd-arm64': 4.45.1 - '@rollup/rollup-freebsd-x64': 4.45.1 - '@rollup/rollup-linux-arm-gnueabihf': 4.45.1 - '@rollup/rollup-linux-arm-musleabihf': 4.45.1 - '@rollup/rollup-linux-arm64-gnu': 4.45.1 - '@rollup/rollup-linux-arm64-musl': 4.45.1 - '@rollup/rollup-linux-loongarch64-gnu': 4.45.1 - '@rollup/rollup-linux-powerpc64le-gnu': 4.45.1 - '@rollup/rollup-linux-riscv64-gnu': 4.45.1 - '@rollup/rollup-linux-riscv64-musl': 4.45.1 - '@rollup/rollup-linux-s390x-gnu': 4.45.1 - '@rollup/rollup-linux-x64-gnu': 4.45.1 - '@rollup/rollup-linux-x64-musl': 4.45.1 - '@rollup/rollup-win32-arm64-msvc': 4.45.1 - '@rollup/rollup-win32-ia32-msvc': 4.45.1 - '@rollup/rollup-win32-x64-msvc': 4.45.1 - fsevents: 2.3.3 + '@rolldown/binding-android-arm64': 1.0.3 + '@rolldown/binding-darwin-arm64': 1.0.3 + '@rolldown/binding-darwin-x64': 1.0.3 + '@rolldown/binding-freebsd-x64': 1.0.3 + '@rolldown/binding-linux-arm-gnueabihf': 1.0.3 + '@rolldown/binding-linux-arm64-gnu': 1.0.3 + '@rolldown/binding-linux-arm64-musl': 1.0.3 + '@rolldown/binding-linux-ppc64-gnu': 1.0.3 + '@rolldown/binding-linux-s390x-gnu': 1.0.3 + '@rolldown/binding-linux-x64-gnu': 1.0.3 + '@rolldown/binding-linux-x64-musl': 1.0.3 + '@rolldown/binding-openharmony-arm64': 1.0.3 + '@rolldown/binding-wasm32-wasi': 1.0.3 + '@rolldown/binding-win32-arm64-msvc': 1.0.3 + '@rolldown/binding-win32-x64-msvc': 1.0.3 run-parallel@1.2.0: dependencies: @@ -3169,30 +3951,32 @@ snapshots: semver@7.7.2: {} - send@0.19.0: + semver@7.8.1: {} + + send@0.19.2: dependencies: debug: 2.6.9 depd: 2.0.0 destroy: 1.2.0 - encodeurl: 1.0.2 + encodeurl: 2.0.0 escape-html: 1.0.3 etag: 1.8.1 fresh: 0.5.2 - http-errors: 2.0.0 + http-errors: 2.0.1 mime: 1.6.0 ms: 2.1.3 on-finished: 2.4.1 range-parser: 1.2.1 - statuses: 2.0.1 + statuses: 2.0.2 transitivePeerDependencies: - supports-color - serve-static@1.16.2: + serve-static@1.16.3: dependencies: encodeurl: 2.0.0 escape-html: 1.0.3 parseurl: 1.3.3 - send: 0.19.0 + send: 0.19.2 transitivePeerDependencies: - supports-color @@ -3204,7 +3988,7 @@ snapshots: shebang-regex@3.0.0: {} - side-channel-list@1.0.0: + side-channel-list@1.0.1: dependencies: es-errors: 1.3.0 object-inspect: 1.13.4 @@ -3224,50 +4008,85 @@ snapshots: object-inspect: 1.13.4 side-channel-map: 1.0.1 - side-channel@1.1.0: + side-channel@1.1.1: dependencies: es-errors: 1.3.0 object-inspect: 1.13.4 - side-channel-list: 1.0.0 + side-channel-list: 1.0.1 side-channel-map: 1.0.1 side-channel-weakmap: 1.0.2 siginfo@2.0.0: {} + signal-exit@4.1.0: {} + + skin-tone@2.0.0: + dependencies: + unicode-emoji-modifier-base: 1.0.0 + + slash@3.0.0: {} + source-map-js@1.2.1: {} + spawndamnit@3.0.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + + sprintf-js@1.0.3: {} + stackback@0.0.2: {} - statuses@2.0.1: {} + statuses@2.0.2: {} - std-env@3.9.0: {} + std-env@4.1.0: {} - strip-json-comments@3.1.1: {} + string-width@4.2.3: + dependencies: + emoji-regex: 8.0.0 + is-fullwidth-code-point: 3.0.0 + strip-ansi: 6.0.1 - strip-literal@3.0.0: + strip-ansi@6.0.1: dependencies: - js-tokens: 9.0.1 + ansi-regex: 5.0.1 + + strip-bom@3.0.0: {} supports-color@7.2.0: dependencies: has-flag: 4.0.0 - supports-preserve-symlinks-flag@1.0.0: {} + supports-hyperlinks@3.2.0: + dependencies: + has-flag: 4.0.0 + supports-color: 7.2.0 + + term-size@2.2.1: {} + + thenify-all@1.6.0: + dependencies: + thenify: 3.3.1 + + thenify@3.3.1: + dependencies: + any-promise: 1.3.0 tinybench@2.9.0: {} - tinyexec@0.3.2: {} + tinyexec@1.2.4: {} - tinyglobby@0.2.14: + tinyglobby@0.2.16: dependencies: - fdir: 6.4.6(picomatch@4.0.2) - picomatch: 4.0.2 - - tinypool@1.1.1: {} + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 - tinyrainbow@2.0.0: {} + tinyglobby@0.2.17: + dependencies: + fdir: 6.5.0(picomatch@4.0.4) + picomatch: 4.0.4 - tinyspy@4.0.3: {} + tinyrainbow@3.1.0: {} to-regex-range@5.0.1: dependencies: @@ -3275,15 +4094,22 @@ snapshots: toidentifier@1.0.1: {} - ts-add-js-extension@1.6.6: + ts-api-utils@2.5.0(typescript@6.0.3): dependencies: - typescript: 5.8.3 + typescript: 6.0.3 - ts-api-utils@2.1.0(typescript@5.8.3): + tsc-alias@1.8.17: dependencies: - typescript: 5.8.3 + chokidar: 3.6.0 + commander: 9.5.0 + get-tsconfig: 4.14.0 + globby: 11.1.0 + mylas: 2.1.14 + normalize-path: 3.0.0 + plimit-lit: 1.6.1 - tslib@2.8.1: {} + tslib@2.8.1: + optional: true type-check@0.4.0: dependencies: @@ -3294,36 +4120,42 @@ snapshots: media-typer: 0.3.0 mime-types: 2.1.35 - typedoc@0.28.7(typescript@5.8.3): + typedoc@0.28.19(typescript@6.0.3): dependencies: - '@gerrit0/mini-shiki': 3.7.0 + '@gerrit0/mini-shiki': 3.23.0 lunr: 2.3.9 - markdown-it: 14.1.0 - minimatch: 9.0.5 - typescript: 5.8.3 - yaml: 2.8.0 - - typescript-eslint@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3): - dependencies: - '@typescript-eslint/eslint-plugin': 8.37.0(@typescript-eslint/parser@8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3))(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/parser': 8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3) - '@typescript-eslint/typescript-estree': 8.37.0(typescript@5.8.3) - '@typescript-eslint/utils': 8.37.0(eslint@9.31.0(jiti@2.4.2))(typescript@5.8.3) - eslint: 9.31.0(jiti@2.4.2) - typescript: 5.8.3 + markdown-it: 14.2.0 + minimatch: 10.2.5 + typescript: 6.0.3 + yaml: 2.9.0 + + typescript-eslint@8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3): + dependencies: + '@typescript-eslint/eslint-plugin': 8.61.1(@typescript-eslint/parser@8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/parser': 8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) + '@typescript-eslint/typescript-estree': 8.61.1(typescript@6.0.3) + '@typescript-eslint/utils': 8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) + eslint: 10.5.0(jiti@2.7.0) + typescript: 6.0.3 transitivePeerDependencies: - supports-color - typescript@5.8.3: {} + typescript@5.6.1-rc: {} + + typescript@6.0.3: {} uc.micro@2.1.0: {} undici-types@6.21.0: {} + unicode-emoji-modifier-base@1.0.0: {} + unist-util-stringify-position@4.0.0: dependencies: '@types/unist': 3.0.3 + universalify@0.1.2: {} + unpipe@1.0.0: {} uri-js@4.4.1: @@ -3332,84 +4164,54 @@ snapshots: utils-merge@1.0.1: {} + validate-npm-package-name@5.0.1: {} + vary@1.1.2: {} - vite-node@3.2.4(@types/node@20.19.8)(jiti@2.4.2)(yaml@2.8.0): + vite-plugin-externalize-deps@0.10.0(vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0)): dependencies: - cac: 6.7.14 - debug: 4.4.1 - es-module-lexer: 1.7.0 - pathe: 2.0.3 - vite: 7.0.4(@types/node@20.19.8)(jiti@2.4.2)(yaml@2.8.0) - transitivePeerDependencies: - - '@types/node' - - jiti - - less - - lightningcss - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml - - vite@7.0.4(@types/node@20.19.8)(jiti@2.4.2)(yaml@2.8.0): - dependencies: - esbuild: 0.25.6 - fdir: 6.4.6(picomatch@4.0.2) - picomatch: 4.0.2 - postcss: 8.5.6 - rollup: 4.45.1 - tinyglobby: 0.2.14 - optionalDependencies: - '@types/node': 20.19.8 - fsevents: 2.3.3 - jiti: 2.4.2 - yaml: 2.8.0 + vite: 8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0) - vitest@3.2.4(@types/debug@4.1.12)(@types/node@20.19.8)(jiti@2.4.2)(yaml@2.8.0): + vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0): dependencies: - '@types/chai': 5.2.2 - '@vitest/expect': 3.2.4 - '@vitest/mocker': 3.2.4(vite@7.0.4(@types/node@20.19.8)(jiti@2.4.2)(yaml@2.8.0)) - '@vitest/pretty-format': 3.2.4 - '@vitest/runner': 3.2.4 - '@vitest/snapshot': 3.2.4 - '@vitest/spy': 3.2.4 - '@vitest/utils': 3.2.4 - chai: 5.2.1 - debug: 4.4.1 - expect-type: 1.2.2 - magic-string: 0.30.17 + lightningcss: 1.32.0 + picomatch: 4.0.4 + postcss: 8.5.15 + rolldown: 1.0.3 + tinyglobby: 0.2.17 + optionalDependencies: + '@types/node': 22.20.0 + fsevents: 2.3.3 + jiti: 2.7.0 + yaml: 2.9.0 + + vitest@4.1.9(@types/node@22.20.0)(@vitest/coverage-v8@4.1.9)(vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0)): + dependencies: + '@vitest/expect': 4.1.9 + '@vitest/mocker': 4.1.9(vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0)) + '@vitest/pretty-format': 4.1.9 + '@vitest/runner': 4.1.9 + '@vitest/snapshot': 4.1.9 + '@vitest/spy': 4.1.9 + '@vitest/utils': 4.1.9 + es-module-lexer: 2.1.0 + expect-type: 1.3.0 + magic-string: 0.30.21 + obug: 2.1.3 pathe: 2.0.3 - picomatch: 4.0.2 - std-env: 3.9.0 + picomatch: 4.0.4 + std-env: 4.1.0 tinybench: 2.9.0 - tinyexec: 0.3.2 - tinyglobby: 0.2.14 - tinypool: 1.1.1 - tinyrainbow: 2.0.0 - vite: 7.0.4(@types/node@20.19.8)(jiti@2.4.2)(yaml@2.8.0) - vite-node: 3.2.4(@types/node@20.19.8)(jiti@2.4.2)(yaml@2.8.0) + tinyexec: 1.2.4 + tinyglobby: 0.2.16 + tinyrainbow: 3.1.0 + vite: 8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0) why-is-node-running: 2.3.0 optionalDependencies: - '@types/debug': 4.1.12 - '@types/node': 20.19.8 + '@types/node': 22.20.0 + '@vitest/coverage-v8': 4.1.9(vitest@4.1.9) transitivePeerDependencies: - - jiti - - less - - lightningcss - msw - - sass - - sass-embedded - - stylus - - sugarss - - supports-color - - terser - - tsx - - yaml which@2.0.2: dependencies: @@ -3422,8 +4224,30 @@ snapshots: word-wrap@1.2.5: {} - yaml@2.8.0: {} + wrap-ansi@7.0.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + + y18n@5.0.8: {} + + yaml@2.9.0: {} + + yargs-parser@20.2.9: {} + + yargs@16.2.0: + dependencies: + cliui: 7.0.4 + escalade: 3.2.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 20.2.9 yocto-queue@0.1.0: {} zod@3.25.76: {} + + zod@4.4.3: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index efc037aa..31709b4a 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,2 +1,5 @@ +packages: + - 'packages/*' + onlyBuiltDependencies: - esbuild diff --git a/rollup.config.ts b/rollup.config.ts deleted file mode 100644 index 8076618b..00000000 --- a/rollup.config.ts +++ /dev/null @@ -1,72 +0,0 @@ -import { defineConfig } from 'rollup'; -import typescript from '@rollup/plugin-typescript'; -import resolve from '@rollup/plugin-node-resolve'; -import commonjs from '@rollup/plugin-commonjs'; -import alias from '@rollup/plugin-alias'; -import esnextToNodeNext from 'rollup-plugin-esnext-to-nodenext'; -import nodeExternals from 'rollup-plugin-node-externals'; -import { fileURLToPath } from 'node:url'; -import { dirname } from 'node:path'; - -const __filename = fileURLToPath(import.meta.url); -const __dirname = dirname(__filename); - -export default defineConfig([ - { - input: 'src/index.ts', - output: { - dir: 'dist/esm', - format: 'esm', - preserveModules: true, - preserveModulesRoot: 'src', - sourcemap: true, - entryFileNames: '[name].mjs', - }, - plugins: [ - nodeExternals(), - alias({ - entries: [ - { find: '~', replacement: `${__dirname}/src` } - ] - }), - resolve(), - commonjs(), - typescript({ - outDir: 'dist/esm', - rootDir: 'src', - declaration: true, - declarationDir: 'dist/esm/types', - tsconfig: './tsconfig.json', - }), - esnextToNodeNext() - ] - }, - { - input: 'src/index.ts', - output: { - dir: 'dist/cjs', - format: 'cjs', - preserveModules: true, - preserveModulesRoot: 'src', - sourcemap: true, - exports: 'auto', - entryFileNames: '[name].cjs', - }, - plugins: [ - nodeExternals(), - alias({ - entries: [ - { find: '~', replacement: `${__dirname}/src` } - ] - }), - resolve(), - commonjs(), - typescript({ - outDir: 'dist/cjs', - rootDir: 'src', - declaration: false, - tsconfig: './tsconfig.json', - }), - ] - } -]); diff --git a/src/api/experimental.ts b/src/api/experimental.ts deleted file mode 100644 index c9b26ec4..00000000 --- a/src/api/experimental.ts +++ /dev/null @@ -1,341 +0,0 @@ -import type * as Models from './models'; -import type * as Parameters from './parameters'; -import type { Client } from '../clients'; -import type { Callback } from '../callback'; -import type { RequestConfig } from '../requestConfig'; - -export class Experimental { - constructor(private client: Client) {} - - /** - * Moves a pagetree rooted at a page to the space's trash: - * - * - If the content's type is `page` and its status is `current`, it will be trashed including all its descendants. - * - For every other combination of content type and status, this API is not supported. - * - * This API accepts the pageTree delete request and returns a task ID. The delete process happens asynchronously. - * - * Use the `/longtask/` REST API to get the copy task status. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the - * content is in. - */ - async deletePageTree( - parameters: Parameters.DeletePageTree, - callback: Callback, - ): Promise; - /** - * Moves a pagetree rooted at a page to the space's trash: - * - * - If the content's type is `page` and its status is `current`, it will be trashed including all its descendants. - * - For every other combination of content type and status, this API is not supported. - * - * This API accepts the pageTree delete request and returns a task ID. The delete process happens asynchronously. - * - * Use the `/longtask/` REST API to get the copy task status. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the - * content is in. - */ - async deletePageTree(parameters: Parameters.DeletePageTree, callback?: never): Promise; - async deletePageTree( - parameters: Parameters.DeletePageTree, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/pageTree`, - method: 'DELETE', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different - * types of labels. - */ - async getLabelsForSpace( - parameters: Parameters.GetLabelsForSpace, - callback: Callback, - ): Promise; - /** - * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different - * types of labels. - */ - async getLabelsForSpace( - parameters: Parameters.GetLabelsForSpace, - callback?: never, - ): Promise; - async getLabelsForSpace( - parameters: Parameters.GetLabelsForSpace, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/label`, - method: 'GET', - params: { - prefix: parameters.prefix, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds labels to a piece of content. Does not modify the existing labels. - * - * Notes: - * - * - Labels can also be added when creating content ([Create content](#api-content-post)). - * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing - * labels and replace them with the labels in the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async addLabelsToSpace( - parameters: Parameters.AddLabelsToSpace, - callback: Callback, - ): Promise; - /** - * Adds labels to a piece of content. Does not modify the existing labels. - * - * Notes: - * - * - Labels can also be added when creating content ([Create content](#api-content-post)). - * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing - * labels and replace them with the labels in the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async addLabelsToSpace(parameters: Parameters.AddLabelsToSpace, callback?: never): Promise; - async addLabelsToSpace( - parameters: Parameters.AddLabelsToSpace, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/label`, - method: 'POST', - }; - - return this.client.sendRequest(config, callback); - } - - async deleteLabelFromSpace( - parameters: Parameters.DeleteLabelFromSpace, - callback: Callback, - ): Promise; - async deleteLabelFromSpace(parameters: Parameters.DeleteLabelFromSpace, callback?: never): Promise; - async deleteLabelFromSpace( - parameters: Parameters.DeleteLabelFromSpace, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/label`, - method: 'DELETE', - params: { - name: parameters.name, - prefix: parameters.prefix, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the properties for a user as list of property keys. For more information about user properties, see - * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * `Note`, these properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. Use `userProperties.getUserProperties` instead. - */ - async getUserProperties( - parameters: Parameters.GetUserProperties, - callback: Callback, - ): Promise; - /** - * Returns the properties for a user as list of property keys. For more information about user properties, see - * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * `Note`, these properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. Use `userProperties.getUserProperties` instead. - */ - async getUserProperties( - parameters: Parameters.GetUserProperties, - callback?: never, - ): Promise; - async getUserProperties( - parameters: Parameters.GetUserProperties, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/${parameters.userId}/property`, - method: 'GET', - params: { - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the property corresponding to `key` for a user. For more information about user properties, see [Confluence - * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these - * properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. Use `userProperties.getUserProperty` instead. - */ - async getUserProperty( - parameters: Parameters.GetUserProperty, - callback: Callback, - ): Promise; - /** - * Returns the property corresponding to `key` for a user. For more information about user properties, see [Confluence - * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these - * properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. Use `userProperties.getUserProperty` instead. - */ - async getUserProperty(parameters: Parameters.GetUserProperty, callback?: never): Promise; - async getUserProperty( - parameters: Parameters.GetUserProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/${parameters.userId}/property/${parameters.key}`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Creates a property for a user. For more information about user properties, see [Confluence entity properties] - * (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored - * against a user are on a Confluence site level and not space/content level. - * - * `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by - * fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access - * the Confluence site ('Can use' global permission). - * - * @deprecated Will be removed in next major version. Use `userProperties.createUserProperty` instead. - */ - async createUserProperty( - parameters: Parameters.CreateUserProperty, - callback: Callback, - ): Promise; - /** - * Creates a property for a user. For more information about user properties, see [Confluence entity properties] - * (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored - * against a user are on a Confluence site level and not space/content level. - * - * `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by - * fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access - * the Confluence site ('Can use' global permission). - * - * @deprecated Will be removed in next major version. Use `userProperties.createUserProperty` instead. - */ - async createUserProperty(parameters: Parameters.CreateUserProperty, callback?: never): Promise; - async createUserProperty( - parameters: Parameters.CreateUserProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/${parameters.userId}/property/${parameters.key}`, - method: 'POST', - data: { - value: parameters.value, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Updates a property for the given user. Note, you cannot update the key of a user property, only the value. For more - * information about user properties, see [Confluence entity - * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these - * properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. Use `userProperties.updateUserProperty` instead. - */ - async updateUserProperty(parameters: Parameters.UpdateUserProperty, callback: Callback): Promise; - /** - * Updates a property for the given user. Note, you cannot update the key of a user property, only the value. For more - * information about user properties, see [Confluence entity - * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these - * properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. Use `userProperties.updateUserProperty` instead. - */ - async updateUserProperty(parameters: Parameters.UpdateUserProperty, callback?: never): Promise; - async updateUserProperty( - parameters: Parameters.UpdateUserProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/${parameters.userId}/property/${parameters.key}`, - method: 'PUT', - data: { - value: parameters.value, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Deletes a property for the given user. For more information about user properties, see [Confluence entity - * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these - * properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. Use `userProperties.deleteUserProperty` instead. - */ - async deleteUserProperty(parameters: Parameters.DeleteUserProperty, callback: Callback): Promise; - /** - * Deletes a property for the given user. For more information about user properties, see [Confluence entity - * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these - * properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - * - * @deprecated Will be removed in next major version. Use `userProperties.deleteUserProperty` instead. - */ - async deleteUserProperty(parameters: Parameters.DeleteUserProperty, callback?: never): Promise; - async deleteUserProperty( - parameters: Parameters.DeleteUserProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/${parameters.userId}/property/${parameters.key}`, - method: 'DELETE', - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/src/api/index.ts b/src/api/index.ts deleted file mode 100644 index f3241061..00000000 --- a/src/api/index.ts +++ /dev/null @@ -1,32 +0,0 @@ -export * from './analytics'; -export * from './audit'; -export * from './content'; -export * from './contentAttachments'; -export * from './contentBody'; -export * from './contentChildrenAndDescendants'; -export * from './contentComments'; -export * from './contentLabels'; -export * from './contentMacroBody'; -export * from './contentPermissions'; -export * from './contentProperties'; -export * from './contentRestrictions'; -export * from './contentStates'; -export * from './contentVersions'; -export * from './contentWatches'; -export * from './dynamicModules'; -export * from './experimental'; -export * from './group'; -export * from './inlineTasks'; -export * from './labelInfo'; -export * from './longRunningTask'; -export * from './relation'; -export * from './search'; -export * from './settings'; -export * from './space'; -export * from './spacePermissions'; -export * from './spaceProperties'; -export * from './spaceSettings'; -export * from './template'; -export * from './themes'; -export * from './users'; -export * from './userProperties'; diff --git a/src/api/models/createdAttachment.ts b/src/api/models/createdAttachment.ts deleted file mode 100644 index 38f42a8c..00000000 --- a/src/api/models/createdAttachment.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { Attachment } from './attachment'; -import type { AttachmentContainer } from './attachmentContainer'; -import type { Version } from './version'; - -export interface CreatedAttachment extends Attachment { - version: Version; - container: AttachmentContainer; -} diff --git a/src/api/models/index.ts b/src/api/models/index.ts deleted file mode 100644 index 9cac4f8a..00000000 --- a/src/api/models/index.ts +++ /dev/null @@ -1,161 +0,0 @@ -export * from './accountId'; -export * from './accountIdEmailRecord'; -export * from './accountIdEmailRecordArray'; -export * from './addContentRestriction'; -export * from './addContentRestrictionUpdateArray'; -export * from './affectedObject'; -export * from './appDescriptor'; -export * from './asyncContentBody'; -export * from './asyncId'; -export * from './attachment'; -export * from './attachmentContainer'; -export * from './attachmentMetadata'; -export * from './auditRecord'; -export * from './auditRecordArray'; -export * from './auditRecordCreate'; -export * from './availableContentStates'; -export * from './blueprintTemplate'; -export * from './blueprintTemplateArray'; -export * from './breadcrumb'; -export * from './bulkUserLookup'; -export * from './bulkUserLookupArray'; -export * from './buttonLookAndFeel'; -export * from './changedValue'; -export * from './connectModules'; -export * from './container'; -export * from './containerLookAndFeel'; -export * from './containerSummary'; -export * from './content'; -export * from './contentArray'; -export * from './contentBlueprintDraft'; -export * from './contentBody'; -export * from './contentBodyCreate'; -export * from './contentBodyCreateStorage'; -export * from './contentChildren'; -export * from './contentChildType'; -export * from './contentCreate'; -export * from './contentHistory'; -export * from './contentLookAndFeel'; -export * from './contentPermissionRequest'; -export * from './contentProperty'; -export * from './contentPropertyArray'; -export * from './contentPropertyCreate'; -export * from './contentPropertyCreateNoKey'; -export * from './contentPropertyUpdate'; -export * from './contentRestriction'; -export * from './contentRestrictionArray'; -export * from './contentRestrictionUpdate'; -export * from './contentRestrictionUpdateArray'; -export * from './contentState'; -export * from './contentStateResponse'; -export * from './contentStateRestInput'; -export * from './contentStateSettings'; -export * from './contentTemplate'; -export * from './contentTemplateArray'; -export * from './contentTemplateBodyCreate'; -export * from './contentTemplateCreate'; -export * from './contentTemplateUpdate'; -export * from './contentUpdate'; -export * from './copyPageHierarchyRequest'; -export * from './copyPageHierarchyTitleOptions'; -export * from './copyPageRequest'; -export * from './copyPageRequestDestination'; -export * from './createdAttachment'; -export * from './embeddable'; -export * from './embeddedContent'; -export * from './genericLinks'; -export * from './getRestrictionsByOperation'; -export * from './getViewers'; -export * from './getViews'; -export * from './group'; -export * from './groupArray'; -export * from './groupArrayWithLinks'; -export * from './groupCreate'; -export * from './groupName'; -export * from './headerLookAndFeel'; -export * from './horizontalHeaderLookAndFeel'; -export * from './icon'; -export * from './label'; -export * from './labelArray'; -export * from './labelCreate'; -export * from './labelCreateArray'; -export * from './labelDetails'; -export * from './labeledContent'; -export * from './labeledContentPageResponse'; -export * from './labeledContentType'; -export * from './lifecycle'; -export * from './longTask'; -export * from './longTaskStatus'; -export * from './longTaskStatusArray'; -export * from './longTaskStatusWithLinks'; -export * from './lookAndFeel'; -export * from './lookAndFeelSelection'; -export * from './lookAndFeelSettings'; -export * from './macroInstance'; -export * from './menusLookAndFeel'; -export * from './message'; -export * from './migratedUser'; -export * from './migratedUserArray'; -export * from './movePage'; -export * from './navigationLookAndFeel'; -export * from './operationCheckResult'; -export * from './permissionCheckResponse'; -export * from './permissionSubject'; -export * from './permissionSubjectWithGroupId'; -export * from './propertyValue'; -export * from './relation'; -export * from './relationArray'; -export * from './relationData'; -export * from './retentionPeriod'; -export * from './screenLookAndFeel'; -export * from './searchFieldLookAndFeel'; -export * from './searchPageResponseSearchResult'; -export * from './searchResult'; -export * from './space'; -export * from './spaceArray'; -export * from './spaceCreate'; -export * from './spaceDescription'; -export * from './spaceDescriptionCreate'; -export * from './spacePermission'; -export * from './spacePermissionCreate'; -export * from './spacePermissionCustomContent'; -export * from './spacePermissionRequest'; -export * from './spacePermissionV2'; -export * from './spacePrivateCreate'; -export * from './spaceProperty'; -export * from './spacePropertyArray'; -export * from './spacePropertyCreate'; -export * from './spacePropertyCreateNoKey'; -export * from './spacePropertyUpdate'; -export * from './spaceSettings'; -export * from './spaceSettingsUpdate'; -export * from './spaceUpdate'; -export * from './spaceWatch'; -export * from './spaceWatchArray'; -export * from './spaceWatchUser'; -export * from './superBatchWebResources'; -export * from './systemInfoEntity'; -export * from './task'; -export * from './taskPageResponse'; -export * from './taskStatusUpdate'; -export * from './theme'; -export * from './themeArray'; -export * from './themeNoLinks'; -export * from './themeUpdate'; -export * from './topNavigationLookAndFeel'; -export * from './user'; -export * from './userAnonymous'; -export * from './userArray'; -export * from './userProperty'; -export * from './userPropertyCreate'; -export * from './userPropertyKeyArray'; -export * from './userPropertyUpdate'; -export * from './usersUserKeys'; -export * from './userWatch'; -export * from './version'; -export * from './versionArray'; -export * from './versionRestore'; -export * from './watch'; -export * from './watchArray'; -export * from './watchUser'; -export * from './webResourceDependencies'; diff --git a/src/api/models/labelCreateArray.ts b/src/api/models/labelCreateArray.ts deleted file mode 100644 index 06821fa7..00000000 --- a/src/api/models/labelCreateArray.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { LabelCreate } from './labelCreate'; - -export type LabelCreateArray = LabelCreate[]; diff --git a/src/api/parameters/addGroupToContentRestriction.ts b/src/api/parameters/addGroupToContentRestriction.ts deleted file mode 100644 index 313b8df0..00000000 --- a/src/api/parameters/addGroupToContentRestriction.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface AddGroupToContentRestriction { - /** The ID of the content that the restriction applies to. */ - id: string; - /** The operation that the restriction applies to. */ - operationKey: string; - /** The name of the group to add to the content restriction. */ - groupName: string; -} diff --git a/src/api/parameters/createGroup.ts b/src/api/parameters/createGroup.ts deleted file mode 100644 index b0c7933e..00000000 --- a/src/api/parameters/createGroup.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { GroupName } from '../models'; - -export interface CreateGroup extends GroupName {} diff --git a/src/api/parameters/createSpace.ts b/src/api/parameters/createSpace.ts deleted file mode 100644 index 71a63ecc..00000000 --- a/src/api/parameters/createSpace.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { SpaceCreate } from '../models'; - -export interface CreateSpace extends SpaceCreate {} diff --git a/src/api/parameters/getBulkUserMigration.ts b/src/api/parameters/getBulkUserMigration.ts deleted file mode 100644 index a367ca3b..00000000 --- a/src/api/parameters/getBulkUserMigration.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface GetBulkUserMigration { - /** - * The key of a user. To specify multiple users, pass multiple key parameters separated by ampersands. For example, - * key=mia&key=alana. Required if username isn't provided. Cannot be provided if username is present. - */ - key: string[]; - /** - * The username of a user. To specify multiple users, pass multiple username parameters separated by ampersands. For - * example, username=mia&username=alana. Required if key isn't provided. Cannot be provided if key is present. - */ - username?: string[]; - /** The index of the first item to return in a page of results (page offset). */ - start?: number; - /** The maximum number of results to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/src/api/parameters/getContentRestrictionStatusForGroup.ts b/src/api/parameters/getContentRestrictionStatusForGroup.ts deleted file mode 100644 index 9d9c8d60..00000000 --- a/src/api/parameters/getContentRestrictionStatusForGroup.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface GetContentRestrictionStatusForGroup { - /** The ID of the content that the restriction applies to. */ - id: string; - /** The operation that the restriction applies to. */ - operationKey: string; - /** The name of the group to be queried for whether the content restriction applies to it. */ - groupName: string; -} diff --git a/src/api/parameters/getGroupByName.ts b/src/api/parameters/getGroupByName.ts deleted file mode 100644 index 99a9aaad..00000000 --- a/src/api/parameters/getGroupByName.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetGroupByName { - /** The name of the group. This is the same as the group name shown in the Confluence administration console. */ - groupName: string; -} diff --git a/src/api/parameters/getGroupByQueryParam.ts b/src/api/parameters/getGroupByQueryParam.ts deleted file mode 100644 index 069114bd..00000000 --- a/src/api/parameters/getGroupByQueryParam.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetGroupByQueryParam { - /** The name of the group. This is the same as the group name shown in the Confluence administration console. */ - name: string; -} diff --git a/src/api/parameters/getGroupMembers.ts b/src/api/parameters/getGroupMembers.ts deleted file mode 100644 index 3abf348f..00000000 --- a/src/api/parameters/getGroupMembers.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface GetGroupMembers { - /** The name of the group to be queried for its members. */ - groupName: string; - /** The starting index of the returned users. */ - start?: number; - /** The maximum number of users to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/src/api/parameters/getGroupMembershipsForUser.ts b/src/api/parameters/getGroupMembershipsForUser.ts deleted file mode 100644 index a38603a8..00000000 --- a/src/api/parameters/getGroupMembershipsForUser.ts +++ /dev/null @@ -1,25 +0,0 @@ -export interface GetGroupMembershipsForUser { - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - * - * @deprecated Will be removed in next major version. - */ - key?: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - * - * @deprecated Will be removed in next major version. - */ - username?: string; - /** - * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, - * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; - /** The starting index of the returned groups. */ - start?: number; - /** The maximum number of groups to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/src/api/parameters/getMembersByQueryParam.ts b/src/api/parameters/getMembersByQueryParam.ts deleted file mode 100644 index e737f0d6..00000000 --- a/src/api/parameters/getMembersByQueryParam.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface GetMembersByQueryParam { - /** The name of the group to be queried for its members. */ - name: string; - /** The starting index of the returned users. */ - start?: number; - /** - * The maximum number of users to return per page. Note, this is restricted by fixed system limit of 200 which is to - * say if the limit parameter exceeds 200, this API will return a maximum of 200 users per page. - */ - limit?: number; - /** - * Whether to include total size parameter in the results. Note, fetching total size property is an expensive - * operation; use it if your use case needs this value. - */ - shouldReturnTotalSize?: boolean; -} diff --git a/src/api/parameters/index.ts b/src/api/parameters/index.ts deleted file mode 100644 index 5e9a0d02..00000000 --- a/src/api/parameters/index.ts +++ /dev/null @@ -1,170 +0,0 @@ -export * from './addContentWatcher'; -export * from './addCustomContentPermissions'; -export * from './addGroupToContentRestriction'; -export * from './addGroupToContentRestrictionByGroupId'; -export * from './addLabelsToContent'; -export * from './addLabelsToSpace'; -export * from './addLabelWatcher'; -export * from './addPermissionToSpace'; -export * from './addRestrictions'; -export * from './addSpaceWatcher'; -export * from './addUserToContentRestriction'; -export * from './addUserToGroup'; -export * from './addUserToGroupByGroupId'; -export * from './archivePages'; -export * from './asyncConvertContentBodyRequest'; -export * from './asyncConvertContentBodyResponse'; -export * from './bulkAsyncConvertContentBodyRequest'; -export * from './bulkAsyncConvertContentBodyResponse'; -export * from './checkContentPermission'; -export * from './convertContentBody'; -export * from './copyPage'; -export * from './copyPageHierarchy'; -export * from './createAttachments'; -export * from './createAuditRecord'; -export * from './createContent'; -export * from './createContentProperty'; -export * from './createContentPropertyForKey'; -export * from './createContentTemplate'; -export * from './createGroup'; -export * from './createOrUpdateAttachments'; -export * from './createPrivateSpace'; -export * from './createRelationship'; -export * from './createSpace'; -export * from './createSpaceProperty'; -export * from './createSpacePropertyForKey'; -export * from './createUserProperty'; -export * from './deleteContent'; -export * from './deleteContentProperty'; -export * from './deleteContentVersion'; -export * from './deleteGroupById'; -export * from './deleteLabelFromSpace'; -export * from './deletePageTree'; -export * from './deleteRelationship'; -export * from './deleteRestrictions'; -export * from './deleteSpace'; -export * from './deleteSpaceProperty'; -export * from './deleteUserProperty'; -export * from './downloadAttachment'; -export * from './exportAuditRecords'; -export * from './findSourcesForTarget'; -export * from './findTargetFromSource'; -export * from './getAllLabelContent'; -export * from './getAndAsyncConvertMacroBodyByMacroId'; -export * from './getAndConvertMacroBodyByMacroId'; -export * from './getAnonymousUser'; -export * from './getAttachments'; -export * from './getAuditRecords'; -export * from './getAuditRecordsForTimePeriod'; -export * from './getAvailableContentStates'; -export * from './getBlueprintTemplates'; -export * from './getBulkUserLookup'; -export * from './getBulkUserMigration'; -export * from './getContent'; -export * from './getContentById'; -export * from './getContentByTypeForSpace'; -export * from './getContentChildren'; -export * from './getContentChildrenByType'; -export * from './getContentComments'; -export * from './getContentDescendants'; -export * from './getContentForSpace'; -export * from './getContentProperties'; -export * from './getContentProperty'; -export * from './getContentRestrictionStatusForGroup'; -export * from './getContentRestrictionStatusForUser'; -export * from './getContentState'; -export * from './getContentStateSettings'; -export * from './getContentsWithState'; -export * from './getContentTemplate'; -export * from './getContentTemplates'; -export * from './getContentVersion'; -export * from './getContentVersions'; -export * from './getContentWatchStatus'; -export * from './getCurrentUser'; -export * from './getDescendantsOfType'; -export * from './getGroupByGroupId'; -export * from './getGroupByName'; -export * from './getGroupByQueryParam'; -export * from './getGroupMembers'; -export * from './getGroupMembersByGroupId'; -export * from './getGroupMembershipsForUser'; -export * from './getGroups'; -export * from './getHistoryForContent'; -export * from './getIndividualGroupRestrictionStatusByGroupId'; -export * from './getLabelsForContent'; -export * from './getLabelsForSpace'; -export * from './getLookAndFeelSettings'; -export * from './getMacroBodyByMacroId'; -export * from './getMembersByQueryParam'; -export * from './getPrivacyUnsafeUserEmail'; -export * from './getPrivacyUnsafeUserEmailBulk'; -export * from './getRelationship'; -export * from './getRestrictions'; -export * from './getRestrictionsByOperation'; -export * from './getRestrictionsForOperation'; -export * from './getSpace'; -export * from './getSpaceContentStates'; -export * from './getSpaceProperties'; -export * from './getSpaceProperty'; -export * from './getSpaces'; -export * from './getSpaceSettings'; -export * from './getSpaceTheme'; -export * from './getTask'; -export * from './getTaskById'; -export * from './getTasks'; -export * from './getTheme'; -export * from './getThemes'; -export * from './getUser'; -export * from './getUserProperties'; -export * from './getUserProperty'; -export * from './getViewers'; -export * from './getViews'; -export * from './getWatchersForSpace'; -export * from './getWatchesForPage'; -export * from './getWatchesForSpace'; -export * from './isWatchingLabel'; -export * from './isWatchingSpace'; -export * from './movePage'; -export * from './publishLegacyDraft'; -export * from './publishSharedDraft'; -export * from './registerModules'; -export * from './removeContentState'; -export * from './removeContentWatcher'; -export * from './removeGroup'; -export * from './removeGroupById'; -export * from './removeGroupByName'; -export * from './removeLabelFromContent'; -export * from './removeLabelFromContentUsingQueryParameter'; -export * from './removeLabelWatcher'; -export * from './removeMemberFromGroup'; -export * from './removeMemberFromGroupByGroupId'; -export * from './removeModules'; -export * from './removePermission'; -export * from './removeSpaceWatch'; -export * from './removeTemplate'; -export * from './removeUserFromContentRestriction'; -export * from './resetLookAndFeelSettings'; -export * from './resetSpaceTheme'; -export * from './restoreContentVersion'; -export * from './searchByCQL'; -export * from './searchContentByCQL'; -export * from './searchGroups'; -export * from './searchTasks'; -export * from './searchUser'; -export * from './setContentState'; -export * from './setLookAndFeelSettings'; -export * from './setRetentionPeriod'; -export * from './setSpaceTheme'; -export * from './updateAttachmentData'; -export * from './updateAttachmentProperties'; -export * from './updateContent'; -export * from './updateContentProperty'; -export * from './updateContentTemplate'; -export * from './updateLookAndFeel'; -export * from './updateLookAndFeelSettings'; -export * from './updateRestrictions'; -export * from './updateSpace'; -export * from './updateSpaceProperty'; -export * from './updateSpaceSettings'; -export * from './updateTaskById'; -export * from './updateUserProperty'; diff --git a/src/api/parameters/registerModules.ts b/src/api/parameters/registerModules.ts deleted file mode 100644 index eab884dc..00000000 --- a/src/api/parameters/registerModules.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { ConnectModules } from '../models'; - -export type RegisterModules = ConnectModules; diff --git a/src/api/parameters/removeGroup.ts b/src/api/parameters/removeGroup.ts deleted file mode 100644 index 6b404364..00000000 --- a/src/api/parameters/removeGroup.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface RemoveGroup { - /** Name of the group to delete. */ - name: string; -} diff --git a/src/api/parameters/removeGroupByName.ts b/src/api/parameters/removeGroupByName.ts deleted file mode 100644 index afded5ae..00000000 --- a/src/api/parameters/removeGroupByName.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface RemoveGroupByName { - /** The ID of the content that the restriction applies to. */ - id: string; - /** - * The operation that the restriction applies to. - * - * @example - * 'read'; - * 'update'; - */ - operationKey: string; - /** The name of the group to remove from the content restriction. */ - groupName: string; -} diff --git a/src/api/parameters/setLookAndFeelSettings.ts b/src/api/parameters/setLookAndFeelSettings.ts deleted file mode 100644 index 6273053a..00000000 --- a/src/api/parameters/setLookAndFeelSettings.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface SetLookAndFeelSettings { - /** - * The key of the space for which the look and feel settings will be set. If this is not set, the global look and feel - * settings will be set. - */ - spaceKey?: string; -} diff --git a/src/clients/index.ts b/src/clients/index.ts deleted file mode 100644 index c538c529..00000000 --- a/src/clients/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './baseClient'; -export * from './client'; -export * from './confluenceClient'; diff --git a/src/index.ts b/src/index.ts deleted file mode 100644 index 8364c921..00000000 --- a/src/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -export * from './clients'; -export * from './config'; -export * from './requestConfig'; -export * from './callback'; -export * from './pagination'; -export * from './services'; -export * from './interfaces'; - -export * as Api from './api'; -export * as Models from './api/models'; -export * as Parameters from './api/parameters'; diff --git a/src/interfaces/index.ts b/src/interfaces/index.ts deleted file mode 100644 index 02758423..00000000 --- a/src/interfaces/index.ts +++ /dev/null @@ -1,2 +0,0 @@ -export * from './extractBaseType'; -export * from './oneOrMany'; diff --git a/src/services/authenticationService/authentications/index.ts b/src/services/authenticationService/authentications/index.ts deleted file mode 100644 index 4354127b..00000000 --- a/src/services/authenticationService/authentications/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './createBasicAuthenticationToken'; -export * from './createJWTAuthentication'; -export * from './createOAuth2AuthenticationToken'; diff --git a/src/services/authenticationService/index.ts b/src/services/authenticationService/index.ts deleted file mode 100644 index 920abd06..00000000 --- a/src/services/authenticationService/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './authenticationService'; diff --git a/src/services/index.ts b/src/services/index.ts deleted file mode 100644 index 920abd06..00000000 --- a/src/services/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './authenticationService'; diff --git a/tests/tsconfig.json b/tests/tsconfig.json deleted file mode 100644 index 8a54666e..00000000 --- a/tests/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../tsconfig.json", - "compilerOptions": { - "baseUrl": ".", - "outDir": "./dist", - "noEmit": true, - "paths": { - "~/*": ["../src/*"], - } - }, - "include": ["integration", "unit"] -} diff --git a/tsconfig.base.json b/tsconfig.base.json new file mode 100644 index 00000000..93bf4262 --- /dev/null +++ b/tsconfig.base.json @@ -0,0 +1,15 @@ +{ + "compilerOptions": { + "target": "ES2022", + "module": "ESNext", + "moduleResolution": "bundler", + "strict": true, + "declaration": true, + "declarationMap": true, + "verbatimModuleSyntax": true, + "forceConsistentCasingInFileNames": true, + "stripInternal": true, + "lib": ["ES2022", "DOM"], + "types": ["node"] + } +} diff --git a/tsconfig.json b/tsconfig.json index 0c8ea0e8..5d81df6b 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,21 +1,8 @@ { + "extends": "./tsconfig.base.json", "compilerOptions": { - "target": "ES2022", - "outDir": "dist", - "module": "ESNext", - "moduleResolution": "bundler", - "strict": true, - "declaration": true, - "forceConsistentCasingInFileNames": true, - "baseUrl": "./", - "paths": { - "~": ["src"], - "~/*": ["src/*"] - } + "noEmit": true }, - "include": ["src", "rollup.config.ts"], - "exclude": [ - "node_modules", - "dist", - ] + "include": ["vitestShared.ts", "vitest.config.ts", "eslint.config.ts"], + "exclude": ["node_modules", "coverage", "docs", "dist", "packages"] } diff --git a/vitest.config.mts b/vitest.config.mts deleted file mode 100644 index 0a979ec5..00000000 --- a/vitest.config.mts +++ /dev/null @@ -1,17 +0,0 @@ -import { defineConfig } from 'vitest/config'; - -export default defineConfig({ - test: { - typecheck: { - enabled: true, - tsconfig: 'tsconfig.lint.json', - }, - setupFiles: ['dotenv/config'], - }, - resolve: { - alias: { - '~': new URL('./src', import.meta.url).pathname, - '@tests': new URL('./tests', import.meta.url).pathname, - }, - }, -}); diff --git a/vitest.config.ts b/vitest.config.ts new file mode 100644 index 00000000..b1dd6174 --- /dev/null +++ b/vitest.config.ts @@ -0,0 +1,25 @@ +import { dirname } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { loadEnv } from 'vite'; +import { defineConfig } from 'vitest/config'; +import { vitestShared } from './vitestShared'; + +const repoRoot = dirname(fileURLToPath(import.meta.url)); + +const TEST_PACKAGES_IN_ORDER = ['legacy', 'cloud'] as const; + +export default defineConfig(({ mode }) => { + const env = loadEnv(mode, repoRoot, ''); + + return { + test: { + ...vitestShared.test, + env, + maxWorkers: 1, + minWorkers: 1, + projects: TEST_PACKAGES_IN_ORDER.map( + pkg => `./packages/${pkg}/vitest.config.ts`, + ), + }, + }; +}); diff --git a/vitestShared.ts b/vitestShared.ts new file mode 100644 index 00000000..0e451ab1 --- /dev/null +++ b/vitestShared.ts @@ -0,0 +1,25 @@ +export const vitestShared = { + test: { + environment: 'node' as const, + coverage: { + provider: 'v8' as const, + reporter: ['text', 'json-summary', 'lcov'], + reportsDirectory: './coverage', + reportOnFailure: true, + all: true, + include: ['packages/*/src/**/*.ts'], + exclude: [ + '**/node_modules/**', + '**/dist/**', + '**/*.d.ts', + '**/tests/**', + '**/*.config.*', + // Generated Zod schema/type containers — pure declarations, no runtime branching. + '**/models/**', + '**/parameters/**', + // Barrel re-exports — zero logic. + '**/index.ts', + ], + }, + }, +}; From 9996c891bc95fe583742b0bab84878e88a54551c Mon Sep 17 00:00:00 2001 From: Vladislav Tupikin Date: Fri, 17 Jul 2026 02:07:04 +0300 Subject: [PATCH 02/37] feat!: single confluence.js package with both API versions on one core MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Dissolves the monorepo into one publishable package, as trello.js and the 2.x release already were. `packages/{core,cloud,legacy}` were all private, so the release workflow could not publish anything at all. Layout: src/core (transport), src/v1, src/v2. Entry points are symmetric — `createV1Client` / `createV2Client` from the root, and `confluence.js/v1`, `confluence.js/v2`, `confluence.js/core` for the flat, tree-shakable functions. Neither version is second-class: Atlassian has not deprecated v1. The old class-based v1 (axios, callbacks, zod 3) is replaced by a v1 built the same way as v2. axios, form-data, oauth and atlassian-jwt go with it — zod is now the only runtime dependency. The API path (/wiki/api/v2, /wiki/rest/api) moves into each request URL, so `host` is the bare site URL as it was in 2.x, and one client drives both versions. This retires the replace:wiki-rest hack. BREAKING CHANGE: class clients become factories, `authentication` becomes `auth`, JWT/middlewares/apiPrefix/callbacks are gone, and the v1 surface now follows Atlassian's current spec. --- .gitignore | 8 +- package.json | 111 +- packages/cloud/package.json | 37 - packages/cloud/src/api/index.ts | 59 - packages/cloud/src/index.ts | 11 - packages/cloud/src/models/blogPost.ts | 58 - .../cloud/src/models/blogPostInlineComment.ts | 25 - packages/cloud/src/models/body.ts | 12 - .../cloud/src/models/customContentBody.ts | 13 - packages/cloud/src/models/footerComment.ts | 54 - packages/cloud/src/models/index.ts | 455 --- .../cloud/src/models/inlineCommentChildren.ts | 25 - packages/cloud/src/models/page.ts | 68 - packages/cloud/src/models/pageComment.ts | 21 - .../cloud/src/models/pageInlineComment.ts | 25 - packages/cloud/src/models/space.ts | 57 - packages/cloud/src/parameters/index.ts | 423 -- .../cloud/tests/integration/setup/client.ts | 88 - packages/cloud/tests/tsconfig.json | 13 - packages/cloud/tsconfig.json | 12 - packages/cloud/vite.config.ts | 38 - packages/cloud/vitest.config.ts | 34 - packages/core/package.json | 31 - packages/core/tsconfig.json | 9 - packages/core/vite.config.ts | 33 - packages/legacy/package.json | 43 - packages/legacy/src/api/analytics.ts | 44 - packages/legacy/src/api/audit.ts | 241 -- packages/legacy/src/api/content.ts | 467 --- packages/legacy/src/api/contentAttachments.ts | 286 -- packages/legacy/src/api/contentBody.ts | 274 -- .../src/api/contentChildrenAndDescendants.ts | 401 -- packages/legacy/src/api/contentComments.ts | 54 - packages/legacy/src/api/contentLabels.ts | 178 - packages/legacy/src/api/contentMacroBody.ts | 254 -- packages/legacy/src/api/contentPermissions.ts | 61 - packages/legacy/src/api/contentProperties.ts | 274 -- .../legacy/src/api/contentRestrictions.ts | 444 --- packages/legacy/src/api/contentStates.ts | 294 -- packages/legacy/src/api/contentVersions.ts | 154 - packages/legacy/src/api/contentWatches.ts | 501 --- packages/legacy/src/api/dynamicModules.ts | 83 - packages/legacy/src/api/experimental.ts | 145 - packages/legacy/src/api/group.ts | 321 -- packages/legacy/src/api/index.ts | 63 - packages/legacy/src/api/inlineTasks.ts | 119 - packages/legacy/src/api/labelInfo.ts | 47 - packages/legacy/src/api/longRunningTask.ts | 76 - packages/legacy/src/api/models/accountId.ts | 3 - .../src/api/models/accountIdEmailRecord.ts | 4 - .../api/models/accountIdEmailRecordArray.ts | 3 - .../src/api/models/addContentRestriction.ts | 45 - .../addContentRestrictionUpdateArray.ts | 3 - .../legacy/src/api/models/affectedObject.ts | 4 - .../legacy/src/api/models/appDescriptor.ts | 87 - .../legacy/src/api/models/asyncContentBody.ts | 31 - packages/legacy/src/api/models/asyncId.ts | 3 - packages/legacy/src/api/models/attachment.ts | 33 - .../src/api/models/attachmentContainer.ts | 29 - .../src/api/models/attachmentMetadata.ts | 21 - packages/legacy/src/api/models/auditRecord.ts | 20 - .../legacy/src/api/models/auditRecordArray.ts | 10 - .../src/api/models/availableContentStates.ts | 7 - .../src/api/models/blueprintTemplate.ts | 21 - .../src/api/models/blueprintTemplateArray.ts | 10 - packages/legacy/src/api/models/breadcrumb.ts | 5 - .../legacy/src/api/models/bulkUserLookup.ts | 40 - .../src/api/models/bulkUserLookupArray.ts | 10 - .../src/api/models/buttonLookAndFeel.ts | 4 - .../legacy/src/api/models/changedValue.ts | 5 - .../legacy/src/api/models/connectModules.ts | 7 - packages/legacy/src/api/models/container.ts | 6 - .../src/api/models/containerLookAndFeel.ts | 8 - .../legacy/src/api/models/containerSummary.ts | 4 - packages/legacy/src/api/models/content.ts | 66 - .../legacy/src/api/models/contentArray.ts | 10 - packages/legacy/src/api/models/contentBody.ts | 12 - .../src/api/models/contentBodyCreate.ts | 9 - .../api/models/contentBodyCreateStorage.ts | 7 - .../legacy/src/api/models/contentChildType.ts | 26 - .../legacy/src/api/models/contentChildren.ts | 14 - .../legacy/src/api/models/contentCreate.ts | 61 - .../legacy/src/api/models/contentHistory.ts | 23 - .../src/api/models/contentLookAndFeel.ts | 9 - .../api/models/contentPermissionRequest.ts | 8 - .../legacy/src/api/models/contentProperty.ts | 17 - .../src/api/models/contentPropertyArray.ts | 10 - .../src/api/models/contentPropertyCreate.ts | 7 - .../api/models/contentPropertyCreateNoKey.ts | 5 - .../src/api/models/contentPropertyUpdate.ts | 14 - .../src/api/models/contentRestriction.ts | 22 - .../src/api/models/contentRestrictionArray.ts | 12 - .../api/models/contentRestrictionUpdate.ts | 45 - .../models/contentRestrictionUpdateArray.ts | 3 - .../legacy/src/api/models/contentState.ts | 8 - .../src/api/models/contentStateResponse.ts | 8 - .../src/api/models/contentStateSettings.ts | 12 - .../legacy/src/api/models/contentTemplate.ts | 16 - .../src/api/models/contentTemplateArray.ts | 10 - .../api/models/contentTemplateBodyCreate.ts | 6 - .../src/api/models/contentTemplateCreate.ts | 22 - .../src/api/models/contentTemplateUpdate.ts | 24 - .../legacy/src/api/models/contentUpdate.ts | 45 - .../api/models/copyPageHierarchyRequest.ts | 18 - .../models/copyPageHierarchyTitleOptions.ts | 6 - .../legacy/src/api/models/copyPageRequest.ts | 23 - .../api/models/copyPageRequestDestination.ts | 12 - .../src/api/models/createdAttachment.ts | 8 - packages/legacy/src/api/models/embeddable.ts | 2 - .../legacy/src/api/models/embeddedContent.ts | 6 - .../legacy/src/api/models/genericLinks.ts | 11 - .../api/models/getRestrictionsByOperation.ts | 5 - packages/legacy/src/api/models/getViewers.ts | 6 - packages/legacy/src/api/models/getViews.ts | 6 - packages/legacy/src/api/models/group.ts | 8 - packages/legacy/src/api/models/groupArray.ts | 8 - .../src/api/models/groupArrayWithLinks.ts | 7 - packages/legacy/src/api/models/groupCreate.ts | 4 - packages/legacy/src/api/models/groupName.ts | 3 - .../src/api/models/headerLookAndFeel.ts | 11 - .../api/models/horizontalHeaderLookAndFeel.ts | 12 - packages/legacy/src/api/models/icon.ts | 10 - packages/legacy/src/api/models/index.ts | 321 -- packages/legacy/src/api/models/label.ts | 6 - packages/legacy/src/api/models/labelArray.ts | 10 - packages/legacy/src/api/models/labelCreate.ts | 6 - .../legacy/src/api/models/labelCreateArray.ts | 3 - .../legacy/src/api/models/labelDetails.ts | 7 - .../legacy/src/api/models/labeledContent.ts | 8 - .../api/models/labeledContentPageResponse.ts | 8 - .../src/api/models/labeledContentType.ts | 6 - packages/legacy/src/api/models/lifecycle.ts | 66 - packages/legacy/src/api/models/longTask.ts | 8 - .../legacy/src/api/models/longTaskStatus.ts | 40 - .../src/api/models/longTaskStatusArray.ts | 10 - .../src/api/models/longTaskStatusWithLinks.ts | 7 - packages/legacy/src/api/models/lookAndFeel.ts | 21 - .../src/api/models/lookAndFeelSelection.ts | 6 - .../src/api/models/lookAndFeelSettings.ts | 8 - .../legacy/src/api/models/macroInstance.ts | 8 - .../legacy/src/api/models/menusLookAndFeel.ts | 6 - packages/legacy/src/api/models/message.ts | 5 - .../legacy/src/api/models/migratedUser.ts | 5 - .../src/api/models/migratedUserArray.ts | 10 - packages/legacy/src/api/models/movePage.ts | 3 - .../src/api/models/navigationLookAndFeel.ts | 7 - .../src/api/models/operationCheckResult.ts | 7 - .../src/api/models/permissionCheckResponse.ts | 19 - .../src/api/models/permissionSubject.ts | 10 - .../models/permissionSubjectWithGroupId.ts | 10 - .../legacy/src/api/models/propertyValue.ts | 11 - packages/legacy/src/api/models/relation.ts | 15 - .../legacy/src/api/models/relationArray.ts | 10 - .../legacy/src/api/models/relationData.ts | 7 - .../legacy/src/api/models/retentionPeriod.ts | 6 - .../src/api/models/screenLookAndFeel.ts | 10 - .../src/api/models/searchFieldLookAndFeel.ts | 4 - .../models/searchPageResponseSearchResult.ts | 13 - .../legacy/src/api/models/searchResult.ts | 17 - packages/legacy/src/api/models/space.ts | 48 - packages/legacy/src/api/models/spaceArray.ts | 10 - .../legacy/src/api/models/spaceDescription.ts | 5 - .../src/api/models/spaceDescriptionCreate.ts | 12 - .../legacy/src/api/models/spacePermission.ts | 38 - .../src/api/models/spacePermissionCreate.ts | 34 - .../models/spacePermissionCustomContent.ts | 17 - .../src/api/models/spacePermissionRequest.ts | 42 - .../src/api/models/spacePermissionV2.ts | 27 - .../src/api/models/spacePrivateCreate.ts | 28 - .../legacy/src/api/models/spaceProperty.ts | 18 - .../src/api/models/spacePropertyArray.ts | 10 - .../src/api/models/spacePropertyCreate.ts | 11 - .../api/models/spacePropertyCreateNoKey.ts | 5 - .../src/api/models/spacePropertyUpdate.ts | 15 - .../legacy/src/api/models/spaceSettings.ts | 12 - .../src/api/models/spaceSettingsUpdate.ts | 9 - packages/legacy/src/api/models/spaceUpdate.ts | 16 - packages/legacy/src/api/models/spaceWatch.ts | 8 - .../legacy/src/api/models/spaceWatchArray.ts | 10 - .../legacy/src/api/models/spaceWatchUser.ts | 31 - .../src/api/models/superBatchWebResources.ts | 14 - .../legacy/src/api/models/systemInfoEntity.ts | 8 - packages/legacy/src/api/models/task.ts | 16 - .../legacy/src/api/models/taskPageResponse.ts | 8 - .../legacy/src/api/models/taskStatusUpdate.ts | 3 - packages/legacy/src/api/models/theme.ts | 6 - packages/legacy/src/api/models/themeArray.ts | 10 - .../legacy/src/api/models/themeNoLinks.ts | 9 - packages/legacy/src/api/models/themeUpdate.ts | 4 - .../api/models/topNavigationLookAndFeel.ts | 8 - packages/legacy/src/api/models/user.ts | 40 - .../legacy/src/api/models/userAnonymous.ts | 14 - packages/legacy/src/api/models/userArray.ts | 8 - .../legacy/src/api/models/userProperty.ts | 14 - .../src/api/models/userPropertyCreate.ts | 4 - .../src/api/models/userPropertyKeyArray.ts | 11 - .../src/api/models/userPropertyUpdate.ts | 4 - packages/legacy/src/api/models/userWatch.ts | 3 - .../legacy/src/api/models/usersUserKeys.ts | 8 - packages/legacy/src/api/models/version.ts | 20 - .../legacy/src/api/models/versionArray.ts | 10 - .../legacy/src/api/models/versionRestore.ts | 10 - packages/legacy/src/api/models/watch.ts | 7 - packages/legacy/src/api/models/watchArray.ts | 10 - packages/legacy/src/api/models/watchUser.ts | 28 - .../src/api/models/webResourceDependencies.ts | 18 - .../src/api/parameters/addContentWatcher.ts | 19 - .../parameters/addCustomContentPermissions.ts | 6 - .../addGroupToContentRestrictionByGroupId.ts | 8 - .../src/api/parameters/addLabelWatcher.ts | 21 - .../src/api/parameters/addLabelsToContent.ts | 17 - .../src/api/parameters/addLabelsToSpace.ts | 4 - .../api/parameters/addPermissionToSpace.ts | 6 - .../src/api/parameters/addRestrictions.ts | 15 - .../src/api/parameters/addSpaceWatcher.ts | 21 - .../parameters/addUserToContentRestriction.ts | 21 - .../src/api/parameters/addUserToGroup.ts | 6 - .../api/parameters/addUserToGroupByGroupId.ts | 6 - .../legacy/src/api/parameters/archivePages.ts | 6 - .../asyncConvertContentBodyRequest.ts | 81 - .../asyncConvertContentBodyResponse.ts | 4 - .../bulkAsyncConvertContentBodyRequest.ts | 88 - .../bulkAsyncConvertContentBodyResponse.ts | 4 - .../api/parameters/checkContentPermission.ts | 6 - .../src/api/parameters/convertContentBody.ts | 59 - .../legacy/src/api/parameters/copyPage.ts | 9 - .../src/api/parameters/copyPageHierarchy.ts | 5 - .../src/api/parameters/createAttachments.ts | 16 - .../src/api/parameters/createAuditRecord.ts | 3 - .../src/api/parameters/createContent.ts | 42 - .../api/parameters/createContentProperty.ts | 6 - .../parameters/createContentPropertyForKey.ts | 8 - .../api/parameters/createContentTemplate.ts | 3 - .../legacy/src/api/parameters/createGroup.ts | 3 - .../parameters/createOrUpdateAttachments.ts | 11 - .../src/api/parameters/createPrivateSpace.ts | 3 - .../src/api/parameters/createRelationship.ts | 44 - .../legacy/src/api/parameters/createSpace.ts | 3 - .../src/api/parameters/createSpaceProperty.ts | 6 - .../parameters/createSpacePropertyForKey.ts | 8 - .../src/api/parameters/createUserProperty.ts | 11 - .../src/api/parameters/deleteContent.ts | 6 - .../api/parameters/deleteContentProperty.ts | 6 - .../api/parameters/deleteContentVersion.ts | 6 - .../src/api/parameters/deleteGroupById.ts | 4 - .../api/parameters/deleteLabelFromSpace.ts | 8 - .../src/api/parameters/deletePageTree.ts | 4 - .../src/api/parameters/deleteRelationship.ts | 41 - .../legacy/src/api/parameters/deleteSpace.ts | 4 - .../src/api/parameters/deleteSpaceProperty.ts | 6 - .../src/api/parameters/deleteUserProperty.ts | 9 - .../src/api/parameters/downloadAttachment.ts | 17 - .../src/api/parameters/exportAuditRecords.ts | 16 - .../src/api/parameters/getAllLabelContent.ts | 10 - .../getAndAsyncConvertMacroBodyByMacroId.ts | 88 - .../getAndConvertMacroBodyByMacroId.ts | 104 - .../src/api/parameters/getAnonymousUser.ts | 8 - .../src/api/parameters/getAttachments.ts | 50 - .../src/api/parameters/getAuditRecords.ts | 18 - .../getAuditRecordsForTimePeriod.ts | 12 - .../parameters/getAvailableContentStates.ts | 4 - .../src/api/parameters/getBulkUserLookup.ts | 16 - .../legacy/src/api/parameters/getContent.ts | 69 - .../src/api/parameters/getContentById.ts | 63 - .../parameters/getContentByTypeForSpace.ts | 14 - .../src/api/parameters/getContentChildren.ts | 21 - .../parameters/getContentChildrenByType.ts | 14 - .../src/api/parameters/getContentComments.ts | 19 - .../api/parameters/getContentDescendants.ts | 12 - .../src/api/parameters/getContentForSpace.ts | 12 - .../api/parameters/getContentProperties.ts | 19 - .../src/api/parameters/getContentProperty.ts | 27 - .../getContentRestrictionStatusForUser.ts | 21 - .../src/api/parameters/getContentState.ts | 6 - .../api/parameters/getContentStateSettings.ts | 4 - .../src/api/parameters/getContentTemplate.ts | 4 - .../src/api/parameters/getContentVersion.ts | 14 - .../src/api/parameters/getContentVersions.ts | 16 - .../api/parameters/getContentWatchStatus.ts | 19 - .../src/api/parameters/getCurrentUser.ts | 10 - .../api/parameters/getDescendantsOfType.ts | 52 - .../src/api/parameters/getGroupByGroupId.ts | 4 - .../parameters/getGroupMembershipsForUser.ts | 11 - .../legacy/src/api/parameters/getGroups.ts | 8 - .../api/parameters/getHistoryForContent.ts | 16 - ...dividualGroupRestrictionStatusByGroupId.ts | 8 - .../src/api/parameters/getLabelsForContent.ts | 19 - .../src/api/parameters/getLabelsForSpace.ts | 18 - .../api/parameters/getLookAndFeelSettings.ts | 7 - .../api/parameters/getMacroBodyByMacroId.ts | 12 - .../parameters/getPrivacyUnsafeUserEmail.ts | 7 - .../getPrivacyUnsafeUserEmailBulk.ts | 4 - .../src/api/parameters/getRelationship.ts | 61 - .../legacy/src/api/parameters/getSpace.ts | 6 - .../api/parameters/getSpaceContentStates.ts | 4 - .../src/api/parameters/getSpaceProperties.ts | 16 - .../src/api/parameters/getSpaceProperty.ts | 14 - .../src/api/parameters/getSpaceSettings.ts | 4 - .../src/api/parameters/getSpaceTheme.ts | 4 - .../legacy/src/api/parameters/getSpaces.ts | 66 - packages/legacy/src/api/parameters/getTask.ts | 4 - .../legacy/src/api/parameters/getTaskById.ts | 4 - .../legacy/src/api/parameters/getTasks.ts | 8 - .../legacy/src/api/parameters/getTheme.ts | 4 - .../legacy/src/api/parameters/getThemes.ts | 6 - packages/legacy/src/api/parameters/getUser.ts | 31 - .../src/api/parameters/getUserProperty.ts | 6 - .../legacy/src/api/parameters/getViewers.ts | 6 - .../legacy/src/api/parameters/getViews.ts | 6 - .../src/api/parameters/getWatchersForSpace.ts | 8 - .../src/api/parameters/getWatchesForPage.ts | 8 - .../src/api/parameters/getWatchesForSpace.ts | 8 - packages/legacy/src/api/parameters/index.ts | 319 -- .../src/api/parameters/isWatchingLabel.ts | 19 - .../src/api/parameters/isWatchingSpace.ts | 19 - .../src/api/parameters/publishLegacyDraft.ts | 17 - .../src/api/parameters/publishSharedDraft.ts | 17 - .../src/api/parameters/registerModules.ts | 3 - .../src/api/parameters/removeContentState.ts | 6 - .../api/parameters/removeContentWatcher.ts | 21 - .../src/api/parameters/removeGroupById.ts | 14 - .../api/parameters/removeLabelFromContent.ts | 6 - ...moveLabelFromContentUsingQueryParameter.ts | 6 - .../src/api/parameters/removeLabelWatcher.ts | 19 - .../api/parameters/removeMemberFromGroup.ts | 6 - .../removeMemberFromGroupByGroupId.ts | 6 - .../src/api/parameters/removePermission.ts | 6 - .../src/api/parameters/removeSpaceWatch.ts | 19 - .../src/api/parameters/removeTemplate.ts | 4 - .../removeUserFromContentRestriction.ts | 21 - .../parameters/resetLookAndFeelSettings.ts | 7 - .../src/api/parameters/resetSpaceTheme.ts | 4 - .../api/parameters/restoreContentVersion.ts | 14 - .../src/api/parameters/searchContentByCQL.ts | 19 - .../legacy/src/api/parameters/searchTasks.ts | 30 - .../src/api/parameters/setContentState.ts | 11 - .../src/api/parameters/setRetentionPeriod.ts | 3 - .../src/api/parameters/setSpaceTheme.ts | 6 - .../api/parameters/updateAttachmentData.ts | 12 - .../parameters/updateAttachmentProperties.ts | 58 - .../src/api/parameters/updateContent.ts | 21 - .../api/parameters/updateContentProperty.ts | 8 - .../api/parameters/updateContentTemplate.ts | 4 - .../src/api/parameters/updateLookAndFeel.ts | 3 - .../parameters/updateLookAndFeelSettings.ts | 9 - .../src/api/parameters/updateRestrictions.ts | 15 - .../legacy/src/api/parameters/updateSpace.ts | 6 - .../src/api/parameters/updateSpaceProperty.ts | 8 - .../src/api/parameters/updateSpaceSettings.ts | 6 - .../src/api/parameters/updateTaskById.ts | 6 - .../src/api/parameters/updateUserProperty.ts | 11 - packages/legacy/src/api/relation.ts | 237 -- packages/legacy/src/api/search.ts | 112 - packages/legacy/src/api/settings.ts | 200 - packages/legacy/src/api/space.ts | 301 -- packages/legacy/src/api/spacePermissions.ts | 121 - packages/legacy/src/api/spaceProperties.ts | 230 -- packages/legacy/src/api/spaceSettings.ts | 72 - packages/legacy/src/api/template.ts | 255 -- packages/legacy/src/api/themes.ts | 155 - packages/legacy/src/api/userProperties.ts | 185 - packages/legacy/src/api/users.ts | 275 -- packages/legacy/src/callback.ts | 3 - packages/legacy/src/clients/baseClient.ts | 136 - packages/legacy/src/clients/client.ts | 7 - .../legacy/src/clients/confluenceClient.ts | 82 - packages/legacy/src/clients/index.ts | 5 - packages/legacy/src/config.ts | 80 - packages/legacy/src/index.ts | 19 - .../legacy/src/interfaces/extractBaseType.ts | 1 - packages/legacy/src/interfaces/index.ts | 3 - packages/legacy/src/interfaces/oneOrMany.ts | 1 - packages/legacy/src/pagination.ts | 8 - packages/legacy/src/paramSerializer.ts | 15 - packages/legacy/src/requestConfig.ts | 3 - .../authenticationService.ts | 33 - .../createBasicAuthenticationToken.ts | 8 - .../createJWTAuthentication.ts | 27 - .../createOAuth2AuthenticationToken.ts | 5 - .../authentications/index.ts | 5 - .../authenticationService/base64Encoder.ts | 69 - .../services/authenticationService/index.ts | 1 - packages/legacy/src/services/index.ts | 1 - packages/legacy/tests/integration/e2e.test.ts | 177 - packages/legacy/tests/tsconfig.json | 12 - .../legacy/tests/unit/api/contentBody.test.ts | 97 - .../api/contentChildrenAndDescendants.test.ts | 55 - packages/legacy/tests/unit/api/group.test.ts | 266 -- .../tests/unit/clients/baseClient.test.ts | 35 - .../unit/clients/confluenceClient.test.ts | 31 - packages/legacy/tests/unit/index.test.ts | 54 - packages/legacy/tsconfig.json | 9 - packages/legacy/vite.config.ts | 33 - packages/legacy/vitest.config.ts | 27 - pnpm-lock.yaml | 3450 +++++++++++++---- pnpm-workspace.yaml | 3 - {packages/core/src => src/core}/apiError.ts | 0 {packages/core/src => src/core}/apiObject.ts | 0 .../core/src => src/core}/bodyToFetchBody.ts | 0 .../core/src => src/core}/createClient.ts | 0 .../core}/formData/attachmentInput.ts | 0 .../src => src/core}/formData/bufferSchema.ts | 0 .../core/src => src/core}/formData/index.ts | 0 .../core}/formData/multipartRequest.ts | 0 {packages/core/src => src/core}/index.ts | 0 .../src => src/core}/interfaces/client.ts | 0 .../core/src => src/core}/interfaces/index.ts | 0 .../core}/oauth/buildAtlassianAuthUrl.ts | 0 .../core/src => src/core}/oauth/index.ts | 0 .../core}/oauth/obtainAtlassianOAuthTokens.ts | 0 .../core}/oauth/parseAtlassianCallbackUrl.ts | 0 .../oauth/refreshAtlassianOAuthTokens.ts | 0 .../core/src => src/core}/schemas/auth.ts | 0 .../src => src/core}/schemas/clientConfig.ts | 0 .../src => src/core}/schemas/httpMethod.ts | 0 .../core/src => src/core}/schemas/index.ts | 0 .../core}/schemas/sendRequestOptions.ts | 0 .../core/src => src/core}/sendRequest.ts | 0 .../src => src/core}/serializeSearchParams.ts | 0 {packages/core/src => src/core}/withRetry.ts | 0 src/index.ts | 34 + src/v1/api/analytics.ts | 33 + src/v1/api/audit.ts | 145 + src/v1/api/content.ts | 153 + src/v1/api/contentAttachments.ts | 195 + src/v1/api/contentBody.ts | 131 + src/v1/api/contentChildrenAndDescendants.ts | 184 + src/v1/api/contentLabels.ts | 72 + src/v1/api/contentMacroBody.ts | 138 + src/v1/api/contentPermissions.ts | 34 + src/v1/api/contentRestrictions.ts | 278 ++ src/v1/api/contentStates.ts | 182 + src/v1/api/contentVersions.ts | 42 + src/v1/api/contentWatches.ts | 319 ++ src/v1/api/dynamicModules.ts | 50 + src/v1/api/experimental.ts | 93 + src/v1/api/group.ts | 174 + src/v1/api/index.ts | 55 + src/v1/api/labelInfo.ts | 25 + src/v1/api/longRunningTask.ts | 44 + src/v1/api/relation.ts | 142 + src/v1/api/search.ts | 107 + src/v1/api/settings.ts | 125 + src/v1/api/space.ts | 95 + src/v1/api/spacePermissions.ts | 74 + src/v1/api/spaceSettings.ts | 38 + src/v1/api/template.ts | 164 + src/v1/api/themes.ts | 106 + src/v1/api/userProperties.ts | 107 + src/v1/api/users.ts | 174 + src/v1/createV1Client.ts | 510 +++ src/v1/index.ts | 5 + src/v1/models/accountId.ts | 8 + src/v1/models/accountIdEmailRecord.ts | 9 + src/v1/models/accountIdEmailRecordArray.ts | 6 + src/v1/models/addContentRestriction.ts | 47 + .../addContentRestrictionUpdateArray.ts | 6 + src/v1/models/affectedObject.ts | 9 + src/v1/models/asyncContentBody.ts | 47 + src/v1/models/asyncContentBodyArray.ts | 6 + src/v1/models/asyncId.ts | 8 + src/v1/models/asyncIdArray.ts | 6 + .../models/attachmentPropertiesUpdateBody.ts | 20 + src/v1/models/attachmentUpdate.ts | 34 + src/v1/models/auditRecord.ts | 41 + src/v1/models/auditRecordArray.ts | 14 + .../v1}/models/auditRecordCreate.ts | 45 +- src/v1/models/availableContentStates.ts | 21 + src/v1/models/blueprintTemplate.ts | 27 + src/v1/models/blueprintTemplateArray.ts | 14 + src/v1/models/breadcrumb.ts | 10 + .../models/bulkContentBodyConversionInput.ts | 9 + src/v1/models/bulkUserLookup.ts | 43 + src/v1/models/bulkUserLookupArray.ts | 14 + src/v1/models/buttonLookAndFeel.ts | 9 + .../models/cQLPersonalDataConvertedQueries.ts | 10 + .../models/cQLPersonalDataMigrationRequest.ts | 10 + src/v1/models/changedValue.ts | 12 + src/v1/models/connectModule.ts | 10 + src/v1/models/connectModules.ts | 13 + src/v1/models/container.ts | 10 + src/v1/models/containerLookAndFeel.ts | 19 + src/v1/models/containerSummary.ts | 9 + src/v1/models/content.ts | 161 + src/v1/models/contentArray.ts | 20 + src/v1/models/contentBlogpost.ts | 7 + .../v1}/models/contentBlueprintDraft.ts | 39 +- src/v1/models/contentBody.ts | 39 + src/v1/models/contentBodyConversionInput.ts | 68 + src/v1/models/contentBodyCreate.ts | 24 + src/v1/models/contentBodyCreateStorage.ts | 22 + src/v1/models/contentChildType.ts | 34 + src/v1/models/contentChildren.ts | 44 + src/v1/models/contentCreate.ts | 107 + src/v1/models/contentHistory.ts | 52 + src/v1/models/contentId.ts | 5 + src/v1/models/contentLookAndFeel.ts | 13 + src/v1/models/contentMetadata.ts | 71 + src/v1/models/contentPageResponse.ts | 12 + src/v1/models/contentPermissionRequest.ts | 12 + src/v1/models/contentProperty.ts | 25 + src/v1/models/contentPropertyArray.ts | 14 + src/v1/models/contentPropertyCreate.ts | 11 + src/v1/models/contentPropertyCreateNoKey.ts | 9 + src/v1/models/contentPropertyUpdate.ts | 19 + src/v1/models/contentRestriction.ts | 67 + .../contentRestrictionAddOrUpdateArray.ts | 19 + src/v1/models/contentRestrictionArray.ts | 16 + src/v1/models/contentRestrictionUpdate.ts | 47 + src/v1/models/contentState.ts | 13 + src/v1/models/contentStateResponse.ts | 12 + .../v1}/models/contentStateRestInput.ts | 15 +- src/v1/models/contentStateSettings.ts | 16 + src/v1/models/contentTemplate.ts | 27 + src/v1/models/contentTemplateArray.ts | 14 + src/v1/models/contentTemplateBody.ts | 24 + src/v1/models/contentTemplateBodyCreate.ts | 24 + src/v1/models/contentTemplateCreate.ts | 26 + src/v1/models/contentTemplateUpdate.ts | 28 + src/v1/models/contentUpdate.ts | 61 + src/v1/models/copyPageHierarchyRequest.ts | 23 + .../models/copyPageHierarchyTitleOptions.ts | 11 + src/v1/models/copyPageRequest.ts | 27 + src/v1/models/copyPageRequestDestination.ts | 18 + src/v1/models/dynamicModulesErrorMessage.ts | 9 + src/v1/models/embeddable.ts | 6 + src/v1/models/embeddedContent.ts | 11 + src/v1/models/genericAccountId.ts | 9 + src/v1/models/genericLinks.ts | 6 + src/v1/models/genericUserKey.ts | 9 + src/v1/models/genericUserName.ts | 9 + src/v1/models/getViewers.ts | 11 + src/v1/models/getViews.ts | 11 + src/v1/models/globalSpaceIdentifier.ts | 8 + src/v1/models/group.ts | 28 + src/v1/models/groupArray.ts | 12 + src/v1/models/groupArrayWithLinks.ts | 20 + src/v1/models/groupCreate.ts | 9 + src/v1/models/groupName.ts | 8 + src/v1/models/headerLookAndFeel.ts | 15 + src/v1/models/horizontalHeaderLookAndFeel.ts | 16 + src/v1/models/icon.ts | 15 + src/v1/models/index.ts | 341 ++ src/v1/models/label.ts | 11 + src/v1/models/labelArray.ts | 14 + src/v1/models/labelCreate.ts | 11 + src/v1/models/labelCreateArray.ts | 6 + src/v1/models/labelDetails.ts | 11 + src/v1/models/labeledContent.ts | 12 + src/v1/models/labeledContentPageResponse.ts | 12 + src/v1/models/labeledContentType.ts | 5 + src/v1/models/longTask.ts | 15 + src/v1/models/longTaskStatus.ts | 52 + src/v1/models/longTaskStatusArray.ts | 14 + src/v1/models/longTaskStatusWithLinks.ts | 54 + src/v1/models/lookAndFeel.ts | 25 + src/v1/models/lookAndFeelSelection.ts | 11 + src/v1/models/lookAndFeelSettings.ts | 12 + src/v1/models/lookAndFeelWithLinks.ts | 7 + src/v1/models/macroInstance.ts | 12 + src/v1/models/menusLookAndFeel.ts | 11 + src/v1/models/message.ts | 9 + src/v1/models/movePage.ts | 9 + src/v1/models/navigationLookAndFeel.ts | 13 + src/v1/models/operationCheckResult.ts | 32 + src/v1/models/permissionCheckResponse.ts | 25 + src/v1/models/permissionSubject.ts | 15 + src/v1/models/permissionSubjectWithGroupId.ts | 15 + src/v1/models/propertyValue.ts | 22 + src/v1/models/relation.ts | 22 + src/v1/models/relationArray.ts | 14 + src/v1/models/relationData.ts | 11 + src/v1/models/retentionPeriod.ts | 28 + src/v1/models/screenLookAndFeel.ts | 25 + src/v1/models/searchFieldLookAndFeel.ts | 9 + .../models/searchPageResponseSearchResult.ts | 18 + src/v1/models/searchResult.ts | 26 + src/v1/models/space.ts | 105 + src/v1/models/spaceArray.ts | 14 + .../src/api => src/v1}/models/spaceCreate.ts | 30 +- src/v1/models/spaceDescription.ts | 10 + src/v1/models/spaceDescriptionCreate.ts | 17 + src/v1/models/spacePermission.ts | 70 + src/v1/models/spacePermissionCreate.ts | 38 + src/v1/models/spacePermissionCustomContent.ts | 23 + src/v1/models/spacePermissionRequest.ts | 62 + src/v1/models/spacePermissionV2.ts | 63 + src/v1/models/spaceProperty.ts | 20 + src/v1/models/spacePropertyArray.ts | 14 + src/v1/models/spacePropertyCreate.ts | 15 + src/v1/models/spacePropertyCreateNoKey.ts | 9 + src/v1/models/spacePropertyUpdate.ts | 15 + src/v1/models/spaceSettings.ts | 28 + src/v1/models/spaceSettingsUpdate.ts | 20 + src/v1/models/spaceUpdate.ts | 18 + src/v1/models/spaceWatch.ts | 13 + src/v1/models/spaceWatchArray.ts | 14 + src/v1/models/superBatchWebResources.ts | 20 + src/v1/models/systemInfoEntity.ts | 16 + src/v1/models/task.ts | 23 + src/v1/models/taskPageResponse.ts | 12 + src/v1/models/taskStatusUpdate.ts | 8 + src/v1/models/theme.ts | 14 + src/v1/models/themeArray.ts | 14 + src/v1/models/themeNoLinks.ts | 13 + src/v1/models/themeUpdate.ts | 9 + src/v1/models/topNavigationLookAndFeel.ts | 13 + src/v1/models/user.ts | 71 + src/v1/models/userAnonymous.ts | 18 + src/v1/models/userArray.ts | 26 + src/v1/models/userDetails.ts | 54 + src/v1/models/userProperty.ts | 18 + src/v1/models/userPropertyCreate.ts | 9 + src/v1/models/userPropertyKeyArray.ts | 17 + src/v1/models/userPropertyUpdate.ts | 9 + src/v1/models/userWatch.ts | 8 + src/v1/models/usersUserKeys.ts | 16 + src/v1/models/version.ts | 52 + src/v1/models/versionArray.ts | 14 + src/v1/models/versionRestore.ts | 17 + src/v1/models/watch.ts | 11 + src/v1/models/watchArray.ts | 14 + src/v1/models/watchUser.ts | 33 + src/v1/models/webResourceDependencies.ts | 30 + src/v1/parameters/addContentWatcher.ts | 25 + .../parameters/addCustomContentPermissions.ts | 11 + .../addGroupToContentRestrictionByGroupId.ts | 12 + src/v1/parameters/addLabelWatcher.ts | 27 + src/v1/parameters/addLabelsToContent.ts | 9 + src/v1/parameters/addLabelsToSpace.ts | 9 + src/v1/parameters/addPermissionToSpace.ts | 11 + src/v1/parameters/addRestrictions.ts | 30 + src/v1/parameters/addSpaceWatcher.ts | 27 + .../parameters/addUserToContentRestriction.ts | 27 + src/v1/parameters/addUserToGroupByGroupId.ts | 11 + src/v1/parameters/archivePages.ts | 14 + .../asyncConvertContentBodyRequest.ts | 70 + .../asyncConvertContentBodyResponse.ts | 8 + .../bulkAsyncConvertContentBodyRequest.ts | 6 + .../bulkAsyncConvertContentBodyResponse.ts | 8 + src/v1/parameters/checkContentPermission.ts | 11 + src/v1/parameters/copyPage.ts | 73 + src/v1/parameters/copyPageHierarchy.ts | 10 + src/v1/parameters/createAttachment.ts | 11 + src/v1/parameters/createAuditRecord.ts | 6 + src/v1/parameters/createContentTemplate.ts | 6 + src/v1/parameters/createGroup.ts | 6 + .../parameters/createOrUpdateAttachments.ts | 11 + src/v1/parameters/createPrivateSpace.ts | 6 + src/v1/parameters/createRelationship.ts | 54 + src/v1/parameters/createSpace.ts | 6 + src/v1/parameters/createUserProperty.ts | 16 + src/v1/parameters/deleteContentVersion.ts | 10 + src/v1/parameters/deleteLabelFromSpace.ts | 12 + src/v1/parameters/deletePageTree.ts | 8 + src/v1/parameters/deleteRelationship.ts | 51 + .../v1}/parameters/deleteRestrictions.ts | 24 +- src/v1/parameters/deleteSpace.ts | 8 + src/v1/parameters/deleteUserProperty.ts | 13 + src/v1/parameters/downloadAttatchment.ts | 17 + src/v1/parameters/exportAuditRecords.ts | 20 + .../v1}/parameters/findSourcesForTarget.ts | 52 +- .../v1}/parameters/findTargetFromSource.ts | 52 +- src/v1/parameters/getAllLabelContent.ts | 14 + .../getAndAsyncConvertMacroBodyByMacroId.ts | 81 + .../getAndConvertMacroBodyByMacroId.ts | 61 + src/v1/parameters/getAnonymousUser.ts | 12 + src/v1/parameters/getAuditRecords.ts | 22 + .../getAuditRecordsForTimePeriod.ts | 32 + .../parameters/getAvailableContentStates.ts | 8 + .../v1}/parameters/getBlueprintTemplates.ts | 18 +- src/v1/parameters/getBulkUserLookup.ts | 16 + src/v1/parameters/getContentDescendants.ts | 20 + .../getContentRestrictionStatusForUser.ts | 27 + src/v1/parameters/getContentState.ts | 10 + src/v1/parameters/getContentStateSettings.ts | 8 + src/v1/parameters/getContentTemplate.ts | 14 + .../v1}/parameters/getContentTemplates.ts | 18 +- src/v1/parameters/getContentWatchStatus.ts | 25 + .../v1}/parameters/getContentsWithState.ts | 20 +- src/v1/parameters/getCurrentUser.ts | 14 + src/v1/parameters/getDescendantsOfType.ts | 82 + src/v1/parameters/getGroupByGroupId.ts | 8 + .../parameters/getGroupMembersByGroupId.ts | 19 +- .../parameters/getGroupMembershipsForUser.ts | 15 + src/v1/parameters/getGroups.ts | 12 + ...dividualGroupRestrictionStatusByGroupId.ts | 14 + src/v1/parameters/getLabelsForSpace.ts | 21 + src/v1/parameters/getLookAndFeelSettings.ts | 11 + src/v1/parameters/getMacroBodyByMacroId.ts | 19 + .../parameters/getPrivacyUnsafeUserEmail.ts | 11 + .../getPrivacyUnsafeUserEmailBulk.ts | 8 + src/v1/parameters/getRelationship.ts | 64 + .../v1}/parameters/getRestrictions.ts | 28 +- .../parameters/getRestrictionsByOperation.ts | 12 +- .../parameters/getRestrictionsForOperation.ts | 18 +- src/v1/parameters/getSpaceContentStates.ts | 8 + src/v1/parameters/getSpaceSettings.ts | 8 + src/v1/parameters/getSpaceTheme.ts | 8 + src/v1/parameters/getTask.ts | 8 + src/v1/parameters/getTasks.ts | 12 + src/v1/parameters/getTheme.ts | 8 + src/v1/parameters/getThemes.ts | 10 + src/v1/parameters/getUser.ts | 19 + .../v1}/parameters/getUserProperties.ts | 14 +- src/v1/parameters/getUserProperty.ts | 10 + src/v1/parameters/getViewers.ts | 10 + src/v1/parameters/getViews.ts | 10 + src/v1/parameters/getWatchersForSpace.ts | 12 + src/v1/parameters/getWatchesForPage.ts | 12 + src/v1/parameters/getWatchesForSpace.ts | 12 + src/v1/parameters/index.ts | 249 ++ src/v1/parameters/isWatchingLabel.ts | 25 + src/v1/parameters/isWatchingSpace.ts | 25 + .../src/api => src/v1}/parameters/movePage.ts | 14 +- src/v1/parameters/publishLegacyDraft.ts | 81 + src/v1/parameters/publishSharedDraft.ts | 81 + src/v1/parameters/registerModules.ts | 7 + src/v1/parameters/removeContentState.ts | 10 + src/v1/parameters/removeContentWatcher.ts | 27 + src/v1/parameters/removeGroupById.ts | 8 + .../removeGroupFromContentRestriction.ts | 12 + src/v1/parameters/removeLabelFromContent.ts | 10 + ...moveLabelFromContentUsingQueryParameter.ts | 10 + src/v1/parameters/removeLabelWatcher.ts | 25 + .../removeMemberFromGroupByGroupId.ts | 25 + .../v1}/parameters/removeModules.ts | 10 +- src/v1/parameters/removePermission.ts | 10 + src/v1/parameters/removeSpaceWatch.ts | 25 + src/v1/parameters/removeTemplate.ts | 8 + .../removeUserFromContentRestriction.ts | 27 + src/v1/parameters/resetLookAndFeelSettings.ts | 11 + src/v1/parameters/resetSpaceTheme.ts | 8 + src/v1/parameters/restoreContentVersion.ts | 19 + .../api => src/v1}/parameters/searchByCQL.ts | 40 +- src/v1/parameters/searchContentByCQL.ts | 83 + .../api => src/v1}/parameters/searchGroups.ts | 16 +- .../api => src/v1}/parameters/searchUser.ts | 31 +- src/v1/parameters/setContentState.ts | 16 + src/v1/parameters/setRetentionPeriod.ts | 6 + src/v1/parameters/setSpaceTheme.ts | 11 + src/v1/parameters/updateAttachmentData.ts | 11 + .../parameters/updateAttachmentProperties.ts | 13 + src/v1/parameters/updateContentTemplate.ts | 6 + src/v1/parameters/updateLookAndFeel.ts | 6 + .../parameters/updateLookAndFeelSettings.ts | 14 + src/v1/parameters/updateRestrictions.ts | 30 + src/v1/parameters/updateSpace.ts | 11 + src/v1/parameters/updateSpaceSettings.ts | 11 + src/v1/parameters/updateUserProperty.ts | 16 + .../cloud/src => src/v2}/api/adminKey.ts | 12 +- .../cloud/src => src/v2}/api/ancestors.ts | 32 +- .../cloud/src => src/v2}/api/appProperties.ts | 22 +- .../cloud/src => src/v2}/api/attachment.ts | 46 +- .../cloud/src => src/v2}/api/blogPost.ts | 38 +- .../cloud/src => src/v2}/api/children.ts | 44 +- .../src => src/v2}/api/classificationLevel.ts | 66 +- {packages/cloud/src => src/v2}/api/comment.ts | 98 +- {packages/cloud/src => src/v2}/api/content.ts | 8 +- .../src => src/v2}/api/contentProperties.ts | 205 +- .../cloud/src => src/v2}/api/customContent.ts | 47 +- .../cloud/src => src/v2}/api/dataPolicies.ts | 12 +- .../cloud/src => src/v2}/api/database.ts | 16 +- .../cloud/src => src/v2}/api/descendants.ts | 32 +- {packages/cloud/src => src/v2}/api/folder.ts | 16 +- src/v2/api/index.ts | 59 + {packages/cloud/src => src/v2}/api/label.ts | 44 +- {packages/cloud/src => src/v2}/api/like.ts | 50 +- .../cloud/src => src/v2}/api/operation.ts | 48 +- {packages/cloud/src => src/v2}/api/page.ts | 42 +- .../cloud/src => src/v2}/api/redactions.ts | 12 +- .../cloud/src => src/v2}/api/smartLink.ts | 16 +- {packages/cloud/src => src/v2}/api/space.ts | 20 +- .../v2}/api/spacePermissionTransition.ts | 26 +- .../src => src/v2}/api/spacePermissions.ts | 14 +- .../src => src/v2}/api/spaceProperties.ts | 26 +- .../cloud/src => src/v2}/api/spaceRoles.ts | 46 +- {packages/cloud/src => src/v2}/api/task.ts | 18 +- {packages/cloud/src => src/v2}/api/user.ts | 18 +- {packages/cloud/src => src/v2}/api/version.ts | 64 +- .../cloud/src => src/v2}/api/whiteboard.ts | 16 +- .../v2/createV2Client.ts | 73 +- src/v2/index.ts | 5 + .../v2}/models/abstractPageLinks.ts | 2 +- .../src => src/v2}/models/accessByEmail.ts | 2 +- .../src => src/v2}/models/accountStatus.ts | 0 .../src => src/v2}/models/accountType.ts | 0 .../cloud/src => src/v2}/models/adminKey.ts | 2 +- .../cloud/src => src/v2}/models/ancestor.ts | 4 +- .../src => src/v2}/models/ancestorType.ts | 0 .../cloud/src => src/v2}/models/attachment.ts | 56 +- .../v2}/models/attachmentComment.ts | 16 +- .../v2}/models/attachmentComments.ts | 6 +- .../v2}/models/attachmentContentProperties.ts | 6 +- .../src => src/v2}/models/attachmentLabels.ts | 6 +- .../src => src/v2}/models/attachmentLinks.ts | 2 +- .../v2}/models/attachmentSortOrder.ts | 0 .../v2}/models/attachmentSummary.ts | 14 +- .../v2}/models/attachmentVersion.ts | 6 +- .../v2}/models/attachmentVersions.ts | 6 +- .../src => src/v2}/models/attachments.ts | 6 +- .../v2}/models/availableSpacePermissions.ts | 6 +- .../v2}/models/availableSpaceRoles.ts | 6 +- src/v2/models/blogPost.ts | 58 + .../v2}/models/blogPostBodyWrite.ts | 2 +- .../src => src/v2}/models/blogPostComment.ts | 16 +- .../v2}/models/blogPostContentStatus.ts | 0 .../v2}/models/blogPostFooterComments.ts | 6 +- src/v2/models/blogPostInlineComment.ts | 25 + .../v2}/models/blogPostInlineComments.ts | 6 +- .../src => src/v2}/models/blogPostLabels.ts | 6 +- .../v2}/models/blogPostLikeCount.ts | 2 +- .../v2}/models/blogPostLikeUsers.ts | 6 +- .../v2}/models/blogPostNestedBodyWrite.ts | 10 +- .../v2}/models/blogPostSortOrder.ts | 0 .../src => src/v2}/models/blogPostSummary.ts | 16 +- .../src => src/v2}/models/blogPostVersion.ts | 6 +- .../src => src/v2}/models/blogPostVersions.ts | 6 +- .../cloud/src => src/v2}/models/blogPosts.ts | 6 +- .../src => src/v2}/models/blogPostsInSpace.ts | 6 +- .../v2}/models/blogpostAttachments.ts | 6 +- .../v2}/models/blogpostContentProperties.ts | 6 +- src/v2/models/body.ts | 12 + .../src => src/v2}/models/bodySummary.ts | 8 +- .../cloud/src => src/v2}/models/bodyType.ts | 2 +- .../src => src/v2}/models/bulkAssignRoles.ts | 6 +- .../src => src/v2}/models/bulkRemoveAccess.ts | 4 +- .../models/bulkTransitionCombinationEntry.ts | 4 +- .../models/bulkTransitionDecodedPermission.ts | 2 +- .../bulkTransitionPrincipalTypeAssignment.ts | 2 +- .../models/bulkTransitionRoleAssignment.ts | 4 +- .../models/bulkTransitionSpaceSelection.ts | 6 +- .../v2}/models/bulkTransitionSpaceTarget.ts | 2 +- .../v2}/models/bulkTransitionTask.ts | 2 +- .../v2}/models/bulkTransitionTaskStatus.ts | 2 +- .../src => src/v2}/models/bulkUserLookup.ts | 6 +- .../v2}/models/childCustomContent.ts | 4 +- .../v2}/models/childCustomContentGet.ts | 6 +- .../v2}/models/childCustomContentSortOrder.ts | 0 .../cloud/src => src/v2}/models/childPage.ts | 4 +- .../v2}/models/childPageSortOrder.ts | 0 .../cloud/src => src/v2}/models/childPages.ts | 6 +- .../cloud/src => src/v2}/models/children.ts | 4 +- .../src => src/v2}/models/childrenComment.ts | 16 +- .../v2}/models/classificationLevel.ts | 6 +- .../v2}/models/classificationLevelColor.ts | 0 .../v2}/models/classificationLevelStatus.ts | 0 .../src => src/v2}/models/commentBodyWrite.ts | 2 +- .../v2}/models/commentContentProperties.ts | 6 +- .../src => src/v2}/models/commentLinks.ts | 2 +- .../v2}/models/commentNestedBodyWrite.ts | 10 +- .../src => src/v2}/models/commentSortOrder.ts | 0 .../src => src/v2}/models/commentVersion.ts | 6 +- .../v2}/models/contentIdToContentType.ts | 4 +- .../src => src/v2}/models/contentProperty.ts | 6 +- .../v2}/models/contentPropertyCreate.ts | 2 +- .../v2}/models/contentPropertySortOrder.ts | 0 .../v2}/models/contentPropertyUpdate.ts | 4 +- .../src => src/v2}/models/contentSortOrder.ts | 0 .../src => src/v2}/models/contentStatus.ts | 0 .../v2}/models/createFooterCommentModel.ts | 8 +- .../v2}/models/createInlineCommentModel.ts | 10 +- .../src => src/v2}/models/customContent.ts | 58 +- .../v2}/models/customContentAttachments.ts | 6 +- src/v2/models/customContentBody.ts | 13 + .../models/customContentBodyRepresentation.ts | 0 .../customContentBodyRepresentationSingle.ts | 0 .../v2}/models/customContentBodySummary.ts | 10 +- .../v2}/models/customContentBodyWrite.ts | 2 +- .../v2}/models/customContentByType.ts | 6 +- .../models/customContentByTypeInBlogPost.ts | 6 +- .../v2}/models/customContentByTypeInPage.ts | 6 +- .../v2}/models/customContentByTypeInSpace.ts | 6 +- .../v2}/models/customContentComment.ts | 16 +- .../v2}/models/customContentComments.ts | 6 +- .../models/customContentContentProperties.ts | 6 +- .../v2}/models/customContentLabels.ts | 6 +- .../v2}/models/customContentLinks.ts | 2 +- .../models/customContentNestedBodyWrite.ts | 10 +- .../v2}/models/customContentSortOrder.ts | 0 .../v2}/models/customContentSummary.ts | 16 +- .../v2}/models/customContentVersion.ts | 6 +- .../v2}/models/customContentVersions.ts | 6 +- .../v2}/models/dataPolicyMetadata.ts | 2 +- .../src => src/v2}/models/dataPolicySpace.ts | 16 +- .../src => src/v2}/models/dataPolicySpaces.ts | 6 +- .../cloud/src => src/v2}/models/database.ts | 18 +- .../v2}/models/databaseAncestors.ts | 4 +- .../v2}/models/databaseContentProperties.ts | 6 +- .../v2}/models/databaseDescendants.ts | 6 +- .../v2}/models/databaseDirectChildren.ts | 6 +- .../src => src/v2}/models/databaseLinks.ts | 2 +- .../v2}/models/deleteSpaceRoleResponse.ts | 2 +- .../src => src/v2}/models/descendants.ts | 4 +- .../src => src/v2}/models/detailedVersion.ts | 8 +- .../cloud/src => src/v2}/models/folder.ts | 18 +- .../src => src/v2}/models/folderAncestors.ts | 4 +- .../v2}/models/folderContentProperties.ts | 6 +- .../v2}/models/folderDescendants.ts | 6 +- .../v2}/models/folderDirectChildren.ts | 6 +- .../src => src/v2}/models/folderLinks.ts | 2 +- src/v2/models/footerComment.ts | 54 + .../v2}/models/footerCommentChildren.ts | 6 +- .../v2}/models/footerCommentVersions.ts | 6 +- .../src => src/v2}/models/footerComments.ts | 6 +- .../src => src/v2}/models/footerLikeCount.ts | 2 +- .../src => src/v2}/models/footerLikeUsers.ts | 6 +- .../v2}/models/forgeAppProperties.ts | 4 +- .../src => src/v2}/models/forgeAppProperty.ts | 2 +- {packages/cloud/src => src/v2}/models/icon.ts | 2 +- src/v2/models/index.ts | 455 +++ .../src => src/v2}/models/inlineComment.ts | 60 +- src/v2/models/inlineCommentChildren.ts | 25 + .../v2}/models/inlineCommentChildrenGet.ts | 6 +- .../v2}/models/inlineCommentProperties.ts | 2 +- .../models/inlineCommentResolutionStatus.ts | 0 .../v2}/models/inlineCommentVersions.ts | 6 +- .../src => src/v2}/models/inlineComments.ts | 6 +- .../src => src/v2}/models/inlineLikeCount.ts | 2 +- .../src => src/v2}/models/inlineLikeUsers.ts | 6 +- .../cloud/src => src/v2}/models/label.ts | 2 +- .../src => src/v2}/models/labelAttachments.ts | 6 +- .../src => src/v2}/models/labelBlogPosts.ts | 6 +- .../cloud/src => src/v2}/models/labelPages.ts | 6 +- .../src => src/v2}/models/labelSortOrder.ts | 0 .../cloud/src => src/v2}/models/labels.ts | 6 +- {packages/cloud/src => src/v2}/models/like.ts | 2 +- ...listSpacePermissionCombinationsResponse.ts | 4 +- .../src => src/v2}/models/multiEntityLinks.ts | 2 +- .../onlyArchivedAndCurrentContentStatus.ts | 0 .../cloud/src => src/v2}/models/operation.ts | 2 +- .../v2}/models/optionalFieldLinks.ts | 2 +- .../v2}/models/optionalFieldMeta.ts | 2 +- src/v2/models/page.ts | 68 + .../src => src/v2}/models/pageAncestors.ts | 6 +- .../src => src/v2}/models/pageAttachments.ts | 6 +- .../src => src/v2}/models/pageBodyWrite.ts | 2 +- src/v2/models/pageComment.ts | 21 + .../v2}/models/pageContentProperties.ts | 6 +- .../src => src/v2}/models/pageDescendants.ts | 6 +- .../v2}/models/pageDirectChildren.ts | 6 +- .../v2}/models/pageFooterComments.ts | 6 +- src/v2/models/pageInlineComment.ts | 25 + .../v2}/models/pageInlineComments.ts | 6 +- .../cloud/src => src/v2}/models/pageLabels.ts | 6 +- .../src => src/v2}/models/pageLikeCount.ts | 2 +- .../src => src/v2}/models/pageLikeUsers.ts | 6 +- .../v2}/models/pageNestedBodyWrite.ts | 10 +- .../src => src/v2}/models/pageSortOrder.ts | 0 .../src => src/v2}/models/pageSummary.ts | 22 +- .../src => src/v2}/models/pageVersion.ts | 6 +- .../src => src/v2}/models/pageVersions.ts | 6 +- .../cloud/src => src/v2}/models/pages.ts | 6 +- .../src => src/v2}/models/pagesInSpace.ts | 6 +- .../v2}/models/parentContentType.ts | 0 .../v2}/models/permittedOperations.ts | 6 +- .../v2}/models/primaryBodyRepresentation.ts | 0 .../models/primaryBodyRepresentationSingle.ts | 0 .../cloud/src => src/v2}/models/principal.ts | 4 +- .../src => src/v2}/models/principalType.ts | 0 .../cloud/src => src/v2}/models/redaction.ts | 6 +- .../src => src/v2}/models/redactionPointer.ts | 2 +- .../v2}/models/redactionPointerResponse.ts | 2 +- .../v2}/models/redactionResponse.ts | 8 +- .../src => src/v2}/models/redactionSection.ts | 6 +- .../cloud/src => src/v2}/models/roleType.ts | 0 .../cloud/src => src/v2}/models/smartLink.ts | 18 +- .../v2}/models/smartLinkAncestors.ts | 4 +- .../v2}/models/smartLinkContentProperties.ts | 6 +- .../v2}/models/smartLinkDescendants.ts | 6 +- .../v2}/models/smartLinkDirectChildren.ts | 6 +- .../src => src/v2}/models/smartLinkLinks.ts | 2 +- src/v2/models/space.ts | 57 + .../v2}/models/spaceContentLabels.ts | 6 +- .../src => src/v2}/models/spaceDescription.ts | 8 +- .../spaceDescriptionBodyRepresentation.ts | 0 .../cloud/src => src/v2}/models/spaceIcon.ts | 2 +- .../src => src/v2}/models/spaceLabels.ts | 6 +- .../cloud/src => src/v2}/models/spaceLinks.ts | 2 +- .../src => src/v2}/models/spacePermission.ts | 4 +- .../v2}/models/spacePermissionAssignment.ts | 28 +- .../v2}/models/spacePermissionsAssignments.ts | 6 +- .../src => src/v2}/models/spaceProperties.ts | 6 +- .../src => src/v2}/models/spaceProperty.ts | 12 +- .../v2}/models/spacePropertyCreate.ts | 2 +- .../v2}/models/spacePropertyUpdate.ts | 4 +- .../cloud/src => src/v2}/models/spaceRole.ts | 6 +- .../v2}/models/spaceRoleAssignment.ts | 6 +- .../v2}/models/spaceRoleAssignmentsGet.ts | 6 +- .../v2}/models/spaceRoleAssignmentsSet.ts | 6 +- .../src => src/v2}/models/spaceRoleMode.ts | 2 +- .../src => src/v2}/models/spaceSortOrder.ts | 0 .../src => src/v2}/models/spaceStatus.ts | 0 .../src => src/v2}/models/spaceSummary.ts | 18 +- .../cloud/src => src/v2}/models/spaceType.ts | 0 .../cloud/src => src/v2}/models/spaces.ts | 6 +- {packages/cloud/src => src/v2}/models/task.ts | 14 +- .../cloud/src => src/v2}/models/taskBody.ts | 8 +- .../cloud/src => src/v2}/models/tasks.ts | 6 +- .../v2}/models/updateFooterCommentModel.ts | 10 +- .../v2}/models/updateInlineCommentModel.ts | 10 +- .../v2}/models/updateSpaceRoleResponse.ts | 4 +- {packages/cloud/src => src/v2}/models/user.ts | 14 +- .../cloud/src => src/v2}/models/version.ts | 4 +- .../src => src/v2}/models/versionSortOrder.ts | 0 .../src => src/v2}/models/versionedEntity.ts | 8 +- .../cloud/src => src/v2}/models/whiteboard.ts | 18 +- .../v2}/models/whiteboardAncestors.ts | 4 +- .../v2}/models/whiteboardContentProperties.ts | 6 +- .../v2}/models/whiteboardDescendants.ts | 6 +- .../v2}/models/whiteboardDirectChildren.ts | 6 +- .../src => src/v2}/models/whiteboardLinks.ts | 2 +- .../bulkAssignSpacePermissionRoles.ts | 2 +- .../bulkRemoveSpacePermissionAccess.ts | 2 +- .../v2}/parameters/checkAccessByEmail.ts | 0 .../convertContentIdsToContentTypes.ts | 0 .../parameters/createAttachmentProperty.ts | 2 +- .../v2}/parameters/createBlogPost.ts | 0 .../v2}/parameters/createBlogpostProperty.ts | 2 +- .../v2}/parameters/createBulkUserLookup.ts | 0 .../v2}/parameters/createCommentProperty.ts | 2 +- .../v2}/parameters/createCustomContent.ts | 0 .../parameters/createCustomContentProperty.ts | 2 +- .../v2}/parameters/createDatabase.ts | 0 .../v2}/parameters/createDatabaseProperty.ts | 2 +- .../src => src/v2}/parameters/createFolder.ts | 0 .../v2}/parameters/createFolderProperty.ts | 2 +- .../v2}/parameters/createFooterComment.ts | 2 +- .../v2}/parameters/createInlineComment.ts | 2 +- .../src => src/v2}/parameters/createPage.ts | 0 .../v2}/parameters/createPageProperty.ts | 2 +- .../v2}/parameters/createSmartLink.ts | 0 .../v2}/parameters/createSmartLinkProperty.ts | 2 +- .../src => src/v2}/parameters/createSpace.ts | 0 .../v2}/parameters/createSpaceProperty.ts | 2 +- .../v2}/parameters/createSpaceRole.ts | 0 .../v2}/parameters/createWhiteboard.ts | 0 .../parameters/createWhiteboardProperty.ts | 2 +- .../v2}/parameters/deleteAttachment.ts | 2 +- .../deleteAttachmentPropertyById.ts | 0 .../v2}/parameters/deleteBlogPost.ts | 0 .../parameters/deleteBlogpostPropertyById.ts | 0 .../parameters/deleteCommentPropertyById.ts | 0 .../v2}/parameters/deleteCustomContent.ts | 0 .../deleteCustomContentPropertyById.ts | 0 .../v2}/parameters/deleteDatabase.ts | 0 .../parameters/deleteDatabasePropertyById.ts | 0 .../src => src/v2}/parameters/deleteFolder.ts | 0 .../parameters/deleteFolderPropertyById.ts | 0 .../v2}/parameters/deleteFooterComment.ts | 0 .../v2}/parameters/deleteForgeAppProperty.ts | 0 .../v2}/parameters/deleteInlineComment.ts | 0 .../src => src/v2}/parameters/deletePage.ts | 0 .../v2}/parameters/deletePagePropertyById.ts | 0 .../v2}/parameters/deleteSmartLink.ts | 0 .../parameters/deleteSmartLinkPropertyById.ts | 0 .../deleteSpaceDefaultClassificationLevel.ts | 0 .../v2}/parameters/deleteSpacePropertyById.ts | 0 .../v2}/parameters/deleteSpaceRole.ts | 0 .../v2}/parameters/deleteWhiteboard.ts | 0 .../deleteWhiteboardPropertyById.ts | 0 .../v2}/parameters/enableAdminKey.ts | 0 .../v2}/parameters/getAttachmentById.ts | 0 .../v2}/parameters/getAttachmentComments.ts | 4 +- .../getAttachmentContentProperties.ts | 2 +- .../getAttachmentContentPropertiesById.ts | 0 .../v2}/parameters/getAttachmentLabels.ts | 2 +- .../v2}/parameters/getAttachmentOperations.ts | 0 .../parameters/getAttachmentThumbnailById.ts | 0 .../parameters/getAttachmentVersionDetails.ts | 0 .../v2}/parameters/getAttachmentVersions.ts | 2 +- .../v2}/parameters/getAttachments.ts | 2 +- .../getAvailableSpacePermissions.ts | 0 .../v2}/parameters/getAvailableSpaceRoles.ts | 2 +- .../v2}/parameters/getBlogPostById.ts | 2 +- .../getBlogPostClassificationLevel.ts | 0 .../parameters/getBlogPostFooterComments.ts | 4 +- .../parameters/getBlogPostInlineComments.ts | 4 +- .../v2}/parameters/getBlogPostLabels.ts | 0 .../v2}/parameters/getBlogPostLikeCount.ts | 0 .../v2}/parameters/getBlogPostLikeUsers.ts | 0 .../v2}/parameters/getBlogPostOperations.ts | 0 .../parameters/getBlogPostVersionDetails.ts | 0 .../v2}/parameters/getBlogPostVersions.ts | 4 +- .../src => src/v2}/parameters/getBlogPosts.ts | 4 +- .../v2}/parameters/getBlogPostsInSpace.ts | 4 +- .../v2}/parameters/getBlogpostAttachments.ts | 2 +- .../getBlogpostContentProperties.ts | 2 +- .../getBlogpostContentPropertiesById.ts | 0 .../v2}/parameters/getChildCustomContent.ts | 0 .../v2}/parameters/getChildPages.ts | 0 .../parameters/getCommentContentProperties.ts | 2 +- .../getCommentContentPropertiesById.ts | 0 .../parameters/getCustomContentAttachments.ts | 2 +- .../v2}/parameters/getCustomContentById.ts | 2 +- .../v2}/parameters/getCustomContentByType.ts | 4 +- .../getCustomContentByTypeInBlogPost.ts | 4 +- .../getCustomContentByTypeInPage.ts | 4 +- .../getCustomContentByTypeInSpace.ts | 2 +- .../parameters/getCustomContentComments.ts | 4 +- .../getCustomContentContentProperties.ts | 2 +- .../getCustomContentContentPropertiesById.ts | 0 .../v2}/parameters/getCustomContentLabels.ts | 0 .../parameters/getCustomContentOperations.ts | 0 .../getCustomContentVersionDetails.ts | 0 .../parameters/getCustomContentVersions.ts | 4 +- .../v2}/parameters/getDataPolicySpaces.ts | 2 +- .../v2}/parameters/getDatabaseAncestors.ts | 0 .../v2}/parameters/getDatabaseById.ts | 0 .../getDatabaseClassificationLevel.ts | 0 .../getDatabaseContentProperties.ts | 2 +- .../getDatabaseContentPropertiesById.ts | 0 .../v2}/parameters/getDatabaseDescendants.ts | 0 .../parameters/getDatabaseDirectChildren.ts | 0 .../v2}/parameters/getDatabaseOperations.ts | 0 .../v2}/parameters/getFolderAncestors.ts | 0 .../v2}/parameters/getFolderById.ts | 0 .../parameters/getFolderContentProperties.ts | 2 +- .../getFolderContentPropertiesById.ts | 0 .../v2}/parameters/getFolderDescendants.ts | 0 .../v2}/parameters/getFolderDirectChildren.ts | 0 .../v2}/parameters/getFolderOperations.ts | 0 .../v2}/parameters/getFooterCommentById.ts | 2 +- .../parameters/getFooterCommentChildren.ts | 4 +- .../parameters/getFooterCommentOperations.ts | 0 .../getFooterCommentVersionDetails.ts | 0 .../parameters/getFooterCommentVersions.ts | 4 +- .../v2}/parameters/getFooterComments.ts | 4 +- .../v2}/parameters/getFooterLikeCount.ts | 0 .../v2}/parameters/getFooterLikeUsers.ts | 0 .../v2}/parameters/getForgeAppProperties.ts | 0 .../v2}/parameters/getForgeAppProperty.ts | 0 .../v2}/parameters/getInlineCommentById.ts | 2 +- .../parameters/getInlineCommentChildren.ts | 4 +- .../parameters/getInlineCommentOperations.ts | 0 .../getInlineCommentVersionDetails.ts | 0 .../parameters/getInlineCommentVersions.ts | 4 +- .../v2}/parameters/getInlineComments.ts | 4 +- .../v2}/parameters/getInlineLikeCount.ts | 0 .../v2}/parameters/getInlineLikeUsers.ts | 0 .../v2}/parameters/getLabelAttachments.ts | 2 +- .../v2}/parameters/getLabelBlogPosts.ts | 4 +- .../v2}/parameters/getLabelPages.ts | 4 +- .../src => src/v2}/parameters/getLabels.ts | 0 .../v2}/parameters/getPageAncestors.ts | 0 .../v2}/parameters/getPageAttachments.ts | 2 +- .../src => src/v2}/parameters/getPageById.ts | 2 +- .../parameters/getPageClassificationLevel.ts | 0 .../parameters/getPageContentProperties.ts | 2 +- .../getPageContentPropertiesById.ts | 0 .../v2}/parameters/getPageDescendants.ts | 0 .../v2}/parameters/getPageDirectChildren.ts | 0 .../v2}/parameters/getPageFooterComments.ts | 4 +- .../v2}/parameters/getPageInlineComments.ts | 4 +- .../v2}/parameters/getPageLabels.ts | 0 .../v2}/parameters/getPageLikeCount.ts | 0 .../v2}/parameters/getPageLikeUsers.ts | 0 .../v2}/parameters/getPageOperations.ts | 0 .../v2}/parameters/getPageVersionDetails.ts | 0 .../v2}/parameters/getPageVersions.ts | 4 +- .../src => src/v2}/parameters/getPages.ts | 4 +- .../v2}/parameters/getPagesInSpace.ts | 4 +- .../v2}/parameters/getSmartLinkAncestors.ts | 0 .../v2}/parameters/getSmartLinkById.ts | 0 .../getSmartLinkContentProperties.ts | 2 +- .../getSmartLinkContentPropertiesById.ts | 0 .../v2}/parameters/getSmartLinkDescendants.ts | 0 .../parameters/getSmartLinkDirectChildren.ts | 0 .../v2}/parameters/getSmartLinkOperations.ts | 0 .../src => src/v2}/parameters/getSpaceById.ts | 2 +- .../v2}/parameters/getSpaceContentLabels.ts | 0 .../getSpaceDefaultClassificationLevel.ts | 0 .../v2}/parameters/getSpaceLabels.ts | 0 .../v2}/parameters/getSpaceOperations.ts | 0 .../getSpacePermissionTransitionTaskStatus.ts | 0 .../getSpacePermissionsAssignments.ts | 0 .../v2}/parameters/getSpaceProperties.ts | 0 .../v2}/parameters/getSpacePropertyById.ts | 0 .../v2}/parameters/getSpaceRoleAssignments.ts | 2 +- .../v2}/parameters/getSpaceRolesById.ts | 2 +- .../src => src/v2}/parameters/getSpaces.ts | 4 +- .../src => src/v2}/parameters/getTaskById.ts | 2 +- .../src => src/v2}/parameters/getTasks.ts | 2 +- .../v2}/parameters/getWhiteboardAncestors.ts | 0 .../v2}/parameters/getWhiteboardById.ts | 0 .../getWhiteboardClassificationLevel.ts | 0 .../getWhiteboardContentProperties.ts | 2 +- .../getWhiteboardContentPropertiesById.ts | 0 .../parameters/getWhiteboardDescendants.ts | 0 .../parameters/getWhiteboardDirectChildren.ts | 0 .../v2}/parameters/getWhiteboardOperations.ts | 0 src/v2/parameters/index.ts | 423 ++ .../v2}/parameters/inviteByEmail.ts | 0 .../listSpacePermissionCombinations.ts | 0 .../postBlogPostClassificationLevel.ts | 0 .../postDatabaseClassificationLevel.ts | 0 .../parameters/postPageClassificationLevel.ts | 0 .../v2}/parameters/postRedactBlog.ts | 0 .../v2}/parameters/postRedactPage.ts | 0 .../postWhiteboardClassificationLevel.ts | 0 .../putBlogPostClassificationLevel.ts | 0 .../putDatabaseClassificationLevel.ts | 0 .../v2}/parameters/putForgeAppProperty.ts | 0 .../parameters/putPageClassificationLevel.ts | 0 .../putSpaceDefaultClassificationLevel.ts | 0 .../putWhiteboardClassificationLevel.ts | 0 .../v2}/parameters/setSpaceRoleAssignments.ts | 0 .../updateAttachmentPropertyById.ts | 2 +- .../v2}/parameters/updateBlogPost.ts | 0 .../parameters/updateBlogpostPropertyById.ts | 2 +- .../parameters/updateCommentPropertyById.ts | 2 +- .../v2}/parameters/updateCustomContent.ts | 0 .../updateCustomContentPropertyById.ts | 2 +- .../parameters/updateDatabasePropertyById.ts | 2 +- .../parameters/updateFolderPropertyById.ts | 2 +- .../v2}/parameters/updateFooterComment.ts | 0 .../v2}/parameters/updateInlineComment.ts | 2 +- .../src => src/v2}/parameters/updatePage.ts | 0 .../v2}/parameters/updatePagePropertyById.ts | 2 +- .../v2}/parameters/updatePageTitle.ts | 0 .../parameters/updateSmartLinkPropertyById.ts | 2 +- .../v2}/parameters/updateSpacePropertyById.ts | 2 +- .../v2}/parameters/updateSpaceRole.ts | 0 .../src => src/v2}/parameters/updateTask.ts | 2 +- .../updateWhiteboardPropertyById.ts | 2 +- .../live}/helpers/naming.ts | 0 .../live}/helpers/poll.ts | 0 tests/live/setup/client.ts | 109 + .../integration => tests/live}/setup/env.ts | 0 .../live}/setup/fixtures.ts | 10 +- .../live}/setup/globalSetup.ts | 2 +- .../live}/setup/resources.ts | 0 .../live/v2}/adminKey.test.ts | 14 +- .../live/v2}/ancestors.test.ts | 18 +- .../live/v2}/appProperties.test.ts | 16 +- .../live/v2}/attachment.test.ts | 20 +- .../live/v2}/blogPost.test.ts | 22 +- .../live/v2}/children.test.ts | 18 +- .../live/v2}/classificationLevel.test.ts | 18 +- .../live/v2}/comment.test.ts | 18 +- .../live/v2}/content.test.ts | 14 +- .../live/v2}/contentProperties.test.ts | 18 +- .../live/v2}/customContent.test.ts | 18 +- .../live/v2}/dataPolicies.test.ts | 12 +- .../live/v2}/database.test.ts | 18 +- .../live/v2}/descendants.test.ts | 18 +- .../live/v2}/folder.test.ts | 18 +- .../live/v2}/label.test.ts | 22 +- .../live/v2}/like.test.ts | 16 +- .../live/v2}/operation.test.ts | 16 +- .../live/v2}/page.test.ts | 26 +- .../live/v2}/redactions.test.ts | 16 +- .../live/v2}/smartLink.test.ts | 16 +- .../live/v2}/space.test.ts | 18 +- .../v2}/spacePermissionTransition.test.ts | 16 +- .../live/v2}/spacePermissions.test.ts | 14 +- .../live/v2}/spaceProperties.test.ts | 18 +- .../live/v2}/spaceRoles.test.ts | 16 +- .../live/v2}/task.test.ts | 18 +- .../live/v2}/user.test.ts | 16 +- .../live/v2}/version.test.ts | 14 +- .../live/v2}/whiteboard.test.ts | 18 +- tsconfig.base.json | 15 - tsconfig.json | 23 +- tsconfig.test.json | 8 + vitest.config.live.ts | 25 + vitest.config.ts | 46 +- vitestShared.ts | 25 - 1268 files changed, 16668 insertions(+), 17695 deletions(-) delete mode 100644 packages/cloud/package.json delete mode 100644 packages/cloud/src/api/index.ts delete mode 100644 packages/cloud/src/index.ts delete mode 100644 packages/cloud/src/models/blogPost.ts delete mode 100644 packages/cloud/src/models/blogPostInlineComment.ts delete mode 100644 packages/cloud/src/models/body.ts delete mode 100644 packages/cloud/src/models/customContentBody.ts delete mode 100644 packages/cloud/src/models/footerComment.ts delete mode 100644 packages/cloud/src/models/index.ts delete mode 100644 packages/cloud/src/models/inlineCommentChildren.ts delete mode 100644 packages/cloud/src/models/page.ts delete mode 100644 packages/cloud/src/models/pageComment.ts delete mode 100644 packages/cloud/src/models/pageInlineComment.ts delete mode 100644 packages/cloud/src/models/space.ts delete mode 100644 packages/cloud/src/parameters/index.ts delete mode 100644 packages/cloud/tests/integration/setup/client.ts delete mode 100644 packages/cloud/tests/tsconfig.json delete mode 100644 packages/cloud/tsconfig.json delete mode 100644 packages/cloud/vite.config.ts delete mode 100644 packages/cloud/vitest.config.ts delete mode 100644 packages/core/package.json delete mode 100644 packages/core/tsconfig.json delete mode 100644 packages/core/vite.config.ts delete mode 100644 packages/legacy/package.json delete mode 100644 packages/legacy/src/api/analytics.ts delete mode 100644 packages/legacy/src/api/audit.ts delete mode 100644 packages/legacy/src/api/content.ts delete mode 100644 packages/legacy/src/api/contentAttachments.ts delete mode 100644 packages/legacy/src/api/contentBody.ts delete mode 100644 packages/legacy/src/api/contentChildrenAndDescendants.ts delete mode 100644 packages/legacy/src/api/contentComments.ts delete mode 100644 packages/legacy/src/api/contentLabels.ts delete mode 100644 packages/legacy/src/api/contentMacroBody.ts delete mode 100644 packages/legacy/src/api/contentPermissions.ts delete mode 100644 packages/legacy/src/api/contentProperties.ts delete mode 100644 packages/legacy/src/api/contentRestrictions.ts delete mode 100644 packages/legacy/src/api/contentStates.ts delete mode 100644 packages/legacy/src/api/contentVersions.ts delete mode 100644 packages/legacy/src/api/contentWatches.ts delete mode 100644 packages/legacy/src/api/dynamicModules.ts delete mode 100644 packages/legacy/src/api/experimental.ts delete mode 100644 packages/legacy/src/api/group.ts delete mode 100644 packages/legacy/src/api/index.ts delete mode 100644 packages/legacy/src/api/inlineTasks.ts delete mode 100644 packages/legacy/src/api/labelInfo.ts delete mode 100644 packages/legacy/src/api/longRunningTask.ts delete mode 100644 packages/legacy/src/api/models/accountId.ts delete mode 100644 packages/legacy/src/api/models/accountIdEmailRecord.ts delete mode 100644 packages/legacy/src/api/models/accountIdEmailRecordArray.ts delete mode 100644 packages/legacy/src/api/models/addContentRestriction.ts delete mode 100644 packages/legacy/src/api/models/addContentRestrictionUpdateArray.ts delete mode 100644 packages/legacy/src/api/models/affectedObject.ts delete mode 100644 packages/legacy/src/api/models/appDescriptor.ts delete mode 100644 packages/legacy/src/api/models/asyncContentBody.ts delete mode 100644 packages/legacy/src/api/models/asyncId.ts delete mode 100644 packages/legacy/src/api/models/attachment.ts delete mode 100644 packages/legacy/src/api/models/attachmentContainer.ts delete mode 100644 packages/legacy/src/api/models/attachmentMetadata.ts delete mode 100644 packages/legacy/src/api/models/auditRecord.ts delete mode 100644 packages/legacy/src/api/models/auditRecordArray.ts delete mode 100644 packages/legacy/src/api/models/availableContentStates.ts delete mode 100644 packages/legacy/src/api/models/blueprintTemplate.ts delete mode 100644 packages/legacy/src/api/models/blueprintTemplateArray.ts delete mode 100644 packages/legacy/src/api/models/breadcrumb.ts delete mode 100644 packages/legacy/src/api/models/bulkUserLookup.ts delete mode 100644 packages/legacy/src/api/models/bulkUserLookupArray.ts delete mode 100644 packages/legacy/src/api/models/buttonLookAndFeel.ts delete mode 100644 packages/legacy/src/api/models/changedValue.ts delete mode 100644 packages/legacy/src/api/models/connectModules.ts delete mode 100644 packages/legacy/src/api/models/container.ts delete mode 100644 packages/legacy/src/api/models/containerLookAndFeel.ts delete mode 100644 packages/legacy/src/api/models/containerSummary.ts delete mode 100644 packages/legacy/src/api/models/content.ts delete mode 100644 packages/legacy/src/api/models/contentArray.ts delete mode 100644 packages/legacy/src/api/models/contentBody.ts delete mode 100644 packages/legacy/src/api/models/contentBodyCreate.ts delete mode 100644 packages/legacy/src/api/models/contentBodyCreateStorage.ts delete mode 100644 packages/legacy/src/api/models/contentChildType.ts delete mode 100644 packages/legacy/src/api/models/contentChildren.ts delete mode 100644 packages/legacy/src/api/models/contentCreate.ts delete mode 100644 packages/legacy/src/api/models/contentHistory.ts delete mode 100644 packages/legacy/src/api/models/contentLookAndFeel.ts delete mode 100644 packages/legacy/src/api/models/contentPermissionRequest.ts delete mode 100644 packages/legacy/src/api/models/contentProperty.ts delete mode 100644 packages/legacy/src/api/models/contentPropertyArray.ts delete mode 100644 packages/legacy/src/api/models/contentPropertyCreate.ts delete mode 100644 packages/legacy/src/api/models/contentPropertyCreateNoKey.ts delete mode 100644 packages/legacy/src/api/models/contentPropertyUpdate.ts delete mode 100644 packages/legacy/src/api/models/contentRestriction.ts delete mode 100644 packages/legacy/src/api/models/contentRestrictionArray.ts delete mode 100644 packages/legacy/src/api/models/contentRestrictionUpdate.ts delete mode 100644 packages/legacy/src/api/models/contentRestrictionUpdateArray.ts delete mode 100644 packages/legacy/src/api/models/contentState.ts delete mode 100644 packages/legacy/src/api/models/contentStateResponse.ts delete mode 100644 packages/legacy/src/api/models/contentStateSettings.ts delete mode 100644 packages/legacy/src/api/models/contentTemplate.ts delete mode 100644 packages/legacy/src/api/models/contentTemplateArray.ts delete mode 100644 packages/legacy/src/api/models/contentTemplateBodyCreate.ts delete mode 100644 packages/legacy/src/api/models/contentTemplateCreate.ts delete mode 100644 packages/legacy/src/api/models/contentTemplateUpdate.ts delete mode 100644 packages/legacy/src/api/models/contentUpdate.ts delete mode 100644 packages/legacy/src/api/models/copyPageHierarchyRequest.ts delete mode 100644 packages/legacy/src/api/models/copyPageHierarchyTitleOptions.ts delete mode 100644 packages/legacy/src/api/models/copyPageRequest.ts delete mode 100644 packages/legacy/src/api/models/copyPageRequestDestination.ts delete mode 100644 packages/legacy/src/api/models/createdAttachment.ts delete mode 100644 packages/legacy/src/api/models/embeddable.ts delete mode 100644 packages/legacy/src/api/models/embeddedContent.ts delete mode 100644 packages/legacy/src/api/models/genericLinks.ts delete mode 100644 packages/legacy/src/api/models/getRestrictionsByOperation.ts delete mode 100644 packages/legacy/src/api/models/getViewers.ts delete mode 100644 packages/legacy/src/api/models/getViews.ts delete mode 100644 packages/legacy/src/api/models/group.ts delete mode 100644 packages/legacy/src/api/models/groupArray.ts delete mode 100644 packages/legacy/src/api/models/groupArrayWithLinks.ts delete mode 100644 packages/legacy/src/api/models/groupCreate.ts delete mode 100644 packages/legacy/src/api/models/groupName.ts delete mode 100644 packages/legacy/src/api/models/headerLookAndFeel.ts delete mode 100644 packages/legacy/src/api/models/horizontalHeaderLookAndFeel.ts delete mode 100644 packages/legacy/src/api/models/icon.ts delete mode 100644 packages/legacy/src/api/models/index.ts delete mode 100644 packages/legacy/src/api/models/label.ts delete mode 100644 packages/legacy/src/api/models/labelArray.ts delete mode 100644 packages/legacy/src/api/models/labelCreate.ts delete mode 100644 packages/legacy/src/api/models/labelCreateArray.ts delete mode 100644 packages/legacy/src/api/models/labelDetails.ts delete mode 100644 packages/legacy/src/api/models/labeledContent.ts delete mode 100644 packages/legacy/src/api/models/labeledContentPageResponse.ts delete mode 100644 packages/legacy/src/api/models/labeledContentType.ts delete mode 100644 packages/legacy/src/api/models/lifecycle.ts delete mode 100644 packages/legacy/src/api/models/longTask.ts delete mode 100644 packages/legacy/src/api/models/longTaskStatus.ts delete mode 100644 packages/legacy/src/api/models/longTaskStatusArray.ts delete mode 100644 packages/legacy/src/api/models/longTaskStatusWithLinks.ts delete mode 100644 packages/legacy/src/api/models/lookAndFeel.ts delete mode 100644 packages/legacy/src/api/models/lookAndFeelSelection.ts delete mode 100644 packages/legacy/src/api/models/lookAndFeelSettings.ts delete mode 100644 packages/legacy/src/api/models/macroInstance.ts delete mode 100644 packages/legacy/src/api/models/menusLookAndFeel.ts delete mode 100644 packages/legacy/src/api/models/message.ts delete mode 100644 packages/legacy/src/api/models/migratedUser.ts delete mode 100644 packages/legacy/src/api/models/migratedUserArray.ts delete mode 100644 packages/legacy/src/api/models/movePage.ts delete mode 100644 packages/legacy/src/api/models/navigationLookAndFeel.ts delete mode 100644 packages/legacy/src/api/models/operationCheckResult.ts delete mode 100644 packages/legacy/src/api/models/permissionCheckResponse.ts delete mode 100644 packages/legacy/src/api/models/permissionSubject.ts delete mode 100644 packages/legacy/src/api/models/permissionSubjectWithGroupId.ts delete mode 100644 packages/legacy/src/api/models/propertyValue.ts delete mode 100644 packages/legacy/src/api/models/relation.ts delete mode 100644 packages/legacy/src/api/models/relationArray.ts delete mode 100644 packages/legacy/src/api/models/relationData.ts delete mode 100644 packages/legacy/src/api/models/retentionPeriod.ts delete mode 100644 packages/legacy/src/api/models/screenLookAndFeel.ts delete mode 100644 packages/legacy/src/api/models/searchFieldLookAndFeel.ts delete mode 100644 packages/legacy/src/api/models/searchPageResponseSearchResult.ts delete mode 100644 packages/legacy/src/api/models/searchResult.ts delete mode 100644 packages/legacy/src/api/models/space.ts delete mode 100644 packages/legacy/src/api/models/spaceArray.ts delete mode 100644 packages/legacy/src/api/models/spaceDescription.ts delete mode 100644 packages/legacy/src/api/models/spaceDescriptionCreate.ts delete mode 100644 packages/legacy/src/api/models/spacePermission.ts delete mode 100644 packages/legacy/src/api/models/spacePermissionCreate.ts delete mode 100644 packages/legacy/src/api/models/spacePermissionCustomContent.ts delete mode 100644 packages/legacy/src/api/models/spacePermissionRequest.ts delete mode 100644 packages/legacy/src/api/models/spacePermissionV2.ts delete mode 100644 packages/legacy/src/api/models/spacePrivateCreate.ts delete mode 100644 packages/legacy/src/api/models/spaceProperty.ts delete mode 100644 packages/legacy/src/api/models/spacePropertyArray.ts delete mode 100644 packages/legacy/src/api/models/spacePropertyCreate.ts delete mode 100644 packages/legacy/src/api/models/spacePropertyCreateNoKey.ts delete mode 100644 packages/legacy/src/api/models/spacePropertyUpdate.ts delete mode 100644 packages/legacy/src/api/models/spaceSettings.ts delete mode 100644 packages/legacy/src/api/models/spaceSettingsUpdate.ts delete mode 100644 packages/legacy/src/api/models/spaceUpdate.ts delete mode 100644 packages/legacy/src/api/models/spaceWatch.ts delete mode 100644 packages/legacy/src/api/models/spaceWatchArray.ts delete mode 100644 packages/legacy/src/api/models/spaceWatchUser.ts delete mode 100644 packages/legacy/src/api/models/superBatchWebResources.ts delete mode 100644 packages/legacy/src/api/models/systemInfoEntity.ts delete mode 100644 packages/legacy/src/api/models/task.ts delete mode 100644 packages/legacy/src/api/models/taskPageResponse.ts delete mode 100644 packages/legacy/src/api/models/taskStatusUpdate.ts delete mode 100644 packages/legacy/src/api/models/theme.ts delete mode 100644 packages/legacy/src/api/models/themeArray.ts delete mode 100644 packages/legacy/src/api/models/themeNoLinks.ts delete mode 100644 packages/legacy/src/api/models/themeUpdate.ts delete mode 100644 packages/legacy/src/api/models/topNavigationLookAndFeel.ts delete mode 100644 packages/legacy/src/api/models/user.ts delete mode 100644 packages/legacy/src/api/models/userAnonymous.ts delete mode 100644 packages/legacy/src/api/models/userArray.ts delete mode 100644 packages/legacy/src/api/models/userProperty.ts delete mode 100644 packages/legacy/src/api/models/userPropertyCreate.ts delete mode 100644 packages/legacy/src/api/models/userPropertyKeyArray.ts delete mode 100644 packages/legacy/src/api/models/userPropertyUpdate.ts delete mode 100644 packages/legacy/src/api/models/userWatch.ts delete mode 100644 packages/legacy/src/api/models/usersUserKeys.ts delete mode 100644 packages/legacy/src/api/models/version.ts delete mode 100644 packages/legacy/src/api/models/versionArray.ts delete mode 100644 packages/legacy/src/api/models/versionRestore.ts delete mode 100644 packages/legacy/src/api/models/watch.ts delete mode 100644 packages/legacy/src/api/models/watchArray.ts delete mode 100644 packages/legacy/src/api/models/watchUser.ts delete mode 100644 packages/legacy/src/api/models/webResourceDependencies.ts delete mode 100644 packages/legacy/src/api/parameters/addContentWatcher.ts delete mode 100644 packages/legacy/src/api/parameters/addCustomContentPermissions.ts delete mode 100644 packages/legacy/src/api/parameters/addGroupToContentRestrictionByGroupId.ts delete mode 100644 packages/legacy/src/api/parameters/addLabelWatcher.ts delete mode 100644 packages/legacy/src/api/parameters/addLabelsToContent.ts delete mode 100644 packages/legacy/src/api/parameters/addLabelsToSpace.ts delete mode 100644 packages/legacy/src/api/parameters/addPermissionToSpace.ts delete mode 100644 packages/legacy/src/api/parameters/addRestrictions.ts delete mode 100644 packages/legacy/src/api/parameters/addSpaceWatcher.ts delete mode 100644 packages/legacy/src/api/parameters/addUserToContentRestriction.ts delete mode 100644 packages/legacy/src/api/parameters/addUserToGroup.ts delete mode 100644 packages/legacy/src/api/parameters/addUserToGroupByGroupId.ts delete mode 100644 packages/legacy/src/api/parameters/archivePages.ts delete mode 100644 packages/legacy/src/api/parameters/asyncConvertContentBodyRequest.ts delete mode 100644 packages/legacy/src/api/parameters/asyncConvertContentBodyResponse.ts delete mode 100644 packages/legacy/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts delete mode 100644 packages/legacy/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts delete mode 100644 packages/legacy/src/api/parameters/checkContentPermission.ts delete mode 100644 packages/legacy/src/api/parameters/convertContentBody.ts delete mode 100644 packages/legacy/src/api/parameters/copyPage.ts delete mode 100644 packages/legacy/src/api/parameters/copyPageHierarchy.ts delete mode 100644 packages/legacy/src/api/parameters/createAttachments.ts delete mode 100644 packages/legacy/src/api/parameters/createAuditRecord.ts delete mode 100644 packages/legacy/src/api/parameters/createContent.ts delete mode 100644 packages/legacy/src/api/parameters/createContentProperty.ts delete mode 100644 packages/legacy/src/api/parameters/createContentPropertyForKey.ts delete mode 100644 packages/legacy/src/api/parameters/createContentTemplate.ts delete mode 100644 packages/legacy/src/api/parameters/createGroup.ts delete mode 100644 packages/legacy/src/api/parameters/createOrUpdateAttachments.ts delete mode 100644 packages/legacy/src/api/parameters/createPrivateSpace.ts delete mode 100644 packages/legacy/src/api/parameters/createRelationship.ts delete mode 100644 packages/legacy/src/api/parameters/createSpace.ts delete mode 100644 packages/legacy/src/api/parameters/createSpaceProperty.ts delete mode 100644 packages/legacy/src/api/parameters/createSpacePropertyForKey.ts delete mode 100644 packages/legacy/src/api/parameters/createUserProperty.ts delete mode 100644 packages/legacy/src/api/parameters/deleteContent.ts delete mode 100644 packages/legacy/src/api/parameters/deleteContentProperty.ts delete mode 100644 packages/legacy/src/api/parameters/deleteContentVersion.ts delete mode 100644 packages/legacy/src/api/parameters/deleteGroupById.ts delete mode 100644 packages/legacy/src/api/parameters/deleteLabelFromSpace.ts delete mode 100644 packages/legacy/src/api/parameters/deletePageTree.ts delete mode 100644 packages/legacy/src/api/parameters/deleteRelationship.ts delete mode 100644 packages/legacy/src/api/parameters/deleteSpace.ts delete mode 100644 packages/legacy/src/api/parameters/deleteSpaceProperty.ts delete mode 100644 packages/legacy/src/api/parameters/deleteUserProperty.ts delete mode 100644 packages/legacy/src/api/parameters/downloadAttachment.ts delete mode 100644 packages/legacy/src/api/parameters/exportAuditRecords.ts delete mode 100644 packages/legacy/src/api/parameters/getAllLabelContent.ts delete mode 100644 packages/legacy/src/api/parameters/getAndAsyncConvertMacroBodyByMacroId.ts delete mode 100644 packages/legacy/src/api/parameters/getAndConvertMacroBodyByMacroId.ts delete mode 100644 packages/legacy/src/api/parameters/getAnonymousUser.ts delete mode 100644 packages/legacy/src/api/parameters/getAttachments.ts delete mode 100644 packages/legacy/src/api/parameters/getAuditRecords.ts delete mode 100644 packages/legacy/src/api/parameters/getAuditRecordsForTimePeriod.ts delete mode 100644 packages/legacy/src/api/parameters/getAvailableContentStates.ts delete mode 100644 packages/legacy/src/api/parameters/getBulkUserLookup.ts delete mode 100644 packages/legacy/src/api/parameters/getContent.ts delete mode 100644 packages/legacy/src/api/parameters/getContentById.ts delete mode 100644 packages/legacy/src/api/parameters/getContentByTypeForSpace.ts delete mode 100644 packages/legacy/src/api/parameters/getContentChildren.ts delete mode 100644 packages/legacy/src/api/parameters/getContentChildrenByType.ts delete mode 100644 packages/legacy/src/api/parameters/getContentComments.ts delete mode 100644 packages/legacy/src/api/parameters/getContentDescendants.ts delete mode 100644 packages/legacy/src/api/parameters/getContentForSpace.ts delete mode 100644 packages/legacy/src/api/parameters/getContentProperties.ts delete mode 100644 packages/legacy/src/api/parameters/getContentProperty.ts delete mode 100644 packages/legacy/src/api/parameters/getContentRestrictionStatusForUser.ts delete mode 100644 packages/legacy/src/api/parameters/getContentState.ts delete mode 100644 packages/legacy/src/api/parameters/getContentStateSettings.ts delete mode 100644 packages/legacy/src/api/parameters/getContentTemplate.ts delete mode 100644 packages/legacy/src/api/parameters/getContentVersion.ts delete mode 100644 packages/legacy/src/api/parameters/getContentVersions.ts delete mode 100644 packages/legacy/src/api/parameters/getContentWatchStatus.ts delete mode 100644 packages/legacy/src/api/parameters/getCurrentUser.ts delete mode 100644 packages/legacy/src/api/parameters/getDescendantsOfType.ts delete mode 100644 packages/legacy/src/api/parameters/getGroupByGroupId.ts delete mode 100644 packages/legacy/src/api/parameters/getGroupMembershipsForUser.ts delete mode 100644 packages/legacy/src/api/parameters/getGroups.ts delete mode 100644 packages/legacy/src/api/parameters/getHistoryForContent.ts delete mode 100644 packages/legacy/src/api/parameters/getIndividualGroupRestrictionStatusByGroupId.ts delete mode 100644 packages/legacy/src/api/parameters/getLabelsForContent.ts delete mode 100644 packages/legacy/src/api/parameters/getLabelsForSpace.ts delete mode 100644 packages/legacy/src/api/parameters/getLookAndFeelSettings.ts delete mode 100644 packages/legacy/src/api/parameters/getMacroBodyByMacroId.ts delete mode 100644 packages/legacy/src/api/parameters/getPrivacyUnsafeUserEmail.ts delete mode 100644 packages/legacy/src/api/parameters/getPrivacyUnsafeUserEmailBulk.ts delete mode 100644 packages/legacy/src/api/parameters/getRelationship.ts delete mode 100644 packages/legacy/src/api/parameters/getSpace.ts delete mode 100644 packages/legacy/src/api/parameters/getSpaceContentStates.ts delete mode 100644 packages/legacy/src/api/parameters/getSpaceProperties.ts delete mode 100644 packages/legacy/src/api/parameters/getSpaceProperty.ts delete mode 100644 packages/legacy/src/api/parameters/getSpaceSettings.ts delete mode 100644 packages/legacy/src/api/parameters/getSpaceTheme.ts delete mode 100644 packages/legacy/src/api/parameters/getSpaces.ts delete mode 100644 packages/legacy/src/api/parameters/getTask.ts delete mode 100644 packages/legacy/src/api/parameters/getTaskById.ts delete mode 100644 packages/legacy/src/api/parameters/getTasks.ts delete mode 100644 packages/legacy/src/api/parameters/getTheme.ts delete mode 100644 packages/legacy/src/api/parameters/getThemes.ts delete mode 100644 packages/legacy/src/api/parameters/getUser.ts delete mode 100644 packages/legacy/src/api/parameters/getUserProperty.ts delete mode 100644 packages/legacy/src/api/parameters/getViewers.ts delete mode 100644 packages/legacy/src/api/parameters/getViews.ts delete mode 100644 packages/legacy/src/api/parameters/getWatchersForSpace.ts delete mode 100644 packages/legacy/src/api/parameters/getWatchesForPage.ts delete mode 100644 packages/legacy/src/api/parameters/getWatchesForSpace.ts delete mode 100644 packages/legacy/src/api/parameters/index.ts delete mode 100644 packages/legacy/src/api/parameters/isWatchingLabel.ts delete mode 100644 packages/legacy/src/api/parameters/isWatchingSpace.ts delete mode 100644 packages/legacy/src/api/parameters/publishLegacyDraft.ts delete mode 100644 packages/legacy/src/api/parameters/publishSharedDraft.ts delete mode 100644 packages/legacy/src/api/parameters/registerModules.ts delete mode 100644 packages/legacy/src/api/parameters/removeContentState.ts delete mode 100644 packages/legacy/src/api/parameters/removeContentWatcher.ts delete mode 100644 packages/legacy/src/api/parameters/removeGroupById.ts delete mode 100644 packages/legacy/src/api/parameters/removeLabelFromContent.ts delete mode 100644 packages/legacy/src/api/parameters/removeLabelFromContentUsingQueryParameter.ts delete mode 100644 packages/legacy/src/api/parameters/removeLabelWatcher.ts delete mode 100644 packages/legacy/src/api/parameters/removeMemberFromGroup.ts delete mode 100644 packages/legacy/src/api/parameters/removeMemberFromGroupByGroupId.ts delete mode 100644 packages/legacy/src/api/parameters/removePermission.ts delete mode 100644 packages/legacy/src/api/parameters/removeSpaceWatch.ts delete mode 100644 packages/legacy/src/api/parameters/removeTemplate.ts delete mode 100644 packages/legacy/src/api/parameters/removeUserFromContentRestriction.ts delete mode 100644 packages/legacy/src/api/parameters/resetLookAndFeelSettings.ts delete mode 100644 packages/legacy/src/api/parameters/resetSpaceTheme.ts delete mode 100644 packages/legacy/src/api/parameters/restoreContentVersion.ts delete mode 100644 packages/legacy/src/api/parameters/searchContentByCQL.ts delete mode 100644 packages/legacy/src/api/parameters/searchTasks.ts delete mode 100644 packages/legacy/src/api/parameters/setContentState.ts delete mode 100644 packages/legacy/src/api/parameters/setRetentionPeriod.ts delete mode 100644 packages/legacy/src/api/parameters/setSpaceTheme.ts delete mode 100644 packages/legacy/src/api/parameters/updateAttachmentData.ts delete mode 100644 packages/legacy/src/api/parameters/updateAttachmentProperties.ts delete mode 100644 packages/legacy/src/api/parameters/updateContent.ts delete mode 100644 packages/legacy/src/api/parameters/updateContentProperty.ts delete mode 100644 packages/legacy/src/api/parameters/updateContentTemplate.ts delete mode 100644 packages/legacy/src/api/parameters/updateLookAndFeel.ts delete mode 100644 packages/legacy/src/api/parameters/updateLookAndFeelSettings.ts delete mode 100644 packages/legacy/src/api/parameters/updateRestrictions.ts delete mode 100644 packages/legacy/src/api/parameters/updateSpace.ts delete mode 100644 packages/legacy/src/api/parameters/updateSpaceProperty.ts delete mode 100644 packages/legacy/src/api/parameters/updateSpaceSettings.ts delete mode 100644 packages/legacy/src/api/parameters/updateTaskById.ts delete mode 100644 packages/legacy/src/api/parameters/updateUserProperty.ts delete mode 100644 packages/legacy/src/api/relation.ts delete mode 100644 packages/legacy/src/api/search.ts delete mode 100644 packages/legacy/src/api/settings.ts delete mode 100644 packages/legacy/src/api/space.ts delete mode 100644 packages/legacy/src/api/spacePermissions.ts delete mode 100644 packages/legacy/src/api/spaceProperties.ts delete mode 100644 packages/legacy/src/api/spaceSettings.ts delete mode 100644 packages/legacy/src/api/template.ts delete mode 100644 packages/legacy/src/api/themes.ts delete mode 100644 packages/legacy/src/api/userProperties.ts delete mode 100644 packages/legacy/src/api/users.ts delete mode 100644 packages/legacy/src/callback.ts delete mode 100644 packages/legacy/src/clients/baseClient.ts delete mode 100644 packages/legacy/src/clients/client.ts delete mode 100644 packages/legacy/src/clients/confluenceClient.ts delete mode 100644 packages/legacy/src/clients/index.ts delete mode 100644 packages/legacy/src/config.ts delete mode 100644 packages/legacy/src/index.ts delete mode 100644 packages/legacy/src/interfaces/extractBaseType.ts delete mode 100644 packages/legacy/src/interfaces/index.ts delete mode 100644 packages/legacy/src/interfaces/oneOrMany.ts delete mode 100644 packages/legacy/src/pagination.ts delete mode 100644 packages/legacy/src/paramSerializer.ts delete mode 100644 packages/legacy/src/requestConfig.ts delete mode 100644 packages/legacy/src/services/authenticationService/authenticationService.ts delete mode 100644 packages/legacy/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts delete mode 100644 packages/legacy/src/services/authenticationService/authentications/createJWTAuthentication.ts delete mode 100644 packages/legacy/src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts delete mode 100644 packages/legacy/src/services/authenticationService/authentications/index.ts delete mode 100644 packages/legacy/src/services/authenticationService/base64Encoder.ts delete mode 100644 packages/legacy/src/services/authenticationService/index.ts delete mode 100644 packages/legacy/src/services/index.ts delete mode 100644 packages/legacy/tests/integration/e2e.test.ts delete mode 100644 packages/legacy/tests/tsconfig.json delete mode 100644 packages/legacy/tests/unit/api/contentBody.test.ts delete mode 100644 packages/legacy/tests/unit/api/contentChildrenAndDescendants.test.ts delete mode 100644 packages/legacy/tests/unit/api/group.test.ts delete mode 100644 packages/legacy/tests/unit/clients/baseClient.test.ts delete mode 100644 packages/legacy/tests/unit/clients/confluenceClient.test.ts delete mode 100644 packages/legacy/tests/unit/index.test.ts delete mode 100644 packages/legacy/tsconfig.json delete mode 100644 packages/legacy/vite.config.ts delete mode 100644 packages/legacy/vitest.config.ts rename {packages/core/src => src/core}/apiError.ts (100%) rename {packages/core/src => src/core}/apiObject.ts (100%) rename {packages/core/src => src/core}/bodyToFetchBody.ts (100%) rename {packages/core/src => src/core}/createClient.ts (100%) rename {packages/core/src => src/core}/formData/attachmentInput.ts (100%) rename {packages/core/src => src/core}/formData/bufferSchema.ts (100%) rename {packages/core/src => src/core}/formData/index.ts (100%) rename {packages/core/src => src/core}/formData/multipartRequest.ts (100%) rename {packages/core/src => src/core}/index.ts (100%) rename {packages/core/src => src/core}/interfaces/client.ts (100%) rename {packages/core/src => src/core}/interfaces/index.ts (100%) rename {packages/core/src => src/core}/oauth/buildAtlassianAuthUrl.ts (100%) rename {packages/core/src => src/core}/oauth/index.ts (100%) rename {packages/core/src => src/core}/oauth/obtainAtlassianOAuthTokens.ts (100%) rename {packages/core/src => src/core}/oauth/parseAtlassianCallbackUrl.ts (100%) rename {packages/core/src => src/core}/oauth/refreshAtlassianOAuthTokens.ts (100%) rename {packages/core/src => src/core}/schemas/auth.ts (100%) rename {packages/core/src => src/core}/schemas/clientConfig.ts (100%) rename {packages/core/src => src/core}/schemas/httpMethod.ts (100%) rename {packages/core/src => src/core}/schemas/index.ts (100%) rename {packages/core/src => src/core}/schemas/sendRequestOptions.ts (100%) rename {packages/core/src => src/core}/sendRequest.ts (100%) rename {packages/core/src => src/core}/serializeSearchParams.ts (100%) rename {packages/core/src => src/core}/withRetry.ts (100%) create mode 100644 src/index.ts create mode 100644 src/v1/api/analytics.ts create mode 100644 src/v1/api/audit.ts create mode 100644 src/v1/api/content.ts create mode 100644 src/v1/api/contentAttachments.ts create mode 100644 src/v1/api/contentBody.ts create mode 100644 src/v1/api/contentChildrenAndDescendants.ts create mode 100644 src/v1/api/contentLabels.ts create mode 100644 src/v1/api/contentMacroBody.ts create mode 100644 src/v1/api/contentPermissions.ts create mode 100644 src/v1/api/contentRestrictions.ts create mode 100644 src/v1/api/contentStates.ts create mode 100644 src/v1/api/contentVersions.ts create mode 100644 src/v1/api/contentWatches.ts create mode 100644 src/v1/api/dynamicModules.ts create mode 100644 src/v1/api/experimental.ts create mode 100644 src/v1/api/group.ts create mode 100644 src/v1/api/index.ts create mode 100644 src/v1/api/labelInfo.ts create mode 100644 src/v1/api/longRunningTask.ts create mode 100644 src/v1/api/relation.ts create mode 100644 src/v1/api/search.ts create mode 100644 src/v1/api/settings.ts create mode 100644 src/v1/api/space.ts create mode 100644 src/v1/api/spacePermissions.ts create mode 100644 src/v1/api/spaceSettings.ts create mode 100644 src/v1/api/template.ts create mode 100644 src/v1/api/themes.ts create mode 100644 src/v1/api/userProperties.ts create mode 100644 src/v1/api/users.ts create mode 100644 src/v1/createV1Client.ts create mode 100644 src/v1/index.ts create mode 100644 src/v1/models/accountId.ts create mode 100644 src/v1/models/accountIdEmailRecord.ts create mode 100644 src/v1/models/accountIdEmailRecordArray.ts create mode 100644 src/v1/models/addContentRestriction.ts create mode 100644 src/v1/models/addContentRestrictionUpdateArray.ts create mode 100644 src/v1/models/affectedObject.ts create mode 100644 src/v1/models/asyncContentBody.ts create mode 100644 src/v1/models/asyncContentBodyArray.ts create mode 100644 src/v1/models/asyncId.ts create mode 100644 src/v1/models/asyncIdArray.ts create mode 100644 src/v1/models/attachmentPropertiesUpdateBody.ts create mode 100644 src/v1/models/attachmentUpdate.ts create mode 100644 src/v1/models/auditRecord.ts create mode 100644 src/v1/models/auditRecordArray.ts rename {packages/legacy/src/api => src/v1}/models/auditRecordCreate.ts (54%) create mode 100644 src/v1/models/availableContentStates.ts create mode 100644 src/v1/models/blueprintTemplate.ts create mode 100644 src/v1/models/blueprintTemplateArray.ts create mode 100644 src/v1/models/breadcrumb.ts create mode 100644 src/v1/models/bulkContentBodyConversionInput.ts create mode 100644 src/v1/models/bulkUserLookup.ts create mode 100644 src/v1/models/bulkUserLookupArray.ts create mode 100644 src/v1/models/buttonLookAndFeel.ts create mode 100644 src/v1/models/cQLPersonalDataConvertedQueries.ts create mode 100644 src/v1/models/cQLPersonalDataMigrationRequest.ts create mode 100644 src/v1/models/changedValue.ts create mode 100644 src/v1/models/connectModule.ts create mode 100644 src/v1/models/connectModules.ts create mode 100644 src/v1/models/container.ts create mode 100644 src/v1/models/containerLookAndFeel.ts create mode 100644 src/v1/models/containerSummary.ts create mode 100644 src/v1/models/content.ts create mode 100644 src/v1/models/contentArray.ts create mode 100644 src/v1/models/contentBlogpost.ts rename {packages/legacy/src/api => src/v1}/models/contentBlueprintDraft.ts (55%) create mode 100644 src/v1/models/contentBody.ts create mode 100644 src/v1/models/contentBodyConversionInput.ts create mode 100644 src/v1/models/contentBodyCreate.ts create mode 100644 src/v1/models/contentBodyCreateStorage.ts create mode 100644 src/v1/models/contentChildType.ts create mode 100644 src/v1/models/contentChildren.ts create mode 100644 src/v1/models/contentCreate.ts create mode 100644 src/v1/models/contentHistory.ts create mode 100644 src/v1/models/contentId.ts create mode 100644 src/v1/models/contentLookAndFeel.ts create mode 100644 src/v1/models/contentMetadata.ts create mode 100644 src/v1/models/contentPageResponse.ts create mode 100644 src/v1/models/contentPermissionRequest.ts create mode 100644 src/v1/models/contentProperty.ts create mode 100644 src/v1/models/contentPropertyArray.ts create mode 100644 src/v1/models/contentPropertyCreate.ts create mode 100644 src/v1/models/contentPropertyCreateNoKey.ts create mode 100644 src/v1/models/contentPropertyUpdate.ts create mode 100644 src/v1/models/contentRestriction.ts create mode 100644 src/v1/models/contentRestrictionAddOrUpdateArray.ts create mode 100644 src/v1/models/contentRestrictionArray.ts create mode 100644 src/v1/models/contentRestrictionUpdate.ts create mode 100644 src/v1/models/contentState.ts create mode 100644 src/v1/models/contentStateResponse.ts rename {packages/legacy/src/api => src/v1}/models/contentStateRestInput.ts (54%) create mode 100644 src/v1/models/contentStateSettings.ts create mode 100644 src/v1/models/contentTemplate.ts create mode 100644 src/v1/models/contentTemplateArray.ts create mode 100644 src/v1/models/contentTemplateBody.ts create mode 100644 src/v1/models/contentTemplateBodyCreate.ts create mode 100644 src/v1/models/contentTemplateCreate.ts create mode 100644 src/v1/models/contentTemplateUpdate.ts create mode 100644 src/v1/models/contentUpdate.ts create mode 100644 src/v1/models/copyPageHierarchyRequest.ts create mode 100644 src/v1/models/copyPageHierarchyTitleOptions.ts create mode 100644 src/v1/models/copyPageRequest.ts create mode 100644 src/v1/models/copyPageRequestDestination.ts create mode 100644 src/v1/models/dynamicModulesErrorMessage.ts create mode 100644 src/v1/models/embeddable.ts create mode 100644 src/v1/models/embeddedContent.ts create mode 100644 src/v1/models/genericAccountId.ts create mode 100644 src/v1/models/genericLinks.ts create mode 100644 src/v1/models/genericUserKey.ts create mode 100644 src/v1/models/genericUserName.ts create mode 100644 src/v1/models/getViewers.ts create mode 100644 src/v1/models/getViews.ts create mode 100644 src/v1/models/globalSpaceIdentifier.ts create mode 100644 src/v1/models/group.ts create mode 100644 src/v1/models/groupArray.ts create mode 100644 src/v1/models/groupArrayWithLinks.ts create mode 100644 src/v1/models/groupCreate.ts create mode 100644 src/v1/models/groupName.ts create mode 100644 src/v1/models/headerLookAndFeel.ts create mode 100644 src/v1/models/horizontalHeaderLookAndFeel.ts create mode 100644 src/v1/models/icon.ts create mode 100644 src/v1/models/index.ts create mode 100644 src/v1/models/label.ts create mode 100644 src/v1/models/labelArray.ts create mode 100644 src/v1/models/labelCreate.ts create mode 100644 src/v1/models/labelCreateArray.ts create mode 100644 src/v1/models/labelDetails.ts create mode 100644 src/v1/models/labeledContent.ts create mode 100644 src/v1/models/labeledContentPageResponse.ts create mode 100644 src/v1/models/labeledContentType.ts create mode 100644 src/v1/models/longTask.ts create mode 100644 src/v1/models/longTaskStatus.ts create mode 100644 src/v1/models/longTaskStatusArray.ts create mode 100644 src/v1/models/longTaskStatusWithLinks.ts create mode 100644 src/v1/models/lookAndFeel.ts create mode 100644 src/v1/models/lookAndFeelSelection.ts create mode 100644 src/v1/models/lookAndFeelSettings.ts create mode 100644 src/v1/models/lookAndFeelWithLinks.ts create mode 100644 src/v1/models/macroInstance.ts create mode 100644 src/v1/models/menusLookAndFeel.ts create mode 100644 src/v1/models/message.ts create mode 100644 src/v1/models/movePage.ts create mode 100644 src/v1/models/navigationLookAndFeel.ts create mode 100644 src/v1/models/operationCheckResult.ts create mode 100644 src/v1/models/permissionCheckResponse.ts create mode 100644 src/v1/models/permissionSubject.ts create mode 100644 src/v1/models/permissionSubjectWithGroupId.ts create mode 100644 src/v1/models/propertyValue.ts create mode 100644 src/v1/models/relation.ts create mode 100644 src/v1/models/relationArray.ts create mode 100644 src/v1/models/relationData.ts create mode 100644 src/v1/models/retentionPeriod.ts create mode 100644 src/v1/models/screenLookAndFeel.ts create mode 100644 src/v1/models/searchFieldLookAndFeel.ts create mode 100644 src/v1/models/searchPageResponseSearchResult.ts create mode 100644 src/v1/models/searchResult.ts create mode 100644 src/v1/models/space.ts create mode 100644 src/v1/models/spaceArray.ts rename {packages/legacy/src/api => src/v1}/models/spaceCreate.ts (50%) create mode 100644 src/v1/models/spaceDescription.ts create mode 100644 src/v1/models/spaceDescriptionCreate.ts create mode 100644 src/v1/models/spacePermission.ts create mode 100644 src/v1/models/spacePermissionCreate.ts create mode 100644 src/v1/models/spacePermissionCustomContent.ts create mode 100644 src/v1/models/spacePermissionRequest.ts create mode 100644 src/v1/models/spacePermissionV2.ts create mode 100644 src/v1/models/spaceProperty.ts create mode 100644 src/v1/models/spacePropertyArray.ts create mode 100644 src/v1/models/spacePropertyCreate.ts create mode 100644 src/v1/models/spacePropertyCreateNoKey.ts create mode 100644 src/v1/models/spacePropertyUpdate.ts create mode 100644 src/v1/models/spaceSettings.ts create mode 100644 src/v1/models/spaceSettingsUpdate.ts create mode 100644 src/v1/models/spaceUpdate.ts create mode 100644 src/v1/models/spaceWatch.ts create mode 100644 src/v1/models/spaceWatchArray.ts create mode 100644 src/v1/models/superBatchWebResources.ts create mode 100644 src/v1/models/systemInfoEntity.ts create mode 100644 src/v1/models/task.ts create mode 100644 src/v1/models/taskPageResponse.ts create mode 100644 src/v1/models/taskStatusUpdate.ts create mode 100644 src/v1/models/theme.ts create mode 100644 src/v1/models/themeArray.ts create mode 100644 src/v1/models/themeNoLinks.ts create mode 100644 src/v1/models/themeUpdate.ts create mode 100644 src/v1/models/topNavigationLookAndFeel.ts create mode 100644 src/v1/models/user.ts create mode 100644 src/v1/models/userAnonymous.ts create mode 100644 src/v1/models/userArray.ts create mode 100644 src/v1/models/userDetails.ts create mode 100644 src/v1/models/userProperty.ts create mode 100644 src/v1/models/userPropertyCreate.ts create mode 100644 src/v1/models/userPropertyKeyArray.ts create mode 100644 src/v1/models/userPropertyUpdate.ts create mode 100644 src/v1/models/userWatch.ts create mode 100644 src/v1/models/usersUserKeys.ts create mode 100644 src/v1/models/version.ts create mode 100644 src/v1/models/versionArray.ts create mode 100644 src/v1/models/versionRestore.ts create mode 100644 src/v1/models/watch.ts create mode 100644 src/v1/models/watchArray.ts create mode 100644 src/v1/models/watchUser.ts create mode 100644 src/v1/models/webResourceDependencies.ts create mode 100644 src/v1/parameters/addContentWatcher.ts create mode 100644 src/v1/parameters/addCustomContentPermissions.ts create mode 100644 src/v1/parameters/addGroupToContentRestrictionByGroupId.ts create mode 100644 src/v1/parameters/addLabelWatcher.ts create mode 100644 src/v1/parameters/addLabelsToContent.ts create mode 100644 src/v1/parameters/addLabelsToSpace.ts create mode 100644 src/v1/parameters/addPermissionToSpace.ts create mode 100644 src/v1/parameters/addRestrictions.ts create mode 100644 src/v1/parameters/addSpaceWatcher.ts create mode 100644 src/v1/parameters/addUserToContentRestriction.ts create mode 100644 src/v1/parameters/addUserToGroupByGroupId.ts create mode 100644 src/v1/parameters/archivePages.ts create mode 100644 src/v1/parameters/asyncConvertContentBodyRequest.ts create mode 100644 src/v1/parameters/asyncConvertContentBodyResponse.ts create mode 100644 src/v1/parameters/bulkAsyncConvertContentBodyRequest.ts create mode 100644 src/v1/parameters/bulkAsyncConvertContentBodyResponse.ts create mode 100644 src/v1/parameters/checkContentPermission.ts create mode 100644 src/v1/parameters/copyPage.ts create mode 100644 src/v1/parameters/copyPageHierarchy.ts create mode 100644 src/v1/parameters/createAttachment.ts create mode 100644 src/v1/parameters/createAuditRecord.ts create mode 100644 src/v1/parameters/createContentTemplate.ts create mode 100644 src/v1/parameters/createGroup.ts create mode 100644 src/v1/parameters/createOrUpdateAttachments.ts create mode 100644 src/v1/parameters/createPrivateSpace.ts create mode 100644 src/v1/parameters/createRelationship.ts create mode 100644 src/v1/parameters/createSpace.ts create mode 100644 src/v1/parameters/createUserProperty.ts create mode 100644 src/v1/parameters/deleteContentVersion.ts create mode 100644 src/v1/parameters/deleteLabelFromSpace.ts create mode 100644 src/v1/parameters/deletePageTree.ts create mode 100644 src/v1/parameters/deleteRelationship.ts rename {packages/legacy/src/api => src/v1}/parameters/deleteRestrictions.ts (52%) create mode 100644 src/v1/parameters/deleteSpace.ts create mode 100644 src/v1/parameters/deleteUserProperty.ts create mode 100644 src/v1/parameters/downloadAttatchment.ts create mode 100644 src/v1/parameters/exportAuditRecords.ts rename {packages/legacy/src/api => src/v1}/parameters/findSourcesForTarget.ts (52%) rename {packages/legacy/src/api => src/v1}/parameters/findTargetFromSource.ts (52%) create mode 100644 src/v1/parameters/getAllLabelContent.ts create mode 100644 src/v1/parameters/getAndAsyncConvertMacroBodyByMacroId.ts create mode 100644 src/v1/parameters/getAndConvertMacroBodyByMacroId.ts create mode 100644 src/v1/parameters/getAnonymousUser.ts create mode 100644 src/v1/parameters/getAuditRecords.ts create mode 100644 src/v1/parameters/getAuditRecordsForTimePeriod.ts create mode 100644 src/v1/parameters/getAvailableContentStates.ts rename {packages/legacy/src/api => src/v1}/parameters/getBlueprintTemplates.ts (50%) create mode 100644 src/v1/parameters/getBulkUserLookup.ts create mode 100644 src/v1/parameters/getContentDescendants.ts create mode 100644 src/v1/parameters/getContentRestrictionStatusForUser.ts create mode 100644 src/v1/parameters/getContentState.ts create mode 100644 src/v1/parameters/getContentStateSettings.ts create mode 100644 src/v1/parameters/getContentTemplate.ts rename {packages/legacy/src/api => src/v1}/parameters/getContentTemplates.ts (50%) create mode 100644 src/v1/parameters/getContentWatchStatus.ts rename {packages/legacy/src/api => src/v1}/parameters/getContentsWithState.ts (53%) create mode 100644 src/v1/parameters/getCurrentUser.ts create mode 100644 src/v1/parameters/getDescendantsOfType.ts create mode 100644 src/v1/parameters/getGroupByGroupId.ts rename {packages/legacy/src/api => src/v1}/parameters/getGroupMembersByGroupId.ts (55%) create mode 100644 src/v1/parameters/getGroupMembershipsForUser.ts create mode 100644 src/v1/parameters/getGroups.ts create mode 100644 src/v1/parameters/getIndividualGroupRestrictionStatusByGroupId.ts create mode 100644 src/v1/parameters/getLabelsForSpace.ts create mode 100644 src/v1/parameters/getLookAndFeelSettings.ts create mode 100644 src/v1/parameters/getMacroBodyByMacroId.ts create mode 100644 src/v1/parameters/getPrivacyUnsafeUserEmail.ts create mode 100644 src/v1/parameters/getPrivacyUnsafeUserEmailBulk.ts create mode 100644 src/v1/parameters/getRelationship.ts rename {packages/legacy/src/api => src/v1}/parameters/getRestrictions.ts (61%) rename {packages/legacy/src/api => src/v1}/parameters/getRestrictionsByOperation.ts (62%) rename {packages/legacy/src/api => src/v1}/parameters/getRestrictionsForOperation.ts (67%) create mode 100644 src/v1/parameters/getSpaceContentStates.ts create mode 100644 src/v1/parameters/getSpaceSettings.ts create mode 100644 src/v1/parameters/getSpaceTheme.ts create mode 100644 src/v1/parameters/getTask.ts create mode 100644 src/v1/parameters/getTasks.ts create mode 100644 src/v1/parameters/getTheme.ts create mode 100644 src/v1/parameters/getThemes.ts create mode 100644 src/v1/parameters/getUser.ts rename {packages/legacy/src/api => src/v1}/parameters/getUserProperties.ts (50%) create mode 100644 src/v1/parameters/getUserProperty.ts create mode 100644 src/v1/parameters/getViewers.ts create mode 100644 src/v1/parameters/getViews.ts create mode 100644 src/v1/parameters/getWatchersForSpace.ts create mode 100644 src/v1/parameters/getWatchesForPage.ts create mode 100644 src/v1/parameters/getWatchesForSpace.ts create mode 100644 src/v1/parameters/index.ts create mode 100644 src/v1/parameters/isWatchingLabel.ts create mode 100644 src/v1/parameters/isWatchingSpace.ts rename {packages/legacy/src/api => src/v1}/parameters/movePage.ts (67%) create mode 100644 src/v1/parameters/publishLegacyDraft.ts create mode 100644 src/v1/parameters/publishSharedDraft.ts create mode 100644 src/v1/parameters/registerModules.ts create mode 100644 src/v1/parameters/removeContentState.ts create mode 100644 src/v1/parameters/removeContentWatcher.ts create mode 100644 src/v1/parameters/removeGroupById.ts create mode 100644 src/v1/parameters/removeGroupFromContentRestriction.ts create mode 100644 src/v1/parameters/removeLabelFromContent.ts create mode 100644 src/v1/parameters/removeLabelFromContentUsingQueryParameter.ts create mode 100644 src/v1/parameters/removeLabelWatcher.ts create mode 100644 src/v1/parameters/removeMemberFromGroupByGroupId.ts rename {packages/legacy/src/api => src/v1}/parameters/removeModules.ts (59%) create mode 100644 src/v1/parameters/removePermission.ts create mode 100644 src/v1/parameters/removeSpaceWatch.ts create mode 100644 src/v1/parameters/removeTemplate.ts create mode 100644 src/v1/parameters/removeUserFromContentRestriction.ts create mode 100644 src/v1/parameters/resetLookAndFeelSettings.ts create mode 100644 src/v1/parameters/resetSpaceTheme.ts create mode 100644 src/v1/parameters/restoreContentVersion.ts rename {packages/legacy/src/api => src/v1}/parameters/searchByCQL.ts (53%) create mode 100644 src/v1/parameters/searchContentByCQL.ts rename {packages/legacy/src/api => src/v1}/parameters/searchGroups.ts (59%) rename {packages/legacy/src/api => src/v1}/parameters/searchUser.ts (53%) create mode 100644 src/v1/parameters/setContentState.ts create mode 100644 src/v1/parameters/setRetentionPeriod.ts create mode 100644 src/v1/parameters/setSpaceTheme.ts create mode 100644 src/v1/parameters/updateAttachmentData.ts create mode 100644 src/v1/parameters/updateAttachmentProperties.ts create mode 100644 src/v1/parameters/updateContentTemplate.ts create mode 100644 src/v1/parameters/updateLookAndFeel.ts create mode 100644 src/v1/parameters/updateLookAndFeelSettings.ts create mode 100644 src/v1/parameters/updateRestrictions.ts create mode 100644 src/v1/parameters/updateSpace.ts create mode 100644 src/v1/parameters/updateSpaceSettings.ts create mode 100644 src/v1/parameters/updateUserProperty.ts rename {packages/cloud/src => src/v2}/api/adminKey.ts (86%) rename {packages/cloud/src => src/v2}/api/ancestors.ts (85%) rename {packages/cloud/src => src/v2}/api/appProperties.ts (74%) rename {packages/cloud/src => src/v2}/api/attachment.ts (81%) rename {packages/cloud/src => src/v2}/api/blogPost.ts (83%) rename {packages/cloud/src => src/v2}/api/children.ts (88%) rename {packages/cloud/src => src/v2}/api/classificationLevel.ts (80%) rename {packages/cloud/src => src/v2}/api/comment.ts (82%) rename {packages/cloud/src => src/v2}/api/content.ts (80%) rename {packages/cloud/src => src/v2}/api/contentProperties.ts (75%) rename {packages/cloud/src => src/v2}/api/customContent.ts (82%) rename {packages/cloud/src => src/v2}/api/dataPolicies.ts (80%) rename {packages/cloud/src => src/v2}/api/database.ts (79%) rename {packages/cloud/src => src/v2}/api/descendants.ts (90%) rename {packages/cloud/src => src/v2}/api/folder.ts (79%) create mode 100644 src/v2/api/index.ts rename {packages/cloud/src => src/v2}/api/label.ts (81%) rename {packages/cloud/src => src/v2}/api/like.ts (71%) rename {packages/cloud/src => src/v2}/api/operation.ts (77%) rename {packages/cloud/src => src/v2}/api/page.ts (85%) rename {packages/cloud/src => src/v2}/api/redactions.ts (82%) rename {packages/cloud/src => src/v2}/api/smartLink.ts (80%) rename {packages/cloud/src => src/v2}/api/space.ts (82%) rename {packages/cloud/src => src/v2}/api/spacePermissionTransition.ts (82%) rename {packages/cloud/src => src/v2}/api/spacePermissions.ts (76%) rename {packages/cloud/src => src/v2}/api/spaceProperties.ts (74%) rename {packages/cloud/src => src/v2}/api/spaceRoles.ts (82%) rename {packages/cloud/src => src/v2}/api/task.ts (84%) rename {packages/cloud/src => src/v2}/api/user.ts (74%) rename {packages/cloud/src => src/v2}/api/version.ts (75%) rename {packages/cloud/src => src/v2}/api/whiteboard.ts (78%) rename packages/cloud/src/createCloud.v2Client.ts => src/v2/createV2Client.ts (96%) create mode 100644 src/v2/index.ts rename {packages/cloud/src => src/v2}/models/abstractPageLinks.ts (88%) rename {packages/cloud/src => src/v2}/models/accessByEmail.ts (88%) rename {packages/cloud/src => src/v2}/models/accountStatus.ts (100%) rename {packages/cloud/src => src/v2}/models/accountType.ts (100%) rename {packages/cloud/src => src/v2}/models/adminKey.ts (87%) rename {packages/cloud/src => src/v2}/models/ancestor.ts (67%) rename {packages/cloud/src => src/v2}/models/ancestorType.ts (100%) rename {packages/cloud/src => src/v2}/models/attachment.ts (56%) rename {packages/cloud/src => src/v2}/models/attachmentComment.ts (52%) rename {packages/cloud/src => src/v2}/models/attachmentComments.ts (59%) rename {packages/cloud/src => src/v2}/models/attachmentContentProperties.ts (61%) rename {packages/cloud/src => src/v2}/models/attachmentLabels.ts (60%) rename {packages/cloud/src => src/v2}/models/attachmentLinks.ts (85%) rename {packages/cloud/src => src/v2}/models/attachmentSortOrder.ts (100%) rename {packages/cloud/src => src/v2}/models/attachmentSummary.ts (81%) rename {packages/cloud/src => src/v2}/models/attachmentVersion.ts (81%) rename {packages/cloud/src => src/v2}/models/attachmentVersions.ts (59%) rename {packages/cloud/src => src/v2}/models/attachments.ts (57%) rename {packages/cloud/src => src/v2}/models/availableSpacePermissions.ts (61%) rename {packages/cloud/src => src/v2}/models/availableSpaceRoles.ts (60%) create mode 100644 src/v2/models/blogPost.ts rename {packages/cloud/src => src/v2}/models/blogPostBodyWrite.ts (89%) rename {packages/cloud/src => src/v2}/models/blogPostComment.ts (50%) rename {packages/cloud/src => src/v2}/models/blogPostContentStatus.ts (100%) rename {packages/cloud/src => src/v2}/models/blogPostFooterComments.ts (60%) create mode 100644 src/v2/models/blogPostInlineComment.ts rename {packages/cloud/src => src/v2}/models/blogPostInlineComments.ts (73%) rename {packages/cloud/src => src/v2}/models/blogPostLabels.ts (60%) rename {packages/cloud/src => src/v2}/models/blogPostLikeCount.ts (81%) rename {packages/cloud/src => src/v2}/models/blogPostLikeUsers.ts (61%) rename {packages/cloud/src => src/v2}/models/blogPostNestedBodyWrite.ts (53%) rename {packages/cloud/src => src/v2}/models/blogPostSortOrder.ts (100%) rename {packages/cloud/src => src/v2}/models/blogPostSummary.ts (60%) rename {packages/cloud/src => src/v2}/models/blogPostVersion.ts (81%) rename {packages/cloud/src => src/v2}/models/blogPostVersions.ts (58%) rename {packages/cloud/src => src/v2}/models/blogPosts.ts (56%) rename {packages/cloud/src => src/v2}/models/blogPostsInSpace.ts (58%) rename {packages/cloud/src => src/v2}/models/blogpostAttachments.ts (59%) rename {packages/cloud/src => src/v2}/models/blogpostContentProperties.ts (61%) create mode 100644 src/v2/models/body.ts rename {packages/cloud/src => src/v2}/models/bodySummary.ts (52%) rename {packages/cloud/src => src/v2}/models/bodyType.ts (87%) rename {packages/cloud/src => src/v2}/models/bulkAssignRoles.ts (56%) rename {packages/cloud/src => src/v2}/models/bulkRemoveAccess.ts (69%) rename {packages/cloud/src => src/v2}/models/bulkTransitionCombinationEntry.ts (89%) rename {packages/cloud/src => src/v2}/models/bulkTransitionDecodedPermission.ts (87%) rename {packages/cloud/src => src/v2}/models/bulkTransitionPrincipalTypeAssignment.ts (93%) rename {packages/cloud/src => src/v2}/models/bulkTransitionRoleAssignment.ts (71%) rename {packages/cloud/src => src/v2}/models/bulkTransitionSpaceSelection.ts (67%) rename {packages/cloud/src => src/v2}/models/bulkTransitionSpaceTarget.ts (84%) rename {packages/cloud/src => src/v2}/models/bulkTransitionTask.ts (88%) rename {packages/cloud/src => src/v2}/models/bulkTransitionTaskStatus.ts (90%) rename {packages/cloud/src => src/v2}/models/bulkUserLookup.ts (60%) rename {packages/cloud/src => src/v2}/models/childCustomContent.ts (76%) rename {packages/cloud/src => src/v2}/models/childCustomContentGet.ts (59%) rename {packages/cloud/src => src/v2}/models/childCustomContentSortOrder.ts (100%) rename {packages/cloud/src => src/v2}/models/childPage.ts (75%) rename {packages/cloud/src => src/v2}/models/childPageSortOrder.ts (100%) rename {packages/cloud/src => src/v2}/models/childPages.ts (58%) rename {packages/cloud/src => src/v2}/models/children.ts (84%) rename {packages/cloud/src => src/v2}/models/childrenComment.ts (51%) rename {packages/cloud/src => src/v2}/models/classificationLevel.ts (83%) rename {packages/cloud/src => src/v2}/models/classificationLevelColor.ts (100%) rename {packages/cloud/src => src/v2}/models/classificationLevelStatus.ts (100%) rename {packages/cloud/src => src/v2}/models/commentBodyWrite.ts (89%) rename {packages/cloud/src => src/v2}/models/commentContentProperties.ts (61%) rename {packages/cloud/src => src/v2}/models/commentLinks.ts (81%) rename {packages/cloud/src => src/v2}/models/commentNestedBodyWrite.ts (53%) rename {packages/cloud/src => src/v2}/models/commentSortOrder.ts (100%) rename {packages/cloud/src => src/v2}/models/commentVersion.ts (81%) rename {packages/cloud/src => src/v2}/models/contentIdToContentType.ts (83%) rename {packages/cloud/src => src/v2}/models/contentProperty.ts (72%) rename {packages/cloud/src => src/v2}/models/contentPropertyCreate.ts (86%) rename {packages/cloud/src => src/v2}/models/contentPropertySortOrder.ts (100%) rename {packages/cloud/src => src/v2}/models/contentPropertyUpdate.ts (90%) rename {packages/cloud/src => src/v2}/models/contentSortOrder.ts (100%) rename {packages/cloud/src => src/v2}/models/contentStatus.ts (100%) rename {packages/cloud/src => src/v2}/models/createFooterCommentModel.ts (82%) rename {packages/cloud/src => src/v2}/models/createInlineCommentModel.ts (86%) rename {packages/cloud/src => src/v2}/models/customContent.ts (52%) rename {packages/cloud/src => src/v2}/models/customContentAttachments.ts (60%) create mode 100644 src/v2/models/customContentBody.ts rename {packages/cloud/src => src/v2}/models/customContentBodyRepresentation.ts (100%) rename {packages/cloud/src => src/v2}/models/customContentBodyRepresentationSingle.ts (100%) rename {packages/cloud/src => src/v2}/models/customContentBodySummary.ts (52%) rename {packages/cloud/src => src/v2}/models/customContentBodyWrite.ts (89%) rename {packages/cloud/src => src/v2}/models/customContentByType.ts (73%) rename {packages/cloud/src => src/v2}/models/customContentByTypeInBlogPost.ts (74%) rename {packages/cloud/src => src/v2}/models/customContentByTypeInPage.ts (74%) rename {packages/cloud/src => src/v2}/models/customContentByTypeInSpace.ts (74%) rename {packages/cloud/src => src/v2}/models/customContentComment.ts (53%) rename {packages/cloud/src => src/v2}/models/customContentComments.ts (73%) rename {packages/cloud/src => src/v2}/models/customContentContentProperties.ts (62%) rename {packages/cloud/src => src/v2}/models/customContentLabels.ts (61%) rename {packages/cloud/src => src/v2}/models/customContentLinks.ts (82%) rename {packages/cloud/src => src/v2}/models/customContentNestedBodyWrite.ts (53%) rename {packages/cloud/src => src/v2}/models/customContentSortOrder.ts (100%) rename {packages/cloud/src => src/v2}/models/customContentSummary.ts (75%) rename {packages/cloud/src => src/v2}/models/customContentVersion.ts (82%) rename {packages/cloud/src => src/v2}/models/customContentVersions.ts (73%) rename {packages/cloud/src => src/v2}/models/dataPolicyMetadata.ts (87%) rename {packages/cloud/src => src/v2}/models/dataPolicySpace.ts (58%) rename {packages/cloud/src => src/v2}/models/dataPolicySpaces.ts (58%) rename {packages/cloud/src => src/v2}/models/database.ts (67%) rename {packages/cloud/src => src/v2}/models/databaseAncestors.ts (67%) rename {packages/cloud/src => src/v2}/models/databaseContentProperties.ts (61%) rename {packages/cloud/src => src/v2}/models/databaseDescendants.ts (60%) rename {packages/cloud/src => src/v2}/models/databaseDirectChildren.ts (61%) rename {packages/cloud/src => src/v2}/models/databaseLinks.ts (81%) rename {packages/cloud/src => src/v2}/models/deleteSpaceRoleResponse.ts (85%) rename {packages/cloud/src => src/v2}/models/descendants.ts (85%) rename {packages/cloud/src => src/v2}/models/detailedVersion.ts (86%) rename {packages/cloud/src => src/v2}/models/folder.ts (67%) rename {packages/cloud/src => src/v2}/models/folderAncestors.ts (66%) rename {packages/cloud/src => src/v2}/models/folderContentProperties.ts (60%) rename {packages/cloud/src => src/v2}/models/folderDescendants.ts (59%) rename {packages/cloud/src => src/v2}/models/folderDirectChildren.ts (61%) rename {packages/cloud/src => src/v2}/models/folderLinks.ts (80%) create mode 100644 src/v2/models/footerComment.ts rename {packages/cloud/src => src/v2}/models/footerCommentChildren.ts (60%) rename {packages/cloud/src => src/v2}/models/footerCommentVersions.ts (60%) rename {packages/cloud/src => src/v2}/models/footerComments.ts (58%) rename {packages/cloud/src => src/v2}/models/footerLikeCount.ts (80%) rename {packages/cloud/src => src/v2}/models/footerLikeUsers.ts (60%) rename {packages/cloud/src => src/v2}/models/forgeAppProperties.ts (80%) rename {packages/cloud/src => src/v2}/models/forgeAppProperty.ts (86%) rename {packages/cloud/src => src/v2}/models/icon.ts (86%) create mode 100644 src/v2/models/index.ts rename {packages/cloud/src => src/v2}/models/inlineComment.ts (50%) create mode 100644 src/v2/models/inlineCommentChildren.ts rename {packages/cloud/src => src/v2}/models/inlineCommentChildrenGet.ts (73%) rename {packages/cloud/src => src/v2}/models/inlineCommentProperties.ts (88%) rename {packages/cloud/src => src/v2}/models/inlineCommentResolutionStatus.ts (100%) rename {packages/cloud/src => src/v2}/models/inlineCommentVersions.ts (60%) rename {packages/cloud/src => src/v2}/models/inlineComments.ts (58%) rename {packages/cloud/src => src/v2}/models/inlineLikeCount.ts (80%) rename {packages/cloud/src => src/v2}/models/inlineLikeUsers.ts (60%) rename {packages/cloud/src => src/v2}/models/label.ts (85%) rename {packages/cloud/src => src/v2}/models/labelAttachments.ts (58%) rename {packages/cloud/src => src/v2}/models/labelBlogPosts.ts (58%) rename {packages/cloud/src => src/v2}/models/labelPages.ts (57%) rename {packages/cloud/src => src/v2}/models/labelSortOrder.ts (100%) rename {packages/cloud/src => src/v2}/models/labels.ts (57%) rename {packages/cloud/src => src/v2}/models/like.ts (77%) rename {packages/cloud/src => src/v2}/models/listSpacePermissionCombinationsResponse.ts (82%) rename {packages/cloud/src => src/v2}/models/multiEntityLinks.ts (90%) rename {packages/cloud/src => src/v2}/models/onlyArchivedAndCurrentContentStatus.ts (100%) rename {packages/cloud/src => src/v2}/models/operation.ts (85%) rename {packages/cloud/src => src/v2}/models/optionalFieldLinks.ts (85%) rename {packages/cloud/src => src/v2}/models/optionalFieldMeta.ts (90%) create mode 100644 src/v2/models/page.ts rename {packages/cloud/src => src/v2}/models/pageAncestors.ts (59%) rename {packages/cloud/src => src/v2}/models/pageAttachments.ts (58%) rename {packages/cloud/src => src/v2}/models/pageBodyWrite.ts (88%) create mode 100644 src/v2/models/pageComment.ts rename {packages/cloud/src => src/v2}/models/pageContentProperties.ts (60%) rename {packages/cloud/src => src/v2}/models/pageDescendants.ts (59%) rename {packages/cloud/src => src/v2}/models/pageDirectChildren.ts (60%) rename {packages/cloud/src => src/v2}/models/pageFooterComments.ts (60%) create mode 100644 src/v2/models/pageInlineComment.ts rename {packages/cloud/src => src/v2}/models/pageInlineComments.ts (59%) rename {packages/cloud/src => src/v2}/models/pageLabels.ts (58%) rename {packages/cloud/src => src/v2}/models/pageLikeCount.ts (80%) rename {packages/cloud/src => src/v2}/models/pageLikeUsers.ts (60%) rename {packages/cloud/src => src/v2}/models/pageNestedBodyWrite.ts (53%) rename {packages/cloud/src => src/v2}/models/pageSortOrder.ts (100%) rename {packages/cloud/src => src/v2}/models/pageSummary.ts (65%) rename {packages/cloud/src => src/v2}/models/pageVersion.ts (81%) rename {packages/cloud/src => src/v2}/models/pageVersions.ts (58%) rename {packages/cloud/src => src/v2}/models/pages.ts (56%) rename {packages/cloud/src => src/v2}/models/pagesInSpace.ts (58%) rename {packages/cloud/src => src/v2}/models/parentContentType.ts (100%) rename {packages/cloud/src => src/v2}/models/permittedOperations.ts (58%) rename {packages/cloud/src => src/v2}/models/primaryBodyRepresentation.ts (100%) rename {packages/cloud/src => src/v2}/models/primaryBodyRepresentationSingle.ts (100%) rename {packages/cloud/src => src/v2}/models/principal.ts (72%) rename {packages/cloud/src => src/v2}/models/principalType.ts (100%) rename {packages/cloud/src => src/v2}/models/redaction.ts (53%) rename {packages/cloud/src => src/v2}/models/redactionPointer.ts (94%) rename {packages/cloud/src => src/v2}/models/redactionPointerResponse.ts (93%) rename {packages/cloud/src => src/v2}/models/redactionResponse.ts (64%) rename {packages/cloud/src => src/v2}/models/redactionSection.ts (51%) rename {packages/cloud/src => src/v2}/models/roleType.ts (100%) rename {packages/cloud/src => src/v2}/models/smartLink.ts (73%) rename {packages/cloud/src => src/v2}/models/smartLinkAncestors.ts (67%) rename {packages/cloud/src => src/v2}/models/smartLinkContentProperties.ts (61%) rename {packages/cloud/src => src/v2}/models/smartLinkDescendants.ts (60%) rename {packages/cloud/src => src/v2}/models/smartLinkDirectChildren.ts (62%) rename {packages/cloud/src => src/v2}/models/smartLinkLinks.ts (81%) create mode 100644 src/v2/models/space.ts rename {packages/cloud/src => src/v2}/models/spaceContentLabels.ts (61%) rename {packages/cloud/src => src/v2}/models/spaceDescription.ts (56%) rename {packages/cloud/src => src/v2}/models/spaceDescriptionBodyRepresentation.ts (100%) rename {packages/cloud/src => src/v2}/models/spaceIcon.ts (93%) rename {packages/cloud/src => src/v2}/models/spaceLabels.ts (59%) rename {packages/cloud/src => src/v2}/models/spaceLinks.ts (80%) rename {packages/cloud/src => src/v2}/models/spacePermission.ts (81%) rename {packages/cloud/src => src/v2}/models/spacePermissionAssignment.ts (64%) rename {packages/cloud/src => src/v2}/models/spacePermissionsAssignments.ts (73%) rename {packages/cloud/src => src/v2}/models/spaceProperties.ts (58%) rename {packages/cloud/src => src/v2}/models/spaceProperty.ts (87%) rename {packages/cloud/src => src/v2}/models/spacePropertyCreate.ts (85%) rename {packages/cloud/src => src/v2}/models/spacePropertyUpdate.ts (90%) rename {packages/cloud/src => src/v2}/models/spaceRole.ts (75%) rename {packages/cloud/src => src/v2}/models/spaceRoleAssignment.ts (63%) rename {packages/cloud/src => src/v2}/models/spaceRoleAssignmentsGet.ts (74%) rename {packages/cloud/src => src/v2}/models/spaceRoleAssignmentsSet.ts (74%) rename {packages/cloud/src => src/v2}/models/spaceRoleMode.ts (83%) rename {packages/cloud/src => src/v2}/models/spaceSortOrder.ts (100%) rename {packages/cloud/src => src/v2}/models/spaceStatus.ts (100%) rename {packages/cloud/src => src/v2}/models/spaceSummary.ts (65%) rename {packages/cloud/src => src/v2}/models/spaceType.ts (100%) rename {packages/cloud/src => src/v2}/models/spaces.ts (56%) rename {packages/cloud/src => src/v2}/models/task.ts (81%) rename {packages/cloud/src => src/v2}/models/taskBody.ts (51%) rename {packages/cloud/src => src/v2}/models/tasks.ts (57%) rename {packages/cloud/src => src/v2}/models/updateFooterCommentModel.ts (67%) rename {packages/cloud/src => src/v2}/models/updateInlineCommentModel.ts (77%) rename {packages/cloud/src => src/v2}/models/updateSpaceRoleResponse.ts (83%) rename {packages/cloud/src => src/v2}/models/user.ts (72%) rename {packages/cloud/src => src/v2}/models/version.ts (88%) rename {packages/cloud/src => src/v2}/models/versionSortOrder.ts (100%) rename {packages/cloud/src => src/v2}/models/versionedEntity.ts (57%) rename {packages/cloud/src => src/v2}/models/whiteboard.ts (68%) rename {packages/cloud/src => src/v2}/models/whiteboardAncestors.ts (68%) rename {packages/cloud/src => src/v2}/models/whiteboardContentProperties.ts (61%) rename {packages/cloud/src => src/v2}/models/whiteboardDescendants.ts (61%) rename {packages/cloud/src => src/v2}/models/whiteboardDirectChildren.ts (62%) rename {packages/cloud/src => src/v2}/models/whiteboardLinks.ts (85%) rename {packages/cloud/src => src/v2}/parameters/bulkAssignSpacePermissionRoles.ts (79%) rename {packages/cloud/src => src/v2}/parameters/bulkRemoveSpacePermissionAccess.ts (79%) rename {packages/cloud/src => src/v2}/parameters/checkAccessByEmail.ts (100%) rename {packages/cloud/src => src/v2}/parameters/convertContentIdsToContentTypes.ts (100%) rename {packages/cloud/src => src/v2}/parameters/createAttachmentProperty.ts (82%) rename {packages/cloud/src => src/v2}/parameters/createBlogPost.ts (100%) rename {packages/cloud/src => src/v2}/parameters/createBlogpostProperty.ts (82%) rename {packages/cloud/src => src/v2}/parameters/createBulkUserLookup.ts (100%) rename {packages/cloud/src => src/v2}/parameters/createCommentProperty.ts (82%) rename {packages/cloud/src => src/v2}/parameters/createCustomContent.ts (100%) rename {packages/cloud/src => src/v2}/parameters/createCustomContentProperty.ts (83%) rename {packages/cloud/src => src/v2}/parameters/createDatabase.ts (100%) rename {packages/cloud/src => src/v2}/parameters/createDatabaseProperty.ts (81%) rename {packages/cloud/src => src/v2}/parameters/createFolder.ts (100%) rename {packages/cloud/src => src/v2}/parameters/createFolderProperty.ts (81%) rename {packages/cloud/src => src/v2}/parameters/createFooterComment.ts (74%) rename {packages/cloud/src => src/v2}/parameters/createInlineComment.ts (74%) rename {packages/cloud/src => src/v2}/parameters/createPage.ts (100%) rename {packages/cloud/src => src/v2}/parameters/createPageProperty.ts (81%) rename {packages/cloud/src => src/v2}/parameters/createSmartLink.ts (100%) rename {packages/cloud/src => src/v2}/parameters/createSmartLinkProperty.ts (83%) rename {packages/cloud/src => src/v2}/parameters/createSpace.ts (100%) rename {packages/cloud/src => src/v2}/parameters/createSpaceProperty.ts (82%) rename {packages/cloud/src => src/v2}/parameters/createSpaceRole.ts (100%) rename {packages/cloud/src => src/v2}/parameters/createWhiteboard.ts (100%) rename {packages/cloud/src => src/v2}/parameters/createWhiteboardProperty.ts (82%) rename {packages/cloud/src => src/v2}/parameters/deleteAttachment.ts (93%) rename {packages/cloud/src => src/v2}/parameters/deleteAttachmentPropertyById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteBlogPost.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteBlogpostPropertyById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteCommentPropertyById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteCustomContent.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteCustomContentPropertyById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteDatabase.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteDatabasePropertyById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteFolder.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteFolderPropertyById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteFooterComment.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteForgeAppProperty.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteInlineComment.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deletePage.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deletePagePropertyById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteSmartLink.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteSmartLinkPropertyById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteSpaceDefaultClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteSpacePropertyById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteSpaceRole.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteWhiteboard.ts (100%) rename {packages/cloud/src => src/v2}/parameters/deleteWhiteboardPropertyById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/enableAdminKey.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getAttachmentById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getAttachmentComments.ts (90%) rename {packages/cloud/src => src/v2}/parameters/getAttachmentContentProperties.ts (93%) rename {packages/cloud/src => src/v2}/parameters/getAttachmentContentPropertiesById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getAttachmentLabels.ts (98%) rename {packages/cloud/src => src/v2}/parameters/getAttachmentOperations.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getAttachmentThumbnailById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getAttachmentVersionDetails.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getAttachmentVersions.ts (93%) rename {packages/cloud/src => src/v2}/parameters/getAttachments.ts (94%) rename {packages/cloud/src => src/v2}/parameters/getAvailableSpacePermissions.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getAvailableSpaceRoles.ts (95%) rename {packages/cloud/src => src/v2}/parameters/getBlogPostById.ts (99%) rename {packages/cloud/src => src/v2}/parameters/getBlogPostClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getBlogPostFooterComments.ts (90%) rename {packages/cloud/src => src/v2}/parameters/getBlogPostInlineComments.ts (91%) rename {packages/cloud/src => src/v2}/parameters/getBlogPostLabels.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getBlogPostLikeCount.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getBlogPostLikeUsers.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getBlogPostOperations.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getBlogPostVersionDetails.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getBlogPostVersions.ts (89%) rename {packages/cloud/src => src/v2}/parameters/getBlogPosts.ts (92%) rename {packages/cloud/src => src/v2}/parameters/getBlogPostsInSpace.ts (91%) rename {packages/cloud/src => src/v2}/parameters/getBlogpostAttachments.ts (95%) rename {packages/cloud/src => src/v2}/parameters/getBlogpostContentProperties.ts (93%) rename {packages/cloud/src => src/v2}/parameters/getBlogpostContentPropertiesById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getChildCustomContent.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getChildPages.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getCommentContentProperties.ts (93%) rename {packages/cloud/src => src/v2}/parameters/getCommentContentPropertiesById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getCustomContentAttachments.ts (95%) rename {packages/cloud/src => src/v2}/parameters/getCustomContentById.ts (99%) rename {packages/cloud/src => src/v2}/parameters/getCustomContentByType.ts (96%) rename {packages/cloud/src => src/v2}/parameters/getCustomContentByTypeInBlogPost.ts (95%) rename {packages/cloud/src => src/v2}/parameters/getCustomContentByTypeInPage.ts (95%) rename {packages/cloud/src => src/v2}/parameters/getCustomContentByTypeInSpace.ts (99%) rename {packages/cloud/src => src/v2}/parameters/getCustomContentComments.ts (89%) rename {packages/cloud/src => src/v2}/parameters/getCustomContentContentProperties.ts (93%) rename {packages/cloud/src => src/v2}/parameters/getCustomContentContentPropertiesById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getCustomContentLabels.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getCustomContentOperations.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getCustomContentVersionDetails.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getCustomContentVersions.ts (95%) rename {packages/cloud/src => src/v2}/parameters/getDataPolicySpaces.ts (94%) rename {packages/cloud/src => src/v2}/parameters/getDatabaseAncestors.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getDatabaseById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getDatabaseClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getDatabaseContentProperties.ts (93%) rename {packages/cloud/src => src/v2}/parameters/getDatabaseContentPropertiesById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getDatabaseDescendants.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getDatabaseDirectChildren.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getDatabaseOperations.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getFolderAncestors.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getFolderById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getFolderContentProperties.ts (93%) rename {packages/cloud/src => src/v2}/parameters/getFolderContentPropertiesById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getFolderDescendants.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getFolderDirectChildren.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getFolderOperations.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getFooterCommentById.ts (99%) rename {packages/cloud/src => src/v2}/parameters/getFooterCommentChildren.ts (89%) rename {packages/cloud/src => src/v2}/parameters/getFooterCommentOperations.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getFooterCommentVersionDetails.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getFooterCommentVersions.ts (89%) rename {packages/cloud/src => src/v2}/parameters/getFooterComments.ts (88%) rename {packages/cloud/src => src/v2}/parameters/getFooterLikeCount.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getFooterLikeUsers.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getForgeAppProperties.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getForgeAppProperty.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getInlineCommentById.ts (99%) rename {packages/cloud/src => src/v2}/parameters/getInlineCommentChildren.ts (89%) rename {packages/cloud/src => src/v2}/parameters/getInlineCommentOperations.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getInlineCommentVersionDetails.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getInlineCommentVersions.ts (89%) rename {packages/cloud/src => src/v2}/parameters/getInlineComments.ts (88%) rename {packages/cloud/src => src/v2}/parameters/getInlineLikeCount.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getInlineLikeUsers.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getLabelAttachments.ts (92%) rename {packages/cloud/src => src/v2}/parameters/getLabelBlogPosts.ts (90%) rename {packages/cloud/src => src/v2}/parameters/getLabelPages.ts (90%) rename {packages/cloud/src => src/v2}/parameters/getLabels.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getPageAncestors.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getPageAttachments.ts (95%) rename {packages/cloud/src => src/v2}/parameters/getPageById.ts (99%) rename {packages/cloud/src => src/v2}/parameters/getPageClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getPageContentProperties.ts (93%) rename {packages/cloud/src => src/v2}/parameters/getPageContentPropertiesById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getPageDescendants.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getPageDirectChildren.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getPageFooterComments.ts (90%) rename {packages/cloud/src => src/v2}/parameters/getPageInlineComments.ts (91%) rename {packages/cloud/src => src/v2}/parameters/getPageLabels.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getPageLikeCount.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getPageLikeUsers.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getPageOperations.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getPageVersionDetails.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getPageVersions.ts (89%) rename {packages/cloud/src => src/v2}/parameters/getPages.ts (92%) rename {packages/cloud/src => src/v2}/parameters/getPagesInSpace.ts (92%) rename {packages/cloud/src => src/v2}/parameters/getSmartLinkAncestors.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getSmartLinkById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getSmartLinkContentProperties.ts (93%) rename {packages/cloud/src => src/v2}/parameters/getSmartLinkContentPropertiesById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getSmartLinkDescendants.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getSmartLinkDirectChildren.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getSmartLinkOperations.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getSpaceById.ts (99%) rename {packages/cloud/src => src/v2}/parameters/getSpaceContentLabels.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getSpaceDefaultClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getSpaceLabels.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getSpaceOperations.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getSpacePermissionTransitionTaskStatus.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getSpacePermissionsAssignments.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getSpaceProperties.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getSpacePropertyById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getSpaceRoleAssignments.ts (96%) rename {packages/cloud/src => src/v2}/parameters/getSpaceRolesById.ts (91%) rename {packages/cloud/src => src/v2}/parameters/getSpaces.ts (96%) rename {packages/cloud/src => src/v2}/parameters/getTaskById.ts (88%) rename {packages/cloud/src => src/v2}/parameters/getTasks.ts (97%) rename {packages/cloud/src => src/v2}/parameters/getWhiteboardAncestors.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getWhiteboardById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getWhiteboardClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getWhiteboardContentProperties.ts (93%) rename {packages/cloud/src => src/v2}/parameters/getWhiteboardContentPropertiesById.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getWhiteboardDescendants.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getWhiteboardDirectChildren.ts (100%) rename {packages/cloud/src => src/v2}/parameters/getWhiteboardOperations.ts (100%) create mode 100644 src/v2/parameters/index.ts rename {packages/cloud/src => src/v2}/parameters/inviteByEmail.ts (100%) rename {packages/cloud/src => src/v2}/parameters/listSpacePermissionCombinations.ts (100%) rename {packages/cloud/src => src/v2}/parameters/postBlogPostClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/postDatabaseClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/postPageClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/postRedactBlog.ts (100%) rename {packages/cloud/src => src/v2}/parameters/postRedactPage.ts (100%) rename {packages/cloud/src => src/v2}/parameters/postWhiteboardClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/putBlogPostClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/putDatabaseClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/putForgeAppProperty.ts (100%) rename {packages/cloud/src => src/v2}/parameters/putPageClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/putSpaceDefaultClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/putWhiteboardClassificationLevel.ts (100%) rename {packages/cloud/src => src/v2}/parameters/setSpaceRoleAssignments.ts (100%) rename {packages/cloud/src => src/v2}/parameters/updateAttachmentPropertyById.ts (85%) rename {packages/cloud/src => src/v2}/parameters/updateBlogPost.ts (100%) rename {packages/cloud/src => src/v2}/parameters/updateBlogpostPropertyById.ts (85%) rename {packages/cloud/src => src/v2}/parameters/updateCommentPropertyById.ts (85%) rename {packages/cloud/src => src/v2}/parameters/updateCustomContent.ts (100%) rename {packages/cloud/src => src/v2}/parameters/updateCustomContentPropertyById.ts (86%) rename {packages/cloud/src => src/v2}/parameters/updateDatabasePropertyById.ts (85%) rename {packages/cloud/src => src/v2}/parameters/updateFolderPropertyById.ts (85%) rename {packages/cloud/src => src/v2}/parameters/updateFooterComment.ts (100%) rename {packages/cloud/src => src/v2}/parameters/updateInlineComment.ts (80%) rename {packages/cloud/src => src/v2}/parameters/updatePage.ts (100%) rename {packages/cloud/src => src/v2}/parameters/updatePagePropertyById.ts (85%) rename {packages/cloud/src => src/v2}/parameters/updatePageTitle.ts (100%) rename {packages/cloud/src => src/v2}/parameters/updateSmartLinkPropertyById.ts (86%) rename {packages/cloud/src => src/v2}/parameters/updateSpacePropertyById.ts (85%) rename {packages/cloud/src => src/v2}/parameters/updateSpaceRole.ts (100%) rename {packages/cloud/src => src/v2}/parameters/updateTask.ts (89%) rename {packages/cloud/src => src/v2}/parameters/updateWhiteboardPropertyById.ts (85%) rename {packages/cloud/tests/integration => tests/live}/helpers/naming.ts (100%) rename {packages/cloud/tests/integration => tests/live}/helpers/poll.ts (100%) create mode 100644 tests/live/setup/client.ts rename {packages/cloud/tests/integration => tests/live}/setup/env.ts (100%) rename {packages/cloud/tests/integration => tests/live}/setup/fixtures.ts (92%) rename {packages/cloud/tests/integration => tests/live}/setup/globalSetup.ts (97%) rename {packages/cloud/tests/integration => tests/live}/setup/resources.ts (100%) rename {packages/cloud/tests/integration => tests/live/v2}/adminKey.test.ts (94%) rename {packages/cloud/tests/integration => tests/live/v2}/ancestors.test.ts (91%) rename {packages/cloud/tests/integration => tests/live/v2}/appProperties.test.ts (92%) rename {packages/cloud/tests/integration => tests/live/v2}/attachment.test.ts (97%) rename {packages/cloud/tests/integration => tests/live/v2}/blogPost.test.ts (94%) rename {packages/cloud/tests/integration => tests/live/v2}/children.test.ts (94%) rename {packages/cloud/tests/integration => tests/live/v2}/classificationLevel.test.ts (95%) rename {packages/cloud/tests/integration => tests/live/v2}/comment.test.ts (97%) rename {packages/cloud/tests/integration => tests/live/v2}/content.test.ts (94%) rename {packages/cloud/tests/integration => tests/live/v2}/contentProperties.test.ts (96%) rename {packages/cloud/tests/integration => tests/live/v2}/customContent.test.ts (97%) rename {packages/cloud/tests/integration => tests/live/v2}/dataPolicies.test.ts (93%) rename {packages/cloud/tests/integration => tests/live/v2}/database.test.ts (94%) rename {packages/cloud/tests/integration => tests/live/v2}/descendants.test.ts (92%) rename {packages/cloud/tests/integration => tests/live/v2}/folder.test.ts (94%) rename {packages/cloud/tests/integration => tests/live/v2}/label.test.ts (95%) rename {packages/cloud/tests/integration => tests/live/v2}/like.test.ts (96%) rename {packages/cloud/tests/integration => tests/live/v2}/operation.test.ts (96%) rename {packages/cloud/tests/integration => tests/live/v2}/page.test.ts (95%) rename {packages/cloud/tests/integration => tests/live/v2}/redactions.test.ts (92%) rename {packages/cloud/tests/integration => tests/live/v2}/smartLink.test.ts (95%) rename {packages/cloud/tests/integration => tests/live/v2}/space.test.ts (94%) rename {packages/cloud/tests/integration => tests/live/v2}/spacePermissionTransition.test.ts (95%) rename {packages/cloud/tests/integration => tests/live/v2}/spacePermissions.test.ts (95%) rename {packages/cloud/tests/integration => tests/live/v2}/spaceProperties.test.ts (95%) rename {packages/cloud/tests/integration => tests/live/v2}/spaceRoles.test.ts (96%) rename {packages/cloud/tests/integration => tests/live/v2}/task.test.ts (96%) rename {packages/cloud/tests/integration => tests/live/v2}/user.test.ts (94%) rename {packages/cloud/tests/integration => tests/live/v2}/version.test.ts (98%) rename {packages/cloud/tests/integration => tests/live/v2}/whiteboard.test.ts (94%) delete mode 100644 tsconfig.base.json create mode 100644 tsconfig.test.json create mode 100644 vitest.config.live.ts delete mode 100644 vitestShared.ts diff --git a/.gitignore b/.gitignore index 03570a80..b1c45858 100644 --- a/.gitignore +++ b/.gitignore @@ -1,8 +1,14 @@ .idea/ node_modules/ dist/ -docs/ coverage/ +# Generated API reference (typedoc) and the built site. The docs sources beside +# them are tracked — previously all of docs/ was ignored, which is why the site +# has no home in the repo yet. +docs/api/ +docs/.vitepress/dist/ +docs/.vitepress/cache/ + .DS_Store .env diff --git a/package.json b/package.json index 08bc3d2e..37f08986 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,39 @@ { "name": "confluence.js", "version": "3.0.0", - "private": true, - "description": "confluence.js is a powerful Node.JS/Browser module that allows you to interact with the Confluence API very easily", + "description": "Type-safe Confluence REST API client for TypeScript and JavaScript. Covers both Confluence Cloud API v2 and v1 from one package. ESM-only, tree-shakable, runtime-validated by Zod 4. Atlassian Confluence SDK for Node.js 22+ and modern browsers.", "author": "Vladislav Tupikin ", "license": "MIT", "type": "module", "sideEffects": false, + "main": "dist/index.js", + "types": "dist/index.d.ts", + "imports": { + "#/*": "./src/*" + }, + "exports": { + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js" + }, + "./package.json": "./package.json", + "./core": { + "types": "./dist/core/index.d.ts", + "import": "./dist/core/index.js" + }, + "./v1": { + "types": "./dist/v1/index.d.ts", + "import": "./dist/v1/index.js" + }, + "./v2": { + "types": "./dist/v2/index.d.ts", + "import": "./dist/v2/index.js" + } + }, + "files": [ + "dist", + "CHANGELOG.md" + ], "repository": { "type": "git", "url": "git+https://github.com/MrRefactoring/confluence.js.git" @@ -15,33 +42,76 @@ "bugs": { "url": "https://github.com/MrRefactoring/confluence.js/issues" }, - "engines": { - "node": ">=22" - }, + "keywords": [ + "confluence", + "confluence-api", + "confluence-rest-api", + "confluence-client", + "confluence-sdk", + "confluence-cloud", + "confluence-typescript", + "atlassian", + "atlassian-api", + "atlassian-confluence", + "wiki", + "api-client", + "rest-client", + "typescript", + "javascript", + "nodejs", + "browser", + "type-safe", + "esm", + "tree-shaking", + "zod", + "fetch", + "openapi", + "pages", + "spaces", + "blogposts", + "attachments", + "automation" + ], "scripts": { - "build": "pnpm -r --filter './packages/*' run build", + "build": "tsc && tsc-alias --resolve-full-paths", + "lint": "eslint src", + "typecheck": "tsc -p tsconfig.test.json", + "lint:fix": "pnpm run lint --fix", + "prettier": "prettier --write src", + "code:formatting": "pnpm run prettier && pnpm run lint:fix", "test": "vitest run", - "test:legacy": "vitest run --project legacy", - "test:cloud": "vitest run --project cloud", - "test:unit": "pnpm -r run test:unit", - "test:integration": "pnpm -r run test:integration", + "test:watch": "vitest", "test:coverage": "vitest run --coverage", - "lint": "eslint packages/*/src eslint.config.ts", - "lint:fix": "pnpm run lint --fix", - "prettier": "prettier --write packages", - "doc": "typedoc --name \"Confluence.js - Cloud and Server API library\" --out docs ./packages/cloud/src/index.ts --favicon https://bad37fb3-cb50-4e0b-9035-a3e09e8afb3b.selstorage.ru/confluence.js%2Ffavicon.svg", - "code:formatting": "pnpm -r run replace:all && pnpm run prettier", + "test:live": "vitest run --config vitest.config.live.ts", + "test:live:v1": "vitest run --config vitest.config.live.ts tests/live/v1", + "test:live:v2": "vitest run --config vitest.config.live.ts tests/live/v2", + "check:attw": "attw --pack . --profile=esm-only", + "check:consumers": "tsx scripts/check-consumers.ts", + "prepublishOnly": "pnpm run build && pnpm run lint && pnpm run check:attw", + "codemod:v2-to-v3": "jscodeshift -t tools/codemod/v2-to-v3.ts --parser ts --extensions ts,tsx,js,jsx", + "docs:api": "typedoc", + "docs:dev": "pnpm run docs:api && vitepress dev docs", + "docs:build": "pnpm run docs:api && vitepress build docs", + "docs:preview": "vitepress preview docs", "changeset": "changeset", "changeset:version": "changeset version", "changeset:status": "changeset status", - "release:publish": "pnpm publish -r --no-git-checks --provenance", + "release:publish": "pnpm publish --no-git-checks --provenance", "prepare": "husky" }, + "publishConfig": { + "access": "public", + "provenance": true + }, + "dependencies": { + "zod": "^4.4.3" + }, "devDependencies": { "@arethetypeswrong/cli": "^0.18.3", "@changesets/cli": "^2.31.0", "@eslint/js": "^10.0.1", "@stylistic/eslint-plugin": "^5.10.0", + "@types/jscodeshift": "^17.3.0", "@types/node": "^22.20.0", "@vitest/coverage-v8": "^4.1.9", "dotenv": "^17.4.2", @@ -49,15 +119,22 @@ "globals": "^17.6.0", "husky": "^9.1.7", "jiti": "^2.7.0", + "jscodeshift": "^17.3.0", "prettier": "^3.8.4", "prettier-plugin-jsdoc": "^1.8.1", "tsc-alias": "^1.8.17", + "tsx": "^4.22.5", "typedoc": "^0.28.19", + "typedoc-plugin-markdown": "^4.12.0", + "typedoc-vitepress-theme": "^1.1.3", "typescript": "^6.0.3", "typescript-eslint": "^8.61.1", "vite": "^8.0.16", - "vite-plugin-externalize-deps": "^0.10.0", + "vitepress": "^1.6.4", "vitest": "^4.1.9" }, + "engines": { + "node": ">=22" + }, "packageManager": "pnpm@11.8.0" } diff --git a/packages/cloud/package.json b/packages/cloud/package.json deleted file mode 100644 index a8e66cba..00000000 --- a/packages/cloud/package.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "@confluence.js/cloud", - "version": "0.0.1", - "private": true, - "description": "Confluence Cloud REST API v2 client", - "type": "module", - "sideEffects": false, - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js" - }, - "./package.json": "./package.json" - }, - "files": [ - "dist" - ], - "imports": { - "#/*": "./dist/*" - }, - "scripts": { - "build": "vite build && tsc --emitDeclarationOnly && tsc-alias --resolve-full-paths", - "test": "vitest run --passWithNoTests", - "test:unit": "vitest run tests/unit --passWithNoTests", - "test:integration": "vitest run tests/integration --passWithNoTests --bail=1 --hookTimeout 100000 --testTimeout 100000", - "prettier": "prettier --write src" - }, - "dependencies": { - "@confluence.js/core": "workspace:*", - "zod": "^4.4.3" - }, - "engines": { - "node": ">=22" - } -} diff --git a/packages/cloud/src/api/index.ts b/packages/cloud/src/api/index.ts deleted file mode 100644 index f106f23f..00000000 --- a/packages/cloud/src/api/index.ts +++ /dev/null @@ -1,59 +0,0 @@ -export * from './adminKey.js'; - -export * from './ancestors.js'; - -export * from './appProperties.js'; - -export * from './attachment.js'; - -export * from './blogPost.js'; - -export * from './children.js'; - -export * from './classificationLevel.js'; - -export * from './comment.js'; - -export * from './content.js'; - -export * from './contentProperties.js'; - -export * from './customContent.js'; - -export * from './dataPolicies.js'; - -export * from './database.js'; - -export * from './descendants.js'; - -export * from './folder.js'; - -export * from './label.js'; - -export * from './like.js'; - -export * from './operation.js'; - -export * from './page.js'; - -export * from './redactions.js'; - -export * from './smartLink.js'; - -export * from './space.js'; - -export * from './spacePermissionTransition.js'; - -export * from './spacePermissions.js'; - -export * from './spaceProperties.js'; - -export * from './spaceRoles.js'; - -export * from './task.js'; - -export * from './user.js'; - -export * from './version.js'; - -export * from './whiteboard.js'; diff --git a/packages/cloud/src/index.ts b/packages/cloud/src/index.ts deleted file mode 100644 index 1930483c..00000000 --- a/packages/cloud/src/index.ts +++ /dev/null @@ -1,11 +0,0 @@ -// @confluence.js/cloud — Confluence Cloud REST API v2 client. -// api / models / parameters are generated from the v2 OpenAPI spec via apis-code-gen. -// Transport is provided by the shared @confluence.js/core package. - -export * from './createCloud.v2Client.js'; - -export * as Api from './api/index.js'; - -export * as Models from './models/index.js'; - -export * as Parameters from './parameters/index.js'; diff --git a/packages/cloud/src/models/blogPost.ts b/packages/cloud/src/models/blogPost.ts deleted file mode 100644 index 4dcce2a0..00000000 --- a/packages/cloud/src/models/blogPost.ts +++ /dev/null @@ -1,58 +0,0 @@ -import { z } from 'zod'; -import { apiObject } from '@confluence.js/core'; -import { BlogPostContentStatusSchema } from '#/models/blogPostContentStatus'; -import { VersionSchema } from '#/models/version'; -import { BodySchema } from '#/models/body'; -import { LabelSchema } from '#/models/label'; -import { OptionalFieldMetaSchema } from '#/models/optionalFieldMeta'; -import { OptionalFieldLinksSchema } from '#/models/optionalFieldLinks'; -import { ContentPropertySchema } from '#/models/contentProperty'; -import { OperationSchema } from '#/models/operation'; -import { LikeSchema } from '#/models/like'; -import { AbstractPageLinksSchema } from '#/models/abstractPageLinks'; - -export const BlogPostSchema = apiObject({ - /** ID of the blog post. */ - id: z.string().optional(), - status: BlogPostContentStatusSchema.optional(), - /** Title of the blog post. */ - title: z.string().optional(), - /** ID of the space the blog post is in. */ - spaceId: z.string().optional(), - /** The account ID of the user who created this blog post originally. */ - authorId: z.string().optional(), - /** Date and time when the blog post was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ - createdAt: z.coerce.date().optional(), - version: VersionSchema.nullish(), - body: BodySchema.nullish(), - labels: apiObject({ - results: z.array(LabelSchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - properties: apiObject({ - results: z.array(ContentPropertySchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - operations: apiObject({ - results: z.array(OperationSchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - likes: apiObject({ - results: z.array(LikeSchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - versions: apiObject({ - results: z.array(VersionSchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - /** Whether the blog post has been favorited by the current user. */ - isFavoritedByCurrentUser: z.boolean().optional(), - _links: AbstractPageLinksSchema.nullish(), -}); - -export type BlogPost = z.infer; diff --git a/packages/cloud/src/models/blogPostInlineComment.ts b/packages/cloud/src/models/blogPostInlineComment.ts deleted file mode 100644 index 8941997f..00000000 --- a/packages/cloud/src/models/blogPostInlineComment.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { z } from 'zod'; -import { apiObject } from '@confluence.js/core'; -import { ContentStatusSchema } from '#/models/contentStatus'; -import { VersionSchema } from '#/models/version'; -import { BodySummarySchema } from '#/models/bodySummary'; -import { InlineCommentResolutionStatusSchema } from '#/models/inlineCommentResolutionStatus'; -import { InlineCommentPropertiesSchema } from '#/models/inlineCommentProperties'; -import { CommentLinksSchema } from '#/models/commentLinks'; - -export const BlogPostInlineCommentSchema = apiObject({ - /** ID of the comment. */ - id: z.string().optional(), - status: ContentStatusSchema.optional(), - /** Title of the comment. */ - title: z.string().optional(), - /** ID of the blog post the comment is in. */ - blogPostId: z.string().optional(), - version: VersionSchema.nullish(), - body: BodySummarySchema.nullish(), - resolutionStatus: InlineCommentResolutionStatusSchema.optional(), - properties: InlineCommentPropertiesSchema.nullish(), - _links: CommentLinksSchema.nullish(), -}); - -export type BlogPostInlineComment = z.infer; diff --git a/packages/cloud/src/models/body.ts b/packages/cloud/src/models/body.ts deleted file mode 100644 index 8cfe3f45..00000000 --- a/packages/cloud/src/models/body.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { z } from 'zod'; -import { apiObject } from '@confluence.js/core'; -import { BodyTypeSchema } from '#/models/bodyType'; -/** Contains fields for each representation type requested. */ - -export const BodySchema = apiObject({ - storage: BodyTypeSchema.nullish(), - atlas_doc_format: BodyTypeSchema.nullish(), - view: BodyTypeSchema.nullish(), -}); - -export type Body = z.infer; diff --git a/packages/cloud/src/models/customContentBody.ts b/packages/cloud/src/models/customContentBody.ts deleted file mode 100644 index 16be3d78..00000000 --- a/packages/cloud/src/models/customContentBody.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { z } from 'zod'; -import { apiObject } from '@confluence.js/core'; -import { BodyTypeSchema } from '#/models/bodyType'; -/** Contains fields for each representation type requested. */ - -export const CustomContentBodySchema = apiObject({ - raw: BodyTypeSchema.nullish(), - storage: BodyTypeSchema.nullish(), - atlas_doc_format: BodyTypeSchema.nullish(), - view: BodyTypeSchema.nullish(), -}); - -export type CustomContentBody = z.infer; diff --git a/packages/cloud/src/models/footerComment.ts b/packages/cloud/src/models/footerComment.ts deleted file mode 100644 index 092208d4..00000000 --- a/packages/cloud/src/models/footerComment.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { z } from 'zod'; -import { apiObject } from '@confluence.js/core'; -import { ContentStatusSchema } from '#/models/contentStatus'; -import { VersionSchema } from '#/models/version'; -import { ContentPropertySchema } from '#/models/contentProperty'; -import { OptionalFieldMetaSchema } from '#/models/optionalFieldMeta'; -import { OptionalFieldLinksSchema } from '#/models/optionalFieldLinks'; -import { OperationSchema } from '#/models/operation'; -import { LikeSchema } from '#/models/like'; -import { BodySchema } from '#/models/body'; -import { CommentLinksSchema } from '#/models/commentLinks'; - -export const FooterCommentSchema = apiObject({ - /** ID of the comment. */ - id: z.string().optional(), - status: ContentStatusSchema.optional(), - /** Title of the comment. */ - title: z.string().optional(), - /** ID of the blog post containing the comment if the comment is on a blog post. */ - blogPostId: z.string().optional(), - /** ID of the page containing the comment if the comment is on a page. */ - pageId: z.string().optional(), - /** ID of the attachment containing the comment if the comment is on an attachment. */ - attachmentId: z.string().optional(), - /** ID of the custom content containing the comment if the comment is on a custom content. */ - customContentId: z.string().optional(), - /** ID of the parent comment if the comment is a reply. */ - parentCommentId: z.string().optional(), - version: VersionSchema.nullish(), - properties: apiObject({ - results: z.array(ContentPropertySchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - operations: apiObject({ - results: z.array(OperationSchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - likes: apiObject({ - results: z.array(LikeSchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - versions: apiObject({ - results: z.array(VersionSchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - body: BodySchema.nullish(), - _links: CommentLinksSchema.nullish(), -}); - -export type FooterComment = z.infer; diff --git a/packages/cloud/src/models/index.ts b/packages/cloud/src/models/index.ts deleted file mode 100644 index c7e77cf8..00000000 --- a/packages/cloud/src/models/index.ts +++ /dev/null @@ -1,455 +0,0 @@ -export * from './abstractPageLinks.js'; - -export * from './accessByEmail.js'; - -export * from './accountStatus.js'; - -export * from './accountType.js'; - -export * from './adminKey.js'; - -export * from './ancestor.js'; - -export * from './ancestorType.js'; - -export * from './attachment.js'; - -export * from './attachmentComment.js'; - -export * from './attachmentComments.js'; - -export * from './attachmentContentProperties.js'; - -export * from './attachmentLabels.js'; - -export * from './attachmentLinks.js'; - -export * from './attachmentSortOrder.js'; - -export * from './attachmentSummary.js'; - -export * from './attachmentVersion.js'; - -export * from './attachmentVersions.js'; - -export * from './attachments.js'; - -export * from './availableSpacePermissions.js'; - -export * from './availableSpaceRoles.js'; - -export * from './blogPost.js'; - -export * from './blogPostBodyWrite.js'; - -export * from './blogPostComment.js'; - -export * from './blogPostContentStatus.js'; - -export * from './blogPostFooterComments.js'; - -export * from './blogPostInlineComment.js'; - -export * from './blogPostInlineComments.js'; - -export * from './blogPostLabels.js'; - -export * from './blogPostLikeCount.js'; - -export * from './blogPostLikeUsers.js'; - -export * from './blogPostNestedBodyWrite.js'; - -export * from './blogPostSortOrder.js'; - -export * from './blogPostSummary.js'; - -export * from './blogPostVersion.js'; - -export * from './blogPostVersions.js'; - -export * from './blogPosts.js'; - -export * from './blogPostsInSpace.js'; - -export * from './blogpostAttachments.js'; - -export * from './blogpostContentProperties.js'; - -export * from './body.js'; - -export * from './bodySummary.js'; - -export * from './bodyType.js'; - -export * from './bulkAssignRoles.js'; - -export * from './bulkRemoveAccess.js'; - -export * from './bulkTransitionCombinationEntry.js'; - -export * from './bulkTransitionDecodedPermission.js'; - -export * from './bulkTransitionPrincipalTypeAssignment.js'; - -export * from './bulkTransitionRoleAssignment.js'; - -export * from './bulkTransitionSpaceSelection.js'; - -export * from './bulkTransitionSpaceTarget.js'; - -export * from './bulkTransitionTask.js'; - -export * from './bulkTransitionTaskStatus.js'; - -export * from './bulkUserLookup.js'; - -export * from './childCustomContent.js'; - -export * from './childCustomContentGet.js'; - -export * from './childCustomContentSortOrder.js'; - -export * from './childPage.js'; - -export * from './childPageSortOrder.js'; - -export * from './childPages.js'; - -export * from './children.js'; - -export * from './childrenComment.js'; - -export * from './classificationLevel.js'; - -export * from './classificationLevelColor.js'; - -export * from './classificationLevelStatus.js'; - -export * from './commentBodyWrite.js'; - -export * from './commentContentProperties.js'; - -export * from './commentLinks.js'; - -export * from './commentNestedBodyWrite.js'; - -export * from './commentSortOrder.js'; - -export * from './commentVersion.js'; - -export * from './contentIdToContentType.js'; - -export * from './contentProperty.js'; - -export * from './contentPropertyCreate.js'; - -export * from './contentPropertySortOrder.js'; - -export * from './contentPropertyUpdate.js'; - -export * from './contentSortOrder.js'; - -export * from './contentStatus.js'; - -export * from './createFooterCommentModel.js'; - -export * from './createInlineCommentModel.js'; - -export * from './customContent.js'; - -export * from './customContentAttachments.js'; - -export * from './customContentBody.js'; - -export * from './customContentBodyRepresentation.js'; - -export * from './customContentBodyRepresentationSingle.js'; - -export * from './customContentBodySummary.js'; - -export * from './customContentBodyWrite.js'; - -export * from './customContentByType.js'; - -export * from './customContentByTypeInBlogPost.js'; - -export * from './customContentByTypeInPage.js'; - -export * from './customContentByTypeInSpace.js'; - -export * from './customContentComment.js'; - -export * from './customContentComments.js'; - -export * from './customContentContentProperties.js'; - -export * from './customContentLabels.js'; - -export * from './customContentLinks.js'; - -export * from './customContentNestedBodyWrite.js'; - -export * from './customContentSortOrder.js'; - -export * from './customContentSummary.js'; - -export * from './customContentVersion.js'; - -export * from './customContentVersions.js'; - -export * from './dataPolicyMetadata.js'; - -export * from './dataPolicySpace.js'; - -export * from './dataPolicySpaces.js'; - -export * from './database.js'; - -export * from './databaseAncestors.js'; - -export * from './databaseContentProperties.js'; - -export * from './databaseDescendants.js'; - -export * from './databaseDirectChildren.js'; - -export * from './databaseLinks.js'; - -export * from './deleteSpaceRoleResponse.js'; - -export * from './descendants.js'; - -export * from './detailedVersion.js'; - -export * from './folder.js'; - -export * from './folderAncestors.js'; - -export * from './folderContentProperties.js'; - -export * from './folderDescendants.js'; - -export * from './folderDirectChildren.js'; - -export * from './folderLinks.js'; - -export * from './footerComment.js'; - -export * from './footerCommentChildren.js'; - -export * from './footerCommentVersions.js'; - -export * from './footerComments.js'; - -export * from './footerLikeCount.js'; - -export * from './footerLikeUsers.js'; - -export * from './forgeAppProperties.js'; - -export * from './forgeAppProperty.js'; - -export * from './icon.js'; - -export * from './inlineComment.js'; - -export * from './inlineCommentChildren.js'; - -export * from './inlineCommentChildrenGet.js'; - -export * from './inlineCommentProperties.js'; - -export * from './inlineCommentResolutionStatus.js'; - -export * from './inlineCommentVersions.js'; - -export * from './inlineComments.js'; - -export * from './inlineLikeCount.js'; - -export * from './inlineLikeUsers.js'; - -export * from './label.js'; - -export * from './labelAttachments.js'; - -export * from './labelBlogPosts.js'; - -export * from './labelPages.js'; - -export * from './labelSortOrder.js'; - -export * from './labels.js'; - -export * from './like.js'; - -export * from './listSpacePermissionCombinationsResponse.js'; - -export * from './multiEntityLinks.js'; - -export * from './onlyArchivedAndCurrentContentStatus.js'; - -export * from './operation.js'; - -export * from './optionalFieldLinks.js'; - -export * from './optionalFieldMeta.js'; - -export * from './page.js'; - -export * from './pageAncestors.js'; - -export * from './pageAttachments.js'; - -export * from './pageBodyWrite.js'; - -export * from './pageComment.js'; - -export * from './pageContentProperties.js'; - -export * from './pageDescendants.js'; - -export * from './pageDirectChildren.js'; - -export * from './pageFooterComments.js'; - -export * from './pageInlineComment.js'; - -export * from './pageInlineComments.js'; - -export * from './pageLabels.js'; - -export * from './pageLikeCount.js'; - -export * from './pageLikeUsers.js'; - -export * from './pageNestedBodyWrite.js'; - -export * from './pageSortOrder.js'; - -export * from './pageSummary.js'; - -export * from './pageVersion.js'; - -export * from './pageVersions.js'; - -export * from './pages.js'; - -export * from './pagesInSpace.js'; - -export * from './parentContentType.js'; - -export * from './permittedOperations.js'; - -export * from './primaryBodyRepresentation.js'; - -export * from './primaryBodyRepresentationSingle.js'; - -export * from './principal.js'; - -export * from './principalType.js'; - -export * from './redaction.js'; - -export * from './redactionPointer.js'; - -export * from './redactionPointerResponse.js'; - -export * from './redactionResponse.js'; - -export * from './redactionSection.js'; - -export * from './roleType.js'; - -export * from './smartLink.js'; - -export * from './smartLinkAncestors.js'; - -export * from './smartLinkContentProperties.js'; - -export * from './smartLinkDescendants.js'; - -export * from './smartLinkDirectChildren.js'; - -export * from './smartLinkLinks.js'; - -export * from './space.js'; - -export * from './spaceContentLabels.js'; - -export * from './spaceDescription.js'; - -export * from './spaceDescriptionBodyRepresentation.js'; - -export * from './spaceIcon.js'; - -export * from './spaceLabels.js'; - -export * from './spaceLinks.js'; - -export * from './spacePermission.js'; - -export * from './spacePermissionAssignment.js'; - -export * from './spacePermissionsAssignments.js'; - -export * from './spaceProperties.js'; - -export * from './spaceProperty.js'; - -export * from './spacePropertyCreate.js'; - -export * from './spacePropertyUpdate.js'; - -export * from './spaceRole.js'; - -export * from './spaceRoleAssignment.js'; - -export * from './spaceRoleAssignmentsGet.js'; - -export * from './spaceRoleAssignmentsSet.js'; - -export * from './spaceRoleMode.js'; - -export * from './spaceSortOrder.js'; - -export * from './spaceStatus.js'; - -export * from './spaceSummary.js'; - -export * from './spaceType.js'; - -export * from './spaces.js'; - -export * from './task.js'; - -export * from './taskBody.js'; - -export * from './tasks.js'; - -export * from './updateFooterCommentModel.js'; - -export * from './updateInlineCommentModel.js'; - -export * from './updateSpaceRoleResponse.js'; - -export * from './user.js'; - -export * from './version.js'; - -export * from './versionSortOrder.js'; - -export * from './versionedEntity.js'; - -export * from './whiteboard.js'; - -export * from './whiteboardAncestors.js'; - -export * from './whiteboardContentProperties.js'; - -export * from './whiteboardDescendants.js'; - -export * from './whiteboardDirectChildren.js'; - -export * from './whiteboardLinks.js'; diff --git a/packages/cloud/src/models/inlineCommentChildren.ts b/packages/cloud/src/models/inlineCommentChildren.ts deleted file mode 100644 index 3547c912..00000000 --- a/packages/cloud/src/models/inlineCommentChildren.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { z } from 'zod'; -import { apiObject } from '@confluence.js/core'; -import { ContentStatusSchema } from '#/models/contentStatus'; -import { VersionSchema } from '#/models/version'; -import { BodySummarySchema } from '#/models/bodySummary'; -import { InlineCommentResolutionStatusSchema } from '#/models/inlineCommentResolutionStatus'; -import { InlineCommentPropertiesSchema } from '#/models/inlineCommentProperties'; -import { CommentLinksSchema } from '#/models/commentLinks'; - -export const InlineCommentChildrenSchema = apiObject({ - /** ID of the comment. */ - id: z.string().optional(), - status: ContentStatusSchema.optional(), - /** Title of the comment. */ - title: z.string().optional(), - /** ID of the parent comment the child comment is in. */ - parentCommentId: z.string().optional(), - version: VersionSchema.nullish(), - body: BodySummarySchema.nullish(), - resolutionStatus: InlineCommentResolutionStatusSchema.optional(), - properties: InlineCommentPropertiesSchema.nullish(), - _links: CommentLinksSchema.nullish(), -}); - -export type InlineCommentChildren = z.infer; diff --git a/packages/cloud/src/models/page.ts b/packages/cloud/src/models/page.ts deleted file mode 100644 index 3b126fa4..00000000 --- a/packages/cloud/src/models/page.ts +++ /dev/null @@ -1,68 +0,0 @@ -import { z } from 'zod'; -import { apiObject } from '@confluence.js/core'; -import { ContentStatusSchema } from '#/models/contentStatus'; -import { ParentContentTypeSchema } from '#/models/parentContentType'; -import { VersionSchema } from '#/models/version'; -import { BodySchema } from '#/models/body'; -import { LabelSchema } from '#/models/label'; -import { OptionalFieldMetaSchema } from '#/models/optionalFieldMeta'; -import { OptionalFieldLinksSchema } from '#/models/optionalFieldLinks'; -import { ContentPropertySchema } from '#/models/contentProperty'; -import { OperationSchema } from '#/models/operation'; -import { LikeSchema } from '#/models/like'; -import { AbstractPageLinksSchema } from '#/models/abstractPageLinks'; - -export const PageSchema = apiObject({ - /** ID of the page. */ - id: z.string().optional(), - status: ContentStatusSchema.optional(), - /** Title of the page. */ - title: z.string().optional(), - /** ID of the space the page is in. */ - spaceId: z.string().optional(), - /** ID of the parent page, or null if there is no parent page. */ - parentId: z.string().nullish(), - parentType: ParentContentTypeSchema.nullish(), - /** Position of child page within the given parent page tree. */ - position: z.number().nullish(), - /** The account ID of the user who created this page originally. */ - authorId: z.string().optional(), - /** The account ID of the user who owns this page. */ - ownerId: z.string().nullish(), - /** The account ID of the user who owned this page previously, or null if there is no previous owner. */ - lastOwnerId: z.string().nullish(), - /** Date and time when the page was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ - createdAt: z.coerce.date().optional(), - version: VersionSchema.nullish(), - body: BodySchema.nullish(), - labels: apiObject({ - results: z.array(LabelSchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - properties: apiObject({ - results: z.array(ContentPropertySchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - operations: apiObject({ - results: z.array(OperationSchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - likes: apiObject({ - results: z.array(LikeSchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - versions: apiObject({ - results: z.array(VersionSchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - /** Whether the page has been favorited by the current user. */ - isFavoritedByCurrentUser: z.boolean().optional(), - _links: AbstractPageLinksSchema.nullish(), -}); - -export type Page = z.infer; diff --git a/packages/cloud/src/models/pageComment.ts b/packages/cloud/src/models/pageComment.ts deleted file mode 100644 index d9f1a9b2..00000000 --- a/packages/cloud/src/models/pageComment.ts +++ /dev/null @@ -1,21 +0,0 @@ -import { z } from 'zod'; -import { apiObject } from '@confluence.js/core'; -import { ContentStatusSchema } from '#/models/contentStatus'; -import { VersionSchema } from '#/models/version'; -import { BodySummarySchema } from '#/models/bodySummary'; -import { CommentLinksSchema } from '#/models/commentLinks'; - -export const PageCommentSchema = apiObject({ - /** ID of the comment. */ - id: z.string().optional(), - status: ContentStatusSchema.optional(), - /** Title of the comment. */ - title: z.string().optional(), - /** ID of the page the comment is in. */ - pageId: z.string().optional(), - version: VersionSchema.nullish(), - body: BodySummarySchema.nullish(), - _links: CommentLinksSchema.nullish(), -}); - -export type PageComment = z.infer; diff --git a/packages/cloud/src/models/pageInlineComment.ts b/packages/cloud/src/models/pageInlineComment.ts deleted file mode 100644 index 19947d12..00000000 --- a/packages/cloud/src/models/pageInlineComment.ts +++ /dev/null @@ -1,25 +0,0 @@ -import { z } from 'zod'; -import { apiObject } from '@confluence.js/core'; -import { ContentStatusSchema } from '#/models/contentStatus'; -import { VersionSchema } from '#/models/version'; -import { BodySummarySchema } from '#/models/bodySummary'; -import { InlineCommentResolutionStatusSchema } from '#/models/inlineCommentResolutionStatus'; -import { InlineCommentPropertiesSchema } from '#/models/inlineCommentProperties'; -import { CommentLinksSchema } from '#/models/commentLinks'; - -export const PageInlineCommentSchema = apiObject({ - /** ID of the comment. */ - id: z.string().optional(), - status: ContentStatusSchema.optional(), - /** Title of the comment. */ - title: z.string().optional(), - /** ID of the page the comment is in. */ - pageId: z.string().optional(), - version: VersionSchema.nullish(), - body: BodySummarySchema.nullish(), - resolutionStatus: InlineCommentResolutionStatusSchema.optional(), - properties: InlineCommentPropertiesSchema.nullish(), - _links: CommentLinksSchema.nullish(), -}); - -export type PageInlineComment = z.infer; diff --git a/packages/cloud/src/models/space.ts b/packages/cloud/src/models/space.ts deleted file mode 100644 index 85d6f438..00000000 --- a/packages/cloud/src/models/space.ts +++ /dev/null @@ -1,57 +0,0 @@ -import { z } from 'zod'; -import { apiObject } from '@confluence.js/core'; -import { SpaceTypeSchema } from '#/models/spaceType'; -import { SpaceStatusSchema } from '#/models/spaceStatus'; -import { SpaceDescriptionSchema } from '#/models/spaceDescription'; -import { SpaceIconSchema } from '#/models/spaceIcon'; -import { LabelSchema } from '#/models/label'; -import { OptionalFieldMetaSchema } from '#/models/optionalFieldMeta'; -import { OptionalFieldLinksSchema } from '#/models/optionalFieldLinks'; -import { SpacePropertySchema } from '#/models/spaceProperty'; -import { OperationSchema } from '#/models/operation'; -import { SpacePermissionAssignmentSchema } from '#/models/spacePermissionAssignment'; -import { SpaceLinksSchema } from '#/models/spaceLinks'; - -export const SpaceSchema = apiObject({ - /** ID of the space. */ - id: z.string().optional(), - /** Key of the space. */ - key: z.string().optional(), - /** Name of the space. */ - name: z.string().optional(), - type: SpaceTypeSchema.optional(), - status: SpaceStatusSchema.optional(), - /** The account ID of the user who created this space originally. */ - authorId: z.string().optional(), - /** The account ID of the user who owns this space. */ - spaceOwnerId: z.string().optional(), - /** Date and time when the space was created. In format "YYYY-MM-DDTHH:mm:ss.sssZ". */ - createdAt: z.coerce.date().optional(), - /** ID of the space's homepage. */ - homepageId: z.string().optional(), - description: SpaceDescriptionSchema.nullish(), - icon: SpaceIconSchema.nullish(), - labels: apiObject({ - results: z.array(LabelSchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - properties: apiObject({ - results: z.array(SpacePropertySchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - operations: apiObject({ - results: z.array(OperationSchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - permissions: apiObject({ - results: z.array(SpacePermissionAssignmentSchema).nullish(), - meta: OptionalFieldMetaSchema.nullish(), - _links: OptionalFieldLinksSchema.nullish(), - }).nullish(), - _links: SpaceLinksSchema.nullish(), -}); - -export type Space = z.infer; diff --git a/packages/cloud/src/parameters/index.ts b/packages/cloud/src/parameters/index.ts deleted file mode 100644 index 615a1e35..00000000 --- a/packages/cloud/src/parameters/index.ts +++ /dev/null @@ -1,423 +0,0 @@ -export * from './bulkAssignSpacePermissionRoles.js'; - -export * from './bulkRemoveSpacePermissionAccess.js'; - -export * from './checkAccessByEmail.js'; - -export * from './convertContentIdsToContentTypes.js'; - -export * from './createAttachmentProperty.js'; - -export * from './createBlogPost.js'; - -export * from './createBlogpostProperty.js'; - -export * from './createBulkUserLookup.js'; - -export * from './createCommentProperty.js'; - -export * from './createCustomContent.js'; - -export * from './createCustomContentProperty.js'; - -export * from './createDatabase.js'; - -export * from './createDatabaseProperty.js'; - -export * from './createFolder.js'; - -export * from './createFolderProperty.js'; - -export * from './createFooterComment.js'; - -export * from './createInlineComment.js'; - -export * from './createPage.js'; - -export * from './createPageProperty.js'; - -export * from './createSmartLink.js'; - -export * from './createSmartLinkProperty.js'; - -export * from './createSpace.js'; - -export * from './createSpaceProperty.js'; - -export * from './createSpaceRole.js'; - -export * from './createWhiteboard.js'; - -export * from './createWhiteboardProperty.js'; - -export * from './deleteAttachment.js'; - -export * from './deleteAttachmentPropertyById.js'; - -export * from './deleteBlogPost.js'; - -export * from './deleteBlogpostPropertyById.js'; - -export * from './deleteCommentPropertyById.js'; - -export * from './deleteCustomContent.js'; - -export * from './deleteCustomContentPropertyById.js'; - -export * from './deleteDatabase.js'; - -export * from './deleteDatabasePropertyById.js'; - -export * from './deleteFolder.js'; - -export * from './deleteFolderPropertyById.js'; - -export * from './deleteFooterComment.js'; - -export * from './deleteForgeAppProperty.js'; - -export * from './deleteInlineComment.js'; - -export * from './deletePage.js'; - -export * from './deletePagePropertyById.js'; - -export * from './deleteSmartLink.js'; - -export * from './deleteSmartLinkPropertyById.js'; - -export * from './deleteSpaceDefaultClassificationLevel.js'; - -export * from './deleteSpacePropertyById.js'; - -export * from './deleteSpaceRole.js'; - -export * from './deleteWhiteboard.js'; - -export * from './deleteWhiteboardPropertyById.js'; - -export * from './enableAdminKey.js'; - -export * from './getAttachmentById.js'; - -export * from './getAttachmentComments.js'; - -export * from './getAttachmentContentProperties.js'; - -export * from './getAttachmentContentPropertiesById.js'; - -export * from './getAttachmentLabels.js'; - -export * from './getAttachmentOperations.js'; - -export * from './getAttachmentThumbnailById.js'; - -export * from './getAttachmentVersionDetails.js'; - -export * from './getAttachmentVersions.js'; - -export * from './getAttachments.js'; - -export * from './getAvailableSpacePermissions.js'; - -export * from './getAvailableSpaceRoles.js'; - -export * from './getBlogPostById.js'; - -export * from './getBlogPostClassificationLevel.js'; - -export * from './getBlogPostFooterComments.js'; - -export * from './getBlogPostInlineComments.js'; - -export * from './getBlogPostLabels.js'; - -export * from './getBlogPostLikeCount.js'; - -export * from './getBlogPostLikeUsers.js'; - -export * from './getBlogPostOperations.js'; - -export * from './getBlogPostVersionDetails.js'; - -export * from './getBlogPostVersions.js'; - -export * from './getBlogPosts.js'; - -export * from './getBlogPostsInSpace.js'; - -export * from './getBlogpostAttachments.js'; - -export * from './getBlogpostContentProperties.js'; - -export * from './getBlogpostContentPropertiesById.js'; - -export * from './getChildCustomContent.js'; - -export * from './getChildPages.js'; - -export * from './getCommentContentProperties.js'; - -export * from './getCommentContentPropertiesById.js'; - -export * from './getCustomContentAttachments.js'; - -export * from './getCustomContentById.js'; - -export * from './getCustomContentByType.js'; - -export * from './getCustomContentByTypeInBlogPost.js'; - -export * from './getCustomContentByTypeInPage.js'; - -export * from './getCustomContentByTypeInSpace.js'; - -export * from './getCustomContentComments.js'; - -export * from './getCustomContentContentProperties.js'; - -export * from './getCustomContentContentPropertiesById.js'; - -export * from './getCustomContentLabels.js'; - -export * from './getCustomContentOperations.js'; - -export * from './getCustomContentVersionDetails.js'; - -export * from './getCustomContentVersions.js'; - -export * from './getDataPolicySpaces.js'; - -export * from './getDatabaseAncestors.js'; - -export * from './getDatabaseById.js'; - -export * from './getDatabaseClassificationLevel.js'; - -export * from './getDatabaseContentProperties.js'; - -export * from './getDatabaseContentPropertiesById.js'; - -export * from './getDatabaseDescendants.js'; - -export * from './getDatabaseDirectChildren.js'; - -export * from './getDatabaseOperations.js'; - -export * from './getFolderAncestors.js'; - -export * from './getFolderById.js'; - -export * from './getFolderContentProperties.js'; - -export * from './getFolderContentPropertiesById.js'; - -export * from './getFolderDescendants.js'; - -export * from './getFolderDirectChildren.js'; - -export * from './getFolderOperations.js'; - -export * from './getFooterCommentById.js'; - -export * from './getFooterCommentChildren.js'; - -export * from './getFooterCommentOperations.js'; - -export * from './getFooterCommentVersionDetails.js'; - -export * from './getFooterCommentVersions.js'; - -export * from './getFooterComments.js'; - -export * from './getFooterLikeCount.js'; - -export * from './getFooterLikeUsers.js'; - -export * from './getForgeAppProperties.js'; - -export * from './getForgeAppProperty.js'; - -export * from './getInlineCommentById.js'; - -export * from './getInlineCommentChildren.js'; - -export * from './getInlineCommentOperations.js'; - -export * from './getInlineCommentVersionDetails.js'; - -export * from './getInlineCommentVersions.js'; - -export * from './getInlineComments.js'; - -export * from './getInlineLikeCount.js'; - -export * from './getInlineLikeUsers.js'; - -export * from './getLabelAttachments.js'; - -export * from './getLabelBlogPosts.js'; - -export * from './getLabelPages.js'; - -export * from './getLabels.js'; - -export * from './getPageAncestors.js'; - -export * from './getPageAttachments.js'; - -export * from './getPageById.js'; - -export * from './getPageClassificationLevel.js'; - -export * from './getPageContentProperties.js'; - -export * from './getPageContentPropertiesById.js'; - -export * from './getPageDescendants.js'; - -export * from './getPageDirectChildren.js'; - -export * from './getPageFooterComments.js'; - -export * from './getPageInlineComments.js'; - -export * from './getPageLabels.js'; - -export * from './getPageLikeCount.js'; - -export * from './getPageLikeUsers.js'; - -export * from './getPageOperations.js'; - -export * from './getPageVersionDetails.js'; - -export * from './getPageVersions.js'; - -export * from './getPages.js'; - -export * from './getPagesInSpace.js'; - -export * from './getSmartLinkAncestors.js'; - -export * from './getSmartLinkById.js'; - -export * from './getSmartLinkContentProperties.js'; - -export * from './getSmartLinkContentPropertiesById.js'; - -export * from './getSmartLinkDescendants.js'; - -export * from './getSmartLinkDirectChildren.js'; - -export * from './getSmartLinkOperations.js'; - -export * from './getSpaceById.js'; - -export * from './getSpaceContentLabels.js'; - -export * from './getSpaceDefaultClassificationLevel.js'; - -export * from './getSpaceLabels.js'; - -export * from './getSpaceOperations.js'; - -export * from './getSpacePermissionTransitionTaskStatus.js'; - -export * from './getSpacePermissionsAssignments.js'; - -export * from './getSpaceProperties.js'; - -export * from './getSpacePropertyById.js'; - -export * from './getSpaceRoleAssignments.js'; - -export * from './getSpaceRolesById.js'; - -export * from './getSpaces.js'; - -export * from './getTaskById.js'; - -export * from './getTasks.js'; - -export * from './getWhiteboardAncestors.js'; - -export * from './getWhiteboardById.js'; - -export * from './getWhiteboardClassificationLevel.js'; - -export * from './getWhiteboardContentProperties.js'; - -export * from './getWhiteboardContentPropertiesById.js'; - -export * from './getWhiteboardDescendants.js'; - -export * from './getWhiteboardDirectChildren.js'; - -export * from './getWhiteboardOperations.js'; - -export * from './inviteByEmail.js'; - -export * from './listSpacePermissionCombinations.js'; - -export * from './postBlogPostClassificationLevel.js'; - -export * from './postDatabaseClassificationLevel.js'; - -export * from './postPageClassificationLevel.js'; - -export * from './postRedactBlog.js'; - -export * from './postRedactPage.js'; - -export * from './postWhiteboardClassificationLevel.js'; - -export * from './putBlogPostClassificationLevel.js'; - -export * from './putDatabaseClassificationLevel.js'; - -export * from './putForgeAppProperty.js'; - -export * from './putPageClassificationLevel.js'; - -export * from './putSpaceDefaultClassificationLevel.js'; - -export * from './putWhiteboardClassificationLevel.js'; - -export * from './setSpaceRoleAssignments.js'; - -export * from './updateAttachmentPropertyById.js'; - -export * from './updateBlogPost.js'; - -export * from './updateBlogpostPropertyById.js'; - -export * from './updateCommentPropertyById.js'; - -export * from './updateCustomContent.js'; - -export * from './updateCustomContentPropertyById.js'; - -export * from './updateDatabasePropertyById.js'; - -export * from './updateFolderPropertyById.js'; - -export * from './updateFooterComment.js'; - -export * from './updateInlineComment.js'; - -export * from './updatePage.js'; - -export * from './updatePagePropertyById.js'; - -export * from './updatePageTitle.js'; - -export * from './updateSmartLinkPropertyById.js'; - -export * from './updateSpacePropertyById.js'; - -export * from './updateSpaceRole.js'; - -export * from './updateTask.js'; - -export * from './updateWhiteboardPropertyById.js'; diff --git a/packages/cloud/tests/integration/setup/client.ts b/packages/cloud/tests/integration/setup/client.ts deleted file mode 100644 index 8cb8e64f..00000000 --- a/packages/cloud/tests/integration/setup/client.ts +++ /dev/null @@ -1,88 +0,0 @@ -/** - * Shared live clients for the cloud integration suite. - * - * Every suite calls {@link getLiveClient} in `beforeAll` rather than constructing - * its own client, so retry/auth policy is defined once. A second, thin v1 REST - * helper ({@link v1Request}) covers the handful of operations the v2 API does not - * expose but the tests still need — deleting a space and uploading an attachment. - */ -import { createCloudV2Client } from '@confluence.js/cloud'; -import { requireLiveEnv } from './env'; - -type CloudV2Client = ReturnType; - -let cachedClient: CloudV2Client | null = null; - -/** - * Singleton v2 client pointed at `${HOST}/wiki/api/v2`. - * - * `retry` rides out the occasional transient TLS reset / 5xx Atlassian Cloud - * throws without masking real 4xx failures. - */ -export function getLiveClient(): CloudV2Client { - if (!cachedClient) { - const { host, email, apiToken } = requireLiveEnv(); - - cachedClient = createCloudV2Client({ - host: `${host}/wiki/api/v2`, - auth: { type: 'basic', email, apiToken }, - retry: { maxAttempts: 3, initialDelayMs: 300 }, - }); - } - - return cachedClient; -} - -/** Basic-auth header value for raw v1 REST calls. */ -function authHeader(): string { - const { email, apiToken } = requireLiveEnv(); - - return `Basic ${Buffer.from(`${email}:${apiToken}`).toString('base64')}`; -} - -export interface V1RequestOptions { - method?: string; - /** JSON body — serialized and sent with `Content-Type: application/json`. */ - body?: unknown; - /** Pre-built body (e.g. `FormData`) sent as-is; takes precedence over `body`. */ - raw?: BodyInit; - headers?: Record; -} - -/** - * Minimal authenticated fetch against the v1 REST API - * (`${HOST}/wiki/rest/api/`). Used only for the gaps in v2 — chiefly - * `DELETE /space/{key}` (v2 has no deleteSpace) and multipart attachment upload. - * Returns the parsed JSON body, or the raw `Response` for callers that need the - * status. Throws on a non-2xx response with the status and body text. - */ -export async function v1Request(path: string, options: V1RequestOptions = {}): Promise { - const { host } = requireLiveEnv(); - const headers: Record = { - Authorization: authHeader(), - Accept: 'application/json', - ...options.headers, - }; - - let body: BodyInit | undefined = options.raw; - - if (body === undefined && options.body !== undefined) { - body = JSON.stringify(options.body); - headers['Content-Type'] = 'application/json'; - } - - const response = await fetch(`${host}/wiki/rest/api/${path.replace(/^\/+/, '')}`, { - method: options.method ?? 'GET', - headers, - body, - }); - - if (!response.ok) { - const text = await response.text().catch(() => ''); - throw new Error(`v1 ${options.method ?? 'GET'} ${path} → ${response.status} ${response.statusText} ${text}`); - } - - const text = await response.text(); - - return (text ? JSON.parse(text) : undefined) as T; -} diff --git a/packages/cloud/tests/tsconfig.json b/packages/cloud/tests/tsconfig.json deleted file mode 100644 index 56ad12ac..00000000 --- a/packages/cloud/tests/tsconfig.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "noEmit": true, - "skipLibCheck": true, - "types": ["node"], - "paths": { - "#/*": ["../src/*"], - "@confluence.js/cloud": ["../src/index.ts"] - } - }, - "include": ["integration", "unit"] -} diff --git a/packages/cloud/tsconfig.json b/packages/cloud/tsconfig.json deleted file mode 100644 index bd55e759..00000000 --- a/packages/cloud/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "dist", - "paths": { - "#/*": ["./src/*"] - } - }, - "include": ["src"], - "exclude": ["node_modules", "dist"] -} diff --git a/packages/cloud/vite.config.ts b/packages/cloud/vite.config.ts deleted file mode 100644 index abdf927e..00000000 --- a/packages/cloud/vite.config.ts +++ /dev/null @@ -1,38 +0,0 @@ -import { dirname, resolve } from 'node:path'; -import { fileURLToPath } from 'node:url'; -import { defineConfig } from 'vite'; -import { externalizeDeps } from 'vite-plugin-externalize-deps'; - -const __dirname = dirname(fileURLToPath(import.meta.url)); -const srcRoot = resolve(__dirname, 'src'); -const distRoot = resolve(__dirname, 'dist'); - -export default defineConfig({ - plugins: [externalizeDeps()], - resolve: { - alias: { - '#/': `${srcRoot}/`, - }, - }, - build: { - ssr: true, - copyPublicDir: false, - emptyOutDir: true, - sourcemap: true, - lib: { - entry: resolve(__dirname, 'src/index.ts'), - }, - rolldownOptions: { - output: [ - { - format: 'es', - dir: distRoot, - entryFileNames: '[name].js', - chunkFileNames: '[name].js', - preserveModules: true, - preserveModulesRoot: srcRoot, - }, - ], - }, - }, -}); diff --git a/packages/cloud/vitest.config.ts b/packages/cloud/vitest.config.ts deleted file mode 100644 index 77f2c501..00000000 --- a/packages/cloud/vitest.config.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { dirname, resolve } from 'node:path'; -import { fileURLToPath } from 'node:url'; -import { loadEnv } from 'vite'; -import { defineConfig, mergeConfig } from 'vitest/config'; -import { vitestShared } from '../../vitestShared'; - -const __dirname = dirname(fileURLToPath(import.meta.url)); -const repoRoot = resolve(__dirname, '../..'); - -export default defineConfig(({ mode }) => - mergeConfig( - vitestShared, - defineConfig({ - resolve: { - alias: { - '#/': `${resolve(__dirname, 'src')}/`, - '@confluence.js/cloud': resolve(__dirname, 'src/index.ts'), - }, - }, - test: { - name: 'cloud', - root: __dirname, - include: ['tests/**/*.test.ts'], - env: loadEnv(mode, repoRoot, ''), - // Live suites hit a single shared Confluence Cloud site: run every test - // file serially in one worker ("queued") so suites never race each other - // for rate limits or step on shared state. The global setup sweeps any - // marker-tagged spaces a crashed run left behind. - globalSetup: ['./tests/integration/setup/globalSetup.ts'], - fileParallelism: false, - }, - }), - ), -); diff --git a/packages/core/package.json b/packages/core/package.json deleted file mode 100644 index 00a02a0e..00000000 --- a/packages/core/package.json +++ /dev/null @@ -1,31 +0,0 @@ -{ - "name": "@confluence.js/core", - "version": "0.0.1", - "private": true, - "description": "Shared HTTP client, configuration, and utilities for confluence.js packages", - "type": "module", - "sideEffects": false, - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js" - }, - "./package.json": "./package.json" - }, - "files": [ - "dist" - ], - "scripts": { - "build": "vite build && tsc --emitDeclarationOnly && tsc-alias --resolve-full-paths", - "test": "vitest run --passWithNoTests", - "test:unit": "vitest run tests/unit --passWithNoTests" - }, - "dependencies": { - "zod": "^4.4.3" - }, - "engines": { - "node": ">=22" - } -} diff --git a/packages/core/tsconfig.json b/packages/core/tsconfig.json deleted file mode 100644 index 4e2f9872..00000000 --- a/packages/core/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "dist" - }, - "include": ["src"], - "exclude": ["node_modules", "dist"] -} diff --git a/packages/core/vite.config.ts b/packages/core/vite.config.ts deleted file mode 100644 index c6b36a1d..00000000 --- a/packages/core/vite.config.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { dirname, resolve } from 'node:path'; -import { fileURLToPath } from 'node:url'; -import { defineConfig } from 'vite'; -import { externalizeDeps } from 'vite-plugin-externalize-deps'; - -const __dirname = dirname(fileURLToPath(import.meta.url)); -const srcRoot = resolve(__dirname, 'src'); -const distRoot = resolve(__dirname, 'dist'); - -export default defineConfig({ - plugins: [externalizeDeps()], - build: { - ssr: true, - copyPublicDir: false, - emptyOutDir: true, - sourcemap: true, - lib: { - entry: resolve(__dirname, 'src/index.ts'), - }, - rolldownOptions: { - output: [ - { - format: 'es', - dir: distRoot, - entryFileNames: '[name].js', - chunkFileNames: '[name].js', - preserveModules: true, - preserveModulesRoot: srcRoot, - }, - ], - }, - }, -}); diff --git a/packages/legacy/package.json b/packages/legacy/package.json deleted file mode 100644 index 432f1939..00000000 --- a/packages/legacy/package.json +++ /dev/null @@ -1,43 +0,0 @@ -{ - "name": "@confluence.js/legacy", - "version": "0.0.1", - "private": true, - "description": "Confluence Cloud REST API v1 client (legacy)", - "type": "module", - "sideEffects": false, - "main": "./dist/index.js", - "types": "./dist/index.d.ts", - "exports": { - ".": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js" - }, - "./package.json": "./package.json" - }, - "files": [ - "dist" - ], - "scripts": { - "build": "vite build && tsc --emitDeclarationOnly && tsc-alias --resolve-full-paths", - "test": "vitest run", - "test:unit": "vitest run tests/unit", - "test:integration": "vitest run tests/integration --bail=1 --hookTimeout 100000 --testTimeout 100000", - "prettier": "prettier --write src", - "replace:wiki-rest": "grep -rl '/wiki/rest' src/api | xargs sed -i '' 's|/wiki/rest||g'", - "replace:all": "pnpm run replace:wiki-rest" - }, - "dependencies": { - "@atlassian/atlassian-jwt": "^2.2.0", - "axios": "^1.10.0", - "form-data": "^4.0.3", - "oauth": "^0.10.2", - "zod": "^3.25.76" - }, - "devDependencies": { - "@types/express": "^4.17.23", - "@types/oauth": "^0.9.6" - }, - "engines": { - "node": ">=22" - } -} diff --git a/packages/legacy/src/api/analytics.ts b/packages/legacy/src/api/analytics.ts deleted file mode 100644 index f9bc594d..00000000 --- a/packages/legacy/src/api/analytics.ts +++ /dev/null @@ -1,44 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class Analytics { - constructor(private client: Client) {} - - /** Get the total number of views a piece of content has. */ - async getViews(parameters: Parameters.GetViews, callback: Callback): Promise; - /** Get the total number of views a piece of content has. */ - async getViews(parameters: Parameters.GetViews, callback?: never): Promise; - async getViews(parameters: Parameters.GetViews, callback?: Callback): Promise { - const config: RequestConfig = { - url: `/api/analytics/content/${parameters.contentId}/views`, - method: 'GET', - params: { - fromDate: parameters.fromDate, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** Get the total number of distinct viewers a piece of content has. */ - async getViewers(parameters: Parameters.GetViewers, callback: Callback): Promise; - /** Get the total number of distinct viewers a piece of content has. */ - async getViewers(parameters: Parameters.GetViewers, callback?: never): Promise; - async getViewers( - parameters: Parameters.GetViewers, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/analytics/content/${parameters.contentId}/viewers`, - method: 'GET', - params: { - fromDate: parameters.fromDate, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/audit.ts b/packages/legacy/src/api/audit.ts deleted file mode 100644 index d631173c..00000000 --- a/packages/legacy/src/api/audit.ts +++ /dev/null @@ -1,241 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class Audit { - constructor(private client: Client) {} - - /** - * Returns all records in the audit log, optionally for a certain date range. This contains information about events - * like space exports, group membership changes, app installations, etc. For more information, see [Audit - * log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the Confluence administrator's guide. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global - * permission. - */ - async getAuditRecords( - parameters: Parameters.GetAuditRecords | undefined, - callback: Callback, - ): Promise; - /** - * Returns all records in the audit log, optionally for a certain date range. This contains information about events - * like space exports, group membership changes, app installations, etc. For more information, see [Audit - * log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the Confluence administrator's guide. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global - * permission. - */ - async getAuditRecords( - parameters?: Parameters.GetAuditRecords, - callback?: never, - ): Promise; - async getAuditRecords( - parameters?: Parameters.GetAuditRecords, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/audit', - method: 'GET', - params: { - startDate: parameters?.startDate, - endDate: parameters?.endDate, - searchString: parameters?.searchString, - start: parameters?.start, - limit: parameters?.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Creates a record in the audit log. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global - * permission. - */ - async createAuditRecord( - parameters: Parameters.CreateAuditRecord | undefined, - callback: Callback, - ): Promise; - /** - * Creates a record in the audit log. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global - * permission. - */ - async createAuditRecord( - parameters?: Parameters.CreateAuditRecord, - callback?: never, - ): Promise; - async createAuditRecord( - parameters?: Parameters.CreateAuditRecord, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/audit', - method: 'POST', - data: { - author: parameters?.author, - remoteAddress: parameters?.remoteAddress, - creationDate: parameters?.creationDate, - summary: parameters?.summary, - description: parameters?.description, - category: parameters?.category, - sysAdmin: parameters?.sysAdmin, - affectedObject: parameters?.affectedObject, - changedValues: parameters?.changedValues, - associatedObjects: parameters?.associatedObjects, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Exports audit records as a CSV file or ZIP file. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global - * permission. - */ - async exportAuditRecords( - parameters: Parameters.ExportAuditRecords | undefined, - callback: Callback, - ): Promise; - /** - * Exports audit records as a CSV file or ZIP file. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global - * permission. - */ - async exportAuditRecords(parameters?: Parameters.ExportAuditRecords, callback?: never): Promise; - async exportAuditRecords( - parameters?: Parameters.ExportAuditRecords, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/audit/export', - method: 'GET', - params: { - startDate: parameters?.startDate, - endDate: parameters?.endDate, - searchString: parameters?.searchString, - format: parameters?.format, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the retention period for records in the audit log. The retention period is how long an audit record is kept - * for, from creation date until it is deleted. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global - * permission. - */ - async getRetentionPeriod(callback: Callback): Promise; - /** - * Returns the retention period for records in the audit log. The retention period is how long an audit record is kept - * for, from creation date until it is deleted. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global - * permission. - */ - async getRetentionPeriod(callback?: never): Promise; - async getRetentionPeriod(callback?: Callback): Promise { - const config: RequestConfig = { - url: '/api/audit/retention', - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 1 year. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global - * permission. - */ - async setRetentionPeriod( - parameters: Parameters.SetRetentionPeriod | undefined, - callback: Callback, - ): Promise; - /** - * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 1 year. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global - * permission. - */ - async setRetentionPeriod( - parameters?: Parameters.SetRetentionPeriod, - callback?: never, - ): Promise; - async setRetentionPeriod( - parameters?: Parameters.SetRetentionPeriod, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/audit/retention', - method: 'PUT', - data: { - number: parameters?.number, - units: parameters?.units, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns records from the audit log, for a time period back from the current date. For example, you can use this - * method to get the last 3 months of records. - * - * This contains information about events like space exports, group membership changes, app installations, etc. For - * more information, see [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the - * Confluence administrator's guide. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global - * permission. - */ - async getAuditRecordsForTimePeriod( - parameters: Parameters.GetAuditRecordsForTimePeriod | undefined, - callback: Callback, - ): Promise; - /** - * Returns records from the audit log, for a time period back from the current date. For example, you can use this - * method to get the last 3 months of records. - * - * This contains information about events like space exports, group membership changes, app installations, etc. For - * more information, see [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the - * Confluence administrator's guide. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global - * permission. - */ - async getAuditRecordsForTimePeriod( - parameters?: Parameters.GetAuditRecordsForTimePeriod, - callback?: never, - ): Promise; - async getAuditRecordsForTimePeriod( - parameters?: Parameters.GetAuditRecordsForTimePeriod, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/audit/since', - method: 'GET', - params: { - number: parameters?.number, - units: parameters?.units, - searchString: parameters?.searchString, - start: parameters?.start, - limit: parameters?.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/content.ts b/packages/legacy/src/api/content.ts deleted file mode 100644 index 5940fd3b..00000000 --- a/packages/legacy/src/api/content.ts +++ /dev/null @@ -1,467 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class Content { - constructor(private client: Client) {} - - /** - * Returns all content in a Confluence instance. - * - * By default, the following objects are expanded: `space`, `history`, `version`. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). Only content that the user has permission to view will be returned. - * - * @deprecated Will be removed in next major version. - */ - async getContent( - parameters: Parameters.GetContent | undefined, - callback: Callback, - ): Promise; - /** - * Returns all content in a Confluence instance. - * - * By default, the following objects are expanded: `space`, `history`, `version`. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). Only content that the user has permission to view will be returned. - * - * @deprecated Will be removed in next major version. - */ - async getContent(parameters?: Parameters.GetContent, callback?: never): Promise; - async getContent( - parameters?: Parameters.GetContent, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/content', - method: 'GET', - params: { - type: parameters?.type, - spaceKey: parameters?.spaceKey, - title: parameters?.title, - status: parameters?.status, - postingDay: parameters?.postingDay, - trigger: parameters?.trigger, - orderby: parameters?.orderby, - start: parameters?.start, - limit: parameters?.limit, - expand: parameters?.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Creates a new piece of content or publishes an existing draft. - * - * To publish a draft, add the `id` and `status` properties to the body of the request. Set the `id` to the ID of the - * draft and set the `status` to 'current'. When the request is sent, a new piece of content will be created and the - * metadata from the draft will be transferred into it. - * - * By default, the following objects are expanded: `space`, `history`, `version`. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the - * content will be created in, and permission to view the draft if publishing a draft. - * - * @deprecated Will be removed in next major version. - */ - async createContent( - parameters: Parameters.CreateContent | undefined, - callback: Callback, - ): Promise; - /** - * Creates a new piece of content or publishes an existing draft. - * - * To publish a draft, add the `id` and `status` properties to the body of the request. Set the `id` to the ID of the - * draft and set the `status` to 'current'. When the request is sent, a new piece of content will be created and the - * metadata from the draft will be transferred into it. - * - * By default, the following objects are expanded: `space`, `history`, `version`. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the - * content will be created in, and permission to view the draft if publishing a draft. - * - * @deprecated Will be removed in next major version. - */ - async createContent(parameters?: Parameters.CreateContent, callback?: never): Promise; - async createContent( - parameters?: Parameters.CreateContent, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/content', - method: 'POST', - params: { - status: parameters?.status, - expand: parameters?.expand, - }, - data: { - ...parameters, - status: undefined, - expand: undefined, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Archives a list of pages. The pages to be archived are specified as a list of content IDs. This API accepts the - * archival request and returns a task ID. The archival process happens asynchronously. Use the /longtask/ - * REST API to get the copy task status. - * - * Each content ID needs to resolve to page objects that are not already in an archived state. The content IDs need - * not belong to the same space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Archive' permission for each of the pages - * in the corresponding space it belongs to. - */ - async archivePages(parameters: Parameters.ArchivePages, callback: Callback): Promise; - /** - * Archives a list of pages. The pages to be archived are specified as a list of content IDs. This API accepts the - * archival request and returns a task ID. The archival process happens asynchronously. Use the /longtask/ - * REST API to get the copy task status. - * - * Each content ID needs to resolve to page objects that are not already in an archived state. The content IDs need - * not belong to the same space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Archive' permission for each of the pages - * in the corresponding space it belongs to. - */ - async archivePages(parameters: Parameters.ArchivePages, callback?: never): Promise; - async archivePages( - parameters: Parameters.ArchivePages, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/content/archive', - method: 'POST', - data: { - pages: parameters.pages, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favor of - * shared drafts. For now, this method works the same as [Publish shared - * draft](#api-content-blueprint-instance-draftId-put). - * - * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add' - * permission for the space that the content will be created in. - */ - async publishLegacyDraft( - parameters: Parameters.PublishLegacyDraft, - callback: Callback, - ): Promise; - /** - * Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favor of - * shared drafts. For now, this method works the same as [Publish shared - * draft](#api-content-blueprint-instance-draftId-put). - * - * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add' - * permission for the space that the content will be created in. - */ - async publishLegacyDraft(parameters: Parameters.PublishLegacyDraft, callback?: never): Promise; - async publishLegacyDraft( - parameters: Parameters.PublishLegacyDraft, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/blueprint/instance/${parameters.draftId}`, - method: 'POST', - params: { - status: parameters.status, - }, - data: { - ...parameters, - version: parameters.version, - title: parameters.title, - type: parameters.type, - status: parameters.bodyStatus, - space: parameters.space, - ancestors: parameters.ancestors, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Publishes a shared draft of a page created from a blueprint. - * - * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add' - * permission for the space that the content will be created in. - */ - async publishSharedDraft( - parameters: Parameters.PublishSharedDraft, - callback: Callback, - ): Promise; - /** - * Publishes a shared draft of a page created from a blueprint. - * - * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add' - * permission for the space that the content will be created in. - */ - async publishSharedDraft(parameters: Parameters.PublishSharedDraft, callback?: never): Promise; - async publishSharedDraft( - parameters: Parameters.PublishSharedDraft, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/blueprint/instance/${parameters.draftId}`, - method: 'PUT', - params: { - status: parameters.status, - }, - data: { - ...parameters, - status: parameters.bodyStatus, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the list of content that matches a Confluence Query Language (CQL) query. For information on CQL, see: - * [Advanced searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/). - * - * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The - * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of - * results returned in each call. - * - * The response to this will have a `prev` URL similar to the `next` in the example response. - * - * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the - * query limit parameter will be restricted to a maximum value of 25. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). Only content that the user has permission to view will be returned. - */ - async searchContentByCQL( - parameters: Parameters.SearchContentByCQL, - callback: Callback, - ): Promise; - /** - * Returns the list of content that matches a Confluence Query Language (CQL) query. For information on CQL, see: - * [Advanced searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/). - * - * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The - * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of - * results returned in each call. - * - * The response to this will have a `prev` URL similar to the `next` in the example response. - * - * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the - * query limit parameter will be restricted to a maximum value of 25. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). Only content that the user has permission to view will be returned. - */ - async searchContentByCQL( - parameters: Parameters.SearchContentByCQL, - callback?: never, - ): Promise; - async searchContentByCQL( - parameters: Parameters.SearchContentByCQL, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/content/search', - method: 'GET', - params: { - cql: parameters.cql, - cqlcontext: parameters.cqlcontext, - cursor: parameters.cursor, - limit: parameters.limit, - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns a single piece of content, like a page or a blog post. - * - * By default, the following objects are expanded: `space`, `history`, `version`. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the - * content is a blog post, 'View' permission for the space is required. - * - * @deprecated Will be removed in next major version. - */ - async getContentById(parameters: Parameters.GetContentById, callback: Callback): Promise; - /** - * Returns a single piece of content, like a page or a blog post. - * - * By default, the following objects are expanded: `space`, `history`, `version`. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the - * content is a blog post, 'View' permission for the space is required. - * - * @deprecated Will be removed in next major version. - */ - async getContentById(parameters: Parameters.GetContentById, callback?: never): Promise; - async getContentById( - parameters: Parameters.GetContentById, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}`, - method: 'GET', - params: { - status: parameters.status, - version: parameters.version, - embeddedContentRender: parameters.embeddedContentRender, - trigger: parameters.trigger, - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Updates a piece of content. Use this method to update the title or body of a piece of content, change the status, - * change the parent page, and more. - * - * Note, updating draft content is currently not supported. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - * - * @deprecated Will be removed in next major version. - */ - async updateContent(parameters: Parameters.UpdateContent, callback: Callback): Promise; - /** - * Updates a piece of content. Use this method to update the title or body of a piece of content, change the status, - * change the parent page, and more. - * - * Note, updating draft content is currently not supported. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - * - * @deprecated Will be removed in next major version. - */ - async updateContent(parameters: Parameters.UpdateContent, callback?: never): Promise; - async updateContent( - parameters: Parameters.UpdateContent, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}`, - method: 'PUT', - params: { - status: parameters.status, - conflictPolicy: parameters.conflictPolicy, - }, - data: { - version: parameters.version, - title: parameters.title, - type: parameters.type, - status: parameters.statusBody, - ancestors: parameters.ancestors, - body: parameters.body, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and - * status: - * - * - If the content's type is `page` or `blogpost` and its status is `current`, it will be trashed. - * - If the content's type is `page` or `blogpost` and its status is `trashed`, the content will be purged from the - * trash and deleted permanently. Note, you must also set the `status` query parameter to `trashed` in your - * request. - * - If the content's type is `comment` or `attachment`, it will be deleted permanently without being trashed. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the - * content is in. - * - * @deprecated Will be removed in next major version. - */ - async deleteContent(parameters: Parameters.DeleteContent, callback: Callback): Promise; - /** - * Moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and - * status: - * - * - If the content's type is `page` or `blogpost` and its status is `current`, it will be trashed. - * - If the content's type is `page` or `blogpost` and its status is `trashed`, the content will be purged from the - * trash and deleted permanently. Note, you must also set the `status` query parameter to `trashed` in your - * request. - * - If the content's type is `comment` or `attachment`, it will be deleted permanently without being trashed. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the - * content is in. - * - * @deprecated Will be removed in next major version. - */ - async deleteContent(parameters: Parameters.DeleteContent, callback?: never): Promise; - async deleteContent(parameters: Parameters.DeleteContent, callback?: Callback): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}`, - method: 'DELETE', - params: { - status: parameters.status, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the most recent update for a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - * - * @deprecated Will be removed in next major version. - */ - async getHistoryForContent( - parameters: Parameters.GetHistoryForContent, - callback: Callback, - ): Promise; - /** - * Returns the most recent update for a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - * - * @deprecated Will be removed in next major version. - */ - async getHistoryForContent( - parameters: Parameters.GetHistoryForContent, - callback?: never, - ): Promise; - async getHistoryForContent( - parameters: Parameters.GetHistoryForContent, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/history`, - method: 'GET', - params: { - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/contentAttachments.ts b/packages/legacy/src/api/contentAttachments.ts deleted file mode 100644 index 79017c09..00000000 --- a/packages/legacy/src/api/contentAttachments.ts +++ /dev/null @@ -1,286 +0,0 @@ -/* eslint-disable @typescript-eslint/no-unnecessary-condition */ -import FormData from 'form-data'; -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class ContentAttachments { - constructor(private client: Client) {} - - /** - * Returns the attachments for a piece of content. - * - * By default, the following objects are expanded: `metadata`. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the - * content is a blog post, 'View' permission for the space is required. - * - * @deprecated Will be removed in next major version. - */ - async getAttachments>( - parameters: Parameters.GetAttachments, - callback: Callback, - ): Promise; - /** - * Returns the attachments for a piece of content. - * - * By default, the following objects are expanded: `metadata`. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the - * content is a blog post, 'View' permission for the space is required. - * - * @deprecated Will be removed in next major version. - */ - async getAttachments>( - parameters: Parameters.GetAttachments, - callback?: never, - ): Promise; - async getAttachments>( - parameters: Parameters.GetAttachments, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/child/attachment`, - method: 'GET', - params: { - start: parameters.start, - limit: parameters.limit, - filename: parameters.filename, - mediaType: parameters.mediaType, - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds an attachment to a piece of content. This method only adds a new attachment. If you want to update an existing - * attachment, use [Create or update - * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async createAttachments>( - parameters: Parameters.CreateAttachments, - callback: Callback, - ): Promise; - /** - * Adds an attachment to a piece of content. This method only adds a new attachment. If you want to update an existing - * attachment, use [Create or update - * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async createAttachments>( - parameters: Parameters.CreateAttachments, - callback?: never, - ): Promise; - async createAttachments>( - parameters: Parameters.CreateAttachments, - callback?: Callback, - ): Promise { - const formData = new FormData(); - const attachments = Array.isArray(parameters.attachments) ? parameters.attachments : [parameters.attachments]; - - attachments.forEach(attachment => { - formData.append('minorEdit', attachment.minorEdit.toString(), 'minorEdit'); - formData.append('file', attachment.file, { - filename: attachment.filename, - contentType: attachment.contentType, - }); - - if (attachment.comment) { - formData.append('comment', attachment.comment, 'comment'); - } - }); - - const config: RequestConfig = { - url: `/api/content/${parameters.id}/child/attachment`, - method: 'POST', - headers: { - 'X-Atlassian-Token': 'no-check', - 'Content-Type': 'multipart/form-data', - ...formData.getHeaders?.(), - }, - params: { - status: parameters.status, - }, - data: formData, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds an attachment to a piece of content. If the attachment already exists for the content, then the attachment is - * updated (i.e. a new version of the attachment is created). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async createOrUpdateAttachments>( - parameters: Parameters.CreateOrUpdateAttachments, - callback: Callback, - ): Promise; - /** - * Adds an attachment to a piece of content. If the attachment already exists for the content, then the attachment is - * updated (i.e. a new version of the attachment is created). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async createOrUpdateAttachments>( - parameters: Parameters.CreateOrUpdateAttachments, - callback?: never, - ): Promise; - async createOrUpdateAttachments>( - parameters: Parameters.CreateOrUpdateAttachments, - callback?: Callback, - ): Promise { - const formData = new FormData(); - const attachments = Array.isArray(parameters.attachments) ? parameters.attachments : [parameters.attachments]; - - attachments.forEach(attachment => { - formData.append('minorEdit', attachment.minorEdit.toString(), 'minorEdit'); - formData.append('file', attachment.file, { - filename: attachment.filename, - contentType: attachment.contentType, - }); - - if (attachment.comment) { - formData.append('comment', attachment.comment, 'comment'); - } - }); - - const config: RequestConfig = { - url: `/api/content/${parameters.id}/child/attachment`, - method: 'PUT', - headers: { - 'X-Atlassian-Token': 'no-check', - 'Content-Type': 'multipart/form-data', - ...formData.getHeaders?.(), - }, - params: { - status: parameters.status, - }, - data: formData, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Updates the attachment properties, i.e. the non-binary data of an attachment like the filename, media-type, - * comment, and parent container. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async updateAttachmentProperties( - parameters: Parameters.UpdateAttachmentProperties, - callback: Callback, - ): Promise; - /** - * Updates the attachment properties, i.e. the non-binary data of an attachment like the filename, media-type, - * comment, and parent container. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async updateAttachmentProperties( - parameters: Parameters.UpdateAttachmentProperties, - callback?: never, - ): Promise; - async updateAttachmentProperties( - parameters: Parameters.UpdateAttachmentProperties, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}`, - method: 'PUT', - data: parameters.update, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Updates the binary data of an attachment, given the attachment ID, and optionally the comment and the minor edit - * field. - * - * This method is essentially the same as [Create or update - * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put), - * except that it matches the attachment ID rather than the name. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async updateAttachmentData( - parameters: Parameters.UpdateAttachmentData, - callback: Callback, - ): Promise; - /** - * Updates the binary data of an attachment, given the attachment ID, and optionally the comment and the minor edit - * field. - * - * This method is essentially the same as [Create or update - * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put), - * except that it matches the attachment ID rather than the name. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async updateAttachmentData( - parameters: Parameters.UpdateAttachmentData, - callback?: never, - ): Promise; - async updateAttachmentData( - parameters: Parameters.UpdateAttachmentData, - callback?: Callback, - ): Promise { - const { attachment } = parameters; - - const formData = new FormData(); - - formData.append('minorEdit', attachment.minorEdit.toString(), 'minorEdit'); - formData.append('file', attachment.file, { - filename: attachment.filename, - contentType: attachment.contentType, - }); - - if (attachment.comment) { - formData.append('comment', attachment.comment, 'comment'); - } - - const config: RequestConfig = { - url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}/data`, - method: 'POST', - headers: { - 'X-Atlassian-Token': 'no-check', - 'Content-Type': 'multipart/form-data', - ...formData.getHeaders?.(), - }, - data: formData, - }; - - return this.client.sendRequest(config, callback); - } - - /** Redirects the client to a URL that serves an attachment's binary data. */ - async downloadAttachment(parameters: Parameters.DownloadAttachment, callback: Callback): Promise; - /** Redirects the client to a URL that serves an attachment's binary data. */ - async downloadAttachment(parameters: Parameters.DownloadAttachment, callback?: never): Promise; - async downloadAttachment( - parameters: Parameters.DownloadAttachment, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}/download`, - method: 'GET', - responseType: 'arraybuffer', - params: { - version: parameters.version, - status: parameters.status, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/contentBody.ts b/packages/legacy/src/api/contentBody.ts deleted file mode 100644 index 6afba4b9..00000000 --- a/packages/legacy/src/api/contentBody.ts +++ /dev/null @@ -1,274 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class ContentBody { - constructor(private client: Client) {} - - /** - * Converts a content body from one format to another format. - * - * Supported conversions: - * - * - Storage: view, export_view, styled_view, editor - * - Editor: storage - * - View: none - * - Export_view: none - * - Styled_view: none - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext', - * 'View' permission for the space, and permission to view the content. - * - * @deprecated Will be removed in next major version. - */ - async convertContentBody( - parameters: Parameters.ConvertContentBody, - callback: Callback, - ): Promise; - /** - * Converts a content body from one format to another format. - * - * Supported conversions: - * - * - Storage: view, export_view, styled_view, editor - * - Editor: storage - * - View: none - * - Export_view: none - * - Styled_view: none - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext', - * 'View' permission for the space, and permission to view the content. - * - * @deprecated Will be removed in next major version. - */ - async convertContentBody( - parameters: Parameters.ConvertContentBody, - callback?: never, - ): Promise; - async convertContentBody( - parameters: Parameters.ConvertContentBody, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/contentbody/convert/${parameters.to}`, - method: 'POST', - params: { - spaceKeyContext: parameters.spaceKeyContext, - contentIdContext: parameters.contentIdContext, - embeddedContentRender: parameters.embeddedContentRender, - expand: parameters.expand, - }, - data: { - value: parameters.value, - representation: parameters.representation, - ...parameters.additionalProperties, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Converts a content body from one format to another format asynchronously. Returns the asyncId for the asynchronous - * task. - * - * Supported conversions: - * - * - Atlas_doc_format: editor, export_view, storage, styled_view, view - * - Storage: atlas_doc_format, editor, export_view, styled_view, view - * - Editor: storage - * - * No other conversions are supported at the moment. Once a conversion is completed, it will be available for 5 - * minutes at the result endpoint. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext', - * 'View' permission for the space, and permission to view the content. - */ - async asyncConvertContentBodyRequest( - parameters: Parameters.AsyncConvertContentBodyRequest, - callback: Callback, - ): Promise; - /** - * Converts a content body from one format to another format asynchronously. Returns the asyncId for the asynchronous - * task. - * - * Supported conversions: - * - * - Atlas_doc_format: editor, export_view, storage, styled_view, view - * - Storage: atlas_doc_format, editor, export_view, styled_view, view - * - Editor: storage - * - * No other conversions are supported at the moment. Once a conversion is completed, it will be available for 5 - * minutes at the result endpoint. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext', - * 'View' permission for the space, and permission to view the content. - */ - async asyncConvertContentBodyRequest( - parameters: Parameters.AsyncConvertContentBodyRequest, - callback?: never, - ): Promise; - async asyncConvertContentBodyRequest( - parameters: Parameters.AsyncConvertContentBodyRequest, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/contentbody/convert/async/${parameters.to}`, - method: 'POST', - params: { - spaceKeyContext: parameters.spaceKeyContext, - contentIdContext: parameters.contentIdContext, - allowCache: parameters.allowCache, - embeddedContentRender: parameters.embeddedContentRender, - expand: parameters.expand, - }, - data: { - value: parameters.value, - representation: parameters.representation, - ...parameters.additionalProperties, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the asynchronous content body for the corresponding id if the task is complete or returns the status of the - * task. - * - * After the task is completed, the result can be obtained for 5 minutes, or until an identical conversion request is - * made again, with allowCache query param set to false. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext', - * 'View' permission for the space, and permission to view the content. - */ - async asyncConvertContentBodyResponse( - parameters: Parameters.AsyncConvertContentBodyResponse, - callback: Callback, - ): Promise; - /** - * Returns the asynchronous content body for the corresponding id if the task is complete or returns the status of the - * task. - * - * After the task is completed, the result can be obtained for 5 minutes, or until an identical conversion request is - * made again, with allowCache query param set to false. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext', - * 'View' permission for the space, and permission to view the content. - */ - async asyncConvertContentBodyResponse( - parameters: Parameters.AsyncConvertContentBodyResponse, - callback?: never, - ): Promise; - async asyncConvertContentBodyResponse( - parameters: Parameters.AsyncConvertContentBodyResponse, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/contentbody/convert/async/${parameters.id}`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the content body for the corresponding `asyncId` of a completed conversion task. If the task is not - * completed, the task status is returned instead. - * - * Once a conversion task is completed, the result can be obtained for up to 5 minutes, or until an identical - * conversion request is made again with the `allowCache` parameter set to false. - * - * Note that there is a maximum limit of 50 task results per request to this endpoint. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async bulkAsyncConvertContentBodyResponse( - parameters: Parameters.BulkAsyncConvertContentBodyResponse, - callback: Callback, - ): Promise; - /** - * Returns the content body for the corresponding `asyncId` of a completed conversion task. If the task is not - * completed, the task status is returned instead. - * - * Once a conversion task is completed, the result can be obtained for up to 5 minutes, or until an identical - * conversion request is made again with the `allowCache` parameter set to false. - * - * Note that there is a maximum limit of 50 task results per request to this endpoint. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async bulkAsyncConvertContentBodyResponse( - parameters: Parameters.BulkAsyncConvertContentBodyResponse, - callback?: never, - ): Promise; - async bulkAsyncConvertContentBodyResponse( - parameters: Parameters.BulkAsyncConvertContentBodyResponse, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/contentbody/convert/async/bulk/tasks', - method: 'GET', - params: { - ids: parameters.ids, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Asynchronously converts content bodies from one format to another format in bulk. Use the Content body REST API to - * get the status of conversion tasks. Note that there is a maximum limit of 10 conversions per request to this - * endpoint. - * - * Supported conversions: - * - * - Storage: editor, export_view, styled_view, view - * - Editor: storage - * - * Once a conversion task is completed, it is available for polling for up to 5 minutes. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if the `spaceKeyContext` or `contentIdContext` are present. - */ - async bulkAsyncConvertContentBodyRequest( - parameters: Parameters.BulkAsyncConvertContentBodyRequest, - callback: Callback, - ): Promise; - /** - * Asynchronously converts content bodies from one format to another format in bulk. Use the Content body REST API to - * get the status of conversion tasks. Note that there is a maximum limit of 10 conversions per request to this - * endpoint. - * - * Supported conversions: - * - * - Storage: editor, export_view, styled_view, view - * - Editor: storage - * - * Once a conversion task is completed, it is available for polling for up to 5 minutes. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if the `spaceKeyContext` or `contentIdContext` are present. - */ - async bulkAsyncConvertContentBodyRequest( - parameters: Parameters.BulkAsyncConvertContentBodyRequest, - callback?: never, - ): Promise; - async bulkAsyncConvertContentBodyRequest( - parameters: Parameters.BulkAsyncConvertContentBodyRequest, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/contentbody/convert/async/bulk/tasks', - method: 'POST', - data: parameters, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/contentChildrenAndDescendants.ts b/packages/legacy/src/api/contentChildrenAndDescendants.ts deleted file mode 100644 index f10c8f81..00000000 --- a/packages/legacy/src/api/contentChildrenAndDescendants.ts +++ /dev/null @@ -1,401 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class ContentChildrenAndDescendants { - constructor(private client: Client) {} - - /** - * Returns a map of the direct children of a piece of content. A piece of content has different types of child - * content, depending on its type. These are the default parent-child content type relationships: - * - * - `page`: child content is `page`, `comment`, `attachment` - * - `blogpost`: child content is `comment`, `attachment` - * - `attachment`: child content is `comment` - * - `comment`: child content is `attachment` - * - * Apps can override these default relationships. Apps can also introduce new content types that create new - * parent-child content relationships. - * - * Note, the map will always include all child content types that are valid for the content. However, if the content - * has no instances of a child content type, the map will contain an empty array for that child content type. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if it is a page. - * - * @deprecated Will be removed in next major version. - */ - async getContentChildren( - parameters: Parameters.GetContentChildren, - callback: Callback, - ): Promise; - /** - * Returns a map of the direct children of a piece of content. A piece of content has different types of child - * content, depending on its type. These are the default parent-child content type relationships: - * - * - `page`: child content is `page`, `comment`, `attachment` - * - `blogpost`: child content is `comment`, `attachment` - * - `attachment`: child content is `comment` - * - `comment`: child content is `attachment` - * - * Apps can override these default relationships. Apps can also introduce new content types that create new - * parent-child content relationships. - * - * Note, the map will always include all child content types that are valid for the content. However, if the content - * has no instances of a child content type, the map will contain an empty array for that child content type. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if it is a page. - * - * @deprecated Will be removed in next major version. - */ - async getContentChildren( - parameters: Parameters.GetContentChildren, - callback?: never, - ): Promise; - async getContentChildren( - parameters: Parameters.GetContentChildren, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/child`, - method: 'GET', - params: { - expand: parameters.expand, - parentVersion: parameters.parentVersion, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Move a page to a new location relative to a target page: - * - * - `before` - move the page under the same parent as the target, before the target in the list of children - * - `after` - move the page under the same parent as the target, after the target in the list of children - * - `append` - move the page to be a child of the target - * - * Caution: This API can move pages to the top level of a space. Top-level pages are difficult to find in the UI - * because they do not show up in the page tree display. To avoid this, never use `before` or `after` positions when - * the `targetId` is a top-level page. - */ - async movePage(parameters: Parameters.MovePage, callback: Callback): Promise; - /** - * Move a page to a new location relative to a target page: - * - * - `before` - move the page under the same parent as the target, before the target in the list of children - * - `after` - move the page under the same parent as the target, after the target in the list of children - * - `append` - move the page to be a child of the target - * - * Caution: This API can move pages to the top level of a space. Top-level pages are difficult to find in the UI - * because they do not show up in the page tree display. To avoid this, never use `before` or `after` positions when - * the `targetId` is a top-level page. - */ - async movePage(parameters: Parameters.MovePage, callback?: never): Promise; - async movePage(parameters: Parameters.MovePage, callback?: Callback): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.pageId}/move/${parameters.position}/${parameters.targetId}`, - method: 'PUT', - headers: { - 'Content-Type': 'application/json', - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns all children of a given type, for a piece of content. A piece of content has different types of child - * content, depending on its type: - * - * - `page`: child content is `page`, `comment`, `attachment` - * - `blogpost`: child content is `comment`, `attachment` - * - `attachment`: child content is `comment` - * - `comment`: child content is `attachment` - * - * Custom content types that are provided by apps can also be returned. - * - * Note, this method only returns direct children. To return children at all levels, use [Get descendants by - * type](#api-content-id-descendant-type-get). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if it is a page. - * - * @deprecated Will be removed in next major version. - */ - async getContentChildrenByType( - parameters: Parameters.GetContentChildrenByType, - callback: Callback, - ): Promise; - /** - * Returns all children of a given type, for a piece of content. A piece of content has different types of child - * content, depending on its type: - * - * - `page`: child content is `page`, `comment`, `attachment` - * - `blogpost`: child content is `comment`, `attachment` - * - `attachment`: child content is `comment` - * - `comment`: child content is `attachment` - * - * Custom content types that are provided by apps can also be returned. - * - * Note, this method only returns direct children. To return children at all levels, use [Get descendants by - * type](#api-content-id-descendant-type-get). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if it is a page. - * - * @deprecated Will be removed in next major version. - */ - async getContentChildrenByType( - parameters: Parameters.GetContentChildrenByType, - callback?: never, - ): Promise; - async getContentChildrenByType( - parameters: Parameters.GetContentChildrenByType, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/child/${parameters.type}`, - method: 'GET', - params: { - parentVersion: parameters.parentVersion, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns a map of the descendants of a piece of content. This is similar to [Get content - * children](#api-content-id-child-get), except that this method returns child pages at all levels, rather than just - * the direct child pages. - * - * A piece of content has different types of descendants, depending on its type: - * - * - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `database`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `blogpost`: descendant is `comment`, `attachment` - * - `attachment`: descendant is `comment` - * - `comment`: descendant is `attachment` - * - * The map will always include all descendant types that are valid for the content. However, if the content has no - * instances of a descendant type, the map will contain an empty array for that descendant type. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if it is a page. - */ - async getContentDescendants( - parameters: Parameters.GetContentDescendants, - callback: Callback, - ): Promise; - /** - * Returns a map of the descendants of a piece of content. This is similar to [Get content - * children](#api-content-id-child-get), except that this method returns child pages at all levels, rather than just - * the direct child pages. - * - * A piece of content has different types of descendants, depending on its type: - * - * - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `database`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `blogpost`: descendant is `comment`, `attachment` - * - `attachment`: descendant is `comment` - * - `comment`: descendant is `attachment` - * - * The map will always include all descendant types that are valid for the content. However, if the content has no - * instances of a descendant type, the map will contain an empty array for that descendant type. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if it is a page. - */ - async getContentDescendants( - parameters: Parameters.GetContentDescendants, - callback?: never, - ): Promise; - async getContentDescendants( - parameters: Parameters.GetContentDescendants, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/descendant`, - method: 'GET', - params: { - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns all descendants of a given type, for a piece of content. This is similar to [Get content children by - * type](#api-content-id-child-type-get), except that this method returns child pages at all levels, rather than just - * the direct child pages. - * - * A piece of content has different types of descendants, depending on its type: - * - * - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `database`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `blogpost`: descendant is `comment`, `attachment` - * - `attachment`: descendant is `comment` - * - `comment`: descendant is `attachment` - * - * Custom content types that are provided by apps can also be returned. - * - * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the - * query limit parameter will be restricted to a maximum value of 25. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if it is a page. - */ - async getDescendantsOfType( - parameters: Parameters.GetDescendantsOfType, - callback: Callback, - ): Promise; - /** - * Returns all descendants of a given type, for a piece of content. This is similar to [Get content children by - * type](#api-content-id-child-type-get), except that this method returns child pages at all levels, rather than just - * the direct child pages. - * - * A piece of content has different types of descendants, depending on its type: - * - * - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `database`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` - * - `blogpost`: descendant is `comment`, `attachment` - * - `attachment`: descendant is `comment` - * - `comment`: descendant is `attachment` - * - * Custom content types that are provided by apps can also be returned. - * - * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the - * query limit parameter will be restricted to a maximum value of 25. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if it is a page. - */ - async getDescendantsOfType( - parameters: Parameters.GetDescendantsOfType, - callback?: never, - ): Promise; - async getDescendantsOfType( - parameters: Parameters.GetDescendantsOfType, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/descendant/${parameters.type}`, - method: 'GET', - params: { - depth: parameters.depth, - start: parameters.start, - limit: parameters.limit, - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions - * and attachments. The id path parameter refers to the content id of the page to copy, and the new parent of this - * copied page is defined using the destinationPageId in the request body. The titleOptions object defines the rules - * of renaming page titles during the copy; for example, search and replace can be used in conjunction to rewrite the - * copied page titles. - */ - async copyPageHierarchy( - parameters: Parameters.CopyPageHierarchy, - callback: Callback, - ): Promise; - /** - * Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions - * and attachments. The id path parameter refers to the content id of the page to copy, and the new parent of this - * copied page is defined using the destinationPageId in the request body. The titleOptions object defines the rules - * of renaming page titles during the copy; for example, search and replace can be used in conjunction to rewrite the - * copied page titles. - */ - async copyPageHierarchy(parameters: Parameters.CopyPageHierarchy, callback?: never): Promise; - async copyPageHierarchy( - parameters: Parameters.CopyPageHierarchy, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/pagehierarchy/copy`, - method: 'POST', - data: { - copyAttachments: parameters.copyAttachments, - copyPermissions: parameters.copyPermissions, - copyProperties: parameters.copyProperties, - copyLabels: parameters.copyLabels, - copyCustomContents: parameters.copyCustomContents, - copyDescendants: parameters.copyDescendants, - destinationPageId: parameters.destinationPageId, - titleOptions: parameters.titleOptions, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Copies a single page and its associated properties, permissions, attachments, and custom contents. The `id` path - * parameter refers to the content ID of the page to copy. The target of the page to be copied is defined using the - * `destination` in the request body and can be one of the following types. - * - * - `space`: page will be copied to the specified space as a root page on the space - * - `parent_page`: page will be copied as a child of the specified parent page - * - `parent_content`: page will be copied as a child of the specified parent content - * - `existing_page`: page will be copied and replace the specified page - * - * By default, the following objects are expanded: `space`, `history`, `version`. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the - * content will be copied in and permission to update the content if copying to an `existing_page`. - */ - async copyPage(parameters: Parameters.CopyPage, callback: Callback): Promise; - /** - * Copies a single page and its associated properties, permissions, attachments, and custom contents. The `id` path - * parameter refers to the content ID of the page to copy. The target of the page to be copied is defined using the - * `destination` in the request body and can be one of the following types. - * - * - `space`: page will be copied to the specified space as a root page on the space - * - `parent_page`: page will be copied as a child of the specified parent page - * - `parent_content`: page will be copied as a child of the specified parent content - * - `existing_page`: page will be copied and replace the specified page - * - * By default, the following objects are expanded: `space`, `history`, `version`. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the - * content will be copied in and permission to update the content if copying to an `existing_page`. - */ - async copyPage(parameters: Parameters.CopyPage, callback?: never): Promise; - async copyPage(parameters: Parameters.CopyPage, callback?: Callback): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/copy`, - method: 'POST', - params: { - expand: parameters.expand, - }, - data: parameters.bodyParameters, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/contentComments.ts b/packages/legacy/src/api/contentComments.ts deleted file mode 100644 index 7537ae1e..00000000 --- a/packages/legacy/src/api/contentComments.ts +++ /dev/null @@ -1,54 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Callback } from '../callback.js'; -import type { Client } from '../clients/index.js'; -import type { RequestConfig } from '../requestConfig.js'; - -/** @deprecated Will be removed in next major version. */ -export class ContentComments { - constructor(private client: Client) {} - - /** - * Returns the comments on a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if it is a page. - * - * @deprecated Will be removed in next major version. - */ - async getContentComments( - parameters: Parameters.GetContentComments, - callback: Callback, - ): Promise; - /** - * Returns the comments on a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if it is a page. - * - * @deprecated Will be removed in next major version. - */ - async getContentComments( - parameters: Parameters.GetContentComments, - callback?: never, - ): Promise; - async getContentComments( - parameters: Parameters.GetContentComments, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/child/comment`, - method: 'GET', - params: { - parentVersion: parameters.parentVersion, - start: parameters.start, - limit: parameters.limit, - location: parameters.location, - depth: parameters.depth, - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/contentLabels.ts b/packages/legacy/src/api/contentLabels.ts deleted file mode 100644 index 7ca924bc..00000000 --- a/packages/legacy/src/api/contentLabels.ts +++ /dev/null @@ -1,178 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class ContentLabels { - constructor(private client: Client) {} - - /** - * Returns the labels on a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space and - * permission to view the content if it is a page. - * - * @deprecated Will be removed in next major version. - */ - async getLabelsForContent( - parameters: Parameters.GetLabelsForContent, - callback: Callback, - ): Promise; - /** - * Returns the labels on a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space and - * permission to view the content if it is a page. - * - * @deprecated Will be removed in next major version. - */ - async getLabelsForContent( - parameters: Parameters.GetLabelsForContent, - callback?: never, - ): Promise; - async getLabelsForContent( - parameters: Parameters.GetLabelsForContent, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/label`, - method: 'GET', - params: { - prefix: parameters.prefix, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds labels to a piece of content. Does not modify the existing labels. - * - * Notes: - * - * - Labels can also be added when creating content ([Create content](#api-content-post)). - * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing - * labels and replace them with the labels in the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async addLabelsToContent( - parameters: Parameters.AddLabelsToContent, - callback: Callback, - ): Promise; - /** - * Adds labels to a piece of content. Does not modify the existing labels. - * - * Notes: - * - * - Labels can also be added when creating content ([Create content](#api-content-post)). - * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing - * labels and replace them with the labels in the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async addLabelsToContent( - parameters: Parameters.AddLabelsToContent, - callback?: never, - ): Promise; - async addLabelsToContent( - parameters: Parameters.AddLabelsToContent, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/label`, - method: 'POST', - params: { - 'use-400-error-response': parameters['use-400-error-response'], - }, - data: parameters.body, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Removes a label from a piece of content. Labels can't be deleted from archived content. This is similar to [Remove - * label from content](#api-content-id-label-label-delete) except that the label name is specified via a query - * parameter. - * - * Use this method if the label name has "/" characters, as [Remove label from content using query - * parameter](#api-content-id-label-delete) does not accept "/" characters for the label name. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async removeLabelFromContentUsingQueryParameter( - parameters: Parameters.RemoveLabelFromContentUsingQueryParameter, - callback: Callback, - ): Promise; - /** - * Removes a label from a piece of content. Labels can't be deleted from archived content. This is similar to [Remove - * label from content](#api-content-id-label-label-delete) except that the label name is specified via a query - * parameter. - * - * Use this method if the label name has "/" characters, as [Remove label from content using query - * parameter](#api-content-id-label-delete) does not accept "/" characters for the label name. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async removeLabelFromContentUsingQueryParameter( - parameters: Parameters.RemoveLabelFromContentUsingQueryParameter, - callback?: never, - ): Promise; - async removeLabelFromContentUsingQueryParameter( - parameters: Parameters.RemoveLabelFromContentUsingQueryParameter, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/label`, - method: 'DELETE', - params: { - name: parameters.name, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Removes a label from a piece of content. Labels can't be deleted from archived content. This is similar to [Remove - * label from content using query parameter](#api-content-id-label-delete) except that the label name is specified via - * a path parameter. - * - * Use this method if the label name does not have "/" characters, as the path parameter does not accept "/" - * characters for security reasons. Otherwise, use [Remove label from content using query - * parameter](#api-content-id-label-delete). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async removeLabelFromContent( - parameters: Parameters.RemoveLabelFromContent, - callback: Callback, - ): Promise; - /** - * Removes a label from a piece of content. Labels can't be deleted from archived content. This is similar to [Remove - * label from content using query parameter](#api-content-id-label-delete) except that the label name is specified via - * a path parameter. - * - * Use this method if the label name does not have "/" characters, as the path parameter does not accept "/" - * characters for security reasons. Otherwise, use [Remove label from content using query - * parameter](#api-content-id-label-delete). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async removeLabelFromContent(parameters: Parameters.RemoveLabelFromContent, callback?: never): Promise; - async removeLabelFromContent( - parameters: Parameters.RemoveLabelFromContent, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/label/${parameters.label}`, - method: 'DELETE', - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/contentMacroBody.ts b/packages/legacy/src/api/contentMacroBody.ts deleted file mode 100644 index b92ea066..00000000 --- a/packages/legacy/src/api/contentMacroBody.ts +++ /dev/null @@ -1,254 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class ContentMacroBody { - constructor(private client: Client) {} - - /** - * Returns the body of a macro in storage format, for the given macro ID. This includes information like the name of - * the macro, the body of the macro, and any macro parameters. This method is mainly used by Cloud apps. - * - * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for - * it, unless an ID is specified (by an app). The macro ID will look similar to this: - * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is - * only modified by Confluence if there are conflicting IDs. - * - * For Forge macros, the value for macro ID is the "local ID" of that particular ADF node. This value can be retrieved - * either client-side by calling view.getContext() and accessing "localId" on the resulting object, or server-side by - * examining the "local-id" parameter node inside the "parameters" node. - * - * Note that there are other attributes named "local-id", but only this particular one is used to store the macro ID. - * - * Example: com.atlassian.ecosystem - * e9c4aa10-73fa-417c-888d-48c719ae4165 - * - * - * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a - * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and - * transparently propagate out to all instances. - * - * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the - * macro is in. - */ - async getMacroBodyByMacroId( - parameters: Parameters.GetMacroBodyByMacroId, - callback: Callback, - ): Promise; - /** - * Returns the body of a macro in storage format, for the given macro ID. This includes information like the name of - * the macro, the body of the macro, and any macro parameters. This method is mainly used by Cloud apps. - * - * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for - * it, unless an ID is specified (by an app). The macro ID will look similar to this: - * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is - * only modified by Confluence if there are conflicting IDs. - * - * For Forge macros, the value for macro ID is the "local ID" of that particular ADF node. This value can be retrieved - * either client-side by calling view.getContext() and accessing "localId" on the resulting object, or server-side by - * examining the "local-id" parameter node inside the "parameters" node. - * - * Note that there are other attributes named "local-id", but only this particular one is used to store the macro ID. - * - * Example: com.atlassian.ecosystem - * e9c4aa10-73fa-417c-888d-48c719ae4165 - * - * - * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a - * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and - * transparently propagate out to all instances. - * - * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the - * macro is in. - */ - async getMacroBodyByMacroId( - parameters: Parameters.GetMacroBodyByMacroId, - callback?: never, - ): Promise; - async getMacroBodyByMacroId( - parameters: Parameters.GetMacroBodyByMacroId, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the body of a macro in format specified in path, for the given macro ID. This includes information like the - * name of the macro, the body of the macro, and any macro parameters. - * - * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for - * it, unless an ID is specified (by an app). The macro ID will look similar to this: - * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is - * only modified by Confluence if there are conflicting IDs. - * - * For Forge macros, the value for macro ID is the "local ID" of that particular ADF node. This value can be retrieved - * either client-side by calling view.getContext() and accessing "localId" on the resulting object, or server-side by - * examining the "local-id" parameter node inside the "parameters" node. - * - * Note that there are other attributes named "local-id", but only this particular one is used to store the macro ID. - * - * Example: com.atlassian.ecosystem - * e9c4aa10-73fa-417c-888d-48c719ae4165 - * - * - * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a - * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and - * transparently propagate out to all instances. - * - * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the - * macro is in. - */ - async getAndConvertMacroBodyByMacroId( - parameters: Parameters.GetAndConvertMacroBodyByMacroId, - callback: Callback, - ): Promise; - /** - * Returns the body of a macro in format specified in path, for the given macro ID. This includes information like the - * name of the macro, the body of the macro, and any macro parameters. - * - * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for - * it, unless an ID is specified (by an app). The macro ID will look similar to this: - * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is - * only modified by Confluence if there are conflicting IDs. - * - * For Forge macros, the value for macro ID is the "local ID" of that particular ADF node. This value can be retrieved - * either client-side by calling view.getContext() and accessing "localId" on the resulting object, or server-side by - * examining the "local-id" parameter node inside the "parameters" node. - * - * Note that there are other attributes named "local-id", but only this particular one is used to store the macro ID. - * - * Example: com.atlassian.ecosystem - * e9c4aa10-73fa-417c-888d-48c719ae4165 - * - * - * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a - * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and - * transparently propagate out to all instances. - * - * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the - * macro is in. - */ - async getAndConvertMacroBodyByMacroId( - parameters: Parameters.GetAndConvertMacroBodyByMacroId, - callback?: never, - ): Promise; - async getAndConvertMacroBodyByMacroId( - parameters: Parameters.GetAndConvertMacroBodyByMacroId, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}/convert/${parameters.to}`, - method: 'GET', - params: { - spaceKeyContext: parameters.spaceKeyContext, - embeddedContentRender: parameters.embeddedContentRender, - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns Async Id of the conversion task which will convert the macro into a content body of the desired format. The - * result will be available for 5 minutes after completion of the conversion. - * - * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for - * it, unless an ID is specified (by an app). The macro ID will look similar to this: - * '884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is only - * modified by Confluence if there are conflicting IDs. - * - * For Forge macros, the value for macro ID is the "local ID" of that particular ADF node. This value can be retrieved - * either client-side by calling view.getContext() and accessing "localId" on the resulting object, or server-side by - * examining the "local-id" parameter node inside the "parameters" node. - * - * Note that there are other attributes named "local-id", but only this particular one is used to store the macro ID. - * - * Example: com.atlassian.ecosystem - * e9c4aa10-73fa-417c-888d-48c719ae4165 - * - * - * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a - * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and - * transparently propagate out to all instances. - * - * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the - * macro is in. - */ - async getAndAsyncConvertMacroBodyByMacroId( - parameters: Parameters.GetAndAsyncConvertMacroBodyByMacroId, - callback: Callback, - ): Promise; - /** - * Returns Async Id of the conversion task which will convert the macro into a content body of the desired format. The - * result will be available for 5 minutes after completion of the conversion. - * - * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for - * it, unless an ID is specified (by an app). The macro ID will look similar to this: - * '884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is only - * modified by Confluence if there are conflicting IDs. - * - * For Forge macros, the value for macro ID is the "local ID" of that particular ADF node. This value can be retrieved - * either client-side by calling view.getContext() and accessing "localId" on the resulting object, or server-side by - * examining the "local-id" parameter node inside the "parameters" node. - * - * Note that there are other attributes named "local-id", but only this particular one is used to store the macro ID. - * - * Example: com.atlassian.ecosystem - * e9c4aa10-73fa-417c-888d-48c719ae4165 - * - * - * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a - * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and - * transparently propagate out to all instances. - * - * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the - * macro is in. - */ - async getAndAsyncConvertMacroBodyByMacroId( - parameters: Parameters.GetAndAsyncConvertMacroBodyByMacroId, - callback?: never, - ): Promise; - async getAndAsyncConvertMacroBodyByMacroId( - parameters: Parameters.GetAndAsyncConvertMacroBodyByMacroId, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}/convert/async/${parameters.to}`, - method: 'GET', - params: { - allowCache: parameters.allowCache, - spaceKeyContext: parameters.spaceKeyContext, - embeddedContentRender: parameters.embeddedContentRender, - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/contentPermissions.ts b/packages/legacy/src/api/contentPermissions.ts deleted file mode 100644 index 6540114d..00000000 --- a/packages/legacy/src/api/contentPermissions.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class ContentPermissions { - constructor(private client: Client) {} - - /** - * Check if a user or a group can perform an operation to the specified content. The `operation` to check must be - * provided. The user’s account ID or the ID of the group can be provided in the `subject` to check permissions - * against a specified user or group. The following permission checks are done to make sure that the user or group has - * the proper access: - * - * - Site permissions - * - Space permissions - * - Content restrictions - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission) if checking permission for self, otherwise 'Confluence Administrator' global - * permission is required. - */ - async checkContentPermission( - parameters: Parameters.CheckContentPermission, - callback: Callback, - ): Promise; - /** - * Check if a user or a group can perform an operation to the specified content. The `operation` to check must be - * provided. The user’s account ID or the ID of the group can be provided in the `subject` to check permissions - * against a specified user or group. The following permission checks are done to make sure that the user or group has - * the proper access: - * - * - Site permissions - * - Space permissions - * - Content restrictions - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission) if checking permission for self, otherwise 'Confluence Administrator' global - * permission is required. - */ - async checkContentPermission( - parameters: Parameters.CheckContentPermission, - callback?: never, - ): Promise; - async checkContentPermission( - parameters: Parameters.CheckContentPermission, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/permission/check`, - method: 'POST', - data: { - subject: parameters.subject, - operation: parameters.operation, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/contentProperties.ts b/packages/legacy/src/api/contentProperties.ts deleted file mode 100644 index c75767b7..00000000 --- a/packages/legacy/src/api/contentProperties.ts +++ /dev/null @@ -1,274 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Callback } from '../callback.js'; -import type { Client } from '../clients/index.js'; -import type { RequestConfig } from '../requestConfig.js'; - -/** @deprecated Will be removed in next major version. */ -export class ContentProperties { - constructor(private client: Client) {} - - /** - * Returns the properties for a piece of content. For more information about content properties, see [Confluence - * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if it is a page. - * - * @deprecated Will be removed in next major version. - */ - async getContentProperties( - parameters: Parameters.GetContentProperties, - callback: Callback, - ): Promise; - /** - * Returns the properties for a piece of content. For more information about content properties, see [Confluence - * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if it is a page. - * - * @deprecated Will be removed in next major version. - */ - async getContentProperties( - parameters: Parameters.GetContentProperties, - callback?: never, - ): Promise; - async getContentProperties( - parameters: Parameters.GetContentProperties, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/property`, - method: 'GET', - params: { - key: parameters.key, - expand: parameters.expand, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Creates a property for an existing piece of content. For more information about content properties, see [Confluence - * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * This is the same as [Create content property for key](#api-content-id-property-key-post) except that the key is - * specified in the request body instead of as a path parameter. - * - * Content properties can also be added when creating a new piece of content by including them in the - * `metadata.properties` of the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - * - * @deprecated Will be removed in next major version. - */ - async createContentProperty( - parameters: Parameters.CreateContentProperty, - callback: Callback, - ): Promise; - /** - * Creates a property for an existing piece of content. For more information about content properties, see [Confluence - * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * This is the same as [Create content property for key](#api-content-id-property-key-post) except that the key is - * specified in the request body instead of as a path parameter. - * - * Content properties can also be added when creating a new piece of content by including them in the - * `metadata.properties` of the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - * - * @deprecated Will be removed in next major version. - */ - async createContentProperty( - parameters: Parameters.CreateContentProperty, - callback?: never, - ): Promise; - async createContentProperty( - parameters: Parameters.CreateContentProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/property`, - method: 'POST', - data: { - key: parameters.key, - value: parameters.value, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns a content property for a piece of content. For more information, see [Confluence entity - * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if it is a page. - * - * @deprecated Will be removed in next major version. - */ - async getContentProperty( - parameters: Parameters.GetContentProperty, - callback: Callback, - ): Promise; - /** - * Returns a content property for a piece of content. For more information, see [Confluence entity - * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and - * permission to view the content if it is a page. - * - * @deprecated Will be removed in next major version. - */ - async getContentProperty( - parameters: Parameters.GetContentProperty, - callback?: never, - ): Promise; - async getContentProperty( - parameters: Parameters.GetContentProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/property/${parameters.key}`, - method: 'GET', - params: { - expand: parameters.expand, - status: parameters.status, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Creates a property for an existing piece of content. For more information about content properties, see [Confluence - * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * This is the same as [Create content property](#api-content-id-property-post) except that the key is specified as a - * path parameter instead of in the request body. - * - * Content properties can also be added when creating a new piece of content by including them in the - * `metadata.properties` of the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - * - * @deprecated Will be removed in next major version. - */ - async createContentPropertyForKey( - parameters: Parameters.CreateContentPropertyForKey, - callback: Callback, - ): Promise; - /** - * Creates a property for an existing piece of content. For more information about content properties, see [Confluence - * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * This is the same as [Create content property](#api-content-id-property-post) except that the key is specified as a - * path parameter instead of in the request body. - * - * Content properties can also be added when creating a new piece of content by including them in the - * `metadata.properties` of the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - * - * @deprecated Will be removed in next major version. - */ - async createContentPropertyForKey( - parameters: Parameters.CreateContentPropertyForKey, - callback?: never, - ): Promise; - async createContentPropertyForKey( - parameters: Parameters.CreateContentPropertyForKey, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/property/${parameters.key}`, - method: 'POST', - data: { - value: parameters.value, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Updates an existing content property. This method will also create a new property for a piece of content, if the - * property key does not exist and the property version is 1. For more information about content properties, see - * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - * - * @deprecated Will be removed in next major version. - */ - async updateContentProperty( - parameters: Parameters.UpdateContentProperty, - callback: Callback, - ): Promise; - /** - * Updates an existing content property. This method will also create a new property for a piece of content, if the - * property key does not exist and the property version is 1. For more information about content properties, see - * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - * - * @deprecated Will be removed in next major version. - */ - async updateContentProperty( - parameters: Parameters.UpdateContentProperty, - callback?: never, - ): Promise; - async updateContentProperty( - parameters: Parameters.UpdateContentProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/property/${parameters.key}`, - method: 'PUT', - data: { - value: parameters.value, - version: parameters.version, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Deletes a content property. For more information about content properties, see [Confluence entity - * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - * - * @deprecated Will be removed in next major version. - */ - async deleteContentProperty( - parameters: Parameters.DeleteContentProperty, - callback: Callback, - ): Promise; - /** - * Deletes a content property. For more information about content properties, see [Confluence entity - * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - * - * @deprecated Will be removed in next major version. - */ - async deleteContentProperty(parameters: Parameters.DeleteContentProperty, callback?: never): Promise; - async deleteContentProperty( - parameters: Parameters.DeleteContentProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/property/${parameters.key}`, - method: 'DELETE', - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/contentRestrictions.ts b/packages/legacy/src/api/contentRestrictions.ts deleted file mode 100644 index 4b910112..00000000 --- a/packages/legacy/src/api/contentRestrictions.ts +++ /dev/null @@ -1,444 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class ContentRestrictions { - constructor(private client: Client) {} - - /** - * Returns the restrictions on a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - */ - async getRestrictions( - parameters: Parameters.GetRestrictions, - callback: Callback, - ): Promise; - /** - * Returns the restrictions on a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - */ - async getRestrictions( - parameters: Parameters.GetRestrictions, - callback?: never, - ): Promise; - async getRestrictions( - parameters: Parameters.GetRestrictions, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction`, - method: 'GET', - params: { - expand: parameters.expand, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds restrictions to a piece of content. Note, this does not change any existing restrictions on the content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async addRestrictions( - parameters: Parameters.AddRestrictions, - callback: Callback, - ): Promise; - /** - * Adds restrictions to a piece of content. Note, this does not change any existing restrictions on the content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async addRestrictions( - parameters: Parameters.AddRestrictions, - callback?: never, - ): Promise; - async addRestrictions( - parameters: Parameters.AddRestrictions, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction`, - method: 'POST', - params: { - expand: parameters.expand, - }, - data: parameters.body, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Updates restrictions for a piece of content. This removes the existing restrictions and replaces them with the - * restrictions in the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async updateRestrictions( - parameters: Parameters.UpdateRestrictions, - callback: Callback, - ): Promise; - /** - * Updates restrictions for a piece of content. This removes the existing restrictions and replaces them with the - * restrictions in the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async updateRestrictions( - parameters: Parameters.UpdateRestrictions, - callback?: never, - ): Promise; - async updateRestrictions( - parameters: Parameters.UpdateRestrictions, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction`, - method: 'PUT', - params: { - expand: parameters.expand, - }, - data: parameters.body, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Removes all restrictions (read and update) on a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async deleteRestrictions( - parameters: Parameters.DeleteRestrictions, - callback: Callback, - ): Promise; - /** - * Removes all restrictions (read and update) on a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async deleteRestrictions( - parameters: Parameters.DeleteRestrictions, - callback?: never, - ): Promise; - async deleteRestrictions( - parameters: Parameters.DeleteRestrictions, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction`, - method: 'DELETE', - params: { - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns restrictions on a piece of content by operation. This method is similar to [Get - * restrictions](#api-content-id-restriction-get) except that the operations are properties of the return object, - * rather than items in a results array. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - */ - async getRestrictionsByOperation( - parameters: Parameters.GetRestrictionsByOperation, - callback: Callback, - ): Promise; - /** - * Returns restrictions on a piece of content by operation. This method is similar to [Get - * restrictions](#api-content-id-restriction-get) except that the operations are properties of the return object, - * rather than items in a results array. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - */ - async getRestrictionsByOperation( - parameters: Parameters.GetRestrictionsByOperation, - callback?: never, - ): Promise; - async getRestrictionsByOperation( - parameters: Parameters.GetRestrictionsByOperation, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction/byOperation`, - method: 'GET', - params: { - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the restictions on a piece of content for a given operation (read or update). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - */ - async getRestrictionsForOperation( - parameters: Parameters.GetRestrictionsForOperation, - callback: Callback, - ): Promise; - /** - * Returns the restictions on a piece of content for a given operation (read or update). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - */ - async getRestrictionsForOperation( - parameters: Parameters.GetRestrictionsForOperation, - callback?: never, - ): Promise; - async getRestrictionsForOperation( - parameters: Parameters.GetRestrictionsForOperation, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}`, - method: 'GET', - params: { - expand: parameters.expand, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a - * `read` restriction for the `123456` group id, the following request will return `true`: - * - * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/byGroupId/123456` - * - * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for - * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence - * permissions](https://confluence.atlassian.com/x/_AozKw). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - */ - async getIndividualGroupRestrictionStatusByGroupId( - parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId, - callback: Callback, - ): Promise; - /** - * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a - * `read` restriction for the `123456` group id, the following request will return `true`: - * - * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/byGroupId/123456` - * - * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for - * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence - * permissions](https://confluence.atlassian.com/x/_AozKw). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - */ - async getIndividualGroupRestrictionStatusByGroupId( - parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId, - callback?: never, - ): Promise; - async getIndividualGroupRestrictionStatusByGroupId( - parameters: Parameters.GetIndividualGroupRestrictionStatusByGroupId, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds a group to a content restriction by Group Id. That is, grant read or update permission to the group for a - * piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async addGroupToContentRestrictionByGroupId( - parameters: Parameters.AddGroupToContentRestrictionByGroupId, - callback: Callback, - ): Promise; - /** - * Adds a group to a content restriction by Group Id. That is, grant read or update permission to the group for a - * piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async addGroupToContentRestrictionByGroupId( - parameters: Parameters.AddGroupToContentRestrictionByGroupId, - callback?: never, - ): Promise; - async addGroupToContentRestrictionByGroupId( - parameters: Parameters.AddGroupToContentRestrictionByGroupId, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`, - method: 'PUT', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of - * content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async removeGroupById(parameters: Parameters.RemoveGroupById, callback: Callback): Promise; - /** - * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of - * content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async removeGroupById(parameters: Parameters.RemoveGroupById, callback?: never): Promise; - async removeGroupById( - parameters: Parameters.RemoveGroupById, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`, - method: 'DELETE', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns whether the specified content restriction applies to a user. For example, if a page with `id=123` has a - * `read` restriction for a user with an account ID of `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`, the following - * request will return `true`: - * - * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/user?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192` - * - * Note that a response of `true` does not guarantee that the user can view the page, as it does not account for - * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence - * permissions](https://confluence.atlassian.com/x/_AozKw). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - */ - async getContentRestrictionStatusForUser( - parameters: Parameters.GetContentRestrictionStatusForUser, - callback: Callback, - ): Promise; - /** - * Returns whether the specified content restriction applies to a user. For example, if a page with `id=123` has a - * `read` restriction for a user with an account ID of `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`, the following - * request will return `true`: - * - * `https://your-domain.atlassian.net/api/content/123/restriction/byOperation/read/user?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192` - * - * Note that a response of `true` does not guarantee that the user can view the page, as it does not account for - * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence - * permissions](https://confluence.atlassian.com/x/_AozKw). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - */ - async getContentRestrictionStatusForUser( - parameters: Parameters.GetContentRestrictionStatusForUser, - callback?: never, - ): Promise; - async getContentRestrictionStatusForUser( - parameters: Parameters.GetContentRestrictionStatusForUser, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`, - method: 'GET', - params: { - key: parameters.key, - userName: parameters.userName, - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds a user to a content restriction. That is, grant read or update permission to the user for a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async addUserToContentRestriction( - parameters: Parameters.AddUserToContentRestriction, - callback: Callback, - ): Promise; - /** - * Adds a user to a content restriction. That is, grant read or update permission to the user for a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async addUserToContentRestriction( - parameters: Parameters.AddUserToContentRestriction, - callback?: never, - ): Promise; - async addUserToContentRestriction( - parameters: Parameters.AddUserToContentRestriction, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`, - method: 'PUT', - params: { - key: parameters.key, - userName: parameters.userName, - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of - * content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async removeUserFromContentRestriction( - parameters: Parameters.RemoveUserFromContentRestriction, - callback: Callback, - ): Promise; - /** - * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of - * content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async removeUserFromContentRestriction( - parameters: Parameters.RemoveUserFromContentRestriction, - callback?: never, - ): Promise; - async removeUserFromContentRestriction( - parameters: Parameters.RemoveUserFromContentRestriction, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`, - method: 'DELETE', - params: { - key: parameters.key, - userName: parameters.userName, - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/contentStates.ts b/packages/legacy/src/api/contentStates.ts deleted file mode 100644 index 6fb83619..00000000 --- a/packages/legacy/src/api/contentStates.ts +++ /dev/null @@ -1,294 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class ContentStates { - constructor(private client: Client) {} - - /** - * Gets the current content state of the draft or current version of content. To specify the draft version, set the - * parameter status to draft, otherwise archived or current will get the relevant published state. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - */ - async getContentState( - parameters: Parameters.GetContentState, - callback: Callback, - ): Promise; - /** - * Gets the current content state of the draft or current version of content. To specify the draft version, set the - * parameter status to draft, otherwise archived or current will get the relevant published state. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. - */ - async getContentState( - parameters: Parameters.GetContentState, - callback?: never, - ): Promise; - async getContentState( - parameters: Parameters.GetContentState, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/state`, - method: 'GET', - params: { - status: parameters.status, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Sets the content state of the content specified and creates a new version (publishes the content without changing - * the body) of the content with the new state. - * - * You may pass in either an id of a state, or the name and color of a desired new state. If all 3 are passed in, id - * will be used. If the name and color passed in already exist under the current user's existing custom states, the - * existing state will be reused. If custom states are disabled in the space of the content (which can be determined - * by getting the content state space settings of the content's space) then this set will fail. - * - * You may not remove a content state via this PUT request. You must use the DELETE method. A specified state is - * required in the body of this request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async setContentState( - parameters: Parameters.SetContentState, - callback: Callback, - ): Promise; - /** - * Sets the content state of the content specified and creates a new version (publishes the content without changing - * the body) of the content with the new state. - * - * You may pass in either an id of a state, or the name and color of a desired new state. If all 3 are passed in, id - * will be used. If the name and color passed in already exist under the current user's existing custom states, the - * existing state will be reused. If custom states are disabled in the space of the content (which can be determined - * by getting the content state space settings of the content's space) then this set will fail. - * - * You may not remove a content state via this PUT request. You must use the DELETE method. A specified state is - * required in the body of this request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async setContentState( - parameters: Parameters.SetContentState, - callback?: never, - ): Promise; - async setContentState( - parameters: Parameters.SetContentState, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/state`, - method: 'PUT', - params: { - status: parameters.status, - }, - data: { - name: parameters.name, - color: parameters.color, - id: parameters.stateId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Removes the content state of the content specified and creates a new version (publishes the content without - * changing the body) of the content with the new status. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async removeContentState( - parameters: Parameters.RemoveContentState, - callback: Callback, - ): Promise; - /** - * Removes the content state of the content specified and creates a new version (publishes the content without - * changing the body) of the content with the new status. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async removeContentState( - parameters: Parameters.RemoveContentState, - callback?: never, - ): Promise; - async removeContentState( - parameters: Parameters.RemoveContentState, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/state`, - method: 'DELETE', - params: { - status: parameters.status, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Gets content states that are available for the content to be set as. Will return all enabled Space Content States. - * Will only return most the 3 most recently published custom content states to match UI editor list. To get all - * custom content states, use the /content-states endpoint. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async getAvailableContentStates( - parameters: Parameters.GetAvailableContentStates, - callback: Callback, - ): Promise; - /** - * Gets content states that are available for the content to be set as. Will return all enabled Space Content States. - * Will only return most the 3 most recently published custom content states to match UI editor list. To get all - * custom content states, use the /content-states endpoint. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. - */ - async getAvailableContentStates( - parameters: Parameters.GetAvailableContentStates, - callback?: never, - ): Promise; - async getAvailableContentStates( - parameters: Parameters.GetAvailableContentStates, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/state/available`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Get custom content states that authenticated user has created. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required** Must have user authentication. - */ - async getCustomContentStates(callback: Callback): Promise; - /** - * Get custom content states that authenticated user has created. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required** Must have user authentication. - */ - async getCustomContentStates(callback?: never): Promise; - async getCustomContentStates(callback?: Callback): Promise { - const config: RequestConfig = { - url: '/api/content-states', - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Get content states that are suggested in the space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. - */ - async getSpaceContentStates( - parameters: Parameters.GetSpaceContentStates, - callback: Callback, - ): Promise; - /** - * Get content states that are suggested in the space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. - */ - async getSpaceContentStates( - parameters: Parameters.GetSpaceContentStates, - callback?: never, - ): Promise; - async getSpaceContentStates( - parameters: Parameters.GetSpaceContentStates, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/state`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Get object describing whether content states are allowed at all, if custom content states or space content states - * are restricted, and a list of space content states allowed for the space if they are not restricted. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async getContentStateSettings( - parameters: Parameters.GetContentStateSettings, - callback: Callback, - ): Promise; - /** - * Get object describing whether content states are allowed at all, if custom content states or space content states - * are restricted, and a list of space content states allowed for the space if they are not restricted. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async getContentStateSettings( - parameters: Parameters.GetContentStateSettings, - callback?: never, - ): Promise; - async getContentStateSettings( - parameters: Parameters.GetContentStateSettings, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/state/settings`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns all content that has the provided content state in a space. - * - * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the - * query limit parameter will be restricted to a maximum value of 25. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. - */ - async getContentsWithState( - parameters: Parameters.GetContentsWithState, - callback: Callback, - ): Promise; - /** - * Returns all content that has the provided content state in a space. - * - * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the - * query limit parameter will be restricted to a maximum value of 25. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. - */ - async getContentsWithState( - parameters: Parameters.GetContentsWithState, - callback?: never, - ): Promise; - async getContentsWithState( - parameters: Parameters.GetContentsWithState, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/state/content`, - method: 'GET', - params: { - 'state-id': parameters.stateId, - expand: parameters.expand, - limit: parameters.limit, - start: parameters.start, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/contentVersions.ts b/packages/legacy/src/api/contentVersions.ts deleted file mode 100644 index fd933308..00000000 --- a/packages/legacy/src/api/contentVersions.ts +++ /dev/null @@ -1,154 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class ContentVersions { - constructor(private client: Client) {} - - /** - * Returns the versions for a piece of content in descending order. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the - * content is a blog post, 'View' permission for the space is required. - * - * @deprecated Will be removed in next major version. - */ - async getContentVersions( - parameters: Parameters.GetContentVersions, - callback: Callback, - ): Promise; - /** - * Returns the versions for a piece of content in descending order. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the - * content is a blog post, 'View' permission for the space is required. - * - * @deprecated Will be removed in next major version. - */ - async getContentVersions( - parameters: Parameters.GetContentVersions, - callback?: never, - ): Promise; - async getContentVersions( - parameters: Parameters.GetContentVersions, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/version`, - method: 'GET', - params: { - start: parameters.start, - limit: parameters.limit, - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Restores a historical version to be the latest version. That is, a new version is created with the content of the - * historical version. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async restoreContentVersion( - parameters: Parameters.RestoreContentVersion, - callback: Callback, - ): Promise; - /** - * Restores a historical version to be the latest version. That is, a new version is created with the content of the - * historical version. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async restoreContentVersion( - parameters: Parameters.RestoreContentVersion, - callback?: never, - ): Promise; - async restoreContentVersion( - parameters: Parameters.RestoreContentVersion, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/version`, - method: 'POST', - params: { - expand: parameters.expand, - }, - data: { - operationKey: parameters.operationKey, - params: parameters.params, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns a version for a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the - * content is a blog post, 'View' permission for the space is required. - * - * @deprecated Will be removed in next major version. - */ - async getContentVersion( - parameters: Parameters.GetContentVersion, - callback: Callback, - ): Promise; - /** - * Returns a version for a piece of content. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the - * content is a blog post, 'View' permission for the space is required. - * - * @deprecated Will be removed in next major version. - */ - async getContentVersion(parameters: Parameters.GetContentVersion, callback?: never): Promise; - async getContentVersion( - parameters: Parameters.GetContentVersion, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/version/${parameters.versionNumber}`, - method: 'GET', - params: { - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Delete a historical version. This does not delete the changes made to the content in that version, rather the - * changes for the deleted version are rolled up into the next version. Note, you cannot delete the current version. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async deleteContentVersion( - parameters: Parameters.DeleteContentVersion, - callback: Callback, - ): Promise; - /** - * Delete a historical version. This does not delete the changes made to the content in that version, rather the - * changes for the deleted version are rolled up into the next version. Note, you cannot delete the current version. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async deleteContentVersion(parameters: Parameters.DeleteContentVersion, callback?: never): Promise; - async deleteContentVersion( - parameters: Parameters.DeleteContentVersion, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/version/${parameters.versionNumber}`, - method: 'DELETE', - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/contentWatches.ts b/packages/legacy/src/api/contentWatches.ts deleted file mode 100644 index df372d2f..00000000 --- a/packages/legacy/src/api/contentWatches.ts +++ /dev/null @@ -1,501 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class ContentWatches { - constructor(private client: Client) {} - - /** - * Returns the watches for a page. A user that watches a page will receive receive notifications when the page is - * updated. - * - * If you want to manage watches for a page, use the following `user` methods: - * - * - [Get content watch status for user](#api-user-watch-content-contentId-get) - * - [Add content watch](#api-user-watch-content-contentId-post) - * - [Remove content watch](#api-user-watch-content-contentId-delete) - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getWatchesForPage( - parameters: Parameters.GetWatchesForPage, - callback: Callback, - ): Promise; - /** - * Returns the watches for a page. A user that watches a page will receive receive notifications when the page is - * updated. - * - * If you want to manage watches for a page, use the following `user` methods: - * - * - [Get content watch status for user](#api-user-watch-content-contentId-get) - * - [Add content watch](#api-user-watch-content-contentId-post) - * - [Remove content watch](#api-user-watch-content-contentId-delete) - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getWatchesForPage( - parameters: Parameters.GetWatchesForPage, - callback?: never, - ): Promise; - async getWatchesForPage( - parameters: Parameters.GetWatchesForPage, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/notification/child-created`, - method: 'GET', - params: { - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns all space watches for the space that the content is in. A user that watches a space will receive receive - * notifications when any content in the space is updated. - * - * If you want to manage watches for a space, use the following `user` methods: - * - * - [Get space watch status for user](#api-user-watch-space-spaceKey-get) - * - [Add space watch](#api-user-watch-space-spaceKey-post) - * - [Remove space watch](#api-user-watch-space-spaceKey-delete) - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getWatchesForSpace( - parameters: Parameters.GetWatchesForSpace, - callback: Callback, - ): Promise; - /** - * Returns all space watches for the space that the content is in. A user that watches a space will receive receive - * notifications when any content in the space is updated. - * - * If you want to manage watches for a space, use the following `user` methods: - * - * - [Get space watch status for user](#api-user-watch-space-spaceKey-get) - * - [Add space watch](#api-user-watch-space-spaceKey-post) - * - [Remove space watch](#api-user-watch-space-spaceKey-delete) - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getWatchesForSpace( - parameters: Parameters.GetWatchesForSpace, - callback?: never, - ): Promise; - async getWatchesForSpace( - parameters: Parameters.GetWatchesForSpace, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/notification/created`, - method: 'GET', - params: { - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** Returns a list of watchers of a space */ - async getWatchersForSpace( - parameters: Parameters.GetWatchersForSpace, - callback: Callback, - ): Promise; - /** Returns a list of watchers of a space */ - async getWatchersForSpace( - parameters: Parameters.GetWatchersForSpace, - callback?: never, - ): Promise; - async getWatchersForSpace( - parameters: Parameters.GetWatchersForSpace, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/watch`, - method: 'GET', - params: { - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns whether a user is watching a piece of content. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async getContentWatchStatus( - parameters: Parameters.GetContentWatchStatus, - callback: Callback, - ): Promise; - /** - * Returns whether a user is watching a piece of content. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async getContentWatchStatus( - parameters: Parameters.GetContentWatchStatus, - callback?: never, - ): Promise; - async getContentWatchStatus( - parameters: Parameters.GetContentWatchStatus, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/watch/content/${parameters.contentId}`, - method: 'GET', - params: { - key: parameters.key, - username: parameters.username, - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds a user as a watcher to a piece of content. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF - * protection. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async addContentWatcher(parameters: Parameters.AddContentWatcher, callback: Callback): Promise; - /** - * Adds a user as a watcher to a piece of content. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF - * protection. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async addContentWatcher(parameters: Parameters.AddContentWatcher, callback?: never): Promise; - async addContentWatcher( - parameters: Parameters.AddContentWatcher, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/watch/content/${parameters.contentId}`, - method: 'POST', - params: { - key: parameters.key, - username: parameters.username, - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Removes a user as a watcher from a piece of content. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async removeContentWatcher( - parameters: Parameters.RemoveContentWatcher, - callback: Callback, - ): Promise; - /** - * Removes a user as a watcher from a piece of content. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async removeContentWatcher(parameters: Parameters.RemoveContentWatcher, callback?: never): Promise; - async removeContentWatcher( - parameters: Parameters.RemoveContentWatcher, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/watch/content/${parameters.contentId}`, - method: 'DELETE', - headers: { - 'X-Atlassian-Token': parameters['X-Atlassian-Token'], - }, - params: { - key: parameters.key, - username: parameters.username, - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns whether a user is watching a label. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async isWatchingLabel( - parameters: Parameters.IsWatchingLabel, - callback: Callback, - ): Promise; - /** - * Returns whether a user is watching a label. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async isWatchingLabel(parameters: Parameters.IsWatchingLabel, callback?: never): Promise; - async isWatchingLabel( - parameters: Parameters.IsWatchingLabel, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/watch/label/${parameters.labelName}`, - method: 'GET', - params: { - key: parameters.key, - username: parameters.username, - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds a user as a watcher to a label. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF - * protection. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async addLabelWatcher(parameters: Parameters.AddLabelWatcher, callback: Callback): Promise; - /** - * Adds a user as a watcher to a label. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF - * protection. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async addLabelWatcher(parameters: Parameters.AddLabelWatcher, callback?: never): Promise; - async addLabelWatcher(parameters: Parameters.AddLabelWatcher, callback?: Callback): Promise { - const config: RequestConfig = { - url: `/api/user/watch/label/${parameters.labelName}`, - method: 'POST', - headers: { - 'X-Atlassian-Token': parameters['X-Atlassian-Token'], - }, - params: { - key: parameters.key, - username: parameters.username, - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Removes a user as a watcher from a label. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async removeLabelWatcher(parameters: Parameters.RemoveLabelWatcher, callback: Callback): Promise; - /** - * Removes a user as a watcher from a label. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async removeLabelWatcher(parameters: Parameters.RemoveLabelWatcher, callback?: never): Promise; - async removeLabelWatcher( - parameters: Parameters.RemoveLabelWatcher, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/watch/label/${parameters.labelName}`, - method: 'DELETE', - params: { - key: parameters.key, - username: parameters.username, - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns whether a user is watching a space. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async isWatchingSpace( - parameters: Parameters.IsWatchingSpace, - callback: Callback, - ): Promise; - /** - * Returns whether a user is watching a space. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async isWatchingSpace(parameters: Parameters.IsWatchingSpace, callback?: never): Promise; - async isWatchingSpace( - parameters: Parameters.IsWatchingSpace, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/watch/space/${parameters.spaceKey}`, - method: 'GET', - params: { - key: parameters.key, - username: parameters.username, - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds a user as a watcher to a space. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF - * protection. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async addSpaceWatcher(parameters: Parameters.AddSpaceWatcher, callback: Callback): Promise; - /** - * Adds a user as a watcher to a space. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF - * protection. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async addSpaceWatcher(parameters: Parameters.AddSpaceWatcher, callback?: never): Promise; - async addSpaceWatcher(parameters: Parameters.AddSpaceWatcher, callback?: Callback): Promise { - const config: RequestConfig = { - url: `/api/user/watch/space/${parameters.spaceKey}`, - method: 'POST', - headers: { - 'X-Atlassian-Token': parameters['X-Atlassian-Token'], - }, - params: { - key: parameters.key, - username: parameters.username, - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Removes a user as a watcher from a space. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async removeSpaceWatch(parameters: Parameters.RemoveSpaceWatch, callback: Callback): Promise; - /** - * Removes a user as a watcher from a space. Choose the user by doing one of the following: - * - * - Specify a user via a query parameter: Use the `accountId` to identify the user. - * - Do not specify a user: The currently logged-in user will be used. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission - * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). - */ - async removeSpaceWatch(parameters: Parameters.RemoveSpaceWatch, callback?: never): Promise; - async removeSpaceWatch(parameters: Parameters.RemoveSpaceWatch, callback?: Callback): Promise { - const config: RequestConfig = { - url: `/api/user/watch/space/${parameters.spaceKey}`, - method: 'DELETE', - params: { - key: parameters.key, - username: parameters.username, - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/dynamicModules.ts b/packages/legacy/src/api/dynamicModules.ts deleted file mode 100644 index b20b7556..00000000 --- a/packages/legacy/src/api/dynamicModules.ts +++ /dev/null @@ -1,83 +0,0 @@ -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class DynamicModules { - constructor(private client: Client) {} - - /** - * Returns all modules registered dynamically by the calling app. - * - * **[Permissions](#permissions) required:** Only Connect apps can make this request. - */ - async getModules(callback: Callback): Promise; - /** - * Returns all modules registered dynamically by the calling app. - * - * **[Permissions](#permissions) required:** Only Connect apps can make this request. - */ - async getModules(callback?: never): Promise; - async getModules(callback?: Callback): Promise { - const config: RequestConfig = { - url: '/atlassian-connect/1/app/module/dynamic', - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Registers a list of modules. For the list of modules that support dynamic registration, see [Dynamic - * modules](https://developer.atlassian.com/cloud/confluence/dynamic-modules/). - * - * **[Permissions](#permissions) required:** Only Connect apps can make this request. - */ - async registerModules( - parameters: Parameters.RegisterModules | undefined, - callback: Callback, - ): Promise; - /** - * Registers a list of modules. For the list of modules that support dynamic registration, see [Dynamic - * modules](https://developer.atlassian.com/cloud/confluence/dynamic-modules/). - * - * **[Permissions](#permissions) required:** Only Connect apps can make this request. - */ - async registerModules(parameters?: Parameters.RegisterModules, callback?: never): Promise; - async registerModules( - parameters?: Parameters.RegisterModules, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/atlassian-connect/1/app/module/dynamic', - method: 'POST', - data: parameters, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Remove all or a list of modules registered by the calling app. - * - * **[Permissions](#permissions) required:** Only Connect apps can make this request. - */ - async removeModules(parameters: Parameters.RemoveModules, callback: Callback): Promise; - /** - * Remove all or a list of modules registered by the calling app. - * - * **[Permissions](#permissions) required:** Only Connect apps can make this request. - */ - async removeModules(parameters: Parameters.RemoveModules, callback?: never): Promise; - async removeModules(parameters: Parameters.RemoveModules, callback?: Callback): Promise { - const config: RequestConfig = { - url: '/atlassian-connect/1/app/module/dynamic', - method: 'DELETE', - params: { - moduleKey: parameters.moduleKey, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/experimental.ts b/packages/legacy/src/api/experimental.ts deleted file mode 100644 index ca8fafdf..00000000 --- a/packages/legacy/src/api/experimental.ts +++ /dev/null @@ -1,145 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class Experimental { - constructor(private client: Client) {} - - /** - * Moves a pagetree rooted at a page to the space's trash: - * - * - If the content's type is `page` and its status is `current`, it will be trashed including all its descendants. - * - For every other combination of content type and status, this API is not supported. - * - * This API accepts the pageTree delete request and returns a task ID. The delete process happens asynchronously. - * - * Use the `/longtask/` REST API to get the copy task status. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the - * content is in. - */ - async deletePageTree( - parameters: Parameters.DeletePageTree, - callback: Callback, - ): Promise; - /** - * Moves a pagetree rooted at a page to the space's trash: - * - * - If the content's type is `page` and its status is `current`, it will be trashed including all its descendants. - * - For every other combination of content type and status, this API is not supported. - * - * This API accepts the pageTree delete request and returns a task ID. The delete process happens asynchronously. - * - * Use the `/longtask/` REST API to get the copy task status. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the - * content is in. - */ - async deletePageTree(parameters: Parameters.DeletePageTree, callback?: never): Promise; - async deletePageTree( - parameters: Parameters.DeletePageTree, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/content/${parameters.id}/pageTree`, - method: 'DELETE', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different - * types of labels. - */ - async getLabelsForSpace( - parameters: Parameters.GetLabelsForSpace, - callback: Callback, - ): Promise; - /** - * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different - * types of labels. - */ - async getLabelsForSpace( - parameters: Parameters.GetLabelsForSpace, - callback?: never, - ): Promise; - async getLabelsForSpace( - parameters: Parameters.GetLabelsForSpace, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/label`, - method: 'GET', - params: { - prefix: parameters.prefix, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds labels to a piece of content. Does not modify the existing labels. - * - * Notes: - * - * - Labels can also be added when creating content ([Create content](#api-content-post)). - * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing - * labels and replace them with the labels in the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async addLabelsToSpace( - parameters: Parameters.AddLabelsToSpace, - callback: Callback, - ): Promise; - /** - * Adds labels to a piece of content. Does not modify the existing labels. - * - * Notes: - * - * - Labels can also be added when creating content ([Create content](#api-content-post)). - * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing - * labels and replace them with the labels in the request. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. - */ - async addLabelsToSpace(parameters: Parameters.AddLabelsToSpace, callback?: never): Promise; - async addLabelsToSpace( - parameters: Parameters.AddLabelsToSpace, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/label`, - method: 'POST', - }; - - return this.client.sendRequest(config, callback); - } - - async deleteLabelFromSpace( - parameters: Parameters.DeleteLabelFromSpace, - callback: Callback, - ): Promise; - async deleteLabelFromSpace(parameters: Parameters.DeleteLabelFromSpace, callback?: never): Promise; - async deleteLabelFromSpace( - parameters: Parameters.DeleteLabelFromSpace, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/label`, - method: 'DELETE', - params: { - name: parameters.name, - prefix: parameters.prefix, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/group.ts b/packages/legacy/src/api/group.ts deleted file mode 100644 index c4f475ab..00000000 --- a/packages/legacy/src/api/group.ts +++ /dev/null @@ -1,321 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class Group { - constructor(private client: Client) {} - - /** - * Returns all user groups. The returned groups are ordered alphabetically in ascending order by group name. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getGroups( - parameters: Parameters.GetGroups | undefined, - callback: Callback, - ): Promise; - /** - * Returns all user groups. The returned groups are ordered alphabetically in ascending order by group name. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getGroups(parameters?: Parameters.GetGroups, callback?: never): Promise; - async getGroups( - parameters?: Parameters.GetGroups, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/group', - method: 'GET', - params: { - start: parameters?.start, - limit: parameters?.limit, - accessType: parameters?.accessType, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Creates a new user group. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. - */ - async createGroup( - parameters: Parameters.CreateGroup | undefined, - callback: Callback, - ): Promise; - /** - * Creates a new user group. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. - */ - async createGroup(parameters?: Parameters.CreateGroup, callback?: never): Promise; - async createGroup(parameters?: Parameters.CreateGroup, callback?: Callback): Promise { - const config: RequestConfig = { - url: '/api/group', - method: 'POST', - data: { - name: parameters?.name, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns a user group for a given group id. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getGroupByGroupId( - parameters: Parameters.GetGroupByGroupId, - callback: Callback, - ): Promise; - /** - * Returns a user group for a given group id. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getGroupByGroupId(parameters: Parameters.GetGroupByGroupId, callback?: never): Promise; - async getGroupByGroupId( - parameters: Parameters.GetGroupByGroupId, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/group/by-id', - method: 'GET', - params: { - id: parameters.id, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Delete user group. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. - */ - async removeGroupById(parameters: Parameters.DeleteGroupById, callback: Callback): Promise; - /** - * Delete user group. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. - */ - async removeGroupById(parameters: Parameters.DeleteGroupById, callback?: never): Promise; - async removeGroupById(parameters: Parameters.DeleteGroupById, callback?: Callback): Promise { - const config: RequestConfig = { - url: '/api/group/by-id', - method: 'DELETE', - params: { - id: parameters.id, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** Get search results of groups by partial query provided. */ - async searchGroups( - parameters: Parameters.SearchGroups, - callback: Callback, - ): Promise; - /** Get search results of groups by partial query provided. */ - async searchGroups(parameters: Parameters.SearchGroups, callback?: never): Promise; - async searchGroups( - parameters: Parameters.SearchGroups, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/group/picker', - method: 'GET', - params: { - query: parameters.query, - start: parameters.start, - limit: parameters.limit, - shouldReturnTotalSize: parameters.shouldReturnTotalSize, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the users that are members of a group. - * - * Use updated Get group API - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getGroupMembersByGroupId( - parameters: Parameters.GetGroupMembersByGroupId, - callback: Callback, - ): Promise; - /** - * Returns the users that are members of a group. - * - * Use updated Get group API - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getGroupMembersByGroupId( - parameters: Parameters.GetGroupMembersByGroupId, - callback?: never, - ): Promise; - async getGroupMembersByGroupId( - parameters: Parameters.GetGroupMembersByGroupId, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/group/${parameters.groupId}/membersByGroupId`, - method: 'GET', - params: { - start: parameters.start, - limit: parameters.limit, - shouldReturnTotalSize: parameters.shouldReturnTotalSize, - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds a user as a member in a group represented by its groupId - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. - */ - async addUserToGroupByGroupId( - parameters: Parameters.AddUserToGroupByGroupId, - callback: Callback, - ): Promise; - /** - * Adds a user as a member in a group represented by its groupId - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. - */ - async addUserToGroupByGroupId( - parameters: Parameters.AddUserToGroupByGroupId, - callback?: never, - ): Promise; - async addUserToGroupByGroupId( - parameters: Parameters.AddUserToGroupByGroupId, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/group/userByGroupId', - method: 'POST', - params: { - groupId: parameters.groupId, - }, - data: { - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Remove user as a member from a group. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. - */ - async removeMemberFromGroupByGroupId( - parameters: Parameters.RemoveMemberFromGroupByGroupId, - callback: Callback, - ): Promise; - /** - * Remove user as a member from a group. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. - */ - async removeMemberFromGroupByGroupId( - parameters: Parameters.RemoveMemberFromGroupByGroupId, - callback?: never, - ): Promise; - async removeMemberFromGroupByGroupId( - parameters: Parameters.RemoveMemberFromGroupByGroupId, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/group/userByGroupId', - method: 'DELETE', - params: { - groupId: parameters.groupId, - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds a user as a member in a group. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. - */ - async addUserToGroup(parameters: Parameters.AddUserToGroup, callback: Callback): Promise; - /** - * Adds a user as a member in a group. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. - */ - async addUserToGroup(parameters: Parameters.AddUserToGroup, callback?: never): Promise; - async addUserToGroup(parameters: Parameters.AddUserToGroup, callback?: Callback): Promise { - const config: RequestConfig = { - url: '/api/group/user', - method: 'POST', - params: { - name: parameters.name, - }, - data: { - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Remove user as a member from a group. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. - */ - async removeMemberFromGroup( - parameters: Parameters.RemoveMemberFromGroup, - callback: Callback, - ): Promise; - /** - * Remove user as a member from a group. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. - */ - async removeMemberFromGroup(parameters: Parameters.RemoveMemberFromGroup, callback?: never): Promise; - async removeMemberFromGroup( - parameters: Parameters.RemoveMemberFromGroup, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/group/user', - method: 'DELETE', - params: { - name: parameters.name, - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/index.ts b/packages/legacy/src/api/index.ts deleted file mode 100644 index e69d2387..00000000 --- a/packages/legacy/src/api/index.ts +++ /dev/null @@ -1,63 +0,0 @@ -export * from './analytics.js'; - -export * from './audit.js'; - -export * from './content.js'; - -export * from './contentAttachments.js'; - -export * from './contentBody.js'; - -export * from './contentChildrenAndDescendants.js'; - -export * from './contentComments.js'; - -export * from './contentLabels.js'; - -export * from './contentMacroBody.js'; - -export * from './contentPermissions.js'; - -export * from './contentProperties.js'; - -export * from './contentRestrictions.js'; - -export * from './contentStates.js'; - -export * from './contentVersions.js'; - -export * from './contentWatches.js'; - -export * from './dynamicModules.js'; - -export * from './experimental.js'; - -export * from './group.js'; - -export * from './inlineTasks.js'; - -export * from './labelInfo.js'; - -export * from './longRunningTask.js'; - -export * from './relation.js'; - -export * from './search.js'; - -export * from './settings.js'; - -export * from './space.js'; - -export * from './spacePermissions.js'; - -export * from './spaceProperties.js'; - -export * from './spaceSettings.js'; - -export * from './template.js'; - -export * from './themes.js'; - -export * from './users.js'; - -export * from './userProperties.js'; diff --git a/packages/legacy/src/api/inlineTasks.ts b/packages/legacy/src/api/inlineTasks.ts deleted file mode 100644 index 30788984..00000000 --- a/packages/legacy/src/api/inlineTasks.ts +++ /dev/null @@ -1,119 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Callback } from '../callback.js'; -import type { Client } from '../clients/index.js'; -import type { RequestConfig } from '../requestConfig.js'; - -/** @deprecated Will be removed in next major version. */ -export class InlineTasks { - constructor(private client: Client) {} - - /** - * Returns inline tasks based on the search query. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). Only tasks in contents that the user has permission to view are returned. - * - * @deprecated Will be removed in next major version. - */ - async searchTasks( - parameters: Parameters.SearchTasks | undefined, - callback: Callback, - ): Promise; - /** - * Returns inline tasks based on the search query. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). Only tasks in contents that the user has permission to view are returned. - * - * @deprecated Will be removed in next major version. - */ - async searchTasks(parameters?: Parameters.SearchTasks, callback?: never): Promise; - async searchTasks( - parameters?: Parameters.SearchTasks, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/inlinetasks/search', - method: 'GET', - params: { - start: parameters?.start, - limit: parameters?.limit, - spaceKey: parameters?.spaceKey, - pageId: parameters?.pageId, - assignee: parameters?.assignee, - creator: parameters?.creator, - completedUser: parameters?.completedUser, - duedateFrom: parameters?.duedateFrom, - duedateTo: parameters?.duedateTo, - createdateFrom: parameters?.createdateFrom, - createdateTo: parameters?.createdateTo, - completedateFrom: parameters?.completedateFrom, - completedateTo: parameters?.completedateTo, - status: parameters?.status, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns inline task based on the global ID. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content associated - * with the task. - * - * @deprecated Will be removed in next major version. - */ - async getTaskById(parameters: Parameters.GetTaskById, callback: Callback): Promise; - /** - * Returns inline task based on the global ID. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content associated - * with the task. - * - * @deprecated Will be removed in next major version. - */ - async getTaskById(parameters: Parameters.GetTaskById, callback?: never): Promise; - async getTaskById(parameters: Parameters.GetTaskById, callback?: Callback): Promise { - const config: RequestConfig = { - url: `/api/inlinetasks/${parameters.inlineTaskId}`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Updates an inline tasks status given its global ID - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content associated - * with the task. - * - * @deprecated Will be removed in next major version. - */ - async updateTaskById(parameters: Parameters.UpdateTaskById, callback: Callback): Promise; - /** - * Updates an inline tasks status given its global ID - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content associated - * with the task. - * - * @deprecated Will be removed in next major version. - */ - async updateTaskById(parameters: Parameters.UpdateTaskById, callback?: never): Promise; - async updateTaskById( - parameters: Parameters.UpdateTaskById, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/inlinetasks/${parameters.inlineTaskId}`, - method: 'PUT', - data: { - status: parameters.status, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/labelInfo.ts b/packages/legacy/src/api/labelInfo.ts deleted file mode 100644 index f0b8034e..00000000 --- a/packages/legacy/src/api/labelInfo.ts +++ /dev/null @@ -1,47 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class LabelInfo { - constructor(private client: Client) {} - - /** - * Returns label information and a list of contents associated with the label. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). Only contents that the user is permitted to view is returned. - */ - async getAllLabelContent( - parameters: Parameters.GetAllLabelContent, - callback: Callback, - ): Promise; - /** - * Returns label information and a list of contents associated with the label. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). Only contents that the user is permitted to view is returned. - */ - async getAllLabelContent( - parameters: Parameters.GetAllLabelContent, - callback?: never, - ): Promise; - async getAllLabelContent( - parameters: Parameters.GetAllLabelContent, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/label', - method: 'GET', - params: { - name: parameters.name, - type: parameters.type, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/longRunningTask.ts b/packages/legacy/src/api/longRunningTask.ts deleted file mode 100644 index 040e1316..00000000 --- a/packages/legacy/src/api/longRunningTask.ts +++ /dev/null @@ -1,76 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class LongRunningTask { - constructor(private client: Client) {} - - /** - * Returns information about all active long-running tasks (e.g. space export), such as how long each task has been - * running and the percentage of each task that has completed. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getTasks( - parameters: Parameters.GetTasks | undefined, - callback: Callback, - ): Promise; - /** - * Returns information about all active long-running tasks (e.g. space export), such as how long each task has been - * running and the percentage of each task that has completed. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getTasks(parameters?: Parameters.GetTasks, callback?: never): Promise; - async getTasks( - parameters?: Parameters.GetTasks, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/longtask', - method: 'GET', - params: { - key: parameters?.key, - start: parameters?.start, - limit: parameters?.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns information about an active long-running task (e.g. space export), such as how long it has been running and - * the percentage of the task that has completed. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getTask( - parameters: Parameters.GetTask, - callback: Callback, - ): Promise; - /** - * Returns information about an active long-running task (e.g. space export), such as how long it has been running and - * the percentage of the task that has completed. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getTask(parameters: Parameters.GetTask, callback?: never): Promise; - async getTask( - parameters: Parameters.GetTask, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/longtask/${parameters.id}`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/models/accountId.ts b/packages/legacy/src/api/models/accountId.ts deleted file mode 100644 index 4f99f9f3..00000000 --- a/packages/legacy/src/api/models/accountId.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface AccountId { - accountId: string; -} diff --git a/packages/legacy/src/api/models/accountIdEmailRecord.ts b/packages/legacy/src/api/models/accountIdEmailRecord.ts deleted file mode 100644 index b86dfeb7..00000000 --- a/packages/legacy/src/api/models/accountIdEmailRecord.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface AccountIdEmailRecord { - accountId: string; - email: string; -} diff --git a/packages/legacy/src/api/models/accountIdEmailRecordArray.ts b/packages/legacy/src/api/models/accountIdEmailRecordArray.ts deleted file mode 100644 index 4ba352be..00000000 --- a/packages/legacy/src/api/models/accountIdEmailRecordArray.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { AccountIdEmailRecord } from './accountIdEmailRecord.js'; - -export type AccountIdEmailRecordArray = AccountIdEmailRecord[]; diff --git a/packages/legacy/src/api/models/addContentRestriction.ts b/packages/legacy/src/api/models/addContentRestriction.ts deleted file mode 100644 index 297f78e7..00000000 --- a/packages/legacy/src/api/models/addContentRestriction.ts +++ /dev/null @@ -1,45 +0,0 @@ -export interface AddContentRestriction { - /** The restriction operation applied to content. */ - operation: string; - /** - * The users/groups that the restrictions will be applied to. At least one of `user` or `group` must be specified for - * this object. - */ - restrictions: { - /** - * The users that the restrictions will be applied to. This array must have at least one item, otherwise it should - * be omitted. - */ - user?: { - /** Set to 'known'. */ - type: string; - /** - * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. - * See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for - * details. - */ - username?: string; - /** - * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. - * See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for - * details. - */ - userKey?: string; - /** - * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, - * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; - }[]; - /** - * The groups that the restrictions will be applied to. This array must have at least one item, otherwise it should - * be omitted. - */ - group?: { - /** Set to 'group'. */ - type: string; - /** The name of the group. */ - name: string; - }[]; - }; -} diff --git a/packages/legacy/src/api/models/addContentRestrictionUpdateArray.ts b/packages/legacy/src/api/models/addContentRestrictionUpdateArray.ts deleted file mode 100644 index 8d6af802..00000000 --- a/packages/legacy/src/api/models/addContentRestrictionUpdateArray.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { AddContentRestriction } from './addContentRestriction.js'; - -export type AddContentRestrictionUpdateArray = AddContentRestriction[]; diff --git a/packages/legacy/src/api/models/affectedObject.ts b/packages/legacy/src/api/models/affectedObject.ts deleted file mode 100644 index 3c4cef10..00000000 --- a/packages/legacy/src/api/models/affectedObject.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface AffectedObject { - name: string; - objectType: string; -} diff --git a/packages/legacy/src/api/models/appDescriptor.ts b/packages/legacy/src/api/models/appDescriptor.ts deleted file mode 100644 index 27307426..00000000 --- a/packages/legacy/src/api/models/appDescriptor.ts +++ /dev/null @@ -1,87 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import type { Lifecycle } from './lifecycle.js'; - -export interface AppDescriptor { - /** Defines the authentication type to use when signing requests between the host application and the connect app. */ - authentication: { - /** The type of authentication to use. */ - type: 'jwt' | 'JWT' | 'none' | 'NONE'; - }; - - /** - * The base url of the remote app, which is used for all communications back to the app instance. - * - * The baseUrl must start with `https://` to ensure that all data is sent securely between our cloud instances and - * your app. - * - * Note: each app must have a unique baseUrl. If you would like to serve multiple apps from the same host, consider - * adding a path prefix into the baseUrl. - */ - baseUrl: string; - - /** A unique key to identify the app. This key must be <= 64 characters. */ - key: string; - - /** - * The API version is an OPTIONAL integer. If omitted we will infer an API version of 1. - * - * The intention behind the API version is to allow vendors the ability to beta test a major revision to their Connect - * app as a private version, and have a seamless transition for those beta customers (and existing customers) once the - * major revision is launched. - * - * Vendors can accomplish this by listing a new private version of their app, with a new descriptor hosted at a new - * URL. - * - * They use the Atlassian Marketplace's access token facilities to share this version with customers (or for internal - * use). When this version is ready to be taken live, it can be transitioned from private to public, and all customers - * will be seamlessly updated. - * - * It's important to note that this approach allows vendors to create new versions manually, despite the fact that in - * the common case, the versions are automatically created. This has a few benefits-- for example, it gives vendors - * the ability to change their descriptor URL if they need to (the descriptor URL will be immutable for existing - * versions). - */ - apiVersion?: number; - - /** - * A human readable description of what the app does. The description will be visible in the **Manage Apps** section - * of the administration console. Provide meaningful and identifying information for the instance administrator. - */ - description?: string; - - /** - * Whether or not to enable licensing options in the UPM/Marketplace for this app. - * - * @default false - */ - enableLicensing?: boolean; - - /** Allows the app to register for app lifecycle notifications. */ - lifecycle?: Lifecycle; - - /** A set of links that the app wishes to publish. */ - links?: Record; - - /** The list of modules this app provides. */ - modules?: Record; - - /** - * The human-readable name of the app. The app's name is visible to customers and must therefore be consistent with - * the name used to distribute the app such as any listing in the [Atlassian - * Marketplace](https://marketplace.atlassian.com/). Immutable records are created during the first installation of an - * app, one of which includes the name of the app. It is therefore important that the name of the app is correct as it - * can not be changed. - */ - name?: string; - - /** Set of [scopes](https://developer.atlassian.com/cloud/jira/platform/scopes/) requested by this app. */ - scopes?: string[]; - - /** The vendor who is offering the app. */ - vendor?: { - /** The name of the app vendor. Supply your name or the name of the company you work for. */ - name: string; - /** The URL for the vendor's website. */ - url: string; - }; -} diff --git a/packages/legacy/src/api/models/asyncContentBody.ts b/packages/legacy/src/api/models/asyncContentBody.ts deleted file mode 100644 index f2046c0e..00000000 --- a/packages/legacy/src/api/models/asyncContentBody.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { EmbeddedContent } from './embeddedContent.js'; -import type { GenericLinks } from './genericLinks.js'; -import type { WebResourceDependencies } from './webResourceDependencies.js'; - -export interface AsyncContentBody { - value?: string; - representation?: string; - renderTaskId?: string; - error?: string; - /** - * Rerunning is reserved for when the job is working, but there is a previous run's value in the cache. You may choose - * to continue polling, or use the cached value. - */ - status?: string; - embeddedContent?: EmbeddedContent[]; - webresource?: WebResourceDependencies; - mediaToken?: { - collectionIds?: string[]; - contentId?: string; - expiryDateTime?: string; - fileIds?: string[]; - token?: string; - }; - Expandable?: { - content?: string; - embeddedContent?: string; - webresource?: string; - mediaToken?: string; - }; - Links?: GenericLinks; -} diff --git a/packages/legacy/src/api/models/asyncId.ts b/packages/legacy/src/api/models/asyncId.ts deleted file mode 100644 index 60614e4e..00000000 --- a/packages/legacy/src/api/models/asyncId.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface AsyncId { - asyncId: string; -} diff --git a/packages/legacy/src/api/models/attachment.ts b/packages/legacy/src/api/models/attachment.ts deleted file mode 100644 index 6354f4fa..00000000 --- a/packages/legacy/src/api/models/attachment.ts +++ /dev/null @@ -1,33 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import type { AttachmentMetadata } from './attachmentMetadata.js'; -import type { GenericLinks } from './genericLinks.js'; - -export interface Attachment { - id: string; - type: 'attachment' | string; - status: 'current' | string; - title: string; - macroRenderedOutput: any; - metadata: AttachmentMetadata; - extensions: { - mediaType: string; - fileSize: number; - comment: string; - mediaTypeDescription: string; - fileId: string; - collectionName?: string; - }; - _expandable: { - childTypes: string; - operations: string; - schedulePublishDate: string; - children: string; - restrictions: string; - history: string; - ancestors: string; - body: string; - descendants: string; - space: string; - }; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/attachmentContainer.ts b/packages/legacy/src/api/models/attachmentContainer.ts deleted file mode 100644 index 1e91e6d6..00000000 --- a/packages/legacy/src/api/models/attachmentContainer.ts +++ /dev/null @@ -1,29 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import type { GenericLinks } from './genericLinks.js'; - -export interface AttachmentContainer { - id: string; - type: 'page' | 'string'; - status: 'current' | string; - title: string; - macroRenderedOutput: any; - extensions: { - position: number; - }; - _expandable: { - container: string; - metadata: string; - restrictions: string; - history: string; - body: string; - version: string; - descendants: string; - space: string; - childTypes: string; - operations: string; - schedulePublishDate: string; - children: string; - ancestors: string; - }; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/attachmentMetadata.ts b/packages/legacy/src/api/models/attachmentMetadata.ts deleted file mode 100644 index f0cc2bc7..00000000 --- a/packages/legacy/src/api/models/attachmentMetadata.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; - -export interface AttachmentMetadata { - comment: string; - mediaType: string; - labels: { - results: string[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; - }; - _expandable: { - currentuser: string; - comments: string; - simple: string; - properties: string; - frontend: string; - likes: string; - }; -} diff --git a/packages/legacy/src/api/models/auditRecord.ts b/packages/legacy/src/api/models/auditRecord.ts deleted file mode 100644 index 0314feda..00000000 --- a/packages/legacy/src/api/models/auditRecord.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { AffectedObject } from './affectedObject.js'; -import type { ChangedValue } from './changedValue.js'; - -export interface AuditRecord { - author: { - type: string; - displayName: string; - operations: {}; - }; - remoteAddress: string; - /** The creation date-time of the audit record, as a timestamp. */ - creationDate: number; - summary: string; - description: string; - category: string; - sysAdmin: boolean; - affectedObject: AffectedObject; - changedValues: ChangedValue[]; - associatedObjects: AffectedObject[]; -} diff --git a/packages/legacy/src/api/models/auditRecordArray.ts b/packages/legacy/src/api/models/auditRecordArray.ts deleted file mode 100644 index ab1dbeed..00000000 --- a/packages/legacy/src/api/models/auditRecordArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { AuditRecord } from './auditRecord.js'; -import type { GenericLinks } from './genericLinks.js'; - -export interface AuditRecordArray { - results: AuditRecord[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/availableContentStates.ts b/packages/legacy/src/api/models/availableContentStates.ts deleted file mode 100644 index b713c922..00000000 --- a/packages/legacy/src/api/models/availableContentStates.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { ContentState } from './contentState.js'; - -export interface AvailableContentStates { - /** Space suggested content states that can be used in the space */ - spaceContentStates: ContentState[]; - customContentStates: ContentState[]; -} diff --git a/packages/legacy/src/api/models/blueprintTemplate.ts b/packages/legacy/src/api/models/blueprintTemplate.ts deleted file mode 100644 index e1775211..00000000 --- a/packages/legacy/src/api/models/blueprintTemplate.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { ContentBody } from './contentBody.js'; -import type { GenericLinks } from './genericLinks.js'; -import type { Label } from './label.js'; - -export interface BlueprintTemplate { - templateId: string; - originalTemplate: { - pluginKey: string; - moduleKey: string; - }; - referencingBlueprint: string; - name: string; - description: string; - labels: Label[]; - templateType: string; - body?: ContentBody; - _expandable: { - body?: string; - }; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/blueprintTemplateArray.ts b/packages/legacy/src/api/models/blueprintTemplateArray.ts deleted file mode 100644 index 7dfdd545..00000000 --- a/packages/legacy/src/api/models/blueprintTemplateArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { BlueprintTemplate } from './blueprintTemplate.js'; -import type { GenericLinks } from './genericLinks.js'; - -export interface BlueprintTemplateArray { - results: BlueprintTemplate[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/breadcrumb.ts b/packages/legacy/src/api/models/breadcrumb.ts deleted file mode 100644 index f137086f..00000000 --- a/packages/legacy/src/api/models/breadcrumb.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface Breadcrumb { - label: string; - url: string; - separator: string; -} diff --git a/packages/legacy/src/api/models/bulkUserLookup.ts b/packages/legacy/src/api/models/bulkUserLookup.ts deleted file mode 100644 index a3f84173..00000000 --- a/packages/legacy/src/api/models/bulkUserLookup.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { Icon } from './icon.js'; -import type { OperationCheckResult } from './operationCheckResult.js'; -import type { Space } from './space.js'; - -export interface BulkUserLookup { - type: string; - /** - * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - username?: string; - /** - * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - userKey?: string; - /** - * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, - * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; - /** The account type of the user, may return empty string if unavailable. */ - accountType: string; - /** The email address of the user. Depending on the user's privacy setting, this may return an empty string. */ - email: string; - /** The public name or nickname of the user. Will always contain a value. */ - publicName: string; - profilePicture: Icon; - /** The display name of the user. Depending on the user's privacy setting, this may be the same as publicName. */ - displayName: string; - operations?: OperationCheckResult[]; - personalSpace?: Space; - _expandable: { - operations?: string; - details?: string; - personalSpace?: string; - }; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/bulkUserLookupArray.ts b/packages/legacy/src/api/models/bulkUserLookupArray.ts deleted file mode 100644 index 3cad6147..00000000 --- a/packages/legacy/src/api/models/bulkUserLookupArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { BulkUserLookup } from './bulkUserLookup.js'; -import type { GenericLinks } from './genericLinks.js'; - -export interface BulkUserLookupArray { - results: BulkUserLookup[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/buttonLookAndFeel.ts b/packages/legacy/src/api/models/buttonLookAndFeel.ts deleted file mode 100644 index dc0a9725..00000000 --- a/packages/legacy/src/api/models/buttonLookAndFeel.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ButtonLookAndFeel { - backgroundColor: string; - color: string; -} diff --git a/packages/legacy/src/api/models/changedValue.ts b/packages/legacy/src/api/models/changedValue.ts deleted file mode 100644 index 66581a88..00000000 --- a/packages/legacy/src/api/models/changedValue.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface ChangedValue { - name: string; - oldValue: string; - newValue: string; -} diff --git a/packages/legacy/src/api/models/connectModules.ts b/packages/legacy/src/api/models/connectModules.ts deleted file mode 100644 index 9d9fb7be..00000000 --- a/packages/legacy/src/api/models/connectModules.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { AppDescriptor } from './appDescriptor.js'; - -/** - * A list of app modules in the same format as the `modules` property in the [app - * descriptor](https://developer.atlassian.com/cloud/confluence/app-descriptor/). - */ -export type ConnectModules = AppDescriptor[]; diff --git a/packages/legacy/src/api/models/container.ts b/packages/legacy/src/api/models/container.ts deleted file mode 100644 index 67a886ad..00000000 --- a/packages/legacy/src/api/models/container.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * Container for content. This can be either a space (containing a page or blogpost)* or a page/blog post (containing an - * attachment or comment) - */ -export type Container = Record; diff --git a/packages/legacy/src/api/models/containerLookAndFeel.ts b/packages/legacy/src/api/models/containerLookAndFeel.ts deleted file mode 100644 index b3a437d5..00000000 --- a/packages/legacy/src/api/models/containerLookAndFeel.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface ContainerLookAndFeel { - background: string; - backgroundColor: string; - backgroundImage: string; - backgroundSize: string; - padding: string; - borderRadius: string; -} diff --git a/packages/legacy/src/api/models/containerSummary.ts b/packages/legacy/src/api/models/containerSummary.ts deleted file mode 100644 index 2613b73b..00000000 --- a/packages/legacy/src/api/models/containerSummary.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ContainerSummary { - title: string; - displayUrl: string; -} diff --git a/packages/legacy/src/api/models/content.ts b/packages/legacy/src/api/models/content.ts deleted file mode 100644 index 3d75ef41..00000000 --- a/packages/legacy/src/api/models/content.ts +++ /dev/null @@ -1,66 +0,0 @@ -import type { Container } from './container.js'; -import type { ContentBody } from './contentBody.js'; -import type { ContentChildren } from './contentChildren.js'; -import type { ContentChildType } from './contentChildType.js'; -import type { ContentHistory } from './contentHistory.js'; -import type { ContentRestriction } from './contentRestriction.js'; -import type { GenericLinks } from './genericLinks.js'; -import type { OperationCheckResult } from './operationCheckResult.js'; -import type { Space } from './space.js'; -import type { Version } from './version.js'; - -/** Base object for all content types. */ -export interface Content { - id: string; - type: string; - status: string; - title: string; - space?: Space; - history?: ContentHistory; - version?: Version; - ancestors?: Content[]; - operations?: OperationCheckResult[]; - children?: ContentChildren; - childTypes?: ContentChildType; - descendants?: ContentChildren; - container?: Container; - body?: { - view?: ContentBody; - export_view?: ContentBody; - styled_view?: ContentBody; - storage?: ContentBody; - editor2?: ContentBody; - anonymous_export_view?: ContentBody; - atlas_doc_format?: ContentBody; - _expandable: { - editor?: string; - view?: string; - export_view?: string; - styled_view?: string; - storage?: string; - editor2?: string; - anonymous_export_view?: string; - atlas_doc_format?: string; - }; - }; - restrictions?: { - read?: ContentRestriction; - update?: ContentRestriction; - _links: GenericLinks; - }; - _expandable: { - childTypes?: string; - container?: string; - metadata?: string; - operations?: string; - children?: string; - restrictions?: string; - history?: string; - ancestors?: string; - body?: string; - version?: string; - descendants?: string; - space?: string; - }; - _links?: GenericLinks; -} diff --git a/packages/legacy/src/api/models/contentArray.ts b/packages/legacy/src/api/models/contentArray.ts deleted file mode 100644 index 92530fd6..00000000 --- a/packages/legacy/src/api/models/contentArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { Content } from './content.js'; -import type { GenericLinks } from './genericLinks.js'; - -export interface ContentArray { - results: T[]; - start?: number; - limit?: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/contentBody.ts b/packages/legacy/src/api/models/contentBody.ts deleted file mode 100644 index 52907481..00000000 --- a/packages/legacy/src/api/models/contentBody.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { EmbeddedContent } from './embeddedContent.js'; -import type { WebResourceDependencies } from './webResourceDependencies.js'; - -export interface ContentBody { - value: string; - representation: string; - embeddedContent?: EmbeddedContent[]; - webresource?: WebResourceDependencies; - _expandable: { - content?: string; - }; -} diff --git a/packages/legacy/src/api/models/contentBodyCreate.ts b/packages/legacy/src/api/models/contentBodyCreate.ts deleted file mode 100644 index c89f2667..00000000 --- a/packages/legacy/src/api/models/contentBodyCreate.ts +++ /dev/null @@ -1,9 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** This object is used when creating or updating content. */ -export interface ContentBodyCreate { - /** The body of the content in the relevant format. */ - value: string; - /** The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'. */ - representation: string; - additionalProperties?: any; -} diff --git a/packages/legacy/src/api/models/contentBodyCreateStorage.ts b/packages/legacy/src/api/models/contentBodyCreateStorage.ts deleted file mode 100644 index 84002980..00000000 --- a/packages/legacy/src/api/models/contentBodyCreateStorage.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** This object is used when creating or updating content. */ -export interface ContentBodyCreateStorage { - /** The body of the content in the relevant format. */ - value: string; - /** The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'. */ - representation: string; -} diff --git a/packages/legacy/src/api/models/contentChildType.ts b/packages/legacy/src/api/models/contentChildType.ts deleted file mode 100644 index ee1b152a..00000000 --- a/packages/legacy/src/api/models/contentChildType.ts +++ /dev/null @@ -1,26 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; - -/** - * Shows whether a piece of content has attachments, comments, or child pages.* Note, this doesn't actually contain the - * child objects. - */ -export interface ContentChildType { - attachment?: { - value: boolean; - _links: GenericLinks; - }; - comment?: { - value: boolean; - _links: GenericLinks; - }; - page?: { - value: boolean; - _links: GenericLinks; - }; - _expandable: { - all?: string; - attachment?: string; - comment?: string; - page?: string; - }; -} diff --git a/packages/legacy/src/api/models/contentChildren.ts b/packages/legacy/src/api/models/contentChildren.ts deleted file mode 100644 index cf9928ff..00000000 --- a/packages/legacy/src/api/models/contentChildren.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { ContentArray } from './contentArray.js'; -import type { GenericLinks } from './genericLinks.js'; - -export interface ContentChildren { - attachment?: ContentArray; - comment?: ContentArray; - page?: ContentArray; - _expandable: { - attachment?: string; - comment?: string; - page?: string; - }; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/contentCreate.ts b/packages/legacy/src/api/models/contentCreate.ts deleted file mode 100644 index 5dd7b1a5..00000000 --- a/packages/legacy/src/api/models/contentCreate.ts +++ /dev/null @@ -1,61 +0,0 @@ -import type { ContentBodyCreate } from './contentBodyCreate.js'; - -export interface ContentCreate { - /** The ID of the draft content. Required when publishing a draft. */ - id?: string; - title: string; - /** The type of the new content. Custom content types defined by apps are also supported. */ - type: string | 'page' | 'blogpost' | 'comment'; - /** The space that the content is being created in. */ - space: { - /** The key of the space. */ - key: string; - }; - /** The status of the new content. */ - status?: string; - /** - * The container of the content. Required if type is `comment` or certain types of custom content. If you are trying - * to create a comment that is a child of another comment, specify the parent comment in the ancestors field, not in - * this field. - */ - container?: { - /** The `id` of the container. */ - id: string; - /** The `type` of the container. */ - type: string; - }; - /** - * The parent content of the new content. If you are creating a top-level `page` or `comment`, this can be left blank. - * If you are creating a child page, this is where the parent page id goes. If you are creating a child comment, this - * is where the parent comment id goes. Only one parent content id can be specified. - */ - ancestors?: { - /** The `id` of the parent content. */ - id: string; - }[]; - /** - * The body of the new content. Does not apply to attachments. Only one body format should be specified as the - * property for this object, e.g. `storage`. - * - * Note, `editor2` format is used by Atlassian only. `anonymous_export_view` is the same as 'export_view' format but - * only content viewable by an anonymous user is included. - */ - body?: { - view?: ContentBodyCreate; - export_view?: ContentBodyCreate; - styled_view?: ContentBodyCreate; - storage?: ContentBodyCreate; - editor2?: ContentBodyCreate; - anonymous_export_view?: ContentBodyCreate; - atlas_doc_format?: ContentBodyCreate; - }; - /** - * The new version for the created content. - * - * To get the current version number, use [Get content by ID](#api-content-id-get) and retrieve `version.number`. - */ - version?: { - /** The version comment. */ - message?: string; - }; -} diff --git a/packages/legacy/src/api/models/contentHistory.ts b/packages/legacy/src/api/models/contentHistory.ts deleted file mode 100644 index becc0579..00000000 --- a/packages/legacy/src/api/models/contentHistory.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { User } from './user.js'; -import type { UsersUserKeys } from './usersUserKeys.js'; -import type { Version } from './version.js'; - -export interface ContentHistory { - latest: boolean; - createdBy: User; - createdDate: string; - lastUpdated?: Version; - previousVersion?: Version; - contributors?: { - publishers?: UsersUserKeys; - }; - nextVersion?: Version; - _expandable?: { - lastUpdated?: string; - previousVersion?: string; - contributors?: string; - nextVersion?: string; - }; - _links?: GenericLinks; -} diff --git a/packages/legacy/src/api/models/contentLookAndFeel.ts b/packages/legacy/src/api/models/contentLookAndFeel.ts deleted file mode 100644 index f3cb2b0e..00000000 --- a/packages/legacy/src/api/models/contentLookAndFeel.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { ContainerLookAndFeel } from './containerLookAndFeel.js'; -import type { ScreenLookAndFeel } from './screenLookAndFeel.js'; - -export interface ContentLookAndFeel { - screen: ScreenLookAndFeel; - container: ContainerLookAndFeel; - header: ContainerLookAndFeel; - body: ContainerLookAndFeel; -} diff --git a/packages/legacy/src/api/models/contentPermissionRequest.ts b/packages/legacy/src/api/models/contentPermissionRequest.ts deleted file mode 100644 index bc3b1f59..00000000 --- a/packages/legacy/src/api/models/contentPermissionRequest.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { PermissionSubjectWithGroupId } from './permissionSubjectWithGroupId.js'; - -/** This object represents the request for the content permission check API. */ -export interface ContentPermissionRequest { - subject: PermissionSubjectWithGroupId; - /** The content permission operation to check. */ - operation: string; -} diff --git a/packages/legacy/src/api/models/contentProperty.ts b/packages/legacy/src/api/models/contentProperty.ts deleted file mode 100644 index bfac3ebd..00000000 --- a/packages/legacy/src/api/models/contentProperty.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { Content } from './content.js'; -import type { GenericLinks } from './genericLinks.js'; - -export interface ContentProperty { - id: number; - key: string; - /** The value of the content property. This can be empty or a complex object. */ - value: {}; - version?: { - when: string; - message: string; - number: number; - minorEdit: boolean; - }; - content?: Content; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/contentPropertyArray.ts b/packages/legacy/src/api/models/contentPropertyArray.ts deleted file mode 100644 index d391cd58..00000000 --- a/packages/legacy/src/api/models/contentPropertyArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { ContentProperty } from './contentProperty.js'; -import type { GenericLinks } from './genericLinks.js'; - -export interface ContentPropertyArray { - results: ContentProperty[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/contentPropertyCreate.ts b/packages/legacy/src/api/models/contentPropertyCreate.ts deleted file mode 100644 index 3bba45a5..00000000 --- a/packages/legacy/src/api/models/contentPropertyCreate.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { PropertyValue } from './propertyValue.js'; - -export interface ContentPropertyCreate { - /** The key of the new property. */ - key: string; - value: PropertyValue; -} diff --git a/packages/legacy/src/api/models/contentPropertyCreateNoKey.ts b/packages/legacy/src/api/models/contentPropertyCreateNoKey.ts deleted file mode 100644 index 02e311d5..00000000 --- a/packages/legacy/src/api/models/contentPropertyCreateNoKey.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { PropertyValue } from './propertyValue.js'; - -export interface ContentPropertyCreateNoKey { - value: PropertyValue; -} diff --git a/packages/legacy/src/api/models/contentPropertyUpdate.ts b/packages/legacy/src/api/models/contentPropertyUpdate.ts deleted file mode 100644 index 2fa5a8c9..00000000 --- a/packages/legacy/src/api/models/contentPropertyUpdate.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface ContentPropertyUpdate { - /** The value of the content property. This can be empty or a complex object. */ - value: {}; - /** The version number of the property. */ - version: { - /** - * The new version for the updated content property. Set this to the current version number incremented by one. To - * get the current version number, use 'Get content property' and retrieve `version.number`. - */ - number: number; - /** If `minorEdit` is set to 'true', no notification email or activity stream will be generated for the change. */ - minorEdit?: boolean; - }; -} diff --git a/packages/legacy/src/api/models/contentRestriction.ts b/packages/legacy/src/api/models/contentRestriction.ts deleted file mode 100644 index 4b9744b3..00000000 --- a/packages/legacy/src/api/models/contentRestriction.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { Content } from './content.js'; -import type { GenericLinks } from './genericLinks.js'; -import type { GroupArray } from './groupArray.js'; -import type { UserArray } from './userArray.js'; - -export interface ContentRestriction { - operation: string; - restrictions?: { - user?: UserArray; - group?: GroupArray; - _expandable?: { - user?: string; - group?: string; - }; - }; - content?: Content; - _expandable: { - restrictions?: string; - content?: string; - }; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/contentRestrictionArray.ts b/packages/legacy/src/api/models/contentRestrictionArray.ts deleted file mode 100644 index 90fcf7f1..00000000 --- a/packages/legacy/src/api/models/contentRestrictionArray.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { ContentRestriction } from './contentRestriction.js'; -import type { GenericLinks } from './genericLinks.js'; - -export interface ContentRestrictionArray { - results: ContentRestriction[]; - start: number; - limit: number; - size: number; - /** This property is used by the UI to figure out whether a set of restrictions has changed. */ - restrictionsHash: string; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/contentRestrictionUpdate.ts b/packages/legacy/src/api/models/contentRestrictionUpdate.ts deleted file mode 100644 index 68c36980..00000000 --- a/packages/legacy/src/api/models/contentRestrictionUpdate.ts +++ /dev/null @@ -1,45 +0,0 @@ -export interface ContentRestrictionUpdate { - /** The restriction operation applied to content. */ - operation: string; - /** - * The users/groups that the restrictions will be applied to. At least one of `user` or `group` must be specified for - * this object. - */ - restrictions: { - /** - * The users that the restrictions will be applied to. This array must have at least one item, otherwise it should - * be omitted. - */ - user?: { - /** Set to 'known'. */ - type: string; - /** - * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. - * See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for - * details. - */ - username?: string; - /** - * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. - * See the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for - * details. - */ - userKey?: string; - /** - * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, - * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; - }[]; - /** - * The groups that the restrictions will be applied to. This array must have at least one item, otherwise it should - * be omitted. - */ - group?: { - /** Set to 'group'. */ - type: string; - /** The name of the group. */ - name: string; - }[]; - }; -} diff --git a/packages/legacy/src/api/models/contentRestrictionUpdateArray.ts b/packages/legacy/src/api/models/contentRestrictionUpdateArray.ts deleted file mode 100644 index aaac4189..00000000 --- a/packages/legacy/src/api/models/contentRestrictionUpdateArray.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { ContentRestrictionUpdate } from './contentRestrictionUpdate.js'; - -export type ContentRestrictionUpdateArray = ContentRestrictionUpdate[]; diff --git a/packages/legacy/src/api/models/contentState.ts b/packages/legacy/src/api/models/contentState.ts deleted file mode 100644 index 5b357059..00000000 --- a/packages/legacy/src/api/models/contentState.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface ContentState { - /** Identifier of content state. If 0, 1, or 2, this is a default space state */ - id: number; - /** Name of content state. */ - name: string; - /** Hex string representing color of state */ - color: string; -} diff --git a/packages/legacy/src/api/models/contentStateResponse.ts b/packages/legacy/src/api/models/contentStateResponse.ts deleted file mode 100644 index fe596db0..00000000 --- a/packages/legacy/src/api/models/contentStateResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { ContentState } from './contentState.js'; - -export interface ContentStateResponse { - /** Null or content state */ - contentState?: ContentState; - /** Timestamp of last publish event where content state changed */ - lastUpdated?: string; -} diff --git a/packages/legacy/src/api/models/contentStateSettings.ts b/packages/legacy/src/api/models/contentStateSettings.ts deleted file mode 100644 index 4a3190bd..00000000 --- a/packages/legacy/src/api/models/contentStateSettings.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { ContentState } from './contentState.js'; - -export interface ContentStateSettings { - /** Whether users can place content states on any pages and blog posts in the space */ - contentStatesAllowed: boolean; - /** Whether users can create custom states on the fly on pages and blog posts */ - customContentStatesAllowed: boolean; - /** Whether space content states are allowed */ - spaceContentStatesAllowed: boolean; - /** Space content states that users in the space can choose from */ - spaceContentStates?: ContentState[]; -} diff --git a/packages/legacy/src/api/models/contentTemplate.ts b/packages/legacy/src/api/models/contentTemplate.ts deleted file mode 100644 index 682f03f4..00000000 --- a/packages/legacy/src/api/models/contentTemplate.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { ContentBody } from './contentBody.js'; -import type { GenericLinks } from './genericLinks.js'; -import type { Label } from './label.js'; - -export interface ContentTemplate { - templateId: string; - name: string; - description: string; - labels: Label[]; - templateType: string; - body?: ContentBody; - _expandable: { - body?: string; - }; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/contentTemplateArray.ts b/packages/legacy/src/api/models/contentTemplateArray.ts deleted file mode 100644 index fa1cbe92..00000000 --- a/packages/legacy/src/api/models/contentTemplateArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { ContentTemplate } from './contentTemplate.js'; -import type { GenericLinks } from './genericLinks.js'; - -export interface ContentTemplateArray { - results: ContentTemplate[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/contentTemplateBodyCreate.ts b/packages/legacy/src/api/models/contentTemplateBodyCreate.ts deleted file mode 100644 index 83158f31..00000000 --- a/packages/legacy/src/api/models/contentTemplateBodyCreate.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { ContentBodyCreate } from './contentBodyCreate.js'; - -/** This object is used when creating or updating content. */ -export interface ContentTemplateBodyCreate { - storage?: ContentBodyCreate; -} diff --git a/packages/legacy/src/api/models/contentTemplateCreate.ts b/packages/legacy/src/api/models/contentTemplateCreate.ts deleted file mode 100644 index 26b0bc7c..00000000 --- a/packages/legacy/src/api/models/contentTemplateCreate.ts +++ /dev/null @@ -1,22 +0,0 @@ -import type { ContentTemplateBodyCreate } from './contentTemplateBodyCreate.js'; -import type { Label } from './label.js'; - -/** This object is used to create content templates. */ -export interface ContentTemplateCreate { - /** The name of the new template. */ - name: string; - /** The type of the new template. Set to `page`. */ - templateType: string; - body: ContentTemplateBodyCreate; - /** A description of the new template. */ - description?: string; - /** Labels for the new template. */ - labels?: Label[]; - /** - * The key for the space of the new template. Only applies to space templates. If the spaceKey is not specified, the - * template will be created as a global template. - */ - space?: { - key: string; - }; -} diff --git a/packages/legacy/src/api/models/contentTemplateUpdate.ts b/packages/legacy/src/api/models/contentTemplateUpdate.ts deleted file mode 100644 index e39752a6..00000000 --- a/packages/legacy/src/api/models/contentTemplateUpdate.ts +++ /dev/null @@ -1,24 +0,0 @@ -import type { ContentBodyCreate } from './contentBodyCreate.js'; -import type { Label } from './label.js'; - -/** This object is used to update content templates. */ -export interface ContentTemplateUpdate { - /** The ID of the template being updated. */ - templateId: string; - /** The name of the template. Set to the current `name` if this field is not being updated. */ - name: string; - /** The type of the template. Set to `page`. */ - templateType: string; - body: ContentBodyCreate; - /** A description of the template. */ - description?: string; - /** Labels for the template. */ - labels?: Label[]; - /** - * The key for the space of the template. Required if the template is a space template. Set this to the current - * `space.key`. - */ - space?: { - key: string; - }; -} diff --git a/packages/legacy/src/api/models/contentUpdate.ts b/packages/legacy/src/api/models/contentUpdate.ts deleted file mode 100644 index c3a59f46..00000000 --- a/packages/legacy/src/api/models/contentUpdate.ts +++ /dev/null @@ -1,45 +0,0 @@ -import type { ContentBodyCreate } from './contentBodyCreate.js'; -import type { ContentBodyCreateStorage } from './contentBodyCreateStorage.js'; - -export interface ContentUpdate { - /** - * The new version for the updated content. Set this to the current version number incremented by one, unless you are - * changing the status to 'draft' which must have a version number of 1. - * - * To get the current version number, use [Get content by ID](#api-content-id-get) and retrieve `version.number`. - */ - version: { - /** The version number. */ - number: number; - /** The version comment. */ - message?: string; - }; - /** The updated title of the content. If you are not changing this field, set this to the current `title`. */ - title: string; - /** The type of content. Set this to the current type of the content. */ - type: string; - /** - * The updated status of the content. Note, if you change the status of a page from 'current' to 'draft' and it has an - * existing draft, the existing draft will be deleted in favor of the updated page. - */ - status?: 'current' | 'trashed' | 'historical' | 'draft' | string; - /** The new parent for the content. Only one parent content 'id' can be specified. */ - ancestors?: { - /** The `id` of the parent content. */ - id: string; - }[]; - /** - * The updated body of the content. Does not apply to attachments. If you are not sure how to generate these formats, - * you can create a page in the Confluence application, retrieve the content using [Get content](#api-content-get), - * and expand the desired content format, e.g. `expand=body.storage`. - */ - body?: { - view?: ContentBodyCreate; - export_view?: ContentBodyCreate; - styled_view?: ContentBodyCreate; - storage?: ContentBodyCreateStorage; - editor2?: ContentBodyCreate; - anonymous_export_view?: ContentBodyCreate; - atlas_doc_format?: ContentBodyCreate; - }; -} diff --git a/packages/legacy/src/api/models/copyPageHierarchyRequest.ts b/packages/legacy/src/api/models/copyPageHierarchyRequest.ts deleted file mode 100644 index efdd3198..00000000 --- a/packages/legacy/src/api/models/copyPageHierarchyRequest.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { CopyPageHierarchyTitleOptions } from './copyPageHierarchyTitleOptions.js'; - -export interface CopyPageHierarchyRequest { - /** If set to `true`, attachments are copied to the destination page. */ - copyAttachments?: boolean; - /** If set to `true`, page permissions are copied to the destination page. */ - copyPermissions?: boolean; - /** If set to `true`, content properties are copied to the destination page. */ - copyProperties?: boolean; - /** If set to `true`, labels are copied to the destination page. */ - copyLabels?: boolean; - /** If set to `true`, custom contents are copied to the destination page. */ - copyCustomContents?: boolean; - /** If set to `true`, descendants are copied to the destination page. */ - copyDescendants?: boolean; - destinationPageId: string; - titleOptions?: CopyPageHierarchyTitleOptions; -} diff --git a/packages/legacy/src/api/models/copyPageHierarchyTitleOptions.ts b/packages/legacy/src/api/models/copyPageHierarchyTitleOptions.ts deleted file mode 100644 index 02faaa86..00000000 --- a/packages/legacy/src/api/models/copyPageHierarchyTitleOptions.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** Required for copying page in the same space. */ -export interface CopyPageHierarchyTitleOptions { - prefix?: string; - replace?: string; - search?: string; -} diff --git a/packages/legacy/src/api/models/copyPageRequest.ts b/packages/legacy/src/api/models/copyPageRequest.ts deleted file mode 100644 index 45be5f48..00000000 --- a/packages/legacy/src/api/models/copyPageRequest.ts +++ /dev/null @@ -1,23 +0,0 @@ -import type { ContentBodyCreate } from './contentBodyCreate.js'; -import type { CopyPageRequestDestination } from './copyPageRequestDestination.js'; - -export interface CopyPageRequest { - /** If set to `true`, attachments are copied to the destination page. */ - copyAttachments?: boolean; - /** If set to `true`, page permissions are copied to the destination page. */ - copyPermissions?: boolean; - /** If set to `true`, content properties are copied to the destination page. */ - copyProperties?: boolean; - /** If set to `true`, labels are copied to the destination page. */ - copyLabels?: boolean; - /** If set to `true`, custom contents are copied to the destination page. */ - copyCustomContents?: boolean; - destination: CopyPageRequestDestination; - /** If defined, this will replace the title of the destination page. */ - pageTitle?: string; - /** If defined, this will replace the body of the destination page. */ - body?: { - storage?: ContentBodyCreate; - editor2?: ContentBodyCreate; - }; -} diff --git a/packages/legacy/src/api/models/copyPageRequestDestination.ts b/packages/legacy/src/api/models/copyPageRequestDestination.ts deleted file mode 100644 index f548218b..00000000 --- a/packages/legacy/src/api/models/copyPageRequestDestination.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * Defines where the page will be copied to, and can be one of the following types.* - * - * - `parent_page`: page will be copied as a child of the specified parent page - * - `space`: page will be copied to the specified space as a root page on the space - * - `existing_page`: page will be copied and replace the specified page - */ -export interface CopyPageRequestDestination { - type: string; - /** The space key for `space` type, and content id for `parent_page` and `existing_page` */ - value: string; -} diff --git a/packages/legacy/src/api/models/createdAttachment.ts b/packages/legacy/src/api/models/createdAttachment.ts deleted file mode 100644 index 5aafe1d9..00000000 --- a/packages/legacy/src/api/models/createdAttachment.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { Attachment } from './attachment.js'; -import type { AttachmentContainer } from './attachmentContainer.js'; -import type { Version } from './version.js'; - -export interface CreatedAttachment extends Attachment { - version: Version; - container: AttachmentContainer; -} diff --git a/packages/legacy/src/api/models/embeddable.ts b/packages/legacy/src/api/models/embeddable.ts deleted file mode 100644 index 4ee777de..00000000 --- a/packages/legacy/src/api/models/embeddable.ts +++ /dev/null @@ -1,2 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -export type Embeddable = Record; diff --git a/packages/legacy/src/api/models/embeddedContent.ts b/packages/legacy/src/api/models/embeddedContent.ts deleted file mode 100644 index a6bdf8be..00000000 --- a/packages/legacy/src/api/models/embeddedContent.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { Embeddable } from './embeddable.js'; - -export interface EmbeddedContent { - entityId?: number; - entity?: Embeddable; -} diff --git a/packages/legacy/src/api/models/genericLinks.ts b/packages/legacy/src/api/models/genericLinks.ts deleted file mode 100644 index f1045253..00000000 --- a/packages/legacy/src/api/models/genericLinks.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -export type GenericLinks = Record & { - self: string; - next?: string; - tinyui?: string; - editui?: string; - webui?: string; - base?: string; - context?: string; - download?: string; -}; diff --git a/packages/legacy/src/api/models/getRestrictionsByOperation.ts b/packages/legacy/src/api/models/getRestrictionsByOperation.ts deleted file mode 100644 index 234caa69..00000000 --- a/packages/legacy/src/api/models/getRestrictionsByOperation.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; - -export interface GetRestrictionsByOperation { - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/getViewers.ts b/packages/legacy/src/api/models/getViewers.ts deleted file mode 100644 index 731dadcc..00000000 --- a/packages/legacy/src/api/models/getViewers.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface GetViewers { - /** The content ID. */ - id?: number; - /** The total number of distinct viewers for the content. */ - count?: number; -} diff --git a/packages/legacy/src/api/models/getViews.ts b/packages/legacy/src/api/models/getViews.ts deleted file mode 100644 index 7cdd3f8d..00000000 --- a/packages/legacy/src/api/models/getViews.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface GetViews { - /** The content ID. */ - id?: number; - /** The total number of views for the content. */ - count?: number; -} diff --git a/packages/legacy/src/api/models/group.ts b/packages/legacy/src/api/models/group.ts deleted file mode 100644 index f862ed44..00000000 --- a/packages/legacy/src/api/models/group.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; - -export interface Group { - type: string; - name: string; - id: string; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/groupArray.ts b/packages/legacy/src/api/models/groupArray.ts deleted file mode 100644 index c02d5db5..00000000 --- a/packages/legacy/src/api/models/groupArray.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { Group } from './group.js'; - -export interface GroupArray { - results: Group[]; - start: number; - limit: number; - size: number; -} diff --git a/packages/legacy/src/api/models/groupArrayWithLinks.ts b/packages/legacy/src/api/models/groupArrayWithLinks.ts deleted file mode 100644 index 933e1b63..00000000 --- a/packages/legacy/src/api/models/groupArrayWithLinks.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import type { GroupArray } from './groupArray.js'; - -/** Same as GroupArray but with `_links` property. */ -export interface GroupArrayWithLinks extends GroupArray { - _links: Record; -} diff --git a/packages/legacy/src/api/models/groupCreate.ts b/packages/legacy/src/api/models/groupCreate.ts deleted file mode 100644 index fe2b9462..00000000 --- a/packages/legacy/src/api/models/groupCreate.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GroupCreate { - type: string; - name: string; -} diff --git a/packages/legacy/src/api/models/groupName.ts b/packages/legacy/src/api/models/groupName.ts deleted file mode 100644 index ebeab27b..00000000 --- a/packages/legacy/src/api/models/groupName.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface GroupName { - name: string; -} diff --git a/packages/legacy/src/api/models/headerLookAndFeel.ts b/packages/legacy/src/api/models/headerLookAndFeel.ts deleted file mode 100644 index 2447888a..00000000 --- a/packages/legacy/src/api/models/headerLookAndFeel.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { ButtonLookAndFeel } from './buttonLookAndFeel.js'; -import type { NavigationLookAndFeel } from './navigationLookAndFeel.js'; -import type { SearchFieldLookAndFeel } from './searchFieldLookAndFeel.js'; - -export interface HeaderLookAndFeel { - backgroundColor: string; - button: ButtonLookAndFeel; - primaryNavigation: NavigationLookAndFeel; - secondaryNavigation: NavigationLookAndFeel; - search: SearchFieldLookAndFeel; -} diff --git a/packages/legacy/src/api/models/horizontalHeaderLookAndFeel.ts b/packages/legacy/src/api/models/horizontalHeaderLookAndFeel.ts deleted file mode 100644 index 0723564b..00000000 --- a/packages/legacy/src/api/models/horizontalHeaderLookAndFeel.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { ButtonLookAndFeel } from './buttonLookAndFeel.js'; -import type { NavigationLookAndFeel } from './navigationLookAndFeel.js'; -import type { SearchFieldLookAndFeel } from './searchFieldLookAndFeel.js'; -import type { TopNavigationLookAndFeel } from './topNavigationLookAndFeel.js'; - -export interface HorizontalHeaderLookAndFeel { - backgroundColor: string; - button?: ButtonLookAndFeel; - primaryNavigation: TopNavigationLookAndFeel; - secondaryNavigation?: NavigationLookAndFeel; - search?: SearchFieldLookAndFeel; -} diff --git a/packages/legacy/src/api/models/icon.ts b/packages/legacy/src/api/models/icon.ts deleted file mode 100644 index 5e602646..00000000 --- a/packages/legacy/src/api/models/icon.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** - * This object represents an icon. If used as a profilePicture, this may be returned as null, depending on the user's - * privacy setting. - */ -export interface Icon { - path: string; - width: number; - height: number; - isDefault: boolean; -} diff --git a/packages/legacy/src/api/models/index.ts b/packages/legacy/src/api/models/index.ts deleted file mode 100644 index bc988b4d..00000000 --- a/packages/legacy/src/api/models/index.ts +++ /dev/null @@ -1,321 +0,0 @@ -export * from './accountId.js'; - -export * from './accountIdEmailRecord.js'; - -export * from './accountIdEmailRecordArray.js'; - -export * from './addContentRestriction.js'; - -export * from './addContentRestrictionUpdateArray.js'; - -export * from './affectedObject.js'; - -export * from './appDescriptor.js'; - -export * from './asyncContentBody.js'; - -export * from './asyncId.js'; - -export * from './attachment.js'; - -export * from './attachmentContainer.js'; - -export * from './attachmentMetadata.js'; - -export * from './auditRecord.js'; - -export * from './auditRecordArray.js'; - -export * from './auditRecordCreate.js'; - -export * from './availableContentStates.js'; - -export * from './blueprintTemplate.js'; - -export * from './blueprintTemplateArray.js'; - -export * from './breadcrumb.js'; - -export * from './bulkUserLookup.js'; - -export * from './bulkUserLookupArray.js'; - -export * from './buttonLookAndFeel.js'; - -export * from './changedValue.js'; - -export * from './connectModules.js'; - -export * from './container.js'; - -export * from './containerLookAndFeel.js'; - -export * from './containerSummary.js'; - -export * from './content.js'; - -export * from './contentArray.js'; - -export * from './contentBlueprintDraft.js'; - -export * from './contentBody.js'; - -export * from './contentBodyCreate.js'; - -export * from './contentBodyCreateStorage.js'; - -export * from './contentChildren.js'; - -export * from './contentChildType.js'; - -export * from './contentCreate.js'; - -export * from './contentHistory.js'; - -export * from './contentLookAndFeel.js'; - -export * from './contentPermissionRequest.js'; - -export * from './contentProperty.js'; - -export * from './contentPropertyArray.js'; - -export * from './contentPropertyCreate.js'; - -export * from './contentPropertyCreateNoKey.js'; - -export * from './contentPropertyUpdate.js'; - -export * from './contentRestriction.js'; - -export * from './contentRestrictionArray.js'; - -export * from './contentRestrictionUpdate.js'; - -export * from './contentRestrictionUpdateArray.js'; - -export * from './contentState.js'; - -export * from './contentStateResponse.js'; - -export * from './contentStateRestInput.js'; - -export * from './contentStateSettings.js'; - -export * from './contentTemplate.js'; - -export * from './contentTemplateArray.js'; - -export * from './contentTemplateBodyCreate.js'; - -export * from './contentTemplateCreate.js'; - -export * from './contentTemplateUpdate.js'; - -export * from './contentUpdate.js'; - -export * from './copyPageHierarchyRequest.js'; - -export * from './copyPageHierarchyTitleOptions.js'; - -export * from './copyPageRequest.js'; - -export * from './copyPageRequestDestination.js'; - -export * from './createdAttachment.js'; - -export * from './embeddable.js'; - -export * from './embeddedContent.js'; - -export * from './genericLinks.js'; - -export * from './getRestrictionsByOperation.js'; - -export * from './getViewers.js'; - -export * from './getViews.js'; - -export * from './group.js'; - -export * from './groupArray.js'; - -export * from './groupArrayWithLinks.js'; - -export * from './groupCreate.js'; - -export * from './groupName.js'; - -export * from './headerLookAndFeel.js'; - -export * from './horizontalHeaderLookAndFeel.js'; - -export * from './icon.js'; - -export * from './label.js'; - -export * from './labelArray.js'; - -export * from './labelCreate.js'; - -export * from './labelCreateArray.js'; - -export * from './labelDetails.js'; - -export * from './labeledContent.js'; - -export * from './labeledContentPageResponse.js'; - -export * from './labeledContentType.js'; - -export * from './lifecycle.js'; - -export * from './longTask.js'; - -export * from './longTaskStatus.js'; - -export * from './longTaskStatusArray.js'; - -export * from './longTaskStatusWithLinks.js'; - -export * from './lookAndFeel.js'; - -export * from './lookAndFeelSelection.js'; - -export * from './lookAndFeelSettings.js'; - -export * from './macroInstance.js'; - -export * from './menusLookAndFeel.js'; - -export * from './message.js'; - -export * from './migratedUser.js'; - -export * from './migratedUserArray.js'; - -export * from './movePage.js'; - -export * from './navigationLookAndFeel.js'; - -export * from './operationCheckResult.js'; - -export * from './permissionCheckResponse.js'; - -export * from './permissionSubject.js'; - -export * from './permissionSubjectWithGroupId.js'; - -export * from './propertyValue.js'; - -export * from './relation.js'; - -export * from './relationArray.js'; - -export * from './relationData.js'; - -export * from './retentionPeriod.js'; - -export * from './screenLookAndFeel.js'; - -export * from './searchFieldLookAndFeel.js'; - -export * from './searchPageResponseSearchResult.js'; - -export * from './searchResult.js'; - -export * from './space.js'; - -export * from './spaceArray.js'; - -export * from './spaceCreate.js'; - -export * from './spaceDescription.js'; - -export * from './spaceDescriptionCreate.js'; - -export * from './spacePermission.js'; - -export * from './spacePermissionCreate.js'; - -export * from './spacePermissionCustomContent.js'; - -export * from './spacePermissionRequest.js'; - -export * from './spacePermissionV2.js'; - -export * from './spacePrivateCreate.js'; - -export * from './spaceProperty.js'; - -export * from './spacePropertyArray.js'; - -export * from './spacePropertyCreate.js'; - -export * from './spacePropertyCreateNoKey.js'; - -export * from './spacePropertyUpdate.js'; - -export * from './spaceSettings.js'; - -export * from './spaceSettingsUpdate.js'; - -export * from './spaceUpdate.js'; - -export * from './spaceWatch.js'; - -export * from './spaceWatchArray.js'; - -export * from './spaceWatchUser.js'; - -export * from './superBatchWebResources.js'; - -export * from './systemInfoEntity.js'; - -export * from './task.js'; - -export * from './taskPageResponse.js'; - -export * from './taskStatusUpdate.js'; - -export * from './theme.js'; - -export * from './themeArray.js'; - -export * from './themeNoLinks.js'; - -export * from './themeUpdate.js'; - -export * from './topNavigationLookAndFeel.js'; - -export * from './user.js'; - -export * from './userAnonymous.js'; - -export * from './userArray.js'; - -export * from './userProperty.js'; - -export * from './userPropertyCreate.js'; - -export * from './userPropertyKeyArray.js'; - -export * from './userPropertyUpdate.js'; - -export * from './usersUserKeys.js'; - -export * from './userWatch.js'; - -export * from './version.js'; - -export * from './versionArray.js'; - -export * from './versionRestore.js'; - -export * from './watch.js'; - -export * from './watchArray.js'; - -export * from './watchUser.js'; - -export * from './webResourceDependencies.js'; diff --git a/packages/legacy/src/api/models/label.ts b/packages/legacy/src/api/models/label.ts deleted file mode 100644 index df6ec35e..00000000 --- a/packages/legacy/src/api/models/label.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface Label { - prefix: string; - name: string; - id: string; - label: string; -} diff --git a/packages/legacy/src/api/models/labelArray.ts b/packages/legacy/src/api/models/labelArray.ts deleted file mode 100644 index 743fbadc..00000000 --- a/packages/legacy/src/api/models/labelArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { Label } from './label.js'; - -export interface LabelArray { - results: Label[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/labelCreate.ts b/packages/legacy/src/api/models/labelCreate.ts deleted file mode 100644 index 5cff70de..00000000 --- a/packages/legacy/src/api/models/labelCreate.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface LabelCreate { - /** The prefix for the label. */ - prefix: 'global' | 'my' | 'team' | string; - /** The name of the label, which will be shown in the UI. */ - name: string; -} diff --git a/packages/legacy/src/api/models/labelCreateArray.ts b/packages/legacy/src/api/models/labelCreateArray.ts deleted file mode 100644 index d477bedb..00000000 --- a/packages/legacy/src/api/models/labelCreateArray.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { LabelCreate } from './labelCreate.js'; - -export type LabelCreateArray = LabelCreate[]; diff --git a/packages/legacy/src/api/models/labelDetails.ts b/packages/legacy/src/api/models/labelDetails.ts deleted file mode 100644 index a013bd87..00000000 --- a/packages/legacy/src/api/models/labelDetails.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { Label } from './label.js'; -import type { LabeledContentPageResponse } from './labeledContentPageResponse.js'; - -export interface LabelDetails { - label: Label; - associatedContents?: LabeledContentPageResponse; -} diff --git a/packages/legacy/src/api/models/labeledContent.ts b/packages/legacy/src/api/models/labeledContent.ts deleted file mode 100644 index ab623c6e..00000000 --- a/packages/legacy/src/api/models/labeledContent.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { LabeledContentType } from './labeledContentType.js'; - -export interface LabeledContent { - contentType: LabeledContentType; - contentId: number; - /** Title of the content. */ - title: string; -} diff --git a/packages/legacy/src/api/models/labeledContentPageResponse.ts b/packages/legacy/src/api/models/labeledContentPageResponse.ts deleted file mode 100644 index 94a3a81d..00000000 --- a/packages/legacy/src/api/models/labeledContentPageResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { LabeledContent } from './labeledContent.js'; - -export interface LabeledContentPageResponse { - results: LabeledContent[]; - start?: number; - limit?: number; - size: number; -} diff --git a/packages/legacy/src/api/models/labeledContentType.ts b/packages/legacy/src/api/models/labeledContentType.ts deleted file mode 100644 index fb633197..00000000 --- a/packages/legacy/src/api/models/labeledContentType.ts +++ /dev/null @@ -1,6 +0,0 @@ -export enum LabeledContentType { - Page = 'page', - Blogpost = 'blogpost', - Attachment = 'attachment', - PageTemplate = 'page_template', -} diff --git a/packages/legacy/src/api/models/lifecycle.ts b/packages/legacy/src/api/models/lifecycle.ts deleted file mode 100644 index 7eb3df11..00000000 --- a/packages/legacy/src/api/models/lifecycle.ts +++ /dev/null @@ -1,66 +0,0 @@ -/** - * Allows an app to register callbacks for events that occur in the lifecycle of an installation. When a lifecycle event - * is fired, a POST request will be made to the appropriate URL registered for the event. - * - * The installed lifecycle callback is an integral part of the installation process of an app, whereas the remaining - * lifecycle events are essentially webhooks. - * - * Each property in this object is a URL relative to the app's base URL. - */ -export interface Lifecycle { - /** App key that was installed into the Atlassian Product, as it appears in your app's descriptor. */ - key?: string; - - /** - * Identifying key for the Atlassian product tenant that the app was installed into. This will never change for an - * Atlassian product tenant. However, be aware that importing data into a site will result in a new tenant. In this - * case, any app installations into the new tenant (using the same baseUrl as the previous tenant) will result in an - * installation payload containing a different clientKey. Determining the contract between the instance and app in - * this situation is tracked by [AC-1528](https://ecosystem.atlassian.net/browse/AC-1528) in the Connect backlog. - */ - clientKey?: string; - - /** - * The account ID for identifying users in the `sub` claim sent in JWT during calls. This is the user associated with - * the relevant action, and may not be present if there is no logged in user. - */ - accountId?: string; - - /** - * Use this string to sign outgoing JWT tokens and validate incoming JWT tokens. Optional: and may not be present on - * non-JWT app installations, and is only sent on the `installed` event. All instances of your app use the same shared - * secret. - */ - sharedSecret?: string; - - /** URL prefix for this Atlassian product instance. All of its REST endpoints begin with this `baseUrl`. */ - baseUrl: string; - - /** - * If the Atlassian product instance has an associated custom domain, this is the URL through which users will access - * the product. Any links which an app renders server-side should use this as the prefix of the link. This ensures - * links are rendered in the same context as the remainder of the user's site. - * - * This field may not be present, in which case the baseUrl value should be used. API requests from your App should - * always use the baseUrl value and not be based on the URL specified here. - */ - displayUrl?: string; - - /** Identifies the category of Atlassian product, e.g. `jira` or `confluence`. */ - productType?: string; - - /** The host product description - this is customisable by an instance administrator. */ - description?: string; - - /** - * Also known as the SEN, the service entitlement number is the app license ID. This attribute will only be included - * during installation of a paid app. - */ - serviceEntitlementNumber?: string; - - /** - * The OAuth 2.0 client ID for your app. For more information, see [OAuth 2.0 - JWT Bearer token authorization grant - * type](https://developer.atlassian.com/cloud/jira/platform/oauth-2-jwt-bearer-token-authorization-grant-type/) - */ - oauthClientId?: string; -} diff --git a/packages/legacy/src/api/models/longTask.ts b/packages/legacy/src/api/models/longTask.ts deleted file mode 100644 index b3d37c08..00000000 --- a/packages/legacy/src/api/models/longTask.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface LongTask { - /** A unique identifier for the long task */ - id: string; - links: { - /** The URL to retrieve status of long task. */ - status?: string; - }; -} diff --git a/packages/legacy/src/api/models/longTaskStatus.ts b/packages/legacy/src/api/models/longTaskStatus.ts deleted file mode 100644 index 09ef881d..00000000 --- a/packages/legacy/src/api/models/longTaskStatus.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { Message } from './message.js'; - -/** - * Current status of a long running task* - * - * Status keys: - * - * - `ERROR_UNKNOWN` - Generic error - * - `ERROR_LOCK_FAILED` - Could not get the lock on destination space - * - `ERROR_RELINK` - Error when relink pages/attachments - * - `ERROR_COPY_PAGE` - Error while copying 1 page - * - `WARN_RENAME_PAGE` - Warning page is rename during copy - * - `WARN_IGNORE_COPY_PERMISSION` - Warning could not copy permission - * - `WARN_IGNORE_COPY_ATTACHMENT` - Warning could not copy attachment - * - `WARN_IGNORE_DELETE_PAGE` - Warning ignoring delete of a non agreed on page - * - `STATUS_COPIED_PAGES` - Message total pages are copied - * - `STATUS_COPYING_PAGES` - Message copy pages - * - `STATUS_RELINK_PAGES` - Message relink pages/attachments - * - `STATUS_DELETING_PAGES` - Message delete pages - * - `STATUS_DELETED_PAGES` - Message total pages are deleted - * - `STATUS_MOVING_PAGES` - Message move pages - * - `WARN_IGNORE_VIEW_RESTRICTED` - Permission changed - view restricted - * - `WARN_IGNORE_EDIT_RESTRICTED` - Permission changed - edit restricted - * - `INITIALIZING_TASK` - Message when initializing task - * - `UNKNOWN_STATUS` - Message when status is unknown - */ -export interface LongTaskStatus { - id: string; - name: { - key: string; - args: {}[]; - }; - elapsedTime: number; - percentageComplete: number; - successful: boolean; - messages: Message[]; - status?: string; - errors?: Message[]; - additionalDetails?: {}; -} diff --git a/packages/legacy/src/api/models/longTaskStatusArray.ts b/packages/legacy/src/api/models/longTaskStatusArray.ts deleted file mode 100644 index 6983fdb5..00000000 --- a/packages/legacy/src/api/models/longTaskStatusArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { LongTaskStatus } from './longTaskStatus.js'; - -export interface LongTaskStatusArray { - results: LongTaskStatus[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/longTaskStatusWithLinks.ts b/packages/legacy/src/api/models/longTaskStatusWithLinks.ts deleted file mode 100644 index b94a4f7b..00000000 --- a/packages/legacy/src/api/models/longTaskStatusWithLinks.ts +++ /dev/null @@ -1,7 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import type { LongTaskStatus } from './longTaskStatus.js'; - -/** Same as LongTaskStatus but with `_links` property. */ -export interface LongTaskStatusWithLinks extends LongTaskStatus { - _links: Record; -} diff --git a/packages/legacy/src/api/models/lookAndFeel.ts b/packages/legacy/src/api/models/lookAndFeel.ts deleted file mode 100644 index b53ba5aa..00000000 --- a/packages/legacy/src/api/models/lookAndFeel.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { ContentLookAndFeel } from './contentLookAndFeel.js'; -import type { HeaderLookAndFeel } from './headerLookAndFeel.js'; -import type { HorizontalHeaderLookAndFeel } from './horizontalHeaderLookAndFeel.js'; -import type { MenusLookAndFeel } from './menusLookAndFeel.js'; - -export interface LookAndFeel { - headings: { - color: string; - }; - links: { - color: string; - }; - menus: MenusLookAndFeel; - header: HeaderLookAndFeel; - content: ContentLookAndFeel; - bordersAndDividers: { - color: string; - }; - horizontalHeader?: HorizontalHeaderLookAndFeel; - spaceReference?: unknown; -} diff --git a/packages/legacy/src/api/models/lookAndFeelSelection.ts b/packages/legacy/src/api/models/lookAndFeelSelection.ts deleted file mode 100644 index 4af7130c..00000000 --- a/packages/legacy/src/api/models/lookAndFeelSelection.ts +++ /dev/null @@ -1,6 +0,0 @@ -/** Look and feel selection */ -export interface LookAndFeelSelection { - /** The key of the space for which the look and feel settings will be set. */ - spaceKey: string; - lookAndFeelType: string; -} diff --git a/packages/legacy/src/api/models/lookAndFeelSettings.ts b/packages/legacy/src/api/models/lookAndFeelSettings.ts deleted file mode 100644 index 3156072e..00000000 --- a/packages/legacy/src/api/models/lookAndFeelSettings.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { LookAndFeel } from './lookAndFeel.js'; - -export interface LookAndFeelSettings { - selected: string; - global: LookAndFeel; - theme?: LookAndFeel; - custom: LookAndFeel; -} diff --git a/packages/legacy/src/api/models/macroInstance.ts b/packages/legacy/src/api/models/macroInstance.ts deleted file mode 100644 index 2efc30fa..00000000 --- a/packages/legacy/src/api/models/macroInstance.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; - -export interface MacroInstance { - name?: string; - body?: string; - parameters?: {}; - _links?: GenericLinks; -} diff --git a/packages/legacy/src/api/models/menusLookAndFeel.ts b/packages/legacy/src/api/models/menusLookAndFeel.ts deleted file mode 100644 index a0da75bb..00000000 --- a/packages/legacy/src/api/models/menusLookAndFeel.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface MenusLookAndFeel { - hoverOrFocus: { - backgroundColor: string; - }; - color: string; -} diff --git a/packages/legacy/src/api/models/message.ts b/packages/legacy/src/api/models/message.ts deleted file mode 100644 index 92e67eb3..00000000 --- a/packages/legacy/src/api/models/message.ts +++ /dev/null @@ -1,5 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -export interface Message { - translation: string; - args: Record[]; -} diff --git a/packages/legacy/src/api/models/migratedUser.ts b/packages/legacy/src/api/models/migratedUser.ts deleted file mode 100644 index fca42d8f..00000000 --- a/packages/legacy/src/api/models/migratedUser.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface MigratedUser { - username?: string; - key?: string; - accountId?: string; -} diff --git a/packages/legacy/src/api/models/migratedUserArray.ts b/packages/legacy/src/api/models/migratedUserArray.ts deleted file mode 100644 index 3318d2f6..00000000 --- a/packages/legacy/src/api/models/migratedUserArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { MigratedUser } from './migratedUser.js'; - -export interface MigratedUserArray { - results: MigratedUser[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/movePage.ts b/packages/legacy/src/api/models/movePage.ts deleted file mode 100644 index 9a7b5825..00000000 --- a/packages/legacy/src/api/models/movePage.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface MovePage { - pageId?: string; -} diff --git a/packages/legacy/src/api/models/navigationLookAndFeel.ts b/packages/legacy/src/api/models/navigationLookAndFeel.ts deleted file mode 100644 index 14fa2a6b..00000000 --- a/packages/legacy/src/api/models/navigationLookAndFeel.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface NavigationLookAndFeel { - color: string; - hoverOrFocus: { - backgroundColor: string; - color: string; - }; -} diff --git a/packages/legacy/src/api/models/operationCheckResult.ts b/packages/legacy/src/api/models/operationCheckResult.ts deleted file mode 100644 index ef859fd0..00000000 --- a/packages/legacy/src/api/models/operationCheckResult.ts +++ /dev/null @@ -1,7 +0,0 @@ -/** An operation and the target entity that it applies to, e.g. create page. */ -export interface OperationCheckResult { - /** The operation itself. */ - operation: string; - /** The space or content type that the operation applies to. */ - targetType: string; -} diff --git a/packages/legacy/src/api/models/permissionCheckResponse.ts b/packages/legacy/src/api/models/permissionCheckResponse.ts deleted file mode 100644 index 78c1c015..00000000 --- a/packages/legacy/src/api/models/permissionCheckResponse.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { Message } from './message.js'; - -/** - * This object represents the response for the content permission check API. If the user or group does not have* - * permissions, the following errors may be returned: - * - * - Group does not have permission to the space - * - Group does not have permission to the content - * - User is not allowed to use Confluence - * - User does not have permission to the space - * - User does not have permission to the content - * - Anonymous users are not allowed to use Confluence - * - Anonymous user does not have permission to the space - * - Anonymous user does not have permission to the content - */ -export interface PermissionCheckResponse { - hasPermission: boolean; - errors?: Message[]; -} diff --git a/packages/legacy/src/api/models/permissionSubject.ts b/packages/legacy/src/api/models/permissionSubject.ts deleted file mode 100644 index 7f412f63..00000000 --- a/packages/legacy/src/api/models/permissionSubject.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** The user or group that the permission applies to. */ -export interface PermissionSubject { - type: string; - /** - * For `type=user`, identifier should be user's accountId or `anonymous` for anonymous users - * - * For `type=group`, identifier should be name of the group or groupId - */ - identifier: string; -} diff --git a/packages/legacy/src/api/models/permissionSubjectWithGroupId.ts b/packages/legacy/src/api/models/permissionSubjectWithGroupId.ts deleted file mode 100644 index 788ef239..00000000 --- a/packages/legacy/src/api/models/permissionSubjectWithGroupId.ts +++ /dev/null @@ -1,10 +0,0 @@ -/** The user or group that the permission applies to. */ -export interface PermissionSubjectWithGroupId { - type: string; - /** - * For `type=user`, identifier should be user's accountId or `anonymous` for anonymous users - * - * For `type=group`, identifier should be ID of the group - */ - identifier: string; -} diff --git a/packages/legacy/src/api/models/propertyValue.ts b/packages/legacy/src/api/models/propertyValue.ts deleted file mode 100644 index 5bfd6144..00000000 --- a/packages/legacy/src/api/models/propertyValue.ts +++ /dev/null @@ -1,11 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/** - * The value of the property. This can be empty or a complex object.* For example, - * - * "value": { - * "example1": "value", - * "example2": true, - * "example3": 123 - * } - */ -export type PropertyValue = Record; diff --git a/packages/legacy/src/api/models/relation.ts b/packages/legacy/src/api/models/relation.ts deleted file mode 100644 index bb23530c..00000000 --- a/packages/legacy/src/api/models/relation.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { RelationData } from './relationData.js'; - -export interface Relation { - name: string; - relationData?: RelationData; - source?: {}; - target?: {}; - _expandable: { - relationData: string; - source: string; - target: string; - }; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/relationArray.ts b/packages/legacy/src/api/models/relationArray.ts deleted file mode 100644 index e8e24e36..00000000 --- a/packages/legacy/src/api/models/relationArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { Relation } from './relation.js'; - -export interface RelationArray { - results: Relation[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/relationData.ts b/packages/legacy/src/api/models/relationData.ts deleted file mode 100644 index 3e548a8d..00000000 --- a/packages/legacy/src/api/models/relationData.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { User } from './user.js'; - -export interface RelationData { - createdBy?: User; - createdDate?: string; - friendlyCreatedDate?: string; -} diff --git a/packages/legacy/src/api/models/retentionPeriod.ts b/packages/legacy/src/api/models/retentionPeriod.ts deleted file mode 100644 index 342f2e86..00000000 --- a/packages/legacy/src/api/models/retentionPeriod.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface RetentionPeriod { - /** The number of units for the retention period. */ - number: number; - /** The unit of time that the retention period is measured in. */ - units: string; -} diff --git a/packages/legacy/src/api/models/screenLookAndFeel.ts b/packages/legacy/src/api/models/screenLookAndFeel.ts deleted file mode 100644 index 95e84c47..00000000 --- a/packages/legacy/src/api/models/screenLookAndFeel.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface ScreenLookAndFeel { - background: string; - backgroundColor: string; - backgroundImage: string; - backgroundSize: string; - gutterTop: string; - gutterRight: string; - gutterBottom: string; - gutterLeft: string; -} diff --git a/packages/legacy/src/api/models/searchFieldLookAndFeel.ts b/packages/legacy/src/api/models/searchFieldLookAndFeel.ts deleted file mode 100644 index eae1baff..00000000 --- a/packages/legacy/src/api/models/searchFieldLookAndFeel.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface SearchFieldLookAndFeel { - backgroundColor: string; - color: string; -} diff --git a/packages/legacy/src/api/models/searchPageResponseSearchResult.ts b/packages/legacy/src/api/models/searchPageResponseSearchResult.ts deleted file mode 100644 index 432717ae..00000000 --- a/packages/legacy/src/api/models/searchPageResponseSearchResult.ts +++ /dev/null @@ -1,13 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { SearchResult } from './searchResult.js'; - -export interface SearchPageResponseSearchResult { - results: SearchResult[]; - start: number; - limit: number; - size: number; - totalSize: number; - cqlQuery: string; - searchDuration: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/searchResult.ts b/packages/legacy/src/api/models/searchResult.ts deleted file mode 100644 index 1abd9c9a..00000000 --- a/packages/legacy/src/api/models/searchResult.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { Breadcrumb } from './breadcrumb.js'; -import type { ContainerSummary } from './containerSummary.js'; -import type { Content } from './content.js'; - -export interface SearchResult { - content: Content; - title: string; - excerpt: string; - url: string; - resultParentContainer: ContainerSummary; - resultGlobalContainer: ContainerSummary; - breadcrumbs: Breadcrumb[]; - entityType: string; - iconCssClass: string; - lastModified: string; - friendlyLastModified: string; -} diff --git a/packages/legacy/src/api/models/space.ts b/packages/legacy/src/api/models/space.ts deleted file mode 100644 index 2da7c08f..00000000 --- a/packages/legacy/src/api/models/space.ts +++ /dev/null @@ -1,48 +0,0 @@ -import type { Content } from './content.js'; -import type { GenericLinks } from './genericLinks.js'; -import type { Icon } from './icon.js'; -import type { LabelArray } from './labelArray.js'; -import type { LookAndFeel } from './lookAndFeel.js'; -import type { OperationCheckResult } from './operationCheckResult.js'; -import type { SpaceDescription } from './spaceDescription.js'; -import type { SpacePermission } from './spacePermission.js'; -import type { SpaceSettings } from './spaceSettings.js'; -import type { Theme } from './theme.js'; - -export interface Space { - id: number; - key: string; - name: string; - icon?: Icon; - description?: { - plain?: SpaceDescription; - view?: SpaceDescription; - }; - homepage?: Content; - type: string; - metadata?: { - labels: LabelArray; - }; - operations?: OperationCheckResult[]; - permissions?: SpacePermission[]; - status: string; - settings?: SpaceSettings; - theme?: Theme; - lookAndFeel?: LookAndFeel; - history?: { - createdDate: string; - }; - _expandable: { - settings?: string; - metadata?: string; - operations?: string; - lookAndFeel?: string; - permissions?: string; - icon?: string; - description?: string; - theme?: string; - history?: string; - homepage?: string; - }; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/spaceArray.ts b/packages/legacy/src/api/models/spaceArray.ts deleted file mode 100644 index 621a2b6b..00000000 --- a/packages/legacy/src/api/models/spaceArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { Space } from './space.js'; - -export interface SpaceArray { - results: Space[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/spaceDescription.ts b/packages/legacy/src/api/models/spaceDescription.ts deleted file mode 100644 index ddb18a82..00000000 --- a/packages/legacy/src/api/models/spaceDescription.ts +++ /dev/null @@ -1,5 +0,0 @@ -export interface SpaceDescription { - value: string; - representation: string; - embeddedContent: {}[]; -} diff --git a/packages/legacy/src/api/models/spaceDescriptionCreate.ts b/packages/legacy/src/api/models/spaceDescriptionCreate.ts deleted file mode 100644 index 27061076..00000000 --- a/packages/legacy/src/api/models/spaceDescriptionCreate.ts +++ /dev/null @@ -1,12 +0,0 @@ -/** - * The description of the new/updated space. Note, only the 'plain' representation* can be used for the description when - * creating or updating a space. - */ -export interface SpaceDescriptionCreate { - plain: { - /** The space description. */ - value?: string; - /** Set to 'plain'. */ - representation?: string; - }; -} diff --git a/packages/legacy/src/api/models/spacePermission.ts b/packages/legacy/src/api/models/spacePermission.ts deleted file mode 100644 index 473439a6..00000000 --- a/packages/legacy/src/api/models/spacePermission.ts +++ /dev/null @@ -1,38 +0,0 @@ -import type { Group } from './group.js'; -import type { OperationCheckResult } from './operationCheckResult.js'; -import type { User } from './user.js'; - -/** - * This object represents a permission for given space. Permissions consist of* at least one operation object with an - * accompanying subjects object. - * - * The following combinations of `operation` and `targetType` values are valid for the `operation` object: - * - * - 'create': 'page', 'blogpost', 'comment', 'attachment' - * - 'read': 'space' - * - 'delete': 'page', 'blogpost', 'comment', 'attachment' - * - 'export': 'space' - * - 'administer': 'space' - */ -export interface SpacePermission { - /** The users and/or groups that the permission applies to. */ - subjects: { - user?: { - results: User[]; - size: number; - }; - group?: { - results: Group[]; - size: number; - }; - _expandable: { - user?: string; - group?: string; - }; - }; - operation: OperationCheckResult; - /** Grant anonymous users permission to use the operation. */ - anonymousAccess: boolean; - /** Grants access to unlicensed users from JIRA Service Desk when used with the 'read space' operation. */ - unlicensedAccess: boolean; -} diff --git a/packages/legacy/src/api/models/spacePermissionCreate.ts b/packages/legacy/src/api/models/spacePermissionCreate.ts deleted file mode 100644 index 647fde5e..00000000 --- a/packages/legacy/src/api/models/spacePermissionCreate.ts +++ /dev/null @@ -1,34 +0,0 @@ -import type { GroupCreate } from './groupCreate.js'; -import type { OperationCheckResult } from './operationCheckResult.js'; -import type { User } from './user.js'; - -/** - * This object represents a permission for given space. Permissions consist of* at least one operation object with an - * accompanying subjects object. - * - * The following combinations of `operation` and `targetType` values are valid for the `operation` object: - * - * - 'create': 'page', 'blogpost', 'comment', 'attachment' - * - 'read': 'space' - * - 'delete': 'page', 'blogpost', 'comment', 'attachment' - * - 'export': 'space' - * - 'administer': 'space' - */ -export interface SpacePermissionCreate { - /** The users and/or groups that the permission applies to. */ - subjects: { - user?: { - results: User[]; - size: number; - }; - group?: { - results: GroupCreate[]; - size: number; - }; - }; - operation: OperationCheckResult; - /** Grant anonymous users permission to use the operation. */ - anonymousAccess: boolean; - /** Grants access to unlicensed users from JIRA Service Desk when used with the 'read space' operation. */ - unlicensedAccess: boolean; -} diff --git a/packages/legacy/src/api/models/spacePermissionCustomContent.ts b/packages/legacy/src/api/models/spacePermissionCustomContent.ts deleted file mode 100644 index 455caef8..00000000 --- a/packages/legacy/src/api/models/spacePermissionCustomContent.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { PermissionSubject } from './permissionSubject.js'; - -/** - * This object represents a list of space permissions for custom content type for an individual user. Permissions - * consist of* a subjects object and a list with at least one operation object. - */ -export interface SpacePermissionCustomContent { - subject: PermissionSubject; - operations: { - /** The operation type */ - key: string; - /** The custom content type */ - target: string; - /** Grant or restrict access */ - access: boolean; - }[]; -} diff --git a/packages/legacy/src/api/models/spacePermissionRequest.ts b/packages/legacy/src/api/models/spacePermissionRequest.ts deleted file mode 100644 index f64ca9f9..00000000 --- a/packages/legacy/src/api/models/spacePermissionRequest.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { PermissionSubject } from './permissionSubject.js'; - -/** - * This object represents the request for the single space permission. Permissions consist of* at least one operation - * object with an accompanying subjects object. - * - * The following combinations of `operation.key` and `operation.target` values are valid for the `operation` object: - * - * ```bash - * 'create': 'page', 'blogpost', 'comment', 'attachment' - * 'read': 'space' - * 'delete': 'page', 'blogpost', 'comment', 'attachment', 'space' - * 'export': 'space' - * 'administer': 'space' - * 'archive': 'page' - * 'restrict_content': 'space' - * ``` - * - * For example, to enable Delete Own permission, set the `operation` object to the following: - * - * "operation": { - * "key": "delete", - * "target": "space" - * } - * - * To enable Add/Delete Restrictions permissions, set the `operation` object to the following: - * - * "operation": { - * "key": "restrict_content", - * "target": "space" - * } - */ -export interface SpacePermissionRequest { - subject: PermissionSubject; - operation: { - key: string; - /** The space or content type that the operation applies to. */ - target: string; - }; - links?: GenericLinks; -} diff --git a/packages/legacy/src/api/models/spacePermissionV2.ts b/packages/legacy/src/api/models/spacePermissionV2.ts deleted file mode 100644 index 7a507997..00000000 --- a/packages/legacy/src/api/models/spacePermissionV2.ts +++ /dev/null @@ -1,27 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { PermissionSubject } from './permissionSubject.js'; - -/** - * This object represents a single space permission. Permissions consist of* at least one operation object with an - * accompanying subjects object. - * - * The following combinations of `operation.key` and `operation.target` values are valid for the `operation` object: - * - * ```bash - * 'create': 'page', 'blogpost', 'comment', 'attachment' - * 'read': 'space' - * 'delete': 'page', 'blogpost', 'comment', 'attachment' - * 'export': 'space' - * 'administer': 'space' - * ``` - */ -export interface SpacePermissionV2 { - id?: number; - subject: PermissionSubject; - operation: { - key: string; - /** The space or content type that the operation applies to. */ - target: string; - }; - _links?: GenericLinks; -} diff --git a/packages/legacy/src/api/models/spacePrivateCreate.ts b/packages/legacy/src/api/models/spacePrivateCreate.ts deleted file mode 100644 index b6e217d1..00000000 --- a/packages/legacy/src/api/models/spacePrivateCreate.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { SpaceDescriptionCreate } from './spaceDescriptionCreate.js'; -import type { SpacePermissionCreate } from './spacePermissionCreate.js'; - -/** This is the request object used when creating a new private space. */ -export interface SpacePrivateCreate { - /** The name of the new space. */ - name: string; - /** - * The key for the new space. Format: See [Space keys](https://confluence.atlassian.com/x/lqNMMQ). If `alias` is not - * provided, this is required. - */ - key?: string; - /** - * This field will be used as the new identifier for the space in confluence page URLs. If the property is not - * provided the alias will be the provided key. This property is experimental and may be changed or removed in the - * future. - */ - alias?: string; - description?: SpaceDescriptionCreate; - /** - * The permissions for the new space. If no permissions are provided, the [Confluence default space - * permissions](https://confluence.atlassian.com/x/UAgzKw#CreateaSpace-Spacepermissions) are applied. Note that if - * permissions are provided, the space is created with only the provided set of permissions, not including the default - * space permissions. Space permissions can be modified after creation using the space permissions endpoints, and a - * private space can be created using the create private space endpoint. - */ - permissions?: SpacePermissionCreate[]; -} diff --git a/packages/legacy/src/api/models/spaceProperty.ts b/packages/legacy/src/api/models/spaceProperty.ts deleted file mode 100644 index c4f61a98..00000000 --- a/packages/legacy/src/api/models/spaceProperty.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { Space } from './space.js'; - -export interface SpaceProperty { - id: number; - key: string; - value: {}; - version?: { - when: string; - message: string; - number: number; - minorEdit: boolean; - }; - space?: Space; - _expandable: { - version?: string; - space?: string; - }; -} diff --git a/packages/legacy/src/api/models/spacePropertyArray.ts b/packages/legacy/src/api/models/spacePropertyArray.ts deleted file mode 100644 index a8e40d74..00000000 --- a/packages/legacy/src/api/models/spacePropertyArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { SpaceProperty } from './spaceProperty.js'; - -export interface SpacePropertyArray { - results: SpaceProperty[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/spacePropertyCreate.ts b/packages/legacy/src/api/models/spacePropertyCreate.ts deleted file mode 100644 index 39d423aa..00000000 --- a/packages/legacy/src/api/models/spacePropertyCreate.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { PropertyValue } from './propertyValue.js'; - -export interface SpacePropertyCreate { - /** The key of the new property. */ - key: string; - value: PropertyValue; - space?: { - /** The key of the space */ - key?: string; - }; -} diff --git a/packages/legacy/src/api/models/spacePropertyCreateNoKey.ts b/packages/legacy/src/api/models/spacePropertyCreateNoKey.ts deleted file mode 100644 index d704760d..00000000 --- a/packages/legacy/src/api/models/spacePropertyCreateNoKey.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { PropertyValue } from './propertyValue.js'; - -export interface SpacePropertyCreateNoKey { - value: PropertyValue; -} diff --git a/packages/legacy/src/api/models/spacePropertyUpdate.ts b/packages/legacy/src/api/models/spacePropertyUpdate.ts deleted file mode 100644 index 76be6128..00000000 --- a/packages/legacy/src/api/models/spacePropertyUpdate.ts +++ /dev/null @@ -1,15 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -export interface SpacePropertyUpdate { - /** The value of the property. */ - value: Record; - /** The version number of the property. */ - version: { - /** - * The new version for the updated space property. Set this to the current version number incremented by one. To get - * the current version number, use 'Get space property' and retrieve `version.number`. - */ - number: number; - /** If `minorEdit` is set to 'true', no notification email or activity stream will be generated for the change. */ - minorEdit?: boolean; - }; -} diff --git a/packages/legacy/src/api/models/spaceSettings.ts b/packages/legacy/src/api/models/spaceSettings.ts deleted file mode 100644 index 1fa1bcc6..00000000 --- a/packages/legacy/src/api/models/spaceSettings.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; - -export interface SpaceSettings { - /** - * Defines whether an override for the space home should be used. This is used in conjunction with a space theme - * provided by an app. For example, if this property is set to true, a theme can display a page other than the space - * homepage when users visit the root URL for a space. This property allows apps to provide content-only theming - * without overriding the space home. - */ - routeOverrideEnabled: boolean; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/spaceSettingsUpdate.ts b/packages/legacy/src/api/models/spaceSettingsUpdate.ts deleted file mode 100644 index bf8b7a15..00000000 --- a/packages/legacy/src/api/models/spaceSettingsUpdate.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface SpaceSettingsUpdate { - /** - * Defines whether an override for the space home should be used. This is used in conjunction with a space theme - * provided by an app. For example, if this property is set to true, a theme can display a page other than the space - * homepage when users visit the root URL for a space. This property allows apps to provide content-only theming - * without overriding the space home. - */ - routeOverrideEnabled?: boolean; -} diff --git a/packages/legacy/src/api/models/spaceUpdate.ts b/packages/legacy/src/api/models/spaceUpdate.ts deleted file mode 100644 index b26edec2..00000000 --- a/packages/legacy/src/api/models/spaceUpdate.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { SpaceDescriptionCreate } from './spaceDescriptionCreate.js'; - -export interface SpaceUpdate { - /** The name of the space. */ - name?: string; - description?: SpaceDescriptionCreate; - /** The page to set as the homepage of the space. */ - homepage?: { - /** The ID of the page. */ - id: string; - }; - /** The updated type for this space. */ - type?: string; - /** The updated status for this space. */ - status?: string; -} diff --git a/packages/legacy/src/api/models/spaceWatch.ts b/packages/legacy/src/api/models/spaceWatch.ts deleted file mode 100644 index 625b23f1..00000000 --- a/packages/legacy/src/api/models/spaceWatch.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { SpaceWatchUser } from './spaceWatchUser.js'; - -export interface SpaceWatch { - type: string; - watcher: SpaceWatchUser; - contentId?: string; - spaceKey: string; -} diff --git a/packages/legacy/src/api/models/spaceWatchArray.ts b/packages/legacy/src/api/models/spaceWatchArray.ts deleted file mode 100644 index 709dc279..00000000 --- a/packages/legacy/src/api/models/spaceWatchArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { SpaceWatch } from './spaceWatch.js'; - -export interface SpaceWatchArray { - results: SpaceWatch[]; - start: number; - limit: number; - size: number; - _links?: GenericLinks; -} diff --git a/packages/legacy/src/api/models/spaceWatchUser.ts b/packages/legacy/src/api/models/spaceWatchUser.ts deleted file mode 100644 index a8d3dd17..00000000 --- a/packages/legacy/src/api/models/spaceWatchUser.ts +++ /dev/null @@ -1,31 +0,0 @@ -import type { Icon } from './icon.js'; -import type { OperationCheckResult } from './operationCheckResult.js'; - -/** - * This essentially the same as the `User` object, but no `_links` property and* no `_expandable` property (therefore, - * different required fields). - */ -export interface SpaceWatchUser { - type: string; - /** - * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - username?: string; - /** - * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - userKey?: string; - /** - * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, - * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; - profilePicture: Icon; - displayName: string; - operations?: OperationCheckResult[]; - accountType: string; - email: string; - publicName: string; -} diff --git a/packages/legacy/src/api/models/superBatchWebResources.ts b/packages/legacy/src/api/models/superBatchWebResources.ts deleted file mode 100644 index 7908622d..00000000 --- a/packages/legacy/src/api/models/superBatchWebResources.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface SuperBatchWebResources { - uris?: { - all?: string; - css?: string; - js?: string; - }; - tags?: { - all?: string; - css?: string; - data?: string; - js?: string; - }; - metatags?: string; -} diff --git a/packages/legacy/src/api/models/systemInfoEntity.ts b/packages/legacy/src/api/models/systemInfoEntity.ts deleted file mode 100644 index b79f1e80..00000000 --- a/packages/legacy/src/api/models/systemInfoEntity.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface SystemInfoEntity { - cloudId: string; - commitHash: string; - baseUrl?: string; - edition?: string; - siteTitle?: string; - defaultLocale?: string; -} diff --git a/packages/legacy/src/api/models/task.ts b/packages/legacy/src/api/models/task.ts deleted file mode 100644 index f25df693..00000000 --- a/packages/legacy/src/api/models/task.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface Task { - globalId: number; - id: number; - contentId: number; - status: string; - title?: string; - description?: string; - body?: string; - creator: string; - assignee?: string; - completeUser?: string; - createDate: number; - dueDate?: number; - updateDate?: number; - completeDate?: number; -} diff --git a/packages/legacy/src/api/models/taskPageResponse.ts b/packages/legacy/src/api/models/taskPageResponse.ts deleted file mode 100644 index 1def5c27..00000000 --- a/packages/legacy/src/api/models/taskPageResponse.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { Task } from './task.js'; - -export interface TaskPageResponse { - results: Task[]; - start: number; - limit: number; - size: number; -} diff --git a/packages/legacy/src/api/models/taskStatusUpdate.ts b/packages/legacy/src/api/models/taskStatusUpdate.ts deleted file mode 100644 index 1178e6d5..00000000 --- a/packages/legacy/src/api/models/taskStatusUpdate.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface TaskStatusUpdate { - status: string; -} diff --git a/packages/legacy/src/api/models/theme.ts b/packages/legacy/src/api/models/theme.ts deleted file mode 100644 index d2947066..00000000 --- a/packages/legacy/src/api/models/theme.ts +++ /dev/null @@ -1,6 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import type { ThemeNoLinks } from './themeNoLinks.js'; - -export interface Theme extends ThemeNoLinks { - _links: Record; -} diff --git a/packages/legacy/src/api/models/themeArray.ts b/packages/legacy/src/api/models/themeArray.ts deleted file mode 100644 index 3096269b..00000000 --- a/packages/legacy/src/api/models/themeArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { ThemeNoLinks } from './themeNoLinks.js'; - -export interface ThemeArray { - results: ThemeNoLinks[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/themeNoLinks.ts b/packages/legacy/src/api/models/themeNoLinks.ts deleted file mode 100644 index 3f49b9e5..00000000 --- a/packages/legacy/src/api/models/themeNoLinks.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { Icon } from './icon.js'; - -/** Theme object without links. Used in ThemeArray. */ -export interface ThemeNoLinks { - themeKey: string; - name: string; - description: string; - icon: Icon; -} diff --git a/packages/legacy/src/api/models/themeUpdate.ts b/packages/legacy/src/api/models/themeUpdate.ts deleted file mode 100644 index b5988868..00000000 --- a/packages/legacy/src/api/models/themeUpdate.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ThemeUpdate { - /** The key of the theme to be set as the space theme. */ - themeKey: string; -} diff --git a/packages/legacy/src/api/models/topNavigationLookAndFeel.ts b/packages/legacy/src/api/models/topNavigationLookAndFeel.ts deleted file mode 100644 index 445f13b0..00000000 --- a/packages/legacy/src/api/models/topNavigationLookAndFeel.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface TopNavigationLookAndFeel { - color?: string; - highlightColor: string; - hoverOrFocus?: { - backgroundColor?: string; - color?: string; - }; -} diff --git a/packages/legacy/src/api/models/user.ts b/packages/legacy/src/api/models/user.ts deleted file mode 100644 index ec7e4da1..00000000 --- a/packages/legacy/src/api/models/user.ts +++ /dev/null @@ -1,40 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { Icon } from './icon.js'; -import type { OperationCheckResult } from './operationCheckResult.js'; -import type { Space } from './space.js'; - -export interface User { - type: string; - /** - * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - username?: string; - /** - * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - userKey?: string; - /** - * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, - * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; - /** The account type of the user, may return empty string if unavailable. */ - accountType: string; - /** The email address of the user. Depending on the user's privacy setting, this may return an empty string. */ - email: string; - /** The public name or nickname of the user. Will always contain a value. */ - publicName: string; - profilePicture: Icon; - /** The display name of the user. Depending on the user's privacy setting, this may be the same as publicName. */ - displayName: string; - operations?: OperationCheckResult[]; - personalSpace?: Space; - _expandable: { - operations?: string; - details?: string; - personalSpace?: string; - }; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/userAnonymous.ts b/packages/legacy/src/api/models/userAnonymous.ts deleted file mode 100644 index d4397f92..00000000 --- a/packages/legacy/src/api/models/userAnonymous.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { Icon } from './icon.js'; -import type { OperationCheckResult } from './operationCheckResult.js'; - -export interface UserAnonymous { - type: string; - profilePicture: Icon; - displayName: string; - operations?: OperationCheckResult[]; - _expandable: { - operations?: string; - }; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/userArray.ts b/packages/legacy/src/api/models/userArray.ts deleted file mode 100644 index ba96dc9d..00000000 --- a/packages/legacy/src/api/models/userArray.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { User } from './user.js'; - -export interface UserArray { - results: User[]; - start: number; - limit: number; - size: number; -} diff --git a/packages/legacy/src/api/models/userProperty.ts b/packages/legacy/src/api/models/userProperty.ts deleted file mode 100644 index 18f31bff..00000000 --- a/packages/legacy/src/api/models/userProperty.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; - -export interface UserProperty { - key: string; - /** The value of the content property. */ - value: {}; - /** A unique identifier for the user property */ - id: string; - /** Datetime when the property was last modified such as `2022-02-01T12:00:00.111Z` */ - lastModifiedDate: string; - /** Datetime when the property was created such as `2022-01-01T12:00:00.111Z` */ - createdDate: string; - Links?: GenericLinks; -} diff --git a/packages/legacy/src/api/models/userPropertyCreate.ts b/packages/legacy/src/api/models/userPropertyCreate.ts deleted file mode 100644 index bbc64795..00000000 --- a/packages/legacy/src/api/models/userPropertyCreate.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface UserPropertyCreate { - /** The value of the user property. */ - value: {}; -} diff --git a/packages/legacy/src/api/models/userPropertyKeyArray.ts b/packages/legacy/src/api/models/userPropertyKeyArray.ts deleted file mode 100644 index 333f390a..00000000 --- a/packages/legacy/src/api/models/userPropertyKeyArray.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; - -export interface UserPropertyKeyArray { - results: { - key?: string; - }[]; - start?: number; - limit?: number; - size?: number; - Links?: GenericLinks; -} diff --git a/packages/legacy/src/api/models/userPropertyUpdate.ts b/packages/legacy/src/api/models/userPropertyUpdate.ts deleted file mode 100644 index 0408de76..00000000 --- a/packages/legacy/src/api/models/userPropertyUpdate.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface UserPropertyUpdate { - /** The value of the user property. */ - value: {}; -} diff --git a/packages/legacy/src/api/models/userWatch.ts b/packages/legacy/src/api/models/userWatch.ts deleted file mode 100644 index 0c9cbff4..00000000 --- a/packages/legacy/src/api/models/userWatch.ts +++ /dev/null @@ -1,3 +0,0 @@ -export interface UserWatch { - watching: boolean; -} diff --git a/packages/legacy/src/api/models/usersUserKeys.ts b/packages/legacy/src/api/models/usersUserKeys.ts deleted file mode 100644 index 6356e773..00000000 --- a/packages/legacy/src/api/models/usersUserKeys.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { User } from './user.js'; - -export interface UsersUserKeys { - users: User[]; - userKeys: string[]; - _links?: GenericLinks; -} diff --git a/packages/legacy/src/api/models/version.ts b/packages/legacy/src/api/models/version.ts deleted file mode 100644 index 21288a69..00000000 --- a/packages/legacy/src/api/models/version.ts +++ /dev/null @@ -1,20 +0,0 @@ -import type { Content } from './content.js'; -import type { GenericLinks } from './genericLinks.js'; -import type { User } from './user.js'; -import type { UsersUserKeys } from './usersUserKeys.js'; - -export interface Version { - by: User; - when: string; - friendlyWhen: string; - message: string; - number: number; - minorEdit: boolean; - content?: Content; - collaborators?: UsersUserKeys; - _expandable: { - content: string; - collaborators: string; - }; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/versionArray.ts b/packages/legacy/src/api/models/versionArray.ts deleted file mode 100644 index abee6079..00000000 --- a/packages/legacy/src/api/models/versionArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { Version } from './version.js'; - -export interface VersionArray { - results: Version[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/versionRestore.ts b/packages/legacy/src/api/models/versionRestore.ts deleted file mode 100644 index 0d3c8053..00000000 --- a/packages/legacy/src/api/models/versionRestore.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface VersionRestore { - /** Set to 'restore'. */ - operationKey: string; - params: { - /** The version number to be restored. */ - versionNumber: number; - /** Description for the version. */ - message: string; - }; -} diff --git a/packages/legacy/src/api/models/watch.ts b/packages/legacy/src/api/models/watch.ts deleted file mode 100644 index b968ab1c..00000000 --- a/packages/legacy/src/api/models/watch.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { WatchUser } from './watchUser.js'; - -export interface Watch { - type: string; - watcher: WatchUser; - contentId: string; -} diff --git a/packages/legacy/src/api/models/watchArray.ts b/packages/legacy/src/api/models/watchArray.ts deleted file mode 100644 index 885bf607..00000000 --- a/packages/legacy/src/api/models/watchArray.ts +++ /dev/null @@ -1,10 +0,0 @@ -import type { GenericLinks } from './genericLinks.js'; -import type { Watch } from './watch.js'; - -export interface WatchArray { - results: Watch[]; - start: number; - limit: number; - size: number; - _links: GenericLinks; -} diff --git a/packages/legacy/src/api/models/watchUser.ts b/packages/legacy/src/api/models/watchUser.ts deleted file mode 100644 index f9d1eefb..00000000 --- a/packages/legacy/src/api/models/watchUser.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { Icon } from './icon.js'; -import type { OperationCheckResult } from './operationCheckResult.js'; - -/** - * This essentially the same as the `User` object, but no `_links` property and* no `_expandable` property (therefore, - * different required fields). - */ -export interface WatchUser { - type: string; - /** - * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - username?: string; - /** - * This property is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - userKey?: string; - /** - * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, - * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; - profilePicture: Icon; - displayName: string; - operations: OperationCheckResult[]; -} diff --git a/packages/legacy/src/api/models/webResourceDependencies.ts b/packages/legacy/src/api/models/webResourceDependencies.ts deleted file mode 100644 index c009edb8..00000000 --- a/packages/legacy/src/api/models/webResourceDependencies.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { SuperBatchWebResources } from './superBatchWebResources.js'; - -export interface WebResourceDependencies { - keys?: string[]; - contexts?: string[]; - uris?: { - all?: string; - css?: string; - js?: string; - }; - tags?: { - all?: string; - css?: string; - data?: string; - js?: string; - }; - superbatch?: SuperBatchWebResources; -} diff --git a/packages/legacy/src/api/parameters/addContentWatcher.ts b/packages/legacy/src/api/parameters/addContentWatcher.ts deleted file mode 100644 index a198e446..00000000 --- a/packages/legacy/src/api/parameters/addContentWatcher.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface AddContentWatcher { - /** The ID of the content to add the watcher to. */ - contentId: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - key?: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - username?: string; - /** - * The `accountId` of the user to be added as a watcher. The accountId uniquely identifies the user across all - * Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/addCustomContentPermissions.ts b/packages/legacy/src/api/parameters/addCustomContentPermissions.ts deleted file mode 100644 index 59c75ee2..00000000 --- a/packages/legacy/src/api/parameters/addCustomContentPermissions.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { SpacePermissionCustomContent } from '../models/index.js'; - -export interface AddCustomContentPermissions extends SpacePermissionCustomContent { - /** The key of the space to be queried for its content. */ - spaceKey: string; -} diff --git a/packages/legacy/src/api/parameters/addGroupToContentRestrictionByGroupId.ts b/packages/legacy/src/api/parameters/addGroupToContentRestrictionByGroupId.ts deleted file mode 100644 index b10e93b5..00000000 --- a/packages/legacy/src/api/parameters/addGroupToContentRestrictionByGroupId.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface AddGroupToContentRestrictionByGroupId { - /** The ID of the content that the restriction applies to. */ - id: string; - /** The operation that the restriction applies to. */ - operationKey: string; - /** The groupId of the group to add to the content restriction. */ - groupId: string; -} diff --git a/packages/legacy/src/api/parameters/addLabelWatcher.ts b/packages/legacy/src/api/parameters/addLabelWatcher.ts deleted file mode 100644 index 1268f819..00000000 --- a/packages/legacy/src/api/parameters/addLabelWatcher.ts +++ /dev/null @@ -1,21 +0,0 @@ -export interface AddLabelWatcher { - /** Note, you must add header when making a request, as this operation has XSRF protection. */ - 'X-Atlassian-Token': string; - /** The name of the label to add the watcher to. */ - labelName: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - key?: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - username?: string; - /** - * The `accountId` of the user to be added as a watcher. The accountId uniquely identifies the user across all - * Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/addLabelsToContent.ts b/packages/legacy/src/api/parameters/addLabelsToContent.ts deleted file mode 100644 index 07935f18..00000000 --- a/packages/legacy/src/api/parameters/addLabelsToContent.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { LabelCreateArray } from '../models/index.js'; - -export interface AddLabelsToContent { - /** The ID of the content that will have labels added to it. */ - id: string; - /** - * If true, return the new 400 error response on invalid requests. Otherwise return a server error response on invalid - * requests. - * - * Why does this parameter exist? Previously, our API was returning a 500 status code with a difficult-to-consume - * response body. We've fixed the response to have a 400 status code and a more useful body. This parameter enables a - * smooth transition without a breaking change; eventually, we'll completely remove the 500 response and this - * parameter won't be needed. - */ - 'use-400-error-response'?: boolean; - body: LabelCreateArray; -} diff --git a/packages/legacy/src/api/parameters/addLabelsToSpace.ts b/packages/legacy/src/api/parameters/addLabelsToSpace.ts deleted file mode 100644 index 0b828390..00000000 --- a/packages/legacy/src/api/parameters/addLabelsToSpace.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface AddLabelsToSpace { - /** The key of the space to add labels to. */ - spaceKey: string; -} diff --git a/packages/legacy/src/api/parameters/addPermissionToSpace.ts b/packages/legacy/src/api/parameters/addPermissionToSpace.ts deleted file mode 100644 index 0cba42ed..00000000 --- a/packages/legacy/src/api/parameters/addPermissionToSpace.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { SpacePermissionRequest } from '../models/index.js'; - -export interface AddPermissionToSpace extends SpacePermissionRequest { - /** The key of the space to be queried for its content. */ - spaceKey: string; -} diff --git a/packages/legacy/src/api/parameters/addRestrictions.ts b/packages/legacy/src/api/parameters/addRestrictions.ts deleted file mode 100644 index f19867a3..00000000 --- a/packages/legacy/src/api/parameters/addRestrictions.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { AddContentRestrictionUpdateArray } from '../models/index.js'; - -export interface AddRestrictions { - /** The ID of the content to add restrictions to. */ - id: string; - /** - * A multi-value parameter indicating which properties of the content restrictions (returned in response) to expand. - * - * - `restrictions.user` returns the piece of content that the restrictions are applied to. Expanded by default. - * - `restrictions.group` returns the piece of content that the restrictions are applied to. Expanded by default. - * - `content` returns the piece of content that the restrictions are applied to. - */ - expand?: string[]; - body: AddContentRestrictionUpdateArray; -} diff --git a/packages/legacy/src/api/parameters/addSpaceWatcher.ts b/packages/legacy/src/api/parameters/addSpaceWatcher.ts deleted file mode 100644 index 52d769b7..00000000 --- a/packages/legacy/src/api/parameters/addSpaceWatcher.ts +++ /dev/null @@ -1,21 +0,0 @@ -export interface AddSpaceWatcher { - /** Note, you must add header when making a request, as this operation has XSRF protection. */ - 'X-Atlassian-Token': string; - /** The key of the space to add the watcher to. */ - spaceKey: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - key?: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - username?: string; - /** - * The `accountId` of the user to be added as a watcher. The accountId uniquely identifies the user across all - * Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/addUserToContentRestriction.ts b/packages/legacy/src/api/parameters/addUserToContentRestriction.ts deleted file mode 100644 index 13ab0b8b..00000000 --- a/packages/legacy/src/api/parameters/addUserToContentRestriction.ts +++ /dev/null @@ -1,21 +0,0 @@ -export interface AddUserToContentRestriction { - /** The ID of the content that the restriction applies to. */ - id: string; - /** The operation that the restriction applies to. */ - operationKey: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - key?: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - userName?: string; - /** - * The account ID of the user to add to the content restriction. The accountId uniquely identifies the user across all - * Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/addUserToGroup.ts b/packages/legacy/src/api/parameters/addUserToGroup.ts deleted file mode 100644 index b0348002..00000000 --- a/packages/legacy/src/api/parameters/addUserToGroup.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { AccountId } from '../models/index.js'; - -export interface AddUserToGroup extends AccountId { - /** Name of the group whose membership is updated */ - name: string; -} diff --git a/packages/legacy/src/api/parameters/addUserToGroupByGroupId.ts b/packages/legacy/src/api/parameters/addUserToGroupByGroupId.ts deleted file mode 100644 index 1aa07ae0..00000000 --- a/packages/legacy/src/api/parameters/addUserToGroupByGroupId.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { AccountId } from '../models/index.js'; - -export interface AddUserToGroupByGroupId extends AccountId { - /** GroupId of the group whose membership is updated */ - groupId: string; -} diff --git a/packages/legacy/src/api/parameters/archivePages.ts b/packages/legacy/src/api/parameters/archivePages.ts deleted file mode 100644 index 72624158..00000000 --- a/packages/legacy/src/api/parameters/archivePages.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface ArchivePages { - pages: Array<{ - /** The `id` of the page to be archived. */ - id: number; - }>; -} diff --git a/packages/legacy/src/api/parameters/asyncConvertContentBodyRequest.ts b/packages/legacy/src/api/parameters/asyncConvertContentBodyRequest.ts deleted file mode 100644 index 07870de5..00000000 --- a/packages/legacy/src/api/parameters/asyncConvertContentBodyRequest.ts +++ /dev/null @@ -1,81 +0,0 @@ -import type { ContentBodyCreate } from '../models/index.js'; - -export interface AsyncConvertContentBodyRequest extends ContentBodyCreate { - /** The name of the target format for the content body. */ - to: string; - /** - * The space key used for resolving embedded content (page includes, files, and links) in the content body. For - * example, if the source content contains the link `` - * and the `spaceKeyContext=TEST` parameter is provided, then the link will be converted to a link to the "Example - * page" page in the "TEST" space. - */ - spaceKeyContext?: string; - /** - * The content ID used to find the space for resolving embedded content (page includes, files, and links) in the - * content body. For example, if the source content contains the link `` and the `contentIdContext=123` parameter is provided, then the link will be converted to a link - * to the "Example page" page in the same space that has the content with ID=123. Note, `spaceKeyContext` will be - * ignored if this parameter is provided. - */ - contentIdContext?: string; - /** - * If this field is false, the cache will erase its current value and begin a new conversion. If this field is true, - * the cache will not erase its current value, and will set the status of the async conversion to RERUNNING. Once the - * data is updated, the status will change to COMPLETED. Large macros that take long to convert, and whose data need - * not immediately up to date (same as previous conversion's result within last 5 minutes) should set this fields to - * true. Cache values are stored per user per content body and expansions. - */ - allowCache?: boolean; - /** - * Mode used for rendering embedded content, like attachments. - * - * - `current` renders the embedded content using the latest version. - * - `version-at-save` renders the embedded content using the version at - * the time of save. - */ - embeddedContentRender?: string; - /** A multi-value parameter indicating which properties of the content to expand and populate. */ - expand?: - | 'embeddedContent' - | 'mediaToken' - | 'webresource.superbatch.metatags' - | 'webresource.superbatch.tags.all' - | 'webresource.superbatch.tags.css' - | 'webresource.superbatch.tags.data' - | 'webresource.superbatch.tags.js' - | 'webresource.superbatch.uris.all' - | 'webresource.superbatch.uris.css' - | 'webresource.superbatch.uris.data' - | 'webresource.superbatch.uris.js' - | 'webresource.tags.all' - | 'webresource.tags.css' - | 'webresource.tags.data' - | 'webresource.tags.js' - | 'webresource.uris.all' - | 'webresource.uris.css' - | 'webresource.uris.data' - | 'webresource.uris.js' - | ( - | 'embeddedContent' - | 'mediaToken' - | 'webresource.superbatch.metatags' - | 'webresource.superbatch.tags.all' - | 'webresource.superbatch.tags.css' - | 'webresource.superbatch.tags.data' - | 'webresource.superbatch.tags.js' - | 'webresource.superbatch.uris.all' - | 'webresource.superbatch.uris.css' - | 'webresource.superbatch.uris.data' - | 'webresource.superbatch.uris.js' - | 'webresource.tags.all' - | 'webresource.tags.css' - | 'webresource.tags.data' - | 'webresource.tags.js' - | 'webresource.uris.all' - | 'webresource.uris.css' - | 'webresource.uris.data' - | 'webresource.uris.js' - )[] - | string - | string[]; -} diff --git a/packages/legacy/src/api/parameters/asyncConvertContentBodyResponse.ts b/packages/legacy/src/api/parameters/asyncConvertContentBodyResponse.ts deleted file mode 100644 index 9192b061..00000000 --- a/packages/legacy/src/api/parameters/asyncConvertContentBodyResponse.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface AsyncConvertContentBodyResponse { - /** The asyncId of the macro task to get the converted body. */ - id: string; -} diff --git a/packages/legacy/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts b/packages/legacy/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts deleted file mode 100644 index 829a6369..00000000 --- a/packages/legacy/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts +++ /dev/null @@ -1,88 +0,0 @@ -import type { OneOrMany } from '../../interfaces/index.js'; - -export interface BulkAsyncConvertContentBodyRequest { - /** The name of the target format for the content body conversion. */ - to: string; - /** This object is used when creating or updating content. */ - // eslint-disable-next-line @typescript-eslint/no-explicit-any - body: Record & { - /** The body of the content in the relevant format. */ - value: string; - /** The content format type. Set the value of this property to the name of the format being used, e.g. 'storage'. */ - representation: - | 'view' - | 'export_view' - | 'styled_view' - | 'storage' - | 'editor' - | 'editor2' - | 'anonymous_export_view' - | 'wiki' - | 'atlas_doc_format' - | 'plain' - | 'raw' - | string; - }; - /** - * A multi-value, comma-separated parameter indicating which properties of the content to expand and populate. Expands - * are dependent on the `to` conversion format and may be irrelevant for certain conversions (e.g. - * `macroRenderedOutput` is redundant when converting to `view` format). - * - * If rendering to `view` format, and the body content being converted includes arbitrary nested content (such as - * macros); then it is necessary to include webresource expands in the request. Webresources for content body are the - * batched JS and CSS dependencies for any nested dynamic content (i.e. macros). - */ - expand?: OneOrMany< - | 'embeddedContent' - | 'mediaToken' - | 'macroRenderedOutput' - | 'webresource.superbatch.uris.js' - | 'webresource.superbatch.uris.css' - | 'webresource.superbatch.uris.all' - | 'webresource.superbatch.tags.all' - | 'webresource.superbatch.tags.css' - | 'webresource.superbatch.tags.js' - | 'webresource.uris.js' - | 'webresource.uris.css' - | 'webresource.uris.all' - | 'webresource.tags.all' - | 'webresource.tags.css' - | 'webresource.tags.js' - >; - /** - * Mode used for rendering embedded content, such as attachments. - * - * - `current` renders the embedded content using the latest version. - * - `version-at-save renders` the embedded content using the version at the time of save. - * - * @default current - */ - embeddedContentRender?: 'current' | 'version-at-save' | string; - /** - * The content ID used to find the space for resolving embedded content (page includes, files, and links) in the - * content body. For example, if the source content contains the link - * - * `` and the `contentIdContext=123` parameter is - * provided, then the link will be converted into a link to the "Example page" page in the same space that has the - * content with ID=123. Note that `spaceKeyContext` will be ignored if this parameter is provided. - */ - contentIdContext?: string; - /** - * The space key used for resolving embedded content (page includes, files, and links) in the content body. For - * example, if the source content contains the link `` - * and the `spaceKeyContext=TEST` parameter is provided, then the link will be converted into a link to the "Example - * page" page in the "TEST" space. - */ - spaceKeyContext?: string; - /** - * If `false`, the cache will erase its current value and begin a new conversion. If `true`, the cache will not erase - * its current value, and will set the status of the async conversion to “RERUNNING”. Once the data is updated, the - * status will change to “COMPLETED”. Large macros that take a long time to convert and that need not be immediately - * up to date (e.g. a macro in which the new conversion result is the same as a previous conversion result that was - * completed within the last 5 minutes) should set this field to `true`. Cache values are stored per user per content - * body and expansions. - * - * @default false - */ - allowCache?: boolean; -} diff --git a/packages/legacy/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts b/packages/legacy/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts deleted file mode 100644 index 3c443c40..00000000 --- a/packages/legacy/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface BulkAsyncConvertContentBodyResponse { - /** The asyncIds of the conversion tasks. */ - ids: string[]; -} diff --git a/packages/legacy/src/api/parameters/checkContentPermission.ts b/packages/legacy/src/api/parameters/checkContentPermission.ts deleted file mode 100644 index 4bdb9494..00000000 --- a/packages/legacy/src/api/parameters/checkContentPermission.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { ContentPermissionRequest } from '../models/index.js'; - -export interface CheckContentPermission extends ContentPermissionRequest { - /** The ID of the content to check permissions against. */ - id: string; -} diff --git a/packages/legacy/src/api/parameters/convertContentBody.ts b/packages/legacy/src/api/parameters/convertContentBody.ts deleted file mode 100644 index bf5f3957..00000000 --- a/packages/legacy/src/api/parameters/convertContentBody.ts +++ /dev/null @@ -1,59 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import type { ContentBodyCreate } from '../models/index.js'; -import type { OneOrMany } from '../../interfaces/index.js'; - -export interface ConvertContentBody extends ContentBodyCreate { - /** The name of the target format for the content body. */ - to: string; - - /** - * A multi-value parameter indicating which properties of the content to expand. Expands are dependent on the to - * conversion format and may be irrelevant for certain conversions (e.g. macroRenderedOutput is redundant when - * converting to view format). - * - * - `webresource` returns JS and CSS resources necessary for displaying nested content in `view` format - * - `webresource.superbatch.uris.js` returns all common JS dependencies - * - `webresource.superbatch.uris.css` returns all common CSS dependencies - * - `webresource.uris.js` returns JS dependencies specific to conversion - * - `webresource.uris.css` returns CSS dependencies specific to conversion - * - `embeddedContent` returns metadata for nested content (e.g. page included using page include macro) - * - `mediaToken` returns JWT token for retrieving attachment data from Media API - * - `macroRenderedOutput` additionally converts body to view format - */ - expand?: OneOrMany< - | 'webresource' - | 'webresource.superbatch.uris.js' - | 'webresource.superbatch.uris.css' - | 'webresource.uris.js' - | 'webresource.uris.css' - | 'embeddedContent' - | 'mediaToken' - | 'macroRenderedOutput' - | string - >; - - /** - * The space key used for resolving embedded content (page includes, files, and links) in the content body. For - * example, if the source content contains the link `` - * and the `spaceKeyContext=TEST` parameter is provided, then the link will be converted to a link to the "Example - * page" page in the "TEST" space. - */ - spaceKeyContext?: string; - /** - * The content ID used to find the space for resolving embedded content (page includes, files, and links) in the - * content body. For example, if the source content contains the link `` and the `contentIdContext=123` parameter is provided, then the link will be converted to a link - * to the "Example page" page in the same space that has the content with ID=123. Note, `spaceKeyContext` will be - * ignored if this parameter is provided. - */ - contentIdContext?: string; - /** - * Mode used for rendering embedded content, like attachments. - * - * - `current` renders the embedded content using the latest version. - * - `version-at-save` renders the embedded content using the version at the time of save. - */ - embeddedContentRender?: string; - - additionalProperties?: any[]; -} diff --git a/packages/legacy/src/api/parameters/copyPage.ts b/packages/legacy/src/api/parameters/copyPage.ts deleted file mode 100644 index 1b59f434..00000000 --- a/packages/legacy/src/api/parameters/copyPage.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { CopyPageRequest } from '../models/index.js'; - -export interface CopyPage { - id: string; - destinationPageId: string; - expand: string[]; - - bodyParameters: CopyPageRequest; -} diff --git a/packages/legacy/src/api/parameters/copyPageHierarchy.ts b/packages/legacy/src/api/parameters/copyPageHierarchy.ts deleted file mode 100644 index a12890e6..00000000 --- a/packages/legacy/src/api/parameters/copyPageHierarchy.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { CopyPageHierarchyRequest } from '../models/index.js'; - -export interface CopyPageHierarchy extends CopyPageHierarchyRequest { - id: string; -} diff --git a/packages/legacy/src/api/parameters/createAttachments.ts b/packages/legacy/src/api/parameters/createAttachments.ts deleted file mode 100644 index f076a472..00000000 --- a/packages/legacy/src/api/parameters/createAttachments.ts +++ /dev/null @@ -1,16 +0,0 @@ -import type { OneOrMany } from '../../interfaces/index.js'; - -export interface CreateAttachments { - /** The ID of the content to add the attachment to. */ - id: string; - /** The status of the content that the attachment is being added to. */ - status?: 'current' | 'draft' | string; - /** The attachments to be created. */ - attachments: OneOrMany<{ - file: Buffer | ReadableStream | string | Blob | File; - filename: string; - minorEdit: boolean; - contentType?: string; - comment?: string; - }>; -} diff --git a/packages/legacy/src/api/parameters/createAuditRecord.ts b/packages/legacy/src/api/parameters/createAuditRecord.ts deleted file mode 100644 index 3299722c..00000000 --- a/packages/legacy/src/api/parameters/createAuditRecord.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { AuditRecordCreate } from '../models/index.js'; - -export interface CreateAuditRecord extends AuditRecordCreate {} diff --git a/packages/legacy/src/api/parameters/createContent.ts b/packages/legacy/src/api/parameters/createContent.ts deleted file mode 100644 index 4630f9a5..00000000 --- a/packages/legacy/src/api/parameters/createContent.ts +++ /dev/null @@ -1,42 +0,0 @@ -import type { ContentCreate } from '../models/index.js'; -import type { OneOrMany } from '../../interfaces/index.js'; - -export interface CreateContent extends ContentCreate { - /** Filter the returned content by status. */ - status?: string; - /** A multi-value parameter indicating which properties of the content to expand. */ - expand?: OneOrMany< - | 'childTypes.all' - | 'childTypes.attachment' - | 'childTypes.comment' - | 'childTypes.page' - | 'container' - | 'metadata.currentuser' - | 'metadata.properties' - | 'metadata.labels' - | 'metadata.frontend' - | 'operations' - | 'children.page' - | 'children.attachment' - | 'children.comment' - | 'restrictions.read.restrictions.user' - | 'restrictions.read.restrictions.group' - | 'restrictions.update.restrictions.user' - | 'restrictions.update.restrictions.group' - | 'history' - | 'history.lastUpdated' - | 'history.previousVersion' - | 'history.contributors' - | 'history.nextVersion' - | 'ancestors' - | 'body' - | 'version' - | 'descendants.page' - | 'descendants.attachment' - | 'descendants.comment' - | 'space' - | 'extensions.inlineProperties' - | 'extensions.resolution' - | string - >; -} diff --git a/packages/legacy/src/api/parameters/createContentProperty.ts b/packages/legacy/src/api/parameters/createContentProperty.ts deleted file mode 100644 index 1ed47df2..00000000 --- a/packages/legacy/src/api/parameters/createContentProperty.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { ContentPropertyCreate } from '../models/index.js'; - -export interface CreateContentProperty extends ContentPropertyCreate { - /** The ID of the content to add the property to. */ - id: string; -} diff --git a/packages/legacy/src/api/parameters/createContentPropertyForKey.ts b/packages/legacy/src/api/parameters/createContentPropertyForKey.ts deleted file mode 100644 index fdffb39e..00000000 --- a/packages/legacy/src/api/parameters/createContentPropertyForKey.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { ContentPropertyCreateNoKey } from '../models/index.js'; - -export interface CreateContentPropertyForKey extends ContentPropertyCreateNoKey { - /** The ID of the content to add the property to. */ - id: string; - /** The key of the content property. Required. */ - key: string; -} diff --git a/packages/legacy/src/api/parameters/createContentTemplate.ts b/packages/legacy/src/api/parameters/createContentTemplate.ts deleted file mode 100644 index 37b328a2..00000000 --- a/packages/legacy/src/api/parameters/createContentTemplate.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { ContentTemplateCreate } from '../models/index.js'; - -export interface CreateContentTemplate extends ContentTemplateCreate {} diff --git a/packages/legacy/src/api/parameters/createGroup.ts b/packages/legacy/src/api/parameters/createGroup.ts deleted file mode 100644 index 6cef05e0..00000000 --- a/packages/legacy/src/api/parameters/createGroup.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { GroupName } from '../models/index.js'; - -export interface CreateGroup extends GroupName {} diff --git a/packages/legacy/src/api/parameters/createOrUpdateAttachments.ts b/packages/legacy/src/api/parameters/createOrUpdateAttachments.ts deleted file mode 100644 index f0f97131..00000000 --- a/packages/legacy/src/api/parameters/createOrUpdateAttachments.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { CreateAttachments } from './createAttachments.js'; - -export interface CreateOrUpdateAttachments { - /** The ID of the content to add the attachment to. */ - id: string; - /** The status of the content that the attachment is being added to. This should always be set to 'current'. */ - status?: 'current' | 'draft' | string; - - /** The attachments to be created or updated. */ - attachments: CreateAttachments['attachments']; -} diff --git a/packages/legacy/src/api/parameters/createPrivateSpace.ts b/packages/legacy/src/api/parameters/createPrivateSpace.ts deleted file mode 100644 index 0378cafc..00000000 --- a/packages/legacy/src/api/parameters/createPrivateSpace.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { SpacePrivateCreate } from '../models/index.js'; - -export interface CreatePrivateSpace extends SpacePrivateCreate {} diff --git a/packages/legacy/src/api/parameters/createRelationship.ts b/packages/legacy/src/api/parameters/createRelationship.ts deleted file mode 100644 index ec6b4061..00000000 --- a/packages/legacy/src/api/parameters/createRelationship.ts +++ /dev/null @@ -1,44 +0,0 @@ -export interface CreateRelationship { - /** - * The name of the relationship. This method supports the 'favourite' (i.e. 'save for later') relationship. You can - * also specify any other value for this parameter to create a custom relationship type. - */ - relationName: string; - /** The source entity type of the relationship. This must be 'user', if the `relationName` is 'favourite'. */ - sourceType: string; - /** - * - The identifier for the source entity: - * - * - If `sourceType` is 'user', then specify either 'current' (logged-in user) or the user key. - * - If `sourceType` is 'content', then specify the content ID. - * - If `sourceType` is 'space', then specify the space key. - */ - sourceKey: string; - /** - * The target entity type of the relationship. This must be 'space' or 'content', if the `relationName` is - * 'favourite'. - */ - targetType: string; - /** - * - The identifier for the target entity: - * - * - If `sourceType` is 'user', then specify either 'current' (logged-in user) or the user key. - * - If `sourceType` is 'content', then specify the content ID. - * - If `sourceType` is 'space', then specify the space key. - */ - targetKey: string; - /** The status of the source. This parameter is only used when the `sourceType` is 'content'. */ - sourceStatus?: string; - /** The status of the target. This parameter is only used when the `targetType` is 'content'. */ - targetStatus?: string; - /** - * The version of the source. This parameter is only used when the `sourceType` is 'content' and the `sourceStatus` is - * 'historical'. - */ - sourceVersion?: number; - /** - * The version of the target. This parameter is only used when the `targetType` is 'content' and the `targetStatus` is - * 'historical'. - */ - targetVersion?: number; -} diff --git a/packages/legacy/src/api/parameters/createSpace.ts b/packages/legacy/src/api/parameters/createSpace.ts deleted file mode 100644 index d9f16cff..00000000 --- a/packages/legacy/src/api/parameters/createSpace.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { SpaceCreate } from '../models/index.js'; - -export interface CreateSpace extends SpaceCreate {} diff --git a/packages/legacy/src/api/parameters/createSpaceProperty.ts b/packages/legacy/src/api/parameters/createSpaceProperty.ts deleted file mode 100644 index a250381e..00000000 --- a/packages/legacy/src/api/parameters/createSpaceProperty.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { SpacePropertyCreate } from '../models/index.js'; - -export interface CreateSpaceProperty extends SpacePropertyCreate { - /** The key of the space that the property will be created in. */ - spaceKey: string; -} diff --git a/packages/legacy/src/api/parameters/createSpacePropertyForKey.ts b/packages/legacy/src/api/parameters/createSpacePropertyForKey.ts deleted file mode 100644 index cc7d28e6..00000000 --- a/packages/legacy/src/api/parameters/createSpacePropertyForKey.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { SpacePropertyCreateNoKey } from '../models/index.js'; - -export interface CreateSpacePropertyForKey extends SpacePropertyCreateNoKey { - /** The key of the space that the property will be created in. */ - spaceKey: string; - /** The key of the property to be created. */ - key: string; -} diff --git a/packages/legacy/src/api/parameters/createUserProperty.ts b/packages/legacy/src/api/parameters/createUserProperty.ts deleted file mode 100644 index 4e3e9e69..00000000 --- a/packages/legacy/src/api/parameters/createUserProperty.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { UserPropertyCreate } from '../models/index.js'; - -export interface CreateUserProperty extends UserPropertyCreate { - /** - * The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For example, - * 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192 - */ - userId: string; - /** The key of the user property. */ - key: string; -} diff --git a/packages/legacy/src/api/parameters/deleteContent.ts b/packages/legacy/src/api/parameters/deleteContent.ts deleted file mode 100644 index 17461390..00000000 --- a/packages/legacy/src/api/parameters/deleteContent.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface DeleteContent { - /** The ID of the content to be deleted. */ - id: string; - /** Set this to `trashed`, if the content's status is `trashed` and you want to purge it. */ - status?: string; -} diff --git a/packages/legacy/src/api/parameters/deleteContentProperty.ts b/packages/legacy/src/api/parameters/deleteContentProperty.ts deleted file mode 100644 index d117a9ce..00000000 --- a/packages/legacy/src/api/parameters/deleteContentProperty.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface DeleteContentProperty { - /** The ID of the content that the property belongs to. */ - id: string; - /** The key of the property. */ - key: string; -} diff --git a/packages/legacy/src/api/parameters/deleteContentVersion.ts b/packages/legacy/src/api/parameters/deleteContentVersion.ts deleted file mode 100644 index 186a8fae..00000000 --- a/packages/legacy/src/api/parameters/deleteContentVersion.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface DeleteContentVersion { - /** The ID of the content that the version will be deleted from. */ - id: string; - /** The number of the version to be deleted. The version number starts from 1 up to current version. */ - versionNumber: number; -} diff --git a/packages/legacy/src/api/parameters/deleteGroupById.ts b/packages/legacy/src/api/parameters/deleteGroupById.ts deleted file mode 100644 index e3a35d21..00000000 --- a/packages/legacy/src/api/parameters/deleteGroupById.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface DeleteGroupById { - /** Id of the group to delete. */ - id: string; -} diff --git a/packages/legacy/src/api/parameters/deleteLabelFromSpace.ts b/packages/legacy/src/api/parameters/deleteLabelFromSpace.ts deleted file mode 100644 index 35c875a1..00000000 --- a/packages/legacy/src/api/parameters/deleteLabelFromSpace.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface DeleteLabelFromSpace { - /** The key of the space to remove a labels from. */ - spaceKey: string; - /** The name of the label to remove */ - name: string; - /** The prefix of the label to remove. If not provided defaults to global. */ - prefix?: string; -} diff --git a/packages/legacy/src/api/parameters/deletePageTree.ts b/packages/legacy/src/api/parameters/deletePageTree.ts deleted file mode 100644 index c2d4b1be..00000000 --- a/packages/legacy/src/api/parameters/deletePageTree.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface DeletePageTree { - /** The ID of the content which forms root of the page tree, to be deleted. */ - id: string; -} diff --git a/packages/legacy/src/api/parameters/deleteRelationship.ts b/packages/legacy/src/api/parameters/deleteRelationship.ts deleted file mode 100644 index 0acec42b..00000000 --- a/packages/legacy/src/api/parameters/deleteRelationship.ts +++ /dev/null @@ -1,41 +0,0 @@ -export interface DeleteRelationship { - /** The name of the relationship. */ - relationName: string; - /** The source entity type of the relationship. This must be 'user', if the `relationName` is 'favourite'. */ - sourceType: string; - /** - * - The identifier for the source entity: - * - * - If `sourceType` is 'user', then specify either 'current' (logged-in user) or the user key. - * - If `sourceType` is 'content', then specify the content ID. - * - If `sourceType` is 'space', then specify the space key. - */ - sourceKey: string; - /** - * The target entity type of the relationship. This must be 'space' or 'content', if the `relationName` is - * 'favourite'. - */ - targetType: string; - /** - * - The identifier for the target entity: - * - * - If `sourceType` is 'user', then specify either 'current' (logged-in user) or the user key. - * - If `sourceType` is 'content', then specify the content ID. - * - If `sourceType` is 'space', then specify the space key. - */ - targetKey: string; - /** The status of the source. This parameter is only used when the `sourceType` is 'content'. */ - sourceStatus?: string; - /** The status of the target. This parameter is only used when the `targetType` is 'content'. */ - targetStatus?: string; - /** - * The version of the source. This parameter is only used when the `sourceType` is 'content' and the `sourceStatus` is - * 'historical'. - */ - sourceVersion?: number; - /** - * The version of the target. This parameter is only used when the `targetType` is 'content' and the `targetStatus` is - * 'historical'. - */ - targetVersion?: number; -} diff --git a/packages/legacy/src/api/parameters/deleteSpace.ts b/packages/legacy/src/api/parameters/deleteSpace.ts deleted file mode 100644 index 980425f5..00000000 --- a/packages/legacy/src/api/parameters/deleteSpace.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface DeleteSpace { - /** The key of the space to delete. */ - spaceKey: string; -} diff --git a/packages/legacy/src/api/parameters/deleteSpaceProperty.ts b/packages/legacy/src/api/parameters/deleteSpaceProperty.ts deleted file mode 100644 index c4a8d4c8..00000000 --- a/packages/legacy/src/api/parameters/deleteSpaceProperty.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface DeleteSpaceProperty { - /** The key of the space that the property is in. */ - spaceKey: string; - /** The key of the property to be deleted. */ - key: string; -} diff --git a/packages/legacy/src/api/parameters/deleteUserProperty.ts b/packages/legacy/src/api/parameters/deleteUserProperty.ts deleted file mode 100644 index df7e5c22..00000000 --- a/packages/legacy/src/api/parameters/deleteUserProperty.ts +++ /dev/null @@ -1,9 +0,0 @@ -export interface DeleteUserProperty { - /** - * The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For example, - * 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192 - */ - userId: string; - /** The key of the user property. */ - key: string; -} diff --git a/packages/legacy/src/api/parameters/downloadAttachment.ts b/packages/legacy/src/api/parameters/downloadAttachment.ts deleted file mode 100644 index 669d1fa1..00000000 --- a/packages/legacy/src/api/parameters/downloadAttachment.ts +++ /dev/null @@ -1,17 +0,0 @@ -export interface DownloadAttachment { - /** The ID of the content that the attachment is attached to. */ - id: string; - /** The ID of the attachment to download. */ - attachmentId: string; - /** - * The version of the attachment. If this parameter is absent, the redirect URI will download the latest version of - * the attachment. - */ - version?: number; - /** - * The statuses allowed on the retrieved attachment. If this parameter is absent, it will default to `current`. - * - * @default current - */ - status?: string | string[]; -} diff --git a/packages/legacy/src/api/parameters/exportAuditRecords.ts b/packages/legacy/src/api/parameters/exportAuditRecords.ts deleted file mode 100644 index 66059c18..00000000 --- a/packages/legacy/src/api/parameters/exportAuditRecords.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface ExportAuditRecords { - /** - * Filters the exported results to the records on or after the `startDate`. The `startDate` must be specified as a - * [timestamp](https://www.unixtimestamp.com/). - */ - startDate?: string; - /** - * Filters the exported results to the records on or before the `endDate`. The `endDate` must be specified as a - * [timestamp](https://www.unixtimestamp.com/). - */ - endDate?: string; - /** Filters the exported results to records that have string property values matching the `searchString`. */ - searchString?: string; - /** The format of the export file for the audit records. */ - format?: string; -} diff --git a/packages/legacy/src/api/parameters/getAllLabelContent.ts b/packages/legacy/src/api/parameters/getAllLabelContent.ts deleted file mode 100644 index cb2cde8f..00000000 --- a/packages/legacy/src/api/parameters/getAllLabelContent.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface GetAllLabelContent { - /** Name of the label to query. */ - name: string; - /** The type of contents that are to be returned. */ - type?: string; - /** The starting offset for the results. */ - start?: number; - /** The number of results to be returned. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getAndAsyncConvertMacroBodyByMacroId.ts b/packages/legacy/src/api/parameters/getAndAsyncConvertMacroBodyByMacroId.ts deleted file mode 100644 index 7ef69efd..00000000 --- a/packages/legacy/src/api/parameters/getAndAsyncConvertMacroBodyByMacroId.ts +++ /dev/null @@ -1,88 +0,0 @@ -export interface GetAndAsyncConvertMacroBodyByMacroId { - /** The ID for the content that contains the macro. */ - id: string; - /** - * The version of the content that contains the macro. Specifying `0` as the `version` will return the macro body for - * the latest content version. - */ - version: number; - /** - * The ID of the macro. For apps, this is passed to the macro by the Connect/Forge framework. Otherwise, find the - * macro ID by querying the desired content and version, then expanding the body in storage format. For example, - * '/content/196611/version/7?expand=content.body.storage'. - */ - macroId: string; - /** - * The content representation to return the macro in. Currently, the following conversions are allowed: - * - * -`export_view` - `styled_view` - `view`; - */ - to: string; - /** - * If this field is false, the cache will erase its current value and begin a conversion. If this field is true, the - * cache will not erase its current value, and will set the status of the result in cache to RERUNNING. Once the data - * is updated, the status will change to COMPLETED. Large macros that take long to convert, and who want to show - * intermediate, but potentially stale data, immediately should set this field to true. Cache values are stored per - * macro per user per content and expansions. - */ - allowCache?: boolean; - /** - * The space key used for resolving embedded content (page includes, files, and links) in the content body. For - * example, if the source content contains the link `` - * and the `spaceKeyContext=TEST` parameter is provided, then the link will be converted to a link to the "Example - * page" page in the "TEST" space. - */ - spaceKeyContext?: string; - /** - * Mode used for rendering embedded content, like attachments. - * - * - `current` renders the embedded content using the latest version. - * - `version-at-save` renders the embedded content using the version at - * the time of save. - */ - embeddedContentRender?: string; - /** A multi-value parameter indicating which properties of the content to expand and populate. */ - expand?: - | 'embeddedContent' - | 'mediaToken' - | 'webresource.superbatch.metatags' - | 'webresource.superbatch.tags.all' - | 'webresource.superbatch.tags.css' - | 'webresource.superbatch.tags.data' - | 'webresource.superbatch.tags.js' - | 'webresource.superbatch.uris.all' - | 'webresource.superbatch.uris.css' - | 'webresource.superbatch.uris.data' - | 'webresource.superbatch.uris.js' - | 'webresource.tags.all' - | 'webresource.tags.css' - | 'webresource.tags.data' - | 'webresource.tags.js' - | 'webresource.uris.all' - | 'webresource.uris.css' - | 'webresource.uris.data' - | 'webresource.uris.js' - | ( - | 'embeddedContent' - | 'mediaToken' - | 'webresource.superbatch.metatags' - | 'webresource.superbatch.tags.all' - | 'webresource.superbatch.tags.css' - | 'webresource.superbatch.tags.data' - | 'webresource.superbatch.tags.js' - | 'webresource.superbatch.uris.all' - | 'webresource.superbatch.uris.css' - | 'webresource.superbatch.uris.data' - | 'webresource.superbatch.uris.js' - | 'webresource.tags.all' - | 'webresource.tags.css' - | 'webresource.tags.data' - | 'webresource.tags.js' - | 'webresource.uris.all' - | 'webresource.uris.css' - | 'webresource.uris.data' - | 'webresource.uris.js' - )[] - | string - | string[]; -} diff --git a/packages/legacy/src/api/parameters/getAndConvertMacroBodyByMacroId.ts b/packages/legacy/src/api/parameters/getAndConvertMacroBodyByMacroId.ts deleted file mode 100644 index 5f1e06c4..00000000 --- a/packages/legacy/src/api/parameters/getAndConvertMacroBodyByMacroId.ts +++ /dev/null @@ -1,104 +0,0 @@ -export interface GetAndConvertMacroBodyByMacroId { - /** The ID for the content that contains the macro. */ - id: string; - /** - * The version of the content that contains the macro. Specifying `0` as the `version` will return the macro body for - * the latest content version. - */ - version: number; - /** - * The ID of the macro. This is usually passed by the app that the macro is in. Otherwise, find the macro ID by - * querying the desired content and version, then expanding the body in storage format. For example, - * '/content/196611/version/7?expand=content.body.storage'. - */ - macroId: string; - /** The content representation to return the macro in. */ - to: string; - /** - * The space key used for resolving embedded content (page includes, files, and links) in the content body. For - * example, if the source content contains the link `` - * and the `spaceKeyContext=TEST` parameter is provided, then the link will be converted to a link to the "Example - * page" page in the "TEST" space. - */ - spaceKeyContext?: string; - /** - * Mode used for rendering embedded content, like attachments. - * - * - `current` renders the embedded content using the latest version. - * - `version-at-save` renders the embedded content using the version at - * the time of save. - */ - embeddedContentRender?: 'current' | 'version-at-save' | string; - /** A multi-value parameter indicating which properties of the content to expand. */ - expand?: - | 'childTypes.all' - | 'childTypes.attachment' - | 'childTypes.comment' - | 'childTypes.page' - | 'container' - | 'metadata.currentuser' - | 'metadata.properties' - | 'metadata.labels' - | 'metadata.frontend' - | 'operations' - | 'children.page' - | 'children.attachment' - | 'children.comment' - | 'restrictions.read.restrictions.user' - | 'restrictions.read.restrictions.group' - | 'restrictions.update.restrictions.user' - | 'restrictions.update.restrictions.group' - | 'history' - | 'history.lastUpdated' - | 'history.previousVersion' - | 'history.contributors' - | 'history.nextVersion' - | 'ancestors' - | 'body' - | 'body.storage' - | 'body.view' - | 'version' - | 'descendants.page' - | 'descendants.attachment' - | 'descendants.comment' - | 'space' - | 'extensions.inlineProperties' - | 'extensions.resolution' - | ( - | 'childTypes.all' - | 'childTypes.attachment' - | 'childTypes.comment' - | 'childTypes.page' - | 'container' - | 'metadata.currentuser' - | 'metadata.properties' - | 'metadata.labels' - | 'metadata.frontend' - | 'operations' - | 'children.page' - | 'children.attachment' - | 'children.comment' - | 'restrictions.read.restrictions.user' - | 'restrictions.read.restrictions.group' - | 'restrictions.update.restrictions.user' - | 'restrictions.update.restrictions.group' - | 'history' - | 'history.lastUpdated' - | 'history.previousVersion' - | 'history.contributors' - | 'history.nextVersion' - | 'ancestors' - | 'body' - | 'body.storage' - | 'body.view' - | 'version' - | 'descendants.page' - | 'descendants.attachment' - | 'descendants.comment' - | 'space' - | 'extensions.inlineProperties' - | 'extensions.resolution' - )[] - | string - | string[]; -} diff --git a/packages/legacy/src/api/parameters/getAnonymousUser.ts b/packages/legacy/src/api/parameters/getAnonymousUser.ts deleted file mode 100644 index 0bb765f0..00000000 --- a/packages/legacy/src/api/parameters/getAnonymousUser.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface GetAnonymousUser { - /** - * A multi-value parameter indicating which properties of the user to expand. - * - * - `operations` returns the operations that the user is allowed to do. - */ - expand?: string[]; -} diff --git a/packages/legacy/src/api/parameters/getAttachments.ts b/packages/legacy/src/api/parameters/getAttachments.ts deleted file mode 100644 index dbb59c44..00000000 --- a/packages/legacy/src/api/parameters/getAttachments.ts +++ /dev/null @@ -1,50 +0,0 @@ -import type { OneOrMany } from '../../interfaces/index.js'; - -export interface GetAttachments { - /** The ID of the content to be queried for its attachments. */ - id: string; - /** A multi-value parameter indicating which properties of the content to expand. */ - expand?: OneOrMany< - | 'childTypes.all' - | 'childTypes.attachment' - | 'childTypes.comment' - | 'childTypes.page' - | 'container' - | 'metadata' - | 'metadata.currentuser' - | 'metadata.properties' - | 'metadata.labels' - | 'metadata.frontend' - | 'operations' - | 'children.page' - | 'children.attachment' - | 'children.comment' - | 'restrictions.read.restrictions.user' - | 'restrictions.read.restrictions.group' - | 'restrictions.update.restrictions.user' - | 'restrictions.update.restrictions.group' - | 'history' - | 'history.lastUpdated' - | 'history.previousVersion' - | 'history.contributors' - | 'history.nextVersion' - | 'ancestors' - | 'body' - | 'version' - | 'descendants.page' - | 'descendants.attachment' - | 'descendants.comment' - | 'space' - | 'extensions.inlineProperties' - | 'extensions.resolution' - | string - >; - /** The starting index of the returned attachments. */ - start?: number; - /** The maximum number of attachments to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; - /** Filter the results to attachments that match the filename. */ - filename?: string; - /** Filter the results to attachments that match the media type. */ - mediaType?: string; -} diff --git a/packages/legacy/src/api/parameters/getAuditRecords.ts b/packages/legacy/src/api/parameters/getAuditRecords.ts deleted file mode 100644 index 8f936a33..00000000 --- a/packages/legacy/src/api/parameters/getAuditRecords.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface GetAuditRecords { - /** - * Filters the results to the records on or after the `startDate`. The `startDate` must be specified as a - * [timestamp](https://www.unixtimestamp.com/). - */ - startDate?: string; - /** - * Filters the results to the records on or before the `endDate`. The `endDate` must be specified as a - * [timestamp](https://www.unixtimestamp.com/). - */ - endDate?: string; - /** Filters the results to records that have string property values matching the `searchString`. */ - searchString?: string; - /** The starting index of the returned records. */ - start?: number; - /** The maximum number of records to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getAuditRecordsForTimePeriod.ts b/packages/legacy/src/api/parameters/getAuditRecordsForTimePeriod.ts deleted file mode 100644 index 5f9a28f7..00000000 --- a/packages/legacy/src/api/parameters/getAuditRecordsForTimePeriod.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface GetAuditRecordsForTimePeriod { - /** The number of units for the time period. */ - number?: number; - /** The unit of time that the time period is measured in. */ - units?: string; - /** Filters the results to records that have string property values matching the `searchString`. */ - searchString?: string; - /** The starting index of the returned records. */ - start?: number; - /** The maximum number of records to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getAvailableContentStates.ts b/packages/legacy/src/api/parameters/getAvailableContentStates.ts deleted file mode 100644 index 352464c1..00000000 --- a/packages/legacy/src/api/parameters/getAvailableContentStates.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetAvailableContentStates { - /** Id of content to get available states for */ - id?: string; -} diff --git a/packages/legacy/src/api/parameters/getBulkUserLookup.ts b/packages/legacy/src/api/parameters/getBulkUserLookup.ts deleted file mode 100644 index 30360cd4..00000000 --- a/packages/legacy/src/api/parameters/getBulkUserLookup.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface GetBulkUserLookup { - /** A list of accountId's of users to be returned. */ - accountId: string; - /** - * A multi-value parameter indicating which properties of the user to expand. - * - * - `operations` returns the operations that the user is allowed to do. - * - PersonalSpace returns the user's personal space, if it exists. - */ - expand?: string[]; - /** - * The maximum number of results returned. Currently API returns 200 results max. If more that 200 ids are passed - * first 200 will be returned. - */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getContent.ts b/packages/legacy/src/api/parameters/getContent.ts deleted file mode 100644 index 0c925040..00000000 --- a/packages/legacy/src/api/parameters/getContent.ts +++ /dev/null @@ -1,69 +0,0 @@ -import type { OneOrMany } from '../../interfaces/index.js'; - -export interface GetContent { - /** The type of content to return. */ - type?: string; - /** The key of the space to be queried for its content. */ - spaceKey?: string; - /** The title of the page to be returned. Required for page type. */ - title?: string; - /** - * Filter the results to a set of content based on their status. If set to `any`, content with any status is returned. - * Note, the `historical` status is currently not supported. - */ - status?: string[]; - /** - * The posting date of the blog post to be returned. Required for blogpost type. Format: - * yyyy-mm-dd. - */ - postingDay?: string; - /** A multi-value parameter indicating which properties of the content to expand. */ - expand?: OneOrMany< - | 'childTypes.all' - | 'childTypes.attachment' - | 'childTypes.comment' - | 'childTypes.page' - | 'container' - | 'metadata.currentuser' - | 'metadata.properties' - | 'metadata.labels' - | 'metadata.frontend' - | 'operations' - | 'children.page' - | 'children.attachment' - | 'children.comment' - | 'restrictions.read.restrictions.user' - | 'restrictions.read.restrictions.group' - | 'restrictions.update.restrictions.user' - | 'restrictions.update.restrictions.group' - | 'history' - | 'history.lastUpdated' - | 'history.previousVersion' - | 'history.contributors' - | 'history.nextVersion' - | 'ancestors' - | 'body' - | 'version' - | 'descendants.page' - | 'descendants.attachment' - | 'descendants.comment' - | 'space' - | 'extensions.inlineProperties' - | 'extensions.resolution' - | string - >; - /** - * If set to `viewed`, the request will trigger a 'viewed' event for the content. When this event is triggered, the - * page/blogpost will appear on the 'Recently visited' tab of the user's Confluence dashboard. - */ - trigger?: string; - /** - * Orders the content by a particular field. Specify the field and sort direction for this parameter, as follows: - * 'fieldpath asc/desc'. For example, 'history.createdDate desc'. - */ - orderby?: string; - /** The starting index of the returned content. */ - start?: number; - /** The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getContentById.ts b/packages/legacy/src/api/parameters/getContentById.ts deleted file mode 100644 index 272c70dd..00000000 --- a/packages/legacy/src/api/parameters/getContentById.ts +++ /dev/null @@ -1,63 +0,0 @@ -import type { OneOrMany } from '../../interfaces/index.js'; - -export interface GetContentById { - /** - * The ID of the content to be returned. If you don't know the content ID, use [Get content](#api-content-get) and - * filter the results. - */ - id: string; - /** - * Filter the results to a set of content based on their status. If set to `any`, content with any status is returned. - * Note, the `historical` status is currently not supported. - */ - status?: string[]; - /** The version number of the content to be returned. */ - version?: number; - /** - * The version of embedded content (e.g. attachments) to render. - * - * - current renders the latest version of the embedded content. - * - version-at-save renders the version of the embedded content at the time of save. - */ - embeddedContentRender?: string; - /** A multi-value parameter indicating which properties of the content to expand. */ - expand?: OneOrMany< - | 'childTypes.all' - | 'childTypes.attachment' - | 'childTypes.comment' - | 'childTypes.page' - | 'container' - | 'metadata.currentuser' - | 'metadata.properties' - | 'metadata.labels' - | 'metadata.frontend' - | 'operations' - | 'children.page' - | 'children.attachment' - | 'children.comment' - | 'restrictions.read.restrictions.user' - | 'restrictions.read.restrictions.group' - | 'restrictions.update.restrictions.user' - | 'restrictions.update.restrictions.group' - | 'history' - | 'history.lastUpdated' - | 'history.previousVersion' - | 'history.contributors' - | 'history.nextVersion' - | 'ancestors' - | 'body' - | 'version' - | 'descendants.page' - | 'descendants.attachment' - | 'descendants.comment' - | 'space' - | 'extensions.inlineProperties' - | 'extensions.resolution' - | string - >; - /** - * If set to `viewed`, the request will trigger a 'viewed' event for the content. When this event is triggered, the - * page/blogpost will appear on the 'Recently visited' tab of the user's Confluence dashboard. - */ - trigger?: string; -} diff --git a/packages/legacy/src/api/parameters/getContentByTypeForSpace.ts b/packages/legacy/src/api/parameters/getContentByTypeForSpace.ts deleted file mode 100644 index ae49421b..00000000 --- a/packages/legacy/src/api/parameters/getContentByTypeForSpace.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface GetContentByTypeForSpace { - /** The key of the space to be queried for its content. */ - spaceKey: string; - /** The type of content to return. */ - type: string; - /** Filter the results to content at the root level of the space or all content. */ - depth?: string; - /** A multi-value parameter indicating which properties of the content to expand. */ - expand?: string[]; - /** The starting index of the returned content. */ - start?: number; - /** The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getContentChildren.ts b/packages/legacy/src/api/parameters/getContentChildren.ts deleted file mode 100644 index 0e23d081..00000000 --- a/packages/legacy/src/api/parameters/getContentChildren.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { OneOrMany } from '../../interfaces/index.js'; - -export interface GetContentChildren { - /** The ID of the content to be queried for its children. */ - id: string; - /** - * A multi-value parameter indicating which properties of the children to expand, where: - * - * - `attachment` returns all attachments for the content. - * - `comments` returns all comments for the content. - * - `page` returns all child pages of the content. - * - Custom content types that are provided by apps are also supported. - */ - expand?: OneOrMany<'attachment' | 'comments' | 'page' | string>; - /** The version of the parent content to retrieve children for. Currently, this only works for the latest version. */ - parentVersion?: number; - /** The starting index of the returned content children. */ - start?: number; - /** The maximum number of content children to return per page. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getContentChildrenByType.ts b/packages/legacy/src/api/parameters/getContentChildrenByType.ts deleted file mode 100644 index 01f08466..00000000 --- a/packages/legacy/src/api/parameters/getContentChildrenByType.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface GetContentChildrenByType { - /** The ID of the content to be queried for its children. */ - id: string; - /** The type of children to return. */ - type: string; - /** A multi-value parameter indicating which properties of the content to expand. */ - expand?: string[]; - /** The version of the parent content to retrieve children for. Currently, this only works for the latest version. */ - parentVersion?: number; - /** The starting index of the returned content. */ - start?: number; - /** The maximum number of content to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getContentComments.ts b/packages/legacy/src/api/parameters/getContentComments.ts deleted file mode 100644 index 020992cf..00000000 --- a/packages/legacy/src/api/parameters/getContentComments.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface GetContentComments { - /** The ID of the content to be queried for its comments. */ - id: string; - /** A multi-value parameter indicating which properties of the content to expand. */ - expand?: string[]; - /** The version of the parent content to retrieve children for. Currently, this only works for the latest version. */ - parentVersion?: number; - /** The starting index of the returned comments. */ - start?: number; - /** The maximum number of comments to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; - /** - * The location of the comments in the page. Multiple locations can be specified. If no location is specified, - * comments from all locations are returned. - */ - location?: string[]; - /** Currently, this parameter is not used. Comments are returned at the root level only. */ - depth?: string; -} diff --git a/packages/legacy/src/api/parameters/getContentDescendants.ts b/packages/legacy/src/api/parameters/getContentDescendants.ts deleted file mode 100644 index 6f708ab0..00000000 --- a/packages/legacy/src/api/parameters/getContentDescendants.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface GetContentDescendants { - /** The ID of the content to be queried for its descendants. */ - id: string; - /** - * A multi-value parameter indicating which properties of the children to expand, where: - * - * - `attachment` returns all attachments for the content. - * - `comments` returns all comments for the content. - * - `page` returns all child pages of the content. - */ - expand?: string[]; -} diff --git a/packages/legacy/src/api/parameters/getContentForSpace.ts b/packages/legacy/src/api/parameters/getContentForSpace.ts deleted file mode 100644 index 26cae921..00000000 --- a/packages/legacy/src/api/parameters/getContentForSpace.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface GetContentForSpace { - /** The key of the space to be queried for its content. */ - spaceKey: string; - /** Filter the results to content at the root level of the space or all content. */ - depth?: string; - /** A multi-value parameter indicating which properties of the content to expand. */ - expand?: string[]; - /** The starting index of the returned content. */ - start?: number; - /** The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getContentProperties.ts b/packages/legacy/src/api/parameters/getContentProperties.ts deleted file mode 100644 index 977a4d33..00000000 --- a/packages/legacy/src/api/parameters/getContentProperties.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface GetContentProperties { - /** The ID of the content to be queried for its properties. */ - id: string; - /** The key of the content property. */ - key?: string[]; - /** - * A multi-value parameter indicating which properties of the content to expand. By default, the `version` object is - * expanded. - * - * - `content` returns the content that the property is stored against. - * - `version` returns information about the version of the property, such as the version number, when it was created, - * etc. - */ - expand?: string[]; - /** The starting index of the returned properties. */ - start?: number; - /** The maximum number of properties to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getContentProperty.ts b/packages/legacy/src/api/parameters/getContentProperty.ts deleted file mode 100644 index fae016d2..00000000 --- a/packages/legacy/src/api/parameters/getContentProperty.ts +++ /dev/null @@ -1,27 +0,0 @@ -export interface GetContentProperty { - /** The ID of the content to be queried for the property. */ - id: string; - /** The key of the content property. */ - key: string; - /** - * A multi-value parameter indicating which properties of the content to expand. By default, the `version` object is - * expanded. - * - * - `content` returns the content that the property is stored against. - * - `version` returns information about the version of the property, such as the version number, when it was created, - * etc. - */ - expand?: string[]; - /** - * Filter the results to a set of content based on their status. If set to `any`, content with any status is returned. - * By default it will fetch current and archived statuses `?status=current&status=archived`. All supported statuses - * - * - Any - * - Archived - * - Current - * - Deleted - * - Draft - * - Trashed - */ - status?: string[]; -} diff --git a/packages/legacy/src/api/parameters/getContentRestrictionStatusForUser.ts b/packages/legacy/src/api/parameters/getContentRestrictionStatusForUser.ts deleted file mode 100644 index 7043ad37..00000000 --- a/packages/legacy/src/api/parameters/getContentRestrictionStatusForUser.ts +++ /dev/null @@ -1,21 +0,0 @@ -export interface GetContentRestrictionStatusForUser { - /** The ID of the content that the restriction applies to. */ - id: string; - /** The operation that is restricted. */ - operationKey: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - key?: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - userName?: string; - /** - * The account ID of the user to be queried for whether the content restriction applies to it. The accountId uniquely - * identifies the user across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/getContentState.ts b/packages/legacy/src/api/parameters/getContentState.ts deleted file mode 100644 index f45338b7..00000000 --- a/packages/legacy/src/api/parameters/getContentState.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface GetContentState { - /** The id of the content whose content state is of interest. */ - id?: string; - /** Set status to one of [current,draft,archived]. */ - status?: 'current' | 'draft' | 'archived' | string; -} diff --git a/packages/legacy/src/api/parameters/getContentStateSettings.ts b/packages/legacy/src/api/parameters/getContentStateSettings.ts deleted file mode 100644 index 37fb0723..00000000 --- a/packages/legacy/src/api/parameters/getContentStateSettings.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetContentStateSettings { - /** SpaceKey */ - spaceKey: string; -} diff --git a/packages/legacy/src/api/parameters/getContentTemplate.ts b/packages/legacy/src/api/parameters/getContentTemplate.ts deleted file mode 100644 index 787569e9..00000000 --- a/packages/legacy/src/api/parameters/getContentTemplate.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetContentTemplate { - /** The ID of the content template to be returned. */ - contentTemplateId: string; -} diff --git a/packages/legacy/src/api/parameters/getContentVersion.ts b/packages/legacy/src/api/parameters/getContentVersion.ts deleted file mode 100644 index 1fe1e753..00000000 --- a/packages/legacy/src/api/parameters/getContentVersion.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface GetContentVersion { - /** The ID of the content to be queried for its version. */ - id: string; - /** The number of the version to be retrieved. */ - versionNumber: number; - /** - * A multi-value parameter indicating which properties of the content to expand. By default, the `content` object is - * expanded. - * - * - `collaborators` returns the users that collaborated on the version. - * - `content` returns the content for the version. - */ - expand?: string[]; -} diff --git a/packages/legacy/src/api/parameters/getContentVersions.ts b/packages/legacy/src/api/parameters/getContentVersions.ts deleted file mode 100644 index f1ee4a41..00000000 --- a/packages/legacy/src/api/parameters/getContentVersions.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface GetContentVersions { - /** The ID of the content to be queried for its versions. */ - id: string; - /** The starting index of the returned versions. */ - start?: number; - /** The maximum number of versions to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; - /** - * A multi-value parameter indicating which properties of the content to expand. By default, the `content` object is - * expanded. - * - * - `collaborators` returns the users that collaborated on the version. - * - `content` returns the content for the version. - */ - expand?: string[]; -} diff --git a/packages/legacy/src/api/parameters/getContentWatchStatus.ts b/packages/legacy/src/api/parameters/getContentWatchStatus.ts deleted file mode 100644 index f32174cb..00000000 --- a/packages/legacy/src/api/parameters/getContentWatchStatus.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface GetContentWatchStatus { - /** The ID of the content to be queried for whether the specified user is watching it. */ - contentId: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - key?: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - username?: string; - /** - * The `accountId` of the user to be queried for whether they are watching the content. The accountId uniquely - * identifies the user across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/getCurrentUser.ts b/packages/legacy/src/api/parameters/getCurrentUser.ts deleted file mode 100644 index 2f1da839..00000000 --- a/packages/legacy/src/api/parameters/getCurrentUser.ts +++ /dev/null @@ -1,10 +0,0 @@ -export interface GetCurrentUser { - /** - * A multi-value parameter indicating which properties of the user to expand. - * - * - `operations` returns the operations that the user is allowed to do. - * - PersonalSpace returns the user's personal space, if it exists. - * - `isExternalCollaborator` returns whether the user is an external collaborator user - */ - expand?: string[]; -} diff --git a/packages/legacy/src/api/parameters/getDescendantsOfType.ts b/packages/legacy/src/api/parameters/getDescendantsOfType.ts deleted file mode 100644 index c40b5620..00000000 --- a/packages/legacy/src/api/parameters/getDescendantsOfType.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { OneOrMany } from '../../interfaces/index.js'; - -export interface GetDescendantsOfType { - /** The ID of the content to be queried for its descendants. */ - id: string; - /** The type of descendants to return. */ - type: string | 'page' | 'comment' | 'attachment'; - /** - * Filter the results to descendants upto a desired level of the content. Note, the maximum value supported is 100. - * root level of the content means immediate (level 1) descendants of the type requested. all represents returning all - * descendants of the type requested. - */ - depth?: string; - /** The starting index of the returned content. */ - start?: number; - /** The maximum number of content to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; - expand?: OneOrMany< - | 'childTypes.all' - | 'childTypes.attachment' - | 'childTypes.comment' - | 'childTypes.page' - | 'container' - | 'metadata.currentuser' - | 'metadata.properties' - | 'metadata.labels' - | 'metadata.frontend' - | 'operations' - | 'children.page' - | 'children.attachment' - | 'children.comment' - | 'restrictions.read.restrictions.user' - | 'restrictions.read.restrictions.group' - | 'restrictions.update.restrictions.user' - | 'restrictions.update.restrictions.group' - | 'history' - | 'history.lastUpdated' - | 'history.previousVersion' - | 'history.contributors' - | 'history.nextVersion' - | 'ancestors' - | 'body' - | 'version' - | 'descendants.page' - | 'descendants.attachment' - | 'descendants.comment' - | 'space' - | 'extensions.inlineProperties' - | 'extensions.resolution' - | string - >; -} diff --git a/packages/legacy/src/api/parameters/getGroupByGroupId.ts b/packages/legacy/src/api/parameters/getGroupByGroupId.ts deleted file mode 100644 index 6cb738a6..00000000 --- a/packages/legacy/src/api/parameters/getGroupByGroupId.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetGroupByGroupId { - /** The id of the group. */ - id: string; -} diff --git a/packages/legacy/src/api/parameters/getGroupMembershipsForUser.ts b/packages/legacy/src/api/parameters/getGroupMembershipsForUser.ts deleted file mode 100644 index 1cc1b572..00000000 --- a/packages/legacy/src/api/parameters/getGroupMembershipsForUser.ts +++ /dev/null @@ -1,11 +0,0 @@ -export interface GetGroupMembershipsForUser { - /** - * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, - * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; - /** The starting index of the returned groups. */ - start?: number; - /** The maximum number of groups to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getGroups.ts b/packages/legacy/src/api/parameters/getGroups.ts deleted file mode 100644 index 9c4d8830..00000000 --- a/packages/legacy/src/api/parameters/getGroups.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface GetGroups { - /** The starting index of the returned groups. */ - start?: number; - /** The maximum number of groups to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; - /** The group permission level for which to filter results. */ - accessType?: string; -} diff --git a/packages/legacy/src/api/parameters/getHistoryForContent.ts b/packages/legacy/src/api/parameters/getHistoryForContent.ts deleted file mode 100644 index c774f720..00000000 --- a/packages/legacy/src/api/parameters/getHistoryForContent.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface GetHistoryForContent { - /** The ID of the content to be queried for its history. */ - id: string; - /** - * A multi-value parameter indicating which properties of the content history to expand. Maximum sub-expansions - * allowed is `8`. - * - * - `lastUpdated` returns information about the most recent update of the content, including who updated it and when it - * was updated. - * - `previousVersion` returns information about the update prior to the current content update. For this method, it - * contains the same information as `lastUpdated`. - * - `contributors` returns all of the users who have contributed to the content. - * - `nextVersion` This parameter is not used for this method. - */ - expand?: string[]; -} diff --git a/packages/legacy/src/api/parameters/getIndividualGroupRestrictionStatusByGroupId.ts b/packages/legacy/src/api/parameters/getIndividualGroupRestrictionStatusByGroupId.ts deleted file mode 100644 index 355e0cea..00000000 --- a/packages/legacy/src/api/parameters/getIndividualGroupRestrictionStatusByGroupId.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface GetIndividualGroupRestrictionStatusByGroupId { - /** The ID of the content that the restriction applies to. */ - id: string; - /** The operation that the restriction applies to. */ - operationKey: string; - /** The id of the group to be queried for whether the content restriction applies to it. */ - groupId: string; -} diff --git a/packages/legacy/src/api/parameters/getLabelsForContent.ts b/packages/legacy/src/api/parameters/getLabelsForContent.ts deleted file mode 100644 index 2a9a6aa6..00000000 --- a/packages/legacy/src/api/parameters/getLabelsForContent.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface GetLabelsForContent { - /** The ID of the content to be queried for its labels. */ - id: string; - /** - * Filters the results to labels with the specified prefix. If this parameter is not specified, then labels with any - * prefix will be returned. - * - * - `global` prefix is used by default when a user adds a label via the UI. - * - `my` prefix can be explicitly added by a user when adding a label via the UI, e.g. 'my:example-label'. Also, when a - * page is selected as a favourite, the 'my:favourite' label is automatically added. - * - `team` can used when adding labels via [Add labels to content](#api-content-id-label-post) but is not used in the - * UI. - */ - prefix?: string; - /** The starting index of the returned labels. */ - start?: number; - /** The maximum number of labels to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getLabelsForSpace.ts b/packages/legacy/src/api/parameters/getLabelsForSpace.ts deleted file mode 100644 index 6dc68467..00000000 --- a/packages/legacy/src/api/parameters/getLabelsForSpace.ts +++ /dev/null @@ -1,18 +0,0 @@ -export interface GetLabelsForSpace { - /** The key of the space to get labels for. */ - spaceKey: string; - /** - * Filters the results to labels with the specified prefix. If this parameter is not specified, then labels with any - * prefix will be returned. - * - * - `global` prefix is used by labels that are on content within the provided space. - * - `my` prefix can be explicitly added by a user when adding a label - * via the UI, e.g. 'my:example-label'. - * - `team` prefix is used for labels applied to the space. - */ - prefix?: string; - /** The starting index of the returned labels. */ - start?: number; - /** The maximum number of labels to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getLookAndFeelSettings.ts b/packages/legacy/src/api/parameters/getLookAndFeelSettings.ts deleted file mode 100644 index acb48664..00000000 --- a/packages/legacy/src/api/parameters/getLookAndFeelSettings.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface GetLookAndFeelSettings { - /** - * The key of the space for which the look and feel settings will be returned. If this is not set, only the global - * look and feel settings are returned. - */ - spaceKey?: string; -} diff --git a/packages/legacy/src/api/parameters/getMacroBodyByMacroId.ts b/packages/legacy/src/api/parameters/getMacroBodyByMacroId.ts deleted file mode 100644 index 70f77e66..00000000 --- a/packages/legacy/src/api/parameters/getMacroBodyByMacroId.ts +++ /dev/null @@ -1,12 +0,0 @@ -export interface GetMacroBodyByMacroId { - /** The ID for the content that contains the macro. */ - id: string; - /** The version of the content that contains the macro. */ - version: number; - /** - * The ID of the macro. This is usually passed by the app that the macro is in. Otherwise, find the macro ID by - * querying the desired content and version, then expanding the body in storage format. For example, - * '/content/196611/version/7?expand=content.body.storage'. - */ - macroId: string; -} diff --git a/packages/legacy/src/api/parameters/getPrivacyUnsafeUserEmail.ts b/packages/legacy/src/api/parameters/getPrivacyUnsafeUserEmail.ts deleted file mode 100644 index b32b28d4..00000000 --- a/packages/legacy/src/api/parameters/getPrivacyUnsafeUserEmail.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface GetPrivacyUnsafeUserEmail { - /** - * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, - * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. Required. - */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/getPrivacyUnsafeUserEmailBulk.ts b/packages/legacy/src/api/parameters/getPrivacyUnsafeUserEmailBulk.ts deleted file mode 100644 index fd31f38d..00000000 --- a/packages/legacy/src/api/parameters/getPrivacyUnsafeUserEmailBulk.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetPrivacyUnsafeUserEmailBulk { - /** The account IDs of the users. */ - accountId: string[]; -} diff --git a/packages/legacy/src/api/parameters/getRelationship.ts b/packages/legacy/src/api/parameters/getRelationship.ts deleted file mode 100644 index a246d8aa..00000000 --- a/packages/legacy/src/api/parameters/getRelationship.ts +++ /dev/null @@ -1,61 +0,0 @@ -export interface GetRelationship { - /** - * The name of the relationship. This method supports the 'favourite' (i.e. 'save for later') relationship as well as - * any other relationship types created via [Create - * relationship](#api-relation-relationName-from-sourceType-sourceKey-to-targetType-targetKey-put). - */ - relationName: string; - /** The source entity type of the relationship. This must be 'user', if the `relationName` is 'favourite'. */ - sourceType: string; - /** - * - The identifier for the source entity: - * - * - If `sourceType` is `user`, then specify either `current` (logged-in user), the user key of the user, or the account - * ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See - * the [migration - * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) - * for details. - * - If `sourceType` is 'content', then specify the content ID. - * - If `sourceType` is 'space', then specify the space key. - */ - sourceKey: string; - /** - * The target entity type of the relationship. This must be 'space' or 'content', if the `relationName` is - * 'favourite'. - */ - targetType: string; - /** - * The identifier for the target entity: - * - * - If `targetType` is `user`, then specify either `current` (logged-in user), the user key of the user, or the account - * ID of the user. Note that the user key has been deprecated in favor of the account ID for this parameter. See the - * [migration - * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for - * details. - * - If `targetType` is 'content', then specify the content ID. - * - If `targetType` is 'space', then specify the space key. - */ - targetKey: string; - /** The status of the source. This parameter is only used when the `sourceType` is 'content'. */ - sourceStatus?: string; - /** The status of the target. This parameter is only used when the `targetType` is 'content'. */ - targetStatus?: string; - /** - * The version of the source. This parameter is only used when the `sourceType` is 'content' and the `sourceStatus` is - * 'historical'. - */ - sourceVersion?: number; - /** - * The version of the target. This parameter is only used when the `targetType` is 'content' and the `targetStatus` is - * 'historical'. - */ - targetVersion?: number; - /** - * A multi-value parameter indicating which properties of the response object to expand. - * - * - `relationData` returns information about the relationship, such as who created it and when it was created. - * - `source` returns the source entity. - * - `target` returns the target entity. - */ - expand?: string[]; -} diff --git a/packages/legacy/src/api/parameters/getSpace.ts b/packages/legacy/src/api/parameters/getSpace.ts deleted file mode 100644 index 755a78c0..00000000 --- a/packages/legacy/src/api/parameters/getSpace.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface GetSpace { - /** The key of the space to be returned. */ - spaceKey: string; - /** A multi-value parameter indicating which properties of the content to expand. */ - expand?: string[]; -} diff --git a/packages/legacy/src/api/parameters/getSpaceContentStates.ts b/packages/legacy/src/api/parameters/getSpaceContentStates.ts deleted file mode 100644 index faea9373..00000000 --- a/packages/legacy/src/api/parameters/getSpaceContentStates.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetSpaceContentStates { - /** The key of the space to be queried for its content state settings. */ - spaceKey: string; -} diff --git a/packages/legacy/src/api/parameters/getSpaceProperties.ts b/packages/legacy/src/api/parameters/getSpaceProperties.ts deleted file mode 100644 index a8d2931e..00000000 --- a/packages/legacy/src/api/parameters/getSpaceProperties.ts +++ /dev/null @@ -1,16 +0,0 @@ -export interface GetSpaceProperties { - /** The key of the space to be queried for its properties. */ - spaceKey: string; - /** - * A multi-value parameter indicating which properties of the space property to expand. By default, the `version` - * object is expanded. - * - * - `version` returns information about the version of the content. - * - `space` returns the space that the properties are in. - */ - expand?: string[]; - /** The starting index of the returned objects. */ - start?: number; - /** The maximum number of properties to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getSpaceProperty.ts b/packages/legacy/src/api/parameters/getSpaceProperty.ts deleted file mode 100644 index 9d32fc44..00000000 --- a/packages/legacy/src/api/parameters/getSpaceProperty.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface GetSpaceProperty { - /** The key of the space that the property is in. */ - spaceKey: string; - /** The key of the space property. */ - key: string; - /** - * A multi-value parameter indicating which properties of the space property to expand. By default, the `version` - * object is expanded. - * - * - `version` returns information about the version of the content. - * - `space` returns the space that the properties are in. - */ - expand?: string[]; -} diff --git a/packages/legacy/src/api/parameters/getSpaceSettings.ts b/packages/legacy/src/api/parameters/getSpaceSettings.ts deleted file mode 100644 index 8f839071..00000000 --- a/packages/legacy/src/api/parameters/getSpaceSettings.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetSpaceSettings { - /** The key of the space to be queried for its settings. */ - spaceKey: string; -} diff --git a/packages/legacy/src/api/parameters/getSpaceTheme.ts b/packages/legacy/src/api/parameters/getSpaceTheme.ts deleted file mode 100644 index e8b3b53b..00000000 --- a/packages/legacy/src/api/parameters/getSpaceTheme.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetSpaceTheme { - /** The key of the space to be queried for its theme. */ - spaceKey: string; -} diff --git a/packages/legacy/src/api/parameters/getSpaces.ts b/packages/legacy/src/api/parameters/getSpaces.ts deleted file mode 100644 index 3d4f3f9d..00000000 --- a/packages/legacy/src/api/parameters/getSpaces.ts +++ /dev/null @@ -1,66 +0,0 @@ -export interface GetSpaces { - /** - * The key of the space to be returned. To return multiple spaces, specify this parameter multiple times with - * different values. - */ - spaceKey?: string[]; - /** - * The id of the space to be returned. To return multiple spaces, specify this parameter multiple times with different - * values. - */ - spaceId?: number[]; - /** Filter the results to spaces based on their type. */ - type?: string; - /** Filter the results to spaces based on their status. */ - status?: string; - /** Filter the results to spaces based on their label. */ - label?: string[]; - /** - * Filter the results to the favourite spaces of the user specified by `favouriteUserKey`. Note, 'favourite' spaces - * are also known as 'saved for later' spaces. - */ - favourite?: boolean; - /** - * The userKey of the user, whose favourite spaces are used to filter the results when using the `favourite` - * parameter. - * - * Leave blank for the current user. Use [Get user](#api-user-get) to get the userKey for a user. - */ - favouriteUserKey?: string; - /** A multi-value parameter indicating which properties of the content to expand. */ - expand?: - | 'settings' - | 'metadata' - | 'metadata.labels' - | 'operations' - | 'lookAndFeel' - | 'permissions' - | 'icon' - | 'description' - | 'description.plain' - | 'description.view' - | 'theme' - | 'homepage' - | 'history' - | ( - | 'settings' - | 'metadata' - | 'metadata.labels' - | 'operations' - | 'lookAndFeel' - | 'permissions' - | 'icon' - | 'description' - | 'description.plain' - | 'description.view' - | 'theme' - | 'homepage' - | 'history' - )[] - | string - | string[]; - /** The starting index of the returned spaces. */ - start?: number; - /** The maximum number of spaces to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getTask.ts b/packages/legacy/src/api/parameters/getTask.ts deleted file mode 100644 index 7fa26aea..00000000 --- a/packages/legacy/src/api/parameters/getTask.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetTask { - /** The ID of the task. */ - id: string; -} diff --git a/packages/legacy/src/api/parameters/getTaskById.ts b/packages/legacy/src/api/parameters/getTaskById.ts deleted file mode 100644 index e4434d15..00000000 --- a/packages/legacy/src/api/parameters/getTaskById.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetTaskById { - /** Global ID of the inline task */ - inlineTaskId: string; -} diff --git a/packages/legacy/src/api/parameters/getTasks.ts b/packages/legacy/src/api/parameters/getTasks.ts deleted file mode 100644 index 14b63d07..00000000 --- a/packages/legacy/src/api/parameters/getTasks.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface GetTasks { - /** The key of the tasks. */ - key?: string; - /** The starting index of the returned tasks. */ - start?: number; - /** The maximum number of tasks to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getTheme.ts b/packages/legacy/src/api/parameters/getTheme.ts deleted file mode 100644 index 510a8517..00000000 --- a/packages/legacy/src/api/parameters/getTheme.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface GetTheme { - /** The key of the theme to be returned. */ - themeKey: string; -} diff --git a/packages/legacy/src/api/parameters/getThemes.ts b/packages/legacy/src/api/parameters/getThemes.ts deleted file mode 100644 index fdf2f56d..00000000 --- a/packages/legacy/src/api/parameters/getThemes.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface GetThemes { - /** The starting index of the returned themes. */ - start?: number; - /** The maximum number of themes to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getUser.ts b/packages/legacy/src/api/parameters/getUser.ts deleted file mode 100644 index 0290e35f..00000000 --- a/packages/legacy/src/api/parameters/getUser.ts +++ /dev/null @@ -1,31 +0,0 @@ -export interface GetUser { - /** - * The account ID of the user, which uniquely identifies the user across all Atlassian products. For example, - * `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; - /** - * A multi-value parameter indicating which properties of the user to expand. - * - * - `operations` returns the operations that the user is allowed to do. - * - `details.personal` returns the 'Personal' details in the user's profile, like the 'Email' and 'Phone'. Note that - * these fields have been deprecated due to privacy changes. See the [migration - * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for - * details. - * - `details.business` returns the 'Company' details in the user's profile, like the 'Position' and 'Department'. Note - * that these fields have been deprecated due to privacy changes. See the [migration - * guide](https://developer.atlassian.com/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for - * details. - * - `personalSpace` returns the user's personal space, if it exists. - * - `isExternalCollaborator` returns whether the user is an external collaborator user - */ - expand?: - | 'operations' - | 'details.personal' - | 'details.business' - | 'personalSpace' - | 'isExternalCollaborator' - | ('operations' | 'details.personal' | 'details.business' | 'personalSpace' | 'isExternalCollaborator')[] - | string - | string[]; -} diff --git a/packages/legacy/src/api/parameters/getUserProperty.ts b/packages/legacy/src/api/parameters/getUserProperty.ts deleted file mode 100644 index de07e55d..00000000 --- a/packages/legacy/src/api/parameters/getUserProperty.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface GetUserProperty { - /** The account ID of the user to be queried for its properties. */ - userId: string; - /** The key of the user property. */ - key: string; -} diff --git a/packages/legacy/src/api/parameters/getViewers.ts b/packages/legacy/src/api/parameters/getViewers.ts deleted file mode 100644 index 5be1ce0f..00000000 --- a/packages/legacy/src/api/parameters/getViewers.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface GetViewers { - /** The ID of the content to get the viewers for. */ - contentId: string; - /** The number of views for the content since the date. */ - fromDate?: string; -} diff --git a/packages/legacy/src/api/parameters/getViews.ts b/packages/legacy/src/api/parameters/getViews.ts deleted file mode 100644 index 5048ec64..00000000 --- a/packages/legacy/src/api/parameters/getViews.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface GetViews { - /** The ID of the content to get the views for. */ - contentId: string; - /** The number of views for the content since the date. */ - fromDate?: string; -} diff --git a/packages/legacy/src/api/parameters/getWatchersForSpace.ts b/packages/legacy/src/api/parameters/getWatchersForSpace.ts deleted file mode 100644 index 1ab6f928..00000000 --- a/packages/legacy/src/api/parameters/getWatchersForSpace.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface GetWatchersForSpace { - /** The key of the space to get watchers. */ - spaceKey: string; - /** The start point of the collection to return. */ - start?: string; - /** The limit of the number of items to return, this may be restricted by fixed system limits. */ - limit?: string; -} diff --git a/packages/legacy/src/api/parameters/getWatchesForPage.ts b/packages/legacy/src/api/parameters/getWatchesForPage.ts deleted file mode 100644 index ac9f6a6d..00000000 --- a/packages/legacy/src/api/parameters/getWatchesForPage.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface GetWatchesForPage { - /** The ID of the content to be queried for its watches. */ - id: string; - /** The starting index of the returned watches. */ - start?: number; - /** The maximum number of watches to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/getWatchesForSpace.ts b/packages/legacy/src/api/parameters/getWatchesForSpace.ts deleted file mode 100644 index a16c9181..00000000 --- a/packages/legacy/src/api/parameters/getWatchesForSpace.ts +++ /dev/null @@ -1,8 +0,0 @@ -export interface GetWatchesForSpace { - /** The ID of the content to be queried for its watches. */ - id: string; - /** The starting index of the returned watches. */ - start?: number; - /** The maximum number of watches to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/index.ts b/packages/legacy/src/api/parameters/index.ts deleted file mode 100644 index f8c20b4d..00000000 --- a/packages/legacy/src/api/parameters/index.ts +++ /dev/null @@ -1,319 +0,0 @@ -export * from './addContentWatcher.js'; - -export * from './addCustomContentPermissions.js'; - -export * from './addGroupToContentRestrictionByGroupId.js'; - -export * from './addLabelsToContent.js'; - -export * from './addLabelsToSpace.js'; - -export * from './addLabelWatcher.js'; - -export * from './addPermissionToSpace.js'; - -export * from './addRestrictions.js'; - -export * from './addSpaceWatcher.js'; - -export * from './addUserToContentRestriction.js'; - -export * from './addUserToGroup.js'; - -export * from './addUserToGroupByGroupId.js'; - -export * from './archivePages.js'; - -export * from './asyncConvertContentBodyRequest.js'; - -export * from './asyncConvertContentBodyResponse.js'; - -export * from './bulkAsyncConvertContentBodyRequest.js'; - -export * from './bulkAsyncConvertContentBodyResponse.js'; - -export * from './checkContentPermission.js'; - -export * from './convertContentBody.js'; - -export * from './copyPage.js'; - -export * from './copyPageHierarchy.js'; - -export * from './createAttachments.js'; - -export * from './createAuditRecord.js'; - -export * from './createContent.js'; - -export * from './createContentProperty.js'; - -export * from './createContentPropertyForKey.js'; - -export * from './createContentTemplate.js'; - -export * from './createGroup.js'; - -export * from './createOrUpdateAttachments.js'; - -export * from './createPrivateSpace.js'; - -export * from './createRelationship.js'; - -export * from './createSpace.js'; - -export * from './createSpaceProperty.js'; - -export * from './createSpacePropertyForKey.js'; - -export * from './createUserProperty.js'; - -export * from './deleteContent.js'; - -export * from './deleteContentProperty.js'; - -export * from './deleteContentVersion.js'; - -export * from './deleteGroupById.js'; - -export * from './deleteLabelFromSpace.js'; - -export * from './deletePageTree.js'; - -export * from './deleteRelationship.js'; - -export * from './deleteRestrictions.js'; - -export * from './deleteSpace.js'; - -export * from './deleteSpaceProperty.js'; - -export * from './deleteUserProperty.js'; - -export * from './downloadAttachment.js'; - -export * from './exportAuditRecords.js'; - -export * from './findSourcesForTarget.js'; - -export * from './findTargetFromSource.js'; - -export * from './getAllLabelContent.js'; - -export * from './getAndAsyncConvertMacroBodyByMacroId.js'; - -export * from './getAndConvertMacroBodyByMacroId.js'; - -export * from './getAnonymousUser.js'; - -export * from './getAttachments.js'; - -export * from './getAuditRecords.js'; - -export * from './getAuditRecordsForTimePeriod.js'; - -export * from './getAvailableContentStates.js'; - -export * from './getBlueprintTemplates.js'; - -export * from './getBulkUserLookup.js'; - -export * from './getContent.js'; - -export * from './getContentById.js'; - -export * from './getContentByTypeForSpace.js'; - -export * from './getContentChildren.js'; - -export * from './getContentChildrenByType.js'; - -export * from './getContentComments.js'; - -export * from './getContentDescendants.js'; - -export * from './getContentForSpace.js'; - -export * from './getContentProperties.js'; - -export * from './getContentProperty.js'; - -export * from './getContentRestrictionStatusForUser.js'; - -export * from './getContentState.js'; - -export * from './getContentStateSettings.js'; - -export * from './getContentsWithState.js'; - -export * from './getContentTemplate.js'; - -export * from './getContentTemplates.js'; - -export * from './getContentVersion.js'; - -export * from './getContentVersions.js'; - -export * from './getContentWatchStatus.js'; - -export * from './getCurrentUser.js'; - -export * from './getDescendantsOfType.js'; - -export * from './getGroupByGroupId.js'; - -export * from './getGroupMembersByGroupId.js'; - -export * from './getGroupMembershipsForUser.js'; - -export * from './getGroups.js'; - -export * from './getHistoryForContent.js'; - -export * from './getIndividualGroupRestrictionStatusByGroupId.js'; - -export * from './getLabelsForContent.js'; - -export * from './getLabelsForSpace.js'; - -export * from './getLookAndFeelSettings.js'; - -export * from './getMacroBodyByMacroId.js'; - -export * from './getPrivacyUnsafeUserEmail.js'; - -export * from './getPrivacyUnsafeUserEmailBulk.js'; - -export * from './getRelationship.js'; - -export * from './getRestrictions.js'; - -export * from './getRestrictionsByOperation.js'; - -export * from './getRestrictionsForOperation.js'; - -export * from './getSpace.js'; - -export * from './getSpaceContentStates.js'; - -export * from './getSpaceProperties.js'; - -export * from './getSpaceProperty.js'; - -export * from './getSpaces.js'; - -export * from './getSpaceSettings.js'; - -export * from './getSpaceTheme.js'; - -export * from './getTask.js'; - -export * from './getTaskById.js'; - -export * from './getTasks.js'; - -export * from './getTheme.js'; - -export * from './getThemes.js'; - -export * from './getUser.js'; - -export * from './getUserProperties.js'; - -export * from './getUserProperty.js'; - -export * from './getViewers.js'; - -export * from './getViews.js'; - -export * from './getWatchersForSpace.js'; - -export * from './getWatchesForPage.js'; - -export * from './getWatchesForSpace.js'; - -export * from './isWatchingLabel.js'; - -export * from './isWatchingSpace.js'; - -export * from './movePage.js'; - -export * from './publishLegacyDraft.js'; - -export * from './publishSharedDraft.js'; - -export * from './registerModules.js'; - -export * from './removeContentState.js'; - -export * from './removeContentWatcher.js'; - -export * from './removeGroupById.js'; - -export * from './removeLabelFromContent.js'; - -export * from './removeLabelFromContentUsingQueryParameter.js'; - -export * from './removeLabelWatcher.js'; - -export * from './removeMemberFromGroup.js'; - -export * from './removeMemberFromGroupByGroupId.js'; - -export * from './removeModules.js'; - -export * from './removePermission.js'; - -export * from './removeSpaceWatch.js'; - -export * from './removeTemplate.js'; - -export * from './removeUserFromContentRestriction.js'; - -export * from './resetLookAndFeelSettings.js'; - -export * from './resetSpaceTheme.js'; - -export * from './restoreContentVersion.js'; - -export * from './searchByCQL.js'; - -export * from './searchContentByCQL.js'; - -export * from './searchGroups.js'; - -export * from './searchTasks.js'; - -export * from './searchUser.js'; - -export * from './setContentState.js'; - -export * from './setRetentionPeriod.js'; - -export * from './setSpaceTheme.js'; - -export * from './updateAttachmentData.js'; - -export * from './updateAttachmentProperties.js'; - -export * from './updateContent.js'; - -export * from './updateContentProperty.js'; - -export * from './updateContentTemplate.js'; - -export * from './updateLookAndFeel.js'; - -export * from './updateLookAndFeelSettings.js'; - -export * from './updateRestrictions.js'; - -export * from './updateSpace.js'; - -export * from './updateSpaceProperty.js'; - -export * from './updateSpaceSettings.js'; - -export * from './updateTaskById.js'; - -export * from './updateUserProperty.js'; diff --git a/packages/legacy/src/api/parameters/isWatchingLabel.ts b/packages/legacy/src/api/parameters/isWatchingLabel.ts deleted file mode 100644 index 2899fe4e..00000000 --- a/packages/legacy/src/api/parameters/isWatchingLabel.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface IsWatchingLabel { - /** The name of the label to be queried for whether the specified user is watching it. */ - labelName: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - key?: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - username?: string; - /** - * The `accountId` of the user to be queried for whether they are watching the label. The accountId uniquely - * identifies the user across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/isWatchingSpace.ts b/packages/legacy/src/api/parameters/isWatchingSpace.ts deleted file mode 100644 index 0936a299..00000000 --- a/packages/legacy/src/api/parameters/isWatchingSpace.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface IsWatchingSpace { - /** The key of the space to be queried for whether the specified user is watching it. */ - spaceKey: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - key?: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - username?: string; - /** - * The `accountId` of the user to be queried for whether they are watching the space. The accountId uniquely - * identifies the user across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/publishLegacyDraft.ts b/packages/legacy/src/api/parameters/publishLegacyDraft.ts deleted file mode 100644 index 4e8e4693..00000000 --- a/packages/legacy/src/api/parameters/publishLegacyDraft.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { ContentBlueprintDraft } from '../models/index.js'; - -export interface PublishLegacyDraft extends ContentBlueprintDraft { - /** - * The ID of the draft page that was created from a blueprint. You can find the `draftId` in the Confluence - * application by opening the draft page and checking the page URL. - */ - draftId: string; - /** - * The status of the content to be updated, i.e. the draft. This is set to 'draft' by default, so you shouldn't need - * to specify it. - */ - status?: string; - /** A multi-value parameter indicating which properties of the content to expand. */ - expand?: string[]; - bodyStatus?: string; -} diff --git a/packages/legacy/src/api/parameters/publishSharedDraft.ts b/packages/legacy/src/api/parameters/publishSharedDraft.ts deleted file mode 100644 index f2e665ee..00000000 --- a/packages/legacy/src/api/parameters/publishSharedDraft.ts +++ /dev/null @@ -1,17 +0,0 @@ -import type { ContentBlueprintDraft } from '../models/index.js'; - -export interface PublishSharedDraft extends ContentBlueprintDraft { - /** - * The ID of the draft page that was created from a blueprint. You can find the `draftId` in the Confluence - * application by opening the draft page and checking the page URL. - */ - draftId: string; - /** - * The status of the content to be updated, i.e. the draft. This is set to 'draft' by default, so you shouldn't need - * to specify it. - */ - status?: string; - /** A multi-value parameter indicating which properties of the content to expand. */ - expand?: string[]; - bodyStatus?: string; -} diff --git a/packages/legacy/src/api/parameters/registerModules.ts b/packages/legacy/src/api/parameters/registerModules.ts deleted file mode 100644 index 294142ed..00000000 --- a/packages/legacy/src/api/parameters/registerModules.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { ConnectModules } from '../models/index.js'; - -export type RegisterModules = ConnectModules; diff --git a/packages/legacy/src/api/parameters/removeContentState.ts b/packages/legacy/src/api/parameters/removeContentState.ts deleted file mode 100644 index 002037bf..00000000 --- a/packages/legacy/src/api/parameters/removeContentState.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface RemoveContentState { - /** The Id of the content whose content state is to be set. */ - id?: string; - /** Status of content state from which to delete state. Can be draft or archived */ - status?: string; -} diff --git a/packages/legacy/src/api/parameters/removeContentWatcher.ts b/packages/legacy/src/api/parameters/removeContentWatcher.ts deleted file mode 100644 index 24ca7db9..00000000 --- a/packages/legacy/src/api/parameters/removeContentWatcher.ts +++ /dev/null @@ -1,21 +0,0 @@ -export interface RemoveContentWatcher { - /** Note, you must add header when making a request, as this operation has XSRF protection. */ - 'X-Atlassian-Token': string; - /** The ID of the content to remove the watcher from. */ - contentId: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - key?: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - username?: string; - /** - * The `accountId` of the user to be removed as a watcher. The accountId uniquely identifies the user across all - * Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/removeGroupById.ts b/packages/legacy/src/api/parameters/removeGroupById.ts deleted file mode 100644 index ce40bf0c..00000000 --- a/packages/legacy/src/api/parameters/removeGroupById.ts +++ /dev/null @@ -1,14 +0,0 @@ -export interface RemoveGroupById { - /** The ID of the content that the restriction applies to. */ - id: string; - /** - * The operation that the restriction applies to. - * - * @example - * 'read'; - * 'update'; - */ - operationKey: string; - /** The id of the group to remove from the content restriction. */ - groupId: string; -} diff --git a/packages/legacy/src/api/parameters/removeLabelFromContent.ts b/packages/legacy/src/api/parameters/removeLabelFromContent.ts deleted file mode 100644 index 5749e8ed..00000000 --- a/packages/legacy/src/api/parameters/removeLabelFromContent.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface RemoveLabelFromContent { - /** The ID of the content that the label will be removed from. */ - id: string; - /** The name of the label to be removed. */ - label: string; -} diff --git a/packages/legacy/src/api/parameters/removeLabelFromContentUsingQueryParameter.ts b/packages/legacy/src/api/parameters/removeLabelFromContentUsingQueryParameter.ts deleted file mode 100644 index 96813c5f..00000000 --- a/packages/legacy/src/api/parameters/removeLabelFromContentUsingQueryParameter.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface RemoveLabelFromContentUsingQueryParameter { - /** The ID of the content that the label will be removed from. */ - id: string; - /** The name of the label to be removed. */ - name: string; -} diff --git a/packages/legacy/src/api/parameters/removeLabelWatcher.ts b/packages/legacy/src/api/parameters/removeLabelWatcher.ts deleted file mode 100644 index 47d276e1..00000000 --- a/packages/legacy/src/api/parameters/removeLabelWatcher.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface RemoveLabelWatcher { - /** The name of the label to remove the watcher from. */ - labelName: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - key?: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - username?: string; - /** - * The `accountId` of the user to be removed as a watcher. The accountId uniquely identifies the user across all - * Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/removeMemberFromGroup.ts b/packages/legacy/src/api/parameters/removeMemberFromGroup.ts deleted file mode 100644 index 29eec074..00000000 --- a/packages/legacy/src/api/parameters/removeMemberFromGroup.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface RemoveMemberFromGroup { - /** Name of the group whose membership is updated. */ - name: string; - /** AccountId of the user whose membership is removed. */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/removeMemberFromGroupByGroupId.ts b/packages/legacy/src/api/parameters/removeMemberFromGroupByGroupId.ts deleted file mode 100644 index 12e886ce..00000000 --- a/packages/legacy/src/api/parameters/removeMemberFromGroupByGroupId.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface RemoveMemberFromGroupByGroupId { - /** Id of the group whose membership is updated. */ - groupId: string; - /** AccountId of the user whose membership is removed. */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/removePermission.ts b/packages/legacy/src/api/parameters/removePermission.ts deleted file mode 100644 index e192ad2e..00000000 --- a/packages/legacy/src/api/parameters/removePermission.ts +++ /dev/null @@ -1,6 +0,0 @@ -export interface RemovePermission { - /** The key of the space to be queried for its content. */ - spaceKey: string; - /** Id of the permission to be deleted. */ - id: number; -} diff --git a/packages/legacy/src/api/parameters/removeSpaceWatch.ts b/packages/legacy/src/api/parameters/removeSpaceWatch.ts deleted file mode 100644 index 00d28b29..00000000 --- a/packages/legacy/src/api/parameters/removeSpaceWatch.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface RemoveSpaceWatch { - /** The key of the space to remove the watcher from. */ - spaceKey: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - key?: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - username?: string; - /** - * The `accountId` of the user to be removed as a watcher. The accountId uniquely identifies the user across all - * Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/removeTemplate.ts b/packages/legacy/src/api/parameters/removeTemplate.ts deleted file mode 100644 index 7de87f53..00000000 --- a/packages/legacy/src/api/parameters/removeTemplate.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface RemoveTemplate { - /** The ID of the template to be deleted. */ - contentTemplateId: string; -} diff --git a/packages/legacy/src/api/parameters/removeUserFromContentRestriction.ts b/packages/legacy/src/api/parameters/removeUserFromContentRestriction.ts deleted file mode 100644 index 9f608d86..00000000 --- a/packages/legacy/src/api/parameters/removeUserFromContentRestriction.ts +++ /dev/null @@ -1,21 +0,0 @@ -export interface RemoveUserFromContentRestriction { - /** The ID of the content that the restriction applies to. */ - id: string; - /** The operation that the restriction applies to. */ - operationKey: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - key?: string; - /** - * This parameter is no longer available and will be removed from the documentation soon. Use `accountId` instead. See - * the [deprecation notice](/cloud/confluence/deprecation-notice-user-privacy-api-migration-guide/) for details. - */ - userName?: string; - /** - * The account ID of the user to remove from the content restriction. The accountId uniquely identifies the user - * across all Atlassian products. For example, `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`. - */ - accountId: string; -} diff --git a/packages/legacy/src/api/parameters/resetLookAndFeelSettings.ts b/packages/legacy/src/api/parameters/resetLookAndFeelSettings.ts deleted file mode 100644 index f948420a..00000000 --- a/packages/legacy/src/api/parameters/resetLookAndFeelSettings.ts +++ /dev/null @@ -1,7 +0,0 @@ -export interface ResetLookAndFeelSettings { - /** - * The key of the space for which the look and feel settings will be reset. If this is not set, the global look and - * feel settings will be reset. - */ - spaceKey?: string; -} diff --git a/packages/legacy/src/api/parameters/resetSpaceTheme.ts b/packages/legacy/src/api/parameters/resetSpaceTheme.ts deleted file mode 100644 index 606ae43f..00000000 --- a/packages/legacy/src/api/parameters/resetSpaceTheme.ts +++ /dev/null @@ -1,4 +0,0 @@ -export interface ResetSpaceTheme { - /** The key of the space to reset the theme for. */ - spaceKey: string; -} diff --git a/packages/legacy/src/api/parameters/restoreContentVersion.ts b/packages/legacy/src/api/parameters/restoreContentVersion.ts deleted file mode 100644 index 2408a2ab..00000000 --- a/packages/legacy/src/api/parameters/restoreContentVersion.ts +++ /dev/null @@ -1,14 +0,0 @@ -import type { VersionRestore } from '../models/index.js'; - -export interface RestoreContentVersion extends VersionRestore { - /** The ID of the content for which the history will be restored. */ - id: string; - /** - * A multi-value parameter indicating which properties of the content to expand. By default, the `content` object is - * expanded. - * - * - `collaborators` returns the users that collaborated on the version. - * - `content` returns the content for the version. - */ - expand?: string[]; -} diff --git a/packages/legacy/src/api/parameters/searchContentByCQL.ts b/packages/legacy/src/api/parameters/searchContentByCQL.ts deleted file mode 100644 index 5c224f86..00000000 --- a/packages/legacy/src/api/parameters/searchContentByCQL.ts +++ /dev/null @@ -1,19 +0,0 @@ -export interface SearchContentByCQL { - /** The CQL string that is used to find the requested content. */ - cql: string; - /** - * The space, content, and content status to execute the search against. Specify this as an object with the following - * properties: - * - * - `spaceKey` Key of the space to search against. Optional. - * - `contentId` ID of the content to search against. Optional. Must be in the space spacified by `spaceKey`. - * - `contentStatuses` Content statuses to search against. Optional. - */ - cqlcontext?: string; - /** A multi-value parameter indicating which properties of the content to expand. */ - expand?: string[]; - /** Pointer to a set of search results, returned as part of the `next` or `prev` URL from the previous search call. */ - cursor?: string; - /** The maximum number of content objects to return per page. Note, this may be restricted by fixed system limits. */ - limit?: number; -} diff --git a/packages/legacy/src/api/parameters/searchTasks.ts b/packages/legacy/src/api/parameters/searchTasks.ts deleted file mode 100644 index ffc2da17..00000000 --- a/packages/legacy/src/api/parameters/searchTasks.ts +++ /dev/null @@ -1,30 +0,0 @@ -export interface SearchTasks { - /** The starting offset for the results. */ - start?: number; - /** The number of results to be returned. */ - limit?: number; - /** The space key of a space. Multiple space keys can be specified. */ - spaceKey?: string; - /** The page id of a page. Multiple page ids can be specified. */ - pageId?: string; - /** Account ID of a user to whom a task is assigned. Multiple users can be specified. */ - assignee?: string; - /** Account ID of a user to who created a task. Multiple users can be specified. */ - creator?: string; - /** Account ID of a user who completed a task. Multiple users can be specified. */ - completedUser?: string; - /** Start of date range based on due dates (inclusive). */ - duedateFrom?: number; - /** End of date range based on due dates (inclusive). */ - duedateTo?: number; - /** Start of date range based on create dates (inclusive). */ - createdateFrom?: number; - /** End of date range based on create dates (inclusive). */ - createdateTo?: number; - /** Start of date range based on complete dates (inclusive). */ - completedateFrom?: number; - /** End of date range based on complete dates (inclusive). */ - completedateTo?: number; - /** The status of the task. (checked/unchecked) */ - status?: string; -} diff --git a/packages/legacy/src/api/parameters/setContentState.ts b/packages/legacy/src/api/parameters/setContentState.ts deleted file mode 100644 index c38f86da..00000000 --- a/packages/legacy/src/api/parameters/setContentState.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { ContentStateRestInput } from '../models/index.js'; - -export interface SetContentState extends ContentStateRestInput { - /** The Id of the content whose content state is to be set. */ - id?: string; - /** - * Status of content onto which state will be placed. If draft, then draft state will change. If current, state will - * be placed onto a new version of the content with same body as previous version. - */ - status?: 'current' | 'draft' | string; -} diff --git a/packages/legacy/src/api/parameters/setRetentionPeriod.ts b/packages/legacy/src/api/parameters/setRetentionPeriod.ts deleted file mode 100644 index fb69b41f..00000000 --- a/packages/legacy/src/api/parameters/setRetentionPeriod.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { RetentionPeriod } from '../models/index.js'; - -export interface SetRetentionPeriod extends RetentionPeriod {} diff --git a/packages/legacy/src/api/parameters/setSpaceTheme.ts b/packages/legacy/src/api/parameters/setSpaceTheme.ts deleted file mode 100644 index 00ec228f..00000000 --- a/packages/legacy/src/api/parameters/setSpaceTheme.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { ThemeUpdate } from '../models/index.js'; - -export interface SetSpaceTheme extends ThemeUpdate { - /** The key of the space to set the theme for. */ - spaceKey: string; -} diff --git a/packages/legacy/src/api/parameters/updateAttachmentData.ts b/packages/legacy/src/api/parameters/updateAttachmentData.ts deleted file mode 100644 index 9235465f..00000000 --- a/packages/legacy/src/api/parameters/updateAttachmentData.ts +++ /dev/null @@ -1,12 +0,0 @@ -import type { CreateAttachments } from './createAttachments.js'; -import type { ExtractBaseType } from '../../interfaces/index.js'; - -export interface UpdateAttachmentData { - /** The ID of the content that the attachment is attached to. */ - id: string; - /** The ID of the attachment to update. */ - attachmentId: string; - - /** Attachment data to update. */ - attachment: ExtractBaseType; -} diff --git a/packages/legacy/src/api/parameters/updateAttachmentProperties.ts b/packages/legacy/src/api/parameters/updateAttachmentProperties.ts deleted file mode 100644 index 18527e32..00000000 --- a/packages/legacy/src/api/parameters/updateAttachmentProperties.ts +++ /dev/null @@ -1,58 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -import type { - AttachmentMetadata, - Container, - Content, - ContentChildren, - ContentChildType, - ContentHistory, - GenericLinks, - OperationCheckResult, - Space, - Version, -} from '../models/index.js'; - -export interface UpdateAttachmentProperties { - /** The ID of the content that the attachment is attached to. */ - id: string; - /** The ID of the attachment to update. */ - attachmentId: string; - update: Record & { - id: string; - type: 'page' | 'blogpost' | 'attachment' | 'content' | string; - status: 'current' | 'draft' | string; - title?: string; - space?: Space; - history?: ContentHistory; - version: Partial; - ancestors?: Content[]; - operations?: OperationCheckResult[]; - children?: ContentChildren; - childTypes?: ContentChildType; - descendants?: ContentChildren; - container?: Container; - body?: any; - restrictions?: any; - metadata?: Partial; - macroRenderedOutput?: any; - extensions?: any; - _expandable?: { - childTypes: string; - container: string; - metadata: string; - operations: string; - children: string; - restrictions: string; - history: string; - ancestors: string; - body: string; - version: string; - descendants: string; - space: string; - extensions: string; - schedulePublishDate: string; - macroRenderedOutput: string; - }; - _links?: GenericLinks; - }; -} diff --git a/packages/legacy/src/api/parameters/updateContent.ts b/packages/legacy/src/api/parameters/updateContent.ts deleted file mode 100644 index 8188fd64..00000000 --- a/packages/legacy/src/api/parameters/updateContent.ts +++ /dev/null @@ -1,21 +0,0 @@ -import type { ContentUpdate } from '../models/index.js'; - -export interface UpdateContent extends ContentUpdate { - /** The ID of the content to be updated. */ - id: string; - - /** - * The updated status of the content. Use this parameter to change the status of a piece of content without passing - * the entire request body. - */ - status?: 'current' | 'trashed' | 'historical' | 'draft' | string; - - /** The action that should be taken when conflicts are discovered. Only used when publishing a draft page. */ - conflictPolicy?: string; - - /** - * The updated status of the content. Note, if you change the status of a page from 'current' to 'draft' and it has an - * existing draft, the existing draft will be deleted in favor of the updated page. - */ - statusBody?: 'current' | 'trashed' | 'historical' | 'draft'; -} diff --git a/packages/legacy/src/api/parameters/updateContentProperty.ts b/packages/legacy/src/api/parameters/updateContentProperty.ts deleted file mode 100644 index 28d07755..00000000 --- a/packages/legacy/src/api/parameters/updateContentProperty.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { ContentPropertyUpdate } from '../models/index.js'; - -export interface UpdateContentProperty extends ContentPropertyUpdate { - /** The ID of the content that the property belongs to. */ - id: string; - /** The key of the property. */ - key: string; -} diff --git a/packages/legacy/src/api/parameters/updateContentTemplate.ts b/packages/legacy/src/api/parameters/updateContentTemplate.ts deleted file mode 100644 index aa40f618..00000000 --- a/packages/legacy/src/api/parameters/updateContentTemplate.ts +++ /dev/null @@ -1,4 +0,0 @@ -import type { ContentTemplateUpdate } from '../models/index.js'; - -/** This object is used to update content templates. */ -export interface UpdateContentTemplate extends ContentTemplateUpdate {} diff --git a/packages/legacy/src/api/parameters/updateLookAndFeel.ts b/packages/legacy/src/api/parameters/updateLookAndFeel.ts deleted file mode 100644 index 5d251721..00000000 --- a/packages/legacy/src/api/parameters/updateLookAndFeel.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { LookAndFeelSelection } from '../models/index.js'; - -export interface UpdateLookAndFeel extends LookAndFeelSelection {} diff --git a/packages/legacy/src/api/parameters/updateLookAndFeelSettings.ts b/packages/legacy/src/api/parameters/updateLookAndFeelSettings.ts deleted file mode 100644 index 8a126228..00000000 --- a/packages/legacy/src/api/parameters/updateLookAndFeelSettings.ts +++ /dev/null @@ -1,9 +0,0 @@ -import type { LookAndFeel } from '../models/index.js'; - -export interface UpdateLookAndFeelSettings extends LookAndFeel { - /** - * The key of the space for which the look and feel settings will be updated. If this is not set, the global look and - * feel settings will be updated. - */ - spaceKey?: string; -} diff --git a/packages/legacy/src/api/parameters/updateRestrictions.ts b/packages/legacy/src/api/parameters/updateRestrictions.ts deleted file mode 100644 index eb96a9da..00000000 --- a/packages/legacy/src/api/parameters/updateRestrictions.ts +++ /dev/null @@ -1,15 +0,0 @@ -import type { ContentRestrictionUpdateArray } from '../models/index.js'; - -export interface UpdateRestrictions { - /** The ID of the content to update restrictions for. */ - id: string; - /** - * A multi-value parameter indicating which properties of the content restrictions (returned in response) to expand. - * - * - `restrictions.user` returns the piece of content that the restrictions are applied to. Expanded by default. - * - `restrictions.group` returns the piece of content that the restrictions are applied to. Expanded by default. - * - `content` returns the piece of content that the restrictions are applied to. - */ - expand?: string[]; - body: ContentRestrictionUpdateArray; -} diff --git a/packages/legacy/src/api/parameters/updateSpace.ts b/packages/legacy/src/api/parameters/updateSpace.ts deleted file mode 100644 index 28cebcf5..00000000 --- a/packages/legacy/src/api/parameters/updateSpace.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { SpaceUpdate } from '../models/index.js'; - -export interface UpdateSpace extends SpaceUpdate { - /** The key of the space to update. */ - spaceKey: string; -} diff --git a/packages/legacy/src/api/parameters/updateSpaceProperty.ts b/packages/legacy/src/api/parameters/updateSpaceProperty.ts deleted file mode 100644 index 9b80a0ae..00000000 --- a/packages/legacy/src/api/parameters/updateSpaceProperty.ts +++ /dev/null @@ -1,8 +0,0 @@ -import type { SpacePropertyUpdate } from '../models/index.js'; - -export interface UpdateSpaceProperty extends SpacePropertyUpdate { - /** The key of the space that the property is in. */ - spaceKey: string; - /** The key of the property to be updated. */ - key: string; -} diff --git a/packages/legacy/src/api/parameters/updateSpaceSettings.ts b/packages/legacy/src/api/parameters/updateSpaceSettings.ts deleted file mode 100644 index 92caf0a5..00000000 --- a/packages/legacy/src/api/parameters/updateSpaceSettings.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { SpaceSettingsUpdate } from '../models/index.js'; - -export interface UpdateSpaceSettings extends SpaceSettingsUpdate { - /** The key of the space whose settings will be updated. */ - spaceKey: string; -} diff --git a/packages/legacy/src/api/parameters/updateTaskById.ts b/packages/legacy/src/api/parameters/updateTaskById.ts deleted file mode 100644 index 52613a59..00000000 --- a/packages/legacy/src/api/parameters/updateTaskById.ts +++ /dev/null @@ -1,6 +0,0 @@ -import type { TaskStatusUpdate } from '../models/index.js'; - -export interface UpdateTaskById extends TaskStatusUpdate { - /** Global ID of the inline task to update */ - inlineTaskId: string; -} diff --git a/packages/legacy/src/api/parameters/updateUserProperty.ts b/packages/legacy/src/api/parameters/updateUserProperty.ts deleted file mode 100644 index f8de5d4a..00000000 --- a/packages/legacy/src/api/parameters/updateUserProperty.ts +++ /dev/null @@ -1,11 +0,0 @@ -import type { UserPropertyUpdate } from '../models/index.js'; - -export interface UpdateUserProperty extends UserPropertyUpdate { - /** - * The account ID of the user. The accountId uniquely identifies the user across all Atlassian products. For example, - * 384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192 - */ - userId: string; - /** The key of the user property. */ - key: string; -} diff --git a/packages/legacy/src/api/relation.ts b/packages/legacy/src/api/relation.ts deleted file mode 100644 index 8c7eca35..00000000 --- a/packages/legacy/src/api/relation.ts +++ /dev/null @@ -1,237 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class Relation { - constructor(private client: Client) {} - - /** - * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one - * way. - * - * For example, the following method finds all content that the current user has an 'ignore' relationship with: `GET - * https://your-domain.atlassian.net/api/relation/ignore/from/user/current/to/content` Note, 'ignore' is an example - * custom relationship type. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity - * and source entity. - */ - async findTargetFromSource( - parameters: Parameters.FindTargetFromSource, - callback: Callback, - ): Promise; - /** - * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one - * way. - * - * For example, the following method finds all content that the current user has an 'ignore' relationship with: `GET - * https://your-domain.atlassian.net/api/relation/ignore/from/user/current/to/content` Note, 'ignore' is an example - * custom relationship type. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity - * and source entity. - */ - async findTargetFromSource( - parameters: Parameters.FindTargetFromSource, - callback?: never, - ): Promise; - async findTargetFromSource( - parameters: Parameters.FindTargetFromSource, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}`, - method: 'GET', - params: { - sourceStatus: parameters.sourceStatus, - targetStatus: parameters.targetStatus, - sourceVersion: parameters.sourceVersion, - targetVersion: parameters.targetVersion, - expand: parameters.expand, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Find whether a particular type of relationship exists from a source entity to a target entity. Note, relationships - * are one way. - * - * For example, you can use this method to find whether the current user has selected a particular page as a favorite - * (i.e. 'save for later'): `GET - * https://your-domain.atlassian.net/api/relation/favourite/from/user/current/to/content/123` - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity - * and source entity. - */ - async getRelationship( - parameters: Parameters.GetRelationship, - callback: Callback, - ): Promise; - /** - * Find whether a particular type of relationship exists from a source entity to a target entity. Note, relationships - * are one way. - * - * For example, you can use this method to find whether the current user has selected a particular page as a favorite - * (i.e. 'save for later'): `GET - * https://your-domain.atlassian.net/api/relation/favourite/from/user/current/to/content/123` - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity - * and source entity. - */ - async getRelationship(parameters: Parameters.GetRelationship, callback?: never): Promise; - async getRelationship( - parameters: Parameters.GetRelationship, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`, - method: 'GET', - params: { - sourceStatus: parameters.sourceStatus, - targetStatus: parameters.targetStatus, - sourceVersion: parameters.sourceVersion, - targetVersion: parameters.targetVersion, - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Creates a relationship between two entities (user, space, content). The 'favourite' relationship is supported by - * default, but you can use this method to create any type of relationship between two entities. - * - * For example, the following method creates a 'sibling' relationship between two pieces of content: `GET - * https://your-domain.atlassian.net/api/relation/sibling/from/content/123/to/content/456` - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async createRelationship( - parameters: Parameters.CreateRelationship, - callback: Callback, - ): Promise; - /** - * Creates a relationship between two entities (user, space, content). The 'favourite' relationship is supported by - * default, but you can use this method to create any type of relationship between two entities. - * - * For example, the following method creates a 'sibling' relationship between two pieces of content: `GET - * https://your-domain.atlassian.net/api/relation/sibling/from/content/123/to/content/456` - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async createRelationship( - parameters: Parameters.CreateRelationship, - callback?: never, - ): Promise; - async createRelationship( - parameters: Parameters.CreateRelationship, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`, - method: 'PUT', - params: { - sourceStatus: parameters.sourceStatus, - targetStatus: parameters.targetStatus, - sourceVersion: parameters.sourceVersion, - targetVersion: parameters.targetVersion, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Deletes a relationship between two entities (user, space, content). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). For favourite relationships, the current user can only delete their own favourite - * relationships. A space administrator can delete favourite relationships for any user. - */ - async deleteRelationship(parameters: Parameters.DeleteRelationship, callback: Callback): Promise; - /** - * Deletes a relationship between two entities (user, space, content). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). For favourite relationships, the current user can only delete their own favourite - * relationships. A space administrator can delete favourite relationships for any user. - */ - async deleteRelationship(parameters: Parameters.DeleteRelationship, callback?: never): Promise; - async deleteRelationship( - parameters: Parameters.DeleteRelationship, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`, - method: 'DELETE', - params: { - sourceStatus: parameters.sourceStatus, - targetStatus: parameters.targetStatus, - sourceVersion: parameters.sourceVersion, - targetVersion: parameters.targetVersion, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one - * way. - * - * For example, the following method finds all users that have a 'collaborator' relationship to a piece of content - * with an ID of '1234': `GET https://your-domain.atlassian.net/api/relation/collaborator/to/content/1234/from/user` - * Note, 'collaborator' is an example custom relationship type. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity - * and source entity. - */ - async findSourcesForTarget( - parameters: Parameters.FindSourcesForTarget, - callback: Callback, - ): Promise; - /** - * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one - * way. - * - * For example, the following method finds all users that have a 'collaborator' relationship to a piece of content - * with an ID of '1234': `GET https://your-domain.atlassian.net/api/relation/collaborator/to/content/1234/from/user` - * Note, 'collaborator' is an example custom relationship type. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity - * and source entity. - */ - async findSourcesForTarget( - parameters: Parameters.FindSourcesForTarget, - callback?: never, - ): Promise; - async findSourcesForTarget( - parameters: Parameters.FindSourcesForTarget, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/relation/${parameters.relationName}/to/${parameters.targetType}/${parameters.targetKey}/from/${parameters.sourceType}`, - method: 'GET', - params: { - sourceStatus: parameters.sourceStatus, - targetStatus: parameters.targetStatus, - sourceVersion: parameters.sourceVersion, - targetVersion: parameters.targetVersion, - expand: parameters.expand, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/search.ts b/packages/legacy/src/api/search.ts deleted file mode 100644 index 57feef68..00000000 --- a/packages/legacy/src/api/search.ts +++ /dev/null @@ -1,112 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class Search { - constructor(private client: Client) {} - - /** - * Searches for content using the [Confluence Query Language - * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/) - * - * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The - * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of - * results returned in each call. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the entities. Note, only - * entities that the user has permission to view will be returned. - */ - async searchByCQL( - parameters: Parameters.SearchByCQL, - callback: Callback, - ): Promise; - /** - * Searches for content using the [Confluence Query Language - * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/) - * - * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The - * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of - * results returned in each call. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the entities. Note, only - * entities that the user has permission to view will be returned. - */ - async searchByCQL( - parameters: Parameters.SearchByCQL, - callback?: never, - ): Promise; - async searchByCQL( - parameters: Parameters.SearchByCQL, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/search', - method: 'GET', - params: { - cql: parameters.cql, - cqlcontext: parameters.cqlcontext, - cursor: parameters.cursor, - next: parameters.next, - prev: parameters.prev, - limit: parameters.limit, - start: parameters.start, - includeArchivedSpaces: parameters.includeArchivedSpaces, - excludeCurrentSpaces: parameters.excludeCurrentSpaces, - excerpt: parameters.excerpt, - sitePermissionTypeFilter: parameters.sitePermissionTypeFilter, - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Searches for users using user-specific queries from the [Confluence Query Language - * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/). - * - * Note that CQL input queries submitted through the `/api/search/user` endpoint only support user-specific fields - * like `user`, `user.fullname`, `user.accountid`, and `user.userkey`. - * - * Note that some user fields may be set to null depending on the user's privacy settings. These are: email, - * profilePicture, displayName, and timeZone. - */ - async searchUser( - parameters: Parameters.SearchUser, - callback: Callback, - ): Promise; - /** - * Searches for users using user-specific queries from the [Confluence Query Language - * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/). - * - * Note that CQL input queries submitted through the `/api/search/user` endpoint only support user-specific fields - * like `user`, `user.fullname`, `user.accountid`, and `user.userkey`. - * - * Note that some user fields may be set to null depending on the user's privacy settings. These are: email, - * profilePicture, displayName, and timeZone. - */ - async searchUser( - parameters: Parameters.SearchUser, - callback?: never, - ): Promise; - async searchUser( - parameters: Parameters.SearchUser, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/search/user', - method: 'GET', - params: { - cql: parameters.cql, - start: parameters.start, - limit: parameters.limit, - expand: parameters.expand, - sitePermissionTypeFilter: parameters.sitePermissionTypeFilter, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/settings.ts b/packages/legacy/src/api/settings.ts deleted file mode 100644 index 2da5f4fa..00000000 --- a/packages/legacy/src/api/settings.ts +++ /dev/null @@ -1,200 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class Settings { - constructor(private client: Client) {} - - /** - * Returns the look and feel settings for the site or a single space. This includes attributes such as the color - * scheme, padding, and border radius. - * - * The look and feel settings for a space can be inherited from the global look and feel settings or provided by a - * theme. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None - */ - async getLookAndFeelSettings( - parameters: Parameters.GetLookAndFeelSettings | undefined, - callback: Callback, - ): Promise; - /** - * Returns the look and feel settings for the site or a single space. This includes attributes such as the color - * scheme, padding, and border radius. - * - * The look and feel settings for a space can be inherited from the global look and feel settings or provided by a - * theme. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None - */ - async getLookAndFeelSettings( - parameters?: Parameters.GetLookAndFeelSettings, - callback?: never, - ): Promise; - async getLookAndFeelSettings( - parameters?: Parameters.GetLookAndFeelSettings, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/settings/lookandfeel', - method: 'GET', - params: { - spaceKey: parameters?.spaceKey, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Sets the look and feel settings to the default (global) settings, the custom settings, or the current theme's - * settings for a space. The custom and theme settings can only be selected if there is already a theme set for a - * space. Note, the default space settings are inherited from the current global settings. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async updateLookAndFeel( - parameters: Parameters.UpdateLookAndFeel | undefined, - callback: Callback, - ): Promise; - /** - * Sets the look and feel settings to the default (global) settings, the custom settings, or the current theme's - * settings for a space. The custom and theme settings can only be selected if there is already a theme set for a - * space. Note, the default space settings are inherited from the current global settings. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async updateLookAndFeel( - parameters?: Parameters.UpdateLookAndFeel, - callback?: never, - ): Promise; - async updateLookAndFeel( - parameters?: Parameters.UpdateLookAndFeel, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/settings/lookandfeel', - method: 'PUT', - data: { - spaceKey: parameters?.spaceKey, - lookAndFeelType: parameters?.lookAndFeelType, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Updates the look and feel settings for the site or for a single space. If custom settings exist, they are updated. - * If no custom settings exist, then a set of custom settings is created. - * - * Note, if a theme is selected for a space, the space look and feel settings are provided by the theme and cannot be - * overridden. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async updateLookAndFeelSettings( - parameters: Parameters.UpdateLookAndFeelSettings | undefined, - callback: Callback, - ): Promise; - /** - * Updates the look and feel settings for the site or for a single space. If custom settings exist, they are updated. - * If no custom settings exist, then a set of custom settings is created. - * - * Note, if a theme is selected for a space, the space look and feel settings are provided by the theme and cannot be - * overridden. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async updateLookAndFeelSettings( - parameters?: Parameters.UpdateLookAndFeelSettings, - callback?: never, - ): Promise; - async updateLookAndFeelSettings( - parameters?: Parameters.UpdateLookAndFeelSettings, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/settings/lookandfeel/custom', - method: 'POST', - params: { - spaceKey: parameters?.spaceKey, - }, - data: { - headings: parameters?.headings, - links: parameters?.links, - menus: parameters?.menus, - header: parameters?.header, - horizontalHeader: parameters?.horizontalHeader, - content: parameters?.content, - bordersAndDividers: parameters?.bordersAndDividers, - spaceReference: parameters?.spaceReference, - _links: parameters?.links, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Resets the custom look and feel settings for the site or a single space. This changes the values of the custom - * settings to be the same as the default settings. It does not change which settings (default or custom) are - * selected. Note, the default space settings are inherited from the current global settings. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async resetLookAndFeelSettings( - parameters: Parameters.ResetLookAndFeelSettings | undefined, - callback: Callback, - ): Promise; - /** - * Resets the custom look and feel settings for the site or a single space. This changes the values of the custom - * settings to be the same as the default settings. It does not change which settings (default or custom) are - * selected. Note, the default space settings are inherited from the current global settings. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async resetLookAndFeelSettings( - parameters?: Parameters.ResetLookAndFeelSettings, - callback?: never, - ): Promise; - async resetLookAndFeelSettings( - parameters?: Parameters.ResetLookAndFeelSettings, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/settings/lookandfeel/custom', - method: 'DELETE', - params: { - spaceKey: parameters?.spaceKey, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the system information for the Confluence Cloud tenant. This information is used by Atlassian. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getSystemInfo(callback: Callback): Promise; - /** - * Returns the system information for the Confluence Cloud tenant. This information is used by Atlassian. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getSystemInfo(callback?: never): Promise; - async getSystemInfo(callback?: Callback): Promise { - const config: RequestConfig = { - url: '/api/settings/systemInfo', - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/space.ts b/packages/legacy/src/api/space.ts deleted file mode 100644 index 01096bd3..00000000 --- a/packages/legacy/src/api/space.ts +++ /dev/null @@ -1,301 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import { paramSerializer } from '../paramSerializer.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class Space { - constructor(private client: Client) {} - - /** - * Returns all spaces. The returned spaces are ordered alphabetically in ascending order by space key. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). Note, the returned list will only contain spaces that the current user has - * permission to view. - * - * @deprecated Will be removed in next major version. - */ - async getSpaces( - parameters: Parameters.GetSpaces | undefined, - callback: Callback, - ): Promise; - /** - * Returns all spaces. The returned spaces are ordered alphabetically in ascending order by space key. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). Note, the returned list will only contain spaces that the current user has - * permission to view. - * - * @deprecated Will be removed in next major version. - */ - async getSpaces(parameters?: Parameters.GetSpaces, callback?: never): Promise; - async getSpaces(parameters?: Parameters.GetSpaces, callback?: Callback): Promise { - const config: RequestConfig = { - url: '/api/space', - method: 'GET', - params: { - spaceKey: paramSerializer('spaceKey', parameters?.spaceKey), - spaceId: parameters?.spaceId, - type: parameters?.type, - status: parameters?.status, - label: parameters?.label, - favourite: parameters?.favourite, - favouriteUserKey: parameters?.favouriteUserKey, - start: parameters?.start, - limit: parameters?.limit, - expand: parameters?.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Creates a new space. Note, currently you cannot set space labels when creating a space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission. - */ - async createSpace( - parameters: Parameters.CreateSpace | undefined, - callback: Callback, - ): Promise; - /** - * Creates a new space. Note, currently you cannot set space labels when creating a space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission. - */ - async createSpace(parameters?: Parameters.CreateSpace, callback?: never): Promise; - async createSpace(parameters?: Parameters.CreateSpace, callback?: Callback): Promise { - const config: RequestConfig = { - url: '/api/space', - method: 'POST', - data: { - name: parameters?.name, - key: parameters?.key, - alias: parameters?.alias, - description: parameters?.description, - permissions: parameters?.permissions, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Creates a new space that is only visible to the creator. This method is the same as the [Create - * space](#api-space-post) method with permissions set to the current user only. Note, currently you cannot set space - * labels when creating a space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission. - */ - async createPrivateSpace( - parameters: Parameters.CreatePrivateSpace | undefined, - callback: Callback, - ): Promise; - /** - * Creates a new space that is only visible to the creator. This method is the same as the [Create - * space](#api-space-post) method with permissions set to the current user only. Note, currently you cannot set space - * labels when creating a space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission. - */ - async createPrivateSpace(parameters?: Parameters.CreatePrivateSpace, callback?: never): Promise; - async createPrivateSpace( - parameters?: Parameters.CreatePrivateSpace, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/space/_private', - method: 'POST', - data: { - name: parameters?.name, - key: parameters?.key, - alias: parameters?.alias, - description: parameters?.description, - permissions: parameters?.permissions, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns a space. This includes information like the name, description, and permissions, but not the content in the - * space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async getSpace(parameters: Parameters.GetSpace, callback: Callback): Promise; - /** - * Returns a space. This includes information like the name, description, and permissions, but not the content in the - * space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async getSpace(parameters: Parameters.GetSpace, callback?: never): Promise; - async getSpace(parameters: Parameters.GetSpace, callback?: Callback): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}`, - method: 'GET', - params: { - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Updates the name, description, or homepage of a space. - * - * - For security reasons, permissions cannot be updated via the API and must be changed via the user interface instead. - * - Currently you cannot set space labels when updating a space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async updateSpace(parameters: Parameters.UpdateSpace, callback: Callback): Promise; - /** - * Updates the name, description, or homepage of a space. - * - * - For security reasons, permissions cannot be updated via the API and must be changed via the user interface instead. - * - Currently you cannot set space labels when updating a space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async updateSpace(parameters: Parameters.UpdateSpace, callback?: never): Promise; - async updateSpace(parameters: Parameters.UpdateSpace, callback?: Callback): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}`, - method: 'PUT', - data: { - name: parameters.name, - description: parameters.description, - homepage: parameters.homepage, - type: parameters.type, - status: parameters.status, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Permanently deletes a space without sending it to the trash. Note, the space will be deleted in a long running - * task. Therefore, the space may not be deleted yet when this method has returned. Clients should poll the status - * link that is returned in the response until the task completes. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async deleteSpace(parameters: Parameters.DeleteSpace, callback: Callback): Promise; - /** - * Permanently deletes a space without sending it to the trash. Note, the space will be deleted in a long running - * task. Therefore, the space may not be deleted yet when this method has returned. Clients should poll the status - * link that is returned in the response until the task completes. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async deleteSpace(parameters: Parameters.DeleteSpace, callback?: never): Promise; - async deleteSpace( - parameters: Parameters.DeleteSpace, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}`, - method: 'DELETE', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns all content in a space. The returned content is grouped by type (pages then blogposts), then ordered by - * content ID in ascending order. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the - * returned list will only contain content that the current user has permission to view. - * - * @deprecated Will be removed in next major version. - */ - async getContentForSpace( - parameters: Parameters.GetContentForSpace, - callback: Callback, - ): Promise; - /** - * Returns all content in a space. The returned content is grouped by type (pages then blogposts), then ordered by - * content ID in ascending order. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the - * returned list will only contain content that the current user has permission to view. - * - * @deprecated Will be removed in next major version. - */ - async getContentForSpace( - parameters: Parameters.GetContentForSpace, - callback?: never, - ): Promise; - async getContentForSpace( - parameters: Parameters.GetContentForSpace, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/content`, - method: 'GET', - params: { - depth: parameters.depth, - expand: parameters.expand, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns all content of a given type, in a space. The returned content is ordered by content ID in ascending order. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the - * returned list will only contain content that the current user has permission to view. - * - * @deprecated Will be removed in next major version. - */ - async getContentByTypeForSpace( - parameters: Parameters.GetContentByTypeForSpace, - callback: Callback, - ): Promise; - /** - * Returns all content of a given type, in a space. The returned content is ordered by content ID in ascending order. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. Note, the - * returned list will only contain content that the current user has permission to view. - * - * @deprecated Will be removed in next major version. - */ - async getContentByTypeForSpace( - parameters: Parameters.GetContentByTypeForSpace, - callback?: never, - ): Promise; - async getContentByTypeForSpace( - parameters: Parameters.GetContentByTypeForSpace, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/content/${parameters.type}`, - method: 'GET', - params: { - depth: parameters.depth, - expand: parameters.expand, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/spacePermissions.ts b/packages/legacy/src/api/spacePermissions.ts deleted file mode 100644 index 06dfb8a5..00000000 --- a/packages/legacy/src/api/spacePermissions.ts +++ /dev/null @@ -1,121 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class SpacePermissions { - constructor(private client: Client) {} - - /** - * Adds new permission to space. - * - * If the permission to be added is a group permission, the group can be identified by its group name or group id. - * - * Note: Apps cannot access this REST resource - including when utilizing user impersonation. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async addPermissionToSpace( - parameters: Parameters.AddPermissionToSpace, - callback: Callback, - ): Promise; - /** - * Adds new permission to space. - * - * If the permission to be added is a group permission, the group can be identified by its group name or group id. - * - * Note: Apps cannot access this REST resource - including when utilizing user impersonation. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async addPermissionToSpace( - parameters: Parameters.AddPermissionToSpace, - callback?: never, - ): Promise; - async addPermissionToSpace( - parameters: Parameters.AddPermissionToSpace, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/permission`, - method: 'POST', - data: { - subject: parameters.subject, - operation: parameters.operation, - _links: parameters.links, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Adds new custom content permission to space. - * - * If the permission to be added is a group permission, the group can be identified by its group name or group id. - * - * Note: Only apps can access this REST resource and only make changes to the respective app permissions. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async addCustomContentPermissions( - parameters: Parameters.AddCustomContentPermissions, - callback: Callback, - ): Promise; - /** - * Adds new custom content permission to space. - * - * If the permission to be added is a group permission, the group can be identified by its group name or group id. - * - * Note: Only apps can access this REST resource and only make changes to the respective app permissions. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async addCustomContentPermissions( - parameters: Parameters.AddCustomContentPermissions, - callback?: never, - ): Promise; - async addCustomContentPermissions( - parameters: Parameters.AddCustomContentPermissions, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/permission/custom-content`, - method: 'POST', - data: { - subject: parameters.subject, - operations: parameters.operations, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Removes a space permission. Note that removing Read Space permission for a user or group will remove all the space - * permissions for that user or group. - * - * Note: Apps cannot access this REST resource - including when utilizing user impersonation. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async removePermission(parameters: Parameters.RemovePermission, callback: Callback): Promise; - /** - * Removes a space permission. Note that removing Read Space permission for a user or group will remove all the space - * permissions for that user or group. - * - * Note: Apps cannot access this REST resource - including when utilizing user impersonation. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async removePermission(parameters: Parameters.RemovePermission, callback?: never): Promise; - async removePermission(parameters: Parameters.RemovePermission, callback?: Callback): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/permission/${parameters.id}`, - method: 'DELETE', - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/spaceProperties.ts b/packages/legacy/src/api/spaceProperties.ts deleted file mode 100644 index 0d461b3f..00000000 --- a/packages/legacy/src/api/spaceProperties.ts +++ /dev/null @@ -1,230 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Callback } from '../callback.js'; -import type { Client } from '../clients/index.js'; -import type { RequestConfig } from '../requestConfig.js'; - -/** @deprecated Will be removed in next major version. */ -export class SpaceProperties { - constructor(private client: Client) {} - - /** - * Returns all properties for the given space. Space properties are a key-value storage associated with a space. - * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async getSpaceProperties( - parameters: Parameters.GetSpaceProperties, - callback: Callback, - ): Promise; - /** - * Returns all properties for the given space. Space properties are a key-value storage associated with a space. - * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async getSpaceProperties( - parameters: Parameters.GetSpaceProperties, - callback?: never, - ): Promise; - async getSpaceProperties( - parameters: Parameters.GetSpaceProperties, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/property`, - method: 'GET', - params: { - expand: parameters.expand, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Creates a new space property. - * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async createSpaceProperty( - parameters: Parameters.CreateSpaceProperty, - callback: Callback, - ): Promise; - /** - * Creates a new space property. - * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async createSpaceProperty( - parameters: Parameters.CreateSpaceProperty, - callback?: never, - ): Promise; - async createSpaceProperty( - parameters: Parameters.CreateSpaceProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/property`, - method: 'POST', - data: { - key: parameters.key, - value: parameters.value, - space: parameters.space, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns a space property. - * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async getSpaceProperty( - parameters: Parameters.GetSpaceProperty, - callback: Callback, - ): Promise; - /** - * Returns a space property. - * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async getSpaceProperty( - parameters: Parameters.GetSpaceProperty, - callback?: never, - ): Promise; - async getSpaceProperty( - parameters: Parameters.GetSpaceProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`, - method: 'GET', - params: { - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Creates a new space property. This is the same as `POST /api/space/{spaceKey}/property` but the key for the - * property is passed as a path parameter, rather than in the request body. - * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async createSpacePropertyForKey( - parameters: Parameters.CreateSpacePropertyForKey, - callback: Callback, - ): Promise; - /** - * Creates a new space property. This is the same as `POST /api/space/{spaceKey}/property` but the key for the - * property is passed as a path parameter, rather than in the request body. - * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async createSpacePropertyForKey( - parameters: Parameters.CreateSpacePropertyForKey, - callback?: never, - ): Promise; - async createSpacePropertyForKey( - parameters: Parameters.CreateSpacePropertyForKey, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`, - method: 'POST', - data: { - value: parameters.value, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Updates a space property. Note, you cannot update the key of a space property, only the value. - * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async updateSpaceProperty( - parameters: Parameters.UpdateSpaceProperty, - callback: Callback, - ): Promise; - /** - * Updates a space property. Note, you cannot update the key of a space property, only the value. - * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async updateSpaceProperty( - parameters: Parameters.UpdateSpaceProperty, - callback?: never, - ): Promise; - async updateSpaceProperty( - parameters: Parameters.UpdateSpaceProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`, - method: 'PUT', - data: { - value: parameters.value, - version: parameters.version, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Deletes a space property. - * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async deleteSpaceProperty(parameters: Parameters.DeleteSpaceProperty, callback: Callback): Promise; - /** - * Deletes a space property. - * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space. - * - * @deprecated Will be removed in next major version. - */ - async deleteSpaceProperty(parameters: Parameters.DeleteSpaceProperty, callback?: never): Promise; - async deleteSpaceProperty( - parameters: Parameters.DeleteSpaceProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`, - method: 'DELETE', - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/spaceSettings.ts b/packages/legacy/src/api/spaceSettings.ts deleted file mode 100644 index e5ede67f..00000000 --- a/packages/legacy/src/api/spaceSettings.ts +++ /dev/null @@ -1,72 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class SpaceSettings { - constructor(private client: Client) {} - - /** - * Returns the settings of a space. Currently only the `routeOverrideEnabled` setting can be returned. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. - */ - async getSpaceSettings( - parameters: Parameters.GetSpaceSettings, - callback: Callback, - ): Promise; - /** - * Returns the settings of a space. Currently only the `routeOverrideEnabled` setting can be returned. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. - */ - async getSpaceSettings( - parameters: Parameters.GetSpaceSettings, - callback?: never, - ): Promise; - async getSpaceSettings( - parameters: Parameters.GetSpaceSettings, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/settings`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Updates the settings for a space. Currently only the `routeOverrideEnabled` setting can be updated. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async updateSpaceSettings( - parameters: Parameters.UpdateSpaceSettings, - callback: Callback, - ): Promise; - /** - * Updates the settings for a space. Currently only the `routeOverrideEnabled` setting can be updated. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async updateSpaceSettings( - parameters: Parameters.UpdateSpaceSettings, - callback?: never, - ): Promise; - async updateSpaceSettings( - parameters: Parameters.UpdateSpaceSettings, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/settings`, - method: 'PUT', - data: { - routeOverrideEnabled: parameters.routeOverrideEnabled, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/template.ts b/packages/legacy/src/api/template.ts deleted file mode 100644 index 47d755cc..00000000 --- a/packages/legacy/src/api/template.ts +++ /dev/null @@ -1,255 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class Template { - constructor(private client: Client) {} - - /** - * Creates a new content template. Note, blueprint templates cannot be created via the REST API. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to create a - * space template or 'Confluence Administrator' global permission to create a global template. - */ - async createContentTemplate( - parameters: Parameters.CreateContentTemplate | undefined, - callback: Callback, - ): Promise; - /** - * Creates a new content template. Note, blueprint templates cannot be created via the REST API. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to create a - * space template or 'Confluence Administrator' global permission to create a global template. - */ - async createContentTemplate( - parameters?: Parameters.CreateContentTemplate, - callback?: never, - ): Promise; - async createContentTemplate( - parameters?: Parameters.CreateContentTemplate, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/template', - method: 'POST', - data: { - name: parameters?.name, - templateType: parameters?.templateType, - body: parameters?.body, - description: parameters?.description, - labels: parameters?.labels, - space: parameters?.space, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Updates a content template. Note, blueprint templates cannot be updated via the REST API. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to update a - * space template or 'Confluence Administrator' global permission to update a global template. - */ - async updateContentTemplate( - parameters: Parameters.UpdateContentTemplate | undefined, - callback: Callback, - ): Promise; - /** - * Updates a content template. Note, blueprint templates cannot be updated via the REST API. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to update a - * space template or 'Confluence Administrator' global permission to update a global template. - */ - async updateContentTemplate( - parameters?: Parameters.UpdateContentTemplate, - callback?: never, - ): Promise; - async updateContentTemplate( - parameters?: Parameters.UpdateContentTemplate, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/template', - method: 'PUT', - data: { - templateId: parameters?.templateId, - name: parameters?.name, - templateType: parameters?.templateType, - body: parameters?.body, - description: parameters?.description, - labels: parameters?.labels, - space: parameters?.space, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns all templates provided by blueprints. Use this method to retrieve all global blueprint templates or all - * blueprint templates in a space. - * - * Note, all global blueprints are inherited by each space. Space blueprints can be customised without affecting the - * global blueprints. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view - * blueprints for the space and permission to access the Confluence site ('Can use' global permission) to view global - * blueprints. - */ - async getBlueprintTemplates( - parameters: Parameters.GetBlueprintTemplates | undefined, - callback: Callback, - ): Promise; - /** - * Returns all templates provided by blueprints. Use this method to retrieve all global blueprint templates or all - * blueprint templates in a space. - * - * Note, all global blueprints are inherited by each space. Space blueprints can be customised without affecting the - * global blueprints. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view - * blueprints for the space and permission to access the Confluence site ('Can use' global permission) to view global - * blueprints. - */ - async getBlueprintTemplates( - parameters?: Parameters.GetBlueprintTemplates, - callback?: never, - ): Promise; - async getBlueprintTemplates( - parameters?: Parameters.GetBlueprintTemplates, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/template/blueprint', - method: 'GET', - params: { - spaceKey: parameters?.spaceKey, - start: parameters?.start, - limit: parameters?.limit, - expand: parameters?.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns all content templates. Use this method to retrieve all global content templates or all content templates in - * a space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view - * space templates and permission to access the Confluence site ('Can use' global permission) to view global - * templates. - */ - async getContentTemplates( - parameters: Parameters.GetContentTemplates | undefined, - callback: Callback, - ): Promise; - /** - * Returns all content templates. Use this method to retrieve all global content templates or all content templates in - * a space. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view - * space templates and permission to access the Confluence site ('Can use' global permission) to view global - * templates. - */ - async getContentTemplates( - parameters?: Parameters.GetContentTemplates, - callback?: never, - ): Promise; - async getContentTemplates( - parameters?: Parameters.GetContentTemplates, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/template/page', - method: 'GET', - params: { - spaceKey: parameters?.spaceKey, - start: parameters?.start, - limit: parameters?.limit, - expand: parameters?.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns a content template. This includes information about template, like the name, the space or blueprint that - * the template is in, the body of the template, and more. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view - * space templates and permission to access the Confluence site ('Can use' global permission) to view global - * templates. - */ - async getContentTemplate( - parameters: Parameters.GetContentTemplate, - callback: Callback, - ): Promise; - /** - * Returns a content template. This includes information about template, like the name, the space or blueprint that - * the template is in, the body of the template, and more. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view - * space templates and permission to access the Confluence site ('Can use' global permission) to view global - * templates. - */ - async getContentTemplate( - parameters: Parameters.GetContentTemplate, - callback?: never, - ): Promise; - async getContentTemplate( - parameters: Parameters.GetContentTemplate, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/template/${parameters.contentTemplateId}`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Deletes a template. This results in different actions depending on the type of template: - * - * - If the template is a content template, it is deleted. - * - If the template is a modified space-level blueprint template, it reverts to the template inherited from the - * global-level blueprint template. - * - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint - * template. - * - * Note, unmodified blueprint templates cannot be deleted. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to delete a - * space template or 'Confluence Administrator' global permission to delete a global template. - */ - async removeTemplate(parameters: Parameters.RemoveTemplate, callback: Callback): Promise; - /** - * Deletes a template. This results in different actions depending on the type of template: - * - * - If the template is a content template, it is deleted. - * - If the template is a modified space-level blueprint template, it reverts to the template inherited from the - * global-level blueprint template. - * - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint - * template. - * - * Note, unmodified blueprint templates cannot be deleted. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to delete a - * space template or 'Confluence Administrator' global permission to delete a global template. - */ - async removeTemplate(parameters: Parameters.RemoveTemplate, callback?: never): Promise; - async removeTemplate(parameters: Parameters.RemoveTemplate, callback?: Callback): Promise { - const config: RequestConfig = { - url: `/api/template/${parameters.contentTemplateId}`, - method: 'DELETE', - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/themes.ts b/packages/legacy/src/api/themes.ts deleted file mode 100644 index 0b985d9c..00000000 --- a/packages/legacy/src/api/themes.ts +++ /dev/null @@ -1,155 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class Themes { - constructor(private client: Client) {} - - /** - * Returns all themes, not including the default theme. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None - */ - async getThemes( - parameters: Parameters.GetThemes | undefined, - callback: Callback, - ): Promise; - /** - * Returns all themes, not including the default theme. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None - */ - async getThemes(parameters?: Parameters.GetThemes, callback?: never): Promise; - async getThemes(parameters?: Parameters.GetThemes, callback?: Callback): Promise { - const config: RequestConfig = { - url: '/api/settings/theme', - method: 'GET', - params: { - start: parameters?.start, - limit: parameters?.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the globally assigned theme. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None - */ - async getGlobalTheme(callback: Callback): Promise; - /** - * Returns the globally assigned theme. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None - */ - async getGlobalTheme(callback?: never): Promise; - async getGlobalTheme(callback?: Callback): Promise { - const config: RequestConfig = { - url: '/api/settings/theme/selected', - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns a theme. This includes information about the theme name, description, and icon. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None - */ - async getTheme(parameters: Parameters.GetTheme, callback: Callback): Promise; - /** - * Returns a theme. This includes information about the theme name, description, and icon. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None - */ - async getTheme(parameters: Parameters.GetTheme, callback?: never): Promise; - async getTheme(parameters: Parameters.GetTheme, callback?: Callback): Promise { - const config: RequestConfig = { - url: `/api/settings/theme/${parameters.themeKey}`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the theme selected for a space, if one is set. If no space theme is set, this means that the space is - * inheriting the global look and feel settings. - * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. - */ - async getSpaceTheme(parameters: Parameters.GetSpaceTheme, callback: Callback): Promise; - /** - * Returns the theme selected for a space, if one is set. If no space theme is set, this means that the space is - * inheriting the global look and feel settings. - * - * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. - */ - async getSpaceTheme(parameters: Parameters.GetSpaceTheme, callback?: never): Promise; - async getSpaceTheme( - parameters: Parameters.GetSpaceTheme, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/theme`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Sets the theme for a space. Note, if you want to reset the space theme to the default Confluence theme, use the - * 'Reset space theme' method instead of this method. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async setSpaceTheme(parameters: Parameters.SetSpaceTheme, callback: Callback): Promise; - /** - * Sets the theme for a space. Note, if you want to reset the space theme to the default Confluence theme, use the - * 'Reset space theme' method instead of this method. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async setSpaceTheme(parameters: Parameters.SetSpaceTheme, callback?: never): Promise; - async setSpaceTheme( - parameters: Parameters.SetSpaceTheme, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/theme`, - method: 'PUT', - data: { - themeKey: parameters.themeKey, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Resets the space theme. This means that the space will inherit the global look and feel settings - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async resetSpaceTheme(parameters: Parameters.ResetSpaceTheme, callback: Callback): Promise; - /** - * Resets the space theme. This means that the space will inherit the global look and feel settings - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. - */ - async resetSpaceTheme(parameters: Parameters.ResetSpaceTheme, callback?: never): Promise; - async resetSpaceTheme(parameters: Parameters.ResetSpaceTheme, callback?: Callback): Promise { - const config: RequestConfig = { - url: `/api/space/${parameters.spaceKey}/theme`, - method: 'DELETE', - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/userProperties.ts b/packages/legacy/src/api/userProperties.ts deleted file mode 100644 index b22e33d2..00000000 --- a/packages/legacy/src/api/userProperties.ts +++ /dev/null @@ -1,185 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class UserProperties { - constructor(private client: Client) {} - - /** - * Returns the properties for a user as list of property keys. For more information about user properties, see - * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * `Note`, these properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getUserProperties( - parameters: Parameters.GetUserProperties, - callback: Callback, - ): Promise; - /** - * Returns the properties for a user as list of property keys. For more information about user properties, see - * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). - * `Note`, these properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getUserProperties( - parameters: Parameters.GetUserProperties, - callback?: never, - ): Promise; - async getUserProperties( - parameters: Parameters.GetUserProperties, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/${parameters.userId}/property`, - method: 'GET', - params: { - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the property corresponding to `key` for a user. For more information about user properties, see [Confluence - * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these - * properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getUserProperty( - parameters: Parameters.GetUserProperty, - callback: Callback, - ): Promise; - /** - * Returns the property corresponding to `key` for a user. For more information about user properties, see [Confluence - * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these - * properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getUserProperty(parameters: Parameters.GetUserProperty, callback?: never): Promise; - async getUserProperty( - parameters: Parameters.GetUserProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/${parameters.userId}/property/${parameters.key}`, - method: 'GET', - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Creates a property for a user. For more information about user properties, see [Confluence entity properties] - * (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored - * against a user are on a Confluence site level and not space/content level. - * - * `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by - * fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access - * the Confluence site ('Can use' global permission). - */ - async createUserProperty( - parameters: Parameters.CreateUserProperty, - callback: Callback, - ): Promise; - /** - * Creates a property for a user. For more information about user properties, see [Confluence entity properties] - * (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored - * against a user are on a Confluence site level and not space/content level. - * - * `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by - * fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access - * the Confluence site ('Can use' global permission). - */ - async createUserProperty(parameters: Parameters.CreateUserProperty, callback?: never): Promise; - async createUserProperty( - parameters: Parameters.CreateUserProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/${parameters.userId}/property/${parameters.key}`, - method: 'POST', - data: { - value: parameters.value, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Updates a property for the given user. Note, you cannot update the key of a user property, only the value. For more - * information about user properties, see [Confluence entity - * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these - * properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async updateUserProperty(parameters: Parameters.UpdateUserProperty, callback: Callback): Promise; - /** - * Updates a property for the given user. Note, you cannot update the key of a user property, only the value. For more - * information about user properties, see [Confluence entity - * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these - * properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async updateUserProperty(parameters: Parameters.UpdateUserProperty, callback?: never): Promise; - async updateUserProperty( - parameters: Parameters.UpdateUserProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/${parameters.userId}/property/${parameters.key}`, - method: 'PUT', - data: { - value: parameters.value, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Deletes a property for the given user. For more information about user properties, see [Confluence entity - * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these - * properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async deleteUserProperty(parameters: Parameters.DeleteUserProperty, callback: Callback): Promise; - /** - * Deletes a property for the given user. For more information about user properties, see [Confluence entity - * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these - * properties stored against a user are on a Confluence site level and not space/content level. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async deleteUserProperty(parameters: Parameters.DeleteUserProperty, callback?: never): Promise; - async deleteUserProperty( - parameters: Parameters.DeleteUserProperty, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: `/api/user/${parameters.userId}/property/${parameters.key}`, - method: 'DELETE', - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/api/users.ts b/packages/legacy/src/api/users.ts deleted file mode 100644 index f23e3da1..00000000 --- a/packages/legacy/src/api/users.ts +++ /dev/null @@ -1,275 +0,0 @@ -import type * as Models from './models/index.js'; -import type * as Parameters from './parameters/index.js'; -import type { Client } from '../clients/index.js'; -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export class Users { - constructor(private client: Client) {} - - /** - * Returns a user. This includes information about the user, such as the display name, account ID, profile picture, - * and more. The information returned may be restricted by the user's profile visibility settings. - * - * **Note:** to add, edit, or delete users in your organization, see the [user management REST - * API](/cloud/admin/user-management/about/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getUser(parameters: Parameters.GetUser, callback: Callback): Promise; - /** - * Returns a user. This includes information about the user, such as the display name, account ID, profile picture, - * and more. The information returned may be restricted by the user's profile visibility settings. - * - * **Note:** to add, edit, or delete users in your organization, see the [user management REST - * API](/cloud/admin/user-management/about/). - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getUser(parameters: Parameters.GetUser, callback?: never): Promise; - async getUser(parameters: Parameters.GetUser, callback?: Callback): Promise { - const config: RequestConfig = { - url: '/api/user', - method: 'GET', - params: { - accountId: parameters.accountId, - expand: parameters.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns information about how anonymous users are represented, like the profile picture and display name. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getAnonymousUser( - parameters: Parameters.GetAnonymousUser | undefined, - callback: Callback, - ): Promise; - /** - * Returns information about how anonymous users are represented, like the profile picture and display name. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getAnonymousUser( - parameters?: Parameters.GetAnonymousUser, - callback?: never, - ): Promise; - async getAnonymousUser( - parameters?: Parameters.GetAnonymousUser, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/user/anonymous', - method: 'GET', - params: { - expand: parameters?.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the currently logged-in user. This includes information about the user, like the display name, userKey, - * account ID, profile picture, and more. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getCurrentUser( - parameters: Parameters.GetCurrentUser | undefined, - callback: Callback, - ): Promise; - /** - * Returns the currently logged-in user. This includes information about the user, like the display name, userKey, - * account ID, profile picture, and more. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getCurrentUser(parameters?: Parameters.GetCurrentUser, callback?: never): Promise; - async getCurrentUser( - parameters?: Parameters.GetCurrentUser, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/user/current', - method: 'GET', - params: { - expand: parameters?.expand, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns the groups that a user is a member of. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getGroupMembershipsForUser( - parameters: Parameters.GetGroupMembershipsForUser, - callback: Callback, - ): Promise; - /** - * Returns the groups that a user is a member of. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getGroupMembershipsForUser( - parameters: Parameters.GetGroupMembershipsForUser, - callback?: never, - ): Promise; - async getGroupMembershipsForUser( - parameters: Parameters.GetGroupMembershipsForUser, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/user/memberof', - method: 'GET', - params: { - accountId: parameters.accountId, - start: parameters.start, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns user details for the ids provided in the request. Currently this API returns a maximum of 100 results. If - * more than 100 account ids are passed in, then the first 100 will be returned. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getBulkUserLookup( - parameters: Parameters.GetBulkUserLookup, - callback: Callback, - ): Promise; - /** - * Returns user details for the ids provided in the request. Currently this API returns a maximum of 100 results. If - * more than 100 account ids are passed in, then the first 100 will be returned. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getBulkUserLookup( - parameters: Parameters.GetBulkUserLookup, - callback?: never, - ): Promise; - async getBulkUserLookup( - parameters: Parameters.GetBulkUserLookup, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/user/bulk', - method: 'GET', - params: { - accountId: parameters.accountId, - expand: parameters.expand, - limit: parameters.limit, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns a user's email address regardless of the user’s profile visibility settings. For Connect apps, this API is - * only available to apps approved by Atlassian, according to these - * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). - * For Forge apps, this API only supports access via asApp() requests. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getPrivacyUnsafeUserEmail( - parameters: Parameters.GetPrivacyUnsafeUserEmail, - callback: Callback, - ): Promise; - /** - * Returns a user's email address regardless of the user’s profile visibility settings. For Connect apps, this API is - * only available to apps approved by Atlassian, according to these - * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). - * For Forge apps, this API only supports access via asApp() requests. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getPrivacyUnsafeUserEmail( - parameters: Parameters.GetPrivacyUnsafeUserEmail, - callback?: never, - ): Promise; - async getPrivacyUnsafeUserEmail( - parameters: Parameters.GetPrivacyUnsafeUserEmail, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/user/email', - method: 'GET', - params: { - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } - - /** - * Returns a user's email address regardless of the user’s profile visibility settings. For Connect apps, this API is - * only available to apps approved by Atlassian, according to these - * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). - * For Forge apps, this API only supports access via asApp() requests. - * - * Any accounts which are not available will not be included in the result. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getPrivacyUnsafeUserEmailBulk( - parameters: Parameters.GetPrivacyUnsafeUserEmailBulk, - callback: Callback, - ): Promise; - /** - * Returns a user's email address regardless of the user’s profile visibility settings. For Connect apps, this API is - * only available to apps approved by Atlassian, according to these - * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). - * For Forge apps, this API only supports access via asApp() requests. - * - * Any accounts which are not available will not be included in the result. - * - * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site - * ('Can use' global permission). - */ - async getPrivacyUnsafeUserEmailBulk( - parameters: Parameters.GetPrivacyUnsafeUserEmailBulk, - callback?: never, - ): Promise; - async getPrivacyUnsafeUserEmailBulk( - parameters: Parameters.GetPrivacyUnsafeUserEmailBulk, - callback?: Callback, - ): Promise { - const config: RequestConfig = { - url: '/api/user/email/bulk', - method: 'GET', - params: { - accountId: parameters.accountId, - }, - }; - - return this.client.sendRequest(config, callback); - } -} diff --git a/packages/legacy/src/callback.ts b/packages/legacy/src/callback.ts deleted file mode 100644 index 6d1aedd4..00000000 --- a/packages/legacy/src/callback.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { AxiosError } from 'axios'; - -export type Callback = (err: AxiosError | null, data?: T) => void; diff --git a/packages/legacy/src/clients/baseClient.ts b/packages/legacy/src/clients/baseClient.ts deleted file mode 100644 index 886a7f39..00000000 --- a/packages/legacy/src/clients/baseClient.ts +++ /dev/null @@ -1,136 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any,@typescript-eslint/no-unnecessary-condition */ -import type { AxiosInstance } from 'axios'; -import axios from 'axios'; -import { getAuthenticationToken } from '../services/index.js'; -import type { Callback } from '../callback.js'; -import type { Client } from './client.js'; -import { ConfigSchema, type Config, type Error as ConfluenceError } from '../config.js'; -import type { RequestConfig } from '../requestConfig.js'; -import { ZodError } from 'zod'; - -const ATLASSIAN_TOKEN_CHECK_FLAG = 'X-Atlassian-Token'; -const ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE = 'no-check'; - -export class BaseClient implements Client { - #instance: AxiosInstance | undefined; - - constructor(protected readonly config: Config) { - this.config.apiPrefix = this.config.apiPrefix || '/wiki/rest/'; - - try { - this.config = ConfigSchema.parse(this.config); - } catch (e) { - if (e instanceof ZodError && e.errors[0].code === 'invalid_string') { - throw new Error(e.errors[0].message, { cause: e }); - } - - throw e; - } - } - - protected paramSerializer(parameters: Record): string { - const parts: string[] = []; - - Object.entries(parameters).forEach(([key, value]) => { - if (value === null || typeof value === 'undefined') { - return; - } - - if (Array.isArray(value)) { - value = value.join(','); - } - - if (value instanceof Date) { - value = value.toISOString(); - } else if (value !== null && typeof value === 'object') { - value = JSON.stringify(value); - } else if (value instanceof Function) { - const part = value(); - - return part && parts.push(part); - } - - parts.push(`${this.encode(key)}=${this.encode(value)}`); - }); - - return parts.join('&'); - } - - protected encode(value: string) { - return encodeURIComponent(value) - .replace(/%3A/gi, ':') - .replace(/%24/g, '$') - .replace(/%2C/gi, ',') - .replace(/%20/g, '+') - .replace(/%5B/gi, '[') - .replace(/%5D/gi, ']'); - } - - protected removeUndefinedProperties(obj: Record): Record { - return Object.entries(obj) - .filter(([, value]) => typeof value !== 'undefined') - .reduce((accumulator, [key, value]) => ({ ...accumulator, [key]: value }), {}); - } - - private get instance() { - if (this.#instance) { - return this.#instance; - } - - this.#instance = axios.create({ - paramsSerializer: this.paramSerializer.bind(this), - ...this.config.baseRequestConfig, - baseURL: `${this.config.host}${this.config.apiPrefix}`, - headers: this.removeUndefinedProperties({ - [ATLASSIAN_TOKEN_CHECK_FLAG]: this.config.noCheckAtlassianToken - ? ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE - : undefined, - ...this.config.baseRequestConfig?.headers, - }), - }); - - return this.#instance; - } - - async sendRequest(requestConfig: RequestConfig, callback: never): Promise; - async sendRequest(requestConfig: RequestConfig, callback: Callback): Promise; - async sendRequest(requestConfig: RequestConfig, callback: Callback | never): Promise { - try { - const modifiedRequestConfig = { - ...requestConfig, - headers: this.removeUndefinedProperties({ - Authorization: await getAuthenticationToken(this.config.authentication, { - baseURL: this.config.host, - url: this.instance.getUri(requestConfig), - method: requestConfig.method!, - }), - ...requestConfig.headers, - }), - }; - - const response = await this.instance.request(modifiedRequestConfig); - - const callbackResponseHandler = callback && ((data: T): void => callback(null, data)); - const defaultResponseHandler = (data: T): T => data; - - const responseHandler = callbackResponseHandler ?? defaultResponseHandler; - - this.config.middlewares?.onResponse?.(response.data); - - return responseHandler(response.data); - } catch (e: any) { - const err = e.isAxiosError ? e.response.data : e; - - const callbackErrorHandler = callback && ((error: ConfluenceError) => callback(error)); - const defaultErrorHandler = (error: Error) => { - throw error; - }; - - const errorHandler = callbackErrorHandler ?? defaultErrorHandler; - - this.config.middlewares?.onError?.(err); - - return errorHandler(err); - } - } -} diff --git a/packages/legacy/src/clients/client.ts b/packages/legacy/src/clients/client.ts deleted file mode 100644 index f09325fe..00000000 --- a/packages/legacy/src/clients/client.ts +++ /dev/null @@ -1,7 +0,0 @@ -import type { Callback } from '../callback.js'; -import type { RequestConfig } from '../requestConfig.js'; - -export interface Client { - sendRequest(requestConfig: RequestConfig, callback?: never): Promise; - sendRequest(requestConfig: RequestConfig, callback?: Callback): Promise; -} diff --git a/packages/legacy/src/clients/confluenceClient.ts b/packages/legacy/src/clients/confluenceClient.ts deleted file mode 100644 index ab56cf97..00000000 --- a/packages/legacy/src/clients/confluenceClient.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { BaseClient } from './baseClient.js'; -import type { Config } from '../config.js'; -import { - Analytics, - Audit, - Content, - ContentAttachments, - ContentBody, - ContentChildrenAndDescendants, - ContentComments, - ContentLabels, - ContentMacroBody, - ContentPermissions, - ContentProperties, - ContentRestrictions, - ContentStates, - ContentVersions, - ContentWatches, - DynamicModules, - Experimental, - Group, - InlineTasks, - LabelInfo, - LongRunningTask, - Relation, - Search, - Settings, - Space, - SpacePermissions, - SpaceProperties, - SpaceSettings, - Template, - Themes, - Users, - UserProperties, -} from '../api/index.js'; - -export class ConfluenceClient extends BaseClient { - constructor(config: Config) { - super({ - ...config, - apiPrefix: config.apiPrefix ?? '/wiki/rest', - }); - } - - analytics = new Analytics(this); - audit = new Audit(this); - content = new Content(this); - contentAttachments = new ContentAttachments(this); - contentBody = new ContentBody(this); - contentChildrenAndDescendants = new ContentChildrenAndDescendants(this); - /** @deprecated Will be removed in next major version. */ - contentComments = new ContentComments(this); - contentLabels = new ContentLabels(this); - contentMacroBody = new ContentMacroBody(this); - contentPermissions = new ContentPermissions(this); - /** @deprecated Will be removed in next major version. */ - contentProperties = new ContentProperties(this); - contentRestrictions = new ContentRestrictions(this); - contentStates = new ContentStates(this); - contentVersions = new ContentVersions(this); - contentWatches = new ContentWatches(this); - dynamicModules = new DynamicModules(this); - experimental = new Experimental(this); - group = new Group(this); - /** @deprecated Will be removed in next major version. */ - inlineTasks = new InlineTasks(this); - labelInfo = new LabelInfo(this); - longRunningTask = new LongRunningTask(this); - relation = new Relation(this); - search = new Search(this); - settings = new Settings(this); - space = new Space(this); - spacePermissions = new SpacePermissions(this); - /** @deprecated Will be removed in next major version. */ - spaceProperties = new SpaceProperties(this); - spaceSettings = new SpaceSettings(this); - template = new Template(this); - themes = new Themes(this); - users = new Users(this); - userProperties = new UserProperties(this); -} diff --git a/packages/legacy/src/clients/index.ts b/packages/legacy/src/clients/index.ts deleted file mode 100644 index 469f3bab..00000000 --- a/packages/legacy/src/clients/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './baseClient.js'; - -export * from './client.js'; - -export * from './confluenceClient.js'; diff --git a/packages/legacy/src/config.ts b/packages/legacy/src/config.ts deleted file mode 100644 index 1a291d74..00000000 --- a/packages/legacy/src/config.ts +++ /dev/null @@ -1,80 +0,0 @@ -import { z } from 'zod'; -import type { AxiosError } from 'axios'; - -/** - * Basic authentication configuration using email and API token - * - * @see {@link https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/} for how to create API tokens - */ -export const BasicSchema = z.strictObject({ - basic: z.strictObject({ - /** User's email associated with Atlassian account */ - email: z.string().email(), - /** - * API token generated from Atlassian account settings - * - * @see {@link https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/} for how to create API tokens - */ - apiToken: z.string().min(1, 'API token is required'), - }), -}); - -/** JWT authentication configuration */ -export const JWTSchema = z.strictObject({ - jwt: z.strictObject({ - /** The key from the app descriptor */ - issuer: z.string(), - /** The shared secret key from app installation */ - secret: z.string(), - /** Token expiry time (default: 180) */ - expiryTimeSeconds: z.optional(z.number()), - }), -}); - -/** OAuth2 authentication configuration */ -export const OAuth2Schema = z.strictObject({ - oauth2: z.strictObject({ - /** OAuth2 access token */ - accessToken: z.string(), - }), -}); - -/** Authentication configuration schema */ -export const AuthenticationSchema = z.union([BasicSchema, JWTSchema, OAuth2Schema]); - -/** Base request configuration */ -export const RequestConfigSchema = z.any(); - -/** Middleware configuration schema */ -export const MiddlewaresSchema = z.object({ - /** Error handler middleware */ - onError: z.optional(z.function().args(z.any()).returns(z.void())), - /** Response handler middleware */ - onResponse: z.optional(z.function().args(z.any()).returns(z.void())), -}); - -export const ConfigSchema = z.object({ - host: z.string().url({ - message: - 'Couldn\'t parse the host URL. Perhaps you forgot to add \'http://\' or \'https://\' at the beginning of the URL?', - }), - baseRequestConfig: z.optional(RequestConfigSchema), - authentication: z.optional(AuthenticationSchema), - middlewares: z.optional(MiddlewaresSchema), - /** Adds `'X-Atlassian-Token': 'no-check'` to each request header */ - noCheckAtlassianToken: z.optional(z.boolean()), - /** Prefix for all API routes. */ - apiPrefix: z.optional(z.string()), -}); - -export type Config = z.infer; - -export type Authentication = z.infer; - -export type Basic = z.infer; - -export type JWT = z.infer; - -export type OAuth2 = z.infer; - -export type Error = AxiosError; diff --git a/packages/legacy/src/index.ts b/packages/legacy/src/index.ts deleted file mode 100644 index 5ae0bab5..00000000 --- a/packages/legacy/src/index.ts +++ /dev/null @@ -1,19 +0,0 @@ -export * from './clients/index.js'; - -export * from './config.js'; - -export * from './requestConfig.js'; - -export * from './callback.js'; - -export * from './pagination.js'; - -export * from './services/index.js'; - -export * from './interfaces/index.js'; - -export * as Api from './api/index.js'; - -export * as Models from './api/models/index.js'; - -export * as Parameters from './api/parameters/index.js'; diff --git a/packages/legacy/src/interfaces/extractBaseType.ts b/packages/legacy/src/interfaces/extractBaseType.ts deleted file mode 100644 index 889379df..00000000 --- a/packages/legacy/src/interfaces/extractBaseType.ts +++ /dev/null @@ -1 +0,0 @@ -export type ExtractBaseType = T extends (infer U)[] ? U : T; diff --git a/packages/legacy/src/interfaces/index.ts b/packages/legacy/src/interfaces/index.ts deleted file mode 100644 index 3f9f53cd..00000000 --- a/packages/legacy/src/interfaces/index.ts +++ /dev/null @@ -1,3 +0,0 @@ -export * from './extractBaseType.js'; - -export * from './oneOrMany.js'; diff --git a/packages/legacy/src/interfaces/oneOrMany.ts b/packages/legacy/src/interfaces/oneOrMany.ts deleted file mode 100644 index c014d044..00000000 --- a/packages/legacy/src/interfaces/oneOrMany.ts +++ /dev/null @@ -1 +0,0 @@ -export type OneOrMany = T | T[]; diff --git a/packages/legacy/src/pagination.ts b/packages/legacy/src/pagination.ts deleted file mode 100644 index 2ceb0839..00000000 --- a/packages/legacy/src/pagination.ts +++ /dev/null @@ -1,8 +0,0 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -export interface Pagination { - results: T[]; - start: number; - limit: number; - size: number; - _links: Record; -} diff --git a/packages/legacy/src/paramSerializer.ts b/packages/legacy/src/paramSerializer.ts deleted file mode 100644 index f84a92ce..00000000 --- a/packages/legacy/src/paramSerializer.ts +++ /dev/null @@ -1,15 +0,0 @@ -export function paramSerializer(key: string, values?: string | string[]) { - if (typeof values === 'string') { - return () => `${key}=${values}`; - } - - if (!values) { - return undefined; - } - - if (!values.length) { - return ''; - } - - return () => values.map(value => `${key}=${value}`).join('&'); -} diff --git a/packages/legacy/src/requestConfig.ts b/packages/legacy/src/requestConfig.ts deleted file mode 100644 index 256383f9..00000000 --- a/packages/legacy/src/requestConfig.ts +++ /dev/null @@ -1,3 +0,0 @@ -import type { AxiosRequestConfig } from 'axios'; - -export type RequestConfig = AxiosRequestConfig; diff --git a/packages/legacy/src/services/authenticationService/authenticationService.ts b/packages/legacy/src/services/authenticationService/authenticationService.ts deleted file mode 100644 index 898f7826..00000000 --- a/packages/legacy/src/services/authenticationService/authenticationService.ts +++ /dev/null @@ -1,33 +0,0 @@ -import type { Authentication } from '../../config.js'; -import { - createBasicAuthenticationToken, - createJWTAuthentication, - createOAuth2AuthenticationToken, -} from './authentications/index.js'; - -export async function getAuthenticationToken( - authentication: Authentication | undefined, - requestData?: { - baseURL: string; - url: string; - method: string; - }, -): Promise { - if (!authentication) { - return undefined; - } - - if ('basic' in authentication) { - return createBasicAuthenticationToken(authentication); - } - - if ('oauth2' in authentication) { - return createOAuth2AuthenticationToken(authentication); - } - - if ('jwt' in authentication) { - return createJWTAuthentication(authentication, requestData!); - } - - return undefined; -} diff --git a/packages/legacy/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts b/packages/legacy/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts deleted file mode 100644 index bc531bdc..00000000 --- a/packages/legacy/src/services/authenticationService/authentications/createBasicAuthenticationToken.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Base64Encoder } from '../base64Encoder.js'; -import type { Basic } from '../../../index.js'; - -export function createBasicAuthenticationToken({ basic: { email, apiToken } }: Basic) { - const token = Base64Encoder.encode(`${email}:${apiToken}`); - - return `Basic ${token}`; -} diff --git a/packages/legacy/src/services/authenticationService/authentications/createJWTAuthentication.ts b/packages/legacy/src/services/authenticationService/authentications/createJWTAuthentication.ts deleted file mode 100644 index 8f927adc..00000000 --- a/packages/legacy/src/services/authenticationService/authentications/createJWTAuthentication.ts +++ /dev/null @@ -1,27 +0,0 @@ -import * as jwt from '@atlassian/atlassian-jwt'; -import type { JWT } from '../../../index.js'; - -export function createJWTAuthentication( - { jwt: { issuer, secret, expiryTimeSeconds } }: JWT, - requestData: { - method: string; - url: string; - }, -) { - const { method, url } = requestData; - - const now = Math.floor(Date.now() / 1000); - const expire = now + (expiryTimeSeconds ?? 180); - - const request = jwt.fromMethodAndUrl(method, url); - const tokenData = { - iss: issuer, - qsh: jwt.createQueryStringHash(request), - iat: now, - exp: expire, - }; - - const token = jwt.encodeSymmetric(tokenData, secret); - - return `JWT ${token}`; -} diff --git a/packages/legacy/src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts b/packages/legacy/src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts deleted file mode 100644 index a063c7a6..00000000 --- a/packages/legacy/src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts +++ /dev/null @@ -1,5 +0,0 @@ -import type { OAuth2 } from '../../../index.js'; - -export function createOAuth2AuthenticationToken({ oauth2: { accessToken } }: OAuth2) { - return `Bearer ${accessToken}`; -} diff --git a/packages/legacy/src/services/authenticationService/authentications/index.ts b/packages/legacy/src/services/authenticationService/authentications/index.ts deleted file mode 100644 index 5ad81b44..00000000 --- a/packages/legacy/src/services/authenticationService/authentications/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export * from './createBasicAuthenticationToken.js'; - -export * from './createJWTAuthentication.js'; - -export * from './createOAuth2AuthenticationToken.js'; diff --git a/packages/legacy/src/services/authenticationService/base64Encoder.ts b/packages/legacy/src/services/authenticationService/base64Encoder.ts deleted file mode 100644 index f20d74e9..00000000 --- a/packages/legacy/src/services/authenticationService/base64Encoder.ts +++ /dev/null @@ -1,69 +0,0 @@ -/* eslint-disable */ -/** @copyright The code was taken from the portal http://www.webtoolkit.info/javascript-base64.html */ - -export namespace Base64Encoder { - const base64Sequence = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; - - const utf8Encode = (value: string) => { - value = value.replace(/\r\n/g, '\n'); - - let utftext = ''; - - for (let n = 0; n < value.length; n++) { - const c = value.charCodeAt(n); - - if (c < 128) { - utftext += String.fromCharCode(c); - } else if (c > 127 && c < 2048) { - utftext += String.fromCharCode((c >> 6) | 192); - - utftext += String.fromCharCode((c & 63) | 128); - } else { - utftext += String.fromCharCode((c >> 12) | 224); - - utftext += String.fromCharCode(((c >> 6) & 63) | 128); - - utftext += String.fromCharCode((c & 63) | 128); - } - } - - return utftext; - }; - - export const encode = (input: string) => { - let output = ''; - let chr1; - let chr2; - let chr3; - let enc1; - let enc2; - let enc3; - let enc4; - let i = 0; - - input = utf8Encode(input); - - while (i < input.length) { - chr1 = input.charCodeAt(i++); - chr2 = input.charCodeAt(i++); - chr3 = input.charCodeAt(i++); - - enc1 = chr1 >> 2; - enc2 = ((chr1 & 3) << 4) | (chr2 >> 4); - enc3 = ((chr2 & 15) << 2) | (chr3 >> 6); - enc4 = chr3 & 63; - - if (isNaN(chr2)) { - enc3 = enc4 = 64; - } else if (isNaN(chr3)) { - enc4 = 64; - } - - output += `${base64Sequence.charAt(enc1)}${base64Sequence.charAt(enc2)}${base64Sequence.charAt( - enc3, - )}${base64Sequence.charAt(enc4)}`; - } - - return output; - }; -} diff --git a/packages/legacy/src/services/authenticationService/index.ts b/packages/legacy/src/services/authenticationService/index.ts deleted file mode 100644 index 53b4e45b..00000000 --- a/packages/legacy/src/services/authenticationService/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './authenticationService.js'; diff --git a/packages/legacy/src/services/index.ts b/packages/legacy/src/services/index.ts deleted file mode 100644 index 01b99fe3..00000000 --- a/packages/legacy/src/services/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './authenticationService/index.js'; diff --git a/packages/legacy/tests/integration/e2e.test.ts b/packages/legacy/tests/integration/e2e.test.ts deleted file mode 100644 index 6cbd819a..00000000 --- a/packages/legacy/tests/integration/e2e.test.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { describe, it, expect } from 'vitest'; -import * as fs from 'fs'; -import { ConfluenceClient } from '../../src/index.js'; - -const HOST = process.env.HOST!; -const EMAIL = process.env.EMAIL!; -const API_TOKEN = process.env.API_TOKEN!; - -describe('ConfluenceClient E2E Tests', () => { - let createdContentId: string; - let createdAttachmentId: string; - const client = new ConfluenceClient({ - host: HOST, - authentication: { - basic: { - email: EMAIL, - apiToken: API_TOKEN, - }, - }, - }); - - it('should create space', async () => { - const space = await client.space.createSpace({ - name: 'Auto testing software', - key: 'AUTOMATED', - }); - - expect(space).toBeTruthy(); - expect(space.key).toBe('AUTOMATED'); - expect(space.name).toBe('Auto testing software'); - }); - - it('should create content', async () => { - const content = await client.content.createContent({ - title: 'Test page', - space: { - key: 'AUTOMATED', - }, - type: 'page', - body: { - view: { - value: '', - representation: 'view', - }, - }, - }); - - createdContentId = content.id; - - expect(content).toBeTruthy(); - expect(content.type).toBe('page'); - expect(content.space?.key).toBe('AUTOMATED'); - }); - - it('should add attachment', async () => { - const file = fs.readFileSync('./tests/unit/index.test.ts'); - - const attachment = await client.contentAttachments.createAttachments({ - id: createdContentId, - attachments: { - file, - filename: 'space.test.ts', - minorEdit: true, - comment: 'heh comment', - contentType: 'application/javascript', - }, - }); - - expect(attachment).toBeTruthy(); - expect(attachment.results.length).toBe(1); - expect(attachment.results[0].title).toBe('space.test.ts'); - expect(attachment.results[0].metadata.mediaType).toBe('application/javascript'); - expect(attachment.results[0].version.minorEdit).toBe(true); - }); - - it('should get attachments', async () => { - const attachments = await client.contentAttachments.getAttachments({ - id: createdContentId, - }); - - expect(attachments).toBeTruthy(); - expect(attachments.results.length).toBe(1); - expect(attachments.results[0].title).toBe('space.test.ts'); - expect(attachments.results[0].metadata.mediaType).toBe('application/javascript'); - }); - - it('should update attachment', async () => { - const attachments = await client.contentAttachments.createOrUpdateAttachments({ - id: createdContentId, - attachments: { - file: 'testFileContent', - filename: 'space.test.ts', - minorEdit: false, - comment: 'some changes', - contentType: 'application/javascript', - }, - }); - - createdAttachmentId = attachments.results[0].id; - - expect(attachments).toBeTruthy(); - expect(attachments.results.length).toBe(1); - expect(attachments.results[0].title).toBe('space.test.ts'); - expect(attachments.results[0].metadata.mediaType).toBe('application/javascript'); - expect(attachments.results[0].version.minorEdit).toBe(false); - expect(attachments.results[0].version.number).toBe(2); - expect(attachments.results[0].version.message).toBe('some changes'); - }); - - it('should update attachment properties', async () => { - const attachment = await client.contentAttachments.updateAttachmentProperties({ - id: createdContentId, - attachmentId: createdAttachmentId, - update: { - id: createdAttachmentId, - version: { - number: 2, - }, - title: 'space.test.ts', - type: 'attachment', - status: 'current', - metadata: { - mediaType: 'text/plain', - }, - }, - }); - - expect(attachment).toBeTruthy(); - expect(attachment.title).toBe('space.test.ts'); - expect(attachment.metadata.mediaType).toBe('text/plain'); - expect(attachment.version.minorEdit).toBe(false); - expect(attachment.version.number).toBe(2); - expect(attachment.version.message).toBe('some changes'); - }); - - it('should update content attachment data', async () => { - const attachment = await client.contentAttachments.updateAttachmentData({ - id: createdContentId, - attachmentId: createdAttachmentId, - attachment: { - file: 'testFileContent', - filename: 'space.test.ts', - minorEdit: true, - }, - }); - - expect(attachment).toBeTruthy(); - expect(attachment.title).toBe('space.test.ts'); - expect(attachment.metadata.mediaType).toBe('video/mp2t'); - expect(attachment.version.minorEdit).toBe(true); - expect(attachment.version.number).toBe(3); - expect(attachment.version.message).toBeUndefined(); - }); - - it('should download content attachment', async () => { - const attachment = await client.contentAttachments.downloadAttachment({ - id: createdContentId, - attachmentId: createdAttachmentId, - }); - - expect(attachment).toBeTruthy(); - expect(attachment.toString()).toBe('testFileContent'); - }); - - it('should remove content', async () => { - await expect(client.content.deleteContent({ - id: createdContentId, - })).resolves.not.toThrow(); - }); - - it('should remove space', async () => { - const removedSpace = await client.space.deleteSpace({ - spaceKey: 'AUTOMATED', - }); - expect(removedSpace).toBeTruthy(); - }); -}); diff --git a/packages/legacy/tests/tsconfig.json b/packages/legacy/tests/tsconfig.json deleted file mode 100644 index 13dc4175..00000000 --- a/packages/legacy/tests/tsconfig.json +++ /dev/null @@ -1,12 +0,0 @@ -{ - "extends": "../../../tsconfig.base.json", - "compilerOptions": { - "noEmit": true, - "skipLibCheck": true, - "types": ["node"], - "paths": { - "@confluence.js/legacy": ["../src/index.ts"] - } - }, - "include": ["integration", "unit"] -} diff --git a/packages/legacy/tests/unit/api/contentBody.test.ts b/packages/legacy/tests/unit/api/contentBody.test.ts deleted file mode 100644 index 7f745fd3..00000000 --- a/packages/legacy/tests/unit/api/contentBody.test.ts +++ /dev/null @@ -1,97 +0,0 @@ -import { describe, it, expect, vi } from 'vitest'; -import { ContentBody } from '../../../src/api/contentBody.js'; - -describe('asyncConvertContentBodyRequest', () => { - const mockClient = { - sendRequest: vi.fn().mockResolvedValue({ id: '123' }), - }; - const client = new ContentBody(mockClient); - - it('should handle all parameters correctly in the request config', async () => { - const testParams = { - to: 'view', - value: '

test content

', - representation: 'storage', - spaceKeyContext: 'TEST', - contentIdContext: '12345', - allowCache: true, - embeddedContentRender: 'full', - expand: 'body.view', - additionalProperties: { - customProp: 'value', - }, - }; - - await client.asyncConvertContentBodyRequest(testParams); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/contentbody/convert/async/view', - method: 'POST', - params: { - spaceKeyContext: 'TEST', - contentIdContext: '12345', - allowCache: true, - embeddedContentRender: 'full', - expand: 'body.view', - }, - data: { - value: '

test content

', - representation: 'storage', - customProp: 'value', - }, - }), - undefined, - ); - }); - - it('should handle callback when provided', async () => { - const testParams = { - to: 'view', - value: '

test content

', - representation: 'storage', - }; - const mockCallback = vi.fn(); - - await client.asyncConvertContentBodyRequest(testParams, mockCallback); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.any(Object), - mockCallback, - ); - }); - - it('should return a promise with AsyncId when no callback provided', async () => { - const testParams = { - to: 'view', - value: '

test content

', - representation: 'storage', - }; - - const result = await client.asyncConvertContentBodyRequest(testParams); - expect(result).toEqual({ id: '123' }); - }); - - it('should handle minimal required parameters', async () => { - const testParams = { - to: 'view', - value: '

test content

', - representation: 'storage', - }; - - await client.asyncConvertContentBodyRequest(testParams); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/contentbody/convert/async/view', - method: 'POST', - params: {}, - data: { - value: '

test content

', - representation: 'storage', - }, - }), - undefined, - ); - }); -}); diff --git a/packages/legacy/tests/unit/api/contentChildrenAndDescendants.test.ts b/packages/legacy/tests/unit/api/contentChildrenAndDescendants.test.ts deleted file mode 100644 index 1477ce2c..00000000 --- a/packages/legacy/tests/unit/api/contentChildrenAndDescendants.test.ts +++ /dev/null @@ -1,55 +0,0 @@ -import { describe, it, expect, vi, beforeEach } from 'vitest'; -import { ContentChildrenAndDescendants } from '../../../src/api/contentChildrenAndDescendants.js'; -import type { RequestConfig } from '../../../src/requestConfig.js'; - -describe('getContentChildren', () => { - let client: ContentChildrenAndDescendants; - const mockSendRequest = vi.fn(); - - beforeEach(() => { - // Create a fresh instance for each test - mockSendRequest.mockReset(); - mockSendRequest.mockResolvedValue({}); - client = new ContentChildrenAndDescendants({ - sendRequest: mockSendRequest, - }); - }); - - it('should use all parameters in the request config', async () => { - // Arrange - const testParams = { - id: '12345', - expand: ['body.view', 'version'], - parentVersion: 2, - start: 10, - limit: 25, - }; - - // Mock the successful response - mockSendRequest.mockResolvedValue({ - page: [], - comment: [], - attachment: [], - }); - - // Act - await client.getContentChildren(testParams); - - // Assert - expect(mockSendRequest).toHaveBeenCalledTimes(1); - - const calledConfig: RequestConfig = mockSendRequest.mock.calls[0][0]; - - // Verify URL construction with content ID - expect(calledConfig.url).toBe(`/api/content/${testParams.id}/child`); - expect(calledConfig.method).toBe('GET'); - - // Verify all query parameters - expect(calledConfig.params).toEqual({ - expand: testParams.expand, - parentVersion: testParams.parentVersion, - start: testParams.start, - limit: testParams.limit, - }); - }); -}); diff --git a/packages/legacy/tests/unit/api/group.test.ts b/packages/legacy/tests/unit/api/group.test.ts deleted file mode 100644 index c1e1d0f2..00000000 --- a/packages/legacy/tests/unit/api/group.test.ts +++ /dev/null @@ -1,266 +0,0 @@ -import { beforeEach, describe, expect, it, vi } from 'vitest'; -import { Group } from '../../../src/api/index.js'; -import type { Client } from '../../../src/clients/index.js'; - -describe('Group', () => { - let mockClient: Client; - let group: Group; - - beforeEach(() => { - mockClient = { - sendRequest: vi.fn(), - } as unknown as Client; - group = new Group(mockClient); - }); - - describe('method availability', () => { - it('should have getGroups method', () => { - expect(group.getGroups).toBeDefined(); - expect(typeof group.getGroups).toBe('function'); - }); - - it('should have createGroup method', () => { - expect(group.createGroup).toBeDefined(); - expect(typeof group.createGroup).toBe('function'); - }); - - it('should have getGroupByGroupId method', () => { - expect(group.getGroupByGroupId).toBeDefined(); - expect(typeof group.getGroupByGroupId).toBe('function'); - }); - - it('should have removeGroupById method', () => { - expect(group.removeGroupById).toBeDefined(); - expect(typeof group.removeGroupById).toBe('function'); - }); - - it('should have searchGroups method', () => { - expect(group.searchGroups).toBeDefined(); - expect(typeof group.searchGroups).toBe('function'); - }); - - it('should have addUserToGroupByGroupId method', () => { - expect(group.addUserToGroupByGroupId).toBeDefined(); - expect(typeof group.addUserToGroupByGroupId).toBe('function'); - }); - - it('should have removeMemberFromGroupByGroupId method', () => { - expect(group.removeMemberFromGroupByGroupId).toBeDefined(); - expect(typeof group.removeMemberFromGroupByGroupId).toBe('function'); - }); - - it('should have getGroupMembersByGroupId method', () => { - expect(group.getGroupMembersByGroupId).toBeDefined(); - expect(typeof group.getGroupMembersByGroupId).toBe('function'); - }); - - it('should have addUserToGroup method', () => { - expect(group.addUserToGroup).toBeDefined(); - expect(typeof group.addUserToGroup).toBe('function'); - }); - - it('should have removeMemberFromGroup method', () => { - expect(group.removeMemberFromGroup).toBeDefined(); - expect(typeof group.removeMemberFromGroup).toBe('function'); - }); - }); - - describe('method implementations', () => { - it('getGroups should call client.sendRequest with correct config', async () => { - const params = { start: 0, limit: 50, accessType: 'some-type' }; - await group.getGroups(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group', - method: 'GET', - params: { - start: params.start, - limit: params.limit, - accessType: params.accessType, - }, - }), - undefined, - ); - }); - - it('createGroup should call client.sendRequest with correct config', async () => { - const params = { name: 'test-group' }; - await group.createGroup(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group', - method: 'POST', - data: { - name: params.name, - }, - }), - undefined, - ); - }); - - it('getGroupByGroupId should call client.sendRequest with correct config', async () => { - const params = { id: '12345' }; - await group.getGroupByGroupId(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group/by-id', - method: 'GET', - params: { - id: params.id, - }, - }), - undefined, - ); - }); - - it('removeGroupById should call client.sendRequest with correct config', async () => { - const params = { id: '12345' }; - await group.removeGroupById(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group/by-id', - method: 'DELETE', - params: { - id: params.id, - }, - }), - undefined, - ); - }); - - it('searchGroups should call client.sendRequest with correct config', async () => { - const params = { - query: 'test', - start: 0, - limit: 50, - shouldReturnTotalSize: true, - }; - await group.searchGroups(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group/picker', - method: 'GET', - params: { - query: params.query, - start: params.start, - limit: params.limit, - shouldReturnTotalSize: params.shouldReturnTotalSize, - }, - }), - undefined, - ); - }); - - it('addUserToGroupByGroupId should call client.sendRequest with correct config', async () => { - const params = { - groupId: '12345', - accountId: '67890', - }; - await group.addUserToGroupByGroupId(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group/userByGroupId', - method: 'POST', - params: { - groupId: params.groupId, - }, - data: { - accountId: params.accountId, - }, - }), - undefined, - ); - }); - - it('removeMemberFromGroupByGroupId should call client.sendRequest with correct config', async () => { - const params = { - groupId: '12345', - accountId: '67890', - }; - await group.removeMemberFromGroupByGroupId(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group/userByGroupId', - method: 'DELETE', - params: { - groupId: params.groupId, - accountId: params.accountId, - }, - }), - undefined, - ); - }); - - it('getGroupMembersByGroupId should call client.sendRequest with correct config', async () => { - const params = { - groupId: '12345', - start: 0, - limit: 50, - shouldReturnTotalSize: true, - }; - await group.getGroupMembersByGroupId(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group/12345/membersByGroupId', - method: 'GET', - params: { - start: params.start, - limit: params.limit, - shouldReturnTotalSize: params.shouldReturnTotalSize, - }, - }), - undefined, - ); - }); - - it('addUserToGroup should call client.sendRequest with correct config', async () => { - const params = { - name: 'test-group', - accountId: '67890', - }; - await group.addUserToGroup(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group/user', - method: 'POST', - params: { - name: params.name, - }, - data: { - accountId: params.accountId, - }, - }), - undefined, - ); - }); - - it('removeMemberFromGroup should call client.sendRequest with correct config', async () => { - const params = { - name: 'test-group', - accountId: '67890', - }; - await group.removeMemberFromGroup(params); - - expect(mockClient.sendRequest).toHaveBeenCalledWith( - expect.objectContaining({ - url: '/api/group/user', - method: 'DELETE', - params: { - name: params.name, - accountId: params.accountId, - }, - }), - undefined, - ); - }); - }); -}); diff --git a/packages/legacy/tests/unit/clients/baseClient.test.ts b/packages/legacy/tests/unit/clients/baseClient.test.ts deleted file mode 100644 index b85f2a25..00000000 --- a/packages/legacy/tests/unit/clients/baseClient.test.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { describe, it, expect } from 'vitest'; -import { BaseClient } from '../../../src/clients/baseClient.js'; -import type { Config } from '../../../src/config.js'; - -describe('BaseClient', () => { - describe('constructor', () => { - it('should set default apiPrefix if not provided', () => { - const config: Config = { host: 'https://example.com' }; - - new BaseClient(config); - - expect(config.apiPrefix).toBe('/wiki/rest/'); - }); - - it('should keep provided apiPrefix if specified', () => { - const config: Config = { - host: 'https://example.com', - apiPrefix: '/custom/api/', - }; - - new BaseClient(config); - - expect(config.apiPrefix).toBe('/custom/api/'); - }); - - it('should throw ZodError when config validation fails', () => { - const config = { - host: 'invalid-url', // Invalid URL should fail validation - apiPrefix: '/wiki/rest/', - }; - - expect(() => new BaseClient(config)).toThrowError('Couldn\'t parse the host URL. Perhaps you forgot to add \'http://\' or \'https://\' at the beginning of the URL?'); - }); - }); -}); diff --git a/packages/legacy/tests/unit/clients/confluenceClient.test.ts b/packages/legacy/tests/unit/clients/confluenceClient.test.ts deleted file mode 100644 index ca084f66..00000000 --- a/packages/legacy/tests/unit/clients/confluenceClient.test.ts +++ /dev/null @@ -1,31 +0,0 @@ -import { beforeEach, describe, expect, it } from 'vitest'; -import { ConfluenceClient } from '../../../src/clients/index.js'; - -describe('Confluence Client', () => { - let instance: ConfluenceClient; - - beforeEach(() => { - instance = new ConfluenceClient({ host: 'https://127.0.0.1' }); - }); - - it('should have contentComments api group', () => { - expect(instance).toHaveProperty('contentComments'); - }); - - it('should have contentProperties api group', () => { - expect(instance).toHaveProperty('contentProperties'); - }); - - it('should have inlineTasks api group', () => { - expect(instance).toHaveProperty('inlineTasks'); - }); - - it('should have spaceProperties api group', () => { - expect(instance).toHaveProperty('spaceProperties'); - }); - - it('should have userProperties api group', () => { - expect(instance).toHaveProperty('userProperties'); - }); -}); - diff --git a/packages/legacy/tests/unit/index.test.ts b/packages/legacy/tests/unit/index.test.ts deleted file mode 100644 index 269c08a6..00000000 --- a/packages/legacy/tests/unit/index.test.ts +++ /dev/null @@ -1,54 +0,0 @@ -import { describe, it, expect } from 'vitest'; -import type { - Callback, - Client, - Config, - RequestConfig } from '../../src/index.js'; -import { - BaseClient, - ConfluenceClient, -} from '../../src/index.js'; - -describe('Type definitions', () => { - it('Callback should be defined', () => { - const callback: Callback = () => {}; - expect(!!callback).toBeTruthy(); - }); - - it('RequestConfig should be defined', () => { - const requestConfig: RequestConfig = {}; - expect(!!requestConfig).toBeTruthy(); - }); - - it('Config should be defined', () => { - const config: Config = { - host: 'http://localhost', - }; - - expect(!!config).toBeTruthy(); - expect(config.host).toBe('http://localhost'); - expect(typeof config.host).toBe('string'); - }); - - it('Client should be defined', async () => { - const client: Client = { - sendRequest(): Promise { - return Promise.resolve(undefined); - }, - }; - - expect(!!client).toBeTruthy(); - expect(!!client.sendRequest).toBeTruthy(); - expect(!!(await client.sendRequest({}))).toBeFalsy(); - }); - - it('BaseClient should be defined', () => { - const baseClient = new BaseClient({ host: 'http://localhost' }); - expect(!!baseClient).toBeTruthy(); - }); - - it('ConfluenceClient should be defined', () => { - const confluenceClient = new ConfluenceClient({ host: 'http://localhost' }); - expect(!!confluenceClient).toBeTruthy(); - }); -}); diff --git a/packages/legacy/tsconfig.json b/packages/legacy/tsconfig.json deleted file mode 100644 index 4e2f9872..00000000 --- a/packages/legacy/tsconfig.json +++ /dev/null @@ -1,9 +0,0 @@ -{ - "extends": "../../tsconfig.base.json", - "compilerOptions": { - "rootDir": "src", - "outDir": "dist" - }, - "include": ["src"], - "exclude": ["node_modules", "dist"] -} diff --git a/packages/legacy/vite.config.ts b/packages/legacy/vite.config.ts deleted file mode 100644 index c6b36a1d..00000000 --- a/packages/legacy/vite.config.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { dirname, resolve } from 'node:path'; -import { fileURLToPath } from 'node:url'; -import { defineConfig } from 'vite'; -import { externalizeDeps } from 'vite-plugin-externalize-deps'; - -const __dirname = dirname(fileURLToPath(import.meta.url)); -const srcRoot = resolve(__dirname, 'src'); -const distRoot = resolve(__dirname, 'dist'); - -export default defineConfig({ - plugins: [externalizeDeps()], - build: { - ssr: true, - copyPublicDir: false, - emptyOutDir: true, - sourcemap: true, - lib: { - entry: resolve(__dirname, 'src/index.ts'), - }, - rolldownOptions: { - output: [ - { - format: 'es', - dir: distRoot, - entryFileNames: '[name].js', - chunkFileNames: '[name].js', - preserveModules: true, - preserveModulesRoot: srcRoot, - }, - ], - }, - }, -}); diff --git a/packages/legacy/vitest.config.ts b/packages/legacy/vitest.config.ts deleted file mode 100644 index 39903512..00000000 --- a/packages/legacy/vitest.config.ts +++ /dev/null @@ -1,27 +0,0 @@ -import { dirname, resolve } from 'node:path'; -import { fileURLToPath } from 'node:url'; -import { loadEnv } from 'vite'; -import { defineConfig, mergeConfig } from 'vitest/config'; -import { vitestShared } from '../../vitestShared'; - -const __dirname = dirname(fileURLToPath(import.meta.url)); -const repoRoot = resolve(__dirname, '../..'); - -export default defineConfig(({ mode }) => - mergeConfig( - vitestShared, - defineConfig({ - resolve: { - alias: { - '@confluence.js/legacy': resolve(__dirname, 'src/index.ts'), - }, - }, - test: { - name: 'legacy', - root: __dirname, - include: ['tests/**/*.test.ts'], - env: loadEnv(mode, repoRoot, ''), - }, - }), - ), -); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 38d0b4e5..325dff15 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -7,6 +7,10 @@ settings: importers: .: + dependencies: + zod: + specifier: ^4.4.3 + version: 4.4.3 devDependencies: '@arethetypeswrong/cli': specifier: ^0.18.3 @@ -20,6 +24,9 @@ importers: '@stylistic/eslint-plugin': specifier: ^5.10.0 version: 5.10.0(eslint@10.5.0(jiti@2.7.0)) + '@types/jscodeshift': + specifier: ^17.3.0 + version: 17.3.0 '@types/node': specifier: ^22.20.0 version: 22.20.0 @@ -41,6 +48,9 @@ importers: jiti: specifier: ^2.7.0 version: 2.7.0 + jscodeshift: + specifier: ^17.3.0 + version: 17.4.0 prettier: specifier: ^3.8.4 version: 3.8.4 @@ -50,9 +60,18 @@ importers: tsc-alias: specifier: ^1.8.17 version: 1.8.17 + tsx: + specifier: ^4.22.5 + version: 4.23.1 typedoc: specifier: ^0.28.19 version: 0.28.19(typescript@6.0.3) + typedoc-plugin-markdown: + specifier: ^4.12.0 + version: 4.12.0(typedoc@0.28.19(typescript@6.0.3)) + typedoc-vitepress-theme: + specifier: ^1.1.3 + version: 1.1.3(typedoc-plugin-markdown@4.12.0(typedoc@0.28.19(typescript@6.0.3))) typescript: specifier: ^6.0.3 version: 6.0.3 @@ -61,55 +80,91 @@ importers: version: 8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3) vite: specifier: ^8.0.16 - version: 8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0) - vite-plugin-externalize-deps: - specifier: ^0.10.0 - version: 0.10.0(vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0)) + version: 8.0.16(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.23.1)(yaml@2.9.0) + vitepress: + specifier: ^1.6.4 + version: 1.6.4(@algolia/client-search@5.56.0)(@types/node@22.20.0)(axios@1.18.1)(lightningcss@1.32.0)(postcss@8.5.15)(search-insights@2.17.3)(typescript@6.0.3) vitest: specifier: ^4.1.9 - version: 4.1.9(@types/node@22.20.0)(@vitest/coverage-v8@4.1.9)(vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0)) + version: 4.1.9(@types/node@22.20.0)(@vitest/coverage-v8@4.1.9)(vite@8.0.16(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.23.1)(yaml@2.9.0)) - packages/cloud: - dependencies: - '@confluence.js/core': - specifier: workspace:* - version: link:../core - zod: - specifier: ^4.4.3 - version: 4.4.3 +packages: - packages/core: - dependencies: - zod: - specifier: ^4.4.3 - version: 4.4.3 + '@algolia/abtesting@1.22.0': + resolution: {integrity: sha512-BFR6zNowNKcY7Ou7TaJc9QWexES4YKPbmf/OTFofpdsdhz4x6q0lbxp3duO0EHnyrN7rE4ba/TSXuY+BDGu4+g==} + engines: {node: '>= 14.0.0'} - packages/legacy: - dependencies: - '@atlassian/atlassian-jwt': - specifier: ^2.2.0 - version: 2.2.0 - axios: - specifier: ^1.10.0 - version: 1.18.1 - form-data: - specifier: ^4.0.3 - version: 4.0.6 - oauth: - specifier: ^0.10.2 - version: 0.10.2 - zod: - specifier: ^3.25.76 - version: 3.25.76 - devDependencies: - '@types/express': - specifier: ^4.17.23 - version: 4.17.25 - '@types/oauth': - specifier: ^0.9.6 - version: 0.9.6 + '@algolia/autocomplete-core@1.17.7': + resolution: {integrity: sha512-BjiPOW6ks90UKl7TwMv7oNQMnzU+t/wk9mgIDi6b1tXpUek7MW0lbNOUHpvam9pe3lVCf4xPFT+lK7s+e+fs7Q==} -packages: + '@algolia/autocomplete-plugin-algolia-insights@1.17.7': + resolution: {integrity: sha512-Jca5Ude6yUOuyzjnz57og7Et3aXjbwCSDf/8onLHSQgw1qW3ALl9mrMWaXb5FmPVkV3EtkD2F/+NkT6VHyPu9A==} + peerDependencies: + search-insights: '>= 1 < 3' + + '@algolia/autocomplete-preset-algolia@1.17.7': + resolution: {integrity: sha512-ggOQ950+nwbWROq2MOCIL71RE0DdQZsceqrg32UqnhDz8FlO9rL8ONHNsI2R1MH0tkgVIDKI/D0sMiUchsFdWA==} + peerDependencies: + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' + + '@algolia/autocomplete-shared@1.17.7': + resolution: {integrity: sha512-o/1Vurr42U/qskRSuhBH+VKxMvkkUVTLU6WZQr+L5lGZZLYWyhdzWjW0iGXY7EkwRTjBqvN2EsR81yCTGV/kmg==} + peerDependencies: + '@algolia/client-search': '>= 4.9.1 < 6' + algoliasearch: '>= 4.9.1 < 6' + + '@algolia/client-abtesting@5.56.0': + resolution: {integrity: sha512-7r4Z3NC7yU1oAQVWJNA2HX7tX481F3pJvCGyLIXiTdBcthz4Q/o21jwcMYDFkuI92UWTNBQQmHYgwHo1zS5dzg==} + engines: {node: '>= 14.0.0'} + + '@algolia/client-analytics@5.56.0': + resolution: {integrity: sha512-avmjXQSq+jadFO8Xl2em05/uQdQnEmHsJyOAdVbZkmVgpMfxL12aJwVVfGNwYr9nulcpuJN1X0lTaQ5wxuNGcA==} + engines: {node: '>= 14.0.0'} + + '@algolia/client-common@5.56.0': + resolution: {integrity: sha512-v2TPStUhY//ripPjIVclZ8AWc7DEGooXULZGFlFu37zNatgHjw34oZZ+OSbbc/YHO+xZwPl62I1k8xH1m4S2eg==} + engines: {node: '>= 14.0.0'} + + '@algolia/client-insights@5.56.0': + resolution: {integrity: sha512-P0ehROpM4Sem3Sqo5x2cKPgj67D3G3jy0rh1Amwkcvsfr6tkvIcdCmerieanqTF7NxUMPNFLkpIFeMO8Rpa50w==} + engines: {node: '>= 14.0.0'} + + '@algolia/client-personalization@5.56.0': + resolution: {integrity: sha512-SXK3Vn3WVxyzbm31oePZBJkp1wpOyuWdd4B/Pv7n0aXDxmeSWhC1R1FC1517mMrFAIaPH4Rt0x6RUe7ZNjz8FA==} + engines: {node: '>= 14.0.0'} + + '@algolia/client-query-suggestions@5.56.0': + resolution: {integrity: sha512-5+ZdX8garFnmycnZgKhtXHePEaLj5zqDxI/0lkhhluzCcvTn0/PvvTirTg8hHYetQHvn7GDyeAiqTAieMvMW4A==} + engines: {node: '>= 14.0.0'} + + '@algolia/client-search@5.56.0': + resolution: {integrity: sha512-+mKUdYvqOi0BcvpAEyCEw49vSBptufIcfibtHz2bdr1pI789M46Yt0uQEk/sxtK3teh71OQvVFHaTDzShUWewQ==} + engines: {node: '>= 14.0.0'} + + '@algolia/ingestion@1.56.0': + resolution: {integrity: sha512-9g/zj+AZx5moFcdFIrYQoVrueXivjUcc3MQHtCYT8WhIuk1lUh1AyEhvJCS0XBZld09cLvd1AZ3BvDBpVpX2UA==} + engines: {node: '>= 14.0.0'} + + '@algolia/monitoring@1.56.0': + resolution: {integrity: sha512-Qf3Sr6f9A9uxCZUf3MXS0d2b877uYzEB5yxqpVGXAhcJnBCQjrRRon0KvefpGkxy+BshrIJs96OUoMtGqXTFDA==} + engines: {node: '>= 14.0.0'} + + '@algolia/recommend@5.56.0': + resolution: {integrity: sha512-GXWG1rWc5wu8hY4N33Y3b6ernY6sAdAvmKWN/zHAiACOx40WnpG0TVX5YazCAr/9gOYGInSiM2A0y2jy2xbiDA==} + engines: {node: '>= 14.0.0'} + + '@algolia/requester-browser-xhr@5.56.0': + resolution: {integrity: sha512-7t24cBxaInS3mZb7ddEaZT/tp6q+/aR4YttsQVyP1/i+LmwPR34atO35KjaLFCcRVrlP7sYOAqkCfg6lIRB+ew==} + engines: {node: '>= 14.0.0'} + + '@algolia/requester-fetch@5.56.0': + resolution: {integrity: sha512-R7ePHgVYmDFjZpvrsVAfbDz/d4RxKAYZ5/vgLfIsCVRZRryjWl/3INOxpOICzitehQ5FjNtNjcLQTrmHPTcHBQ==} + engines: {node: '>= 14.0.0'} + + '@algolia/requester-node-http@5.56.0': + resolution: {integrity: sha512-PIOUXlSnrqM0S+WOgDRb4RzotydJH7ZoT6tOyL7tAO7qJOfvX5wsEW8Pe+PMKMwvuI4/gIyK9cg2H7lJXqnc4Q==} + engines: {node: '>= 14.0.0'} '@andrewbranch/untar.js@1.0.3': resolution: {integrity: sha512-Jh15/qVmrLGhkKJBdXlK1+9tY4lZruYjsgkDFj08ZmDiWVBLJcqkok7Z0/R0In+i1rScBpJlSvrTS2Lm41Pbnw==} @@ -123,31 +178,204 @@ packages: resolution: {integrity: sha512-sWBB/tdIktaT5xMq0Dz6CJyqcf6oMNdmiKiuPU1lWoJLTL6gjRSsksBuSgqot21hylkklBQY1wiSu+PkZhW7sw==} engines: {node: '>=20'} - '@atlassian/atlassian-jwt@2.2.0': - resolution: {integrity: sha512-h6hLnbRFTEVOB0xa8n0TfQCDZ1hUPFGClrbQbO9ryIGeEsNGG2Vy2S8BWrYJBQrirMmj+FHfVVsbs1M9DIC80Q==} - engines: {node: '>= 0.4.0'} + '@babel/code-frame@7.29.7': + resolution: {integrity: sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==} + engines: {node: '>=6.9.0'} + + '@babel/compat-data@7.29.7': + resolution: {integrity: sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==} + engines: {node: '>=6.9.0'} + + '@babel/core@7.29.7': + resolution: {integrity: sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==} + engines: {node: '>=6.9.0'} + + '@babel/generator@7.29.7': + resolution: {integrity: sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==} + engines: {node: '>=6.9.0'} + + '@babel/helper-annotate-as-pure@7.29.7': + resolution: {integrity: sha512-OoK6239jHPuSQOoS0kfTVKn0b/rVTk0seKq4Gd2UMLtmOVLjDC0ki3e+c90Trqv2gMfvJFqkiljrr568+qddiw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-compilation-targets@7.29.7': + resolution: {integrity: sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-create-class-features-plugin@7.29.7': + resolution: {integrity: sha512-IY3ZD9Tmooqr3TUhc3DUWxiuo8xx1DWLhd5M7hQ+ZWJamqM2BbalrBJb2MisSLoYorOj75U03qULCxQTY9r3hg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-globals@7.29.7': + resolution: {integrity: sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==} + engines: {node: '>=6.9.0'} + + '@babel/helper-member-expression-to-functions@7.29.7': + resolution: {integrity: sha512-j+7JYmk1JYDtACIGj0QJqqWZjoUpMoEikQGADMaHgCMCSDqd2+P32rfcibUNrGOMWrlzK1WJBdxrB3JJQZwWtg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-imports@7.29.7': + resolution: {integrity: sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==} + engines: {node: '>=6.9.0'} + + '@babel/helper-module-transforms@7.29.7': + resolution: {integrity: sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-optimise-call-expression@7.29.7': + resolution: {integrity: sha512-+kmGVjcT9RGYzoDwdwEqEvGgKe3BYq+O1iGzjFubaNgZHwYHP6lsF2Yghf4kEuv9BV7tYDZ913aBW9am6YKong==} + engines: {node: '>=6.9.0'} + + '@babel/helper-plugin-utils@7.29.7': + resolution: {integrity: sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==} + engines: {node: '>=6.9.0'} + + '@babel/helper-replace-supers@7.29.7': + resolution: {integrity: sha512-atfGXWSeCiF4DnKZIfmJfQRkSw9b9gNNXR1kqKjbhG4pGYCOnkp8OcTB8E3NXjBu8NpheSnOeNKz8KT7UNFTmQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0 + + '@babel/helper-skip-transparent-expression-wrappers@7.29.7': + resolution: {integrity: sha512-brcMGQaVzIeUb+6/bs1Av0f8YuNNjKY2JyvfRCsFuFsdKccEQ5Ges2y74D74NZ1Rz8lKJ9ksJkfqwQFJ/iNEyQ==} + engines: {node: '>=6.9.0'} '@babel/helper-string-parser@7.27.1': resolution: {integrity: sha512-qMlSxKbpRlAridDExk92nSobyDdpPijUq2DW6oDnUqd0iOGxmQjyqhMIihI9+zv4LPyZdRje2cavWPbCbWm3eA==} engines: {node: '>=6.9.0'} + '@babel/helper-string-parser@7.29.7': + resolution: {integrity: sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.28.5': resolution: {integrity: sha512-qSs4ifwzKJSV39ucNjsvc6WVHs6b7S03sOh2OcHF9UHfVPqWWALUsNUVzhSBiItjRZoLHx7nIarVjqKVusUZ1Q==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.29.7': + resolution: {integrity: sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==} + engines: {node: '>=6.9.0'} + + '@babel/helper-validator-option@7.29.7': + resolution: {integrity: sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==} + engines: {node: '>=6.9.0'} + + '@babel/helpers@7.29.7': + resolution: {integrity: sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==} + engines: {node: '>=6.9.0'} + '@babel/parser@7.29.3': resolution: {integrity: sha512-b3ctpQwp+PROvU/cttc4OYl4MzfJUWy6FZg+PMXfzmt/+39iHVF0sDfqay8TQM3JA2EUOyKcFZt75jWriQijsA==} engines: {node: '>=6.0.0'} hasBin: true + '@babel/parser@7.29.7': + resolution: {integrity: sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==} + engines: {node: '>=6.0.0'} + hasBin: true + + '@babel/plugin-syntax-flow@7.29.7': + resolution: {integrity: sha512-ajMX6QPcyomotqwpzhkYGxcK2i/us0rs1Qo9QvUpa+Fca0FTmqrzKrctoIYLMxcOhGZldGT/BAVkRGTWBiR8gQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-jsx@7.29.7': + resolution: {integrity: sha512-TSu8+mHCoEaaCDEZ0I3+6mvTBYR4PCxQwf2z9/r5Tbztv6NaLR3B9thGTTxX2WGuGHJqRiAbKPeGTJ5XWXVg6A==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-syntax-typescript@7.29.7': + resolution: {integrity: sha512-ngr+82Sh0xMz25TPCZi+nC2iTzjfCdWS2ONXTp/PtSCHCgaCNBpdMqgvJ2ccdLlClVZ7sisIgB914j/JFe+RZA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-class-properties@7.29.7': + resolution: {integrity: sha512-GtcpjFvanPfzNQi3eTitsCqtRRmmqzpy/A+yhTR1HaZo1Ly3EA8ZXxlPyHdR8/IuRMYc3E4wdGBewB2QKQjAaA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-flow-strip-types@7.29.7': + resolution: {integrity: sha512-wRHeUjUjCZnMHmiO5bRgjFLcoEh7JyTdByOW11ahhwNa4V0bmeGEaIvt51yq0zQp2yWIpqfxXXPyUP6GFJZHOQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-modules-commonjs@7.29.7': + resolution: {integrity: sha512-j0vCldybPC5b5dwCQOJ21uKtHzt7hxLygJTg9eF1ScfaikEDNfzn94XoW5Fi+seBR0nCyL23xaBFFkq7dTM8XQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-nullish-coalescing-operator@7.29.7': + resolution: {integrity: sha512-idmp1dFaekP9GbcMvG24Kvw2BfhFZjHnNJCkV4WuIY4PskJzwI3f1N5OdgYke38T7rftO6ERulFRn2cFeZwRkg==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-optional-chaining@7.29.7': + resolution: {integrity: sha512-6GM1dhvK3gNODkXcEcMCOLEDCLSoZ/sBbro2Ax8HURyasQ4NshagQixkRFdh5niI6E4gmA/jYI/4aT7rRos3ZQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-private-methods@7.29.7': + resolution: {integrity: sha512-/6Rz4DK1ETDEM/bWHsPHcaEe7ZaT1EqSXjtSP/L0DijOYuaUhiRiOKcwpZ8P7zR4xXEHc2ITdiCgBm9Tpyv9ug==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/plugin-transform-typescript@7.29.7': + resolution: {integrity: sha512-jK52h8LaLc7JarhQV2ofeFMts4H7vnOXnqZNA6fYglBTZewRBE51KWt3BUltW1P+KoPsYkHoJeXePuz4zo2LMw==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/preset-flow@7.29.7': + resolution: {integrity: sha512-KYIRV0BuaN68CDdsqFkAD7MU7yipUqQNuNElwATdxaIdpTjhvtY82QvkBJs7zV3Evxj2jFAAZ1iO8nyy0nhjqA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/preset-typescript@7.29.7': + resolution: {integrity: sha512-/Foi8vKY2EVbed/1eZx0gJEEwHAIxogrySI7rULcRIvhZzbvoE/b5qG5Ghc0WKAFKOHA9SD1x7RsFlOYdutIiQ==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + + '@babel/register@7.29.7': + resolution: {integrity: sha512-AMGJoWuES861riy6pcB0fphE1YXybtQnBYQMuIyPv6mKLiosfa79BKTnAOyx215c/3RJPJpdQwoHZ3earVH7AA==} + engines: {node: '>=6.9.0'} + peerDependencies: + '@babel/core': ^7.0.0-0 + '@babel/runtime@7.29.2': resolution: {integrity: sha512-JiDShH45zKHWyGe4ZNVRrCjBz8Nh9TMmZG1kh4QTK8hCBTWBi8Da+i7s1fJw7/lYpM4ccepSNfqzZ/QvABBi5g==} engines: {node: '>=6.9.0'} + '@babel/template@7.29.7': + resolution: {integrity: sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==} + engines: {node: '>=6.9.0'} + + '@babel/traverse@7.29.7': + resolution: {integrity: sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==} + engines: {node: '>=6.9.0'} + '@babel/types@7.29.0': resolution: {integrity: sha512-LwdZHpScM4Qz8Xw2iKSzS+cfglZzJGvofQICy7W7v4caru4EaAmyUuO6BGrbyQ2mYV11W0U8j5mBhd14dd3B0A==} engines: {node: '>=6.9.0'} + '@babel/types@7.29.7': + resolution: {integrity: sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==} + engines: {node: '>=6.9.0'} + '@bcoe/v8-coverage@1.0.2': resolution: {integrity: sha512-6zABk/ECA/QYSCQ1NGiVwwbQerUCZ+TQbp64Q3AgmfNvurHH0j8TtXa1qbShXA6qqkpAj4V5W8pP6mLe1mcMqA==} engines: {node: '>=18'} @@ -214,6 +442,29 @@ packages: resolution: {integrity: sha512-ooWCrlZP11i8GImSjTHYHLkvFDP48nS4+204nGb1RiX/WXYHmJA2III9/e2DWVabCESdW7hBAEzHRqUn9OUVvQ==} engines: {node: '>=0.1.90'} + '@docsearch/css@3.8.2': + resolution: {integrity: sha512-y05ayQFyUmCXze79+56v/4HpycYF3uFqB78pLPrSV5ZKAlDuIAAJNhaRi8tTdRNXh05yxX/TyNnzD6LwSM89vQ==} + + '@docsearch/js@3.8.2': + resolution: {integrity: sha512-Q5wY66qHn0SwA7Taa0aDbHiJvaFJLOJyHmooQ7y8hlwwQLQ/5WwCcoX0g7ii04Qi2DJlHsd0XXzJ8Ypw9+9YmQ==} + + '@docsearch/react@3.8.2': + resolution: {integrity: sha512-xCRrJQlTt8N9GU0DG4ptwHRkfnSnD/YpdeaXe02iKfqs97TkZJv60yE+1eq/tjPcVnTW8dP5qLP7itifFVV5eg==} + peerDependencies: + '@types/react': '>= 16.8.0 < 19.0.0' + react: '>= 16.8.0 < 19.0.0' + react-dom: '>= 16.8.0 < 19.0.0' + search-insights: '>= 1 < 3' + peerDependenciesMeta: + '@types/react': + optional: true + react: + optional: true + react-dom: + optional: true + search-insights: + optional: true + '@emnapi/core@1.10.0': resolution: {integrity: sha512-yq6OkJ4p82CAfPl0u9mQebQHKPJkY7WrIuk205cTYnYe+k2Z8YBh11FrbRG/H6ihirqcacOgl2BIO8oyMQLeXw==} @@ -223,94 +474,400 @@ packages: '@emnapi/wasi-threads@1.2.1': resolution: {integrity: sha512-uTII7OYF+/Mes/MrcIOYp5yOtSMLBWSIoLPpcgwipoiKbli6k322tcoFsxoIIxPDqW01SQGAgko4EzZi2BNv2w==} - '@eslint-community/eslint-utils@4.9.1': - resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} - engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - peerDependencies: - eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - - '@eslint-community/regexpp@4.12.2': - resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} - engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + '@esbuild/aix-ppc64@0.21.5': + resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] - '@eslint/config-array@0.23.5': - resolution: {integrity: sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} + '@esbuild/aix-ppc64@0.28.1': + resolution: {integrity: sha512-Svl7tq8k/08+p6CXPpRjQ1fKX+1odH/BQbb48fV6fj3CWHhsoIOoY87w1oHXm0qEpkIK3ZfVgp0hed3XBXzXMQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] - '@eslint/config-helpers@0.6.0': - resolution: {integrity: sha512-ii6Bw9jJ2zi2cWA2Z+9/QZ/+3DX6kwaV5Q986D/CdP3Lap3w/pgQZ373FV7byY/i7L4IRH/G43I5dz1ClsCbpA==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} + '@esbuild/android-arm64@0.21.5': + resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] - '@eslint/core@1.2.1': - resolution: {integrity: sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} + '@esbuild/android-arm64@0.28.1': + resolution: {integrity: sha512-34EGEbCIAgosYz6goLcopX6Mo7NyGv9tfwEM2/7Ce2VcVRk568iSvniGWcUXIy7wEDR1wzolcxcriFVrWYcwBg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] - '@eslint/js@10.0.1': - resolution: {integrity: sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} - peerDependencies: - eslint: ^10.0.0 - peerDependenciesMeta: - eslint: - optional: true + '@esbuild/android-arm@0.21.5': + resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] - '@eslint/object-schema@3.0.5': - resolution: {integrity: sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} + '@esbuild/android-arm@0.28.1': + resolution: {integrity: sha512-0k2F129Xdio1TdJfzJ8sy1Q47vUD2NnwdhiAf7drUN1EBTfPf4hsFCtmMgu/6m8JSzsBrlmVjudMBQqOfG8usQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] - '@eslint/plugin-kit@0.7.2': - resolution: {integrity: sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==} - engines: {node: ^20.19.0 || ^22.13.0 || >=24} + '@esbuild/android-x64@0.21.5': + resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] - '@gerrit0/mini-shiki@3.23.0': - resolution: {integrity: sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==} + '@esbuild/android-x64@0.28.1': + resolution: {integrity: sha512-dbwY7ltSMDWsRatcRpCnES4F+im88OCUgGZjy52shC7GqHRE/cYlxNbB4Z4UpJswpcc4Qxd2oE/ufM0p61IKng==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] - '@humanfs/core@0.19.2': - resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} - engines: {node: '>=18.18.0'} + '@esbuild/darwin-arm64@0.21.5': + resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] - '@humanfs/node@0.16.8': - resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} - engines: {node: '>=18.18.0'} + '@esbuild/darwin-arm64@0.28.1': + resolution: {integrity: sha512-TZbWkQY7kvTAXbXUT7uVACR5cMHsDiSz9z7ZKAX/RTq/WJEk3QyRr0wZpNhBDX+/0CtdqUIJlOiodQcta6tY3Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] - '@humanfs/types@0.15.0': - resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} - engines: {node: '>=18.18.0'} + '@esbuild/darwin-x64@0.21.5': + resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] - '@humanwhocodes/module-importer@1.0.1': - resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} - engines: {node: '>=12.22'} + '@esbuild/darwin-x64@0.28.1': + resolution: {integrity: sha512-zfdzgK9ACBNZLI/CyHTOx81SyNbM6YXn7rxSgX97VjyiPl9W1i4Ka4fgKECEoFCKGpvBj5qArWIGgQjOwkgskQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] - '@humanwhocodes/retry@0.4.3': - resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} - engines: {node: '>=18.18'} + '@esbuild/freebsd-arm64@0.21.5': + resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] - '@inquirer/external-editor@1.0.3': - resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==} + '@esbuild/freebsd-arm64@0.28.1': + resolution: {integrity: sha512-wG2EA8ENdEI0qhkSZMjfqrdY+ziCYCPMmtZjjIwOmXFjmyzEHn+UUxk5of+SYsjtfs3VpnlC7QLzSI5hY/rOAw==} engines: {node: '>=18'} - peerDependencies: - '@types/node': '>=18' - peerDependenciesMeta: - '@types/node': - optional: true + cpu: [arm64] + os: [freebsd] - '@jridgewell/resolve-uri@3.1.2': - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} - engines: {node: '>=6.0.0'} + '@esbuild/freebsd-x64@0.21.5': + resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] - '@jridgewell/sourcemap-codec@1.5.5': - resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + '@esbuild/freebsd-x64@0.28.1': + resolution: {integrity: sha512-i7dZ9vQgnvSCzi/rYCXNgtF/U+eKZNJBzu3eTQbRgHnM7tNSizLOkRFAl3qzVc/Op/u5YkHHa4pf/3DOYHthLQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] - '@jridgewell/trace-mapping@0.3.31': - resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + '@esbuild/linux-arm64@0.21.5': + resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] - '@loaderkit/resolve@1.0.6': - resolution: {integrity: sha512-G8FdIoF5CypfwmD9rl8BXod5HDn8JqB0CCNBXDTaRZ+yRYhARrrSToX1zg1zy9jX3zLqigsELwhT4gNtkdQAUg==} + '@esbuild/linux-arm64@0.28.1': + resolution: {integrity: sha512-yHs+0uc8+nvEAfAfxrWQKK5peSNzBc4PegcMO0EJ2hT71uA7vB8Ihg2e77R2P7SG5uYjPbHlLLmve4LLLRCf0g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] - '@manypkg/find-root@1.1.0': - resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} + '@esbuild/linux-arm@0.21.5': + resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] - '@manypkg/get-packages@1.1.3': + '@esbuild/linux-arm@0.28.1': + resolution: {integrity: sha512-qVXBOHQS+d5Y722GwJzJUtOLlX7km3CraOaGormF1pDtPd2C/l1SHRPgjLunLGe51Sh5YYWKMFDyV4SxgMQYTQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-ia32@0.21.5': + resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-ia32@0.28.1': + resolution: {integrity: sha512-d1z4ZuP0ajrfz/FhGT4vv278rX8KnPPJx8i5+AtK7TYbx9Le9F1hyzurZpkEyjkGa9dUGhQow4C1NmeGvqxN2w==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-loong64@0.21.5': + resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-loong64@0.28.1': + resolution: {integrity: sha512-M5sRjUVZrkm1OAPR3dlOYzNmN+loZKGVi1VUQGrwuqLcbR6qeAz+famMhjASeH3YVKvZz+zT1jlh/keC3Rj/lg==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-mips64el@0.21.5': + resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-mips64el@0.28.1': + resolution: {integrity: sha512-mRObBZeHh2OxcBFPWE/FjylkRgZdYuiTR3vaTozquCGOH14iP9oN4x4Ge81CoIDYQrXmIxpFumJBu5MtZpnQJQ==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-ppc64@0.21.5': + resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-ppc64@0.28.1': + resolution: {integrity: sha512-slScBsMAb3GFDcdrCgLwZtPYRoH2H/youv10QiZyRjmsP48fznoveWytSgCI/R0ZcUgpc0ZhIUEx6LHts8yrfQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-riscv64@0.21.5': + resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-riscv64@0.28.1': + resolution: {integrity: sha512-kw0owk1o0GFETUJyW0jc0G4Yzs0BHZn0JDZ8JRT088vjJYX777BAs1fDGxAC+q831qOs2DTC96mNsG2opdfyyQ==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-s390x@0.21.5': + resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-s390x@0.28.1': + resolution: {integrity: sha512-/lAIjX8aYFRByhh6L5rYtPEDRqa9de/4V/juOXcta5frjvzXO4/sqEtyytse0g3zZFuWu5cDN0MkLz2qRDD2Ag==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-x64@0.21.5': + resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + + '@esbuild/linux-x64@0.28.1': + resolution: {integrity: sha512-u/anNYF2mmVOEDwLtnQ1wOr3EZ9sTNGLWrsYGYwHWzGA3Si84IOkHXlbWTD1NB+9/1lcnweYKO54uhxZydNzfA==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + + '@esbuild/netbsd-arm64@0.28.1': + resolution: {integrity: sha512-oks0DYbLwWMmaakTsCb+zL4E+aHRVLom9IJZOAthMQEPiQmydXHkziYEsGYRx0uNV/IjEKGAV941JzH02pflqw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.21.5': + resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.28.1': + resolution: {integrity: sha512-aeL6lAnN89Hz43Mlh1G8ARasbuoYvSITDEx0tHh5b7jJnHcssqgjy9Yx430GDpmCa6OyrKoS0aNRjKundRizGg==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.28.1': + resolution: {integrity: sha512-MEFJe5C3R8pwXdZ5Y21oo6m7ePiS0d9pWucn99O/wvyJZChoIQKrQDxKrGeW8F5+T0okTHesAmDeiHDTIq0V/Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.21.5': + resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.28.1': + resolution: {integrity: sha512-i/ZLIOafE0Z8cI/XANJAixoJL/uRAoS2xOA3rb0xN+KK0K177cMAsQYkzHtBrtMXAKuAc7HGgcWiZ/sRC1Nxgw==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openharmony-arm64@0.28.1': + resolution: {integrity: sha512-ge+Z7EXFNt2BO1oAMsVpiQ8EwndV9i1xXerAeTIK7AtPs3bKFXQM7nlRxDSIUIMeueR1CNXxqztLzdNeReKBJg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openharmony] + + '@esbuild/sunos-x64@0.21.5': + resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + + '@esbuild/sunos-x64@0.28.1': + resolution: {integrity: sha512-BEjgtECkL3vY+SaSQ6nzVfiALUeFxpawyp8Jmf5PtYhf1Ug40N1h/hxlhts+f1FvSvarEigdxS3BlSMI2PJLcQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + + '@esbuild/win32-arm64@0.21.5': + resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-arm64@0.28.1': + resolution: {integrity: sha512-lCv9eK/H6ZJWbE7bh2nw54CZ9M2nupBxJcTsdk/QQnWkdSjKGuxmmH8/GWrlT1eMmZfn4dGcCjRte397WqfQXA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-ia32@0.21.5': + resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-ia32@0.28.1': + resolution: {integrity: sha512-zvb/mB2bSCoJOpoCBgYKKpX6YM6mJBlBUVUtVj41DlZJVEB6/0CKlRYxP5wWl1C1ILiCoAU5wZZ4q1P3qeS6Eg==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-x64@0.21.5': + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + + '@esbuild/win32-x64@0.28.1': + resolution: {integrity: sha512-bm4Mowrv+GXMlpWX++EcXw/iLyd1o3+bJkC2DkWXYVvgZCqD/bSj9ctZeAMC3cIxgjRVR2Dufaiu4YPxr5gW1A==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@eslint-community/eslint-utils@4.9.1': + resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==} + engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + peerDependencies: + eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 + + '@eslint-community/regexpp@4.12.2': + resolution: {integrity: sha512-EriSTlt5OC9/7SXkRSCAhfSxxoSUgBm33OH+IkwbdpgoqsSsUg7y3uh+IICI/Qg4BBWr3U2i39RpmycbxMq4ew==} + engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} + + '@eslint/config-array@0.23.5': + resolution: {integrity: sha512-Y3kKLvC1dvTOT+oGlqNQ1XLqK6D1HU2YXPc52NmAlJZbMMWDzGYXMiPRJ8TYD39muD/OTjlZmNJ4ib7dvSrMBA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@eslint/config-helpers@0.6.0': + resolution: {integrity: sha512-ii6Bw9jJ2zi2cWA2Z+9/QZ/+3DX6kwaV5Q986D/CdP3Lap3w/pgQZ373FV7byY/i7L4IRH/G43I5dz1ClsCbpA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@eslint/core@1.2.1': + resolution: {integrity: sha512-MwcE1P+AZ4C6DWlpin/OmOA54mmIZ/+xZuJiQd4SyB29oAJjN30UW9wkKNptW2ctp4cEsvhlLY/CsQ1uoHDloQ==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@eslint/js@10.0.1': + resolution: {integrity: sha512-zeR9k5pd4gxjZ0abRoIaxdc7I3nDktoXZk2qOv9gCNWx3mVwEn32VRhyLaRsDiJjTs0xq/T8mfPtyuXu7GWBcA==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + peerDependencies: + eslint: ^10.0.0 + peerDependenciesMeta: + eslint: + optional: true + + '@eslint/object-schema@3.0.5': + resolution: {integrity: sha512-vqTaUEgxzm+YDSdElad6PiRoX4t8VGDjCtt05zn4nU810UIx/uNEV7/lZJ6KwFThKZOzOxzXy48da+No7HZaMw==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@eslint/plugin-kit@0.7.2': + resolution: {integrity: sha512-+CNAzxglkrpNf/kKywqQfk74QjtceuOE7Qm+AF8miRvPF/wmmK5+OJOgVh3AVTT3RP2mH3+FOaxlE5v72owk0A==} + engines: {node: ^20.19.0 || ^22.13.0 || >=24} + + '@gerrit0/mini-shiki@3.23.0': + resolution: {integrity: sha512-bEMORlG0cqdjVyCEuU0cDQbORWX+kYCeo0kV1lbxF5bt4r7SID2l9bqsxJEM0zndaxpOUT7riCyIVEuqq/Ynxg==} + + '@humanfs/core@0.19.2': + resolution: {integrity: sha512-UhXNm+CFMWcbChXywFwkmhqjs3PRCmcSa/hfBgLIb7oQ5HNb1wS0icWsGtSAUNgefHeI+eBrA8I1fxmbHsGdvA==} + engines: {node: '>=18.18.0'} + + '@humanfs/node@0.16.8': + resolution: {integrity: sha512-gE1eQNZ3R++kTzFUpdGlpmy8kDZD/MLyHqDwqjkVQI0JMdI1D51sy1H958PNXYkM2rAac7e5/CnIKZrHtPh3BQ==} + engines: {node: '>=18.18.0'} + + '@humanfs/types@0.15.0': + resolution: {integrity: sha512-ZZ1w0aoQkwuUuC7Yf+7sdeaNfqQiiLcSRbfI08oAxqLtpXQr9AIVX7Ay7HLDuiLYAaFPu8oBYNq/QIi9URHJ3Q==} + engines: {node: '>=18.18.0'} + + '@humanwhocodes/module-importer@1.0.1': + resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} + engines: {node: '>=12.22'} + + '@humanwhocodes/retry@0.4.3': + resolution: {integrity: sha512-bV0Tgo9K4hfPCek+aMAn81RppFKv2ySDQeMoSZuvTASywNTnVJCArCZE2FWqpvIatKu7VMRLWlR1EazvVhDyhQ==} + engines: {node: '>=18.18'} + + '@iconify-json/simple-icons@1.2.90': + resolution: {integrity: sha512-zt2o2ZvQpHVvZJARIkZ51RnaHY2oqcPJMvHE+mVnxkSr+c33fnX4gciiXu+wyX5ei+s0qbVX1wD0DWBbaGBYMA==} + + '@iconify/types@2.0.0': + resolution: {integrity: sha512-+wluvCrRhXrhyOmRDJ3q8mux9JkKy5SJ/v8ol2tu4FVjyYvtEzkc/3pK15ET6RKg4b4w4BmTk1+gsCUhf21Ykg==} + + '@inquirer/external-editor@1.0.3': + resolution: {integrity: sha512-RWbSrDiYmO4LbejWY7ttpxczuwQyZLBUyygsA9Nsv95hpzUWwnNTVQmAq3xuh7vNwCp07UTmE5i11XAEExx4RA==} + engines: {node: '>=18'} + peerDependencies: + '@types/node': '>=18' + peerDependenciesMeta: + '@types/node': + optional: true + + '@jridgewell/gen-mapping@0.3.13': + resolution: {integrity: sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==} + + '@jridgewell/remapping@2.3.5': + resolution: {integrity: sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==} + + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + + '@jridgewell/sourcemap-codec@1.5.5': + resolution: {integrity: sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==} + + '@jridgewell/trace-mapping@0.3.31': + resolution: {integrity: sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==} + + '@loaderkit/resolve@1.0.6': + resolution: {integrity: sha512-G8FdIoF5CypfwmD9rl8BXod5HDn8JqB0CCNBXDTaRZ+yRYhARrrSToX1zg1zy9jX3zLqigsELwhT4gNtkdQAUg==} + + '@manypkg/find-root@1.1.0': + resolution: {integrity: sha512-mki5uBvhHzO8kYYix/WRy2WX8S3B5wdVSc9D6KcU5lQNglP2yt58/VfLuAK49glRXChosY8ap2oJ1qgma3GUVA==} + + '@manypkg/get-packages@1.1.3': resolution: {integrity: sha512-fo+QhuU3qE/2TQMQmbVMqaQ6EWbMhi4ABWP+O4AM1NqPBuy0OrApV5LO6BrrgnhtAHS2NH6RrVk9OL181tTi8A==} '@napi-rs/wasm-runtime@1.1.4': @@ -432,51 +989,204 @@ packages: '@rolldown/pluginutils@1.0.1': resolution: {integrity: sha512-2j9bGt5Jh8hj+vPtgzPtl72j0yRxHAyumoo6TNfAjsLB04UtpSvPbPcDcBMxz7n+9CYB0c1GxQFxYRg2jimqGw==} - '@shikijs/engine-oniguruma@3.23.0': - resolution: {integrity: sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==} + '@rollup/rollup-android-arm-eabi@4.62.2': + resolution: {integrity: sha512-6o7ZLZK+BeenkZCFNDXqpbjw9bD6nuWonvS/lwQJp7NoVVxm6p3qE7qQ5jGuBjiFsgvqjD8mZAU5oWxTmbOeOg==} + cpu: [arm] + os: [android] - '@shikijs/langs@3.23.0': - resolution: {integrity: sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==} + '@rollup/rollup-android-arm64@4.62.2': + resolution: {integrity: sha512-BaH7BllCACHoH1LguOU56UItGfUWjujlO65kS9LAodViaN4bwIKd7oeW/ZHJ/4ljr/7MIiENnNy3HJ0zXv8Zkw==} + cpu: [arm64] + os: [android] - '@shikijs/themes@3.23.0': - resolution: {integrity: sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==} + '@rollup/rollup-darwin-arm64@4.62.2': + resolution: {integrity: sha512-v39RCCvj4He82I9sFmk+M1VZ0PLM9sfsLVikjfx2hYBNALhrrOR2D3JjQA6AhlaSOgcR+RzrKY7e1+bT6SUO/A==} + cpu: [arm64] + os: [darwin] - '@shikijs/types@3.23.0': - resolution: {integrity: sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==} + '@rollup/rollup-darwin-x64@4.62.2': + resolution: {integrity: sha512-yl0y2vq3S3lHeuXhEdss6TWfKW8vkujImO12tn4ZkG/4oghr09LvdYm2RElVjokTQiUvDUGXLGsYeLqUMCKpGA==} + cpu: [x64] + os: [darwin] - '@shikijs/vscode-textmate@10.0.2': - resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} + '@rollup/rollup-freebsd-arm64@4.62.2': + resolution: {integrity: sha512-tT4pvt4qXD+vEoezupCWi+a1F0vvDiksiHc+PxRlYTOH1I6/X4id9jPxTP+Fg+545euaFT1jJVs4CEdHZAU1vw==} + cpu: [arm64] + os: [freebsd] - '@sindresorhus/is@4.6.0': - resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} - engines: {node: '>=10'} + '@rollup/rollup-freebsd-x64@4.62.2': + resolution: {integrity: sha512-6nU5F2wCW+qvCBhTn1pdIU3bzsIoF7EUwsCDRxilWGprQR6yd508YnH9+OKFCwpfS8pjZqDUmnCAr7exax0XCg==} + cpu: [x64] + os: [freebsd] - '@standard-schema/spec@1.1.0': - resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + '@rollup/rollup-linux-arm-gnueabihf@4.62.2': + resolution: {integrity: sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==} + cpu: [arm] + os: [linux] + libc: [glibc] - '@stylistic/eslint-plugin@5.10.0': - resolution: {integrity: sha512-nPK52ZHvot8Ju/0A4ucSX1dcPV2/1clx0kLcH5wDmrE4naKso7TUC/voUyU1O9OTKTrR6MYip6LP0ogEMQ9jPQ==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^9.0.0 || ^10.0.0 + '@rollup/rollup-linux-arm-musleabihf@4.62.2': + resolution: {integrity: sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==} + cpu: [arm] + os: [linux] + libc: [musl] - '@tybys/wasm-util@0.10.2': - resolution: {integrity: sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==} + '@rollup/rollup-linux-arm64-gnu@4.62.2': + resolution: {integrity: sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==} + cpu: [arm64] + os: [linux] + libc: [glibc] - '@types/body-parser@1.19.6': - resolution: {integrity: sha512-HLFeCYgz89uk22N5Qg3dvGvsv46B8GLvKKo1zKG4NybA8U2DiEO3w9lqGg29t/tfLRJpJ6iQxnVw4OnB7MoM9g==} + '@rollup/rollup-linux-arm64-musl@4.62.2': + resolution: {integrity: sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==} + cpu: [arm64] + os: [linux] + libc: [musl] - '@types/chai@5.2.2': - resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} + '@rollup/rollup-linux-loong64-gnu@4.62.2': + resolution: {integrity: sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==} + cpu: [loong64] + os: [linux] + libc: [glibc] - '@types/connect@3.4.38': - resolution: {integrity: sha512-K6uROf1LD88uDQqJCktA4yzL1YYAK6NgfsI0v/mTgyPKWsX1CnJ0XPSDhViejru1GcRkLWb8RlzFYJRqGUbaug==} + '@rollup/rollup-linux-loong64-musl@4.62.2': + resolution: {integrity: sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==} + cpu: [loong64] + os: [linux] + libc: [musl] - '@types/debug@4.1.12': - resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + '@rollup/rollup-linux-ppc64-gnu@4.62.2': + resolution: {integrity: sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==} + cpu: [ppc64] + os: [linux] + libc: [glibc] - '@types/deep-eql@4.0.2': - resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} + '@rollup/rollup-linux-ppc64-musl@4.62.2': + resolution: {integrity: sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==} + cpu: [ppc64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-riscv64-gnu@4.62.2': + resolution: {integrity: sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==} + cpu: [riscv64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-riscv64-musl@4.62.2': + resolution: {integrity: sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==} + cpu: [riscv64] + os: [linux] + libc: [musl] + + '@rollup/rollup-linux-s390x-gnu@4.62.2': + resolution: {integrity: sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==} + cpu: [s390x] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-gnu@4.62.2': + resolution: {integrity: sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==} + cpu: [x64] + os: [linux] + libc: [glibc] + + '@rollup/rollup-linux-x64-musl@4.62.2': + resolution: {integrity: sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==} + cpu: [x64] + os: [linux] + libc: [musl] + + '@rollup/rollup-openbsd-x64@4.62.2': + resolution: {integrity: sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==} + cpu: [x64] + os: [openbsd] + + '@rollup/rollup-openharmony-arm64@4.62.2': + resolution: {integrity: sha512-8hOJnxgbyObnCm5AlRA3A931xX19xq80RjVTKgJOvEKWqJruP/Uf12IbAOaDjjEXYRewwHLfmF0YRIdK3OwKWA==} + cpu: [arm64] + os: [openharmony] + + '@rollup/rollup-win32-arm64-msvc@4.62.2': + resolution: {integrity: sha512-mmF4AY1i0hG/bLWUctUq59gtmgaSIRa3cu/A3JFRp/sCNEme2bgDEiDS22P9FbnJB8NJNF4jPJiSP5RHQpUTDg==} + cpu: [arm64] + os: [win32] + + '@rollup/rollup-win32-ia32-msvc@4.62.2': + resolution: {integrity: sha512-DZgkknc6jhHrk46V25vbAM0zZkyP0nSDkJB8/dRkLTxv470dOmWDqGoEJl/9A0dFfS7yE3REOwNDxpHwSLSt0Q==} + cpu: [ia32] + os: [win32] + + '@rollup/rollup-win32-x64-gnu@4.62.2': + resolution: {integrity: sha512-T6xr6ucWSFto+VGajA8YH26LdpHRuP4YLHEKAtCWvJDOlnmWcDZVCI2Jmjr+IFHDlt2zRaTAKE4tfjTaWLgJBg==} + cpu: [x64] + os: [win32] + + '@rollup/rollup-win32-x64-msvc@4.62.2': + resolution: {integrity: sha512-BfzEnDJOt9T8M989/lA37EcJgat01wLRnoi5dQf3QzOH7jzpqTAzdDbVfRljVr5r+jzKqpbHeyOfAaXxAd0PAA==} + cpu: [x64] + os: [win32] + + '@shikijs/core@2.5.0': + resolution: {integrity: sha512-uu/8RExTKtavlpH7XqnVYBrfBkUc20ngXiX9NSrBhOVZYv/7XQRKUyhtkeflY5QsxC0GbJThCerruZfsUaSldg==} + + '@shikijs/engine-javascript@2.5.0': + resolution: {integrity: sha512-VjnOpnQf8WuCEZtNUdjjwGUbtAVKuZkVQ/5cHy/tojVVRIRtlWMYVjyWhxOmIq05AlSOv72z7hRNRGVBgQOl0w==} + + '@shikijs/engine-oniguruma@2.5.0': + resolution: {integrity: sha512-pGd1wRATzbo/uatrCIILlAdFVKdxImWJGQ5rFiB5VZi2ve5xj3Ax9jny8QvkaV93btQEwR/rSz5ERFpC5mKNIw==} + + '@shikijs/engine-oniguruma@3.23.0': + resolution: {integrity: sha512-1nWINwKXxKKLqPibT5f4pAFLej9oZzQTsby8942OTlsJzOBZ0MWKiwzMsd+jhzu8YPCHAswGnnN1YtQfirL35g==} + + '@shikijs/langs@2.5.0': + resolution: {integrity: sha512-Qfrrt5OsNH5R+5tJ/3uYBBZv3SuGmnRPejV9IlIbFH3HTGLDlkqgHymAlzklVmKBjAaVmkPkyikAV/sQ1wSL+w==} + + '@shikijs/langs@3.23.0': + resolution: {integrity: sha512-2Ep4W3Re5aB1/62RSYQInK9mM3HsLeB91cHqznAJMuylqjzNVAVCMnNWRHFtcNHXsoNRayP9z1qj4Sq3nMqYXg==} + + '@shikijs/themes@2.5.0': + resolution: {integrity: sha512-wGrk+R8tJnO0VMzmUExHR+QdSaPUl/NKs+a4cQQRWyoc3YFbUzuLEi/KWK1hj+8BfHRKm2jNhhJck1dfstJpiw==} + + '@shikijs/themes@3.23.0': + resolution: {integrity: sha512-5qySYa1ZgAT18HR/ypENL9cUSGOeI2x+4IvYJu4JgVJdizn6kG4ia5Q1jDEOi7gTbN4RbuYtmHh0W3eccOrjMA==} + + '@shikijs/transformers@2.5.0': + resolution: {integrity: sha512-SI494W5X60CaUwgi8u4q4m4s3YAFSxln3tzNjOSYqq54wlVgz0/NbbXEb3mdLbqMBztcmS7bVTaEd2w0qMmfeg==} + + '@shikijs/types@2.5.0': + resolution: {integrity: sha512-ygl5yhxki9ZLNuNpPitBWvcy9fsSKKaRuO4BAlMyagszQidxcpLAr0qiW/q43DtSIDxO6hEbtYLiFZNXO/hdGw==} + + '@shikijs/types@3.23.0': + resolution: {integrity: sha512-3JZ5HXOZfYjsYSk0yPwBrkupyYSLpAE26Qc0HLghhZNGTZg/SKxXIIgoxOpmmeQP0RRSDJTk1/vPfw9tbw+jSQ==} + + '@shikijs/vscode-textmate@10.0.2': + resolution: {integrity: sha512-83yeghZ2xxin3Nj8z1NMd/NCuca+gsYXswywDy5bHvwlWL8tpTQmzGeUuHd9FC3E/SBEMvzJRwWEOz5gGes9Qg==} + + '@sindresorhus/is@4.6.0': + resolution: {integrity: sha512-t09vSN3MdfsyCHoFcTRCH/iUtG7OJ0CsjzB8cjAmKc/va/kIgeDI/TxsigdncE/4be734m0cvIYwNaV4i2XqAw==} + engines: {node: '>=10'} + + '@standard-schema/spec@1.1.0': + resolution: {integrity: sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==} + + '@stylistic/eslint-plugin@5.10.0': + resolution: {integrity: sha512-nPK52ZHvot8Ju/0A4ucSX1dcPV2/1clx0kLcH5wDmrE4naKso7TUC/voUyU1O9OTKTrR6MYip6LP0ogEMQ9jPQ==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^9.0.0 || ^10.0.0 + + '@tybys/wasm-util@0.10.2': + resolution: {integrity: sha512-RoBvJ2X0wuKlWFIjrwffGw1IqZHKQqzIchKaadZZfnNpsAYp2mM0h36JtPCjNDAHGgYez/15uMBpfGwchhiMgg==} + + '@types/chai@5.2.2': + resolution: {integrity: sha512-8kB30R7Hwqf40JPiKhVzodJs2Qc1ZJ5zuT3uzw5Hq/dhNCl3G3l83jfpdI1e20BP348+fV7VIL/+FxaXkqBmWg==} + + '@types/debug@4.1.12': + resolution: {integrity: sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ==} + + '@types/deep-eql@4.0.2': + resolution: {integrity: sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==} '@types/esrecurse@4.3.1': resolution: {integrity: sha512-xJBAbDifo5hpffDBuHl0Y8ywswbiAp/Wi7Y/GtAgSlZyIABppyurxVueOPE8LUQOxdlgi6Zqce7uoEpqNTeiUw==} @@ -484,26 +1194,29 @@ packages: '@types/estree@1.0.8': resolution: {integrity: sha512-dWHzHa2WqEXI/O1E9OjrocMTKJl2mSrEolh1Iomrv6U+JuNwaHXsXx9bLu5gG7BUWFIN0skIQJQ/L1rIex4X6w==} - '@types/express-serve-static-core@4.19.8': - resolution: {integrity: sha512-02S5fmqeoKzVZCHPZid4b8JH2eM5HzQLZWN2FohQEy/0eXTq8VXZfSN6Pcr3F6N9R/vNrj7cpgbhjie6m/1tCA==} - - '@types/express@4.17.25': - resolution: {integrity: sha512-dVd04UKsfpINUnK0yBoYHDF3xu7xVH4BuDotC/xGuycx4CgbP48X/KF/586bcObxT0HENHXEU8Nqtu6NR+eKhw==} + '@types/estree@1.0.9': + resolution: {integrity: sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==} '@types/hast@3.0.4': resolution: {integrity: sha512-WPs+bbQw5aCj+x6laNGWLH3wviHtoCv/P3+otBhbOhJgG8qtpdAMlTCxLtsTWA7LH1Oh/bFCHsBn0TPS5m30EQ==} - '@types/http-errors@2.0.5': - resolution: {integrity: sha512-r8Tayk8HJnX0FztbZN7oVqGccWgw98T/0neJphO91KkmOzug1KkofZURD4UaD5uH8AqcFLfdPErnBod0u71/qg==} + '@types/jscodeshift@17.3.0': + resolution: {integrity: sha512-ogvGG8VQQqAQQ096uRh+d6tBHrYuZjsumHirKtvBa5qEyTMN3IQJ7apo+sw9lxaB/iKWIhbbLlF3zmAWk9XQIg==} '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} + '@types/linkify-it@5.0.0': + resolution: {integrity: sha512-sVDA58zAw4eWAffKOaQH5/5j3XeayukzDk+ewSsnv3p4yJEZHCCzMDiZM8e0OUrRvmpGZ85jf4yDHkHsgBNr9Q==} + + '@types/markdown-it@14.1.2': + resolution: {integrity: sha512-promo4eFwuiW+TfGxhi+0x3czqTYJkG8qB17ZUJiVF10Xm7NLVRSLUsfRTU/6h1e24VvRnXCx+hG7li58lkzog==} + '@types/mdast@4.0.4': resolution: {integrity: sha512-kGaNbPh1k7AFzgpud/gMdvIm5xuECykRR+JnWKQno9TAXVa6WIVCGTPvYGekIDL4uwCZQSYbUxNBSb1aUo79oA==} - '@types/mime@1.3.5': - resolution: {integrity: sha512-/pyBZWSLD2n0dcHE3hq8s8ZvcETHtEuF+3E7XVt0Ig2nvsVQXdghHVcEkIWjy9A0wKfTn97a/PSDYohKIlnP/w==} + '@types/mdurl@2.0.0': + resolution: {integrity: sha512-RGdgjQUZba5p6QEFAVx2OGb8rQDL/cPRG7GiedRzMcJ1tYnUANBncjbSB1NRGwbvjcPeikRABz2nshyPk1bhWg==} '@types/ms@2.1.0': resolution: {integrity: sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA==} @@ -514,27 +1227,12 @@ packages: '@types/node@22.20.0': resolution: {integrity: sha512-QWlFW2wf3nTjC13/DqRnBpR4ZO36VJH/JVBkA/vcnmbTBNQIlnObqyqZE1tUR7+Ni23Lda8R1BxMfbXRpCUx5g==} - '@types/oauth@0.9.6': - resolution: {integrity: sha512-H9TRCVKBNOhZZmyHLqFt9drPM9l+ShWiqqJijU1B8P3DX3ub84NjxDuy+Hjrz+fEca5Kwip3qPMKNyiLgNJtIA==} - - '@types/qs@6.15.1': - resolution: {integrity: sha512-GZHUBZR9hckSUhrxmp1nG6NwdpM9fCunJwyThLW1X3AyHgd9IlHb6VANpQQqDr2o/qQp6McZ3y/IA2rVzKzSbw==} - - '@types/range-parser@1.2.7': - resolution: {integrity: sha512-hKormJbkJqzQGhziax5PItDUTMAM9uE2XXQmM37dyd4hVM+5aVl7oVxMVUiVQn2oCQFN/LKCZdvSM0pFRqbSmQ==} - - '@types/send@0.17.6': - resolution: {integrity: sha512-Uqt8rPBE8SY0RK8JB1EzVOIZ32uqy8HwdxCnoCOsYrvnswqmFZ/k+9Ikidlk/ImhsdvBsloHbAlewb2IEBV/Og==} - - '@types/send@1.2.1': - resolution: {integrity: sha512-arsCikDvlU99zl1g69TcAB3mzZPpxgw0UQnaHeC1Nwb015xp8bknZv5rIfri9xTOcMuaVgvabfIRA7PSZVuZIQ==} - - '@types/serve-static@1.15.10': - resolution: {integrity: sha512-tRs1dB+g8Itk72rlSI2ZrW6vZg0YrLI81iQSTkMmOqnqCaNr/8Ek4VwWcN5vZgCYWbg/JJSGBlUaYGAOP73qBw==} - '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} + '@types/web-bluetooth@0.0.21': + resolution: {integrity: sha512-oIQLCGWtcFZy2JW77j9k8nHzAOpqMHLQejDA48XXMWH6tjCQHz5RCFz1bzsmROyL6PUm+LLnUiI4BCn221inxA==} + '@typescript-eslint/eslint-plugin@8.61.1': resolution: {integrity: sha512-ZPlVl3PB3et/59Ne0fv/sci6ZXz4T4Hp4nTJ56i/Y0gR89ARb+KphojTq6j+56E5PIezmOIOOWyY+aWQFd+IkQ==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} @@ -598,6 +1296,16 @@ packages: resolution: {integrity: sha512-6fJ9MHWtK14C1DSkiMlHUSOmrVebL7150xZJBlJiL62jjhIA4JmOq6flwBgDxIdBKKdoiZRel+dfPD5MLfny3w==} engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.3.3': + resolution: {integrity: sha512-60YRaenCQcVjYEKOcG824+DRGGIQ3VKErcBoAEDJZz5bKIs2ZG+X/H9Nk+Q6EVkwJk5QNApxbrc5QtBSwtrXAg==} + + '@vitejs/plugin-vue@5.2.4': + resolution: {integrity: sha512-7Yx/SXSOcQq5HiiV3orevHUFn+pmMB4cgbEkDYgnkUWb0WfeQ/wa2yFv6D5ICiCQOVpjA7vYDXrC7AGO8yjDHA==} + engines: {node: ^18.0.0 || >=20.0.0} + peerDependencies: + vite: ^5.0.0 || ^6.0.0 + vue: ^3.2.25 + '@vitest/coverage-v8@4.1.9': resolution: {integrity: sha512-G9/lgqibheLVBDRuya45EbsEXTYcWoSG+TLg7i2axuzx0Eq62eXn+aWXyaVdV5vKvFSWd6ywcX8hA7la9Pvu8g==} peerDependencies: @@ -636,9 +1344,93 @@ packages: '@vitest/utils@4.1.9': resolution: {integrity: sha512-A51o8ymO5PpqlWNnBP9ZHPXDIpuMtTLlGSjN7la4US+LJzoUMyhwjA5QXlm39JexgwHKW4Xjs8Z2d3dLCXOeuA==} - accepts@1.3.8: - resolution: {integrity: sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==} - engines: {node: '>= 0.6'} + '@vue/compiler-core@3.5.39': + resolution: {integrity: sha512-16KBTEXAJCpDr0mwlw+AZyhu8iyC7R3S2vBwsI7QnWJU6X3WKc9VKeNEZpiMdZ569qWhz9574L3vV55qRL0Vtw==} + + '@vue/compiler-dom@3.5.39': + resolution: {integrity: sha512-oQPigALqYbNxTNPvNgSOe+czwVExfbVF02lz8jP0S3AXJiu3jxYDygNUiqSep4ezzW8XgnubqH63My2A7JR/vg==} + + '@vue/compiler-sfc@3.5.39': + resolution: {integrity: sha512-d0ki86iOyN8LoZPBmk5SJWNwHP19CnDDCfuo//+2WJa2g5Ke0Jay983PIBIcSSzldC68I8DrD5GrHV3OSDfodg==} + + '@vue/compiler-ssr@3.5.39': + resolution: {integrity: sha512-Ce7/wvwMHai74bdszfXExdazFigYnlF9zgCmEQUcM1j0fOymlouZ7XilTYNo8oUjhlnjYOZbGrcYKuqjz89Ucw==} + + '@vue/devtools-api@7.7.10': + resolution: {integrity: sha512-KxtEpUOOpFz/qOGRrAwA36QF7DqIA+FXgCYit9mk9wjbaZt0sXOFz81ElOZtKA4HbWHUdwNjZHBFsFFyp5BZiA==} + + '@vue/devtools-kit@7.7.10': + resolution: {integrity: sha512-3WNi2Kq4tbpVbmhml7RiphmAt0279oh3fKNeWMQIrltfX8Q91b4i5PL8DtyNKdwmcsGrV4fg+erwWOmD05CLIw==} + + '@vue/devtools-shared@7.7.10': + resolution: {integrity: sha512-wOPslzB8vTvpxwdaOcR2qAbwmuSP0L+rhpoC6Cf56V3Jip+HWb7PQQXOUPgBNQARpXsbQX/+mvi8kKucmBGRwQ==} + + '@vue/reactivity@3.5.39': + resolution: {integrity: sha512-TpsuBJ9gGlZa5d23XcM2y8EXanz9dZeVDQBXRwzy46ItgvM+rWpzs+UVM0wcRLxGvcav0HE5jz2gNL53xlRAog==} + + '@vue/runtime-core@3.5.39': + resolution: {integrity: sha512-9GLtNyRvPAUMbX+7ono0RC2j0guo2LXVi8LvcmAooImACUKm0oFf0jjwbX8/H0AE/t1nxhAkn8RSl9PMCzzxZw==} + + '@vue/runtime-dom@3.5.39': + resolution: {integrity: sha512-7Y6aAGboKcXAZ3ECuUy7RrS5yy2r47dhTp2SKaJmYxjopImaVFaNa5Ne66NwGovsrxVAl5S5rwc7m22UG7Lmww==} + + '@vue/server-renderer@3.5.39': + resolution: {integrity: sha512-yZSakiAGw85rZfG7UM8akMnIF+FmeiNk47uvHf2nVBBSe+dIKUhZuZq9+XgJhbV3nS5Z4ALH23/MpXofW+mbcw==} + peerDependencies: + vue: 3.5.39 + + '@vue/shared@3.5.39': + resolution: {integrity: sha512-l1rrBtBfTnmxvtsvdQDXltUUy8S1Y+ZaqdfUzmAnJkTd8Z8rv5v/ytW+TKiqEOWyHPoqtPlNFSs0lhRmYVSHVA==} + + '@vueuse/core@12.8.2': + resolution: {integrity: sha512-HbvCmZdzAu3VGi/pWYm5Ut+Kd9mn1ZHnn4L5G8kOQTPs/IwIAmJoBrmYk2ckLArgMXZj0AW3n5CAejLUO+PhdQ==} + + '@vueuse/integrations@12.8.2': + resolution: {integrity: sha512-fbGYivgK5uBTRt7p5F3zy6VrETlV9RtZjBqd1/HxGdjdckBgBM4ugP8LHpjolqTj14TXTxSK1ZfgPbHYyGuH7g==} + peerDependencies: + async-validator: ^4 + axios: ^1 + change-case: ^5 + drauu: ^0.4 + focus-trap: ^7 + fuse.js: ^7 + idb-keyval: ^6 + jwt-decode: ^4 + nprogress: ^0.2 + qrcode: ^1.5 + sortablejs: ^1 + universal-cookie: ^7 + peerDependenciesMeta: + async-validator: + optional: true + axios: + optional: true + change-case: + optional: true + drauu: + optional: true + focus-trap: + optional: true + fuse.js: + optional: true + idb-keyval: + optional: true + jwt-decode: + optional: true + nprogress: + optional: true + qrcode: + optional: true + sortablejs: + optional: true + universal-cookie: + optional: true + + '@vueuse/metadata@12.8.2': + resolution: {integrity: sha512-rAyLGEuoBJ/Il5AmFHiziCPdQzRt88VxR+Y/A/QhJ1EWtWqPBBAxTAFaSkviwEuOEZNtW8pvkPgoCZQ+HxqW1A==} + + '@vueuse/shared@12.8.2': + resolution: {integrity: sha512-dznP38YzxZoNloI0qpEfpkms8knDtaoQ6Y/sfS0L7Yki4zh40LFHEhur0odJC6xTHG5dxWVPiUWBXn+wCG2s5w==} acorn-jsx@5.3.2: resolution: {integrity: sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ==} @@ -657,6 +1449,10 @@ packages: ajv@6.15.0: resolution: {integrity: sha512-fgFx7Hfoq60ytK2c7DhnF8jIvzYgOMxfugjLOSMHjLIPgenqa7S7oaagATUq99mV6IYvN2tRmC0wnTYX6iPbMw==} + algoliasearch@5.56.0: + resolution: {integrity: sha512-PrqppUmhT4ENdas2pH9caE7efUcxy6EcSFhWzosiVuQBzu2tQ5yLTI6jwomT/1cuBnivzGfxiJCqDNN9FRRh+Q==} + engines: {node: '>= 14.0.0'} + ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} engines: {node: '>=6'} @@ -690,13 +1486,14 @@ packages: argparse@2.0.1: resolution: {integrity: sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==} - array-flatten@1.1.1: - resolution: {integrity: sha512-PCVAQswWemu6UdxsDFFX/+gVeYqKAod3D3UVm91jHwynguOwAvYPhx8nNlM++NqRcK6CxxpUafjmhIdKiHibqg==} - array-union@2.1.0: resolution: {integrity: sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==} engines: {node: '>=8'} + ast-types@0.16.1: + resolution: {integrity: sha512-6t10qk83GOG8p0vKmaCr8eiilZwO171AvbROMtvvNiwrTly62t+7XkA8RdIIVbpMhCASAsxgAzdRSwh6nw/5Dg==} + engines: {node: '>=4'} + ast-v8-to-istanbul@1.0.4: resolution: {integrity: sha512-0bC0/4bTSrnwdhU3IsZDwEdojvuPrSg59OYZfKsLRtJZ0u8VBx9DebfqqG8bRdCC0I7vjgxmPi41P0lpkhJHtA==} @@ -710,6 +1507,11 @@ packages: resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} engines: {node: 18 || 20 || >=22} + baseline-browser-mapping@2.10.43: + resolution: {integrity: sha512-AjYpR78kDWAY3Efj+cDTFH9t9SCoL7OoTp1BOb0mQV7S+6CiLwnWM3FyxhJtdPufDFKzmCSFoUncKjWgJEZTCQ==} + engines: {node: '>=6.0.0'} + hasBin: true + better-path-resolve@1.0.0: resolution: {integrity: sha512-pbnl5XzGBdrFU/wT4jqmJVPn2B6UHPBOhzMQkY/SPUPB6QtUXtmBHBIwCbXJol93mOpGMnQyP/+BB19q04xj7g==} engines: {node: '>=4'} @@ -721,9 +1523,8 @@ packages: binary-searching@2.0.5: resolution: {integrity: sha512-v4N2l3RxL+m4zDxyxz3Ne2aTmiPn8ZUpKFpdPtO+ItW1NcTCXA7JeHG5GMBSvoKSkQZ9ycS+EouDVxYB9ufKWA==} - body-parser@1.20.5: - resolution: {integrity: sha512-3grm+/2tUOvu2cjJkvsIxrv/wVpfXQW4PsQHYm7yk4vfpu7Ekl6nEsYBoJUL6qDwZUx8wUhQ8tR2qz+ad9c9OA==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} + birpc@2.9.0: + resolution: {integrity: sha512-KrayHS5pBi69Xi9JmvoqrIgYGDkD6mcSe/i6YKi3w5kekCLzrX4+nawcXqrj2tIp50Kw/mT/s3p+GVK0A0sKxw==} brace-expansion@5.0.6: resolution: {integrity: sha512-kLpxurY4Z4r9sgMsyG0Z9uzsBlgiU/EFKhj/h91/8yHu0edo7XuixOIH3VcJ8kkxs6/jPzoI6U9Vj3WqbMQ94g==} @@ -733,17 +1534,23 @@ packages: resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} engines: {node: '>=8'} - bytes@3.1.2: - resolution: {integrity: sha512-/Nf7TyzTx6S3yRJObOAV7956r8cr2+Oj8AC5dt8wSP3BQAoeX58NoHyCU8P8zGkNXStjTSi6fzO6F0pBdcYbEg==} - engines: {node: '>= 0.8'} + browserslist@4.28.6: + resolution: {integrity: sha512-FQBYNK15VMslhLHpA7+n+n1GOlF1kId2xcCg7/j95f24AOF6VDYMNH4mFxF7KuaTdv627faazpOAjFzMrfJOUw==} + engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} + hasBin: true + + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} call-bind-apply-helpers@1.0.2: resolution: {integrity: sha512-Sp1ablJ0ivDkSzjcaJdxEunN5/XvksFJ2sMBFfq6x0ryhQV/2b/KwFe21cMpmHtPOSij8K99/wSfoEuTObmuMQ==} engines: {node: '>= 0.4'} - call-bound@1.0.4: - resolution: {integrity: sha512-+ys997U96po4Kx/ABpBCqhA9EuxJaQWDQg7295H4hBphv3IZg0boBKuwYpt4YXp6MZ5AmZQnU/tyMTlRpaSejg==} - engines: {node: '>= 0.4'} + caniuse-lite@1.0.30001805: + resolution: {integrity: sha512-52noaS3DubycKSXaU30TwPGIp+POyQSUVa5jBEq3vkRkY0kjyb3LQgvhU6WGyCcyXqVLWO0Cw0Q6BSdD0kUfVA==} + + ccount@2.0.1: + resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} chai@6.2.2: resolution: {integrity: sha512-NUPRluOfOiTKBKvWPtSD4PhFvWCqOi0BGStNWs57X9js7XGTprSmFoz5F0tWhR4WPjNeR9jXqdC7/UpSJTnlRg==} @@ -761,6 +1568,12 @@ packages: resolution: {integrity: sha512-kWWXztvZ5SBQV+eRgKFeh8q5sLuZY2+8WUIzlxWVTg+oGwY14qylx1KbKzHd8P6ZYkAg0xyIDU9JMHhyJMZ1jw==} engines: {node: '>=10'} + character-entities-html4@2.1.0: + resolution: {integrity: sha512-1v7fgQRj6hnSwFpq1Eu0ynr/CDEw0rXo2B61qXrLNdHZmPKgb7fqS1a2JwF0rISo9q77jDI8VMEHoApn8qDoZA==} + + character-entities-legacy@3.0.0: + resolution: {integrity: sha512-RpPp0asT/6ufRm//AJVwpViZbGM/MkjQFxJccQRHmISF/22NBtsHqAWmL+/pmkPWoIUJdWyeVleTl1wydHATVQ==} + character-entities@2.0.2: resolution: {integrity: sha512-shx7oQ0Awen/BRIdkjkvz54PnEEI/EjwXDSIZp86/KKdbafHh1Df/RYGBhn4hbe2+uKC9FnT5UCEdyPz3ai9hQ==} @@ -786,6 +1599,10 @@ packages: cliui@7.0.4: resolution: {integrity: sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==} + clone-deep@4.0.1: + resolution: {integrity: sha512-neHB9xuzh/wk0dIHweyAXv2aPGZIVk3pLMe+/RNzINf17fe0OG96QroktYAUm7SM1PBnzTabaLboqqxDyMU+SQ==} + engines: {node: '>=6'} + color-convert@2.0.1: resolution: {integrity: sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==} engines: {node: '>=7.0.0'} @@ -797,6 +1614,9 @@ packages: resolution: {integrity: sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==} engines: {node: '>= 0.8'} + comma-separated-tokens@2.0.3: + resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} + commander@10.0.1: resolution: {integrity: sha512-y4Mg2tXshplEbSGzx7amzPwKKOCGuoSRP/CjEdwwk0FOGlUbq6lKuoyDZTNZkmxHdJtp54hdfY/JUrdL7Xfdug==} engines: {node: '>=14'} @@ -809,35 +1629,22 @@ packages: resolution: {integrity: sha512-buhp5kePrmda3vhc5B9t7pUQXAb2Tnd0qgpkIhPhkHXxJpiPJ11H0ZEU0oBpJ2QztSbzG/ZxMj/CHsYJqRHmyg==} engines: {node: '>= 12.0.0'} - content-disposition@0.5.4: - resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} - engines: {node: '>= 0.6'} - - content-type@1.0.5: - resolution: {integrity: sha512-nTjqfcBFEipKdXCv4YDQWCfmcLZKm81ldF0pAopTvyrFGVbcR6P/VAAd5G7N+0tTr8QqiU0tFadD6FK4NtJwOA==} - engines: {node: '>= 0.6'} + commondir@1.0.1: + resolution: {integrity: sha512-W9pAhw0ja1Edb5GVdIF1mjZw/ASI0AlShXM83UUGe2DVr5TdAPEA1OA8m/g8zWp9x6On7gqufY+FatDbC3MDQg==} convert-source-map@2.0.0: resolution: {integrity: sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==} - cookie-signature@1.0.7: - resolution: {integrity: sha512-NXdYc3dLr47pBkpUCHtKSwIOQXLVn8dZEuywboCOJY/osA0wFSLlSawr3KN8qXJEyX66FcONTH8EIlVuK0yyFA==} - - cookie@0.7.2: - resolution: {integrity: sha512-yki5XnKuf750l50uGTllt6kKILY4nQ1eNIQatoXEByZ5dWgnKqbnqmTrBE5B4N7lrMJKQ2ytWMiTO2o0v6Ew/w==} - engines: {node: '>= 0.6'} + copy-anything@4.0.5: + resolution: {integrity: sha512-7Vv6asjS4gMOuILabD3l739tsaxFQmC+a7pLZm02zyvs8p977bL3zEgq3yDk5rn9B0PbYgIv++jmHcuUab4RhA==} + engines: {node: '>=18'} cross-spawn@7.0.6: resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} engines: {node: '>= 8'} - debug@2.6.9: - resolution: {integrity: sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true + csstype@3.2.3: + resolution: {integrity: sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==} debug@4.4.3: resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} @@ -858,18 +1665,10 @@ packages: resolution: {integrity: sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==} engines: {node: '>=0.4.0'} - depd@2.0.0: - resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} - engines: {node: '>= 0.8'} - dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} - destroy@1.2.0: - resolution: {integrity: sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==} - engines: {node: '>= 0.8', npm: 1.2.8000 || >= 1.4.16} - detect-indent@6.1.0: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} @@ -893,8 +1692,11 @@ packages: resolution: {integrity: sha512-KIN/nDJBQRcXw0MLVhZE9iQHmG68qAVIBg9CqmUYjmQIhgij9U5MFvrqkUL5FbtyyzZuOeOt0zdeRe4UY7ct+A==} engines: {node: '>= 0.4'} - ee-first@1.1.1: - resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==} + electron-to-chromium@1.5.392: + resolution: {integrity: sha512-1yQq3VQCZRwsnYc67Oc+1fge6Lwtn0hzi6zmEVkB61Zx21kTbwJAW4dFLadl5Rc1tKhG/kSpYXnfiAhu0f0a1g==} + + emoji-regex-xs@1.0.0: + resolution: {integrity: sha512-LRlerrMYoIDrT6jgpeZ2YYl/L8EulRTt5hQcYjy5AInh7HWXKimpqx68aknBFpGL2+/IcogTcaydJEgaTmOpDg==} emoji-regex@8.0.0: resolution: {integrity: sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==} @@ -902,10 +1704,6 @@ packages: emojilib@2.4.0: resolution: {integrity: sha512-5U0rVMU5Y2n2+ykNLQqMoqklN9ICBT/KsvC1Gz6vqHbz2AXXGkG+Pm5rMWk/8Vjrr/mY9985Hi8DYzn1F09Nyw==} - encodeurl@2.0.0: - resolution: {integrity: sha512-Q0n9HRi4m6JuGIV1eFlmvJB7ZEVxu93IrMyiMsGC0lrMJMWzRgx6WGquyfQgZVb31vhGgXnfmPNNXmxnOkRBrg==} - engines: {node: '>= 0.8'} - enquirer@2.4.1: resolution: {integrity: sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ==} engines: {node: '>=8.6'} @@ -914,6 +1712,10 @@ packages: resolution: {integrity: sha512-V0hjH4dGPh9Ao5p0MoRY6BVqtwCjhz6vI5LT8AJ55H+4g9/4vbHx1I54fS0XuclLhDHArPQCiMjDxjaL8fPxhw==} engines: {node: '>=0.12'} + entities@7.0.1: + resolution: {integrity: sha512-TWrgLOFUQTH994YUyl1yT4uyavY5nNB5muff+RtWaqNVCAK408b5ZnnbNAUEWLTCpum9w6arT70i1XdQ4UeOPA==} + engines: {node: '>=0.12'} + environment@1.1.0: resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} engines: {node: '>=18'} @@ -937,13 +1739,20 @@ packages: resolution: {integrity: sha512-j6vWzfrGVfyXxge+O0x5sh6cvxAog0a/4Rdd2K36zCMV5eJ+/+tOAngRO8cODMNWbVRdVlmGZQL2YS3yR8bIUA==} engines: {node: '>= 0.4'} + esbuild@0.21.5: + resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} + engines: {node: '>=12'} + hasBin: true + + esbuild@0.28.1: + resolution: {integrity: sha512-HrJrvZv5ayxBzPfwphOoNzkzOIIlifzk0KJrGK2c8R4+LKpMtpYLQeUdjnwjWv/LZlkH2laZk+4w78pi99D4Vw==} + engines: {node: '>=18'} + hasBin: true + escalade@3.2.0: resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} - escape-html@1.0.3: - resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} - escape-string-regexp@4.0.0: resolution: {integrity: sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==} engines: {node: '>=10'} @@ -999,6 +1808,9 @@ packages: resolution: {integrity: sha512-MMdARuVEQziNTeJD8DgMqmhwR11BRQ/cBP+pLtYdSTnf3MIO8fFeiINEbX36ZdNlfU/7A9f3gUw49B3oQsvwBA==} engines: {node: '>=4.0'} + estree-walker@2.0.2: + resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} @@ -1006,18 +1818,10 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} - etag@1.8.1: - resolution: {integrity: sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==} - engines: {node: '>= 0.6'} - expect-type@1.3.0: resolution: {integrity: sha512-knvyeauYhqjOYvQ66MznSMs83wmHrCycNEN6Ao+2AeYEfxUIkuiVxdEa1qlGEPK+We3n0THiDciYSsCcgW/DoA==} engines: {node: '>=12.0.0'} - express@4.22.2: - resolution: {integrity: sha512-IuL+Elrou2ZvCFHs18/CIzy2Nzvo25nZ1/D2eIZlz7c+QUayAcYoiM2BthCjs+EBHVpjYjcuLDAiCWgeIX3X1Q==} - engines: {node: '>= 0.10.0'} - extendable-error@0.1.7: resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} @@ -1057,9 +1861,13 @@ packages: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} - finalhandler@1.3.2: - resolution: {integrity: sha512-aA4RyPcd3badbdABGDuTXCMTtOneUCAYH/gxoYRTZlIJdF0YPWuGqiAsIrhNnnqdXGswYk6dGujem4w80UJFhg==} - engines: {node: '>= 0.8'} + find-cache-dir@2.1.0: + resolution: {integrity: sha512-Tq6PixE0w/VMFfCgbONnkiQIVol/JJL7nRMi20fqzA4NRs9AfeqMGeRdPi3wIhYkxjeBaWh2rxwapn5Tu3IqOQ==} + engines: {node: '>=6'} + + find-up@3.0.0: + resolution: {integrity: sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==} + engines: {node: '>=6'} find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} @@ -1076,6 +1884,17 @@ packages: flatted@3.4.2: resolution: {integrity: sha512-PjDse7RzhcPkIJwy5t7KPWQSZ9cAbzQXcafsetQoD7sOJRQlGikNbx7yZp2OotDnJyrDcbyRq3Ttb18iYOqkxA==} + flow-estree@0.322.0: + resolution: {integrity: sha512-v7wiiFWSKbJ1HGVCRKhxl+6pQWTQV6P4c7XEfKjVlH71YkgQyJCq0AG5dhJDD/3/SkJgX/F9lvAj2rbrFzArdQ==} + engines: {node: '>=18'} + + flow-parser@0.322.0: + resolution: {integrity: sha512-Qfd8N4sSuWmlf1qk5M60fi8JrvhNvj9fbwMsRkcnm3UhLYukkbm2CFkAhiTD3n4RVXb6TuCHFCp78TMXpO0zcA==} + engines: {node: '>=0.4.0'} + + focus-trap@7.8.0: + resolution: {integrity: sha512-/yNdlIkpWbM0ptxno3ONTuf+2g318kh2ez3KSeZN5dZ8YC6AAmgeWz+GasYYiBJPFaYcSAPeu4GfhUaChzIJXA==} + follow-redirects@1.16.0: resolution: {integrity: sha512-y5rN/uOsadFT/JfYwhxRS5R7Qce+g3zG97+JrtFZlC9klX/W5hD7iiLzScI4nZqUS7DNUdhPgw4xI8W2LuXlUw==} engines: {node: '>=4.0'} @@ -1089,14 +1908,6 @@ packages: resolution: {integrity: sha512-vKatAh4SlVfgbv+YtmhiRjhEMJsYpsG1Y2rMQtR+SVSbytsSD1YGzDIcrAJmdFec88u/+VoGmxnl+80gL1tRCQ==} engines: {node: '>= 6'} - forwarded@0.2.0: - resolution: {integrity: sha512-buRG0fpBtRHSTCOASe6hD258tEubFoRLb4ZNA6NxMVHNw2gOcwHo9wyablzMzOA5z9xA9L1KNjk/Nt6MT9aYow==} - engines: {node: '>= 0.6'} - - fresh@0.5.2: - resolution: {integrity: sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==} - engines: {node: '>= 0.6'} - fs-extra@7.0.1: resolution: {integrity: sha512-YJDaCJZEnBmcbw13fvdAM9AwNOJwOzrE4pqMqBq5nFiEqXUqHwlK4B+3pUw6JNvfSPtX05xFHtYy/1ni01eGCw==} engines: {node: '>=6 <7 || >=8'} @@ -1113,6 +1924,10 @@ packages: function-bind@1.1.2: resolution: {integrity: sha512-7XHNxH7qX9xG5mIwxkhumTox/MIRNcOgDrxWsMt2pAr23WHp6MrRlN7FBSFpCpr+oVO0F744iUgR82nJMfG2SA==} + gensync@1.0.0-beta.2: + resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} + engines: {node: '>=6.9.0'} + get-caller-file@2.0.5: resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} engines: {node: 6.* || 8.* || >= 10.*} @@ -1167,15 +1982,23 @@ packages: resolution: {integrity: sha512-T2UbfbBEF32wiepXIsMlTW9+dDYC6wMh/t/vYA4tuOMKqWz/n3vr1NFSxQiyP+zk2mXsoMA/i/7qV6LKut1t1A==} engines: {node: '>= 0.4'} + hast-util-to-html@9.0.5: + resolution: {integrity: sha512-OguPdidb+fbHQSU4Q4ZiLKnzWo8Wwsf5bZfbvu7//a9oTYoqD/fWpe96NuHkoS9h0ccGOTe0C4NGXdtS0iObOw==} + + hast-util-whitespace@3.0.0: + resolution: {integrity: sha512-88JUN06ipLwsnv+dVn+OIYOvAuvBMy/Qoi6O7mQHxdPXpjy+Cd6xRkWwux7DKO+4sYILtLBRIKgsdpS2gQc7qw==} + highlight.js@10.7.3: resolution: {integrity: sha512-tzcUFauisWKNHaRkN4Wjl/ZA07gENAjFl3J/c480dprkGTg5EQstgaNFqBfUqCq54kZRIEcreTsAgF/m2quD7A==} + hookable@5.5.3: + resolution: {integrity: sha512-Yc+BQe8SvoXH1643Qez1zqLRmbA5rCL+sSmk6TVos0LWVfNIB7PGncdlId77WzLGSIB5KaWgTaNTs2lNVEI6VQ==} + html-escaper@2.0.2: resolution: {integrity: sha512-H2iMtd0I4Mt5eYiapRdIDjp+XzelXQ0tFE4JS7YFwFevXXMmOp9myNrUvCg0D6ws8iqkRPBfKHgbwig1SmlLfg==} - http-errors@2.0.1: - resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} - engines: {node: '>= 0.8'} + html-void-elements@3.0.0: + resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} https-proxy-agent@5.0.1: resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==} @@ -1190,10 +2013,6 @@ packages: engines: {node: '>=18'} hasBin: true - iconv-lite@0.4.24: - resolution: {integrity: sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==} - engines: {node: '>=0.10.0'} - iconv-lite@0.7.2: resolution: {integrity: sha512-im9DjEDQ55s9fL4EYzOAv0yMqmMBSZp6G0VvFyTMPKWxiSBHUj9NW/qqLmXUwXrrM7AvqSlTCfvqRb0cM8yYqw==} engines: {node: '>=0.10.0'} @@ -1210,13 +2029,6 @@ packages: resolution: {integrity: sha512-JmXMZ6wuvDmLiHEml9ykzqO6lwFbof0GG4IkcGaENdCRDDmMVnny7s5HsIgHCbaq0w2MyPhDqkhTUgS2LU2PHA==} engines: {node: '>=0.8.19'} - inherits@2.0.4: - resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} - - ipaddr.js@1.9.1: - resolution: {integrity: sha512-0KI/607xoxSToH7GjN1FfSbLoU0+btTicjsQSWQlh/hZykN8KpmMf7uYwPW3R+akZ6R/w18ZlXSHBYXiYUPO3g==} - engines: {node: '>= 0.10'} - is-binary-path@2.1.0: resolution: {integrity: sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==} engines: {node: '>=8'} @@ -1237,10 +2049,18 @@ packages: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} + is-plain-object@2.0.4: + resolution: {integrity: sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==} + engines: {node: '>=0.10.0'} + is-subdir@1.2.0: resolution: {integrity: sha512-2AT6j+gXe/1ueqbW6fLZJiIw3F8iXGJtt0yDrZaBhAZEG1raiTxKWU+IPqMCzQAXOUCKdA4UDMgacKH25XG2Cw==} engines: {node: '>=4'} + is-what@5.5.0: + resolution: {integrity: sha512-oG7cgbmg5kLYae2N5IVd3jm2s+vldjxJzK1pcu9LfpGuQ93MQSzo0okvRna+7y5ifrD+20FE8FvjusyGaz14fw==} + engines: {node: '>=18'} + is-windows@1.0.2: resolution: {integrity: sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==} engines: {node: '>=0.10.0'} @@ -1248,6 +2068,10 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + isobject@3.0.1: + resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} + engines: {node: '>=0.10.0'} + istanbul-lib-coverage@3.2.2: resolution: {integrity: sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==} engines: {node: '>=8'} @@ -1267,6 +2091,9 @@ packages: js-tokens@10.0.0: resolution: {integrity: sha512-lM/UBzQmfJRo9ABXbPWemivdCW8V2G8FHaHdypQaIy523snUjog0W71ayWXTjiR+ixeMyVHN2XcpnTd/liPg/Q==} + js-tokens@4.0.0: + resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-yaml@3.14.2: resolution: {integrity: sha512-PMSmkqxr106Xa156c2M265Z+FTrPl+oxd/rgOQy2tijQeK5TxQ43psO1ZCwhVOSdnn+RzkzlRz/eY4BgJBYVpg==} hasBin: true @@ -1275,6 +2102,21 @@ packages: resolution: {integrity: sha512-qQKT4zQxXl8lLwBtHMWwaTcGfFOZviOJet3Oy/xmGk2gZH677CJM9EvtfdSkgWcATZhj/55JZ0rmy3myCT5lsA==} hasBin: true + jscodeshift@17.4.0: + resolution: {integrity: sha512-i3ESKiiTsGynxzTg5BhsZViD0ai72/6SsI1efDZxG6/5KCoElsmquxtyhXK5lpEgoO7MTNpYkjFEdEL97SkBNg==} + engines: {node: '>=16'} + hasBin: true + peerDependencies: + '@babel/preset-env': ^7.1.6 + peerDependenciesMeta: + '@babel/preset-env': + optional: true + + jsesc@3.1.0: + resolution: {integrity: sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==} + engines: {node: '>=6'} + hasBin: true + json-buffer@3.0.1: resolution: {integrity: sha512-4bV5BfR2mqfQTJm+V5tPPdf+ZpuhiIvTuAB5g8kcrXOZpTT/QwwVRWBywX1ozr6lEuPdbHxwaJlm9G6mI2sfSQ==} @@ -1284,15 +2126,21 @@ packages: json-stable-stringify-without-jsonify@1.0.1: resolution: {integrity: sha512-Bdboy+l7tA3OGW6FjyFHWkP5LuByj1Tk33Ljyq0axyzdk9//JSi2u3fP1QSmd1KNwq6VOKYGlAu87CisVir6Pw==} + json5@2.2.3: + resolution: {integrity: sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==} + engines: {node: '>=6'} + hasBin: true + jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} - jsuri@1.3.1: - resolution: {integrity: sha512-LLdAeqOf88/X0hylAI7oSir6QUsz/8kOW0FcJzzu/SJRfORA/oPHycAOthkNp7eLPlTAbqVDFbqNRHkRVzEA3g==} - keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} + kind-of@6.0.3: + resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} + engines: {node: '>=0.10.0'} + levn@0.4.1: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} @@ -1374,6 +2222,10 @@ packages: linkify-it@5.0.1: resolution: {integrity: sha512-wVoTjP4Q6R0NW5hiZkVJaFZPWgtXfoGF+6LucL3/FtiNjmcHhYjEr5f1Kqjirc1nBW07J/ZuRFumqr2oqccEWg==} + locate-path@3.0.0: + resolution: {integrity: sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==} + engines: {node: '>=6'} + locate-path@5.0.0: resolution: {integrity: sha512-t7hw9pI+WvuwNJXwk5zVHpyhIqzg2qTlklJOf0mVxGSbe3Fp2VieZcduNYjaLDoy6p9uGpQEGWG87WpMKlNq8g==} engines: {node: '>=8'} @@ -1385,13 +2237,13 @@ packages: lodash.startcase@4.4.0: resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} - lodash@4.18.1: - resolution: {integrity: sha512-dMInicTPVE8d1e5otfwmmjlxkZoUpiVLwyeTdUsi/Caj/gfzzblBcCE5sRHV/AsjuCmxWrte2TNGSYuCeCq+0Q==} - lru-cache@11.5.0: resolution: {integrity: sha512-5YgH9UJd7wVb9hIouI2adWpgqrrICkt070Dnj8EUY1+B4B2P9eRLPAkAAo6NICA7CEhOIeBHl46u9zSNpNu7zA==} engines: {node: 20 || >=22} + lru-cache@5.1.1: + resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} + lunr@2.3.9: resolution: {integrity: sha512-zTU3DaZaF3Rt9rhN3uBMGQD3dD2/vFQqnvZCDv4dl5iOzq2IZQqTxu90r4E5J+nP70J3ilqVCrbho2eWaeW8Ow==} @@ -1401,10 +2253,17 @@ packages: magicast@0.5.3: resolution: {integrity: sha512-pVKE4UdSQ7DvHzivsCIFx2BJn1mHG6KsyrFcaxFx6tONdneEuThrDx0Cj3AMg58KyN4pzYT+LHOotxDQDjNvkw==} + make-dir@2.1.0: + resolution: {integrity: sha512-LS9X+dc8KLxXCb8dni79fLIIUA5VyZoyjSMCwTluaXA0o27cCK0bhXkpgw+sTXVpPy/lSO57ilRixqk0vDmtRA==} + engines: {node: '>=6'} + make-dir@4.0.0: resolution: {integrity: sha512-hXdUTZYIVOt1Ex//jAQi+wTZZpUpwBj/0QsOzqegb3rGMMeJiSEu5xLHnYfBrRV4RH2+OCSOO95Is/7x1WJ4bw==} engines: {node: '>=10'} + mark.js@8.11.1: + resolution: {integrity: sha512-1I+1qpDt4idfgLQG+BNWmrqku+7/2bi5nLf4YwF8y8zXvmfiTBY3PV3ZibfrjBueCByROpuBjLLFCajqkgYoLQ==} + markdown-it@14.2.0: resolution: {integrity: sha512-1TGiQiJVRQ3NPmZH6sx5Cfnmg6GQm9jvC1ch4TK511NjSJvjzKLzn5pPfZRNZkRPZP0HqCioSndqH8v2nRaWVQ==} hasBin: true @@ -1427,27 +2286,19 @@ packages: mdast-util-from-markdown@2.0.2: resolution: {integrity: sha512-uZhTV/8NBuw0WHkPTrCqDOl0zVe1BIng5ZtHoDk49ME1qqcjYmmLmOf0gELgcRMxN4w2iuIeVso5/6QymSrgmA==} + mdast-util-to-hast@13.2.1: + resolution: {integrity: sha512-cctsq2wp5vTsLIcaymblUriiTcZd0CwWtCbLvrOzYCDZoWyMNV8sZ7krj09FSnsiJi3WVsHLM4k6Dq/yaPyCXA==} + mdast-util-to-string@4.0.0: resolution: {integrity: sha512-0H44vDimn51F0YwvxSJSm0eCDOJTRlmN0R1yBh4HLj9wiV1Dn0QoXGbvFAWj2hSItVTlCmBF1hqKlIyUBVFLPg==} mdurl@2.0.0: resolution: {integrity: sha512-Lf+9+2r+Tdp5wXDXC4PcIBjTDtq4UKjCPMQhKIuzpJNW0b96kVqSwW0bT7FhRSfmAiFYgP+SCRvdrDozfh0U5w==} - media-typer@0.3.0: - resolution: {integrity: sha512-dq+qelQ9akHpcOl/gUVRTxVIOkAJ1wR3QAvb4RsVjS8oVoFjDGTc679wJYmUmknUF5HwMLOgb5O+a3KxfWapPQ==} - engines: {node: '>= 0.6'} - - merge-descriptors@1.0.3: - resolution: {integrity: sha512-gaNvAS7TZ897/rVaZ0nMtAyxNyi/pdbjbAwUpFQpN70GqnVfOiXpeUUMKRBmzXaSQ8DdTX4/0ms62r2K+hE6mQ==} - merge2@1.4.1: resolution: {integrity: sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==} engines: {node: '>= 8'} - methods@1.1.2: - resolution: {integrity: sha512-iclAHeNqNm68zFtnZ0e+1L2yUIdvzNoauKU4WBA3VvH/vPFieF7qfRlwUZU+DA9P9bPXIS90ulxoUoCH23sV2w==} - engines: {node: '>= 0.6'} - micromark-core-commonmark@2.0.3: resolution: {integrity: sha512-RDBrHEMSxVFLg6xvnXmb1Ayr2WzLAWjeSATAoxwKYJV94TeNavgoIdA0a9ytzDSVzBy2YKFK+emCPOEibLeCrg==} @@ -1523,22 +2374,20 @@ packages: resolution: {integrity: sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==} engines: {node: '>= 0.6'} - mime@1.6.0: - resolution: {integrity: sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==} - engines: {node: '>=4'} - hasBin: true - minimatch@10.2.5: resolution: {integrity: sha512-MULkVLfKGYDFYejP07QOurDLLQpcjk7Fw+7jXS2R2czRQzR56yHRveU5NDJEOviH+hETZKSkIk5c+T23GjFUMg==} engines: {node: 18 || 20 || >=22} + minisearch@7.2.0: + resolution: {integrity: sha512-dqT2XBYUOZOiC5t2HRnwADjhNS2cecp9u+TJRiJ1Qp/f5qjkeT5APcGPjHw+bz89Ms8Jp+cG4AlE+QZ/QnDglg==} + + mitt@3.0.1: + resolution: {integrity: sha512-vKivATfr97l2/QBCYAkXYDbrIWPM2IIKEl7YPhjCvKlG3kE2gm+uBo6nEXK3M5/Ffh/FLpKExzOQ3JJoJGFKBw==} + mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} engines: {node: '>=4'} - ms@2.0.0: - resolution: {integrity: sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==} - ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -1557,36 +2406,31 @@ packages: natural-compare@1.4.0: resolution: {integrity: sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==} - negotiator@0.6.3: - resolution: {integrity: sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==} - engines: {node: '>= 0.6'} + neo-async@2.6.2: + resolution: {integrity: sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==} node-emoji@2.2.0: resolution: {integrity: sha512-Z3lTE9pLaJF47NyMhd4ww1yFTAP8YhYI8SleJiHzM46Fgpm5cnNzSl9XfzFNqbaz+VlJrIj3fXQ4DeN1Rjm6cw==} engines: {node: '>=18'} + node-releases@2.0.51: + resolution: {integrity: sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==} + engines: {node: '>=18'} + normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} - oauth@0.10.2: - resolution: {integrity: sha512-JtFnB+8nxDEXgNyniwz573xxbKSOu3R8D40xQKqcjwJ2CDkYqUDI53o6IuzDJBx60Z8VKCm271+t8iFjakrl8Q==} - object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} - object-inspect@1.13.4: - resolution: {integrity: sha512-W67iLl4J2EXEGTbfeHCffrjDfitvLANg0UlX3wFUUSTx92KXRFegMHUVgSqE+wvhAbi4WqjGg9czysTV2Epbew==} - engines: {node: '>= 0.4'} - obug@2.1.3: resolution: {integrity: sha512-9miFgM2OFba7hB+pRgvtV84pYTBaoTHohvmIgiRt6dRIzbwEOIaNaP+dIlGs2fNFoB0SeISs0Jz5WFVRid6Xyg==} engines: {node: '>=12.20.0'} - on-finished@2.4.1: - resolution: {integrity: sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==} - engines: {node: '>= 0.8'} + oniguruma-to-es@3.1.1: + resolution: {integrity: sha512-bUH8SDvPkH3ho3dvwJwfonjlQ4R80vjyvrU8YpxuROddv55vAEJrTuCuCVUhhsHbtlD9tGGbaNApGQckXhS8iQ==} optionator@0.9.4: resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} @@ -1607,6 +2451,10 @@ packages: resolution: {integrity: sha512-TYOanM3wGwNGsZN2cVTYPArw454xnXj5qmWF1bEoAc4+cU/ol7GVh7odevjp1FNHduHc3KZMcFduxU5Xc6uJRQ==} engines: {node: '>=10'} + p-locate@3.0.0: + resolution: {integrity: sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==} + engines: {node: '>=6'} + p-locate@4.1.0: resolution: {integrity: sha512-R79ZZ/0wAxKGu3oYMlz8jy/kbhsNrS7SKZ7PxEHBgJ5+F2mtFW2fK2cOtBh1cHYkQsbzFV7I+EoRKe6Yt0oK7A==} engines: {node: '>=8'} @@ -1635,9 +2483,9 @@ packages: parse5@6.0.1: resolution: {integrity: sha512-Ofn/CTFzRGTTxwpNEs9PP93gXShHcTq255nzRYSKe8AkVpZY7e1fpmTfOyoIvjP5HG7Z2ZM7VS9PPhQGW2pOpw==} - parseurl@1.3.3: - resolution: {integrity: sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==} - engines: {node: '>= 0.8'} + path-exists@3.0.0: + resolution: {integrity: sha512-bpC7GYwiDYQ4wYLe+FA8lhRjhQCMcQGuSgGGqDkg/QerRWw9CmGRT0iSOVRSZJ29NMLZgIzqaljJ63oaL4NIJQ==} + engines: {node: '>=4'} path-exists@4.0.0: resolution: {integrity: sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==} @@ -1647,9 +2495,6 @@ packages: resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} engines: {node: '>=8'} - path-to-regexp@0.1.13: - resolution: {integrity: sha512-A/AGNMFN3c8bOlvV9RreMdrv7jsmF9XIfDeCd87+I8RNg6s78BhJxMu69NEMHBSJFxKidViTEdruRwEk/WIKqA==} - path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} @@ -1657,6 +2502,9 @@ packages: pathe@2.0.3: resolution: {integrity: sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==} + perfect-debounce@1.0.0: + resolution: {integrity: sha512-xCy9V055GLEqoFaHoC1SoLIaLmWctgCUaBaWxDZ7/Zx4CTyX7cJQLJOok/orfjZAh9kEYpjJa4d0KcJmCbctZA==} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -1672,6 +2520,14 @@ packages: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} + pirates@4.0.7: + resolution: {integrity: sha512-TfySrs/5nm8fQJDcBDuUng3VOUKsd7S+zqvbOTiGXHfxX4wK31ard+hoNuvkicM/2YFzlpDgABOevKSsB4G/FA==} + engines: {node: '>= 6'} + + pkg-dir@3.0.0: + resolution: {integrity: sha512-/E57AYkoeQ25qkxMj5PBOVgF8Kiu/h7cYS30Z5+R7WaiCCBfLq58ZI/dSeaEKb9WVJV5n/03QwrN3IeWIFllvw==} + engines: {node: '>=6'} + plimit-lit@1.6.1: resolution: {integrity: sha512-B7+VDyb8Tl6oMJT9oSO2CW8XC/T4UcJGrwOVoNGwOQsQYhlpfajmrMj5xeejqaASq3V/EqThyOeATEOMuSEXiA==} engines: {node: '>=12'} @@ -1680,8 +2536,16 @@ packages: resolution: {integrity: sha512-FfR8sjd4em2T6fb3I2MwAJU7HWVMr9zba+enmQeeWFfCbm+UOC/0X4DS8XtpUTMwWMGbjKYP7xjfNekzyGmB3A==} engines: {node: ^10 || ^12 || >=14} - prelude-ls@1.2.1: - resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} + preact@10.29.7: + resolution: {integrity: sha512-DCHYrK/B10yUD3ZjLfhZ3WIE/9Vf9VFUODcRE2dRomTYDpJk6z6L9wecSfhfE6M9ZTHUdyQkoC46arIDhEV84Q==} + peerDependencies: + preact-render-to-string: '>=5' + peerDependenciesMeta: + preact-render-to-string: + optional: true + + prelude-ls@1.2.1: + resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} prettier-plugin-jsdoc@1.8.1: @@ -1700,9 +2564,8 @@ packages: engines: {node: '>=14'} hasBin: true - proxy-addr@2.0.7: - resolution: {integrity: sha512-llQsMLSUDUPT44jdrU/O37qlnifitDP+ZwrmmZcoSKyLKvtZxpyV0n2/bD/N4tBAAZ/gJEdZU7KMraoK1+XYAg==} - engines: {node: '>= 0.10'} + property-information@7.2.0: + resolution: {integrity: sha512-IAtzIB6sUiWaJYrX9smp3V46pBGbBeLFRGdh25kg1334VcBlD8HzhPeNIWQH9zhGmo2itIe25EHt9dQP7G5hmg==} proxy-from-env@2.1.0: resolution: {integrity: sha512-cJ+oHTW1VAEa8cJslgmUZrc+sjRKgAKl3Zyse6+PV38hZe/V6Z14TbCuXcan9F9ghlz4QrFr2c92TNF82UkYHA==} @@ -1716,10 +2579,6 @@ packages: resolution: {integrity: sha512-vYt7UD1U9Wg6138shLtLOvdAu+8DsC/ilFtEVHcH+wydcSpNE20AfSOduf6MkRFahL5FY7X1oU7nKVZFtfq8Fg==} engines: {node: '>=6'} - qs@6.15.3: - resolution: {integrity: sha512-O9gl3zCl5h5blw1KGUzQKhA5oUXSl8rwUIM5o0S3nCXMliSvy5Dzx7/DJcI+SwgICv+IneSZwhBh1oSyEHA71A==} - engines: {node: '>=0.6'} - quansync@0.2.11: resolution: {integrity: sha512-AifT7QEbW9Nri4tAwR5M/uzpBuqfZf+zwaEM/QkzEjj7NBuFD2rBuy0K3dE+8wltbezDV7JMA0WfnCPYRSYbXA==} @@ -1730,14 +2589,6 @@ packages: queue-microtask@1.2.3: resolution: {integrity: sha512-NuaNSa6flKT5JaSYQzJok04JzTL1CA6aGhv5rfLW3PgqA+M2ChpZQnAC8h8i4ZFkBS8X5RqkDBHA7r4hej3K9A==} - range-parser@1.2.1: - resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} - engines: {node: '>= 0.6'} - - raw-body@2.5.3: - resolution: {integrity: sha512-s4VSOf6yN0rvbRZGxs8Om5CWj6seneMwK3oDb4lWDH0UPhWcxwOWw5+qk24bxq87szX1ydrwylIOp2uG1ojUpA==} - engines: {node: '>= 0.8'} - read-yaml-file@1.1.0: resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} engines: {node: '>=6'} @@ -1746,6 +2597,19 @@ packages: resolution: {integrity: sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==} engines: {node: '>=8.10.0'} + recast@0.23.12: + resolution: {integrity: sha512-dEWRjcINDu/F4l2dYx57ugBtD7HV9KXESyxhzw/MqWLeglJrsjJKqACPyUPg+6AF8mIgm+Zi0dZ3ACoIg+QtpA==} + engines: {node: '>= 4'} + + regex-recursion@6.0.2: + resolution: {integrity: sha512-0YCaSCq2VRIebiaUviZNs0cBz1kg5kVS2UKUfNIx8YVs1cN3AV7NTctO5FOKBA+UT2BPJIWZauYHPqJODG50cg==} + + regex-utilities@2.3.0: + resolution: {integrity: sha512-8VhliFJAWRaUiVvREIiW2NXXTmHs4vMNnSzuJVhscgmGav3g9VDxLrQndI3dZZVVdp0ZO/5v0xmX516/7M9cng==} + + regex@6.1.0: + resolution: {integrity: sha512-6VwtthbV4o/7+OaAF9I5L5V3llLEsoPyq9P1JVXkedTP33c7MfCG0/5NOPcSJn0TzXcG9YUrR0gQSWioew3LDg==} + require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -1761,20 +2625,36 @@ packages: resolution: {integrity: sha512-g6QUff04oZpHs0eG5p83rFLhHeV00ug/Yf9nZM6fLeUrPguBTkTQOdpAWWspMh55TZfVQDPaN3NQJfbVRAxdIw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} + rfdc@1.4.1: + resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + rolldown@1.0.3: resolution: {integrity: sha512-i00lAJ2ks1BYr7rjNjKC7BcqAS7nVfiT3QX1SI5aY+AFHblCmaUf9OE9dbdzDvW6dJxbi2ZCZiy9v3CcwOiX3g==} engines: {node: ^20.19.0 || >=22.12.0} hasBin: true + rollup@4.62.2: + resolution: {integrity: sha512-RFnrW4lhXA3s3eqHDZvN654g8OTjzRfqpIRJYczCGB6HzphckVAi/Qh4tbPUbRuDi7s1Llv8g/NspLkttY3gTA==} + engines: {node: '>=18.0.0', npm: '>=8.0.0'} + hasBin: true + run-parallel@1.2.0: resolution: {integrity: sha512-5l4VyZR86LZ/lDxZTR6jqL8AFE2S0IFLMP26AbjsLVADxHdhB/c0GUsH+y39UfCi3dzz8OlQuPmnaJOMoDHQBA==} - safe-buffer@5.2.1: - resolution: {integrity: sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==} - safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} + search-insights@2.17.3: + resolution: {integrity: sha512-RQPdCYTa8A68uM2jwxoY842xDhvx3E5LFL1LxvxCNMev4o5mLuokczhzjAgGwUZBAmOKZknArSxLKmXtIi2AxQ==} + + semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + + semver@6.3.1: + resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} + hasBin: true + semver@7.7.2: resolution: {integrity: sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA==} engines: {node: '>=10'} @@ -1785,16 +2665,9 @@ packages: engines: {node: '>=10'} hasBin: true - send@0.19.2: - resolution: {integrity: sha512-VMbMxbDeehAxpOtWJXlcUS5E8iXh6QmN+BkRX1GARS3wRaXEEgzCcB10gTQazO42tpNIya8xIyNx8fll1OFPrg==} - engines: {node: '>= 0.8.0'} - - serve-static@1.16.3: - resolution: {integrity: sha512-x0RTqQel6g5SY7Lg6ZreMmsOzncHFU7nhnRWkKgWuMTu5NN0DR5oruckMqRvacAN9d5w6ARnRBXl9xhDCgfMeA==} - engines: {node: '>= 0.8.0'} - - setprototypeof@1.2.0: - resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + shallow-clone@3.0.1: + resolution: {integrity: sha512-/6KqX+GVUdqPuPPd2LxDDxzX6CAbjJehAAOKlNpqqUpAqPM6HeL8f+o3a+JsyGjn2lv0WY8UsTgUJjU9Ok55NA==} + engines: {node: '>=8'} shebang-command@2.0.0: resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} @@ -1804,21 +2677,8 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} - side-channel-list@1.0.1: - resolution: {integrity: sha512-mjn/0bi/oUURjc5Xl7IaWi/OJJJumuoJFQJfDDyO46+hBWsfaVM65TBHq2eoZBhzl9EchxOijpkbRC8SVBQU0w==} - engines: {node: '>= 0.4'} - - side-channel-map@1.0.1: - resolution: {integrity: sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==} - engines: {node: '>= 0.4'} - - side-channel-weakmap@1.0.2: - resolution: {integrity: sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==} - engines: {node: '>= 0.4'} - - side-channel@1.1.1: - resolution: {integrity: sha512-6x6dK6zJdpTzF4sQeNYxwtvBzf6Eg4GtlesS94HOvTudUeyK2WXAaIfmDgsyslYrRBeFIlsi54AYsFGUuhmvrQ==} - engines: {node: '>= 0.4'} + shiki@2.5.0: + resolution: {integrity: sha512-mI//trrsaiCIPsja5CNfsyNOqgAZUb6VpJA+340toL42UpzQlXpwRV9nch69X6gaUxrr9kaOOa6e3y3uAkGFxQ==} siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -1839,19 +2699,29 @@ packages: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + + source-map@0.6.1: + resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} + engines: {node: '>=0.10.0'} + + space-separated-tokens@2.0.2: + resolution: {integrity: sha512-PEGlAwrG8yXGXRjW32fGbg66JAlOAwbObuqVoJpv/mRgoWDQfgH1wDPvtzWyUSNAXBGSk8h755YDbbcEy3SH2Q==} + spawndamnit@3.0.1: resolution: {integrity: sha512-MmnduQUuHCoFckZoWnXsTg7JaiLBJrKFj9UI2MbRPGaJeVpsLcVBu6P/IGZovziM/YBsellCmsprgNA+w0CzVg==} + speakingurl@14.0.1: + resolution: {integrity: sha512-1POYv7uv2gXoyGFpBCmpDVSNV74IfsWlDW216UPjbWufNf+bSU6GdbDsxdcxtfwb4xlI3yxzOTKClUosxARYrQ==} + engines: {node: '>=0.10.0'} + sprintf-js@1.0.3: resolution: {integrity: sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==} stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} - statuses@2.0.2: - resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} - engines: {node: '>= 0.8'} - std-env@4.1.0: resolution: {integrity: sha512-Rq7ybcX2RuC55r9oaPVEW7/xu3tj8u4GeBYHBWCychFtzMIr86A7e3PPEBPT37sHStKX3+TiX/Fr/ACmJLVlLQ==} @@ -1859,6 +2729,9 @@ packages: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} + stringify-entities@4.0.4: + resolution: {integrity: sha512-IwfBptatlO+QCJUo19AqvrPNqlVMpW9YEL2LIVY+Rpv2qsjCGxaDLNRgeGsQWJhfItebuJhsGSLjaBbNSQ+ieg==} + strip-ansi@6.0.1: resolution: {integrity: sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==} engines: {node: '>=8'} @@ -1867,6 +2740,10 @@ packages: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} + superjson@2.2.6: + resolution: {integrity: sha512-H+ue8Zo4vJmV2nRjpx86P35lzwDT3nItnIsocgumgr0hHMQ+ZGq5vrERg9kJBo5AWGmxZDhzDo+WVIJqkB0cGA==} + engines: {node: '>=16'} + supports-color@7.2.0: resolution: {integrity: sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==} engines: {node: '>=8'} @@ -1875,6 +2752,9 @@ packages: resolution: {integrity: sha512-zFObLMyZeEwzAoKCyu1B91U79K2t7ApXuQfo8OuxwXLDgcKxuwM+YvcbIhm6QWqz7mHUH1TVytR1PwVVjEuMig==} engines: {node: '>=14.18'} + tabbable@6.5.0: + resolution: {integrity: sha512-wieBHXygIm7OyQOu5hQlkk62/WyCFYGlWg7L6/ZCUZwx0o398Zkn4pVmMyfYhfMG8kGrj/Krt8eIk6UKC6VzwA==} + term-size@2.2.1: resolution: {integrity: sha512-wK0Ri4fOGjv/XPy8SBHZChl8CM7uMc5VML7SqiQ0zG7+J5Vr+RMQDoHa2CNT6KHUnTGIXH34UDMkPzAUyapBZg==} engines: {node: '>=8'} @@ -1886,6 +2766,9 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} + tiny-invariant@1.3.3: + resolution: {integrity: sha512-+FbBPE1o9QAYvviau/qC5SE3caw21q3xkvWKBtja5vgqOWIHHJ3ioaq1VPfn/Szqctz2bU/oYeKd9/z5BL+PVg==} + tinybench@2.9.0: resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} @@ -1905,13 +2788,16 @@ packages: resolution: {integrity: sha512-Bf+ILmBgretUrdJxzXM0SgXLZ3XfiaUuOj/IKQHuTXip+05Xn+uyEYdVg0kYDipTBcLrCVyUzAPz7QmArb0mmw==} engines: {node: '>=14.0.0'} + tmp@0.2.7: + resolution: {integrity: sha512-e0votIpp4Uo2AJYSzVHV6xCcawuiez3DzqDAbrTc3YxBkplN6e+dM13ZeIcZnDg/QpSuU2zfZ3rzwY8ukEnaXw==} + engines: {node: '>=14.14'} + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} - toidentifier@1.0.1: - resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} - engines: {node: '>=0.6'} + trim-lines@3.0.1: + resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} ts-api-utils@2.5.0: resolution: {integrity: sha512-OJ/ibxhPlqrMM0UiNHJ/0CKQkoKF243/AEmplt3qpRgkW8VG7IfOS41h7V8TjITqdByHzrjcS/2si+y4lIh8NA==} @@ -1927,13 +2813,25 @@ packages: tslib@2.8.1: resolution: {integrity: sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==} + tsx@4.23.1: + resolution: {integrity: sha512-GQHnkIfxyx1wYCOS/wonik5MVRZU9hi1TEZmzGZSCJB1y9YgoZ8H6itNE/u4suE+yLmOzuE4E5S4TZ/ZX2wcWQ==} + engines: {node: '>=18.0.0'} + hasBin: true + type-check@0.4.0: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - type-is@1.6.18: - resolution: {integrity: sha512-TkRKr9sUTxEH8MdfuCSP7VizJyzRNMjj2J2do2Jr3Kym598JVdEksuzPQCnlFPW4ky9Q+iA+ma9BGm06XQBy8g==} - engines: {node: '>= 0.6'} + typedoc-plugin-markdown@4.12.0: + resolution: {integrity: sha512-eJDEMAfxCmede22c/Jw7d0FA13ggAQv+KkwQYKYCdqI02cin6Rc9QRwbG/7XvvHWinuFejySnZVUWDtvGk3Vbg==} + engines: {node: '>= 18'} + peerDependencies: + typedoc: 0.28.x + + typedoc-vitepress-theme@1.1.3: + resolution: {integrity: sha512-EK9iV7e3+R8lFNigdc0rIPWMxqfmDku0uGac3qYUu9tS4Qf1rhWZnyZJ4zu4G3iXrP5mqNPkv2wpODzRlA7jLw==} + peerDependencies: + typedoc-plugin-markdown: '>=4.11.0' typedoc@0.28.19: resolution: {integrity: sha512-wKh+lhdmMFivMlc6vRRcMGXeGEHGU2g8a2CkPTJjJlwRf1iXbimWIPcFolCqe4E0d/FRtGszpIrsp3WLpDB8Pw==} @@ -1969,36 +2867,74 @@ packages: resolution: {integrity: sha512-yLSH4py7oFH3oG/9K+XWrz1pSi3dfUrWEnInbxMfArOfc1+33BlGPQtLsOYwvdMy11AwUBetYuaRxSPqgkq+8g==} engines: {node: '>=4'} + unist-util-is@6.0.1: + resolution: {integrity: sha512-LsiILbtBETkDz8I9p1dQ0uyRUWuaQzd/cuEeS1hoRSyW5E5XGmTzlwY1OrNzzakGowI9Dr/I8HVaw4hTtnxy8g==} + + unist-util-position@5.0.0: + resolution: {integrity: sha512-fucsC7HjXvkB5R3kTCO7kUjRdrS0BJt3M/FPxmHMBOm8JQi2BsHAHFsy27E0EolP8rp0NzXsJ+jNPyDWvOJZPA==} + unist-util-stringify-position@4.0.0: resolution: {integrity: sha512-0ASV06AAoKCDkS2+xw5RXJywruurpbC4JZSm7nr7MOt1ojAzvyyaO+UxZf18j8FCF6kmzCZKcAgN/yu2gm2XgQ==} + unist-util-visit-parents@6.0.2: + resolution: {integrity: sha512-goh1s1TBrqSqukSc8wrjwWhL0hiJxgA8m4kFxGlQ+8FYQ3C/m11FcTs4YYem7V664AhHVvgoQLk890Ssdsr2IQ==} + + unist-util-visit@5.1.0: + resolution: {integrity: sha512-m+vIdyeCOpdr/QeQCu2EzxX/ohgS8KbnPDgFni4dQsfSCtpz8UqDyY5GjRru8PDKuYn7Fq19j1CQ+nJSsGKOzg==} + universalify@0.1.2: resolution: {integrity: sha512-rBJeI5CXAlmy1pV+617WB9J63U6XcazHHF2f2dbJix4XzpUF0RS3Zbj0FGIOCAva5P/d/GBOYaACQ1w+0azUkg==} engines: {node: '>= 4.0.0'} - unpipe@1.0.0: - resolution: {integrity: sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==} - engines: {node: '>= 0.8'} + update-browserslist-db@1.2.3: + resolution: {integrity: sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==} + hasBin: true + peerDependencies: + browserslist: '>= 4.21.0' uri-js@4.4.1: resolution: {integrity: sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==} - utils-merge@1.0.1: - resolution: {integrity: sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==} - engines: {node: '>= 0.4.0'} - validate-npm-package-name@5.0.1: resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} - vary@1.1.2: - resolution: {integrity: sha512-BNGbWLfd0eUPabhkXUVm0j8uuvREyTh5ovRa/dyow/BqAbZJyC+5fU+IzQOzmAKzYqYRAISoRhdQr3eIZ/PXqg==} - engines: {node: '>= 0.8'} + vfile-message@4.0.3: + resolution: {integrity: sha512-QTHzsGd1EhbZs4AsQ20JX1rC3cOlt/IWJruk893DfLRr57lcnOeMaWG4K0JrRta4mIJZKth2Au3mM3u03/JWKw==} - vite-plugin-externalize-deps@0.10.0: - resolution: {integrity: sha512-eQrtpT/Do7AvDn76l1yL6ZHyXJ+UWH2LaHVqhAes9go54qaAnPZuMbgxcroQ/7WY3ZyetZzYW2quQnDF0DV5qg==} + vfile@6.0.3: + resolution: {integrity: sha512-KzIbH/9tXat2u30jf+smMwFCsno4wHVdNmzFyL+T/L3UGqqk6JKfVqOFOZEpZSHADH1k40ab6NUIXZq422ov3Q==} + + vite@5.4.21: + resolution: {integrity: sha512-o5a9xKjbtuhY6Bi5S3+HvbRERmouabWbyUcpXXUA1u+GNUKoROi9byOJ8M0nHbHYHkYICiMlqxkg1KkYmm25Sw==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true peerDependencies: - vite: ^2.0.0 || ^3.0.0 || ^4.0.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true vite@8.0.16: resolution: {integrity: sha512-h9bXPmJichP5fLmVQo3PyaGSDE2n3aPuomeAlVRm0JLmt4rY6zmPKd59HYI4LNW8oTK7tlTsuC7l/m7awx9Jcw==} @@ -2043,6 +2979,18 @@ packages: yaml: optional: true + vitepress@1.6.4: + resolution: {integrity: sha512-+2ym1/+0VVrbhNyRoFFesVvBvHAVMZMK0rw60E3X/5349M1GuVdKeazuksqopEdvkKwKGs21Q729jX81/bkBJg==} + hasBin: true + peerDependencies: + markdown-it-mathjax3: ^4 + postcss: ^8 + peerDependenciesMeta: + markdown-it-mathjax3: + optional: true + postcss: + optional: true + vitest@4.1.9: resolution: {integrity: sha512-nE3/LEyc0z87uHYLZebqCUOaJr2hdtuPp7BQ4BosVFnfltxgAvMG08NyrSGlPpOUWvR27c5flSmYFTNr78L9GQ==} engines: {node: ^20.0.0 || ^22.0.0 || >=24.0.0} @@ -2084,6 +3032,14 @@ packages: jsdom: optional: true + vue@3.5.39: + resolution: {integrity: sha512-xmZCYabFGcirU8r0fTuvl/LICc1OU620rnqepaJDL/a141ZigkG7AyaxQLdqJ02ZRYzWe6YPaDHeQx7MfknQfA==} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + which@2.0.2: resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} engines: {node: '>= 8'} @@ -2102,10 +3058,17 @@ packages: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} + write-file-atomic@5.0.1: + resolution: {integrity: sha512-+QU2zd6OTD8XWIJCbffaiQeH9U73qIqafo1x6V1snCWYGJf6cVE0cDR4D8xRzcEnfI21IFrUPzPGtcPf8AC+Rw==} + engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} + y18n@5.0.8: resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} engines: {node: '>=10'} + yallist@3.1.1: + resolution: {integrity: sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==} + yaml@2.9.0: resolution: {integrity: sha512-2AvhNX3mb8zd6Zy7INTtSpl1F15HW6Wnqj0srWlkKLcpYl/gMIMJiyuGq2KeI2YFxUPjdlB+3Lc10seMLtL4cA==} engines: {node: '>= 14.6'} @@ -2123,14 +3086,126 @@ packages: resolution: {integrity: sha512-rVksvsnNCdJ/ohGc6xgPwyN8eheCxsiLM8mxuE/t/mOVqJewPuO1miLpTHQiRgTKCLexL4MeAFVagts7HmNZ2Q==} engines: {node: '>=10'} - zod@3.25.76: - resolution: {integrity: sha512-gzUt/qt81nXsFGKIFcC3YnfEAx5NkunCfnDlvuBSSFS02bcXu4Lmea0AFIUwbLWxWPx3d9p8S5QoaujKcNQxcQ==} - zod@4.4.3: resolution: {integrity: sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==} + zwitch@2.0.4: + resolution: {integrity: sha512-bXE4cR/kVZhKZX/RjPEflHaKVhUVl85noU3v6b8apfQEc1x4A+zBxjZ4lN8LqGd6WZ3dl98pY4o717VFmoPp+A==} + snapshots: + '@algolia/abtesting@1.22.0': + dependencies: + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 + + '@algolia/autocomplete-core@1.17.7(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)(search-insights@2.17.3)': + dependencies: + '@algolia/autocomplete-plugin-algolia-insights': 1.17.7(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)(search-insights@2.17.3) + '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.56.0)(algoliasearch@5.56.0) + transitivePeerDependencies: + - '@algolia/client-search' + - algoliasearch + - search-insights + + '@algolia/autocomplete-plugin-algolia-insights@1.17.7(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)(search-insights@2.17.3)': + dependencies: + '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.56.0)(algoliasearch@5.56.0) + search-insights: 2.17.3 + transitivePeerDependencies: + - '@algolia/client-search' + - algoliasearch + + '@algolia/autocomplete-preset-algolia@1.17.7(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)': + dependencies: + '@algolia/autocomplete-shared': 1.17.7(@algolia/client-search@5.56.0)(algoliasearch@5.56.0) + '@algolia/client-search': 5.56.0 + algoliasearch: 5.56.0 + + '@algolia/autocomplete-shared@1.17.7(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)': + dependencies: + '@algolia/client-search': 5.56.0 + algoliasearch: 5.56.0 + + '@algolia/client-abtesting@5.56.0': + dependencies: + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 + + '@algolia/client-analytics@5.56.0': + dependencies: + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 + + '@algolia/client-common@5.56.0': {} + + '@algolia/client-insights@5.56.0': + dependencies: + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 + + '@algolia/client-personalization@5.56.0': + dependencies: + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 + + '@algolia/client-query-suggestions@5.56.0': + dependencies: + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 + + '@algolia/client-search@5.56.0': + dependencies: + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 + + '@algolia/ingestion@1.56.0': + dependencies: + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 + + '@algolia/monitoring@1.56.0': + dependencies: + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 + + '@algolia/recommend@5.56.0': + dependencies: + '@algolia/client-common': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 + + '@algolia/requester-browser-xhr@5.56.0': + dependencies: + '@algolia/client-common': 5.56.0 + + '@algolia/requester-fetch@5.56.0': + dependencies: + '@algolia/client-common': 5.56.0 + + '@algolia/requester-node-http@5.56.0': + dependencies: + '@algolia/client-common': 5.56.0 + '@andrewbranch/untar.js@1.0.3': {} '@arethetypeswrong/cli@0.18.3': @@ -2154,29 +3229,263 @@ snapshots: typescript: 5.6.1-rc validate-npm-package-name: 5.0.1 - '@atlassian/atlassian-jwt@2.2.0': + '@babel/code-frame@7.29.7': dependencies: - express: 4.22.2 - jsuri: 1.3.1 - lodash: 4.18.1 + '@babel/helper-validator-identifier': 7.29.7 + js-tokens: 4.0.0 + picocolors: 1.1.1 + + '@babel/compat-data@7.29.7': {} + + '@babel/core@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.7 + '@babel/helper-compilation-targets': 7.29.7 + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/helpers': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/template': 7.29.7 + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 + '@jridgewell/remapping': 2.3.5 + convert-source-map: 2.0.0 + debug: 4.4.3 + gensync: 1.0.0-beta.2 + json5: 2.2.3 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/generator@7.29.7': + dependencies: + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + jsesc: 3.1.0 + + '@babel/helper-annotate-as-pure@7.29.7': + dependencies: + '@babel/types': 7.29.7 + + '@babel/helper-compilation-targets@7.29.7': + dependencies: + '@babel/compat-data': 7.29.7 + '@babel/helper-validator-option': 7.29.7 + browserslist: 4.28.6 + lru-cache: 5.1.1 + semver: 6.3.1 + + '@babel/helper-create-class-features-plugin@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-annotate-as-pure': 7.29.7 + '@babel/helper-member-expression-to-functions': 7.29.7 + '@babel/helper-optimise-call-expression': 7.29.7 + '@babel/helper-replace-supers': 7.29.7(@babel/core@7.29.7) + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 + '@babel/traverse': 7.29.7 + semver: 6.3.1 + transitivePeerDependencies: + - supports-color + + '@babel/helper-globals@7.29.7': {} + + '@babel/helper-member-expression-to-functions@7.29.7': + dependencies: + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-imports@7.29.7': + dependencies: + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-module-transforms@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-module-imports': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + '@babel/traverse': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-optimise-call-expression@7.29.7': + dependencies: + '@babel/types': 7.29.7 + + '@babel/helper-plugin-utils@7.29.7': {} + + '@babel/helper-replace-supers@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-member-expression-to-functions': 7.29.7 + '@babel/helper-optimise-call-expression': 7.29.7 + '@babel/traverse': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/helper-skip-transparent-expression-wrappers@7.29.7': + dependencies: + '@babel/traverse': 7.29.7 + '@babel/types': 7.29.7 transitivePeerDependencies: - supports-color '@babel/helper-string-parser@7.27.1': {} + '@babel/helper-string-parser@7.29.7': {} + '@babel/helper-validator-identifier@7.28.5': {} + '@babel/helper-validator-identifier@7.29.7': {} + + '@babel/helper-validator-option@7.29.7': {} + + '@babel/helpers@7.29.7': + dependencies: + '@babel/template': 7.29.7 + '@babel/types': 7.29.7 + '@babel/parser@7.29.3': dependencies: '@babel/types': 7.29.0 + '@babel/parser@7.29.7': + dependencies: + '@babel/types': 7.29.7 + + '@babel/plugin-syntax-flow@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-jsx@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-syntax-typescript@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-transform-class-properties@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/helper-plugin-utils': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-flow-strip-types@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + '@babel/plugin-syntax-flow': 7.29.7(@babel/core@7.29.7) + + '@babel/plugin-transform-modules-commonjs@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-module-transforms': 7.29.7(@babel/core@7.29.7) + '@babel/helper-plugin-utils': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-nullish-coalescing-operator@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + + '@babel/plugin-transform-optional-chaining@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-private-methods@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/helper-plugin-utils': 7.29.7 + transitivePeerDependencies: + - supports-color + + '@babel/plugin-transform-typescript@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-annotate-as-pure': 7.29.7 + '@babel/helper-create-class-features-plugin': 7.29.7(@babel/core@7.29.7) + '@babel/helper-plugin-utils': 7.29.7 + '@babel/helper-skip-transparent-expression-wrappers': 7.29.7 + '@babel/plugin-syntax-typescript': 7.29.7(@babel/core@7.29.7) + transitivePeerDependencies: + - supports-color + + '@babel/preset-flow@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + '@babel/helper-validator-option': 7.29.7 + '@babel/plugin-transform-flow-strip-types': 7.29.7(@babel/core@7.29.7) + + '@babel/preset-typescript@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + '@babel/helper-plugin-utils': 7.29.7 + '@babel/helper-validator-option': 7.29.7 + '@babel/plugin-syntax-jsx': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-typescript': 7.29.7(@babel/core@7.29.7) + transitivePeerDependencies: + - supports-color + + '@babel/register@7.29.7(@babel/core@7.29.7)': + dependencies: + '@babel/core': 7.29.7 + clone-deep: 4.0.1 + find-cache-dir: 2.1.0 + make-dir: 2.1.0 + pirates: 4.0.7 + source-map-support: 0.5.21 + '@babel/runtime@7.29.2': {} + '@babel/template@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/types': 7.29.7 + + '@babel/traverse@7.29.7': + dependencies: + '@babel/code-frame': 7.29.7 + '@babel/generator': 7.29.7 + '@babel/helper-globals': 7.29.7 + '@babel/parser': 7.29.7 + '@babel/template': 7.29.7 + '@babel/types': 7.29.7 + debug: 4.4.3 + transitivePeerDependencies: + - supports-color + '@babel/types@7.29.0': dependencies: '@babel/helper-string-parser': 7.27.1 '@babel/helper-validator-identifier': 7.28.5 + '@babel/types@7.29.7': + dependencies: + '@babel/helper-string-parser': 7.29.7 + '@babel/helper-validator-identifier': 7.29.7 + '@bcoe/v8-coverage@1.0.2': {} '@braidai/lang@1.1.2': {} @@ -2241,106 +3550,278 @@ snapshots: transitivePeerDependencies: - '@types/node' - '@changesets/config@3.1.4': - dependencies: - '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.4 - '@changesets/logger': 0.1.1 - '@changesets/should-skip-package': 0.1.2 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - fs-extra: 7.0.1 - micromatch: 4.0.8 + '@changesets/config@3.1.4': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/get-dependents-graph': 2.1.4 + '@changesets/logger': 0.1.1 + '@changesets/should-skip-package': 0.1.2 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + micromatch: 4.0.8 + + '@changesets/errors@0.2.0': + dependencies: + extendable-error: 0.1.7 + + '@changesets/get-dependents-graph@2.1.4': + dependencies: + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + picocolors: 1.1.1 + semver: 7.7.2 + + '@changesets/get-release-plan@4.0.16': + dependencies: + '@changesets/assemble-release-plan': 6.0.10 + '@changesets/config': 3.1.4 + '@changesets/pre': 2.0.2 + '@changesets/read': 0.6.7 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + + '@changesets/get-version-range-type@0.4.0': {} + + '@changesets/git@3.0.4': + dependencies: + '@changesets/errors': 0.2.0 + '@manypkg/get-packages': 1.1.3 + is-subdir: 1.2.0 + micromatch: 4.0.8 + spawndamnit: 3.0.1 + + '@changesets/logger@0.1.1': + dependencies: + picocolors: 1.1.1 + + '@changesets/parse@0.4.3': + dependencies: + '@changesets/types': 6.1.0 + js-yaml: 4.1.1 + + '@changesets/pre@2.0.2': + dependencies: + '@changesets/errors': 0.2.0 + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + fs-extra: 7.0.1 + + '@changesets/read@0.6.7': + dependencies: + '@changesets/git': 3.0.4 + '@changesets/logger': 0.1.1 + '@changesets/parse': 0.4.3 + '@changesets/types': 6.1.0 + fs-extra: 7.0.1 + p-filter: 2.1.0 + picocolors: 1.1.1 + + '@changesets/should-skip-package@0.1.2': + dependencies: + '@changesets/types': 6.1.0 + '@manypkg/get-packages': 1.1.3 + + '@changesets/types@4.1.0': {} + + '@changesets/types@6.1.0': {} + + '@changesets/write@0.4.0': + dependencies: + '@changesets/types': 6.1.0 + fs-extra: 7.0.1 + human-id: 4.1.3 + prettier: 2.8.8 + + '@colors/colors@1.5.0': + optional: true + + '@docsearch/css@3.8.2': {} + + '@docsearch/js@3.8.2(@algolia/client-search@5.56.0)(search-insights@2.17.3)': + dependencies: + '@docsearch/react': 3.8.2(@algolia/client-search@5.56.0)(search-insights@2.17.3) + preact: 10.29.7 + transitivePeerDependencies: + - '@algolia/client-search' + - '@types/react' + - preact-render-to-string + - react + - react-dom + - search-insights + + '@docsearch/react@3.8.2(@algolia/client-search@5.56.0)(search-insights@2.17.3)': + dependencies: + '@algolia/autocomplete-core': 1.17.7(@algolia/client-search@5.56.0)(algoliasearch@5.56.0)(search-insights@2.17.3) + '@algolia/autocomplete-preset-algolia': 1.17.7(@algolia/client-search@5.56.0)(algoliasearch@5.56.0) + '@docsearch/css': 3.8.2 + algoliasearch: 5.56.0 + optionalDependencies: + search-insights: 2.17.3 + transitivePeerDependencies: + - '@algolia/client-search' + + '@emnapi/core@1.10.0': + dependencies: + '@emnapi/wasi-threads': 1.2.1 + tslib: 2.8.1 + optional: true + + '@emnapi/runtime@1.10.0': + dependencies: + tslib: 2.8.1 + optional: true + + '@emnapi/wasi-threads@1.2.1': + dependencies: + tslib: 2.8.1 + optional: true + + '@esbuild/aix-ppc64@0.21.5': + optional: true + + '@esbuild/aix-ppc64@0.28.1': + optional: true + + '@esbuild/android-arm64@0.21.5': + optional: true + + '@esbuild/android-arm64@0.28.1': + optional: true + + '@esbuild/android-arm@0.21.5': + optional: true + + '@esbuild/android-arm@0.28.1': + optional: true + + '@esbuild/android-x64@0.21.5': + optional: true + + '@esbuild/android-x64@0.28.1': + optional: true + + '@esbuild/darwin-arm64@0.21.5': + optional: true + + '@esbuild/darwin-arm64@0.28.1': + optional: true + + '@esbuild/darwin-x64@0.21.5': + optional: true + + '@esbuild/darwin-x64@0.28.1': + optional: true + + '@esbuild/freebsd-arm64@0.21.5': + optional: true + + '@esbuild/freebsd-arm64@0.28.1': + optional: true + + '@esbuild/freebsd-x64@0.21.5': + optional: true + + '@esbuild/freebsd-x64@0.28.1': + optional: true + + '@esbuild/linux-arm64@0.21.5': + optional: true + + '@esbuild/linux-arm64@0.28.1': + optional: true + + '@esbuild/linux-arm@0.21.5': + optional: true + + '@esbuild/linux-arm@0.28.1': + optional: true + + '@esbuild/linux-ia32@0.21.5': + optional: true + + '@esbuild/linux-ia32@0.28.1': + optional: true + + '@esbuild/linux-loong64@0.21.5': + optional: true + + '@esbuild/linux-loong64@0.28.1': + optional: true + + '@esbuild/linux-mips64el@0.21.5': + optional: true + + '@esbuild/linux-mips64el@0.28.1': + optional: true + + '@esbuild/linux-ppc64@0.21.5': + optional: true + + '@esbuild/linux-ppc64@0.28.1': + optional: true + + '@esbuild/linux-riscv64@0.21.5': + optional: true - '@changesets/errors@0.2.0': - dependencies: - extendable-error: 0.1.7 + '@esbuild/linux-riscv64@0.28.1': + optional: true - '@changesets/get-dependents-graph@2.1.4': - dependencies: - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - picocolors: 1.1.1 - semver: 7.7.2 + '@esbuild/linux-s390x@0.21.5': + optional: true - '@changesets/get-release-plan@4.0.16': - dependencies: - '@changesets/assemble-release-plan': 6.0.10 - '@changesets/config': 3.1.4 - '@changesets/pre': 2.0.2 - '@changesets/read': 0.6.7 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 + '@esbuild/linux-s390x@0.28.1': + optional: true - '@changesets/get-version-range-type@0.4.0': {} + '@esbuild/linux-x64@0.21.5': + optional: true - '@changesets/git@3.0.4': - dependencies: - '@changesets/errors': 0.2.0 - '@manypkg/get-packages': 1.1.3 - is-subdir: 1.2.0 - micromatch: 4.0.8 - spawndamnit: 3.0.1 + '@esbuild/linux-x64@0.28.1': + optional: true - '@changesets/logger@0.1.1': - dependencies: - picocolors: 1.1.1 + '@esbuild/netbsd-arm64@0.28.1': + optional: true - '@changesets/parse@0.4.3': - dependencies: - '@changesets/types': 6.1.0 - js-yaml: 4.1.1 + '@esbuild/netbsd-x64@0.21.5': + optional: true - '@changesets/pre@2.0.2': - dependencies: - '@changesets/errors': 0.2.0 - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 - fs-extra: 7.0.1 + '@esbuild/netbsd-x64@0.28.1': + optional: true - '@changesets/read@0.6.7': - dependencies: - '@changesets/git': 3.0.4 - '@changesets/logger': 0.1.1 - '@changesets/parse': 0.4.3 - '@changesets/types': 6.1.0 - fs-extra: 7.0.1 - p-filter: 2.1.0 - picocolors: 1.1.1 + '@esbuild/openbsd-arm64@0.28.1': + optional: true - '@changesets/should-skip-package@0.1.2': - dependencies: - '@changesets/types': 6.1.0 - '@manypkg/get-packages': 1.1.3 + '@esbuild/openbsd-x64@0.21.5': + optional: true - '@changesets/types@4.1.0': {} + '@esbuild/openbsd-x64@0.28.1': + optional: true - '@changesets/types@6.1.0': {} + '@esbuild/openharmony-arm64@0.28.1': + optional: true - '@changesets/write@0.4.0': - dependencies: - '@changesets/types': 6.1.0 - fs-extra: 7.0.1 - human-id: 4.1.3 - prettier: 2.8.8 + '@esbuild/sunos-x64@0.21.5': + optional: true - '@colors/colors@1.5.0': + '@esbuild/sunos-x64@0.28.1': optional: true - '@emnapi/core@1.10.0': - dependencies: - '@emnapi/wasi-threads': 1.2.1 - tslib: 2.8.1 + '@esbuild/win32-arm64@0.21.5': optional: true - '@emnapi/runtime@1.10.0': - dependencies: - tslib: 2.8.1 + '@esbuild/win32-arm64@0.28.1': optional: true - '@emnapi/wasi-threads@1.2.1': - dependencies: - tslib: 2.8.1 + '@esbuild/win32-ia32@0.21.5': + optional: true + + '@esbuild/win32-ia32@0.28.1': + optional: true + + '@esbuild/win32-x64@0.21.5': + optional: true + + '@esbuild/win32-x64@0.28.1': optional: true '@eslint-community/eslint-utils@4.9.1(eslint@10.5.0(jiti@2.7.0))': @@ -2401,6 +3882,12 @@ snapshots: '@humanwhocodes/retry@0.4.3': {} + '@iconify-json/simple-icons@1.2.90': + dependencies: + '@iconify/types': 2.0.0 + + '@iconify/types@2.0.0': {} + '@inquirer/external-editor@1.0.3(@types/node@22.20.0)': dependencies: chardet: 2.1.1 @@ -2408,6 +3895,16 @@ snapshots: optionalDependencies: '@types/node': 22.20.0 + '@jridgewell/gen-mapping@0.3.13': + dependencies: + '@jridgewell/sourcemap-codec': 1.5.5 + '@jridgewell/trace-mapping': 0.3.31 + + '@jridgewell/remapping@2.3.5': + dependencies: + '@jridgewell/gen-mapping': 0.3.13 + '@jridgewell/trace-mapping': 0.3.31 + '@jridgewell/resolve-uri@3.1.2': {} '@jridgewell/sourcemap-codec@1.5.5': {} @@ -2509,19 +4006,132 @@ snapshots: '@rolldown/pluginutils@1.0.1': {} + '@rollup/rollup-android-arm-eabi@4.62.2': + optional: true + + '@rollup/rollup-android-arm64@4.62.2': + optional: true + + '@rollup/rollup-darwin-arm64@4.62.2': + optional: true + + '@rollup/rollup-darwin-x64@4.62.2': + optional: true + + '@rollup/rollup-freebsd-arm64@4.62.2': + optional: true + + '@rollup/rollup-freebsd-x64@4.62.2': + optional: true + + '@rollup/rollup-linux-arm-gnueabihf@4.62.2': + optional: true + + '@rollup/rollup-linux-arm-musleabihf@4.62.2': + optional: true + + '@rollup/rollup-linux-arm64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-arm64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-loong64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-loong64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-ppc64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-ppc64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-riscv64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-riscv64-musl@4.62.2': + optional: true + + '@rollup/rollup-linux-s390x-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-x64-gnu@4.62.2': + optional: true + + '@rollup/rollup-linux-x64-musl@4.62.2': + optional: true + + '@rollup/rollup-openbsd-x64@4.62.2': + optional: true + + '@rollup/rollup-openharmony-arm64@4.62.2': + optional: true + + '@rollup/rollup-win32-arm64-msvc@4.62.2': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.62.2': + optional: true + + '@rollup/rollup-win32-x64-gnu@4.62.2': + optional: true + + '@rollup/rollup-win32-x64-msvc@4.62.2': + optional: true + + '@shikijs/core@2.5.0': + dependencies: + '@shikijs/engine-javascript': 2.5.0 + '@shikijs/engine-oniguruma': 2.5.0 + '@shikijs/types': 2.5.0 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + hast-util-to-html: 9.0.5 + + '@shikijs/engine-javascript@2.5.0': + dependencies: + '@shikijs/types': 2.5.0 + '@shikijs/vscode-textmate': 10.0.2 + oniguruma-to-es: 3.1.1 + + '@shikijs/engine-oniguruma@2.5.0': + dependencies: + '@shikijs/types': 2.5.0 + '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/engine-oniguruma@3.23.0': dependencies: '@shikijs/types': 3.23.0 '@shikijs/vscode-textmate': 10.0.2 + '@shikijs/langs@2.5.0': + dependencies: + '@shikijs/types': 2.5.0 + '@shikijs/langs@3.23.0': dependencies: '@shikijs/types': 3.23.0 + '@shikijs/themes@2.5.0': + dependencies: + '@shikijs/types': 2.5.0 + '@shikijs/themes@3.23.0': dependencies: '@shikijs/types': 3.23.0 + '@shikijs/transformers@2.5.0': + dependencies: + '@shikijs/core': 2.5.0 + '@shikijs/types': 2.5.0 + + '@shikijs/types@2.5.0': + dependencies: + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 + '@shikijs/types@3.23.0': dependencies: '@shikijs/vscode-textmate': 10.0.2 @@ -2548,19 +4158,10 @@ snapshots: tslib: 2.8.1 optional: true - '@types/body-parser@1.19.6': - dependencies: - '@types/connect': 3.4.38 - '@types/node': 22.20.0 - '@types/chai@5.2.2': dependencies: '@types/deep-eql': 4.0.2 - '@types/connect@3.4.38': - dependencies: - '@types/node': 22.20.0 - '@types/debug@4.1.12': dependencies: '@types/ms': 2.1.0 @@ -2571,33 +4172,31 @@ snapshots: '@types/estree@1.0.8': {} - '@types/express-serve-static-core@4.19.8': - dependencies: - '@types/node': 22.20.0 - '@types/qs': 6.15.1 - '@types/range-parser': 1.2.7 - '@types/send': 1.2.1 - - '@types/express@4.17.25': - dependencies: - '@types/body-parser': 1.19.6 - '@types/express-serve-static-core': 4.19.8 - '@types/qs': 6.15.1 - '@types/serve-static': 1.15.10 + '@types/estree@1.0.9': {} '@types/hast@3.0.4': dependencies: '@types/unist': 3.0.3 - '@types/http-errors@2.0.5': {} + '@types/jscodeshift@17.3.0': + dependencies: + ast-types: 0.16.1 + recast: 0.23.12 '@types/json-schema@7.0.15': {} + '@types/linkify-it@5.0.0': {} + + '@types/markdown-it@14.1.2': + dependencies: + '@types/linkify-it': 5.0.0 + '@types/mdurl': 2.0.0 + '@types/mdast@4.0.4': dependencies: '@types/unist': 3.0.3 - '@types/mime@1.3.5': {} + '@types/mdurl@2.0.0': {} '@types/ms@2.1.0': {} @@ -2607,31 +4206,10 @@ snapshots: dependencies: undici-types: 6.21.0 - '@types/oauth@0.9.6': - dependencies: - '@types/node': 22.20.0 - - '@types/qs@6.15.1': {} - - '@types/range-parser@1.2.7': {} - - '@types/send@0.17.6': - dependencies: - '@types/mime': 1.3.5 - '@types/node': 22.20.0 - - '@types/send@1.2.1': - dependencies: - '@types/node': 22.20.0 - - '@types/serve-static@1.15.10': - dependencies: - '@types/http-errors': 2.0.5 - '@types/node': 22.20.0 - '@types/send': 0.17.6 - '@types/unist@3.0.3': {} + '@types/web-bluetooth@0.0.21': {} + '@typescript-eslint/eslint-plugin@8.61.1(@typescript-eslint/parser@8.61.1(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3))(eslint@10.5.0(jiti@2.7.0))(typescript@6.0.3)': dependencies: '@eslint-community/regexpp': 4.12.2 @@ -2703,7 +4281,7 @@ snapshots: debug: 4.4.3 minimatch: 10.2.5 semver: 7.8.1 - tinyglobby: 0.2.16 + tinyglobby: 0.2.17 ts-api-utils: 2.5.0(typescript@6.0.3) typescript: 6.0.3 transitivePeerDependencies: @@ -2725,6 +4303,13 @@ snapshots: '@typescript-eslint/types': 8.61.1 eslint-visitor-keys: 5.0.1 + '@ungap/structured-clone@1.3.3': {} + + '@vitejs/plugin-vue@5.2.4(vite@5.4.21(@types/node@22.20.0)(lightningcss@1.32.0))(vue@3.5.39(typescript@6.0.3))': + dependencies: + vite: 5.4.21(@types/node@22.20.0)(lightningcss@1.32.0) + vue: 3.5.39(typescript@6.0.3) + '@vitest/coverage-v8@4.1.9(vitest@4.1.9)': dependencies: '@bcoe/v8-coverage': 1.0.2 @@ -2737,7 +4322,7 @@ snapshots: obug: 2.1.3 std-env: 4.1.0 tinyrainbow: 3.1.0 - vitest: 4.1.9(@types/node@22.20.0)(@vitest/coverage-v8@4.1.9)(vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0)) + vitest: 4.1.9(@types/node@22.20.0)(@vitest/coverage-v8@4.1.9)(vite@8.0.16(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.23.1)(yaml@2.9.0)) '@vitest/expect@4.1.9': dependencies: @@ -2748,13 +4333,13 @@ snapshots: chai: 6.2.2 tinyrainbow: 3.1.0 - '@vitest/mocker@4.1.9(vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0))': + '@vitest/mocker@4.1.9(vite@8.0.16(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.23.1)(yaml@2.9.0))': dependencies: '@vitest/spy': 4.1.9 estree-walker: 3.0.3 magic-string: 0.30.21 optionalDependencies: - vite: 8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0) + vite: 8.0.16(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.23.1)(yaml@2.9.0) '@vitest/pretty-format@4.1.9': dependencies: @@ -2780,10 +4365,105 @@ snapshots: convert-source-map: 2.0.0 tinyrainbow: 3.1.0 - accepts@1.3.8: + '@vue/compiler-core@3.5.39': dependencies: - mime-types: 2.1.35 - negotiator: 0.6.3 + '@babel/parser': 7.29.7 + '@vue/shared': 3.5.39 + entities: 7.0.1 + estree-walker: 2.0.2 + source-map-js: 1.2.1 + + '@vue/compiler-dom@3.5.39': + dependencies: + '@vue/compiler-core': 3.5.39 + '@vue/shared': 3.5.39 + + '@vue/compiler-sfc@3.5.39': + dependencies: + '@babel/parser': 7.29.7 + '@vue/compiler-core': 3.5.39 + '@vue/compiler-dom': 3.5.39 + '@vue/compiler-ssr': 3.5.39 + '@vue/shared': 3.5.39 + estree-walker: 2.0.2 + magic-string: 0.30.21 + postcss: 8.5.15 + source-map-js: 1.2.1 + + '@vue/compiler-ssr@3.5.39': + dependencies: + '@vue/compiler-dom': 3.5.39 + '@vue/shared': 3.5.39 + + '@vue/devtools-api@7.7.10': + dependencies: + '@vue/devtools-kit': 7.7.10 + + '@vue/devtools-kit@7.7.10': + dependencies: + '@vue/devtools-shared': 7.7.10 + birpc: 2.9.0 + hookable: 5.5.3 + mitt: 3.0.1 + perfect-debounce: 1.0.0 + speakingurl: 14.0.1 + superjson: 2.2.6 + + '@vue/devtools-shared@7.7.10': + dependencies: + rfdc: 1.4.1 + + '@vue/reactivity@3.5.39': + dependencies: + '@vue/shared': 3.5.39 + + '@vue/runtime-core@3.5.39': + dependencies: + '@vue/reactivity': 3.5.39 + '@vue/shared': 3.5.39 + + '@vue/runtime-dom@3.5.39': + dependencies: + '@vue/reactivity': 3.5.39 + '@vue/runtime-core': 3.5.39 + '@vue/shared': 3.5.39 + csstype: 3.2.3 + + '@vue/server-renderer@3.5.39(vue@3.5.39(typescript@6.0.3))': + dependencies: + '@vue/compiler-ssr': 3.5.39 + '@vue/shared': 3.5.39 + vue: 3.5.39(typescript@6.0.3) + + '@vue/shared@3.5.39': {} + + '@vueuse/core@12.8.2(typescript@6.0.3)': + dependencies: + '@types/web-bluetooth': 0.0.21 + '@vueuse/metadata': 12.8.2 + '@vueuse/shared': 12.8.2(typescript@6.0.3) + vue: 3.5.39(typescript@6.0.3) + transitivePeerDependencies: + - typescript + + '@vueuse/integrations@12.8.2(axios@1.18.1)(focus-trap@7.8.0)(typescript@6.0.3)': + dependencies: + '@vueuse/core': 12.8.2(typescript@6.0.3) + '@vueuse/shared': 12.8.2(typescript@6.0.3) + vue: 3.5.39(typescript@6.0.3) + optionalDependencies: + axios: 1.18.1 + focus-trap: 7.8.0 + transitivePeerDependencies: + - typescript + + '@vueuse/metadata@12.8.2': {} + + '@vueuse/shared@12.8.2(typescript@6.0.3)': + dependencies: + vue: 3.5.39(typescript@6.0.3) + transitivePeerDependencies: + - typescript acorn-jsx@5.3.2(acorn@8.16.0): dependencies: @@ -2796,6 +4476,7 @@ snapshots: debug: 4.4.3 transitivePeerDependencies: - supports-color + optional: true ajv@6.15.0: dependencies: @@ -2804,6 +4485,23 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 + algoliasearch@5.56.0: + dependencies: + '@algolia/abtesting': 1.22.0 + '@algolia/client-abtesting': 5.56.0 + '@algolia/client-analytics': 5.56.0 + '@algolia/client-common': 5.56.0 + '@algolia/client-insights': 5.56.0 + '@algolia/client-personalization': 5.56.0 + '@algolia/client-query-suggestions': 5.56.0 + '@algolia/client-search': 5.56.0 + '@algolia/ingestion': 1.56.0 + '@algolia/monitoring': 1.56.0 + '@algolia/recommend': 5.56.0 + '@algolia/requester-browser-xhr': 5.56.0 + '@algolia/requester-fetch': 5.56.0 + '@algolia/requester-node-http': 5.56.0 + ansi-colors@4.1.3: {} ansi-escapes@7.3.0: @@ -2831,17 +4529,20 @@ snapshots: argparse@2.0.1: {} - array-flatten@1.1.1: {} - array-union@2.1.0: {} + ast-types@0.16.1: + dependencies: + tslib: 2.8.1 + ast-v8-to-istanbul@1.0.4: dependencies: '@jridgewell/trace-mapping': 0.3.31 estree-walker: 3.0.3 js-tokens: 10.0.0 - asynckit@0.4.0: {} + asynckit@0.4.0: + optional: true axios@1.18.1: dependencies: @@ -2852,9 +4553,12 @@ snapshots: transitivePeerDependencies: - debug - supports-color + optional: true balanced-match@4.0.4: {} + baseline-browser-mapping@2.10.43: {} + better-path-resolve@1.0.0: dependencies: is-windows: 1.0.2 @@ -2863,22 +4567,7 @@ snapshots: binary-searching@2.0.5: {} - body-parser@1.20.5: - dependencies: - bytes: 3.1.2 - content-type: 1.0.5 - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - http-errors: 2.0.1 - iconv-lite: 0.4.24 - on-finished: 2.4.1 - qs: 6.15.3 - raw-body: 2.5.3 - type-is: 1.6.18 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color + birpc@2.9.0: {} brace-expansion@5.0.6: dependencies: @@ -2888,17 +4577,25 @@ snapshots: dependencies: fill-range: 7.1.1 - bytes@3.1.2: {} + browserslist@4.28.6: + dependencies: + baseline-browser-mapping: 2.10.43 + caniuse-lite: 1.0.30001805 + electron-to-chromium: 1.5.392 + node-releases: 2.0.51 + update-browserslist-db: 1.2.3(browserslist@4.28.6) + + buffer-from@1.1.2: {} call-bind-apply-helpers@1.0.2: dependencies: es-errors: 1.3.0 function-bind: 1.1.2 + optional: true - call-bound@1.0.4: - dependencies: - call-bind-apply-helpers: 1.0.2 - get-intrinsic: 1.3.0 + caniuse-lite@1.0.30001805: {} + + ccount@2.0.1: {} chai@6.2.2: {} @@ -2911,6 +4608,10 @@ snapshots: char-regex@1.0.2: {} + character-entities-html4@2.1.0: {} + + character-entities-legacy@3.0.0: {} + character-entities@2.0.2: {} chardet@2.1.1: {} @@ -2950,6 +4651,12 @@ snapshots: strip-ansi: 6.0.1 wrap-ansi: 7.0.0 + clone-deep@4.0.1: + dependencies: + is-plain-object: 2.0.4 + kind-of: 6.0.3 + shallow-clone: 3.0.1 + color-convert@2.0.1: dependencies: color-name: 1.1.4 @@ -2959,6 +4666,9 @@ snapshots: combined-stream@1.0.8: dependencies: delayed-stream: 1.0.0 + optional: true + + comma-separated-tokens@2.0.3: {} commander@10.0.1: {} @@ -2966,17 +4676,13 @@ snapshots: comment-parser@1.4.1: {} - content-disposition@0.5.4: - dependencies: - safe-buffer: 5.2.1 - - content-type@1.0.5: {} + commondir@1.0.1: {} convert-source-map@2.0.0: {} - cookie-signature@1.0.7: {} - - cookie@0.7.2: {} + copy-anything@4.0.5: + dependencies: + is-what: 5.5.0 cross-spawn@7.0.6: dependencies: @@ -2984,9 +4690,7 @@ snapshots: shebang-command: 2.0.0 which: 2.0.2 - debug@2.6.9: - dependencies: - ms: 2.0.0 + csstype@3.2.3: {} debug@4.4.3: dependencies: @@ -2998,14 +4702,11 @@ snapshots: deep-is@0.1.4: {} - delayed-stream@1.0.0: {} - - depd@2.0.0: {} + delayed-stream@1.0.0: + optional: true dequal@2.0.3: {} - destroy@1.2.0: {} - detect-indent@6.1.0: {} detect-libc@2.1.2: {} @@ -3025,15 +4726,16 @@ snapshots: call-bind-apply-helpers: 1.0.2 es-errors: 1.3.0 gopd: 1.2.0 + optional: true + + electron-to-chromium@1.5.392: {} - ee-first@1.1.1: {} + emoji-regex-xs@1.0.0: {} emoji-regex@8.0.0: {} emojilib@2.4.0: {} - encodeurl@2.0.0: {} - enquirer@2.4.1: dependencies: ansi-colors: 4.1.3 @@ -3041,17 +4743,22 @@ snapshots: entities@4.5.0: {} + entities@7.0.1: {} + environment@1.1.0: {} - es-define-property@1.0.1: {} + es-define-property@1.0.1: + optional: true - es-errors@1.3.0: {} + es-errors@1.3.0: + optional: true es-module-lexer@2.1.0: {} es-object-atoms@1.1.2: dependencies: es-errors: 1.3.0 + optional: true es-set-tostringtag@2.1.0: dependencies: @@ -3059,10 +4766,64 @@ snapshots: get-intrinsic: 1.3.0 has-tostringtag: 1.0.2 hasown: 2.0.4 + optional: true - escalade@3.2.0: {} + esbuild@0.21.5: + optionalDependencies: + '@esbuild/aix-ppc64': 0.21.5 + '@esbuild/android-arm': 0.21.5 + '@esbuild/android-arm64': 0.21.5 + '@esbuild/android-x64': 0.21.5 + '@esbuild/darwin-arm64': 0.21.5 + '@esbuild/darwin-x64': 0.21.5 + '@esbuild/freebsd-arm64': 0.21.5 + '@esbuild/freebsd-x64': 0.21.5 + '@esbuild/linux-arm': 0.21.5 + '@esbuild/linux-arm64': 0.21.5 + '@esbuild/linux-ia32': 0.21.5 + '@esbuild/linux-loong64': 0.21.5 + '@esbuild/linux-mips64el': 0.21.5 + '@esbuild/linux-ppc64': 0.21.5 + '@esbuild/linux-riscv64': 0.21.5 + '@esbuild/linux-s390x': 0.21.5 + '@esbuild/linux-x64': 0.21.5 + '@esbuild/netbsd-x64': 0.21.5 + '@esbuild/openbsd-x64': 0.21.5 + '@esbuild/sunos-x64': 0.21.5 + '@esbuild/win32-arm64': 0.21.5 + '@esbuild/win32-ia32': 0.21.5 + '@esbuild/win32-x64': 0.21.5 + + esbuild@0.28.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.28.1 + '@esbuild/android-arm': 0.28.1 + '@esbuild/android-arm64': 0.28.1 + '@esbuild/android-x64': 0.28.1 + '@esbuild/darwin-arm64': 0.28.1 + '@esbuild/darwin-x64': 0.28.1 + '@esbuild/freebsd-arm64': 0.28.1 + '@esbuild/freebsd-x64': 0.28.1 + '@esbuild/linux-arm': 0.28.1 + '@esbuild/linux-arm64': 0.28.1 + '@esbuild/linux-ia32': 0.28.1 + '@esbuild/linux-loong64': 0.28.1 + '@esbuild/linux-mips64el': 0.28.1 + '@esbuild/linux-ppc64': 0.28.1 + '@esbuild/linux-riscv64': 0.28.1 + '@esbuild/linux-s390x': 0.28.1 + '@esbuild/linux-x64': 0.28.1 + '@esbuild/netbsd-arm64': 0.28.1 + '@esbuild/netbsd-x64': 0.28.1 + '@esbuild/openbsd-arm64': 0.28.1 + '@esbuild/openbsd-x64': 0.28.1 + '@esbuild/openharmony-arm64': 0.28.1 + '@esbuild/sunos-x64': 0.28.1 + '@esbuild/win32-arm64': 0.28.1 + '@esbuild/win32-ia32': 0.28.1 + '@esbuild/win32-x64': 0.28.1 - escape-html@1.0.3: {} + escalade@3.2.0: {} escape-string-regexp@4.0.0: {} @@ -3140,52 +4901,16 @@ snapshots: estraverse@5.3.0: {} + estree-walker@2.0.2: {} + estree-walker@3.0.3: dependencies: '@types/estree': 1.0.8 esutils@2.0.3: {} - etag@1.8.1: {} - expect-type@1.3.0: {} - express@4.22.2: - dependencies: - accepts: 1.3.8 - array-flatten: 1.1.1 - body-parser: 1.20.5 - content-disposition: 0.5.4 - content-type: 1.0.5 - cookie: 0.7.2 - cookie-signature: 1.0.7 - debug: 2.6.9 - depd: 2.0.0 - encodeurl: 2.0.0 - escape-html: 1.0.3 - etag: 1.8.1 - finalhandler: 1.3.2 - fresh: 0.5.2 - http-errors: 2.0.1 - merge-descriptors: 1.0.3 - methods: 1.1.2 - on-finished: 2.4.1 - parseurl: 1.3.3 - path-to-regexp: 0.1.13 - proxy-addr: 2.0.7 - qs: 6.15.3 - range-parser: 1.2.1 - safe-buffer: 5.2.1 - send: 0.19.2 - serve-static: 1.16.3 - setprototypeof: 1.2.0 - statuses: 2.0.2 - type-is: 1.6.18 - utils-merge: 1.0.1 - vary: 1.1.2 - transitivePeerDependencies: - - supports-color - extendable-error@0.1.7: {} fast-deep-equal@3.1.3: {} @@ -3220,17 +4945,15 @@ snapshots: dependencies: to-regex-range: 5.0.1 - finalhandler@1.3.2: + find-cache-dir@2.1.0: dependencies: - debug: 2.6.9 - encodeurl: 2.0.0 - escape-html: 1.0.3 - on-finished: 2.4.1 - parseurl: 1.3.3 - statuses: 2.0.2 - unpipe: 1.0.0 - transitivePeerDependencies: - - supports-color + commondir: 1.0.1 + make-dir: 2.1.0 + pkg-dir: 3.0.0 + + find-up@3.0.0: + dependencies: + locate-path: 3.0.0 find-up@4.1.0: dependencies: @@ -3249,7 +4972,18 @@ snapshots: flatted@3.4.2: {} - follow-redirects@1.16.0: {} + flow-estree@0.322.0: {} + + flow-parser@0.322.0: + dependencies: + flow-estree: 0.322.0 + + focus-trap@7.8.0: + dependencies: + tabbable: 6.5.0 + + follow-redirects@1.16.0: + optional: true form-data@4.0.6: dependencies: @@ -3258,10 +4992,7 @@ snapshots: es-set-tostringtag: 2.1.0 hasown: 2.0.4 mime-types: 2.1.35 - - forwarded@0.2.0: {} - - fresh@0.5.2: {} + optional: true fs-extra@7.0.1: dependencies: @@ -3278,7 +5009,10 @@ snapshots: fsevents@2.3.3: optional: true - function-bind@1.1.2: {} + function-bind@1.1.2: + optional: true + + gensync@1.0.0-beta.2: {} get-caller-file@2.0.5: {} @@ -3294,11 +5028,13 @@ snapshots: has-symbols: 1.1.0 hasown: 2.0.4 math-intrinsics: 1.1.0 + optional: true get-proto@1.0.1: dependencies: dunder-proto: 1.0.1 es-object-atoms: 1.1.2 + optional: true get-tsconfig@4.14.0: dependencies: @@ -3323,33 +5059,51 @@ snapshots: merge2: 1.4.1 slash: 3.0.0 - gopd@1.2.0: {} + gopd@1.2.0: + optional: true graceful-fs@4.2.11: {} has-flag@4.0.0: {} - has-symbols@1.1.0: {} + has-symbols@1.1.0: + optional: true has-tostringtag@1.0.2: dependencies: has-symbols: 1.1.0 + optional: true hasown@2.0.4: dependencies: function-bind: 1.1.2 + optional: true + + hast-util-to-html@9.0.5: + dependencies: + '@types/hast': 3.0.4 + '@types/unist': 3.0.3 + ccount: 2.0.1 + comma-separated-tokens: 2.0.3 + hast-util-whitespace: 3.0.0 + html-void-elements: 3.0.0 + mdast-util-to-hast: 13.2.1 + property-information: 7.2.0 + space-separated-tokens: 2.0.2 + stringify-entities: 4.0.4 + zwitch: 2.0.4 + + hast-util-whitespace@3.0.0: + dependencies: + '@types/hast': 3.0.4 highlight.js@10.7.3: {} + hookable@5.5.3: {} + html-escaper@2.0.2: {} - http-errors@2.0.1: - dependencies: - depd: 2.0.0 - inherits: 2.0.4 - setprototypeof: 1.2.0 - statuses: 2.0.2 - toidentifier: 1.0.1 + html-void-elements@3.0.0: {} https-proxy-agent@5.0.1: dependencies: @@ -3357,15 +5111,12 @@ snapshots: debug: 4.4.3 transitivePeerDependencies: - supports-color + optional: true human-id@4.1.3: {} husky@9.1.7: {} - iconv-lite@0.4.24: - dependencies: - safer-buffer: 2.1.2 - iconv-lite@0.7.2: dependencies: safer-buffer: 2.1.2 @@ -3376,10 +5127,6 @@ snapshots: imurmurhash@0.1.4: {} - inherits@2.0.4: {} - - ipaddr.js@1.9.1: {} - is-binary-path@2.1.0: dependencies: binary-extensions: 2.3.0 @@ -3394,14 +5141,22 @@ snapshots: is-number@7.0.0: {} + is-plain-object@2.0.4: + dependencies: + isobject: 3.0.1 + is-subdir@1.2.0: dependencies: better-path-resolve: 1.0.0 + is-what@5.5.0: {} + is-windows@1.0.2: {} isexe@2.0.0: {} + isobject@3.0.1: {} + istanbul-lib-coverage@3.2.2: {} istanbul-lib-report@3.0.1: @@ -3419,6 +5174,8 @@ snapshots: js-tokens@10.0.0: {} + js-tokens@4.0.0: {} + js-yaml@3.14.2: dependencies: argparse: 1.0.10 @@ -3428,22 +5185,49 @@ snapshots: dependencies: argparse: 2.0.1 + jscodeshift@17.4.0: + dependencies: + '@babel/core': 7.29.7 + '@babel/parser': 7.29.3 + '@babel/plugin-transform-class-properties': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-modules-commonjs': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-nullish-coalescing-operator': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-optional-chaining': 7.29.7(@babel/core@7.29.7) + '@babel/plugin-transform-private-methods': 7.29.7(@babel/core@7.29.7) + '@babel/preset-flow': 7.29.7(@babel/core@7.29.7) + '@babel/preset-typescript': 7.29.7(@babel/core@7.29.7) + '@babel/register': 7.29.7(@babel/core@7.29.7) + flow-parser: 0.322.0 + graceful-fs: 4.2.11 + neo-async: 2.6.2 + picocolors: 1.1.1 + picomatch: 4.0.4 + recast: 0.23.12 + tmp: 0.2.7 + write-file-atomic: 5.0.1 + transitivePeerDependencies: + - supports-color + + jsesc@3.1.0: {} + json-buffer@3.0.1: {} json-schema-traverse@0.4.1: {} json-stable-stringify-without-jsonify@1.0.1: {} + json5@2.2.3: {} + jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 - jsuri@1.3.1: {} - keyv@4.5.4: dependencies: json-buffer: 3.0.1 + kind-of@6.0.3: {} + levn@0.4.1: dependencies: prelude-ls: 1.2.1 @@ -3502,6 +5286,11 @@ snapshots: dependencies: uc.micro: 2.1.0 + locate-path@3.0.0: + dependencies: + p-locate: 3.0.0 + path-exists: 3.0.0 + locate-path@5.0.0: dependencies: p-locate: 4.1.0 @@ -3512,10 +5301,12 @@ snapshots: lodash.startcase@4.4.0: {} - lodash@4.18.1: {} - lru-cache@11.5.0: {} + lru-cache@5.1.1: + dependencies: + yallist: 3.1.1 + lunr@2.3.9: {} magic-string@0.30.21: @@ -3528,10 +5319,17 @@ snapshots: '@babel/types': 7.29.0 source-map-js: 1.2.1 + make-dir@2.1.0: + dependencies: + pify: 4.0.1 + semver: 5.7.2 + make-dir@4.0.0: dependencies: semver: 7.8.1 + mark.js@8.11.1: {} + markdown-it@14.2.0: dependencies: argparse: 2.0.1 @@ -3554,7 +5352,8 @@ snapshots: marked@9.1.6: {} - math-intrinsics@1.1.0: {} + math-intrinsics@1.1.0: + optional: true mdast-util-from-markdown@2.0.2: dependencies: @@ -3573,20 +5372,26 @@ snapshots: transitivePeerDependencies: - supports-color + mdast-util-to-hast@13.2.1: + dependencies: + '@types/hast': 3.0.4 + '@types/mdast': 4.0.4 + '@ungap/structured-clone': 1.3.3 + devlop: 1.1.0 + micromark-util-sanitize-uri: 2.0.1 + trim-lines: 3.0.1 + unist-util-position: 5.0.0 + unist-util-visit: 5.1.0 + vfile: 6.0.3 + mdast-util-to-string@4.0.0: dependencies: '@types/mdast': 4.0.4 mdurl@2.0.0: {} - media-typer@0.3.0: {} - - merge-descriptors@1.0.3: {} - merge2@1.4.1: {} - methods@1.1.2: {} - micromark-core-commonmark@2.0.3: dependencies: decode-named-character-reference: 1.2.0 @@ -3725,21 +5530,23 @@ snapshots: braces: 3.0.3 picomatch: 2.3.2 - mime-db@1.52.0: {} + mime-db@1.52.0: + optional: true mime-types@2.1.35: dependencies: mime-db: 1.52.0 - - mime@1.6.0: {} + optional: true minimatch@10.2.5: dependencies: brace-expansion: 5.0.6 - mri@1.2.0: {} + minisearch@7.2.0: {} - ms@2.0.0: {} + mitt@3.0.1: {} + + mri@1.2.0: {} ms@2.1.3: {} @@ -3755,7 +5562,7 @@ snapshots: natural-compare@1.4.0: {} - negotiator@0.6.3: {} + neo-async@2.6.2: {} node-emoji@2.2.0: dependencies: @@ -3764,19 +5571,19 @@ snapshots: emojilib: 2.4.0 skin-tone: 2.0.0 - normalize-path@3.0.0: {} + node-releases@2.0.51: {} - oauth@0.10.2: {} + normalize-path@3.0.0: {} object-assign@4.1.1: {} - object-inspect@1.13.4: {} - obug@2.1.3: {} - on-finished@2.4.1: + oniguruma-to-es@3.1.1: dependencies: - ee-first: 1.1.1 + emoji-regex-xs: 1.0.0 + regex: 6.1.0 + regex-recursion: 6.0.2 optionator@0.9.4: dependencies: @@ -3801,6 +5608,10 @@ snapshots: dependencies: yocto-queue: 0.1.0 + p-locate@3.0.0: + dependencies: + p-limit: 2.3.0 + p-locate@4.1.0: dependencies: p-limit: 2.3.0 @@ -3825,18 +5636,18 @@ snapshots: parse5@6.0.1: {} - parseurl@1.3.3: {} + path-exists@3.0.0: {} path-exists@4.0.0: {} path-key@3.1.1: {} - path-to-regexp@0.1.13: {} - path-type@4.0.0: {} pathe@2.0.3: {} + perfect-debounce@1.0.0: {} + picocolors@1.1.1: {} picomatch@2.3.2: {} @@ -3845,6 +5656,12 @@ snapshots: pify@4.0.1: {} + pirates@4.0.7: {} + + pkg-dir@3.0.0: + dependencies: + find-up: 3.0.0 + plimit-lit@1.6.1: dependencies: queue-lit: 1.5.2 @@ -3855,6 +5672,8 @@ snapshots: picocolors: 1.1.1 source-map-js: 1.2.1 + preact@10.29.7: {} + prelude-ls@1.2.1: {} prettier-plugin-jsdoc@1.8.1(prettier@3.8.4): @@ -3870,37 +5689,21 @@ snapshots: prettier@3.8.4: {} - proxy-addr@2.0.7: - dependencies: - forwarded: 0.2.0 - ipaddr.js: 1.9.1 + property-information@7.2.0: {} - proxy-from-env@2.1.0: {} + proxy-from-env@2.1.0: + optional: true punycode.js@2.3.1: {} punycode@2.3.1: {} - qs@6.15.3: - dependencies: - es-define-property: 1.0.1 - side-channel: 1.1.1 - quansync@0.2.11: {} queue-lit@1.5.2: {} queue-microtask@1.2.3: {} - range-parser@1.2.1: {} - - raw-body@2.5.3: - dependencies: - bytes: 3.1.2 - http-errors: 2.0.1 - iconv-lite: 0.4.24 - unpipe: 1.0.0 - read-yaml-file@1.1.0: dependencies: graceful-fs: 4.2.11 @@ -3912,6 +5715,24 @@ snapshots: dependencies: picomatch: 2.3.2 + recast@0.23.12: + dependencies: + ast-types: 0.16.1 + esprima: 4.0.1 + source-map: 0.6.1 + tiny-invariant: 1.3.3 + tslib: 2.8.1 + + regex-recursion@6.0.2: + dependencies: + regex-utilities: 2.3.0 + + regex-utilities@2.3.0: {} + + regex@6.1.0: + dependencies: + regex-utilities: 2.3.0 + require-directory@2.1.1: {} resolve-from@5.0.0: {} @@ -3920,6 +5741,8 @@ snapshots: reusify@1.1.0: {} + rfdc@1.4.1: {} + rolldown@1.0.3: dependencies: '@oxc-project/types': 0.133.0 @@ -3941,46 +5764,56 @@ snapshots: '@rolldown/binding-win32-arm64-msvc': 1.0.3 '@rolldown/binding-win32-x64-msvc': 1.0.3 + rollup@4.62.2: + dependencies: + '@types/estree': 1.0.9 + optionalDependencies: + '@rollup/rollup-android-arm-eabi': 4.62.2 + '@rollup/rollup-android-arm64': 4.62.2 + '@rollup/rollup-darwin-arm64': 4.62.2 + '@rollup/rollup-darwin-x64': 4.62.2 + '@rollup/rollup-freebsd-arm64': 4.62.2 + '@rollup/rollup-freebsd-x64': 4.62.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.62.2 + '@rollup/rollup-linux-arm-musleabihf': 4.62.2 + '@rollup/rollup-linux-arm64-gnu': 4.62.2 + '@rollup/rollup-linux-arm64-musl': 4.62.2 + '@rollup/rollup-linux-loong64-gnu': 4.62.2 + '@rollup/rollup-linux-loong64-musl': 4.62.2 + '@rollup/rollup-linux-ppc64-gnu': 4.62.2 + '@rollup/rollup-linux-ppc64-musl': 4.62.2 + '@rollup/rollup-linux-riscv64-gnu': 4.62.2 + '@rollup/rollup-linux-riscv64-musl': 4.62.2 + '@rollup/rollup-linux-s390x-gnu': 4.62.2 + '@rollup/rollup-linux-x64-gnu': 4.62.2 + '@rollup/rollup-linux-x64-musl': 4.62.2 + '@rollup/rollup-openbsd-x64': 4.62.2 + '@rollup/rollup-openharmony-arm64': 4.62.2 + '@rollup/rollup-win32-arm64-msvc': 4.62.2 + '@rollup/rollup-win32-ia32-msvc': 4.62.2 + '@rollup/rollup-win32-x64-gnu': 4.62.2 + '@rollup/rollup-win32-x64-msvc': 4.62.2 + fsevents: 2.3.3 + run-parallel@1.2.0: dependencies: queue-microtask: 1.2.3 - safe-buffer@5.2.1: {} - safer-buffer@2.1.2: {} + search-insights@2.17.3: {} + + semver@5.7.2: {} + + semver@6.3.1: {} + semver@7.7.2: {} semver@7.8.1: {} - send@0.19.2: - dependencies: - debug: 2.6.9 - depd: 2.0.0 - destroy: 1.2.0 - encodeurl: 2.0.0 - escape-html: 1.0.3 - etag: 1.8.1 - fresh: 0.5.2 - http-errors: 2.0.1 - mime: 1.6.0 - ms: 2.1.3 - on-finished: 2.4.1 - range-parser: 1.2.1 - statuses: 2.0.2 - transitivePeerDependencies: - - supports-color - - serve-static@1.16.3: + shallow-clone@3.0.1: dependencies: - encodeurl: 2.0.0 - escape-html: 1.0.3 - parseurl: 1.3.3 - send: 0.19.2 - transitivePeerDependencies: - - supports-color - - setprototypeof@1.2.0: {} + kind-of: 6.0.3 shebang-command@2.0.0: dependencies: @@ -3988,33 +5821,16 @@ snapshots: shebang-regex@3.0.0: {} - side-channel-list@1.0.1: - dependencies: - es-errors: 1.3.0 - object-inspect: 1.13.4 - - side-channel-map@1.0.1: - dependencies: - call-bound: 1.0.4 - es-errors: 1.3.0 - get-intrinsic: 1.3.0 - object-inspect: 1.13.4 - - side-channel-weakmap@1.0.2: - dependencies: - call-bound: 1.0.4 - es-errors: 1.3.0 - get-intrinsic: 1.3.0 - object-inspect: 1.13.4 - side-channel-map: 1.0.1 - - side-channel@1.1.1: + shiki@2.5.0: dependencies: - es-errors: 1.3.0 - object-inspect: 1.13.4 - side-channel-list: 1.0.1 - side-channel-map: 1.0.1 - side-channel-weakmap: 1.0.2 + '@shikijs/core': 2.5.0 + '@shikijs/engine-javascript': 2.5.0 + '@shikijs/engine-oniguruma': 2.5.0 + '@shikijs/langs': 2.5.0 + '@shikijs/themes': 2.5.0 + '@shikijs/types': 2.5.0 + '@shikijs/vscode-textmate': 10.0.2 + '@types/hast': 3.0.4 siginfo@2.0.0: {} @@ -4028,17 +5844,26 @@ snapshots: source-map-js@1.2.1: {} + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + + source-map@0.6.1: {} + + space-separated-tokens@2.0.2: {} + spawndamnit@3.0.1: dependencies: cross-spawn: 7.0.6 signal-exit: 4.1.0 + speakingurl@14.0.1: {} + sprintf-js@1.0.3: {} stackback@0.0.2: {} - statuses@2.0.2: {} - std-env@4.1.0: {} string-width@4.2.3: @@ -4047,12 +5872,21 @@ snapshots: is-fullwidth-code-point: 3.0.0 strip-ansi: 6.0.1 + stringify-entities@4.0.4: + dependencies: + character-entities-html4: 2.1.0 + character-entities-legacy: 3.0.0 + strip-ansi@6.0.1: dependencies: ansi-regex: 5.0.1 strip-bom@3.0.0: {} + superjson@2.2.6: + dependencies: + copy-anything: 4.0.5 + supports-color@7.2.0: dependencies: has-flag: 4.0.0 @@ -4062,6 +5896,8 @@ snapshots: has-flag: 4.0.0 supports-color: 7.2.0 + tabbable@6.5.0: {} + term-size@2.2.1: {} thenify-all@1.6.0: @@ -4072,6 +5908,8 @@ snapshots: dependencies: any-promise: 1.3.0 + tiny-invariant@1.3.3: {} + tinybench@2.9.0: {} tinyexec@1.2.4: {} @@ -4088,11 +5926,13 @@ snapshots: tinyrainbow@3.1.0: {} + tmp@0.2.7: {} + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 - toidentifier@1.0.1: {} + trim-lines@3.0.1: {} ts-api-utils@2.5.0(typescript@6.0.3): dependencies: @@ -4108,17 +5948,25 @@ snapshots: normalize-path: 3.0.0 plimit-lit: 1.6.1 - tslib@2.8.1: - optional: true + tslib@2.8.1: {} + + tsx@4.23.1: + dependencies: + esbuild: 0.28.1 + optionalDependencies: + fsevents: 2.3.3 type-check@0.4.0: dependencies: prelude-ls: 1.2.1 - type-is@1.6.18: + typedoc-plugin-markdown@4.12.0(typedoc@0.28.19(typescript@6.0.3)): dependencies: - media-typer: 0.3.0 - mime-types: 2.1.35 + typedoc: 0.28.19(typescript@6.0.3) + + typedoc-vitepress-theme@1.1.3(typedoc-plugin-markdown@4.12.0(typedoc@0.28.19(typescript@6.0.3))): + dependencies: + typedoc-plugin-markdown: 4.12.0(typedoc@0.28.19(typescript@6.0.3)) typedoc@0.28.19(typescript@6.0.3): dependencies: @@ -4150,29 +5998,64 @@ snapshots: unicode-emoji-modifier-base@1.0.0: {} + unist-util-is@6.0.1: + dependencies: + '@types/unist': 3.0.3 + + unist-util-position@5.0.0: + dependencies: + '@types/unist': 3.0.3 + unist-util-stringify-position@4.0.0: dependencies: '@types/unist': 3.0.3 + unist-util-visit-parents@6.0.2: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.1 + + unist-util-visit@5.1.0: + dependencies: + '@types/unist': 3.0.3 + unist-util-is: 6.0.1 + unist-util-visit-parents: 6.0.2 + universalify@0.1.2: {} - unpipe@1.0.0: {} + update-browserslist-db@1.2.3(browserslist@4.28.6): + dependencies: + browserslist: 4.28.6 + escalade: 3.2.0 + picocolors: 1.1.1 uri-js@4.4.1: dependencies: punycode: 2.3.1 - utils-merge@1.0.1: {} - validate-npm-package-name@5.0.1: {} - vary@1.1.2: {} + vfile-message@4.0.3: + dependencies: + '@types/unist': 3.0.3 + unist-util-stringify-position: 4.0.0 + + vfile@6.0.3: + dependencies: + '@types/unist': 3.0.3 + vfile-message: 4.0.3 - vite-plugin-externalize-deps@0.10.0(vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0)): + vite@5.4.21(@types/node@22.20.0)(lightningcss@1.32.0): dependencies: - vite: 8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0) + esbuild: 0.21.5 + postcss: 8.5.15 + rollup: 4.62.2 + optionalDependencies: + '@types/node': 22.20.0 + fsevents: 2.3.3 + lightningcss: 1.32.0 - vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0): + vite@8.0.16(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.23.1)(yaml@2.9.0): dependencies: lightningcss: 1.32.0 picomatch: 4.0.4 @@ -4181,14 +6064,66 @@ snapshots: tinyglobby: 0.2.17 optionalDependencies: '@types/node': 22.20.0 + esbuild: 0.28.1 fsevents: 2.3.3 jiti: 2.7.0 + tsx: 4.23.1 yaml: 2.9.0 - vitest@4.1.9(@types/node@22.20.0)(@vitest/coverage-v8@4.1.9)(vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0)): + vitepress@1.6.4(@algolia/client-search@5.56.0)(@types/node@22.20.0)(axios@1.18.1)(lightningcss@1.32.0)(postcss@8.5.15)(search-insights@2.17.3)(typescript@6.0.3): + dependencies: + '@docsearch/css': 3.8.2 + '@docsearch/js': 3.8.2(@algolia/client-search@5.56.0)(search-insights@2.17.3) + '@iconify-json/simple-icons': 1.2.90 + '@shikijs/core': 2.5.0 + '@shikijs/transformers': 2.5.0 + '@shikijs/types': 2.5.0 + '@types/markdown-it': 14.1.2 + '@vitejs/plugin-vue': 5.2.4(vite@5.4.21(@types/node@22.20.0)(lightningcss@1.32.0))(vue@3.5.39(typescript@6.0.3)) + '@vue/devtools-api': 7.7.10 + '@vue/shared': 3.5.39 + '@vueuse/core': 12.8.2(typescript@6.0.3) + '@vueuse/integrations': 12.8.2(axios@1.18.1)(focus-trap@7.8.0)(typescript@6.0.3) + focus-trap: 7.8.0 + mark.js: 8.11.1 + minisearch: 7.2.0 + shiki: 2.5.0 + vite: 5.4.21(@types/node@22.20.0)(lightningcss@1.32.0) + vue: 3.5.39(typescript@6.0.3) + optionalDependencies: + postcss: 8.5.15 + transitivePeerDependencies: + - '@algolia/client-search' + - '@types/node' + - '@types/react' + - async-validator + - axios + - change-case + - drauu + - fuse.js + - idb-keyval + - jwt-decode + - less + - lightningcss + - nprogress + - preact-render-to-string + - qrcode + - react + - react-dom + - sass + - sass-embedded + - search-insights + - sortablejs + - stylus + - sugarss + - terser + - typescript + - universal-cookie + + vitest@4.1.9(@types/node@22.20.0)(@vitest/coverage-v8@4.1.9)(vite@8.0.16(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.23.1)(yaml@2.9.0)): dependencies: '@vitest/expect': 4.1.9 - '@vitest/mocker': 4.1.9(vite@8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0)) + '@vitest/mocker': 4.1.9(vite@8.0.16(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.23.1)(yaml@2.9.0)) '@vitest/pretty-format': 4.1.9 '@vitest/runner': 4.1.9 '@vitest/snapshot': 4.1.9 @@ -4205,7 +6140,7 @@ snapshots: tinyexec: 1.2.4 tinyglobby: 0.2.16 tinyrainbow: 3.1.0 - vite: 8.0.16(@types/node@22.20.0)(jiti@2.7.0)(yaml@2.9.0) + vite: 8.0.16(@types/node@22.20.0)(esbuild@0.28.1)(jiti@2.7.0)(tsx@4.23.1)(yaml@2.9.0) why-is-node-running: 2.3.0 optionalDependencies: '@types/node': 22.20.0 @@ -4213,6 +6148,16 @@ snapshots: transitivePeerDependencies: - msw + vue@3.5.39(typescript@6.0.3): + dependencies: + '@vue/compiler-dom': 3.5.39 + '@vue/compiler-sfc': 3.5.39 + '@vue/runtime-dom': 3.5.39 + '@vue/server-renderer': 3.5.39(vue@3.5.39(typescript@6.0.3)) + '@vue/shared': 3.5.39 + optionalDependencies: + typescript: 6.0.3 + which@2.0.2: dependencies: isexe: 2.0.0 @@ -4230,8 +6175,15 @@ snapshots: string-width: 4.2.3 strip-ansi: 6.0.1 + write-file-atomic@5.0.1: + dependencies: + imurmurhash: 0.1.4 + signal-exit: 4.1.0 + y18n@5.0.8: {} + yallist@3.1.1: {} + yaml@2.9.0: {} yargs-parser@20.2.9: {} @@ -4248,6 +6200,6 @@ snapshots: yocto-queue@0.1.0: {} - zod@3.25.76: {} - zod@4.4.3: {} + + zwitch@2.0.4: {} diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 31709b4a..efc037aa 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -1,5 +1,2 @@ -packages: - - 'packages/*' - onlyBuiltDependencies: - esbuild diff --git a/packages/core/src/apiError.ts b/src/core/apiError.ts similarity index 100% rename from packages/core/src/apiError.ts rename to src/core/apiError.ts diff --git a/packages/core/src/apiObject.ts b/src/core/apiObject.ts similarity index 100% rename from packages/core/src/apiObject.ts rename to src/core/apiObject.ts diff --git a/packages/core/src/bodyToFetchBody.ts b/src/core/bodyToFetchBody.ts similarity index 100% rename from packages/core/src/bodyToFetchBody.ts rename to src/core/bodyToFetchBody.ts diff --git a/packages/core/src/createClient.ts b/src/core/createClient.ts similarity index 100% rename from packages/core/src/createClient.ts rename to src/core/createClient.ts diff --git a/packages/core/src/formData/attachmentInput.ts b/src/core/formData/attachmentInput.ts similarity index 100% rename from packages/core/src/formData/attachmentInput.ts rename to src/core/formData/attachmentInput.ts diff --git a/packages/core/src/formData/bufferSchema.ts b/src/core/formData/bufferSchema.ts similarity index 100% rename from packages/core/src/formData/bufferSchema.ts rename to src/core/formData/bufferSchema.ts diff --git a/packages/core/src/formData/index.ts b/src/core/formData/index.ts similarity index 100% rename from packages/core/src/formData/index.ts rename to src/core/formData/index.ts diff --git a/packages/core/src/formData/multipartRequest.ts b/src/core/formData/multipartRequest.ts similarity index 100% rename from packages/core/src/formData/multipartRequest.ts rename to src/core/formData/multipartRequest.ts diff --git a/packages/core/src/index.ts b/src/core/index.ts similarity index 100% rename from packages/core/src/index.ts rename to src/core/index.ts diff --git a/packages/core/src/interfaces/client.ts b/src/core/interfaces/client.ts similarity index 100% rename from packages/core/src/interfaces/client.ts rename to src/core/interfaces/client.ts diff --git a/packages/core/src/interfaces/index.ts b/src/core/interfaces/index.ts similarity index 100% rename from packages/core/src/interfaces/index.ts rename to src/core/interfaces/index.ts diff --git a/packages/core/src/oauth/buildAtlassianAuthUrl.ts b/src/core/oauth/buildAtlassianAuthUrl.ts similarity index 100% rename from packages/core/src/oauth/buildAtlassianAuthUrl.ts rename to src/core/oauth/buildAtlassianAuthUrl.ts diff --git a/packages/core/src/oauth/index.ts b/src/core/oauth/index.ts similarity index 100% rename from packages/core/src/oauth/index.ts rename to src/core/oauth/index.ts diff --git a/packages/core/src/oauth/obtainAtlassianOAuthTokens.ts b/src/core/oauth/obtainAtlassianOAuthTokens.ts similarity index 100% rename from packages/core/src/oauth/obtainAtlassianOAuthTokens.ts rename to src/core/oauth/obtainAtlassianOAuthTokens.ts diff --git a/packages/core/src/oauth/parseAtlassianCallbackUrl.ts b/src/core/oauth/parseAtlassianCallbackUrl.ts similarity index 100% rename from packages/core/src/oauth/parseAtlassianCallbackUrl.ts rename to src/core/oauth/parseAtlassianCallbackUrl.ts diff --git a/packages/core/src/oauth/refreshAtlassianOAuthTokens.ts b/src/core/oauth/refreshAtlassianOAuthTokens.ts similarity index 100% rename from packages/core/src/oauth/refreshAtlassianOAuthTokens.ts rename to src/core/oauth/refreshAtlassianOAuthTokens.ts diff --git a/packages/core/src/schemas/auth.ts b/src/core/schemas/auth.ts similarity index 100% rename from packages/core/src/schemas/auth.ts rename to src/core/schemas/auth.ts diff --git a/packages/core/src/schemas/clientConfig.ts b/src/core/schemas/clientConfig.ts similarity index 100% rename from packages/core/src/schemas/clientConfig.ts rename to src/core/schemas/clientConfig.ts diff --git a/packages/core/src/schemas/httpMethod.ts b/src/core/schemas/httpMethod.ts similarity index 100% rename from packages/core/src/schemas/httpMethod.ts rename to src/core/schemas/httpMethod.ts diff --git a/packages/core/src/schemas/index.ts b/src/core/schemas/index.ts similarity index 100% rename from packages/core/src/schemas/index.ts rename to src/core/schemas/index.ts diff --git a/packages/core/src/schemas/sendRequestOptions.ts b/src/core/schemas/sendRequestOptions.ts similarity index 100% rename from packages/core/src/schemas/sendRequestOptions.ts rename to src/core/schemas/sendRequestOptions.ts diff --git a/packages/core/src/sendRequest.ts b/src/core/sendRequest.ts similarity index 100% rename from packages/core/src/sendRequest.ts rename to src/core/sendRequest.ts diff --git a/packages/core/src/serializeSearchParams.ts b/src/core/serializeSearchParams.ts similarity index 100% rename from packages/core/src/serializeSearchParams.ts rename to src/core/serializeSearchParams.ts diff --git a/packages/core/src/withRetry.ts b/src/core/withRetry.ts similarity index 100% rename from packages/core/src/withRetry.ts rename to src/core/withRetry.ts diff --git a/src/index.ts b/src/index.ts new file mode 100644 index 00000000..e5551ed3 --- /dev/null +++ b/src/index.ts @@ -0,0 +1,34 @@ +/** + * Confluence REST API client for Node.js and browsers. + * + * Both API versions are first-class: Atlassian has not deprecated v1, and the + * two cover different ground. Each has its own factory, and both take the same + * bare site URL — the API path is part of the request, not of `host`: + * + * ```ts + * import { createV2Client } from 'confluence.js'; + * + * const confluence = createV2Client({ + * host: 'https://your-domain.atlassian.net', + * auth: { type: 'basic', email, apiToken }, + * }); + * + * await confluence.page.getPages({ spaceId: [123] }); + * ``` + * + * For a smaller bundle, import the flat functions from `confluence.js/v1` or + * `confluence.js/v2` and drive them with a single client from `confluence.js/core` + * — one client serves both versions. + * + * `confluence.js/v1` and `confluence.js/v2` also expose every request parameter + * and response type. They are not re-exported here: the two versions collide on + * a handful of names (`createSpace`, `getTasks`). + */ + +export { createV1Client, type V1Client } from './v1/createV1Client.js'; + +export { createV2Client, type V2Client } from './v2/createV2Client.js'; + +export { ApiError } from './core/index.js'; + +export type { Auth, ClientConfig } from './core/index.js'; diff --git a/src/v1/api/analytics.ts b/src/v1/api/analytics.ts new file mode 100644 index 00000000..7357a935 --- /dev/null +++ b/src/v1/api/analytics.ts @@ -0,0 +1,33 @@ +import { GetViewsSchema, type GetViews } from '../models/getViews'; +import { GetViewersSchema, type GetViewers } from '../models/getViewers'; +import type { GetViews as GetViewsParameters } from '../parameters/getViews'; +import type { GetViewers as GetViewersParameters } from '../parameters/getViewers'; +import type { Client, SendRequestOptions } from '#/core'; + +/** Get the total number of views a piece of content has. */ +export async function getViews(client: Client, parameters: GetViewsParameters): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/analytics/content/${parameters.contentId}/views`, + method: 'GET', + searchParams: { + fromDate: parameters.fromDate, + }, + schema: GetViewsSchema, + }; + + return await client.sendRequest(config); +} + +/** Get the total number of distinct viewers a piece of content has. */ +export async function getViewers(client: Client, parameters: GetViewersParameters): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/analytics/content/${parameters.contentId}/viewers`, + method: 'GET', + searchParams: { + fromDate: parameters.fromDate, + }, + schema: GetViewersSchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/audit.ts b/src/v1/api/audit.ts new file mode 100644 index 00000000..3a98c009 --- /dev/null +++ b/src/v1/api/audit.ts @@ -0,0 +1,145 @@ +import { AuditRecordArraySchema, type AuditRecordArray } from '../models/auditRecordArray'; +import { AuditRecordSchema, type AuditRecord } from '../models/auditRecord'; +import { RetentionPeriodSchema, type RetentionPeriod } from '../models/retentionPeriod'; +import type { GetAuditRecords } from '../parameters/getAuditRecords'; +import type { CreateAuditRecord } from '../parameters/createAuditRecord'; +import type { ExportAuditRecords } from '../parameters/exportAuditRecords'; +import type { SetRetentionPeriod } from '../parameters/setRetentionPeriod'; +import type { GetAuditRecordsForTimePeriod } from '../parameters/getAuditRecordsForTimePeriod'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Returns all records in the audit log, optionally for a certain date range. This contains information about events + * like space exports, group membership changes, app installations, etc. For more information, see [Audit + * log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the Confluence administrator's guide. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ +export async function getAuditRecords(client: Client, parameters?: GetAuditRecords): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/audit', + method: 'GET', + searchParams: { + startDate: parameters?.startDate, + endDate: parameters?.endDate, + searchString: parameters?.searchString, + start: parameters?.start, + limit: parameters?.limit, + }, + schema: AuditRecordArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a record in the audit log. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ +export async function createAuditRecord(client: Client, parameters: CreateAuditRecord): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/audit', + method: 'POST', + body: { + author: parameters.author, + remoteAddress: parameters.remoteAddress, + creationDate: parameters.creationDate, + summary: parameters.summary, + description: parameters.description, + category: parameters.category, + sysAdmin: parameters.sysAdmin, + affectedObject: parameters.affectedObject, + changedValues: parameters.changedValues, + associatedObjects: parameters.associatedObjects, + }, + schema: AuditRecordSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Exports audit records as a CSV file or ZIP file. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ +export async function exportAuditRecords(client: Client, parameters?: ExportAuditRecords): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/audit/export', + method: 'GET', + searchParams: { + startDate: parameters?.startDate, + endDate: parameters?.endDate, + searchString: parameters?.searchString, + format: parameters?.format, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the retention period for records in the audit log. The retention period is how long an audit record is kept + * for, from creation date until it is deleted. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ +export async function getRetentionPeriod(client: Client): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/audit/retention', + method: 'GET', + schema: RetentionPeriodSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 1 year. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ +export async function setRetentionPeriod(client: Client, parameters: SetRetentionPeriod): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/audit/retention', + method: 'PUT', + body: { + number: parameters.number, + units: parameters.units, + }, + schema: RetentionPeriodSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns records from the audit log, for a time period back from the current date. For example, you can use this + * method to get the last 3 months of records. + * + * This contains information about events like space exports, group membership changes, app installations, etc. For more + * information, see [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the Confluence + * administrator's guide. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission. + */ +export async function getAuditRecordsForTimePeriod( + client: Client, + parameters?: GetAuditRecordsForTimePeriod, +): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/audit/since', + method: 'GET', + searchParams: { + number: parameters?.number, + units: parameters?.units, + searchString: parameters?.searchString, + start: parameters?.start, + limit: parameters?.limit, + }, + schema: AuditRecordArraySchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/content.ts b/src/v1/api/content.ts new file mode 100644 index 00000000..f2886564 --- /dev/null +++ b/src/v1/api/content.ts @@ -0,0 +1,153 @@ +import { LongTaskSchema, type LongTask } from '../models/longTask'; +import { ContentSchema, type Content } from '../models/content'; +import { ContentArraySchema, type ContentArray } from '../models/contentArray'; +import type { ArchivePages } from '../parameters/archivePages'; +import type { PublishLegacyDraft } from '../parameters/publishLegacyDraft'; +import type { PublishSharedDraft } from '../parameters/publishSharedDraft'; +import type { SearchContentByCQL } from '../parameters/searchContentByCQL'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Archives a list of pages. The pages to be archived are specified as a list of content IDs. This API accepts the + * archival request and returns a task ID. The archival process happens asynchronously. Use the /longtask/ REST + * API to get the copy task status. + * + * Each content ID needs to resolve to page objects that are not already in an archived state. The content IDs need not + * belong to the same space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Archive' permission for each of the pages in + * the corresponding space it belongs to. + */ +export async function archivePages(client: Client, parameters: ArchivePages): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/content/archive', + method: 'POST', + body: { + pages: parameters.pages, + }, + schema: LongTaskSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favor of + * shared drafts. For now, this method works the same as [Publish shared + * draft](#api-content-blueprint-instance-draftId-put). + * + * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add' + * permission for the space that the content will be created in. + */ +export async function publishLegacyDraft(client: Client, parameters: PublishLegacyDraft): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/blueprint/instance/${parameters.draftId}`, + method: 'POST', + searchParams: { + status: parameters.status, + expand: parameters.expand, + }, + body: { + version: parameters.version, + title: parameters.title, + type: parameters.type, + status: parameters.status, + space: parameters.space, + ancestors: parameters.ancestors, + }, + schema: ContentSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Publishes a shared draft of a page created from a blueprint. + * + * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add' + * permission for the space that the content will be created in. + */ +export async function publishSharedDraft(client: Client, parameters: PublishSharedDraft): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/blueprint/instance/${parameters.draftId}`, + method: 'PUT', + searchParams: { + status: parameters.status, + expand: parameters.expand, + }, + body: { + version: parameters.version, + title: parameters.title, + type: parameters.type, + status: parameters.status, + space: parameters.space, + ancestors: parameters.ancestors, + }, + schema: ContentSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the list of content that matches a Confluence Query Language (CQL) query. For information on CQL, see: + * [Advanced searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/). + * + * Example initial call: + * + * /wiki/rest/api/content/search?cql=type=page&limit=25 + * + * Example response: + * + * { + * "results": [ + * { ... }, + * { ... }, + * ... + * { ... } + * ], + * "limit": 25, + * "size": 25, + * ... + * "_links": { + * "base": "", + * "context": "", + * "next": "/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg", + * "self": "" + * } + * } + * + * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The URLs + * each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of results + * returned in each call. Example subsequent call (taken from example response): + * + * /wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg + * + * The response to this will have a `prev` URL similar to the `next` in the example response. + * + * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the + * query limit parameter will be restricted to a maximum value of 25. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Only content that the user has permission to view will be returned. + */ +export async function searchContentByCQL(client: Client, parameters: SearchContentByCQL): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/content/search', + method: 'GET', + searchParams: { + cql: parameters.cql, + cqlcontext: parameters.cqlcontext, + expand: parameters.expand, + cursor: parameters.cursor, + limit: parameters.limit, + }, + schema: ContentArraySchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/contentAttachments.ts b/src/v1/api/contentAttachments.ts new file mode 100644 index 00000000..dc65a115 --- /dev/null +++ b/src/v1/api/contentAttachments.ts @@ -0,0 +1,195 @@ +import { ContentArraySchema, type ContentArray } from '../models/contentArray'; +import { ContentSchema, type Content } from '../models/content'; +import type { CreateAttachment } from '../parameters/createAttachment'; +import type { CreateOrUpdateAttachments } from '../parameters/createOrUpdateAttachments'; +import type { UpdateAttachmentProperties } from '../parameters/updateAttachmentProperties'; +import type { UpdateAttachmentData } from '../parameters/updateAttachmentData'; +import type { DownloadAttatchment } from '../parameters/downloadAttatchment'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Adds an attachment to a piece of content. This method only adds a new attachment. If you want to update an existing + * attachment, use [Create or update attachments](#api-content-id-child-attachment-put). + * + * Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be + * blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. + * + * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). Most client + * libraries have classes that make it easier to implement multipart posts, like the + * [MultipartEntityBuilder](https://hc.apache.org/httpcomponents-client-5.1.x/current/httpclient5/apidocs/) Java class + * provided by Apache HTTP Components. + * + * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), in the case where the form data is + * text, the charset parameter for the "text/plain" Content-Type may be used to indicate the character encoding used in + * that part. In the case of this API endpoint, the `comment` body parameter should be sent with `type=text/plain` and + * `charset=utf-8` values. This will force the charset to be UTF-8. + * + * Example: This curl command attaches a file ('example.txt') to a container (id='123') with a comment and + * `minorEdits`=true. + * + * ```bash + * curl -D- \ + * -u admin:admin \ + * -X POST \ + * -H 'X-Atlassian-Token: nocheck' \ + * -F 'file=@"example.txt"' \ + * -F 'minorEdit="true"' \ + * -F 'comment="Example attachment comment"; type=text/plain; charset=utf-8' \ + * https://myhost/wiki/rest/api/content/123/child/attachment + * ``` + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ +export async function createAttachment(client: Client, parameters: CreateAttachment): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/child/attachment`, + method: 'POST', + searchParams: { + status: parameters.status, + }, + body: parameters.body, + schema: ContentArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Adds an attachment to a piece of content. If the attachment already exists for the content, then the attachment is + * updated (i.e. a new version of the attachment is created). + * + * Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be + * blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. + * + * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). Most client + * libraries have classes that make it easier to implement multipart posts, like the + * [MultipartEntityBuilder](https://hc.apache.org/httpcomponents-client-5.1.x/current/httpclient5/apidocs/) Java class + * provided by Apache HTTP Components. + * + * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), in the case where the form data is + * text, the charset parameter for the "text/plain" Content-Type may be used to indicate the character encoding used in + * that part. In the case of this API endpoint, the `comment` body parameter should be sent with `type=text/plain` and + * `charset=utf-8` values. This will force the charset to be UTF-8. + * + * Example: This curl command attaches a file ('example.txt') to a piece of content (id='123') with a comment and + * `minorEdits`=true. If the 'example.txt' file already exists, it will update it with a new version of the attachment. + * + * ```bash + * curl -D- \ + * -u admin:admin \ + * -X PUT \ + * -H 'X-Atlassian-Token: nocheck' \ + * -F 'file=@"example.txt"' \ + * -F 'minorEdit="true"' \ + * -F 'comment="Example attachment comment"; type=text/plain; charset=utf-8' \ + * http://myhost/rest/api/content/123/child/attachment + * ``` + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ +export async function createOrUpdateAttachments( + client: Client, + parameters: CreateOrUpdateAttachments, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/child/attachment`, + method: 'PUT', + searchParams: { + status: parameters.status, + }, + body: parameters.body, + schema: ContentArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Updates the attachment properties, i.e. the non-binary data of an attachment like the filename, media-type, comment, + * and parent container. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ +export async function updateAttachmentProperties( + client: Client, + parameters: UpdateAttachmentProperties, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}`, + method: 'PUT', + body: { + id: parameters.id, + type: parameters.type, + status: parameters.status, + title: parameters.title, + container: parameters.container, + metadata: parameters.metadata, + extensions: parameters.extensions, + version: parameters.version, + }, + schema: ContentSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Updates the binary data of an attachment, given the attachment ID, and optionally the comment and the minor edit + * field. + * + * This method is essentially the same as [Create or update attachments](#api-content-id-child-attachment-put), except + * that it matches the attachment ID rather than the name. + * + * Note, you must set a `X-Atlassian-Token: nocheck` header on the request for this method, otherwise it will be + * blocked. This protects against XSRF attacks, which is necessary as this method accepts multipart/form-data. + * + * The media type 'multipart/form-data' is defined in [RFC 7578](https://www.ietf.org/rfc/rfc7578.txt). Most client + * libraries have classes that make it easier to implement multipart posts, like the + * [MultipartEntityBuilder](https://hc.apache.org/httpcomponents-client-5.1.x/current/httpclient5/apidocs/) Java class + * provided by Apache HTTP Components. + * + * Note, according to [RFC 7578](https://tools.ietf.org/html/rfc7578#section-4.5), in the case where the form data is + * text, the charset parameter for the "text/plain" Content-Type may be used to indicate the character encoding used in + * that part. In the case of this API endpoint, the `comment` body parameter should be sent with `type=text/plain` and + * `charset=utf-8` values. This will force the charset to be UTF-8. + * + * Example: This curl command updates an attachment (id='att456') that is attached to a piece of content (id='123') with + * a comment and `minorEdits`=true. + * + * ```bash + * curl -D- \ + * -u admin:admin \ + * -X POST \ + * -H 'X-Atlassian-Token: nocheck' \ + * -F 'file=@"example.txt"' \ + * -F 'minorEdit="true"' \ + * -F 'comment="Example attachment comment"; type=text/plain; charset=utf-8' \ + * http://myhost/rest/api/content/123/child/attachment/att456/data + * ``` + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ +export async function updateAttachmentData(client: Client, parameters: UpdateAttachmentData): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}/data`, + method: 'POST', + body: parameters.body, + schema: ContentSchema, + }; + + return await client.sendRequest(config); +} + +/** Redirects the client to a URL that serves an attachment's binary data. */ +export async function downloadAttatchment(client: Client, parameters: DownloadAttatchment): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}/download`, + method: 'GET', + searchParams: { + version: parameters.version, + status: parameters.status, + }, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/contentBody.ts b/src/v1/api/contentBody.ts new file mode 100644 index 00000000..7d23f0de --- /dev/null +++ b/src/v1/api/contentBody.ts @@ -0,0 +1,131 @@ +import { AsyncIdSchema, type AsyncId } from '../models/asyncId'; +import { AsyncContentBodySchema, type AsyncContentBody } from '../models/asyncContentBody'; +import { AsyncContentBodyArraySchema, type AsyncContentBodyArray } from '../models/asyncContentBodyArray'; +import { AsyncIdArraySchema, type AsyncIdArray } from '../models/asyncIdArray'; +import type { AsyncConvertContentBodyRequest } from '../parameters/asyncConvertContentBodyRequest'; +import type { AsyncConvertContentBodyResponse } from '../parameters/asyncConvertContentBodyResponse'; +import type { BulkAsyncConvertContentBodyResponse } from '../parameters/bulkAsyncConvertContentBodyResponse'; +import type { BulkAsyncConvertContentBodyRequest } from '../parameters/bulkAsyncConvertContentBodyRequest'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Converts a content body from one format to another format asynchronously. Returns the asyncId for the asynchronous + * task. + * + * Supported conversions: + * + * - Atlas_doc_format: editor, export_view, storage, styled_view, view + * - Storage: atlas_doc_format, editor, export_view, styled_view, view + * - Editor: storage + * + * No other conversions are supported at the moment. Once a conversion is completed, it will be available for 5 minutes + * at the result endpoint. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext', + * 'View' permission for the space, and permission to view the content. + */ +export async function asyncConvertContentBodyRequest( + client: Client, + parameters: AsyncConvertContentBodyRequest, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/contentbody/convert/async/${parameters.to}`, + method: 'POST', + searchParams: { + expand: parameters.expand, + spaceKeyContext: parameters.spaceKeyContext, + contentIdContext: parameters.contentIdContext, + allowCache: parameters.allowCache, + embeddedContentRender: parameters.embeddedContentRender, + }, + body: { + value: parameters.value, + representation: parameters.representation, + }, + schema: AsyncIdSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the content body for the corresponding `asyncId` of a completed conversion task. If the task is not + * completed, the task status is returned instead. + * + * Once a conversion task is completed, the result can be obtained for up to 5 minutes, or until an identical conversion + * request is made again with the `allowCache` parameter set to false. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext', + * 'View' permission for the space, and permission to view the content. + */ +export async function asyncConvertContentBodyResponse( + client: Client, + parameters: AsyncConvertContentBodyResponse, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/contentbody/convert/async/${parameters.id}`, + method: 'GET', + schema: AsyncContentBodySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the content body for the corresponding `asyncId` of a completed conversion task. If the task is not + * completed, the task status is returned instead. + * + * Once a conversion task is completed, the result can be obtained for up to 5 minutes, or until an identical conversion + * request is made again with the `allowCache` parameter set to false. + * + * Note that there is a maximum limit of 50 task results per request to this endpoint. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function bulkAsyncConvertContentBodyResponse( + client: Client, + parameters: BulkAsyncConvertContentBodyResponse, +): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/contentbody/convert/async/bulk/tasks', + method: 'GET', + searchParams: { + ids: parameters.ids, + }, + schema: AsyncContentBodyArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Asynchronously converts content bodies from one format to another format in bulk. Use the Content body REST API to + * get the status of conversion tasks. Note that there is a maximum limit of 10 conversions per request to this + * endpoint. + * + * Supported conversions: + * + * - Storage: editor, export_view, styled_view, view + * - Editor: storage + * + * Once a conversion task is completed, it is available for polling for up to 5 minutes. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if the `spaceKeyContext` or `contentIdContext` are present. + */ +export async function bulkAsyncConvertContentBodyRequest( + client: Client, + parameters: BulkAsyncConvertContentBodyRequest, +): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/contentbody/convert/async/bulk/tasks', + method: 'POST', + body: { + conversionInputs: parameters.conversionInputs, + }, + schema: AsyncIdArraySchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/contentChildrenAndDescendants.ts b/src/v1/api/contentChildrenAndDescendants.ts new file mode 100644 index 00000000..257fce0b --- /dev/null +++ b/src/v1/api/contentChildrenAndDescendants.ts @@ -0,0 +1,184 @@ +import { MovePageSchema, type MovePage } from '../models/movePage'; +import { ContentChildrenSchema, type ContentChildren } from '../models/contentChildren'; +import { ContentArraySchema, type ContentArray } from '../models/contentArray'; +import { LongTaskSchema, type LongTask } from '../models/longTask'; +import type { MovePage as MovePageParameters } from '../parameters/movePage'; +import type { GetContentDescendants } from '../parameters/getContentDescendants'; +import type { GetDescendantsOfType } from '../parameters/getDescendantsOfType'; +import type { CopyPageHierarchy } from '../parameters/copyPageHierarchy'; +import type { CopyPage } from '../parameters/copyPage'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Move a page to a new location relative to a target page: + * + * - `before` - move the page under the same parent as the target, before the target in the list of children + * - `after` - move the page under the same parent as the target, after the target in the list of children + * - `append` - move the page to be a child of the target + * + * Caution: This API can move pages to the top level of a space. Top-level pages are difficult to find in the UI because + * they do not show up in the page tree display. To avoid this, never use `before` or `after` positions when the + * `targetId` is a top-level page. + */ +export async function movePage(client: Client, parameters: MovePageParameters): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.pageId}/move/${parameters.position}/${parameters.targetId}`, + method: 'PUT', + schema: MovePageSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a map of the descendants of a piece of content. This is similar to [Get content + * children](#api-content-id-child-get), except that this method returns child pages at all levels, rather than just the + * direct child pages. + * + * A piece of content has different types of descendants, depending on its type: + * + * - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` + * - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` + * - `database`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` + * - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` + * - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` + * - `blogpost`: descendant is `comment`, `attachment` + * - `attachment`: descendant is `comment` + * - `comment`: descendant is `attachment` + * + * The map will always include all descendant types that are valid for the content. However, if the content has no + * instances of a descendant type, the map will contain an empty array for that descendant type. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ +export async function getContentDescendants( + client: Client, + parameters: GetContentDescendants, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/descendant`, + method: 'GET', + searchParams: { + expand: parameters.expand, + }, + schema: ContentChildrenSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all descendants of a given type, for a piece of content. This is similar to [Get content children by + * type](#api-content-id-child-type-get), except that this method returns child pages at all levels, rather than just + * the direct child pages. + * + * A piece of content has different types of descendants, depending on its type: + * + * - `page`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` + * - `whiteboard`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` + * - `database`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` + * - `embed`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` + * - `folder`: descendant is `page`, `whiteboard`, `database`, `embed`, `folder`, `comment`, `attachment` + * - `blogpost`: descendant is `comment`, `attachment` + * - `attachment`: descendant is `comment` + * - `comment`: descendant is `attachment` + * + * Custom content types that are provided by apps can also be returned. + * + * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the + * query limit parameter will be restricted to a maximum value of 25. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and + * permission to view the content if it is a page. + */ +export async function getDescendantsOfType(client: Client, parameters: GetDescendantsOfType): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/descendant/${parameters.type}`, + method: 'GET', + searchParams: { + depth: parameters.depth, + expand: parameters.expand, + start: parameters.start, + limit: parameters.limit, + }, + schema: ContentArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions + * and attachments. The id path parameter refers to the content id of the page to copy, and the new parent of this + * copied page is defined using the destinationPageId in the request body. The titleOptions object defines the rules of + * renaming page titles during the copy; for example, search and replace can be used in conjunction to rewrite the + * copied page titles. + * + * Response example:

+ *  {
+ *       "id" : "1180606",
+ *       "links" : {
+ *            "status" : "/rest/api/longtask/1180606"
+ *       }
+ *  }
+ *  
+ * + * Use the /longtask/ REST API to get the copy task status. + */ +export async function copyPageHierarchy(client: Client, parameters: CopyPageHierarchy): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/pagehierarchy/copy`, + method: 'POST', + body: { + copyAttachments: parameters.copyAttachments, + copyPermissions: parameters.copyPermissions, + copyProperties: parameters.copyProperties, + copyLabels: parameters.copyLabels, + copyCustomContents: parameters.copyCustomContents, + copyDescendants: parameters.copyDescendants, + destinationPageId: parameters.destinationPageId, + titleOptions: parameters.titleOptions, + }, + schema: LongTaskSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Copies a single page and its associated properties, permissions, attachments, and custom contents. The `id` path + * parameter refers to the content ID of the page to copy. The target of the page to be copied is defined using the + * `destination` in the request body and can be one of the following types. + * + * - `space`: page will be copied to the specified space as a root page on the space + * - `parent_page`: page will be copied as a child of the specified parent page + * - `parent_content`: page will be copied as a child of the specified parent content + * - `existing_page`: page will be copied and replace the specified page + * + * By default, the following objects are expanded: `space`, `history`, `version`. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the + * content will be copied in and permission to update the content if copying to an `existing_page`. + */ +export async function copyPage(client: Client, parameters: CopyPage): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/copy`, + method: 'POST', + searchParams: { + expand: parameters.expand, + }, + body: { + copyAttachments: parameters.copyAttachments, + copyPermissions: parameters.copyPermissions, + copyProperties: parameters.copyProperties, + copyLabels: parameters.copyLabels, + copyCustomContents: parameters.copyCustomContents, + destination: parameters.destination, + pageTitle: parameters.pageTitle, + body: parameters.body, + }, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/contentLabels.ts b/src/v1/api/contentLabels.ts new file mode 100644 index 00000000..7a056608 --- /dev/null +++ b/src/v1/api/contentLabels.ts @@ -0,0 +1,72 @@ +import { LabelArraySchema, type LabelArray } from '../models/labelArray'; +import type { AddLabelsToContent } from '../parameters/addLabelsToContent'; +import type { RemoveLabelFromContentUsingQueryParameter } from '../parameters/removeLabelFromContentUsingQueryParameter'; +import type { RemoveLabelFromContent } from '../parameters/removeLabelFromContent'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Adds labels to a piece of content. Does not modify the existing labels. + * + * Notes: + * + * - Labels can also be added when creating content ([Create content](#api-content-post)). + * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing + * labels and replace them with the labels in the request. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ +export async function addLabelsToContent(client: Client, parameters: AddLabelsToContent): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/label`, + method: 'POST', + body: parameters.body, + schema: LabelArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Removes a label from a piece of content. Labels can't be deleted from archived content. This is similar to [Remove + * label from content](#api-content-id-label-label-delete) except that the label name is specified via a query + * parameter. + * + * Use this method if the label name has "/" characters, as [Remove label from content using query + * parameter](#api-content-id-label-delete) does not accept "/" characters for the label name. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ +export async function removeLabelFromContentUsingQueryParameter( + client: Client, + parameters: RemoveLabelFromContentUsingQueryParameter, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/label`, + method: 'DELETE', + searchParams: { + name: parameters.name, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Removes a label from a piece of content. Labels can't be deleted from archived content. This is similar to [Remove + * label from content using query parameter](#api-content-id-label-delete) except that the label name is specified via a + * path parameter. + * + * Use this method if the label name does not have "/" characters, as the path parameter does not accept "/" characters + * for security reasons. Otherwise, use [Remove label from content using query + * parameter](#api-content-id-label-delete). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ +export async function removeLabelFromContent(client: Client, parameters: RemoveLabelFromContent): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/label/${parameters.label}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/contentMacroBody.ts b/src/v1/api/contentMacroBody.ts new file mode 100644 index 00000000..26f68f72 --- /dev/null +++ b/src/v1/api/contentMacroBody.ts @@ -0,0 +1,138 @@ +import { MacroInstanceSchema, type MacroInstance } from '../models/macroInstance'; +import { ContentBodySchema, type ContentBody } from '../models/contentBody'; +import { AsyncIdSchema, type AsyncId } from '../models/asyncId'; +import type { GetMacroBodyByMacroId } from '../parameters/getMacroBodyByMacroId'; +import type { GetAndConvertMacroBodyByMacroId } from '../parameters/getAndConvertMacroBodyByMacroId'; +import type { GetAndAsyncConvertMacroBodyByMacroId } from '../parameters/getAndAsyncConvertMacroBodyByMacroId'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Returns the body of a macro in storage format, for the given macro ID. This includes information like the name of the + * macro, the body of the macro, and any macro parameters. This method is mainly used by Cloud apps. + * + * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for it, + * unless an ID is specified (by an app). The macro ID will look similar to this: + * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is only + * modified by Confluence if there are conflicting IDs. + * + * For Forge macros, the value for macro ID is the "local ID" of that particular ADF node. This value can be retrieved + * either client-side by calling view.getContext() and accessing "localId" on the resulting object, or server-side by + * examining the "local-id" parameter node inside the "parameters" node. + * + * Note that there are other attributes named "local-id", but only this particular one is used to store the macro ID. + * + * Example: com.atlassian.ecosystem e9c4aa10-73fa-417c-888d-48c719ae4165 + * + * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a + * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and + * transparently propagate out to all instances. + * + * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the macro + * is in. + */ +export async function getMacroBodyByMacroId(client: Client, parameters: GetMacroBodyByMacroId): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}`, + method: 'GET', + schema: MacroInstanceSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the body of a macro in format specified in path, for the given macro ID. This includes information like the + * name of the macro, the body of the macro, and any macro parameters. + * + * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for it, + * unless an ID is specified (by an app). The macro ID will look similar to this: + * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is only + * modified by Confluence if there are conflicting IDs. + * + * For Forge macros, the value for macro ID is the "local ID" of that particular ADF node. This value can be retrieved + * either client-side by calling view.getContext() and accessing "localId" on the resulting object, or server-side by + * examining the "local-id" parameter node inside the "parameters" node. + * + * Note that there are other attributes named "local-id", but only this particular one is used to store the macro ID. + * + * Example: com.atlassian.ecosystem e9c4aa10-73fa-417c-888d-48c719ae4165 + * + * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a + * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and + * transparently propagate out to all instances. + * + * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the macro + * is in. + */ +export async function getAndConvertMacroBodyByMacroId( + client: Client, + parameters: GetAndConvertMacroBodyByMacroId, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}/convert/${parameters.to}`, + method: 'GET', + searchParams: { + expand: parameters.expand, + spaceKeyContext: parameters.spaceKeyContext, + embeddedContentRender: parameters.embeddedContentRender, + }, + schema: ContentBodySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns Async Id of the conversion task which will convert the macro into a content body of the desired format. The + * result will be available for 5 minutes after completion of the conversion. + * + * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for it, + * unless an ID is specified (by an app). The macro ID will look similar to this: '884bd9-0cb8-41d5-98be-f80943c14f96'. + * The ID is then persisted as new versions of content are created, and is only modified by Confluence if there are + * conflicting IDs. + * + * For Forge macros, the value for macro ID is the "local ID" of that particular ADF node. This value can be retrieved + * either client-side by calling view.getContext() and accessing "localId" on the resulting object, or server-side by + * examining the "local-id" parameter node inside the "parameters" node. + * + * Note that there are other attributes named "local-id", but only this particular one is used to store the macro ID. + * + * Example: com.atlassian.ecosystem e9c4aa10-73fa-417c-888d-48c719ae4165 + * + * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a + * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and + * transparently propagate out to all instances. + * + * This backwards compatibility logic does not apply to Forge macros; those can only be retrieved by their ID. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the macro + * is in. + */ +export async function getAndAsyncConvertMacroBodyByMacroId( + client: Client, + parameters: GetAndAsyncConvertMacroBodyByMacroId, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}/convert/async/${parameters.to}`, + method: 'GET', + searchParams: { + expand: parameters.expand, + allowCache: parameters.allowCache, + spaceKeyContext: parameters.spaceKeyContext, + embeddedContentRender: parameters.embeddedContentRender, + }, + schema: AsyncIdSchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/contentPermissions.ts b/src/v1/api/contentPermissions.ts new file mode 100644 index 00000000..6bcaa1c0 --- /dev/null +++ b/src/v1/api/contentPermissions.ts @@ -0,0 +1,34 @@ +import { PermissionCheckResponseSchema, type PermissionCheckResponse } from '../models/permissionCheckResponse'; +import type { CheckContentPermission } from '../parameters/checkContentPermission'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Check if a user or a group can perform an operation to the specified content. The `operation` to check must be + * provided. The user’s account ID or the ID of the group can be provided in the `subject` to check permissions against + * a specified user or group. The following permission checks are done to make sure that the user or group has the + * proper access: + * + * - Site permissions + * - Space permissions + * - Content restrictions + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission) if checking permission for self, otherwise 'Confluence Administrator' global permission is + * required. + */ +export async function checkContentPermission( + client: Client, + parameters: CheckContentPermission, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/permission/check`, + method: 'POST', + body: { + subject: parameters.subject, + operation: parameters.operation, + }, + schema: PermissionCheckResponseSchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/contentRestrictions.ts b/src/v1/api/contentRestrictions.ts new file mode 100644 index 00000000..3e69fec8 --- /dev/null +++ b/src/v1/api/contentRestrictions.ts @@ -0,0 +1,278 @@ +import { ContentRestrictionArraySchema, type ContentRestrictionArray } from '../models/contentRestrictionArray'; +import { ContentRestrictionSchema, type ContentRestriction } from '../models/contentRestriction'; +import type { GetRestrictions } from '../parameters/getRestrictions'; +import type { AddRestrictions } from '../parameters/addRestrictions'; +import type { UpdateRestrictions } from '../parameters/updateRestrictions'; +import type { DeleteRestrictions } from '../parameters/deleteRestrictions'; +import type { GetRestrictionsByOperation } from '../parameters/getRestrictionsByOperation'; +import type { GetRestrictionsForOperation } from '../parameters/getRestrictionsForOperation'; +import type { GetIndividualGroupRestrictionStatusByGroupId } from '../parameters/getIndividualGroupRestrictionStatusByGroupId'; +import type { AddGroupToContentRestrictionByGroupId } from '../parameters/addGroupToContentRestrictionByGroupId'; +import type { RemoveGroupFromContentRestriction } from '../parameters/removeGroupFromContentRestriction'; +import type { GetContentRestrictionStatusForUser } from '../parameters/getContentRestrictionStatusForUser'; +import type { AddUserToContentRestriction } from '../parameters/addUserToContentRestriction'; +import type { RemoveUserFromContentRestriction } from '../parameters/removeUserFromContentRestriction'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Returns the restrictions on a piece of content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ +export async function getRestrictions(client: Client, parameters: GetRestrictions): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/restriction`, + method: 'GET', + searchParams: { + expand: parameters.expand, + start: parameters.start, + limit: parameters.limit, + }, + schema: ContentRestrictionArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Adds restrictions to a piece of content. Note, this does not change any existing restrictions on the content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ +export async function addRestrictions(client: Client, parameters: AddRestrictions): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/restriction`, + method: 'POST', + searchParams: { + expand: parameters.expand, + }, + body: parameters.body, + schema: ContentRestrictionArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Updates restrictions for a piece of content. This removes the existing restrictions and replaces them with the + * restrictions in the request. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ +export async function updateRestrictions( + client: Client, + parameters: UpdateRestrictions, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/restriction`, + method: 'PUT', + searchParams: { + expand: parameters.expand, + }, + body: parameters.body, + schema: ContentRestrictionArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Removes all restrictions (read and update) on a piece of content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ +export async function deleteRestrictions( + client: Client, + parameters: DeleteRestrictions, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/restriction`, + method: 'DELETE', + searchParams: { + expand: parameters.expand, + }, + schema: ContentRestrictionArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns restrictions on a piece of content by operation. This method is similar to [Get + * restrictions](#api-content-id-restriction-get) except that the operations are properties of the return object, rather + * than items in a results array. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ +export async function getRestrictionsByOperation( + client: Client, + parameters: GetRestrictionsByOperation, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/restriction/byOperation`, + method: 'GET', + searchParams: { + expand: parameters.expand, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the restictions on a piece of content for a given operation (read or update). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ +export async function getRestrictionsForOperation( + client: Client, + parameters: GetRestrictionsForOperation, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}`, + method: 'GET', + searchParams: { + expand: parameters.expand, + start: parameters.start, + limit: parameters.limit, + }, + schema: ContentRestrictionSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns whether the specified content restriction applies to a group. For example, if a page with `id=123` has a + * `read` restriction for the `123456` group id, the following request will return `true`: + * + * `/wiki/rest/api/content/123/restriction/byOperation/read/byGroupId/123456` + * + * Note that a response of `true` does not guarantee that the group can view the page, as it does not account for + * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence + * permissions](https://confluence.atlassian.com/x/_AozKw). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ +export async function getIndividualGroupRestrictionStatusByGroupId( + client: Client, + parameters: GetIndividualGroupRestrictionStatusByGroupId, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`, + method: 'GET', + }; + + return await client.sendRequest(config); +} + +/** + * Adds a group to a content restriction by Group Id. That is, grant read or update permission to the group for a piece + * of content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ +export async function addGroupToContentRestrictionByGroupId( + client: Client, + parameters: AddGroupToContentRestrictionByGroupId, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`, + method: 'PUT', + }; + + return await client.sendRequest(config); +} + +/** + * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of + * content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ +export async function removeGroupFromContentRestriction( + client: Client, + parameters: RemoveGroupFromContentRestriction, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/byGroupId/${parameters.groupId}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} + +/** + * Returns whether the specified content restriction applies to a user. For example, if a page with `id=123` has a + * `read` restriction for a user with an account ID of `384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192`, the following + * request will return `true`: + * + * `/wiki/rest/api/content/123/restriction/byOperation/read/user?accountId=384093:32b4d9w0-f6a5-3535-11a3-9c8c88d10192` + * + * Note that a response of `true` does not guarantee that the user can view the page, as it does not account for + * account-inherited restrictions, space permissions, or even product access. For more information, see [Confluence + * permissions](https://confluence.atlassian.com/x/_AozKw). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ +export async function getContentRestrictionStatusForUser( + client: Client, + parameters: GetContentRestrictionStatusForUser, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`, + method: 'GET', + searchParams: { + key: parameters.key, + username: parameters.username, + accountId: parameters.accountId, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Adds a user to a content restriction. That is, grant read or update permission to the user for a piece of content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ +export async function addUserToContentRestriction( + client: Client, + parameters: AddUserToContentRestriction, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`, + method: 'PUT', + searchParams: { + key: parameters.key, + username: parameters.username, + accountId: parameters.accountId, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Removes a group from a content restriction. That is, remove read or update permission for the group for a piece of + * content. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ +export async function removeUserFromContentRestriction( + client: Client, + parameters: RemoveUserFromContentRestriction, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/restriction/byOperation/${parameters.operationKey}/user`, + method: 'DELETE', + searchParams: { + key: parameters.key, + username: parameters.username, + accountId: parameters.accountId, + }, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/contentStates.ts b/src/v1/api/contentStates.ts new file mode 100644 index 00000000..84e11ea9 --- /dev/null +++ b/src/v1/api/contentStates.ts @@ -0,0 +1,182 @@ +import { ContentStateResponseSchema, type ContentStateResponse } from '../models/contentStateResponse'; +import { AvailableContentStatesSchema, type AvailableContentStates } from '../models/availableContentStates'; +import { ContentStateSchema, type ContentState } from '../models/contentState'; +import { ContentStateSettingsSchema, type ContentStateSettings } from '../models/contentStateSettings'; +import { ContentArraySchema, type ContentArray } from '../models/contentArray'; +import type { GetContentState } from '../parameters/getContentState'; +import type { SetContentState } from '../parameters/setContentState'; +import type { RemoveContentState } from '../parameters/removeContentState'; +import type { GetAvailableContentStates } from '../parameters/getAvailableContentStates'; +import type { GetSpaceContentStates } from '../parameters/getSpaceContentStates'; +import type { GetContentStateSettings } from '../parameters/getContentStateSettings'; +import type { GetContentsWithState } from '../parameters/getContentsWithState'; +import type { Client, SendRequestOptions } from '#/core'; +import { z } from 'zod'; + +/** + * Gets the current content state of the draft or current version of content. To specify the draft version, set the + * parameter status to draft, otherwise archived or current will get the relevant published state. + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. + */ +export async function getContentState(client: Client, parameters: GetContentState): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/state`, + method: 'GET', + searchParams: { + status: parameters.status, + }, + schema: ContentStateResponseSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Sets the content state of the content specified and creates a new version (publishes the content without changing the + * body) of the content with the new state. + * + * You may pass in either an id of a state, or the name and color of a desired new state. If all 3 are passed in, id + * will be used. If the name and color passed in already exist under the current user's existing custom states, the + * existing state will be reused. If custom states are disabled in the space of the content (which can be determined by + * getting the content state space settings of the content's space) then this set will fail. + * + * You may not remove a content state via this PUT request. You must use the DELETE method. A specified state is + * required in the body of this request. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ +export async function setContentState(client: Client, parameters: SetContentState): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/state`, + method: 'PUT', + searchParams: { + status: parameters.status, + }, + body: { + name: parameters.name, + color: parameters.color, + id: parameters.id, + }, + schema: ContentStateResponseSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Removes the content state of the content specified and creates a new version (publishes the content without changing + * the body) of the content with the new status. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ +export async function removeContentState( + client: Client, + parameters: RemoveContentState, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/state`, + method: 'DELETE', + searchParams: { + status: parameters.status, + }, + schema: ContentStateResponseSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Gets content states that are available for the content to be set as. Will return all enabled Space Content States. + * Will only return most the 3 most recently published custom content states to match UI editor list. To get all custom + * content states, use the /content-states endpoint. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content. + */ +export async function getAvailableContentStates( + client: Client, + parameters: GetAvailableContentStates, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/state/available`, + method: 'GET', + schema: AvailableContentStatesSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Get custom content states that authenticated user has created. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required** Must have user authentication. + */ +export async function getCustomContentStates(client: Client): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/content-states', + method: 'GET', + schema: z.array(ContentStateSchema), + }; + + return await client.sendRequest(config); +} + +/** + * Get content states that are suggested in the space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. + */ +export async function getSpaceContentStates( + client: Client, + parameters: GetSpaceContentStates, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/state`, + method: 'GET', + schema: z.array(ContentStateSchema), + }; + + return await client.sendRequest(config); +} + +/** + * Get object describing whether content states are allowed at all, if custom content states or space content states are + * restricted, and a list of space content states allowed for the space if they are not restricted. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ +export async function getContentStateSettings( + client: Client, + parameters: GetContentStateSettings, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/state/settings`, + method: 'GET', + schema: ContentStateSettingsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all content that has the provided content state in a space. + * + * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the + * query limit parameter will be restricted to a maximum value of 25. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. + */ +export async function getContentsWithState(client: Client, parameters: GetContentsWithState): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/state/content`, + method: 'GET', + searchParams: { + 'state-id': parameters['state-id'], + expand: parameters.expand, + limit: parameters.limit, + start: parameters.start, + }, + schema: ContentArraySchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/contentVersions.ts b/src/v1/api/contentVersions.ts new file mode 100644 index 00000000..2b0077c8 --- /dev/null +++ b/src/v1/api/contentVersions.ts @@ -0,0 +1,42 @@ +import { VersionSchema, type Version } from '../models/version'; +import type { RestoreContentVersion } from '../parameters/restoreContentVersion'; +import type { DeleteContentVersion } from '../parameters/deleteContentVersion'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Restores a historical version to be the latest version. That is, a new version is created with the content of the + * historical version. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ +export async function restoreContentVersion(client: Client, parameters: RestoreContentVersion): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/version`, + method: 'POST', + searchParams: { + expand: parameters.expand, + }, + body: { + operationKey: parameters.operationKey, + params: parameters.params, + }, + schema: VersionSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Delete a historical version. This does not delete the changes made to the content in that version, rather the changes + * for the deleted version are rolled up into the next version. Note, you cannot delete the current version. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ +export async function deleteContentVersion(client: Client, parameters: DeleteContentVersion): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/version/${parameters.versionNumber}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/contentWatches.ts b/src/v1/api/contentWatches.ts new file mode 100644 index 00000000..8a34a069 --- /dev/null +++ b/src/v1/api/contentWatches.ts @@ -0,0 +1,319 @@ +import { WatchArraySchema, type WatchArray } from '../models/watchArray'; +import { SpaceWatchArraySchema, type SpaceWatchArray } from '../models/spaceWatchArray'; +import { UserWatchSchema, type UserWatch } from '../models/userWatch'; +import type { GetWatchesForPage } from '../parameters/getWatchesForPage'; +import type { GetWatchesForSpace } from '../parameters/getWatchesForSpace'; +import type { GetWatchersForSpace } from '../parameters/getWatchersForSpace'; +import type { GetContentWatchStatus } from '../parameters/getContentWatchStatus'; +import type { AddContentWatcher } from '../parameters/addContentWatcher'; +import type { RemoveContentWatcher } from '../parameters/removeContentWatcher'; +import type { IsWatchingLabel } from '../parameters/isWatchingLabel'; +import type { AddLabelWatcher } from '../parameters/addLabelWatcher'; +import type { RemoveLabelWatcher } from '../parameters/removeLabelWatcher'; +import type { IsWatchingSpace } from '../parameters/isWatchingSpace'; +import type { AddSpaceWatcher } from '../parameters/addSpaceWatcher'; +import type { RemoveSpaceWatch } from '../parameters/removeSpaceWatch'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Returns the watches for a page. A user that watches a page will receive receive notifications when the page is + * updated. + * + * If you want to manage watches for a page, use the following `user` methods: + * + * - [Get content watch status for user](#api-user-watch-content-contentId-get) + * - [Add content watch](#api-user-watch-content-contentId-post) + * - [Remove content watch](#api-user-watch-content-contentId-delete) + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getWatchesForPage(client: Client, parameters: GetWatchesForPage): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/notification/child-created`, + method: 'GET', + searchParams: { + start: parameters.start, + limit: parameters.limit, + }, + schema: WatchArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all space watches for the space that the content is in. A user that watches a space will receive receive + * notifications when any content in the space is updated. + * + * If you want to manage watches for a space, use the following `user` methods: + * + * - [Get space watch status for user](#api-user-watch-space-spaceKey-get) + * - [Add space watch](#api-user-watch-space-spaceKey-post) + * - [Remove space watch](#api-user-watch-space-spaceKey-delete) + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getWatchesForSpace(client: Client, parameters: GetWatchesForSpace): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/notification/created`, + method: 'GET', + searchParams: { + start: parameters.start, + limit: parameters.limit, + }, + schema: SpaceWatchArraySchema, + }; + + return await client.sendRequest(config); +} + +/** Returns a list of watchers of a space */ +export async function getWatchersForSpace(client: Client, parameters: GetWatchersForSpace): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/watch`, + method: 'GET', + searchParams: { + start: parameters.start, + limit: parameters.limit, + }, + schema: SpaceWatchArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns whether a user is watching a piece of content. Choose the user by doing one of the following: + * + * - Specify a user via a query parameter: Use the `accountId` to identify the user. + * - Do not specify a user: The currently logged-in user will be used. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * or 'Space Administrator' permission for the relevant space if specifying a user, otherwise permission to access the + * Confluence site ('Can use' global permission). + */ +export async function getContentWatchStatus(client: Client, parameters: GetContentWatchStatus): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/user/watch/content/${parameters.contentId}`, + method: 'GET', + searchParams: { + key: parameters.key, + username: parameters.username, + accountId: parameters.accountId, + }, + schema: UserWatchSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Adds a user as a watcher to a piece of content. Choose the user by doing one of the following: + * + * - Specify a user via a query parameter: Use the `accountId` to identify the user. + * - Do not specify a user: The currently logged-in user will be used. + * + * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF + * protection. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * or 'Space Administrator' permission for the relevant space if specifying a user, otherwise permission to access the + * Confluence site ('Can use' global permission). + */ +export async function addContentWatcher(client: Client, parameters: AddContentWatcher): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/user/watch/content/${parameters.contentId}`, + method: 'POST', + searchParams: { + key: parameters.key, + username: parameters.username, + accountId: parameters.accountId, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Removes a user as a watcher from a piece of content. Choose the user by doing one of the following: + * + * - Specify a user via a query parameter: Use the `accountId` to identify the user. + * - Do not specify a user: The currently logged-in user will be used. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * or 'Space Administrator' permission for the relevant space if specifying a user, otherwise permission to access the + * Confluence site ('Can use' global permission). + */ +export async function removeContentWatcher(client: Client, parameters: RemoveContentWatcher): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/user/watch/content/${parameters.contentId}`, + method: 'DELETE', + headers: { + 'X-Atlassian-Token': parameters['X-Atlassian-Token'], + }, + searchParams: { + key: parameters.key, + username: parameters.username, + accountId: parameters.accountId, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Returns whether a user is watching a label. Choose the user by doing one of the following: + * + * - Specify a user via a query parameter: Use the `accountId` to identify the user. + * - Do not specify a user: The currently logged-in user will be used. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ +export async function isWatchingLabel(client: Client, parameters: IsWatchingLabel): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/user/watch/label/${parameters.labelName}`, + method: 'GET', + searchParams: { + key: parameters.key, + username: parameters.username, + accountId: parameters.accountId, + }, + schema: UserWatchSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Adds a user as a watcher to a label. Choose the user by doing one of the following: + * + * - Specify a user via a query parameter: Use the `accountId` to identify the user. + * - Do not specify a user: The currently logged-in user will be used. + * + * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF + * protection. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ +export async function addLabelWatcher(client: Client, parameters: AddLabelWatcher): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/user/watch/label/${parameters.labelName}`, + method: 'POST', + headers: { + 'X-Atlassian-Token': parameters['X-Atlassian-Token'], + }, + searchParams: { + key: parameters.key, + username: parameters.username, + accountId: parameters.accountId, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Removes a user as a watcher from a label. Choose the user by doing one of the following: + * + * - Specify a user via a query parameter: Use the `accountId` to identify the user. + * - Do not specify a user: The currently logged-in user will be used. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission). + */ +export async function removeLabelWatcher(client: Client, parameters: RemoveLabelWatcher): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/user/watch/label/${parameters.labelName}`, + method: 'DELETE', + searchParams: { + key: parameters.key, + username: parameters.username, + accountId: parameters.accountId, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Returns whether a user is watching a space. Choose the user by doing one of the following: + * + * - Specify a user via a query parameter: Use the `accountId` to identify the user. + * - Do not specify a user: The currently logged-in user will be used. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * or 'Space Administrator' permission for the relevant space if specifying a user, otherwise permission to access the + * Confluence site ('Can use' global permission). + */ +export async function isWatchingSpace(client: Client, parameters: IsWatchingSpace): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/user/watch/space/${parameters.spaceKey}`, + method: 'GET', + searchParams: { + key: parameters.key, + username: parameters.username, + accountId: parameters.accountId, + }, + schema: UserWatchSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Adds a user as a watcher to a space. Choose the user by doing one of the following: + * + * - Specify a user via a query parameter: Use the `accountId` to identify the user. + * - Do not specify a user: The currently logged-in user will be used. + * + * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF + * protection. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * or 'Space Administrator' permission for the relevant space if specifying a user, otherwise permission to access the + * Confluence site ('Can use' global permission). + */ +export async function addSpaceWatcher(client: Client, parameters: AddSpaceWatcher): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/user/watch/space/${parameters.spaceKey}`, + method: 'POST', + headers: { + 'X-Atlassian-Token': parameters['X-Atlassian-Token'], + }, + searchParams: { + key: parameters.key, + username: parameters.username, + accountId: parameters.accountId, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Removes a user as a watcher from a space. Choose the user by doing one of the following: + * + * - Specify a user via a query parameter: Use the `accountId` to identify the user. + * - Do not specify a user: The currently logged-in user will be used. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission + * or 'Space Administrator' permission for the relevant space if specifying a user, otherwise permission to access the + * Confluence site ('Can use' global permission). + */ +export async function removeSpaceWatch(client: Client, parameters: RemoveSpaceWatch): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/user/watch/space/${parameters.spaceKey}`, + method: 'DELETE', + searchParams: { + key: parameters.key, + username: parameters.username, + accountId: parameters.accountId, + }, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/dynamicModules.ts b/src/v1/api/dynamicModules.ts new file mode 100644 index 00000000..72c2870b --- /dev/null +++ b/src/v1/api/dynamicModules.ts @@ -0,0 +1,50 @@ +import type { RegisterModules } from '../parameters/registerModules'; +import type { RemoveModules } from '../parameters/removeModules'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Returns all modules registered dynamically by the calling app. + * + * **[Permissions](#permissions) required:** Only Connect apps can make this request. + */ +export async function getModules(client: Client): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/atlassian-connect/1/app/module/dynamic', + method: 'GET', + }; + + return await client.sendRequest(config); +} + +/** + * Registers a list of modules. For the list of modules that support dynamic registration, see [Dynamic + * modules](https://developer.atlassian.com/cloud/confluence/dynamic-modules/). + * + * **[Permissions](#permissions) required:** Only Connect apps can make this request. + */ +export async function registerModules(client: Client, parameters: RegisterModules): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/atlassian-connect/1/app/module/dynamic', + method: 'POST', + body: parameters.body, + }; + + return await client.sendRequest(config); +} + +/** + * Remove all or a list of modules registered by the calling app. + * + * **[Permissions](#permissions) required:** Only Connect apps can make this request. + */ +export async function removeModules(client: Client, parameters: RemoveModules): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/atlassian-connect/1/app/module/dynamic', + method: 'DELETE', + searchParams: { + moduleKey: parameters.moduleKey, + }, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/experimental.ts b/src/v1/api/experimental.ts new file mode 100644 index 00000000..284f1a1c --- /dev/null +++ b/src/v1/api/experimental.ts @@ -0,0 +1,93 @@ +import { LongTaskSchema, type LongTask } from '../models/longTask'; +import { LabelArraySchema, type LabelArray } from '../models/labelArray'; +import type { DeletePageTree } from '../parameters/deletePageTree'; +import type { GetLabelsForSpace } from '../parameters/getLabelsForSpace'; +import type { AddLabelsToSpace } from '../parameters/addLabelsToSpace'; +import type { DeleteLabelFromSpace } from '../parameters/deleteLabelFromSpace'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Moves a pagetree rooted at a page to the space's trash: + * + * - If the content's type is `page` and its status is `current`, it will be trashed including all its descendants. + * - For every other combination of content type and status, this API is not supported. + * + * This API accepts the pageTree delete request and returns a task ID. The delete process happens asynchronously. + * + * Response example:

+ *  {
+ *       "id" : "1180606",
+ *       "links" : {
+ *            "status" : "/rest/api/longtask/1180606"
+ *       }
+ *  }
+ *  
+ * + * Use the `/longtask/` REST API to get the copy task status. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the + * content is in. + */ +export async function deletePageTree(client: Client, parameters: DeletePageTree): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/content/${parameters.id}/pageTree`, + method: 'DELETE', + schema: LongTaskSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different + * types of labels. + */ +export async function getLabelsForSpace(client: Client, parameters: GetLabelsForSpace): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/label`, + method: 'GET', + searchParams: { + prefix: parameters.prefix, + start: parameters.start, + limit: parameters.limit, + }, + schema: LabelArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Adds labels to a piece of content. Does not modify the existing labels. + * + * Notes: + * + * - Labels can also be added when creating content ([Create content](#api-content-post)). + * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing + * labels and replace them with the labels in the request. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content. + */ +export async function addLabelsToSpace(client: Client, parameters: AddLabelsToSpace): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/label`, + method: 'POST', + body: parameters.body, + schema: LabelArraySchema, + }; + + return await client.sendRequest(config); +} + +export async function deleteLabelFromSpace(client: Client, parameters: DeleteLabelFromSpace): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/label`, + method: 'DELETE', + searchParams: { + name: parameters.name, + prefix: parameters.prefix, + }, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/group.ts b/src/v1/api/group.ts new file mode 100644 index 00000000..8bd2d80c --- /dev/null +++ b/src/v1/api/group.ts @@ -0,0 +1,174 @@ +import { GroupArrayWithLinksSchema, type GroupArrayWithLinks } from '../models/groupArrayWithLinks'; +import { GroupSchema, type Group } from '../models/group'; +import { UserArraySchema, type UserArray } from '../models/userArray'; +import type { GetGroups } from '../parameters/getGroups'; +import type { CreateGroup } from '../parameters/createGroup'; +import type { GetGroupByGroupId } from '../parameters/getGroupByGroupId'; +import type { RemoveGroupById } from '../parameters/removeGroupById'; +import type { SearchGroups } from '../parameters/searchGroups'; +import type { GetGroupMembersByGroupId } from '../parameters/getGroupMembersByGroupId'; +import type { AddUserToGroupByGroupId } from '../parameters/addUserToGroupByGroupId'; +import type { RemoveMemberFromGroupByGroupId } from '../parameters/removeMemberFromGroupByGroupId'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Returns all user groups. The returned groups are ordered alphabetically in ascending order by group name. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getGroups(client: Client, parameters?: GetGroups): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/group', + method: 'GET', + searchParams: { + start: parameters?.start, + limit: parameters?.limit, + accessType: parameters?.accessType, + }, + schema: GroupArrayWithLinksSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a new user group. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ +export async function createGroup(client: Client, parameters: CreateGroup): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/group', + method: 'POST', + body: { + name: parameters.name, + }, + schema: GroupSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a user group for a given group id. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getGroupByGroupId(client: Client, parameters: GetGroupByGroupId): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/group/by-id', + method: 'GET', + searchParams: { + id: parameters.id, + }, + schema: GroupSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Delete user group. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ +export async function removeGroupById(client: Client, parameters: RemoveGroupById): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/group/by-id', + method: 'DELETE', + searchParams: { + id: parameters.id, + }, + }; + + return await client.sendRequest(config); +} + +/** Get search results of groups by partial query provided. */ +export async function searchGroups(client: Client, parameters: SearchGroups): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/group/picker', + method: 'GET', + searchParams: { + query: parameters.query, + start: parameters.start, + limit: parameters.limit, + shouldReturnTotalSize: parameters.shouldReturnTotalSize, + }, + schema: GroupArrayWithLinksSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the users that are members of a group. + * + * Use updated Get group API + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getGroupMembersByGroupId( + client: Client, + parameters: GetGroupMembersByGroupId, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/group/${parameters.groupId}/membersByGroupId`, + method: 'GET', + searchParams: { + start: parameters.start, + limit: parameters.limit, + shouldReturnTotalSize: parameters.shouldReturnTotalSize, + expand: parameters.expand, + }, + schema: UserArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Adds a user as a member in a group represented by its groupId + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ +export async function addUserToGroupByGroupId(client: Client, parameters: AddUserToGroupByGroupId): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/group/userByGroupId', + method: 'POST', + searchParams: { + groupId: parameters.groupId, + }, + body: { + accountId: parameters.accountId, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Remove user as a member from a group. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin. + */ +export async function removeMemberFromGroupByGroupId( + client: Client, + parameters: RemoveMemberFromGroupByGroupId, +): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/group/userByGroupId', + method: 'DELETE', + searchParams: { + groupId: parameters.groupId, + accountId: parameters.accountId, + key: parameters.key, + username: parameters.username, + }, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/index.ts b/src/v1/api/index.ts new file mode 100644 index 00000000..47145653 --- /dev/null +++ b/src/v1/api/index.ts @@ -0,0 +1,55 @@ +export * from './analytics'; + +export * from './audit'; + +export * from './content'; + +export * from './contentAttachments'; + +export * from './contentBody'; + +export * from './contentChildrenAndDescendants'; + +export * from './contentLabels'; + +export * from './contentMacroBody'; + +export * from './contentPermissions'; + +export * from './contentRestrictions'; + +export * from './contentStates'; + +export * from './contentVersions'; + +export * from './contentWatches'; + +export * from './dynamicModules'; + +export * from './experimental'; + +export * from './group'; + +export * from './labelInfo'; + +export * from './longRunningTask'; + +export * from './relation'; + +export * from './search'; + +export * from './settings'; + +export * from './space'; + +export * from './spacePermissions'; + +export * from './spaceSettings'; + +export * from './template'; + +export * from './themes'; + +export * from './userProperties'; + +export * from './users'; diff --git a/src/v1/api/labelInfo.ts b/src/v1/api/labelInfo.ts new file mode 100644 index 00000000..7493deac --- /dev/null +++ b/src/v1/api/labelInfo.ts @@ -0,0 +1,25 @@ +import { LabelDetailsSchema, type LabelDetails } from '../models/labelDetails'; +import type { GetAllLabelContent } from '../parameters/getAllLabelContent'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Returns label information and a list of contents associated with the label. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). Only contents that the user is permitted to view is returned. + */ +export async function getAllLabelContent(client: Client, parameters: GetAllLabelContent): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/label', + method: 'GET', + searchParams: { + name: parameters.name, + type: parameters.type, + start: parameters.start, + limit: parameters.limit, + }, + schema: LabelDetailsSchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/longRunningTask.ts b/src/v1/api/longRunningTask.ts new file mode 100644 index 00000000..886d5ea2 --- /dev/null +++ b/src/v1/api/longRunningTask.ts @@ -0,0 +1,44 @@ +import { LongTaskStatusArraySchema, type LongTaskStatusArray } from '../models/longTaskStatusArray'; +import { LongTaskStatusWithLinksSchema, type LongTaskStatusWithLinks } from '../models/longTaskStatusWithLinks'; +import type { GetTasks } from '../parameters/getTasks'; +import type { GetTask } from '../parameters/getTask'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Returns information about all active long-running tasks (e.g. space export), such as how long each task has been + * running and the percentage of each task that has completed. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getTasks(client: Client, parameters?: GetTasks): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/longtask', + method: 'GET', + searchParams: { + key: parameters?.key, + start: parameters?.start, + limit: parameters?.limit, + }, + schema: LongTaskStatusArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns information about an active long-running task (e.g. space export), such as how long it has been running and + * the percentage of the task that has completed. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getTask(client: Client, parameters: GetTask): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/longtask/${parameters.id}`, + method: 'GET', + schema: LongTaskStatusWithLinksSchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/relation.ts b/src/v1/api/relation.ts new file mode 100644 index 00000000..e3386e52 --- /dev/null +++ b/src/v1/api/relation.ts @@ -0,0 +1,142 @@ +import { RelationArraySchema, type RelationArray } from '../models/relationArray'; +import { RelationSchema, type Relation } from '../models/relation'; +import type { FindTargetFromSource } from '../parameters/findTargetFromSource'; +import type { GetRelationship } from '../parameters/getRelationship'; +import type { CreateRelationship } from '../parameters/createRelationship'; +import type { DeleteRelationship } from '../parameters/deleteRelationship'; +import type { FindSourcesForTarget } from '../parameters/findSourcesForTarget'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one + * way. + * + * For example, the following method finds all content that the current user has an 'ignore' relationship with: `GET + * /wiki/rest/api/relation/ignore/from/user/current/to/content` Note, 'ignore' is an example custom relationship type. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity and + * source entity. + */ +export async function findTargetFromSource(client: Client, parameters: FindTargetFromSource): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}`, + method: 'GET', + searchParams: { + sourceStatus: parameters.sourceStatus, + targetStatus: parameters.targetStatus, + sourceVersion: parameters.sourceVersion, + targetVersion: parameters.targetVersion, + expand: parameters.expand, + start: parameters.start, + limit: parameters.limit, + }, + schema: RelationArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Find whether a particular type of relationship exists from a source entity to a target entity. Note, relationships + * are one way. + * + * For example, you can use this method to find whether the current user has selected a particular page as a favorite + * (i.e. 'save for later'): `GET /wiki/rest/api/relation/favourite/from/user/current/to/content/123` + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity and + * source entity. + */ +export async function getRelationship(client: Client, parameters: GetRelationship): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`, + method: 'GET', + searchParams: { + sourceStatus: parameters.sourceStatus, + targetStatus: parameters.targetStatus, + sourceVersion: parameters.sourceVersion, + targetVersion: parameters.targetVersion, + expand: parameters.expand, + }, + schema: RelationSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a relationship between two entities (user, space, content). The 'favourite' relationship is supported by + * default, but you can use this method to create any type of relationship between two entities. + * + * For example, the following method creates a 'sibling' relationship between two pieces of content: `PUT + * /wiki/rest/api/relation/sibling/from/content/123/to/content/456` + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function createRelationship(client: Client, parameters: CreateRelationship): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`, + method: 'PUT', + searchParams: { + sourceStatus: parameters.sourceStatus, + targetStatus: parameters.targetStatus, + sourceVersion: parameters.sourceVersion, + targetVersion: parameters.targetVersion, + }, + schema: RelationSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a relationship between two entities (user, space, content). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). For favourite relationships, the current user can only delete their own favourite + * relationships. A space administrator can delete favourite relationships for any user. + */ +export async function deleteRelationship(client: Client, parameters: DeleteRelationship): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/relation/${parameters.relationName}/from/${parameters.sourceType}/${parameters.sourceKey}/to/${parameters.targetType}/${parameters.targetKey}`, + method: 'DELETE', + searchParams: { + sourceStatus: parameters.sourceStatus, + targetStatus: parameters.targetStatus, + sourceVersion: parameters.sourceVersion, + targetVersion: parameters.targetVersion, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all target entities that have a particular relationship to the source entity. Note, relationships are one + * way. + * + * For example, the following method finds all users that have a 'collaborator' relationship to a piece of content with + * an ID of '1234': `GET /wiki/rest/api/relation/collaborator/to/content/1234/from/user` Note, 'collaborator' is an + * example custom relationship type. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view both the target entity and + * source entity. + */ +export async function findSourcesForTarget(client: Client, parameters: FindSourcesForTarget): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/relation/${parameters.relationName}/to/${parameters.targetType}/${parameters.targetKey}/from/${parameters.sourceType}`, + method: 'GET', + searchParams: { + sourceStatus: parameters.sourceStatus, + targetStatus: parameters.targetStatus, + sourceVersion: parameters.sourceVersion, + targetVersion: parameters.targetVersion, + expand: parameters.expand, + start: parameters.start, + limit: parameters.limit, + }, + schema: RelationArraySchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/search.ts b/src/v1/api/search.ts new file mode 100644 index 00000000..bd7a47a5 --- /dev/null +++ b/src/v1/api/search.ts @@ -0,0 +1,107 @@ +import { + SearchPageResponseSearchResultSchema, + type SearchPageResponseSearchResult, +} from '../models/searchPageResponseSearchResult'; +import type { SearchByCQL } from '../parameters/searchByCQL'; +import type { SearchUser } from '../parameters/searchUser'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Searches for content using the [Confluence Query Language + * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/). + * + * **Note that CQL input queries submitted through the `/wiki/rest/api/search` endpoint no longer support user-specific + * fields like `user`, `user.fullname`, `user.accountid`, and `user.userkey`.** See this [deprecation + * notice](https://developer.atlassian.com/cloud/confluence/deprecation-notice-search-api/) for more details. + * + * Example initial call: + * + * /wiki/rest/api/search?cql=type=page&limit=25 + * + * Example response: + * + * { + * "results": [ + * { ... }, + * { ... }, + * ... + * { ... } + * ], + * "limit": 25, + * "size": 25, + * ... + * "_links": { + * "base": "", + * "context": "", + * "next": "/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg", + * "self": "" + * } + * } + * + * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The URLs + * each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of results + * returned in each call. + * + * Example subsequent call (taken from example response): + * + * /wiki/rest/api/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg + * + * The response to this will have a `prev` URL similar to the `next` in the example response. + * + * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the + * query limit parameter will be restricted to a maximum value of 25. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the entities. Note, only + * entities that the user has permission to view will be returned. + */ +export async function searchByCQL(client: Client, parameters: SearchByCQL): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/search', + method: 'GET', + searchParams: { + cql: parameters.cql, + cqlcontext: parameters.cqlcontext, + cursor: parameters.cursor, + next: parameters.next, + prev: parameters.prev, + limit: parameters.limit, + start: parameters.start, + includeArchivedSpaces: parameters.includeArchivedSpaces, + excludeCurrentSpaces: parameters.excludeCurrentSpaces, + excerpt: parameters.excerpt, + sitePermissionTypeFilter: parameters.sitePermissionTypeFilter, + _: parameters._, + expand: parameters.expand, + }, + schema: SearchPageResponseSearchResultSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Searches for users using user-specific queries from the [Confluence Query Language + * (CQL)](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/). + * + * Note that CQL input queries submitted through the `/wiki/rest/api/search/user` endpoint only support user-specific + * fields like `user`, `user.fullname`, `user.accountid`, and `user.userkey`. + * + * Note that some user fields may be set to null depending on the user's privacy settings. These are: email, + * profilePicture, displayName, and timeZone. + */ +export async function searchUser(client: Client, parameters: SearchUser): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/search/user', + method: 'GET', + searchParams: { + cql: parameters.cql, + start: parameters.start, + limit: parameters.limit, + expand: parameters.expand, + sitePermissionTypeFilter: parameters.sitePermissionTypeFilter, + }, + schema: SearchPageResponseSearchResultSchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/settings.ts b/src/v1/api/settings.ts new file mode 100644 index 00000000..f9a36d90 --- /dev/null +++ b/src/v1/api/settings.ts @@ -0,0 +1,125 @@ +import { LookAndFeelSettingsSchema, type LookAndFeelSettings } from '../models/lookAndFeelSettings'; +import { LookAndFeelSelectionSchema, type LookAndFeelSelection } from '../models/lookAndFeelSelection'; +import { LookAndFeelWithLinksSchema, type LookAndFeelWithLinks } from '../models/lookAndFeelWithLinks'; +import { SystemInfoEntitySchema, type SystemInfoEntity } from '../models/systemInfoEntity'; +import type { GetLookAndFeelSettings } from '../parameters/getLookAndFeelSettings'; +import type { UpdateLookAndFeel } from '../parameters/updateLookAndFeel'; +import type { UpdateLookAndFeelSettings } from '../parameters/updateLookAndFeelSettings'; +import type { ResetLookAndFeelSettings } from '../parameters/resetLookAndFeelSettings'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Returns the look and feel settings for the site or a single space. This includes attributes such as the color scheme, + * padding, and border radius. + * + * The look and feel settings for a space can be inherited from the global look and feel settings or provided by a + * theme. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None + */ +export async function getLookAndFeelSettings( + client: Client, + parameters?: GetLookAndFeelSettings, +): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/settings/lookandfeel', + method: 'GET', + searchParams: { + spaceKey: parameters?.spaceKey, + }, + schema: LookAndFeelSettingsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Sets the look and feel settings to the default (global) settings, the custom settings, or the current theme's + * settings for a space. The custom and theme settings can only be selected if there is already a theme set for a space. + * Note, the default space settings are inherited from the current global settings. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ +export async function updateLookAndFeel(client: Client, parameters: UpdateLookAndFeel): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/settings/lookandfeel', + method: 'PUT', + body: { + spaceKey: parameters.spaceKey, + lookAndFeelType: parameters.lookAndFeelType, + }, + schema: LookAndFeelSelectionSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Updates the look and feel settings for the site or for a single space. If custom settings exist, they are updated. If + * no custom settings exist, then a set of custom settings is created. + * + * Note, if a theme is selected for a space, the space look and feel settings are provided by the theme and cannot be + * overridden. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ +export async function updateLookAndFeelSettings( + client: Client, + parameters: UpdateLookAndFeelSettings, +): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/settings/lookandfeel/custom', + method: 'POST', + searchParams: { + spaceKey: parameters.spaceKey, + }, + body: { + headings: parameters.headings, + links: parameters.links, + menus: parameters.menus, + header: parameters.header, + horizontalHeader: parameters.horizontalHeader, + content: parameters.content, + bordersAndDividers: parameters.bordersAndDividers, + spaceReference: parameters.spaceReference, + }, + schema: LookAndFeelWithLinksSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Resets the custom look and feel settings for the site or a single space. This changes the values of the custom + * settings to be the same as the default settings. It does not change which settings (default or custom) are selected. + * Note, the default space settings are inherited from the current global settings. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ +export async function resetLookAndFeelSettings(client: Client, parameters: ResetLookAndFeelSettings): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/settings/lookandfeel/custom', + method: 'DELETE', + searchParams: { + spaceKey: parameters.spaceKey, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the system information for the Confluence Cloud tenant. This information is used by Atlassian. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getSystemInfo(client: Client): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/settings/systemInfo', + method: 'GET', + schema: SystemInfoEntitySchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/space.ts b/src/v1/api/space.ts new file mode 100644 index 00000000..16819a0a --- /dev/null +++ b/src/v1/api/space.ts @@ -0,0 +1,95 @@ +import { SpaceSchema, type Space } from '../models/space'; +import { LongTaskSchema, type LongTask } from '../models/longTask'; +import type { CreateSpace } from '../parameters/createSpace'; +import type { CreatePrivateSpace } from '../parameters/createPrivateSpace'; +import type { UpdateSpace } from '../parameters/updateSpace'; +import type { DeleteSpace } from '../parameters/deleteSpace'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Creates a new space. Note, currently you cannot set space labels when creating a space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission. + */ +export async function createSpace(client: Client, parameters: CreateSpace): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/space', + method: 'POST', + body: { + name: parameters.name, + key: parameters.key, + alias: parameters.alias, + description: parameters.description, + permissions: parameters.permissions, + }, + schema: SpaceSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a new space that is only visible to the creator. This method is the same as the [Create + * space](#api-space-post) method with permissions set to the current user only. Note, currently you cannot set space + * labels when creating a space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Create Space(s)' global permission. + */ +export async function createPrivateSpace(client: Client, parameters: CreatePrivateSpace): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/space/_private', + method: 'POST', + body: { + name: parameters.name, + key: parameters.key, + alias: parameters.alias, + description: parameters.description, + permissions: parameters.permissions, + }, + schema: SpaceSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Updates the name, description, or homepage of a space. + * + * - For security reasons, permissions cannot be updated via the API and must be changed via the user interface instead. + * - Currently you cannot set space labels when updating a space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ +export async function updateSpace(client: Client, parameters: UpdateSpace): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}`, + method: 'PUT', + body: { + name: parameters.name, + description: parameters.description, + homepage: parameters.homepage, + type: parameters.type, + status: parameters.status, + }, + schema: SpaceSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Permanently deletes a space without sending it to the trash. Note, the space will be deleted in a long running task. + * Therefore, the space may not be deleted yet when this method has returned. Clients should poll the status link that + * is returned in the response until the task completes. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ +export async function deleteSpace(client: Client, parameters: DeleteSpace): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}`, + method: 'DELETE', + schema: LongTaskSchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/spacePermissions.ts b/src/v1/api/spacePermissions.ts new file mode 100644 index 00000000..1f346b26 --- /dev/null +++ b/src/v1/api/spacePermissions.ts @@ -0,0 +1,74 @@ +import { SpacePermissionV2Schema, type SpacePermissionV2 } from '../models/spacePermissionV2'; +import type { AddPermissionToSpace } from '../parameters/addPermissionToSpace'; +import type { AddCustomContentPermissions } from '../parameters/addCustomContentPermissions'; +import type { RemovePermission } from '../parameters/removePermission'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Adds new permission to space. + * + * If the permission to be added is a group permission, the group can be identified by its group name or group id. + * + * Note: Apps cannot access this REST resource - including when utilizing user impersonation. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ +export async function addPermissionToSpace( + client: Client, + parameters: AddPermissionToSpace, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/permission`, + method: 'POST', + body: { + subject: parameters.subject, + operation: parameters.operation, + _links: parameters._links, + }, + schema: SpacePermissionV2Schema, + }; + + return await client.sendRequest(config); +} + +/** + * Adds new custom content permission to space. + * + * If the permission to be added is a group permission, the group can be identified by its group name or group id. + * + * Note: Only apps can access this REST resource and only make changes to the respective app permissions. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ +export async function addCustomContentPermissions( + client: Client, + parameters: AddCustomContentPermissions, +): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/permission/custom-content`, + method: 'POST', + body: { + subject: parameters.subject, + operations: parameters.operations, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Removes a space permission. Note that removing Read Space permission for a user or group will remove all the space + * permissions for that user or group. + * + * Note: Apps cannot access this REST resource - including when utilizing user impersonation. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ +export async function removePermission(client: Client, parameters: RemovePermission): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/permission/${parameters.id}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/spaceSettings.ts b/src/v1/api/spaceSettings.ts new file mode 100644 index 00000000..fc714221 --- /dev/null +++ b/src/v1/api/spaceSettings.ts @@ -0,0 +1,38 @@ +import { SpaceSettingsSchema, type SpaceSettings } from '../models/spaceSettings'; +import type { GetSpaceSettings } from '../parameters/getSpaceSettings'; +import type { UpdateSpaceSettings } from '../parameters/updateSpaceSettings'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Returns the settings of a space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space. + */ +export async function getSpaceSettings(client: Client, parameters: GetSpaceSettings): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/settings`, + method: 'GET', + schema: SpaceSettingsSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Updates the settings for a space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ +export async function updateSpaceSettings(client: Client, parameters: UpdateSpaceSettings): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/settings`, + method: 'PUT', + body: { + routeOverrideEnabled: parameters.routeOverrideEnabled, + contentMode: parameters.contentMode, + }, + schema: SpaceSettingsSchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/template.ts b/src/v1/api/template.ts new file mode 100644 index 00000000..811e5633 --- /dev/null +++ b/src/v1/api/template.ts @@ -0,0 +1,164 @@ +import { ContentTemplateSchema, type ContentTemplate } from '../models/contentTemplate'; +import { BlueprintTemplateArraySchema, type BlueprintTemplateArray } from '../models/blueprintTemplateArray'; +import { ContentTemplateArraySchema, type ContentTemplateArray } from '../models/contentTemplateArray'; +import type { CreateContentTemplate } from '../parameters/createContentTemplate'; +import type { UpdateContentTemplate } from '../parameters/updateContentTemplate'; +import type { GetBlueprintTemplates } from '../parameters/getBlueprintTemplates'; +import type { GetContentTemplates } from '../parameters/getContentTemplates'; +import type { GetContentTemplate } from '../parameters/getContentTemplate'; +import type { RemoveTemplate } from '../parameters/removeTemplate'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Creates a new content template. Note, blueprint templates cannot be created via the REST API. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to create a + * space template or 'Confluence Administrator' global permission to create a global template. + */ +export async function createContentTemplate( + client: Client, + parameters: CreateContentTemplate, +): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/template', + method: 'POST', + body: { + name: parameters.name, + templateType: parameters.templateType, + body: parameters.body, + description: parameters.description, + labels: parameters.labels, + space: parameters.space, + }, + schema: ContentTemplateSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Updates a content template. Note, blueprint templates cannot be updated via the REST API. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to update a + * space template or 'Confluence Administrator' global permission to update a global template. + */ +export async function updateContentTemplate( + client: Client, + parameters: UpdateContentTemplate, +): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/template', + method: 'PUT', + body: { + templateId: parameters.templateId, + name: parameters.name, + templateType: parameters.templateType, + body: parameters.body, + description: parameters.description, + labels: parameters.labels, + space: parameters.space, + }, + schema: ContentTemplateSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all templates provided by blueprints. Use this method to retrieve all global blueprint templates or all + * blueprint templates in a space. + * + * Note, all global blueprints are inherited by each space. Space blueprints can be customised without affecting the + * global blueprints. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view + * blueprints for the space and permission to access the Confluence site ('Can use' global permission) to view global + * blueprints. + */ +export async function getBlueprintTemplates( + client: Client, + parameters?: GetBlueprintTemplates, +): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/template/blueprint', + method: 'GET', + searchParams: { + spaceKey: parameters?.spaceKey, + start: parameters?.start, + limit: parameters?.limit, + expand: parameters?.expand, + }, + schema: BlueprintTemplateArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns all content templates. Use this method to retrieve all global content templates or all content templates in a + * space. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view space + * templates and permission to access the Confluence site ('Can use' global permission) to view global templates. + */ +export async function getContentTemplates( + client: Client, + parameters?: GetContentTemplates, +): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/template/page', + method: 'GET', + searchParams: { + spaceKey: parameters?.spaceKey, + start: parameters?.start, + limit: parameters?.limit, + expand: parameters?.expand, + }, + schema: ContentTemplateArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a content template. This includes information about template, like the name, the space or blueprint that the + * template is in, the body of the template, and more. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view space + * templates and permission to access the Confluence site ('Can use' global permission) to view global templates. + */ +export async function getContentTemplate(client: Client, parameters: GetContentTemplate): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/template/${parameters.contentTemplateId}`, + method: 'GET', + searchParams: { + expand: parameters.expand, + }, + schema: ContentTemplateSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a template. This results in different actions depending on the type of template: + * + * - If the template is a content template, it is deleted. + * - If the template is a modified space-level blueprint template, it reverts to the template inherited from the + * global-level blueprint template. + * - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint + * template. + * + * Note, unmodified blueprint templates cannot be deleted. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to delete a + * space template or 'Confluence Administrator' global permission to delete a global template. + */ +export async function removeTemplate(client: Client, parameters: RemoveTemplate): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/template/${parameters.contentTemplateId}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/themes.ts b/src/v1/api/themes.ts new file mode 100644 index 00000000..a72da616 --- /dev/null +++ b/src/v1/api/themes.ts @@ -0,0 +1,106 @@ +import { ThemeArraySchema, type ThemeArray } from '../models/themeArray'; +import { ThemeSchema, type Theme } from '../models/theme'; +import type { GetThemes } from '../parameters/getThemes'; +import type { GetTheme } from '../parameters/getTheme'; +import type { GetSpaceTheme } from '../parameters/getSpaceTheme'; +import type { SetSpaceTheme } from '../parameters/setSpaceTheme'; +import type { ResetSpaceTheme } from '../parameters/resetSpaceTheme'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Returns all themes, not including the default theme. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None + */ +export async function getThemes(client: Client, parameters?: GetThemes): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/settings/theme', + method: 'GET', + searchParams: { + start: parameters?.start, + limit: parameters?.limit, + }, + schema: ThemeArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the globally assigned theme. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None + */ +export async function getGlobalTheme(client: Client): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/settings/theme/selected', + method: 'GET', + schema: ThemeSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a theme. This includes information about the theme name, description, and icon. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None + */ +export async function getTheme(client: Client, parameters: GetTheme): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/settings/theme/${parameters.themeKey}`, + method: 'GET', + schema: ThemeSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the theme selected for a space, if one is set. If no space theme is set, this means that the space is + * inheriting the global look and feel settings. + * + * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space. + */ +export async function getSpaceTheme(client: Client, parameters: GetSpaceTheme): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/theme`, + method: 'GET', + schema: ThemeSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Sets the theme for a space. Note, if you want to reset the space theme to the default Confluence theme, use the + * 'Reset space theme' method instead of this method. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ +export async function setSpaceTheme(client: Client, parameters: SetSpaceTheme): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/theme`, + method: 'PUT', + body: { + themeKey: parameters.themeKey, + }, + schema: ThemeSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Resets the space theme. This means that the space will inherit the global look and feel settings + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space. + */ +export async function resetSpaceTheme(client: Client, parameters: ResetSpaceTheme): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/space/${parameters.spaceKey}/theme`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/userProperties.ts b/src/v1/api/userProperties.ts new file mode 100644 index 00000000..e8b29636 --- /dev/null +++ b/src/v1/api/userProperties.ts @@ -0,0 +1,107 @@ +import { UserPropertyKeyArraySchema, type UserPropertyKeyArray } from '../models/userPropertyKeyArray'; +import { UserPropertySchema, type UserProperty } from '../models/userProperty'; +import type { GetUserProperties } from '../parameters/getUserProperties'; +import type { GetUserProperty } from '../parameters/getUserProperty'; +import type { CreateUserProperty } from '../parameters/createUserProperty'; +import type { UpdateUserProperty } from '../parameters/updateUserProperty'; +import type { DeleteUserProperty } from '../parameters/deleteUserProperty'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Returns the properties for a user as list of property keys. For more information about user properties, see + * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). + * `Note`, these properties stored against a user are on a Confluence site level and not space/content level. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getUserProperties(client: Client, parameters: GetUserProperties): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/user/${parameters.userId}/property`, + method: 'GET', + searchParams: { + start: parameters.start, + limit: parameters.limit, + }, + schema: UserPropertyKeyArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the property corresponding to `key` for a user. For more information about user properties, see [Confluence + * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these + * properties stored against a user are on a Confluence site level and not space/content level. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getUserProperty(client: Client, parameters: GetUserProperty): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/user/${parameters.userId}/property/${parameters.key}`, + method: 'GET', + schema: UserPropertySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Creates a property for a user. For more information about user properties, see [Confluence entity properties] + * (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored + * against a user are on a Confluence site level and not space/content level. + * + * `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by + * fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the + * Confluence site ('Can use' global permission). + */ +export async function createUserProperty(client: Client, parameters: CreateUserProperty): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/user/${parameters.userId}/property/${parameters.key}`, + method: 'POST', + body: { + value: parameters.value, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Updates a property for the given user. Note, you cannot update the key of a user property, only the value. For more + * information about user properties, see [Confluence entity + * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties + * stored against a user are on a Confluence site level and not space/content level. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function updateUserProperty(client: Client, parameters: UpdateUserProperty): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/user/${parameters.userId}/property/${parameters.key}`, + method: 'PUT', + body: { + value: parameters.value, + }, + }; + + return await client.sendRequest(config); +} + +/** + * Deletes a property for the given user. For more information about user properties, see [Confluence entity + * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties + * stored against a user are on a Confluence site level and not space/content level. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function deleteUserProperty(client: Client, parameters: DeleteUserProperty): Promise { + const config: SendRequestOptions = { + url: `/wiki/rest/api/user/${parameters.userId}/property/${parameters.key}`, + method: 'DELETE', + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/api/users.ts b/src/v1/api/users.ts new file mode 100644 index 00000000..0ed408b3 --- /dev/null +++ b/src/v1/api/users.ts @@ -0,0 +1,174 @@ +import { UserSchema, type User } from '../models/user'; +import { UserAnonymousSchema, type UserAnonymous } from '../models/userAnonymous'; +import { GroupArrayWithLinksSchema, type GroupArrayWithLinks } from '../models/groupArrayWithLinks'; +import { BulkUserLookupArraySchema, type BulkUserLookupArray } from '../models/bulkUserLookupArray'; +import { AccountIdEmailRecordSchema, type AccountIdEmailRecord } from '../models/accountIdEmailRecord'; +import { AccountIdEmailRecordArraySchema, type AccountIdEmailRecordArray } from '../models/accountIdEmailRecordArray'; +import type { GetUser } from '../parameters/getUser'; +import type { GetAnonymousUser } from '../parameters/getAnonymousUser'; +import type { GetCurrentUser } from '../parameters/getCurrentUser'; +import type { GetGroupMembershipsForUser } from '../parameters/getGroupMembershipsForUser'; +import type { GetBulkUserLookup } from '../parameters/getBulkUserLookup'; +import type { GetPrivacyUnsafeUserEmail } from '../parameters/getPrivacyUnsafeUserEmail'; +import type { GetPrivacyUnsafeUserEmailBulk } from '../parameters/getPrivacyUnsafeUserEmailBulk'; +import type { Client, SendRequestOptions } from '#/core'; + +/** + * Returns a user. This includes information about the user, such as the display name, account ID, profile picture, and + * more. The information returned may be restricted by the user's profile visibility settings. + * + * **Note:** to add, edit, or delete users in your organization, see the [user management REST + * API](/cloud/admin/user-management/about/). + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getUser(client: Client, parameters: GetUser): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/user', + method: 'GET', + searchParams: { + accountId: parameters.accountId, + expand: parameters.expand, + }, + schema: UserSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns information about how anonymous users are represented, like the profile picture and display name. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getAnonymousUser(client: Client, parameters?: GetAnonymousUser): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/user/anonymous', + method: 'GET', + searchParams: { + expand: parameters?.expand, + }, + schema: UserAnonymousSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the currently logged-in user. This includes information about the user, like the display name, userKey, + * account ID, profile picture, and more. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getCurrentUser(client: Client, parameters?: GetCurrentUser): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/user/current', + method: 'GET', + searchParams: { + expand: parameters?.expand, + }, + schema: UserSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns the groups that a user is a member of. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getGroupMembershipsForUser( + client: Client, + parameters: GetGroupMembershipsForUser, +): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/user/memberof', + method: 'GET', + searchParams: { + accountId: parameters.accountId, + start: parameters.start, + limit: parameters.limit, + }, + schema: GroupArrayWithLinksSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns user details for the ids provided in the request. Currently this API returns a maximum of 100 results. If + * more than 100 account ids are passed in, then the first 100 will be returned. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getBulkUserLookup(client: Client, parameters: GetBulkUserLookup): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/user/bulk', + method: 'GET', + searchParams: { + accountId: parameters.accountId, + expand: parameters.expand, + }, + schema: BulkUserLookupArraySchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a user's email address regardless of the user’s profile visibility settings. For Connect apps, this API is + * only available to apps approved by Atlassian, according to these + * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). + * For Forge apps, this API only supports access via asApp() requests. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getPrivacyUnsafeUserEmail( + client: Client, + parameters: GetPrivacyUnsafeUserEmail, +): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/user/email', + method: 'GET', + searchParams: { + accountId: parameters.accountId, + }, + schema: AccountIdEmailRecordSchema, + }; + + return await client.sendRequest(config); +} + +/** + * Returns a user's email address regardless of the user’s profile visibility settings. For Connect apps, this API is + * only available to apps approved by Atlassian, according to these + * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603). + * For Forge apps, this API only supports access via asApp() requests. + * + * Any accounts which are not available will not be included in the result. + * + * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site ('Can + * use' global permission). + */ +export async function getPrivacyUnsafeUserEmailBulk( + client: Client, + parameters: GetPrivacyUnsafeUserEmailBulk, +): Promise { + const config: SendRequestOptions = { + url: '/wiki/rest/api/user/email/bulk', + method: 'GET', + searchParams: { + accountId: parameters.accountId, + }, + schema: AccountIdEmailRecordArraySchema, + }; + + return await client.sendRequest(config); +} diff --git a/src/v1/createV1Client.ts b/src/v1/createV1Client.ts new file mode 100644 index 00000000..c749ed63 --- /dev/null +++ b/src/v1/createV1Client.ts @@ -0,0 +1,510 @@ +import { type ClientConfig, createClient } from '#/core'; +import * as audit from './api/audit'; +import * as content from './api/content'; +import * as experimental from './api/experimental'; +import * as contentChildrenAndDescendants from './api/contentChildrenAndDescendants'; +import * as contentAttachments from './api/contentAttachments'; +import * as contentMacroBody from './api/contentMacroBody'; +import * as contentLabels from './api/contentLabels'; +import * as contentWatches from './api/contentWatches'; +import * as contentPermissions from './api/contentPermissions'; +import * as contentRestrictions from './api/contentRestrictions'; +import * as contentStates from './api/contentStates'; +import * as contentVersions from './api/contentVersions'; +import * as contentBody from './api/contentBody'; +import * as labelInfo from './api/labelInfo'; +import * as group from './api/group'; +import * as longRunningTask from './api/longRunningTask'; +import * as relation from './api/relation'; +import * as search from './api/search'; +import * as settings from './api/settings'; +import * as themes from './api/themes'; +import * as space from './api/space'; +import * as spacePermissions from './api/spacePermissions'; +import * as spaceSettings from './api/spaceSettings'; +import * as template from './api/template'; +import * as users from './api/users'; +import * as dynamicModules from './api/dynamicModules'; +import * as analytics from './api/analytics'; +import * as userProperties from './api/userProperties'; +import type { + GetAuditRecords, + CreateAuditRecord, + ExportAuditRecords, + SetRetentionPeriod, + GetAuditRecordsForTimePeriod, + ArchivePages, + PublishLegacyDraft, + PublishSharedDraft, + SearchContentByCQL, + DeletePageTree, + GetLabelsForSpace, + AddLabelsToSpace, + DeleteLabelFromSpace, + MovePage, + GetContentDescendants, + GetDescendantsOfType, + CopyPageHierarchy, + CopyPage, + CreateAttachment, + CreateOrUpdateAttachments, + UpdateAttachmentProperties, + UpdateAttachmentData, + DownloadAttatchment, + GetMacroBodyByMacroId, + GetAndConvertMacroBodyByMacroId, + GetAndAsyncConvertMacroBodyByMacroId, + AddLabelsToContent, + RemoveLabelFromContentUsingQueryParameter, + RemoveLabelFromContent, + GetWatchesForPage, + GetWatchesForSpace, + GetWatchersForSpace, + GetContentWatchStatus, + AddContentWatcher, + RemoveContentWatcher, + IsWatchingLabel, + AddLabelWatcher, + RemoveLabelWatcher, + IsWatchingSpace, + AddSpaceWatcher, + RemoveSpaceWatch, + CheckContentPermission, + GetRestrictions, + AddRestrictions, + UpdateRestrictions, + DeleteRestrictions, + GetRestrictionsByOperation, + GetRestrictionsForOperation, + GetIndividualGroupRestrictionStatusByGroupId, + AddGroupToContentRestrictionByGroupId, + RemoveGroupFromContentRestriction, + GetContentRestrictionStatusForUser, + AddUserToContentRestriction, + RemoveUserFromContentRestriction, + GetContentState, + SetContentState, + RemoveContentState, + GetAvailableContentStates, + GetSpaceContentStates, + GetContentStateSettings, + GetContentsWithState, + RestoreContentVersion, + DeleteContentVersion, + AsyncConvertContentBodyRequest, + AsyncConvertContentBodyResponse, + BulkAsyncConvertContentBodyResponse, + BulkAsyncConvertContentBodyRequest, + GetAllLabelContent, + GetGroups, + CreateGroup, + GetGroupByGroupId, + RemoveGroupById, + SearchGroups, + GetGroupMembersByGroupId, + AddUserToGroupByGroupId, + RemoveMemberFromGroupByGroupId, + GetTasks, + GetTask, + FindTargetFromSource, + GetRelationship, + CreateRelationship, + DeleteRelationship, + FindSourcesForTarget, + SearchByCQL, + SearchUser, + GetLookAndFeelSettings, + UpdateLookAndFeel, + UpdateLookAndFeelSettings, + ResetLookAndFeelSettings, + GetThemes, + GetTheme, + GetSpaceTheme, + SetSpaceTheme, + ResetSpaceTheme, + CreateSpace, + CreatePrivateSpace, + UpdateSpace, + DeleteSpace, + AddPermissionToSpace, + AddCustomContentPermissions, + RemovePermission, + GetSpaceSettings, + UpdateSpaceSettings, + CreateContentTemplate, + UpdateContentTemplate, + GetBlueprintTemplates, + GetContentTemplates, + GetContentTemplate, + RemoveTemplate, + GetUser, + GetAnonymousUser, + GetCurrentUser, + GetGroupMembershipsForUser, + GetBulkUserLookup, + GetPrivacyUnsafeUserEmail, + GetPrivacyUnsafeUserEmailBulk, + RegisterModules, + RemoveModules, + GetViews, + GetViewers, + GetUserProperties, + GetUserProperty, + CreateUserProperty, + UpdateUserProperty, + DeleteUserProperty, +} from './parameters'; +import type { + AuditRecordArray, + AuditRecord, + RetentionPeriod, + LongTask, + Content, + ContentArray, + LabelArray, + MovePage as MovePageModel, + ContentChildren, + MacroInstance, + ContentBody, + AsyncId, + WatchArray, + SpaceWatchArray, + UserWatch, + PermissionCheckResponse, + ContentRestrictionArray, + ContentRestriction, + ContentStateResponse, + AvailableContentStates, + ContentState, + ContentStateSettings, + Version, + AsyncContentBody, + AsyncContentBodyArray, + AsyncIdArray, + LabelDetails, + GroupArrayWithLinks, + Group, + UserArray, + LongTaskStatusArray, + LongTaskStatusWithLinks, + RelationArray, + Relation, + SearchPageResponseSearchResult, + LookAndFeelSettings, + LookAndFeelSelection, + LookAndFeelWithLinks, + SystemInfoEntity, + ThemeArray, + Theme, + Space, + SpacePermissionV2, + SpaceSettings, + ContentTemplate, + BlueprintTemplateArray, + ContentTemplateArray, + User, + UserAnonymous, + BulkUserLookupArray, + AccountIdEmailRecord, + AccountIdEmailRecordArray, + GetViews as GetViewsModel, + GetViewers as GetViewersModel, + UserPropertyKeyArray, + UserProperty, +} from './models'; +export function createV1Client(clientConfig: ClientConfig) { + const client = createClient(clientConfig); + return { + audit: { + getAuditRecords: (parameters?: GetAuditRecords): Promise => + audit.getAuditRecords(client, parameters), + createAuditRecord: (parameters: CreateAuditRecord): Promise => + audit.createAuditRecord(client, parameters), + exportAuditRecords: (parameters?: ExportAuditRecords): Promise => + audit.exportAuditRecords(client, parameters), + getRetentionPeriod: (): Promise => audit.getRetentionPeriod(client), + setRetentionPeriod: (parameters: SetRetentionPeriod): Promise => + audit.setRetentionPeriod(client, parameters), + getAuditRecordsForTimePeriod: (parameters?: GetAuditRecordsForTimePeriod): Promise => + audit.getAuditRecordsForTimePeriod(client, parameters), + }, + content: { + archivePages: (parameters: ArchivePages): Promise => content.archivePages(client, parameters), + publishLegacyDraft: (parameters: PublishLegacyDraft): Promise => + content.publishLegacyDraft(client, parameters), + publishSharedDraft: (parameters: PublishSharedDraft): Promise => + content.publishSharedDraft(client, parameters), + searchContentByCQL: (parameters: SearchContentByCQL): Promise => + content.searchContentByCQL(client, parameters), + }, + experimental: { + deletePageTree: (parameters: DeletePageTree): Promise => + experimental.deletePageTree(client, parameters), + getLabelsForSpace: (parameters: GetLabelsForSpace): Promise => + experimental.getLabelsForSpace(client, parameters), + addLabelsToSpace: (parameters: AddLabelsToSpace): Promise => + experimental.addLabelsToSpace(client, parameters), + deleteLabelFromSpace: (parameters: DeleteLabelFromSpace): Promise => + experimental.deleteLabelFromSpace(client, parameters), + }, + contentChildrenAndDescendants: { + movePage: (parameters: MovePage): Promise => + contentChildrenAndDescendants.movePage(client, parameters), + getContentDescendants: (parameters: GetContentDescendants): Promise => + contentChildrenAndDescendants.getContentDescendants(client, parameters), + getDescendantsOfType: (parameters: GetDescendantsOfType): Promise => + contentChildrenAndDescendants.getDescendantsOfType(client, parameters), + copyPageHierarchy: (parameters: CopyPageHierarchy): Promise => + contentChildrenAndDescendants.copyPageHierarchy(client, parameters), + copyPage: (parameters: CopyPage): Promise => contentChildrenAndDescendants.copyPage(client, parameters), + }, + contentAttachments: { + createAttachment: (parameters: CreateAttachment): Promise => + contentAttachments.createAttachment(client, parameters), + createOrUpdateAttachments: (parameters: CreateOrUpdateAttachments): Promise => + contentAttachments.createOrUpdateAttachments(client, parameters), + updateAttachmentProperties: (parameters: UpdateAttachmentProperties): Promise => + contentAttachments.updateAttachmentProperties(client, parameters), + updateAttachmentData: (parameters: UpdateAttachmentData): Promise => + contentAttachments.updateAttachmentData(client, parameters), + downloadAttatchment: (parameters: DownloadAttatchment): Promise => + contentAttachments.downloadAttatchment(client, parameters), + }, + contentMacroBody: { + getMacroBodyByMacroId: (parameters: GetMacroBodyByMacroId): Promise => + contentMacroBody.getMacroBodyByMacroId(client, parameters), + getAndConvertMacroBodyByMacroId: (parameters: GetAndConvertMacroBodyByMacroId): Promise => + contentMacroBody.getAndConvertMacroBodyByMacroId(client, parameters), + getAndAsyncConvertMacroBodyByMacroId: (parameters: GetAndAsyncConvertMacroBodyByMacroId): Promise => + contentMacroBody.getAndAsyncConvertMacroBodyByMacroId(client, parameters), + }, + contentLabels: { + addLabelsToContent: (parameters: AddLabelsToContent): Promise => + contentLabels.addLabelsToContent(client, parameters), + removeLabelFromContentUsingQueryParameter: ( + parameters: RemoveLabelFromContentUsingQueryParameter, + ): Promise => contentLabels.removeLabelFromContentUsingQueryParameter(client, parameters), + removeLabelFromContent: (parameters: RemoveLabelFromContent): Promise => + contentLabels.removeLabelFromContent(client, parameters), + }, + contentWatches: { + getWatchesForPage: (parameters: GetWatchesForPage): Promise => + contentWatches.getWatchesForPage(client, parameters), + getWatchesForSpace: (parameters: GetWatchesForSpace): Promise => + contentWatches.getWatchesForSpace(client, parameters), + getWatchersForSpace: (parameters: GetWatchersForSpace): Promise => + contentWatches.getWatchersForSpace(client, parameters), + getContentWatchStatus: (parameters: GetContentWatchStatus): Promise => + contentWatches.getContentWatchStatus(client, parameters), + addContentWatcher: (parameters: AddContentWatcher): Promise => + contentWatches.addContentWatcher(client, parameters), + removeContentWatcher: (parameters: RemoveContentWatcher): Promise => + contentWatches.removeContentWatcher(client, parameters), + isWatchingLabel: (parameters: IsWatchingLabel): Promise => + contentWatches.isWatchingLabel(client, parameters), + addLabelWatcher: (parameters: AddLabelWatcher): Promise => + contentWatches.addLabelWatcher(client, parameters), + removeLabelWatcher: (parameters: RemoveLabelWatcher): Promise => + contentWatches.removeLabelWatcher(client, parameters), + isWatchingSpace: (parameters: IsWatchingSpace): Promise => + contentWatches.isWatchingSpace(client, parameters), + addSpaceWatcher: (parameters: AddSpaceWatcher): Promise => + contentWatches.addSpaceWatcher(client, parameters), + removeSpaceWatch: (parameters: RemoveSpaceWatch): Promise => + contentWatches.removeSpaceWatch(client, parameters), + }, + contentPermissions: { + checkContentPermission: (parameters: CheckContentPermission): Promise => + contentPermissions.checkContentPermission(client, parameters), + }, + contentRestrictions: { + getRestrictions: (parameters: GetRestrictions): Promise => + contentRestrictions.getRestrictions(client, parameters), + addRestrictions: (parameters: AddRestrictions): Promise => + contentRestrictions.addRestrictions(client, parameters), + updateRestrictions: (parameters: UpdateRestrictions): Promise => + contentRestrictions.updateRestrictions(client, parameters), + deleteRestrictions: (parameters: DeleteRestrictions): Promise => + contentRestrictions.deleteRestrictions(client, parameters), + getRestrictionsByOperation: (parameters: GetRestrictionsByOperation): Promise => + contentRestrictions.getRestrictionsByOperation(client, parameters), + getRestrictionsForOperation: (parameters: GetRestrictionsForOperation): Promise => + contentRestrictions.getRestrictionsForOperation(client, parameters), + getIndividualGroupRestrictionStatusByGroupId: ( + parameters: GetIndividualGroupRestrictionStatusByGroupId, + ): Promise => contentRestrictions.getIndividualGroupRestrictionStatusByGroupId(client, parameters), + addGroupToContentRestrictionByGroupId: (parameters: AddGroupToContentRestrictionByGroupId): Promise => + contentRestrictions.addGroupToContentRestrictionByGroupId(client, parameters), + removeGroupFromContentRestriction: (parameters: RemoveGroupFromContentRestriction): Promise => + contentRestrictions.removeGroupFromContentRestriction(client, parameters), + getContentRestrictionStatusForUser: (parameters: GetContentRestrictionStatusForUser): Promise => + contentRestrictions.getContentRestrictionStatusForUser(client, parameters), + addUserToContentRestriction: (parameters: AddUserToContentRestriction): Promise => + contentRestrictions.addUserToContentRestriction(client, parameters), + removeUserFromContentRestriction: (parameters: RemoveUserFromContentRestriction): Promise => + contentRestrictions.removeUserFromContentRestriction(client, parameters), + }, + contentStates: { + getContentState: (parameters: GetContentState): Promise => + contentStates.getContentState(client, parameters), + setContentState: (parameters: SetContentState): Promise => + contentStates.setContentState(client, parameters), + removeContentState: (parameters: RemoveContentState): Promise => + contentStates.removeContentState(client, parameters), + getAvailableContentStates: (parameters: GetAvailableContentStates): Promise => + contentStates.getAvailableContentStates(client, parameters), + getCustomContentStates: (): Promise => contentStates.getCustomContentStates(client), + getSpaceContentStates: (parameters: GetSpaceContentStates): Promise => + contentStates.getSpaceContentStates(client, parameters), + getContentStateSettings: (parameters: GetContentStateSettings): Promise => + contentStates.getContentStateSettings(client, parameters), + getContentsWithState: (parameters: GetContentsWithState): Promise => + contentStates.getContentsWithState(client, parameters), + }, + contentVersions: { + restoreContentVersion: (parameters: RestoreContentVersion): Promise => + contentVersions.restoreContentVersion(client, parameters), + deleteContentVersion: (parameters: DeleteContentVersion): Promise => + contentVersions.deleteContentVersion(client, parameters), + }, + contentBody: { + asyncConvertContentBodyRequest: (parameters: AsyncConvertContentBodyRequest): Promise => + contentBody.asyncConvertContentBodyRequest(client, parameters), + asyncConvertContentBodyResponse: (parameters: AsyncConvertContentBodyResponse): Promise => + contentBody.asyncConvertContentBodyResponse(client, parameters), + bulkAsyncConvertContentBodyResponse: ( + parameters: BulkAsyncConvertContentBodyResponse, + ): Promise => contentBody.bulkAsyncConvertContentBodyResponse(client, parameters), + bulkAsyncConvertContentBodyRequest: (parameters: BulkAsyncConvertContentBodyRequest): Promise => + contentBody.bulkAsyncConvertContentBodyRequest(client, parameters), + }, + labelInfo: { + getAllLabelContent: (parameters: GetAllLabelContent): Promise => + labelInfo.getAllLabelContent(client, parameters), + }, + group: { + getGroups: (parameters?: GetGroups): Promise => group.getGroups(client, parameters), + createGroup: (parameters: CreateGroup): Promise => group.createGroup(client, parameters), + getGroupByGroupId: (parameters: GetGroupByGroupId): Promise => group.getGroupByGroupId(client, parameters), + removeGroupById: (parameters: RemoveGroupById): Promise => group.removeGroupById(client, parameters), + searchGroups: (parameters: SearchGroups): Promise => group.searchGroups(client, parameters), + getGroupMembersByGroupId: (parameters: GetGroupMembersByGroupId): Promise => + group.getGroupMembersByGroupId(client, parameters), + addUserToGroupByGroupId: (parameters: AddUserToGroupByGroupId): Promise => + group.addUserToGroupByGroupId(client, parameters), + removeMemberFromGroupByGroupId: (parameters: RemoveMemberFromGroupByGroupId): Promise => + group.removeMemberFromGroupByGroupId(client, parameters), + }, + longRunningTask: { + getTasks: (parameters?: GetTasks): Promise => longRunningTask.getTasks(client, parameters), + getTask: (parameters: GetTask): Promise => longRunningTask.getTask(client, parameters), + }, + relation: { + findTargetFromSource: (parameters: FindTargetFromSource): Promise => + relation.findTargetFromSource(client, parameters), + getRelationship: (parameters: GetRelationship): Promise => relation.getRelationship(client, parameters), + createRelationship: (parameters: CreateRelationship): Promise => + relation.createRelationship(client, parameters), + deleteRelationship: (parameters: DeleteRelationship): Promise => + relation.deleteRelationship(client, parameters), + findSourcesForTarget: (parameters: FindSourcesForTarget): Promise => + relation.findSourcesForTarget(client, parameters), + }, + search: { + searchByCQL: (parameters: SearchByCQL): Promise => + search.searchByCQL(client, parameters), + searchUser: (parameters: SearchUser): Promise => + search.searchUser(client, parameters), + }, + settings: { + getLookAndFeelSettings: (parameters?: GetLookAndFeelSettings): Promise => + settings.getLookAndFeelSettings(client, parameters), + updateLookAndFeel: (parameters: UpdateLookAndFeel): Promise => + settings.updateLookAndFeel(client, parameters), + updateLookAndFeelSettings: (parameters: UpdateLookAndFeelSettings): Promise => + settings.updateLookAndFeelSettings(client, parameters), + resetLookAndFeelSettings: (parameters: ResetLookAndFeelSettings): Promise => + settings.resetLookAndFeelSettings(client, parameters), + getSystemInfo: (): Promise => settings.getSystemInfo(client), + }, + themes: { + getThemes: (parameters?: GetThemes): Promise => themes.getThemes(client, parameters), + getGlobalTheme: (): Promise => themes.getGlobalTheme(client), + getTheme: (parameters: GetTheme): Promise => themes.getTheme(client, parameters), + getSpaceTheme: (parameters: GetSpaceTheme): Promise => themes.getSpaceTheme(client, parameters), + setSpaceTheme: (parameters: SetSpaceTheme): Promise => themes.setSpaceTheme(client, parameters), + resetSpaceTheme: (parameters: ResetSpaceTheme): Promise => themes.resetSpaceTheme(client, parameters), + }, + space: { + createSpace: (parameters: CreateSpace): Promise => space.createSpace(client, parameters), + createPrivateSpace: (parameters: CreatePrivateSpace): Promise => + space.createPrivateSpace(client, parameters), + updateSpace: (parameters: UpdateSpace): Promise => space.updateSpace(client, parameters), + deleteSpace: (parameters: DeleteSpace): Promise => space.deleteSpace(client, parameters), + }, + spacePermissions: { + addPermissionToSpace: (parameters: AddPermissionToSpace): Promise => + spacePermissions.addPermissionToSpace(client, parameters), + addCustomContentPermissions: (parameters: AddCustomContentPermissions): Promise => + spacePermissions.addCustomContentPermissions(client, parameters), + removePermission: (parameters: RemovePermission): Promise => + spacePermissions.removePermission(client, parameters), + }, + spaceSettings: { + getSpaceSettings: (parameters: GetSpaceSettings): Promise => + spaceSettings.getSpaceSettings(client, parameters), + updateSpaceSettings: (parameters: UpdateSpaceSettings): Promise => + spaceSettings.updateSpaceSettings(client, parameters), + }, + template: { + createContentTemplate: (parameters: CreateContentTemplate): Promise => + template.createContentTemplate(client, parameters), + updateContentTemplate: (parameters: UpdateContentTemplate): Promise => + template.updateContentTemplate(client, parameters), + getBlueprintTemplates: (parameters?: GetBlueprintTemplates): Promise => + template.getBlueprintTemplates(client, parameters), + getContentTemplates: (parameters?: GetContentTemplates): Promise => + template.getContentTemplates(client, parameters), + getContentTemplate: (parameters: GetContentTemplate): Promise => + template.getContentTemplate(client, parameters), + removeTemplate: (parameters: RemoveTemplate): Promise => template.removeTemplate(client, parameters), + }, + users: { + getUser: (parameters: GetUser): Promise => users.getUser(client, parameters), + getAnonymousUser: (parameters?: GetAnonymousUser): Promise => + users.getAnonymousUser(client, parameters), + getCurrentUser: (parameters?: GetCurrentUser): Promise => users.getCurrentUser(client, parameters), + getGroupMembershipsForUser: (parameters: GetGroupMembershipsForUser): Promise => + users.getGroupMembershipsForUser(client, parameters), + getBulkUserLookup: (parameters: GetBulkUserLookup): Promise => + users.getBulkUserLookup(client, parameters), + getPrivacyUnsafeUserEmail: (parameters: GetPrivacyUnsafeUserEmail): Promise => + users.getPrivacyUnsafeUserEmail(client, parameters), + getPrivacyUnsafeUserEmailBulk: (parameters: GetPrivacyUnsafeUserEmailBulk): Promise => + users.getPrivacyUnsafeUserEmailBulk(client, parameters), + }, + dynamicModules: { + getModules: (): Promise => dynamicModules.getModules(client), + registerModules: (parameters: RegisterModules): Promise => + dynamicModules.registerModules(client, parameters), + removeModules: (parameters: RemoveModules): Promise => dynamicModules.removeModules(client, parameters), + }, + analytics: { + getViews: (parameters: GetViews): Promise => analytics.getViews(client, parameters), + getViewers: (parameters: GetViewers): Promise => analytics.getViewers(client, parameters), + }, + userProperties: { + getUserProperties: (parameters: GetUserProperties): Promise => + userProperties.getUserProperties(client, parameters), + getUserProperty: (parameters: GetUserProperty): Promise => + userProperties.getUserProperty(client, parameters), + createUserProperty: (parameters: CreateUserProperty): Promise => + userProperties.createUserProperty(client, parameters), + updateUserProperty: (parameters: UpdateUserProperty): Promise => + userProperties.updateUserProperty(client, parameters), + deleteUserProperty: (parameters: DeleteUserProperty): Promise => + userProperties.deleteUserProperty(client, parameters), + }, + }; +} +export type V1Client = ReturnType; diff --git a/src/v1/index.ts b/src/v1/index.ts new file mode 100644 index 00000000..c2c4106f --- /dev/null +++ b/src/v1/index.ts @@ -0,0 +1,5 @@ +export * from './api'; + +export * from './models'; + +export * from './createV1Client'; diff --git a/src/v1/models/accountId.ts b/src/v1/models/accountId.ts new file mode 100644 index 00000000..a4ff4dcf --- /dev/null +++ b/src/v1/models/accountId.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; + +export const AccountIdSchema = apiObject({ + accountId: z.string(), +}); + +export type AccountId = z.infer; diff --git a/src/v1/models/accountIdEmailRecord.ts b/src/v1/models/accountIdEmailRecord.ts new file mode 100644 index 00000000..476dcc5a --- /dev/null +++ b/src/v1/models/accountIdEmailRecord.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; + +export const AccountIdEmailRecordSchema = apiObject({ + accountId: z.string(), + email: z.string(), +}); + +export type AccountIdEmailRecord = z.infer; diff --git a/src/v1/models/accountIdEmailRecordArray.ts b/src/v1/models/accountIdEmailRecordArray.ts new file mode 100644 index 00000000..d35344ae --- /dev/null +++ b/src/v1/models/accountIdEmailRecordArray.ts @@ -0,0 +1,6 @@ +import type { z } from 'zod'; +import { apiObject } from '#/core'; + +export const AccountIdEmailRecordArraySchema = apiObject({}); + +export type AccountIdEmailRecordArray = z.infer; diff --git a/src/v1/models/addContentRestriction.ts b/src/v1/models/addContentRestriction.ts new file mode 100644 index 00000000..142d1311 --- /dev/null +++ b/src/v1/models/addContentRestriction.ts @@ -0,0 +1,47 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { GenericUserNameSchema } from './genericUserName'; +import { GenericUserKeySchema } from './genericUserKey'; +import { GenericAccountIdSchema } from './genericAccountId'; + +export const AddContentRestrictionSchema = apiObject({ + /** The restriction operation applied to content. */ + operation: z.enum(['read', 'update']), + /** + * The users/groups that the restrictions will be applied to. At least one of `user` or `group` must be specified + * for this object. + */ + restrictions: apiObject({ + /** + * The users that the restrictions will be applied to. This array must have at least one item, otherwise it + * should be omitted. + */ + user: z + .array( + apiObject({ + /** Set to 'known'. */ + type: z.enum(['known', 'unknown', 'anonymous', 'user']), + username: GenericUserNameSchema.optional(), + userKey: GenericUserKeySchema.optional(), + accountId: GenericAccountIdSchema, + }), + ) + .optional(), + /** + * The groups that the restrictions will be applied to. This array must have at least one item, otherwise it + * should be omitted. + */ + group: z + .array( + apiObject({ + /** Set to 'group'. */ + type: z.enum(['group']), + /** The name of the group. */ + name: z.string(), + }), + ) + .optional(), + }), +}); + +export type AddContentRestriction = z.infer; diff --git a/src/v1/models/addContentRestrictionUpdateArray.ts b/src/v1/models/addContentRestrictionUpdateArray.ts new file mode 100644 index 00000000..204bb735 --- /dev/null +++ b/src/v1/models/addContentRestrictionUpdateArray.ts @@ -0,0 +1,6 @@ +import type { z } from 'zod'; +import { apiObject } from '#/core'; + +export const AddContentRestrictionUpdateArraySchema = apiObject({}); + +export type AddContentRestrictionUpdateArray = z.infer; diff --git a/src/v1/models/affectedObject.ts b/src/v1/models/affectedObject.ts new file mode 100644 index 00000000..26c664b6 --- /dev/null +++ b/src/v1/models/affectedObject.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; + +export const AffectedObjectSchema = apiObject({ + name: z.string(), + objectType: z.string(), +}); + +export type AffectedObject = z.infer; diff --git a/src/v1/models/asyncContentBody.ts b/src/v1/models/asyncContentBody.ts new file mode 100644 index 00000000..85b855a8 --- /dev/null +++ b/src/v1/models/asyncContentBody.ts @@ -0,0 +1,47 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { EmbeddedContentSchema } from './embeddedContent'; +import { WebResourceDependenciesSchema } from './webResourceDependencies'; +import { GenericLinksSchema } from './genericLinks'; + +export const AsyncContentBodySchema = apiObject({ + value: z.string().optional(), + representation: z + .enum([ + 'view', + 'export_view', + 'styled_view', + 'storage', + 'editor', + 'editor2', + 'anonymous_export_view', + 'wiki', + 'atlas_doc_format', + ]) + .optional(), + renderTaskId: z.string().optional(), + error: z.string().optional(), + /** + * Rerunning is reserved for when the job is working, but there is a previous run's value in the cache. You may + * choose to continue polling, or use the cached value. + */ + status: z.enum(['WORKING', 'QUEUED', 'FAILED', 'COMPLETED', 'RERUNNING']).optional(), + embeddedContent: z.array(EmbeddedContentSchema).optional(), + webresource: WebResourceDependenciesSchema.optional(), + mediaToken: apiObject({ + collectionIds: z.array(z.string()).optional(), + contentId: z.string().optional(), + expiryDateTime: z.string().optional(), + fileIds: z.array(z.string()).optional(), + token: z.string().optional(), + }).optional(), + _expandable: apiObject({ + content: z.string().optional(), + embeddedContent: z.string().optional(), + webresource: z.string().optional(), + mediaToken: z.string().optional(), + }).optional(), + _links: GenericLinksSchema.optional(), +}); + +export type AsyncContentBody = z.infer; diff --git a/src/v1/models/asyncContentBodyArray.ts b/src/v1/models/asyncContentBodyArray.ts new file mode 100644 index 00000000..4b910836 --- /dev/null +++ b/src/v1/models/asyncContentBodyArray.ts @@ -0,0 +1,6 @@ +import type { z } from 'zod'; +import { apiObject } from '#/core'; + +export const AsyncContentBodyArraySchema = apiObject({}); + +export type AsyncContentBodyArray = z.infer; diff --git a/src/v1/models/asyncId.ts b/src/v1/models/asyncId.ts new file mode 100644 index 00000000..afd95713 --- /dev/null +++ b/src/v1/models/asyncId.ts @@ -0,0 +1,8 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; + +export const AsyncIdSchema = apiObject({ + asyncId: z.string(), +}); + +export type AsyncId = z.infer; diff --git a/src/v1/models/asyncIdArray.ts b/src/v1/models/asyncIdArray.ts new file mode 100644 index 00000000..6f3c3035 --- /dev/null +++ b/src/v1/models/asyncIdArray.ts @@ -0,0 +1,6 @@ +import type { z } from 'zod'; +import { apiObject } from '#/core'; + +export const AsyncIdArraySchema = apiObject({}); + +export type AsyncIdArray = z.infer; diff --git a/src/v1/models/attachmentPropertiesUpdateBody.ts b/src/v1/models/attachmentPropertiesUpdateBody.ts new file mode 100644 index 00000000..9ce4ce91 --- /dev/null +++ b/src/v1/models/attachmentPropertiesUpdateBody.ts @@ -0,0 +1,20 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { ContainerSchema } from './container'; +import { VersionSchema } from './version'; + +export const AttachmentPropertiesUpdateBodySchema = apiObject({ + id: z.string(), + /** Set this to "attachment" */ + type: z.string(), + status: z.string().optional(), + title: z.string().optional(), + container: ContainerSchema.optional(), + metadata: apiObject({ + mediaType: z.string().optional(), + }).optional(), + extensions: z.record(z.string(), z.any()).optional(), + version: VersionSchema, +}); + +export type AttachmentPropertiesUpdateBody = z.infer; diff --git a/src/v1/models/attachmentUpdate.ts b/src/v1/models/attachmentUpdate.ts new file mode 100644 index 00000000..2224af22 --- /dev/null +++ b/src/v1/models/attachmentUpdate.ts @@ -0,0 +1,34 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; + +export const AttachmentUpdateSchema = apiObject({ + /** + * The attachment version. Set this to the current version number of the attachment. Note, the version number only + * needs to be incremented when updating the actual attachment, not its properties. + */ + version: apiObject({ + /** The version number. */ + number: z.number(), + }), + /** The ID of the attachment to be updated. */ + id: z.string(), + /** Set this to `attachment`. */ + type: z.enum(['attachment']), + /** The updated name of the attachment. */ + title: z.string().max(255, 'title must be at most 255 characters').optional(), + metadata: apiObject({ + /** The media type of the attachment, e.g. 'img/jpg'. */ + mediaType: z.string().optional(), + /** The comment for this update. */ + comment: z.string().optional(), + }).optional(), + /** The new content to attach the attachment to. */ + container: apiObject({ + /** The `id` of the parent content. */ + id: z.string(), + /** The content type. You can only attach attachments to content of type: `page`, `blogpost`. */ + type: z.string(), + }).optional(), +}); + +export type AttachmentUpdate = z.infer; diff --git a/src/v1/models/auditRecord.ts b/src/v1/models/auditRecord.ts new file mode 100644 index 00000000..94986c04 --- /dev/null +++ b/src/v1/models/auditRecord.ts @@ -0,0 +1,41 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { OperationCheckResultSchema } from './operationCheckResult'; +import { GenericUserNameSchema } from './genericUserName'; +import { GenericUserKeySchema } from './genericUserKey'; +import { GenericAccountIdSchema } from './genericAccountId'; +import { AffectedObjectSchema } from './affectedObject'; +import { ChangedValueSchema } from './changedValue'; + +export const AuditRecordSchema = apiObject({ + author: apiObject({ + type: z.enum(['user']), + displayName: z.string(), + operations: z.array(OperationCheckResultSchema).nullish(), + username: GenericUserNameSchema.optional(), + userKey: GenericUserKeySchema.optional(), + accountId: GenericAccountIdSchema.optional(), + accountType: z.string().optional(), + /** This is deprecated. Use `isGuest` instead. */ + externalCollaborator: z.boolean().optional(), + /** This is deprecated. Use `isGuest` instead. Whether the user is an external collaborator user */ + isExternalCollaborator: z.boolean().optional(), + /** Whether the user is a guest user */ + isGuest: z.boolean().optional(), + /** The public name or nickname of the user. Will always contain a value. */ + publicName: z.string().optional(), + }), + remoteAddress: z.string(), + /** The creation date-time of the audit record, as a timestamp. */ + creationDate: z.number(), + summary: z.string(), + description: z.string(), + category: z.string(), + sysAdmin: z.boolean(), + superAdmin: z.boolean().optional(), + affectedObject: AffectedObjectSchema, + changedValues: z.array(ChangedValueSchema), + associatedObjects: z.array(AffectedObjectSchema), +}); + +export type AuditRecord = z.infer; diff --git a/src/v1/models/auditRecordArray.ts b/src/v1/models/auditRecordArray.ts new file mode 100644 index 00000000..d05d2f87 --- /dev/null +++ b/src/v1/models/auditRecordArray.ts @@ -0,0 +1,14 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { AuditRecordSchema } from './auditRecord'; +import { GenericLinksSchema } from './genericLinks'; + +export const AuditRecordArraySchema = apiObject({ + results: z.array(AuditRecordSchema), + start: z.number(), + limit: z.number(), + size: z.number(), + _links: GenericLinksSchema, +}); + +export type AuditRecordArray = z.infer; diff --git a/packages/legacy/src/api/models/auditRecordCreate.ts b/src/v1/models/auditRecordCreate.ts similarity index 54% rename from packages/legacy/src/api/models/auditRecordCreate.ts rename to src/v1/models/auditRecordCreate.ts index 393b9075..1e109ef2 100644 --- a/packages/legacy/src/api/models/auditRecordCreate.ts +++ b/src/v1/models/auditRecordCreate.ts @@ -1,44 +1,53 @@ -import type { AffectedObject } from './affectedObject.js'; -import type { ChangedValue } from './changedValue.js'; +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { OperationCheckResultSchema } from './operationCheckResult'; +import { GenericUserNameSchema } from './genericUserName'; +import { GenericUserKeySchema } from './genericUserKey'; +import { AffectedObjectSchema } from './affectedObject'; +import { ChangedValueSchema } from './changedValue'; -export interface AuditRecordCreate { +export const AuditRecordCreateSchema = apiObject({ /** * The user that actioned the event. If `author` is not specified, then all `author` properties will be set to * null/empty, except for `type` which will be set to 'user'. */ - author?: { + author: apiObject({ /** Set to 'user'. */ - type: string; + type: z.enum(['user']), /** The name that is displayed on the audit log in the Confluence UI. */ - displayName?: string; + displayName: z.string().optional(), /** Always defaults to null. */ - operations?: {}; - }; + operations: z.array(OperationCheckResultSchema).optional(), + username: GenericUserNameSchema.optional(), + userKey: GenericUserKeySchema.optional(), + }).optional(), /** The IP address of the computer where the event was initiated from. */ - remoteAddress: string; + remoteAddress: z.string(), /** * The creation date-time of the audit record, as a timestamp. This is converted to a date-time display in the * Confluence UI. If the `creationDate` is not specified, then it will be set to the timestamp for the current * date-time. */ - creationDate?: number; + creationDate: z.number().optional(), /** The summary of the event, which is displayed in the 'Change' column on the audit log in the Confluence UI. */ - summary?: string; + summary: z.string().optional(), /** * A long description of the event, which is displayed in the 'Description' field on the audit log in the Confluence * UI. */ - description?: string; + description: z.string().optional(), /** The category of the event, which is displayed in the 'Event type' column on the audit log in the Confluence UI. */ - category?: string; + category: z.string().optional(), /** Indicates whether the event was actioned by a system administrator. */ - sysAdmin?: boolean; - affectedObject?: AffectedObject; + sysAdmin: z.boolean().optional(), + affectedObject: AffectedObjectSchema.optional(), /** The values that were changed in the event. */ - changedValues?: ChangedValue[]; + changedValues: z.array(ChangedValueSchema).optional(), /** * Objects that were associated with the event. For example, if the event was a space permission change then the * associated object would be the space. */ - associatedObjects?: AffectedObject[]; -} + associatedObjects: z.array(AffectedObjectSchema).optional(), +}); + +export type AuditRecordCreate = z.infer; diff --git a/src/v1/models/availableContentStates.ts b/src/v1/models/availableContentStates.ts new file mode 100644 index 00000000..b057e6dd --- /dev/null +++ b/src/v1/models/availableContentStates.ts @@ -0,0 +1,21 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { ContentStateSchema } from './contentState'; + +export const AvailableContentStatesSchema = apiObject({ + /** + * Space suggested content states that can be used in the space. This list can be empty if there are no space + * content states defined in the space or if space content states are disabled in the space. All spaces start with 4 + * default space content states, and this can be modified in the UI under space settings. + */ + spaceContentStates: z.array(ContentStateSchema), + /** + * Custom content states that can be used by the user on the content of this call. This list can be empty if there + * are no custom content states defined by the user or if custom content states are disabled in the space of the + * content. This will at most have 3 of the most recently published content states. Only the calling user has access + * to place these states on content, but all users can see these states once they are placed. + */ + customContentStates: z.array(ContentStateSchema), +}); + +export type AvailableContentStates = z.infer; diff --git a/src/v1/models/blueprintTemplate.ts b/src/v1/models/blueprintTemplate.ts new file mode 100644 index 00000000..33874fd0 --- /dev/null +++ b/src/v1/models/blueprintTemplate.ts @@ -0,0 +1,27 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { LabelSchema } from './label'; +import { ContentTemplateBodySchema } from './contentTemplateBody'; +import { GenericLinksSchema } from './genericLinks'; + +export const BlueprintTemplateSchema = apiObject({ + templateId: z.string(), + originalTemplate: apiObject({ + pluginKey: z.string(), + moduleKey: z.string(), + }), + referencingBlueprint: z.string(), + name: z.string(), + description: z.string(), + space: z.record(z.string(), z.any()).optional(), + labels: z.array(LabelSchema), + templateType: z.string(), + editorVersion: z.string().optional(), + body: ContentTemplateBodySchema.optional(), + _expandable: apiObject({ + body: z.string().optional(), + }).optional(), + _links: GenericLinksSchema, +}); + +export type BlueprintTemplate = z.infer; diff --git a/src/v1/models/blueprintTemplateArray.ts b/src/v1/models/blueprintTemplateArray.ts new file mode 100644 index 00000000..80ae2db9 --- /dev/null +++ b/src/v1/models/blueprintTemplateArray.ts @@ -0,0 +1,14 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { BlueprintTemplateSchema } from './blueprintTemplate'; +import { GenericLinksSchema } from './genericLinks'; + +export const BlueprintTemplateArraySchema = apiObject({ + results: z.array(BlueprintTemplateSchema), + start: z.number(), + limit: z.number(), + size: z.number(), + _links: GenericLinksSchema, +}); + +export type BlueprintTemplateArray = z.infer; diff --git a/src/v1/models/breadcrumb.ts b/src/v1/models/breadcrumb.ts new file mode 100644 index 00000000..95e4bec3 --- /dev/null +++ b/src/v1/models/breadcrumb.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; + +export const BreadcrumbSchema = apiObject({ + label: z.string(), + url: z.string(), + separator: z.string(), +}); + +export type Breadcrumb = z.infer; diff --git a/src/v1/models/bulkContentBodyConversionInput.ts b/src/v1/models/bulkContentBodyConversionInput.ts new file mode 100644 index 00000000..7af19a47 --- /dev/null +++ b/src/v1/models/bulkContentBodyConversionInput.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { ContentBodyConversionInputSchema } from './contentBodyConversionInput'; + +export const BulkContentBodyConversionInputSchema = apiObject({ + conversionInputs: z.array(ContentBodyConversionInputSchema).optional(), +}); + +export type BulkContentBodyConversionInput = z.infer; diff --git a/src/v1/models/bulkUserLookup.ts b/src/v1/models/bulkUserLookup.ts new file mode 100644 index 00000000..1615a101 --- /dev/null +++ b/src/v1/models/bulkUserLookup.ts @@ -0,0 +1,43 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { GenericUserNameSchema } from './genericUserName'; +import { GenericUserKeySchema } from './genericUserKey'; +import { GenericAccountIdSchema } from './genericAccountId'; +import { IconSchema } from './icon'; +import { OperationCheckResultSchema } from './operationCheckResult'; +import { UserDetailsSchema } from './userDetails'; +import { SpaceSchema } from './space'; +import { GenericLinksSchema } from './genericLinks'; + +export const BulkUserLookupSchema = apiObject({ + type: z.enum(['known', 'unknown', 'anonymous', 'user']), + username: GenericUserNameSchema.optional(), + userKey: GenericUserKeySchema.optional(), + accountId: GenericAccountIdSchema, + /** The account type of the user, may return empty string if unavailable. */ + accountType: z.string(), + /** The email address of the user. Depending on the user's privacy setting, this may return an empty string. */ + email: z.string(), + /** The public name or nickname of the user. Will always contain a value. */ + publicName: z.string(), + profilePicture: IconSchema, + /** The displays name of the user. Depending on the user's privacy setting, this may be the same as publicName. */ + displayName: z.string(), + /** This displays user time zone. Depending on the user's privacy setting, this may return null. */ + timeZone: z.string().nullish(), + /** This is deprecated. Use `isGuest` instead to find out whether the user is a guest user. */ + isExternalCollaborator: z.boolean().optional(), + /** Whether the user is a guest user */ + isGuest: z.boolean().optional(), + operations: z.array(OperationCheckResultSchema).optional(), + details: UserDetailsSchema.optional(), + personalSpace: SpaceSchema.optional(), + _expandable: apiObject({ + operations: z.string().optional(), + details: z.string().optional(), + personalSpace: z.string().optional(), + }), + _links: GenericLinksSchema, +}); + +export type BulkUserLookup = z.infer; diff --git a/src/v1/models/bulkUserLookupArray.ts b/src/v1/models/bulkUserLookupArray.ts new file mode 100644 index 00000000..ae2bba2a --- /dev/null +++ b/src/v1/models/bulkUserLookupArray.ts @@ -0,0 +1,14 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { BulkUserLookupSchema } from './bulkUserLookup'; +import { GenericLinksSchema } from './genericLinks'; + +export const BulkUserLookupArraySchema = apiObject({ + results: z.array(BulkUserLookupSchema), + start: z.number(), + limit: z.number(), + size: z.number(), + _links: GenericLinksSchema, +}); + +export type BulkUserLookupArray = z.infer; diff --git a/src/v1/models/buttonLookAndFeel.ts b/src/v1/models/buttonLookAndFeel.ts new file mode 100644 index 00000000..5127bbf1 --- /dev/null +++ b/src/v1/models/buttonLookAndFeel.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; + +export const ButtonLookAndFeelSchema = apiObject({ + backgroundColor: z.string(), + color: z.string(), +}); + +export type ButtonLookAndFeel = z.infer; diff --git a/src/v1/models/cQLPersonalDataConvertedQueries.ts b/src/v1/models/cQLPersonalDataConvertedQueries.ts new file mode 100644 index 00000000..4be09ac0 --- /dev/null +++ b/src/v1/models/cQLPersonalDataConvertedQueries.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +/** The converted CQL queries. */ + +export const CQLPersonalDataConvertedQueriesSchema = apiObject({ + /** The list of converted CQL query strings with account IDs in place of user identifiers. */ + queryStrings: z.array(z.string()), +}); + +export type CQLPersonalDataConvertedQueries = z.infer; diff --git a/src/v1/models/cQLPersonalDataMigrationRequest.ts b/src/v1/models/cQLPersonalDataMigrationRequest.ts new file mode 100644 index 00000000..0104be83 --- /dev/null +++ b/src/v1/models/cQLPersonalDataMigrationRequest.ts @@ -0,0 +1,10 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +/** The CQL queries to be converted. */ + +export const CQLPersonalDataMigrationRequestSchema = apiObject({ + /** A list of queries with user identifiers. Maximum of 100 queries. */ + queryStrings: z.array(z.string()), +}); + +export type CQLPersonalDataMigrationRequest = z.infer; diff --git a/src/v1/models/changedValue.ts b/src/v1/models/changedValue.ts new file mode 100644 index 00000000..bc874c40 --- /dev/null +++ b/src/v1/models/changedValue.ts @@ -0,0 +1,12 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; + +export const ChangedValueSchema = apiObject({ + name: z.string(), + oldValue: z.string(), + hiddenOldValue: z.string().optional(), + newValue: z.string(), + hiddenNewValue: z.string().optional(), +}); + +export type ChangedValue = z.infer; diff --git a/src/v1/models/connectModule.ts b/src/v1/models/connectModule.ts new file mode 100644 index 00000000..1c5d1190 --- /dev/null +++ b/src/v1/models/connectModule.ts @@ -0,0 +1,10 @@ +import type { z } from 'zod'; +import { apiObject } from '#/core'; +/** + * A [Connect module](https://developer.atlassian.com/cloud/confluence/modules/admin-page/) in the same format as in + * the* [app descriptor](https://developer.atlassian.com/cloud/confluence/app-descriptor/). + */ + +export const ConnectModuleSchema = apiObject({}); + +export type ConnectModule = z.infer; diff --git a/src/v1/models/connectModules.ts b/src/v1/models/connectModules.ts new file mode 100644 index 00000000..c3426e56 --- /dev/null +++ b/src/v1/models/connectModules.ts @@ -0,0 +1,13 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { ConnectModuleSchema } from './connectModule'; + +export const ConnectModulesSchema = apiObject({ + /** + * A list of app modules in the same format as the `modules` property in the [app + * descriptor](https://developer.atlassian.com/cloud/confluence/app-descriptor/). + */ + modules: z.array(ConnectModuleSchema), +}); + +export type ConnectModules = z.infer; diff --git a/src/v1/models/container.ts b/src/v1/models/container.ts new file mode 100644 index 00000000..2699fd0f --- /dev/null +++ b/src/v1/models/container.ts @@ -0,0 +1,10 @@ +import type { z } from 'zod'; +import { apiObject } from '#/core'; +/** + * Container for content. This can be either a space (containing a page or blogpost)* or a page/blog post (containing an + * attachment or comment) + */ + +export const ContainerSchema = apiObject({}); + +export type Container = z.infer; diff --git a/src/v1/models/containerLookAndFeel.ts b/src/v1/models/containerLookAndFeel.ts new file mode 100644 index 00000000..0f030857 --- /dev/null +++ b/src/v1/models/containerLookAndFeel.ts @@ -0,0 +1,19 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; + +export const ContainerLookAndFeelSchema = apiObject({ + background: z.string(), + backgroundAttachment: z.string().nullish(), + backgroundBlendMode: z.string().nullish(), + backgroundClip: z.string().nullish(), + backgroundColor: z.string().nullable(), + backgroundImage: z.string().nullable(), + backgroundOrigin: z.string().nullish(), + backgroundPosition: z.string().nullish(), + backgroundRepeat: z.string().nullish(), + backgroundSize: z.string().nullable(), + padding: z.string(), + borderRadius: z.string(), +}); + +export type ContainerLookAndFeel = z.infer; diff --git a/src/v1/models/containerSummary.ts b/src/v1/models/containerSummary.ts new file mode 100644 index 00000000..b6e61cd9 --- /dev/null +++ b/src/v1/models/containerSummary.ts @@ -0,0 +1,9 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; + +export const ContainerSummarySchema = apiObject({ + title: z.string(), + displayUrl: z.string(), +}); + +export type ContainerSummary = z.infer; diff --git a/src/v1/models/content.ts b/src/v1/models/content.ts new file mode 100644 index 00000000..ddc4637d --- /dev/null +++ b/src/v1/models/content.ts @@ -0,0 +1,161 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { SpaceSchema, type Space } from './space'; +import { ContentHistorySchema, type ContentHistory } from './contentHistory'; +import { VersionSchema, type Version } from './version'; +import { OperationCheckResultSchema, type OperationCheckResult } from './operationCheckResult'; +import { ContentChildrenSchema, type ContentChildren } from './contentChildren'; +import { ContentChildTypeSchema, type ContentChildType } from './contentChildType'; +import { ContainerSchema, type Container } from './container'; +import { ContentBodySchema, type ContentBody } from './contentBody'; +import { ContentRestrictionSchema, type ContentRestriction } from './contentRestriction'; +import { GenericLinksSchema, type GenericLinks } from './genericLinks'; +import { ContentMetadataSchema, type ContentMetadata } from './contentMetadata'; + +export type Content = { + id?: string; + type: string; + status: string; + title?: string; + space?: Space; + history?: ContentHistory; + version?: Version; + ancestors?: Content[] | null; + operations?: OperationCheckResult[]; + children?: ContentChildren; + childTypes?: ContentChildType; + descendants?: ContentChildren; + container?: Container; + body?: { + view?: ContentBody; + export_view?: ContentBody; + styled_view?: ContentBody; + storage?: ContentBody; + wiki?: ContentBody; + editor?: ContentBody; + editor2?: ContentBody; + anonymous_export_view?: ContentBody; + atlas_doc_format?: ContentBody; + dynamic?: ContentBody; + raw?: ContentBody; + _expandable?: { + editor?: string; + view?: string; + export_view?: string; + styled_view?: string; + storage?: string; + editor2?: string; + anonymous_export_view?: string; + atlas_doc_format?: string; + wiki?: string; + dynamic?: string; + raw?: string; + }; + }; + restrictions?: { + read?: ContentRestriction; + update?: ContentRestriction; + _expandable?: { + read?: string; + update?: string; + }; + _links?: GenericLinks; + }; + metadata?: ContentMetadata; + macroRenderedOutput?: Record; + extensions?: Record; + _expandable?: { + childTypes?: string; + container?: string; + metadata?: string; + operations?: string; + children?: string; + restrictions?: string; + history?: string; + ancestors?: string; + body?: string; + version?: string; + descendants?: string; + space?: string; + extensions?: string; + schedulePublishDate?: string; + schedulePublishInfo?: string; + macroRenderedOutput?: string; + }; + _links?: GenericLinks; +}; +/** Base object for all content types. */ + +export const ContentSchema: z.ZodType = apiObject({ + id: z.string().optional(), + /** Can be "page", "blogpost", "attachment" or "content" */ + type: z.string(), + status: z.string(), + title: z.string().optional(), + space: z.lazy(() => SpaceSchema).optional(), + history: z.lazy(() => ContentHistorySchema).optional(), + version: z.lazy(() => VersionSchema).optional(), + ancestors: z.array(z.lazy(() => ContentSchema)).nullish(), + operations: z.array(OperationCheckResultSchema).optional(), + children: z.lazy(() => ContentChildrenSchema).optional(), + childTypes: ContentChildTypeSchema.optional(), + descendants: z.lazy(() => ContentChildrenSchema).optional(), + container: ContainerSchema.optional(), + body: apiObject({ + view: ContentBodySchema.optional(), + export_view: ContentBodySchema.optional(), + styled_view: ContentBodySchema.optional(), + storage: ContentBodySchema.optional(), + wiki: ContentBodySchema.optional(), + editor: ContentBodySchema.optional(), + editor2: ContentBodySchema.optional(), + anonymous_export_view: ContentBodySchema.optional(), + atlas_doc_format: ContentBodySchema.optional(), + dynamic: ContentBodySchema.optional(), + raw: ContentBodySchema.optional(), + _expandable: apiObject({ + editor: z.string().optional(), + view: z.string().optional(), + export_view: z.string().optional(), + styled_view: z.string().optional(), + storage: z.string().optional(), + editor2: z.string().optional(), + anonymous_export_view: z.string().optional(), + atlas_doc_format: z.string().optional(), + wiki: z.string().optional(), + dynamic: z.string().optional(), + raw: z.string().optional(), + }).optional(), + }).optional(), + restrictions: apiObject({ + read: z.lazy(() => ContentRestrictionSchema).optional(), + update: z.lazy(() => ContentRestrictionSchema).optional(), + _expandable: apiObject({ + read: z.string().optional(), + update: z.string().optional(), + }).optional(), + _links: GenericLinksSchema.optional(), + }).optional(), + metadata: z.lazy(() => ContentMetadataSchema).optional(), + macroRenderedOutput: z.record(z.string(), z.any()).optional(), + extensions: z.record(z.string(), z.any()).optional(), + _expandable: apiObject({ + childTypes: z.string().optional(), + container: z.string().optional(), + metadata: z.string().optional(), + operations: z.string().optional(), + children: z.string().optional(), + restrictions: z.string().optional(), + history: z.string().optional(), + ancestors: z.string().optional(), + body: z.string().optional(), + version: z.string().optional(), + descendants: z.string().optional(), + space: z.string().optional(), + extensions: z.string().optional(), + schedulePublishDate: z.string().optional(), + schedulePublishInfo: z.string().optional(), + macroRenderedOutput: z.string().optional(), + }).optional(), + _links: GenericLinksSchema.optional(), +}); diff --git a/src/v1/models/contentArray.ts b/src/v1/models/contentArray.ts new file mode 100644 index 00000000..f5af2d17 --- /dev/null +++ b/src/v1/models/contentArray.ts @@ -0,0 +1,20 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { ContentSchema, type Content } from './content'; +import { GenericLinksSchema, type GenericLinks } from './genericLinks'; + +export type ContentArray = { + results: Content[]; + start?: number; + limit?: number; + size: number; + _links: GenericLinks; +}; + +export const ContentArraySchema: z.ZodType = apiObject({ + results: z.array(z.lazy(() => ContentSchema)), + start: z.number().optional(), + limit: z.number().optional(), + size: z.number(), + _links: GenericLinksSchema, +}); diff --git a/src/v1/models/contentBlogpost.ts b/src/v1/models/contentBlogpost.ts new file mode 100644 index 00000000..cfdea140 --- /dev/null +++ b/src/v1/models/contentBlogpost.ts @@ -0,0 +1,7 @@ +import type { z } from 'zod'; +import { apiObject } from '#/core'; +/** Representation of a blogpost (content) */ + +export const ContentBlogpostSchema = apiObject({}); + +export type ContentBlogpost = z.infer; diff --git a/packages/legacy/src/api/models/contentBlueprintDraft.ts b/src/v1/models/contentBlueprintDraft.ts similarity index 55% rename from packages/legacy/src/api/models/contentBlueprintDraft.ts rename to src/v1/models/contentBlueprintDraft.ts index fb0f0d01..2042078b 100644 --- a/packages/legacy/src/api/models/contentBlueprintDraft.ts +++ b/src/v1/models/contentBlueprintDraft.ts @@ -1,20 +1,23 @@ -export interface ContentBlueprintDraft { +import { z } from 'zod'; +import { apiObject } from '#/core'; + +export const ContentBlueprintDraftSchema = apiObject({ /** The version for the new content. */ - version: { + version: apiObject({ /** The version number. Set this to `1`. */ - number: number; - }; + number: z.number(), + }), /** The title of the content. If you don't want to change the title, set this to the current title of the draft. */ - title: string; + title: z.string().max(255, 'title must be at most 255 characters'), /** The type of content. Set this to `page`. */ - type: string; + type: z.enum(['page']), /** The status of the content. Set this to `current` or omit it altogether. */ - status?: string; + status: z.enum(['current']).optional(), /** The space for the content. */ - space?: { + space: apiObject({ /** The key of the space */ - key: string; - }; + key: z.string(), + }).optional(), /** * The new ancestor (i.e. parent page) for the content. If you have specified an ancestor, you must also specify a * `space` property in the request body for the space that the ancestor is in. @@ -22,8 +25,14 @@ export interface ContentBlueprintDraft { * Note, if you specify more than one ancestor, the last ID in the array will be selected as the parent page for the * content. */ - ancestors?: { - /** The content ID of the ancestor. */ - id: string; - }[]; -} + ancestors: z + .array( + apiObject({ + /** The content ID of the ancestor. */ + id: z.string(), + }), + ) + .nullish(), +}); + +export type ContentBlueprintDraft = z.infer; diff --git a/src/v1/models/contentBody.ts b/src/v1/models/contentBody.ts new file mode 100644 index 00000000..9c09b81f --- /dev/null +++ b/src/v1/models/contentBody.ts @@ -0,0 +1,39 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { EmbeddedContentSchema } from './embeddedContent'; +import { WebResourceDependenciesSchema } from './webResourceDependencies'; +import { GenericLinksSchema } from './genericLinks'; + +export const ContentBodySchema = apiObject({ + value: z.string(), + representation: z.enum([ + 'view', + 'export_view', + 'styled_view', + 'storage', + 'editor', + 'editor2', + 'anonymous_export_view', + 'wiki', + 'atlas_doc_format', + 'raw', + ]), + embeddedContent: z.array(EmbeddedContentSchema).optional(), + webresource: WebResourceDependenciesSchema.optional(), + mediaToken: apiObject({ + collectionIds: z.array(z.string()).optional(), + contentId: z.string().optional(), + expiryDateTime: z.string().optional(), + fileIds: z.array(z.string()).optional(), + token: z.string().optional(), + }).optional(), + _expandable: apiObject({ + content: z.string().optional(), + embeddedContent: z.string().optional(), + webresource: z.string().optional(), + mediaToken: z.string().optional(), + }).optional(), + _links: GenericLinksSchema.optional(), +}); + +export type ContentBody = z.infer; diff --git a/src/v1/models/contentBodyConversionInput.ts b/src/v1/models/contentBodyConversionInput.ts new file mode 100644 index 00000000..a08e6599 --- /dev/null +++ b/src/v1/models/contentBodyConversionInput.ts @@ -0,0 +1,68 @@ +import { z } from 'zod'; +import { apiObject } from '#/core'; +import { ContentBodyCreateSchema } from './contentBodyCreate'; + +export const ContentBodyConversionInputSchema = apiObject({ + /** The name of the target format for the content body conversion. */ + to: z.string(), + /** + * Controls whether conversion results are cached and reused for identical requests. + * + * - `false`: Each request creates a new conversion task, even if an identical request was made previously. + * - `true`: Enables caching behavior for identical requests from the same user. + * + * - If no cached result exists, a new conversion task is created + * - If a cached result exists, the existing task is marked as RERUNNING and will complete with status COMPLETED + * - Returns the same task ID for identical requests, allowing you to retrieve the cached result + */ + allowCache: z.boolean().optional(), + /** + * The space key used for resolving embedded content (page includes, files, and links) in the content body. For + * example, if the source content contains the link `` + * and the `spaceKeyContext=TEST` parameter is provided, then the link will be converted into a link to the "Example + * page" page in the "TEST" space. + */ + spaceKeyContext: z.string().optional(), + /** + * The content ID used to find the space for resolving embedded content (page includes, files, and links) in the + * content body. For example, if the source content contains the link `` and the `contentIdContext=123` parameter is provided, then the link will be converted into a + * link to the "Example page" page in the same space that has the content with ID=123. Note that `spaceKeyContext` + * will be ignored if this parameter is provided. + */ + contentIdContext: z.string().optional(), + /** + * Mode used for rendering embedded content, such as attachments. - `current` renders the embedded content using the + * latest version. - `version-at-save` renders the embedded content using the version at the time of save. + */ + embeddedContentRender: z.enum(['current', 'version-at-save']).optional(), + /** + * A multi-value, comma-separated parameter indicating which properties of the content to expand and populate. + * Expands are dependent on the `to` conversion format and may be irrelevant for certain conversions (e.g. + * `macroRenderedOutput` is redundant when converting to `view` format). + * + * If rendering to `view` format, and the body content being converted includes arbitrary nested content (such as + * macros); then it is necessary to include webresource expands in the request. Webresources for content body are + * the batched JS and CSS dependencies for any nested dynamic content (i.e. macros). + * + * - `embeddedContent` returns metadata for nested content (e.g. page included using page include macro) + * - `mediaToken` returns JWT token for retrieving attachment data from Media API + * - `macroRenderedOutput` additionally converts body to view format + * - `webresource.superbatch.uris.js` returns all common JS dependencies as static URLs + * - `webresource.superbatch.uris.css` returns all common CSS dependencies as static URLs + * - `webresource.superbatch.uris.all` returns all common dependencies as static URLs + * - `webresource.superbatch.tags.all` returns all common JS dependencies as html ` + + + + + diff --git a/scripts/checkBrowser.ts b/scripts/checkBrowser.ts new file mode 100644 index 00000000..a358d8de --- /dev/null +++ b/scripts/checkBrowser.ts @@ -0,0 +1,131 @@ +/** + * Runs the built package inside a real browser. + * + * The static gate (scripts/checkBrowserSafe.ts) proves nothing Node-only is *mentioned*. This proves the package + * actually loads and works: modules evaluate, a request goes out with the right auth header, a failure arrives as a + * typed error, and an attachment is encoded as multipart the server can parse. + * + * Both shipping shapes are covered, because they fail differently: + * + * - `dist/browser.js`, the self-contained bundle, which must work with no resolver at all; + * - `dist/index.js`, which imports `zod` by bare specifier and stands in for a dependency-resolving CDN — here an + * import map does the resolving that esm.sh or jsDelivr would do. + * + * Runs on bare `node`; keep the types erasable. + */ +import { createServer } from 'node:http'; +import type { IncomingMessage, ServerResponse } from 'node:http'; +import { createReadStream, existsSync } from 'node:fs'; +import { dirname, join, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; +import { chromium } from 'playwright'; + +const root = resolve(dirname(fileURLToPath(import.meta.url)), '..'); + +const MIME: Record = { + '.js': 'text/javascript', + '.map': 'application/json', + '.html': 'text/html', +}; + +type Recorded = { url: string; method: string; auth: string | undefined; contentType: string | undefined; body: string }; + +const recorded: Recorded[] = []; + +function send(res: ServerResponse, status: number, body: string, type = 'application/json'): void { + res.writeHead(status, { + 'content-type': type, + 'access-control-allow-origin': '*', + 'access-control-allow-headers': '*', + }); + res.end(body); +} + +const server = createServer((req: IncomingMessage, res: ServerResponse) => { + const url = new URL(req.url ?? '/', 'http://localhost'); + + if (req.method === 'OPTIONS') return send(res, 204, ''); + + // Static: the built package and the harness page. + if (!url.pathname.startsWith('/wiki/')) { + const file = url.pathname === '/' ? '/harness.html' : url.pathname; + const onDisk = file === '/harness.html' ? join(root, 'scripts', 'browserHarness.html') : join(root, file); + + if (!existsSync(onDisk)) return send(res, 404, 'not found', 'text/plain'); + + const ext = onDisk.slice(onDisk.lastIndexOf('.')); + + res.writeHead(200, { 'content-type': MIME[ext] ?? 'application/octet-stream' }); + + return void createReadStream(onDisk).pipe(res); + } + + // API: record what arrived, then answer as Confluence would. + const chunks: Uint8Array[] = []; + + req.on('data', chunk => chunks.push(chunk as Uint8Array)); + req.on('end', () => { + recorded.push({ + url: url.pathname, + method: req.method ?? '', + auth: req.headers.authorization, + contentType: req.headers['content-type'], + body: Buffer.concat(chunks).toString('utf8'), + }); + + if (url.pathname.endsWith('/missing')) { + return send(res, 404, JSON.stringify({ message: 'No page with id' })); + } + + if (url.pathname.includes('/attachment')) { + return send(res, 200, JSON.stringify({ results: [{ id: 'att1' }] })); + } + + send(res, 200, JSON.stringify({ results: [{ id: '1', title: 'Page' }], _links: {} })); + }); +}); + +await new Promise(done => server.listen(0, () => done())); + +const port = (server.address() as { port: number }).port; +const origin = `http://localhost:${port}`; + +const browser = await chromium.launch(); +const page = await browser.newPage(); +const consoleErrors: string[] = []; + +page.on('pageerror', error => consoleErrors.push(String(error))); + +await page.goto(`${origin}/?port=${port}`); + +const results = (await page.evaluate('window.__run()')) as { name: string; ok: boolean; detail: string }[]; + +await browser.close(); +server.close(); + +let failed = 0; + +for (const result of results) { + console.log(`${result.ok ? ' PASS' : ' FAIL'} ${result.name}${result.detail ? ` — ${result.detail}` : ''}`); + if (!result.ok) failed += 1; +} + +for (const error of consoleErrors) { + console.log(` FAIL uncaught in page — ${error}`); + failed += 1; +} + +// A harness that silently ran nothing would otherwise report success. +if (results.length === 0) { + console.log(' FAIL the harness reported no results at all'); + failed += 1; +} + +console.log(''); + +if (failed > 0) { + console.error(`✖ ${failed} browser check(s) failed`); + process.exit(1); +} + +console.log(`✔ browser: ${results.length} checks passed in Chromium`); diff --git a/scripts/checkBrowserSafe.ts b/scripts/checkBrowserSafe.ts new file mode 100644 index 00000000..0cb40ff4 --- /dev/null +++ b/scripts/checkBrowserSafe.ts @@ -0,0 +1,130 @@ +/** + * Proves the built package can run in a browser. + * + * Two failures have already shipped past review here, and each is cheap to catch mechanically: + * + * - a runtime reference to `process` or a `node:` import, which breaks the moment the bundle is loaded — `process` is + * the worse of the two, because bundlers shim it as an empty object and the crash is a TypeError deep inside a + * property read rather than a missing-module error; + * - a Node type such as `Buffer` or `node:stream` leaking into the shipped declarations, which breaks `tsc` for every + * browser consumer that does not install `@types/node`. + * + * Runs on bare `node` — keep the types here erasable, as in scripts/devVersion.ts. + */ +import { execFileSync } from 'node:child_process'; +import { mkdirSync, readFileSync, readdirSync, rmSync, writeFileSync } from 'node:fs'; +import { dirname, join, relative, resolve } from 'node:path'; +import { fileURLToPath } from 'node:url'; + +const root = resolve(dirname(fileURLToPath(import.meta.url)), '..'); +const dist = join(root, 'dist'); + +function walk(dir: string, ext: string): string[] { + const found: string[] = []; + + for (const entry of readdirSync(dir, { withFileTypes: true })) { + const full = join(dir, entry.name); + + if (entry.isDirectory()) found.push(...walk(full, ext)); + else if (entry.name.endsWith(ext)) found.push(full); + } + + return found; +} + +const problems: string[] = []; + +// The browser bundle is exempt from the runtime scan: it inlines dependencies, +// and a dependency may legitimately carry a guarded `process` reference. +const runtimeFiles = walk(dist, '.js').filter(file => !file.endsWith('browser.js')); + +const RUNTIME_PATTERNS = [ + { label: 'a node: import', regex: /(?:from|import)\s*\(?\s*['"]node:/ }, + { label: 'a require() call', regex: /\brequire\s*\(/ }, + { label: 'a process reference', regex: /\bprocess\s*\./ }, + { label: 'a Buffer reference', regex: /\bBuffer\b/ }, +]; + +/** Comments mention `Buffer` and `process` precisely because the code avoids them; only executable text counts. */ +function stripComments(source: string): string { + return source.replace(/\/\*[\s\S]*?\*\//g, match => match.replace(/[^\n]/g, ' ')).replace(/\/\/[^\n]*/g, ''); +} + +for (const file of runtimeFiles) { + const source = stripComments(readFileSync(file, 'utf8')); + + for (const { label, regex } of RUNTIME_PATTERNS) { + const lines = source.split('\n'); + + lines.forEach((line, index) => { + if (regex.test(line)) { + problems.push(`${relative(root, file)}:${index + 1} — ${label}: ${line.trim()}`); + } + }); + } +} + +// Compile every published entry point the way a browser project would: DOM libs, +// no ambient Node types at all. +const probe = join(root, 'node_modules', '.cache', 'browser-safe'); + +rmSync(probe, { recursive: true, force: true }); +mkdirSync(join(probe, 'src'), { recursive: true }); + +const entries = ['.', './core', './v1', './v2']; +const pkg = JSON.parse(readFileSync(join(root, 'package.json'), 'utf8')); + +writeFileSync( + join(probe, 'src', 'index.ts'), + entries + .map((entry, index) => { + const target = entry === '.' ? pkg.exports['.'].types : pkg.exports[entry].types; + + return `import * as e${index} from '${join(root, target).replace(/\.d\.ts$/, '.js')}';\nvoid e${index};`; + }) + .join('\n'), +); + +writeFileSync( + join(probe, 'tsconfig.json'), + JSON.stringify( + { + compilerOptions: { + target: 'ES2022', + module: 'ESNext', + moduleResolution: 'bundler', + lib: ['ES2022', 'DOM', 'DOM.Iterable'], + types: [], // the whole point: no @types/node + strict: true, + noEmit: true, + skipLibCheck: false, + }, + include: ['src'], + }, + null, + 2, + ), +); + +try { + execFileSync(join(root, 'node_modules', '.bin', 'tsc'), ['--project', probe], { + encoding: 'utf8', + stdio: 'pipe', + }); +} catch (error) { + const { stdout, stderr, message } = error as { stdout?: string; stderr?: string; message?: string }; + const output = `${stdout ?? ''}${stderr ?? ''}`.trim() || message || 'tsc failed without output'; + + problems.push(`the shipped declarations need @types/node:\n${output}`); +} + +rmSync(probe, { recursive: true, force: true }); + +if (problems.length > 0) { + console.error(`✖ ${problems.length} browser-compatibility problem(s):\n`); + for (const problem of problems) console.error(` ${problem}`); + console.error(''); + process.exit(1); +} + +console.log(`✔ browser-safe: ${runtimeFiles.length} runtime files clean, ${entries.length} entry points typecheck`); diff --git a/vite.browser.config.ts b/vite.browser.config.ts new file mode 100644 index 00000000..5ebd0bf6 --- /dev/null +++ b/vite.browser.config.ts @@ -0,0 +1,36 @@ +import { defineConfig } from 'vite'; + +/** + * The self-contained browser build. + * + * `dist/index.js` imports `zod` by bare specifier, which a browser cannot resolve on its own. CDNs that rewrite + * dependencies (esm.sh, jsDelivr's `+esm`) handle that; serving the files as they are does not. This bundle inlines + * zod so the package also loads from a plain file host or a ` +``` + +Attachments accept the same values everywhere — a `File`, `Blob`, `Uint8Array`, +string, stream, and still Node's `Buffer` and `Readable`, which are a `Uint8Array` +and an `AsyncIterable` respectively. They are no longer *named* in `AttachmentContent`, +so the shipped declarations compile in a project without `@types/node`. Where a +browser cannot send a request body as a stream, the stream is read into a `Blob` +rather than failing. See the [browser guide](https://mrrefactoring.github.io/confluence.js/guide/browser). + **Every failure has a type.** Non-2xx responses throw an `ApiError` subclass — `AuthError`, `ForbiddenError`, `NotFoundError`, `RateLimitError` (with `retryAfterMs` parsed from `Retry-After`), `ServerError`. Transport faults throw @@ -86,6 +104,11 @@ if (isRateLimitError(error)) await sleep(error.retryAfterMs ?? 60_000); - `BaseClient` and the per-namespace classes are gone, as are deep imports like `confluence.js/api/content` - Errors are `ApiError` and its subclasses (`status`, `statusText`, `body`) rather than `AxiosError`; transport faults are `NetworkError`, OAuth failures are `OAuthError` +- `AttachmentContent` no longer names `Buffer` or `Readable`. Both still work — the + type describes them structurally — but a declaration that required `@types/node` + broke every browser consumer +- `createMultipartRequestBody` returns a `Promise`: collecting a stream for a runtime + that cannot send one is asynchronous - The v1 surface follows Atlassian's current spec, which has dropped 37 operations (`getContent`, `createContent`, `getSpace`, …) since 2.x shipped — each is mapped to its v2 equivalent in the migration guide diff --git a/docs/.vitepress/config.ts b/docs/.vitepress/config.ts index 9ede3ac1..f45d86c8 100644 --- a/docs/.vitepress/config.ts +++ b/docs/.vitepress/config.ts @@ -25,6 +25,7 @@ const guideSidebar = (ru = false) => { { text: ru ? 'Выбор версии API' : 'Choosing a version', link: `${p}/guide/choosing-a-version` }, { text: ru ? 'Обработка ошибок' : 'Error Handling', link: `${p}/guide/error-handling` }, { text: ru ? 'Повторы запросов' : 'Retries', link: `${p}/guide/retries` }, + { text: ru ? 'Браузеры' : 'Browsers', link: `${p}/guide/browser` }, { text: 'Tree-Shaking', link: `${p}/guide/tree-shaking` }, { text: 'TypeScript', link: `${p}/guide/typescript` }, ], diff --git a/docs/guide/browser.md b/docs/guide/browser.md new file mode 100644 index 00000000..1c385cd3 --- /dev/null +++ b/docs/guide/browser.md @@ -0,0 +1,88 @@ +--- +title: Browsers +description: Run confluence.js in a browser — importing from a CDN, what attachments do differently there, and why calling Confluence straight from a page is usually the wrong shape. +--- + +# Browsers + +The package runs unchanged in a browser. There is one build, not a Node build and a web build: the code branches on what the runtime can do rather than on which runtime it is. + +## Read this before you ship it + +Calling Confluence directly from a page means the browser holds a credential. + +An API token in front-end code is readable by anyone who opens devtools, and it carries the full rights of the account that issued it. An OAuth 2.0 client secret is worse, because it also lets someone mint tokens. Neither belongs in a bundle. + +Confluence Cloud also does not send CORS headers for third-party origins, so a request from your own domain is refused by the browser before it reaches Atlassian. + +That leaves two shapes that actually work: + +- **A server in front.** Your page talks to your backend, the backend holds the credential and talks to Confluence. This is the right answer for almost every product. +- **A first-party surface.** A Forge or Connect app, or an extension, where the platform supplies the origin and the credential. + +Browser support exists so those surfaces — and tooling, sandboxes, docs pages and tests — can use the same library. It is not an invitation to put a token in a web page. + +## Importing from a CDN + +Any CDN that resolves dependencies serves the package as it is published: + +```html + +``` + +jsDelivr works the same way through its `+esm` endpoint: + +```js +import { createV2Client } from 'https://cdn.jsdelivr.net/npm/confluence.js/+esm'; +``` + +The published entry imports `zod` by bare specifier, which a browser cannot resolve on its own — those CDNs rewrite it before serving. A host that returns files untouched will fail on that import. + +For those, and for a plain ` +``` + +jsDelivr делает то же через эндпоинт `+esm`: + +```js +import { createV2Client } from 'https://cdn.jsdelivr.net/npm/confluence.js/+esm'; +``` + +Опубликованная точка входа импортирует `zod` голым спецификатором, а его браузер сам разрешить не может — перечисленные CDN переписывают его перед отдачей. Хостинг, отдающий файлы как есть, на этом импорте упадёт. + +Для таких случаев и для простого `