confluence.js 2.0.0-dev20250512104821 → 2.0.0-dev20250512202536
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/api/{analytics.js → analytics.cjs} +1 -1
- package/dist/cjs/api/analytics.cjs.map +1 -0
- package/dist/cjs/api/{audit.js → audit.cjs} +1 -1
- package/dist/cjs/api/audit.cjs.map +1 -0
- package/dist/cjs/api/{content.js → content.cjs} +1 -1
- package/dist/cjs/api/content.cjs.map +1 -0
- package/dist/cjs/api/{contentAttachments.js → contentAttachments.cjs} +1 -1
- package/dist/cjs/api/contentAttachments.cjs.map +1 -0
- package/dist/cjs/api/{contentBody.js → contentBody.cjs} +1 -1
- package/dist/cjs/api/contentBody.cjs.map +1 -0
- package/dist/cjs/api/{contentChildrenAndDescendants.js → contentChildrenAndDescendants.cjs} +1 -1
- package/dist/cjs/api/contentChildrenAndDescendants.cjs.map +1 -0
- package/dist/cjs/api/{contentComments.js → contentComments.cjs} +1 -1
- package/dist/cjs/api/contentComments.cjs.map +1 -0
- package/dist/cjs/api/{contentLabels.js → contentLabels.cjs} +1 -1
- package/dist/cjs/api/contentLabels.cjs.map +1 -0
- package/dist/cjs/api/{contentMacroBody.js → contentMacroBody.cjs} +1 -1
- package/dist/cjs/api/contentMacroBody.cjs.map +1 -0
- package/dist/cjs/api/{contentPermissions.js → contentPermissions.cjs} +1 -1
- package/dist/cjs/api/contentPermissions.cjs.map +1 -0
- package/dist/cjs/api/{contentProperties.js → contentProperties.cjs} +1 -1
- package/dist/cjs/api/contentProperties.cjs.map +1 -0
- package/dist/cjs/api/{contentRestrictions.js → contentRestrictions.cjs} +1 -1
- package/dist/cjs/api/contentRestrictions.cjs.map +1 -0
- package/dist/cjs/api/{contentStates.js → contentStates.cjs} +1 -1
- package/dist/cjs/api/contentStates.cjs.map +1 -0
- package/dist/cjs/api/{contentVersions.js → contentVersions.cjs} +1 -1
- package/dist/cjs/api/contentVersions.cjs.map +1 -0
- package/dist/cjs/api/{contentWatches.js → contentWatches.cjs} +1 -1
- package/dist/cjs/api/contentWatches.cjs.map +1 -0
- package/dist/cjs/api/{dynamicModules.js → dynamicModules.cjs} +1 -1
- package/dist/cjs/api/dynamicModules.cjs.map +1 -0
- package/dist/cjs/api/{experimental.js → experimental.cjs} +1 -1
- package/dist/cjs/api/experimental.cjs.map +1 -0
- package/dist/cjs/api/{group.js → group.cjs} +1 -1
- package/dist/cjs/api/group.cjs.map +1 -0
- package/dist/cjs/api/{index.js → index.cjs} +32 -32
- package/dist/cjs/api/index.cjs.map +1 -0
- package/dist/cjs/api/{inlineTasks.js → inlineTasks.cjs} +1 -1
- package/dist/cjs/api/inlineTasks.cjs.map +1 -0
- package/dist/cjs/api/{labelInfo.js → labelInfo.cjs} +1 -1
- package/dist/cjs/api/labelInfo.cjs.map +1 -0
- package/dist/cjs/api/{longRunningTask.js → longRunningTask.cjs} +1 -1
- package/dist/cjs/api/longRunningTask.cjs.map +1 -0
- package/dist/cjs/api/models/{index.js → index.cjs} +2 -2
- package/dist/cjs/api/models/index.cjs.map +1 -0
- package/dist/cjs/api/models/{labeledContentType.js → labeledContentType.cjs} +1 -1
- package/dist/cjs/api/models/labeledContentType.cjs.map +1 -0
- package/dist/cjs/api/parameters/index.cjs +3 -0
- package/dist/cjs/api/parameters/index.cjs.map +1 -0
- package/dist/cjs/api/{relation.js → relation.cjs} +1 -1
- package/dist/cjs/api/relation.cjs.map +1 -0
- package/dist/cjs/api/{search.js → search.cjs} +1 -1
- package/dist/cjs/api/search.cjs.map +1 -0
- package/dist/cjs/api/{settings.js → settings.cjs} +1 -1
- package/dist/cjs/api/settings.cjs.map +1 -0
- package/dist/cjs/api/{space.js → space.cjs} +2 -2
- package/dist/cjs/api/space.cjs.map +1 -0
- package/dist/cjs/api/{spacePermissions.js → spacePermissions.cjs} +1 -1
- package/dist/cjs/api/spacePermissions.cjs.map +1 -0
- package/dist/cjs/api/{spaceProperties.js → spaceProperties.cjs} +1 -1
- package/dist/cjs/api/spaceProperties.cjs.map +1 -0
- package/dist/cjs/api/{spaceSettings.js → spaceSettings.cjs} +1 -1
- package/dist/cjs/api/spaceSettings.cjs.map +1 -0
- package/dist/cjs/api/{template.js → template.cjs} +1 -1
- package/dist/cjs/api/template.cjs.map +1 -0
- package/dist/cjs/api/{themes.js → themes.cjs} +1 -1
- package/dist/cjs/api/themes.cjs.map +1 -0
- package/dist/cjs/api/{users.js → users.cjs} +1 -1
- package/dist/cjs/api/users.cjs.map +1 -0
- package/dist/cjs/clients/{baseClient.js → baseClient.cjs} +13 -4
- package/dist/cjs/clients/baseClient.cjs.map +1 -0
- package/dist/cjs/clients/{confluenceClient.js → confluenceClient.cjs} +33 -33
- package/dist/cjs/clients/confluenceClient.cjs.map +1 -0
- package/dist/cjs/{config.js → config.cjs} +1 -1
- package/dist/cjs/config.cjs.map +1 -0
- package/dist/cjs/{index.js → index.cjs} +8 -8
- package/dist/cjs/index.cjs.map +1 -0
- package/dist/cjs/{paramSerializer.js → paramSerializer.cjs} +1 -1
- package/dist/cjs/paramSerializer.cjs.map +1 -0
- package/dist/cjs/services/authenticationService/{authenticationService.js → authenticationService.cjs} +4 -4
- package/dist/cjs/services/authenticationService/authenticationService.cjs.map +1 -0
- package/dist/cjs/services/authenticationService/authentications/{createBasicAuthenticationToken.js → createBasicAuthenticationToken.cjs} +2 -2
- package/dist/cjs/services/authenticationService/authentications/createBasicAuthenticationToken.cjs.map +1 -0
- package/dist/cjs/services/authenticationService/authentications/{createJWTAuthentication.js → createJWTAuthentication.cjs} +1 -1
- package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs.map +1 -0
- package/dist/cjs/services/authenticationService/authentications/{createOAuth2AuthenticationToken.js → createOAuth2AuthenticationToken.cjs} +1 -1
- package/dist/cjs/services/authenticationService/authentications/createOAuth2AuthenticationToken.cjs.map +1 -0
- package/dist/cjs/services/authenticationService/{base64Encoder.js → base64Encoder.cjs} +1 -1
- package/dist/cjs/services/authenticationService/base64Encoder.cjs.map +1 -0
- package/dist/esm/api/{analytics.js → analytics.mjs} +1 -1
- package/dist/esm/api/analytics.mjs.map +1 -0
- package/dist/esm/api/{audit.js → audit.mjs} +1 -1
- package/dist/esm/api/audit.mjs.map +1 -0
- package/dist/esm/api/{content.js → content.mjs} +1 -1
- package/dist/esm/api/content.mjs.map +1 -0
- package/dist/esm/api/{contentAttachments.js → contentAttachments.mjs} +1 -1
- package/dist/esm/api/contentAttachments.mjs.map +1 -0
- package/dist/esm/api/{contentBody.js → contentBody.mjs} +1 -1
- package/dist/esm/api/contentBody.mjs.map +1 -0
- package/dist/esm/api/{contentChildrenAndDescendants.js → contentChildrenAndDescendants.mjs} +1 -1
- package/dist/esm/api/contentChildrenAndDescendants.mjs.map +1 -0
- package/dist/esm/api/{contentComments.js → contentComments.mjs} +1 -1
- package/dist/esm/api/contentComments.mjs.map +1 -0
- package/dist/esm/api/{contentLabels.js → contentLabels.mjs} +1 -1
- package/dist/esm/api/contentLabels.mjs.map +1 -0
- package/dist/esm/api/{contentMacroBody.js → contentMacroBody.mjs} +1 -1
- package/dist/esm/api/contentMacroBody.mjs.map +1 -0
- package/dist/esm/api/{contentPermissions.js → contentPermissions.mjs} +1 -1
- package/dist/esm/api/contentPermissions.mjs.map +1 -0
- package/dist/esm/api/{contentProperties.js → contentProperties.mjs} +1 -1
- package/dist/esm/api/contentProperties.mjs.map +1 -0
- package/dist/esm/api/{contentRestrictions.js → contentRestrictions.mjs} +1 -1
- package/dist/esm/api/contentRestrictions.mjs.map +1 -0
- package/dist/esm/api/{contentStates.js → contentStates.mjs} +1 -1
- package/dist/esm/api/contentStates.mjs.map +1 -0
- package/dist/esm/api/{contentVersions.js → contentVersions.mjs} +1 -1
- package/dist/esm/api/contentVersions.mjs.map +1 -0
- package/dist/esm/api/{contentWatches.js → contentWatches.mjs} +1 -1
- package/dist/esm/api/contentWatches.mjs.map +1 -0
- package/dist/esm/api/{dynamicModules.js → dynamicModules.mjs} +1 -1
- package/dist/esm/api/dynamicModules.mjs.map +1 -0
- package/dist/esm/api/{experimental.js → experimental.mjs} +1 -1
- package/dist/esm/api/experimental.mjs.map +1 -0
- package/dist/esm/api/{group.js → group.mjs} +1 -1
- package/dist/esm/api/group.mjs.map +1 -0
- package/dist/esm/api/index.mjs +32 -0
- package/dist/esm/api/index.mjs.map +1 -0
- package/dist/esm/api/{inlineTasks.js → inlineTasks.mjs} +1 -1
- package/dist/esm/api/inlineTasks.mjs.map +1 -0
- package/dist/esm/api/{labelInfo.js → labelInfo.mjs} +1 -1
- package/dist/esm/api/labelInfo.mjs.map +1 -0
- package/dist/esm/api/{longRunningTask.js → longRunningTask.mjs} +1 -1
- package/dist/esm/api/longRunningTask.mjs.map +1 -0
- package/dist/esm/api/models/index.mjs +2 -0
- package/dist/esm/api/models/index.mjs.map +1 -0
- package/dist/esm/api/models/{labeledContentType.js → labeledContentType.mjs} +1 -1
- package/dist/esm/api/models/labeledContentType.mjs.map +1 -0
- package/dist/esm/api/parameters/index.mjs +2 -0
- package/dist/esm/api/parameters/index.mjs.map +1 -0
- package/dist/esm/api/{relation.js → relation.mjs} +1 -1
- package/dist/esm/api/relation.mjs.map +1 -0
- package/dist/esm/api/{search.js → search.mjs} +1 -1
- package/dist/esm/api/search.mjs.map +1 -0
- package/dist/esm/api/{settings.js → settings.mjs} +1 -1
- package/dist/esm/api/settings.mjs.map +1 -0
- package/dist/esm/api/{space.js → space.mjs} +2 -2
- package/dist/esm/api/space.mjs.map +1 -0
- package/dist/esm/api/{spacePermissions.js → spacePermissions.mjs} +1 -1
- package/dist/esm/api/spacePermissions.mjs.map +1 -0
- package/dist/esm/api/{spaceProperties.js → spaceProperties.mjs} +1 -1
- package/dist/esm/api/spaceProperties.mjs.map +1 -0
- package/dist/esm/api/{spaceSettings.js → spaceSettings.mjs} +1 -1
- package/dist/esm/api/spaceSettings.mjs.map +1 -0
- package/dist/esm/api/{template.js → template.mjs} +1 -1
- package/dist/esm/api/template.mjs.map +1 -0
- package/dist/esm/api/{themes.js → themes.mjs} +1 -1
- package/dist/esm/api/themes.mjs.map +1 -0
- package/dist/esm/api/{users.js → users.mjs} +1 -1
- package/dist/esm/api/users.mjs.map +1 -0
- package/dist/esm/clients/{baseClient.js → baseClient.mjs} +13 -4
- package/dist/esm/clients/baseClient.mjs.map +1 -0
- package/dist/esm/clients/confluenceClient.mjs +75 -0
- package/dist/esm/clients/confluenceClient.mjs.map +1 -0
- package/dist/esm/{config.js → config.mjs} +1 -1
- package/dist/esm/config.mjs.map +1 -0
- package/dist/esm/index.mjs +11 -0
- package/dist/esm/index.mjs.map +1 -0
- package/dist/esm/{paramSerializer.js → paramSerializer.mjs} +1 -1
- package/dist/esm/paramSerializer.mjs.map +1 -0
- package/dist/esm/services/authenticationService/{authenticationService.js → authenticationService.mjs} +4 -4
- package/dist/esm/services/authenticationService/authenticationService.mjs.map +1 -0
- package/dist/esm/services/authenticationService/authentications/{createBasicAuthenticationToken.js → createBasicAuthenticationToken.mjs} +2 -2
- package/dist/esm/services/authenticationService/authentications/createBasicAuthenticationToken.mjs.map +1 -0
- package/dist/esm/services/authenticationService/authentications/{createJWTAuthentication.js → createJWTAuthentication.mjs} +1 -1
- package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs.map +1 -0
- package/dist/esm/services/authenticationService/authentications/{createOAuth2AuthenticationToken.js → createOAuth2AuthenticationToken.mjs} +1 -1
- package/dist/esm/services/authenticationService/authentications/createOAuth2AuthenticationToken.mjs.map +1 -0
- package/dist/esm/services/authenticationService/{base64Encoder.js → base64Encoder.mjs} +1 -1
- package/dist/esm/services/authenticationService/base64Encoder.mjs.map +1 -0
- package/package.json +8 -8
- package/rollup.config.ts +2 -0
- package/src/clients/baseClient.ts +10 -1
- package/dist/cjs/api/analytics.js.map +0 -1
- package/dist/cjs/api/audit.js.map +0 -1
- package/dist/cjs/api/content.js.map +0 -1
- package/dist/cjs/api/contentAttachments.js.map +0 -1
- package/dist/cjs/api/contentBody.js.map +0 -1
- package/dist/cjs/api/contentChildrenAndDescendants.js.map +0 -1
- package/dist/cjs/api/contentComments.js.map +0 -1
- package/dist/cjs/api/contentLabels.js.map +0 -1
- package/dist/cjs/api/contentMacroBody.js.map +0 -1
- package/dist/cjs/api/contentPermissions.js.map +0 -1
- package/dist/cjs/api/contentProperties.js.map +0 -1
- package/dist/cjs/api/contentRestrictions.js.map +0 -1
- package/dist/cjs/api/contentStates.js.map +0 -1
- package/dist/cjs/api/contentVersions.js.map +0 -1
- package/dist/cjs/api/contentWatches.js.map +0 -1
- package/dist/cjs/api/dynamicModules.js.map +0 -1
- package/dist/cjs/api/experimental.js.map +0 -1
- package/dist/cjs/api/group.js.map +0 -1
- package/dist/cjs/api/index.js.map +0 -1
- package/dist/cjs/api/inlineTasks.js.map +0 -1
- package/dist/cjs/api/labelInfo.js.map +0 -1
- package/dist/cjs/api/longRunningTask.js.map +0 -1
- package/dist/cjs/api/models/index.js.map +0 -1
- package/dist/cjs/api/models/labeledContentType.js.map +0 -1
- package/dist/cjs/api/parameters/index.js +0 -3
- package/dist/cjs/api/parameters/index.js.map +0 -1
- package/dist/cjs/api/relation.js.map +0 -1
- package/dist/cjs/api/search.js.map +0 -1
- package/dist/cjs/api/settings.js.map +0 -1
- package/dist/cjs/api/space.js.map +0 -1
- package/dist/cjs/api/spacePermissions.js.map +0 -1
- package/dist/cjs/api/spaceProperties.js.map +0 -1
- package/dist/cjs/api/spaceSettings.js.map +0 -1
- package/dist/cjs/api/template.js.map +0 -1
- package/dist/cjs/api/themes.js.map +0 -1
- package/dist/cjs/api/users.js.map +0 -1
- package/dist/cjs/clients/baseClient.js.map +0 -1
- package/dist/cjs/clients/confluenceClient.js.map +0 -1
- package/dist/cjs/config.js.map +0 -1
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/paramSerializer.js.map +0 -1
- package/dist/cjs/services/authenticationService/authenticationService.js.map +0 -1
- package/dist/cjs/services/authenticationService/authentications/createBasicAuthenticationToken.js.map +0 -1
- package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.js.map +0 -1
- package/dist/cjs/services/authenticationService/authentications/createOAuth2AuthenticationToken.js.map +0 -1
- package/dist/cjs/services/authenticationService/base64Encoder.js.map +0 -1
- package/dist/esm/api/analytics.js.map +0 -1
- package/dist/esm/api/audit.js.map +0 -1
- package/dist/esm/api/content.js.map +0 -1
- package/dist/esm/api/contentAttachments.js.map +0 -1
- package/dist/esm/api/contentBody.js.map +0 -1
- package/dist/esm/api/contentChildrenAndDescendants.js.map +0 -1
- package/dist/esm/api/contentComments.js.map +0 -1
- package/dist/esm/api/contentLabels.js.map +0 -1
- package/dist/esm/api/contentMacroBody.js.map +0 -1
- package/dist/esm/api/contentPermissions.js.map +0 -1
- package/dist/esm/api/contentProperties.js.map +0 -1
- package/dist/esm/api/contentRestrictions.js.map +0 -1
- package/dist/esm/api/contentStates.js.map +0 -1
- package/dist/esm/api/contentVersions.js.map +0 -1
- package/dist/esm/api/contentWatches.js.map +0 -1
- package/dist/esm/api/dynamicModules.js.map +0 -1
- package/dist/esm/api/experimental.js.map +0 -1
- package/dist/esm/api/group.js.map +0 -1
- package/dist/esm/api/index.js +0 -32
- package/dist/esm/api/index.js.map +0 -1
- package/dist/esm/api/inlineTasks.js.map +0 -1
- package/dist/esm/api/labelInfo.js.map +0 -1
- package/dist/esm/api/longRunningTask.js.map +0 -1
- package/dist/esm/api/models/index.js +0 -2
- package/dist/esm/api/models/index.js.map +0 -1
- package/dist/esm/api/models/labeledContentType.js.map +0 -1
- package/dist/esm/api/parameters/index.js +0 -2
- package/dist/esm/api/parameters/index.js.map +0 -1
- package/dist/esm/api/relation.js.map +0 -1
- package/dist/esm/api/search.js.map +0 -1
- package/dist/esm/api/settings.js.map +0 -1
- package/dist/esm/api/space.js.map +0 -1
- package/dist/esm/api/spacePermissions.js.map +0 -1
- package/dist/esm/api/spaceProperties.js.map +0 -1
- package/dist/esm/api/spaceSettings.js.map +0 -1
- package/dist/esm/api/template.js.map +0 -1
- package/dist/esm/api/themes.js.map +0 -1
- package/dist/esm/api/users.js.map +0 -1
- package/dist/esm/clients/baseClient.js.map +0 -1
- package/dist/esm/clients/confluenceClient.js +0 -75
- package/dist/esm/clients/confluenceClient.js.map +0 -1
- package/dist/esm/config.js.map +0 -1
- package/dist/esm/index.js +0 -11
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/paramSerializer.js.map +0 -1
- package/dist/esm/services/authenticationService/authenticationService.js.map +0 -1
- package/dist/esm/services/authenticationService/authentications/createBasicAuthenticationToken.js.map +0 -1
- package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.js.map +0 -1
- package/dist/esm/services/authenticationService/authentications/createOAuth2AuthenticationToken.js.map +0 -1
- package/dist/esm/services/authenticationService/base64Encoder.js.map +0 -1
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spacePermissions.js","sources":["../../../../src/api/spacePermissions.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class SpacePermissions {\n constructor(private client: Client) {}\n\n /**\n * Adds new permission to space.\n *\n * If the permission to be added is a group permission, the group can be identified by its group name or group id.\n *\n * Note: Apps cannot access this REST resource - including when utilizing user impersonation.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async addPermissionToSpace<T = Models.SpacePermissionV2>(\n parameters: Parameters.AddPermissionToSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds new permission to space.\n *\n * If the permission to be added is a group permission, the group can be identified by its group name or group id.\n *\n * Note: Apps cannot access this REST resource - including when utilizing user impersonation.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async addPermissionToSpace<T = Models.SpacePermissionV2>(\n parameters: Parameters.AddPermissionToSpace,\n callback?: never,\n ): Promise<T>;\n async addPermissionToSpace<T = Models.SpacePermissionV2>(\n parameters: Parameters.AddPermissionToSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/permission`,\n method: 'POST',\n data: {\n subject: parameters.subject,\n operation: parameters.operation,\n _links: parameters.links,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds new custom content permission to space.\n *\n * If the permission to be added is a group permission, the group can be identified by its group name or group id.\n *\n * Note: Only apps can access this REST resource and only make changes to the respective app permissions.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async addCustomContentPermissions<T = unknown>(\n parameters: Parameters.AddCustomContentPermissions,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds new custom content permission to space.\n *\n * If the permission to be added is a group permission, the group can be identified by its group name or group id.\n *\n * Note: Only apps can access this REST resource and only make changes to the respective app permissions.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async addCustomContentPermissions<T = unknown>(\n parameters: Parameters.AddCustomContentPermissions,\n callback?: never,\n ): Promise<T>;\n async addCustomContentPermissions<T = unknown>(\n parameters: Parameters.AddCustomContentPermissions,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/permission/custom-content`,\n method: 'POST',\n data: {\n subject: parameters.subject,\n operations: parameters.operations,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a space permission. Note that removing Read Space permission for a user or group will remove all the space\n * permissions for that user or group.\n *\n * Note: Apps cannot access this REST resource - including when utilizing user impersonation.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async removePermission<T = void>(parameters: Parameters.RemovePermission, callback: Callback<T>): Promise<void>;\n /**\n * Removes a space permission. Note that removing Read Space permission for a user or group will remove all the space\n * permissions for that user or group.\n *\n * Note: Apps cannot access this REST resource - including when utilizing user impersonation.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async removePermission<T = void>(parameters: Parameters.RemovePermission, callback?: never): Promise<T>;\n async removePermission<T = void>(parameters: Parameters.RemovePermission, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/permission/${parameters.id}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;MAMa,gBAAgB,CAAA;AACP,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AA4B1B,IAAA,MAAM,oBAAoB,CACxB,UAA2C,EAC3C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAa,WAAA,CAAA;AACnD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,MAAM,EAAE,UAAU,CAAC,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AA6BlD,IAAA,MAAM,2BAA2B,CAC/B,UAAkD,EAClD,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAA4B,0BAAA,CAAA;AAClE,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,UAAU,EAAE,UAAU,CAAC,UAAU;AAClC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAqBlD,IAAA,MAAM,gBAAgB,CAAW,UAAuC,EAAE,QAAsB,EAAA;AAC9F,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,cAAc,UAAU,CAAC,QAAQ,CAAe,YAAA,EAAA,UAAU,CAAC,EAAE,CAAE,CAAA;AACpE,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spaceProperties.js","sources":["../../../../src/api/spaceProperties.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class SpaceProperties {\n constructor(private client: Client) {}\n\n /**\n * Returns all properties for the given space. Space properties are a key-value storage associated with a space.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n */\n async getSpaceProperties<T = Models.SpacePropertyArray>(\n parameters: Parameters.GetSpaceProperties,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all properties for the given space. Space properties are a key-value storage associated with a space.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n */\n async getSpaceProperties<T = Models.SpacePropertyArray>(\n parameters: Parameters.GetSpaceProperties,\n callback?: never,\n ): Promise<T>;\n async getSpaceProperties<T = Models.SpacePropertyArray>(\n parameters: Parameters.GetSpaceProperties,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/property`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a new space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async createSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpaceProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async createSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpaceProperty,\n callback?: never,\n ): Promise<T>;\n async createSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpaceProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/property`,\n method: 'POST',\n data: {\n key: parameters.key,\n value: parameters.value,\n space: parameters.space,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n */\n async getSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.GetSpaceProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n */\n async getSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.GetSpaceProperty,\n callback?: never,\n ): Promise<T>;\n async getSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.GetSpaceProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a new space property. This is the same as `POST /api/space/{spaceKey}/property` but the key for the\n * property is passed as a path parameter, rather than in the request body.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async createSpacePropertyForKey<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpacePropertyForKey,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new space property. This is the same as `POST /api/space/{spaceKey}/property` but the key for the\n * property is passed as a path parameter, rather than in the request body.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async createSpacePropertyForKey<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpacePropertyForKey,\n callback?: never,\n ): Promise<T>;\n async createSpacePropertyForKey<T = Models.SpaceProperty>(\n parameters: Parameters.CreateSpacePropertyForKey,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`,\n method: 'POST',\n data: {\n value: parameters.value,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates a space property. Note, you cannot update the key of a space property, only the value.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async updateSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.UpdateSpaceProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates a space property. Note, you cannot update the key of a space property, only the value.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async updateSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.UpdateSpaceProperty,\n callback?: never,\n ): Promise<T>;\n async updateSpaceProperty<T = Models.SpaceProperty>(\n parameters: Parameters.UpdateSpaceProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`,\n method: 'PUT',\n data: {\n value: parameters.value,\n version: parameters.version,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Deletes a space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async deleteSpaceProperty<T = void>(parameters: Parameters.DeleteSpaceProperty, callback: Callback<T>): Promise<void>;\n /**\n * Deletes a space property.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘Admin’ permission for the space.\n */\n async deleteSpaceProperty<T = void>(parameters: Parameters.DeleteSpaceProperty, callback?: never): Promise<T>;\n async deleteSpaceProperty<T = void>(\n parameters: Parameters.DeleteSpaceProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/property/${parameters.key}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;MAMa,eAAe,CAAA;AACN,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAoB1B,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAW,SAAA,CAAA;AACjD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAqBlD,IAAA,MAAM,mBAAmB,CACvB,UAA0C,EAC1C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAW,SAAA,CAAA;AACjD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;A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AelD,IAAA,MAAM,mBAAmB,CACvB,UAA0C,EAC1C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,cAAc,UAAU,CAAC,QAAQ,CAAa,UAAA,EAAA,UAAU,CAAC,GAAG,CAAE,CAAA;AACnE,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"spaceSettings.js","sources":["../../../../src/api/spaceSettings.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class SpaceSettings {\n constructor(private client: Client) {}\n\n /**\n * Returns the settings of a space. Currently only the `routeOverrideEnabled` setting can be returned.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.GetSpaceSettings,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the settings of a space. Currently only the `routeOverrideEnabled` setting can be returned.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.GetSpaceSettings,\n callback?: never,\n ): Promise<T>;\n async getSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.GetSpaceSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/settings`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates the settings for a space. Currently only the `routeOverrideEnabled` setting can be updated.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.UpdateSpaceSettings,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates the settings for a space. Currently only the `routeOverrideEnabled` setting can be updated.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async updateSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.UpdateSpaceSettings,\n callback?: never,\n ): Promise<T>;\n async updateSpaceSettings<T = Models.SpaceSettings>(\n parameters: Parameters.UpdateSpaceSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/settings`,\n method: 'PUT',\n data: {\n routeOverrideEnabled: parameters.routeOverrideEnabled,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;MAMa,aAAa,CAAA;AACJ,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAoB1B,IAAA,MAAM,gBAAgB,CACpB,UAAuC,EACvC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAW,SAAA,CAAA;AACjD,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAqBlD,IAAA,MAAM,mBAAmB,CACvB,UAA0C,EAC1C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAW,SAAA,CAAA;AACjD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE;gBACJ,oBAAoB,EAAE,UAAU,CAAC,oBAAoB;AACtD,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"template.js","sources":["../../../../src/api/template.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class Template {\n constructor(private client: Client) {}\n\n /**\n * Creates a new content template. Note, blueprint templates cannot be created via the REST API.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to create a\n * space template or 'Confluence Administrator' global permission to create a global template.\n */\n async createContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.CreateContentTemplate | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new content template. Note, blueprint templates cannot be created via the REST API.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to create a\n * space template or 'Confluence Administrator' global permission to create a global template.\n */\n async createContentTemplate<T = Models.ContentTemplate>(\n parameters?: Parameters.CreateContentTemplate,\n callback?: never,\n ): Promise<T>;\n async createContentTemplate<T = Models.ContentTemplate>(\n parameters?: Parameters.CreateContentTemplate,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/template',\n method: 'POST',\n data: {\n name: parameters?.name,\n templateType: parameters?.templateType,\n body: parameters?.body,\n description: parameters?.description,\n labels: parameters?.labels,\n space: parameters?.space,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates a content template. Note, blueprint templates cannot be updated via the REST API.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to update a\n * space template or 'Confluence Administrator' global permission to update a global template.\n */\n async updateContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.UpdateContentTemplate | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates a content template. Note, blueprint templates cannot be updated via the REST API.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to update a\n * space template or 'Confluence Administrator' global permission to update a global template.\n */\n async updateContentTemplate<T = Models.ContentTemplate>(\n parameters?: Parameters.UpdateContentTemplate,\n callback?: never,\n ): Promise<T>;\n async updateContentTemplate<T = Models.ContentTemplate>(\n parameters?: Parameters.UpdateContentTemplate,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/template',\n method: 'PUT',\n data: {\n templateId: parameters?.templateId,\n name: parameters?.name,\n templateType: parameters?.templateType,\n body: parameters?.body,\n description: parameters?.description,\n labels: parameters?.labels,\n space: parameters?.space,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all templates provided by blueprints. Use this method to retrieve all global blueprint templates or all\n * blueprint templates in a space.\n *\n * Note, all global blueprints are inherited by each space. Space blueprints can be customised without affecting the\n * global blueprints.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * blueprints for the space and permission to access the Confluence site ('Can use' global permission) to view global\n * blueprints.\n */\n async getBlueprintTemplates<T = Models.BlueprintTemplateArray>(\n parameters: Parameters.GetBlueprintTemplates | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all templates provided by blueprints. Use this method to retrieve all global blueprint templates or all\n * blueprint templates in a space.\n *\n * Note, all global blueprints are inherited by each space. Space blueprints can be customised without affecting the\n * global blueprints.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * blueprints for the space and permission to access the Confluence site ('Can use' global permission) to view global\n * blueprints.\n */\n async getBlueprintTemplates<T = Models.BlueprintTemplateArray>(\n parameters?: Parameters.GetBlueprintTemplates,\n callback?: never,\n ): Promise<T>;\n async getBlueprintTemplates<T = Models.BlueprintTemplateArray>(\n parameters?: Parameters.GetBlueprintTemplates,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/template/blueprint',\n method: 'GET',\n params: {\n spaceKey: parameters?.spaceKey,\n start: parameters?.start,\n limit: parameters?.limit,\n expand: parameters?.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all content templates. Use this method to retrieve all global content templates or all content templates in\n * a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * space templates and permission to access the Confluence site ('Can use' global permission) to view global\n * templates.\n */\n async getContentTemplates<T = Models.ContentTemplateArray>(\n parameters: Parameters.GetContentTemplates | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all content templates. Use this method to retrieve all global content templates or all content templates in\n * a space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * space templates and permission to access the Confluence site ('Can use' global permission) to view global\n * templates.\n */\n async getContentTemplates<T = Models.ContentTemplateArray>(\n parameters?: Parameters.GetContentTemplates,\n callback?: never,\n ): Promise<T>;\n async getContentTemplates<T = Models.ContentTemplateArray>(\n parameters?: Parameters.GetContentTemplates,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/template/page',\n method: 'GET',\n params: {\n spaceKey: parameters?.spaceKey,\n start: parameters?.start,\n limit: parameters?.limit,\n expand: parameters?.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a content template. This includes information about template, like the name, the space or blueprint that\n * the template is in, the body of the template, and more.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * space templates and permission to access the Confluence site ('Can use' global permission) to view global\n * templates.\n */\n async getContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.GetContentTemplate,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a content template. This includes information about template, like the name, the space or blueprint that\n * the template is in, the body of the template, and more.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space to view\n * space templates and permission to access the Confluence site ('Can use' global permission) to view global\n * templates.\n */\n async getContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.GetContentTemplate,\n callback?: never,\n ): Promise<T>;\n async getContentTemplate<T = Models.ContentTemplate>(\n parameters: Parameters.GetContentTemplate,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/template/${parameters.contentTemplateId}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Deletes a template. This results in different actions depending on the type of template:\n *\n * - If the template is a content template, it is deleted.\n * - If the template is a modified space-level blueprint template, it reverts to the template inherited from the\n * global-level blueprint template.\n * - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint\n * template.\n *\n * Note, unmodified blueprint templates cannot be deleted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to delete a\n * space template or 'Confluence Administrator' global permission to delete a global template.\n */\n async removeTemplate<T = void>(parameters: Parameters.RemoveTemplate, callback: Callback<T>): Promise<void>;\n /**\n * Deletes a template. This results in different actions depending on the type of template:\n *\n * - If the template is a content template, it is deleted.\n * - If the template is a modified space-level blueprint template, it reverts to the template inherited from the\n * global-level blueprint template.\n * - If the template is a modified global-level blueprint template, it reverts to the default global-level blueprint\n * template.\n *\n * Note, unmodified blueprint templates cannot be deleted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space to delete a\n * space template or 'Confluence Administrator' global permission to delete a global template.\n */\n async removeTemplate<T = void>(parameters: Parameters.RemoveTemplate, callback?: never): Promise<T>;\n async removeTemplate<T = void>(parameters: Parameters.RemoveTemplate, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/template/${parameters.contentTemplateId}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;MAMa,QAAQ,CAAA;AACC,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAA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;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"themes.js","sources":["../../../../src/api/themes.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class Themes {\n constructor(private client: Client) {}\n\n /**\n * Returns all themes, not including the default theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getThemes<T = Models.ThemeArray>(\n parameters: Parameters.GetThemes | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all themes, not including the default theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getThemes<T = Models.ThemeArray>(parameters?: Parameters.GetThemes, callback?: never): Promise<T>;\n async getThemes<T = Models.ThemeArray>(parameters?: Parameters.GetThemes, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/theme',\n method: 'GET',\n params: {\n start: parameters?.start,\n limit: parameters?.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the globally assigned theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getGlobalTheme<T = Models.Theme>(callback: Callback<T>): Promise<void>;\n /**\n * Returns the globally assigned theme.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getGlobalTheme<T = Models.Theme>(callback?: never): Promise<T>;\n async getGlobalTheme<T = Models.Theme>(callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/settings/theme/selected',\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a theme. This includes information about the theme name, description, and icon.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getTheme<T = Models.Theme>(parameters: Parameters.GetTheme, callback: Callback<T>): Promise<void>;\n /**\n * Returns a theme. This includes information about the theme name, description, and icon.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: None\n */\n async getTheme<T = Models.Theme>(parameters: Parameters.GetTheme, callback?: never): Promise<T>;\n async getTheme<T = Models.Theme>(parameters: Parameters.GetTheme, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/settings/theme/${parameters.themeKey}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the theme selected for a space, if one is set. If no space theme is set, this means that the space is\n * inheriting the global look and feel settings.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n */\n async getSpaceTheme<T = Models.Theme>(parameters: Parameters.GetSpaceTheme, callback: Callback<T>): Promise<void>;\n /**\n * Returns the theme selected for a space, if one is set. If no space theme is set, this means that the space is\n * inheriting the global look and feel settings.\n *\n * **[Permissions required](https://confluence.atlassian.com/x/_AozKw)**: ‘View’ permission for the space.\n */\n async getSpaceTheme<T = Models.Theme>(parameters: Parameters.GetSpaceTheme, callback?: never): Promise<T>;\n async getSpaceTheme<T = Models.Theme>(\n parameters: Parameters.GetSpaceTheme,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/theme`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Sets the theme for a space. Note, if you want to reset the space theme to the default Confluence theme, use the\n * 'Reset space theme' method instead of this method.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async setSpaceTheme<T = Models.Theme>(parameters: Parameters.SetSpaceTheme, callback: Callback<T>): Promise<void>;\n /**\n * Sets the theme for a space. Note, if you want to reset the space theme to the default Confluence theme, use the\n * 'Reset space theme' method instead of this method.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async setSpaceTheme<T = Models.Theme>(parameters: Parameters.SetSpaceTheme, callback?: never): Promise<T>;\n async setSpaceTheme<T = Models.Theme>(\n parameters: Parameters.SetSpaceTheme,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/theme`,\n method: 'PUT',\n data: {\n themeKey: parameters.themeKey,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Resets the space theme. This means that the space will inherit the global look and feel settings\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async resetSpaceTheme<T = void>(parameters: Parameters.ResetSpaceTheme, callback: Callback<T>): Promise<void>;\n /**\n * Resets the space theme. This means that the space will inherit the global look and feel settings\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async resetSpaceTheme<T = void>(parameters: Parameters.ResetSpaceTheme, callback?: never): Promise<T>;\n async resetSpaceTheme<T = void>(parameters: Parameters.ResetSpaceTheme, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/theme`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;MAMa,MAAM,CAAA;AACG,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAiB1B,IAAA,MAAM,SAAS,CAAwB,UAAiC,EAAE,QAAsB,EAAA;AAC9F,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,qBAAqB;AAC1B,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,KAAK,EAAE,UAAU,EAAE,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;IAelD,MAAM,cAAc,CAAmB,QAAsB,EAAA;AAC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QAAQ,CAAQ,MAAA,CAAA;AAC9C,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"users.js","sources":["../../../../src/api/users.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class Users {\n constructor(private client: Client) {}\n\n /**\n * Returns a user. This includes information about the user, such as the display name, account ID, profile picture,\n * and more. The information returned may be restricted by the user's profile visibility settings.\n *\n * **Note:** to add, edit, or delete users in your organization, see the [user management REST\n * API](/cloud/admin/user-management/about/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getUser<T = Models.User>(parameters: Parameters.GetUser, callback: Callback<T>): Promise<void>;\n /**\n * Returns a user. This includes information about the user, such as the display name, account ID, profile picture,\n * and more. The information returned may be restricted by the user's profile visibility settings.\n *\n * **Note:** to add, edit, or delete users in your organization, see the [user management REST\n * API](/cloud/admin/user-management/about/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getUser<T = Models.User>(parameters: Parameters.GetUser, callback?: never): Promise<T>;\n async getUser<T = Models.User>(parameters: Parameters.GetUser, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user',\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns information about how anonymous users are represented, like the profile picture and display name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getAnonymousUser<T = Models.UserAnonymous>(\n parameters: Parameters.GetAnonymousUser | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns information about how anonymous users are represented, like the profile picture and display name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getAnonymousUser<T = Models.UserAnonymous>(\n parameters?: Parameters.GetAnonymousUser,\n callback?: never,\n ): Promise<T>;\n async getAnonymousUser<T = Models.UserAnonymous>(\n parameters?: Parameters.GetAnonymousUser,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/anonymous',\n method: 'GET',\n params: {\n expand: parameters?.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the currently logged-in user. This includes information about the user, like the display name, userKey,\n * account ID, profile picture, and more.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getCurrentUser<T = Models.User>(\n parameters: Parameters.GetCurrentUser | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the currently logged-in user. This includes information about the user, like the display name, userKey,\n * account ID, profile picture, and more.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getCurrentUser<T = Models.User>(parameters?: Parameters.GetCurrentUser, callback?: never): Promise<T>;\n async getCurrentUser<T = Models.User>(\n parameters?: Parameters.GetCurrentUser,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/current',\n method: 'GET',\n params: {\n expand: parameters?.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the groups that a user is a member of.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.GetGroupMembershipsForUser,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the groups that a user is a member of.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.GetGroupMembershipsForUser,\n callback?: never,\n ): Promise<T>;\n async getGroupMembershipsForUser<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.GetGroupMembershipsForUser,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/memberof',\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns user details for the ids provided in request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getBulkUserLookup<T = Models.BulkUserLookupArray>(\n parameters: Parameters.GetBulkUserLookup,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns user details for the ids provided in request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getBulkUserLookup<T = Models.BulkUserLookupArray>(\n parameters: Parameters.GetBulkUserLookup,\n callback?: never,\n ): Promise<T>;\n async getBulkUserLookup<T = Models.BulkUserLookupArray>(\n parameters: Parameters.GetBulkUserLookup,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/bulk',\n method: 'GET',\n params: {\n accountId: parameters.accountId,\n expand: parameters.expand,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these\n * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getPrivacyUnsafeUserEmail<T = Models.AccountIdEmailRecord>(\n parameters: Parameters.GetPrivacyUnsafeUserEmail,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a user's email address. This API is only available to apps approved by Atlassian, according to these\n * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getPrivacyUnsafeUserEmail<T = Models.AccountIdEmailRecord>(\n parameters: Parameters.GetPrivacyUnsafeUserEmail,\n callback?: never,\n ): Promise<T>;\n async getPrivacyUnsafeUserEmail<T = Models.AccountIdEmailRecord>(\n parameters: Parameters.GetPrivacyUnsafeUserEmail,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/email',\n method: 'GET',\n params: {\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns user email addresses for a set of accountIds. This API is only available to apps approved by Atlassian,\n * according to these\n * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).\n *\n * Any accounts which are not available will not be included in the result.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getPrivacyUnsafeUserEmailBulk<T = Models.AccountIdEmailRecordArray>(\n parameters: Parameters.GetPrivacyUnsafeUserEmailBulk,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns user email addresses for a set of accountIds. This API is only available to apps approved by Atlassian,\n * according to these\n * [guidelines](https://community.developer.atlassian.com/t/guidelines-for-requesting-access-to-email-address/27603).\n *\n * Any accounts which are not available will not be included in the result.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getPrivacyUnsafeUserEmailBulk<T = Models.AccountIdEmailRecordArray>(\n parameters: Parameters.GetPrivacyUnsafeUserEmailBulk,\n callback?: never,\n ): Promise<T>;\n async getPrivacyUnsafeUserEmailBulk<T = Models.AccountIdEmailRecordArray>(\n parameters: Parameters.GetPrivacyUnsafeUserEmailBulk,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/email/bulk',\n method: 'GET',\n params: {\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and\n * username parameters can be specified.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission\n * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).\n */\n async getBulkUserMigration<T = Models.MigratedUserArray>(\n parameters: Parameters.GetBulkUserMigration,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the accountIds for the users specified in the key or username parameters. Note that multiple key and\n * username parameters can be specified.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global permission\n * if specifying a user, otherwise permission to access the Confluence site ('Can use' global permission).\n */\n async getBulkUserMigration<T = Models.MigratedUserArray>(\n parameters: Parameters.GetBulkUserMigration,\n callback?: never,\n ): Promise<T>;\n async getBulkUserMigration<T = Models.MigratedUserArray>(\n parameters: Parameters.GetBulkUserMigration,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/user/bulk/migration',\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;MAMa,KAAK,CAAA;AACI,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAwB1B,IAAA,MAAM,OAAO,CAAkB,UAA8B,EAAE,QAAsB,EAAA;AACnF,QAAA,MA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AC3C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,0BAA0B;AAC/B,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"baseClient.js","sources":["../../../../src/clients/baseClient.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-explicit-any,@typescript-eslint/no-unnecessary-condition */\nimport type { AxiosInstance } from 'axios';\nimport axios from 'axios';\nimport { getAuthenticationToken } from '~/services';\nimport type { Callback } from '~/callback';\nimport type { Client } from './client';\nimport {\n ConfigSchema,\n type Config,\n type Error as ConfluenceError,\n} from '~/config';\nimport type { RequestConfig } from '~/requestConfig';\n\nconst ATLASSIAN_TOKEN_CHECK_FLAG = 'X-Atlassian-Token';\nconst ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE = 'no-check';\n\nexport class BaseClient implements Client {\n #instance: AxiosInstance | undefined;\n\n constructor(protected readonly config: Config) {\n this.config.apiPrefix = this.config.apiPrefix || '/wiki/rest/';\n\n this.config = ConfigSchema.parse(this.config);\n }\n\n protected paramSerializer(parameters: Record<string, any>): string {\n const parts: string[] = [];\n\n Object.entries(parameters).forEach(([key, value]) => {\n if (value === null || typeof value === 'undefined') {\n return;\n }\n\n if (Array.isArray(value)) {\n value = value.join(',');\n }\n\n if (value instanceof Date) {\n value = value.toISOString();\n } else if (value !== null && typeof value === 'object') {\n value = JSON.stringify(value);\n } else if (value instanceof Function) {\n const part = value();\n\n return part && parts.push(part);\n }\n\n parts.push(`${this.encode(key)}=${this.encode(value)}`);\n });\n\n return parts.join('&');\n }\n\n protected encode(value: string) {\n return encodeURIComponent(value)\n .replace(/%3A/gi, ':')\n .replace(/%24/g, '$')\n .replace(/%2C/gi, ',')\n .replace(/%20/g, '+')\n .replace(/%5B/gi, '[')\n .replace(/%5D/gi, ']');\n }\n\n protected removeUndefinedProperties(obj: Record<string, any>): Record<string, any> {\n return Object.entries(obj)\n .filter(([, value]) => typeof value !== 'undefined')\n .reduce((accumulator, [key, value]) => ({ ...accumulator, [key]: value }), {});\n }\n\n private get instance() {\n if (this.#instance) {\n return this.#instance;\n }\n\n this.#instance = axios.create({\n paramsSerializer: this.paramSerializer.bind(this),\n ...this.config.baseRequestConfig,\n baseURL: `${this.config.host}${this.config.apiPrefix}`,\n headers: this.removeUndefinedProperties({\n [ATLASSIAN_TOKEN_CHECK_FLAG]: this.config.noCheckAtlassianToken\n ? ATLASSIAN_TOKEN_CHECK_NOCHECK_VALUE\n : undefined,\n ...this.config.baseRequestConfig?.headers,\n }),\n });\n\n return this.#instance;\n }\n\n async sendRequest<T>(requestConfig: RequestConfig, callback: never): Promise<T>;\n async sendRequest<T>(requestConfig: RequestConfig, callback: Callback<T>): Promise<void>;\n async sendRequest<T>(requestConfig: RequestConfig, callback: Callback<T> | never): Promise<void | T> {\n try {\n const modifiedRequestConfig = {\n ...requestConfig,\n headers: this.removeUndefinedProperties({\n Authorization: await getAuthenticationToken(this.config.authentication, {\n baseURL: this.config.host,\n url: this.instance.getUri(requestConfig),\n method: requestConfig.method!,\n }),\n ...requestConfig.headers,\n }),\n };\n\n const response = await this.instance.request<T>(modifiedRequestConfig);\n\n const callbackResponseHandler = callback && ((data: T): void => callback(null, data));\n const defaultResponseHandler = (data: T): T => data;\n\n const responseHandler = callbackResponseHandler ?? defaultResponseHandler;\n\n this.config.middlewares?.onResponse?.(response.data);\n\n return responseHandler(response.data);\n } catch (e: any) {\n const err = e.isAxiosError ? e.response.data : e;\n\n const callbackErrorHandler = callback && ((error: ConfluenceError) => callback(error));\n const defaultErrorHandler = (error: Error) => {\n throw error;\n };\n\n const errorHandler = callbackErrorHandler ?? defaultErrorHandler;\n\n this.config.middlewares?.onError?.(err);\n\n return errorHandler(err);\n }\n }\n}\n"],"names":["config","ConfigSchema","getAuthenticationToken"],"mappings":";;;;;;AAaA,MAAM,0BAA0B,GAAG,mBAAmB;AACtD,MAAM,mCAAmC,GAAG,UAAU;MAEzC,UAAU,CAAA;AAGU,IAAA,MAAA;AAF/B,IAAA,SAAS;AAET,IAAA,WAAA,CAA+BA,QAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAANA,QAAM;AACnC,QAAA,IAAI,CAAC,MAAM,CAAC,SAAS,GAAG,IAAI,CAAC,MAAM,CAAC,SAAS,IAAI,aAAa;QAE9D,IAAI,CAAC,MAAM,GAAGC,mBAAY,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC;;AAGrC,IAAA,eAAe,CAAC,UAA+B,EAAA;QACvD,MAAM,KAAK,GAAa,EAAE;AAE1B,QAAA,MAAM,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,KAAI;YAClD,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,WAAW,EAAE;gBAClD;;AAGF,YAAA,IAAI,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE;AACxB,gBAAA,KAAK,GAAG,KAAK,CAAC,IAAI,CAAC,GAAG,CAAC;;AAGzB,YAAA,IAAI,KAAK,YAAY,IAAI,EAAE;AACzB,gBAAA,KAAK,GAAG,KAAK,CAAC,WAAW,EAAE;;iBACtB,IAAI,KAAK,KAAK,IAAI,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE;AACtD,gBAAA,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC;;AACxB,iBAAA,IAAI,KAAK,YAAY,QAAQ,EAAE;AACpC,g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AC,WAAW,EAAE,UAAU,GAAG,QAAQ,CAAC,IAAI,CAAC;AAEpD,YAAA,OAAO,eAAe,CAAC,QAAQ,CAAC,IAAI,CAAC;;QACrC,OAAO,CAAM,EAAE;AACf,YAAA,MAAM,GAAG,GAAG,CAAC,CAAC,YAAY,GAAG,CAAC,CAAC,QAAQ,CAAC,IAAI,GAAG,CAAC;AAEhD,YAAA,MAAM,oBAAoB,GAAG,QAAQ,KAAK,CAAC,KAAsB,KAAK,QAAQ,CAAC,KAAK,CAAC,CAAC;AACtF,YAAA,MAAM,mBAAmB,GAAG,CAAC,KAAY,KAAI;AAC3C,gBAAA,MAAM,KAAK;AACb,aAAC;AAED,YAAA,MAAM,YAAY,GAAG,oBAAoB,IAAI,mBAAmB;YAEhE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,OAAO,GAAG,GAAG,CAAC;AAEvC,YAAA,OAAO,YAAY,CAAC,GAAG,CAAC;;;AAG7B;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"confluenceClient.js","sources":["../../../../src/clients/confluenceClient.ts"],"sourcesContent":["import { BaseClient } from './baseClient';\nimport type { Config } from '../config';\nimport {\n Analytics,\n Audit,\n Content,\n ContentAttachments,\n ContentBody,\n ContentChildrenAndDescendants,\n ContentComments,\n ContentLabels,\n ContentMacroBody,\n ContentPermissions,\n ContentProperties,\n ContentRestrictions,\n ContentStates,\n ContentVersions,\n ContentWatches,\n DynamicModules,\n Experimental,\n Group,\n InlineTasks,\n LabelInfo,\n LongRunningTask,\n Relation,\n Search,\n Settings,\n Space,\n SpacePermissions,\n SpaceProperties,\n SpaceSettings,\n Template,\n Themes,\n Users,\n} from '../api';\n\nexport class ConfluenceClient extends BaseClient {\n constructor(config: Config) {\n super({\n ...config,\n apiPrefix: config.apiPrefix ?? '/wiki/rest',\n });\n }\n\n analytics = new Analytics(this);\n audit = new Audit(this);\n content = new Content(this);\n contentAttachments = new ContentAttachments(this);\n contentBody = new ContentBody(this);\n contentChildrenAndDescendants = new ContentChildrenAndDescendants(this);\n contentComments = new ContentComments(this);\n contentLabels = new ContentLabels(this);\n contentMacroBody = new ContentMacroBody(this);\n contentPermissions = new ContentPermissions(this);\n contentProperties = new ContentProperties(this);\n contentRestrictions = new ContentRestrictions(this);\n contentStates = new ContentStates(this);\n contentVersions = new ContentVersions(this);\n contentWatches = new ContentWatches(this);\n dynamicModules = new DynamicModules(this);\n experimental = new Experimental(this);\n group = new Group(this);\n inlineTasks = new InlineTasks(this);\n labelInfo = new LabelInfo(this);\n longRunningTask = new LongRunningTask(this);\n relation = new Relation(this);\n search = new Search(this);\n settings = new Settings(this);\n space = new Space(this);\n spacePermissions = new SpacePermissions(this);\n spaceProperties = new SpaceProperties(this);\n spaceSettings = new SpaceSettings(this);\n template = new Template(this);\n themes = new Themes(this);\n users = new Users(this);\n}\n"],"names":["BaseClient","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"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoCM,MAAO,gBAAiB,SAAQA,qBAAU,CAAA;AAC9C,IAAA,WAAA,CAAY,MAAc,EAAA;AACxB,QAAA,KAAK,CAAC;AACJ,YAAA,GAAG,MAAM;AACT,YAAA,SAAS,EAAE,MAAM,CAAC,SAAS,IAAI,YAAY;AAC5C,SAAA,CAAC;;AAGJ,IAAA,SAAS,GAAG,IAAIC,mBAAS,CAAC,IAAI,CAAC;AAC/B,IAAA,KAAK,GAAG,IAAIC,WAAK,CAAC,IAAI,CAAC;AACvB,IAAA,OAAO,GAAG,IAAIC,eAAO,CAAC,IAAI,CAAC;AAC3B,IAAA,kBAAkB,GAAG,IAAIC,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AAI,CAAC;AACvB,IAAA,gBAAgB,GAAG,IAAIC,iCAAgB,CAAC,IAAI,CAAC;AAC7C,IAAA,eAAe,GAAG,IAAIC,+BAAe,CAAC,IAAI,CAAC;AAC3C,IAAA,aAAa,GAAG,IAAIC,2BAAa,CAAC,IAAI,CAAC;AACvC,IAAA,QAAQ,GAAG,IAAIC,iBAAQ,CAAC,IAAI,CAAC;AAC7B,IAAA,MAAM,GAAG,IAAIC,aAAM,CAAC,IAAI,CAAC;AACzB,IAAA,KAAK,GAAG,IAAIC,WAAK,CAAC,IAAI,CAAC;AACxB;;;;"}
|
package/dist/cjs/config.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sources":["../../../src/config.ts"],"sourcesContent":["import { z } from 'zod';\nimport type { AxiosError } from 'axios';\n\n/**\n * Basic authentication configuration using email and API token\n *\n * @see {@link https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/} for how to create API tokens\n */\nexport const BasicSchema = z.strictObject({\n basic: z.strictObject({\n /** User's email associated with Atlassian account */\n email: z.string().email(),\n /**\n * API token generated from Atlassian account settings\n *\n * @see {@link https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/} for how to create API tokens\n */\n apiToken: z.string().min(1, 'API token is required'),\n }),\n});\n\n/** JWT authentication configuration */\nexport const JWTSchema = z.strictObject({\n jwt: z.strictObject({\n /** The key from the app descriptor */\n issuer: z.string(),\n /** The shared secret key from app installation */\n secret: z.string(),\n /** Token expiry time (default: 180) */\n expiryTimeSeconds: z.optional(z.number()),\n }),\n});\n\n/** OAuth2 authentication configuration */\nexport const OAuth2Schema = z.strictObject({\n oauth2: z.strictObject({\n /** OAuth2 access token */\n accessToken: z.string(),\n }),\n});\n\n/** Authentication configuration schema */\nexport const AuthenticationSchema = z.union([BasicSchema, JWTSchema, OAuth2Schema]);\n\n/** Base request configuration */\nexport const RequestConfigSchema = z.any();\n\n/** Middleware configuration schema */\nexport const MiddlewaresSchema = z.object({\n /** Error handler middleware */\n onError: z.optional(z.function().args(z.any()).returns(z.void())),\n /** Response handler middleware */\n onResponse: z.optional(z.function().args(z.any()).returns(z.void())),\n});\n\nexport const ConfigSchema = z.object({\n 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?' }),\n baseRequestConfig: z.optional(RequestConfigSchema),\n authentication: z.optional(AuthenticationSchema),\n middlewares: z.optional(MiddlewaresSchema),\n /** Adds `'X-Atlassian-Token': 'no-check'` to each request header */\n noCheckAtlassianToken: z.optional(z.boolean()),\n /** Prefix for all API routes. */\n apiPrefix: z.optional(z.string()),\n});\n\nexport type Config = z.infer<typeof ConfigSchema>;\nexport type Authentication = z.infer<typeof AuthenticationSchema>;\nexport type Basic = z.infer<typeof BasicSchema>;\nexport type JWT = z.infer<typeof JWTSchema>;\nexport type OAuth2 = z.infer<typeof OAuth2Schema>;\nexport type Error = AxiosError;\n"],"names":["z"],"mappings":";;;;AAGA;;;;AAIG;AACU,MAAA,WAAW,GAAGA,KAAC,CAAC,YAAY,CAAC;AACxC,IAAA,KAAK,EAAEA,KAAC,CAAC,YAAY,CAAC;;AAEpB,QAAA,KAAK,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;AACzB;;;;AAIG;QACH,QAAQ,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;KACrD,CAAC;AACH,CAAA;AAED;AACa,MAAA,SAAS,GAAGA,KAAC,CAAC,YAAY,CAAC;AACtC,IAAA,GAAG,EAAEA,KAAC,CAAC,YAAY,CAAC;;AAElB,QAAA,MAAM,EAAEA,KAAC,CAAC,MAAM,EAAE;;AAElB,QAAA,MAAM,EAAEA,KAAC,CAAC,MAAM,EAAE;;QAElB,iBAAiB,EAAEA,KAAC,CAAC,QAAQ,CAACA,KAAC,CAAC,MAAM,EAAE,CAAC;KAC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A,KAAC,CAAC,MAAM,EAAE,CAAC;AAClC,CAAA;;;;;;;;;;"}
|
package/dist/cjs/index.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"paramSerializer.js","sources":["../../../src/paramSerializer.ts"],"sourcesContent":["export function paramSerializer(key: string, values?: string | string[]) {\n if (typeof values === 'string') {\n return () => `${key}=${values}`;\n }\n\n if (!values) {\n return undefined;\n }\n\n if (!values.length) {\n return '';\n }\n\n return () => values.map(value => `${key}=${value}`).join('&');\n}\n"],"names":[],"mappings":";;AAAgB,SAAA,eAAe,CAAC,GAAW,EAAE,MAA0B,EAAA;AACrE,IAAA,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QAC9B,OAAO,MAAM,CAAA,EAAG,GAAG,CAAI,CAAA,EAAA,MAAM,EAAE;;IAGjC,IAAI,CAAC,MAAM,EAAE;AACX,QAAA,OAAO,SAAS;;AAGlB,IAAA,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;AAClB,QAAA,OAAO,EAAE;;IAGX,OAAO,MAAM,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,GAAG,CAAA,CAAA,EAAI,KAAK,CAAE,CAAA,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAC/D;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"authenticationService.js","sources":["../../../../../src/services/authenticationService/authenticationService.ts"],"sourcesContent":["import type { Authentication } from '~/config';\nimport {\n createBasicAuthenticationToken,\n createJWTAuthentication,\n createOAuth2AuthenticationToken,\n} from './authentications';\n\nexport async function getAuthenticationToken(\n authentication: Authentication | undefined,\n requestData?: {\n baseURL: string;\n url: string;\n method: string;\n },\n): Promise<string | undefined> {\n if (!authentication) {\n return undefined;\n }\n\n if ('basic' in authentication) {\n return createBasicAuthenticationToken(authentication);\n }\n\n if ('oauth2' in authentication) {\n return createOAuth2AuthenticationToken(authentication);\n }\n\n if ('jwt' in authentication) {\n return createJWTAuthentication(authentication, requestData!);\n }\n\n return undefined;\n}\n"],"names":["createBasicAuthenticationToken","createOAuth2AuthenticationToken","createJWTAuthentication"],"mappings":";;;;;;AAOO,eAAe,sBAAsB,CAC1C,cAA0C,EAC1C,WAIC,EAAA;IAED,IAAI,CAAC,cAAc,EAAE;AACnB,QAAA,OAAO,SAAS;;AAGlB,IAAA,IAAI,OAAO,IAAI,cAAc,EAAE;AAC7B,QAAA,OAAOA,6DAA8B,CAAC,cAAc,CAAC;;AAGvD,IAAA,IAAI,QAAQ,IAAI,cAAc,EAAE;AAC9B,QAAA,OAAOC,+DAA+B,CAAC,cAAc,CAAC;;AAGxD,IAAA,IAAI,KAAK,IAAI,cAAc,EAAE;AAC3B,QAAA,OAAOC,+CAAuB,CAAC,cAAc,EAAE,WAAY,CAAC;;AAG9D,IAAA,OAAO,SAAS;AAClB;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createBasicAuthenticationToken.js","sources":["../../../../../../src/services/authenticationService/authentications/createBasicAuthenticationToken.ts"],"sourcesContent":["import { Base64Encoder } from '../base64Encoder';\nimport type { Basic } from '~';\n\nexport function createBasicAuthenticationToken({ basic: { email, apiToken } }: Basic) {\n const token = Base64Encoder.encode(`${email}:${apiToken}`);\n\n return `Basic ${token}`;\n}\n"],"names":["Base64Encoder"],"mappings":";;;;AAGM,SAAU,8BAA8B,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAS,EAAA;AAClF,IAAA,MAAM,KAAK,GAAGA,2BAAa,CAAC,MAAM,CAAC,CAAG,EAAA,KAAK,CAAI,CAAA,EAAA,QAAQ,CAAE,CAAA,CAAC;IAE1D,OAAO,CAAA,MAAA,EAAS,KAAK,CAAA,CAAE;AACzB;;;;"}
|
package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createJWTAuthentication.js","sources":["../../../../../../src/services/authenticationService/authentications/createJWTAuthentication.ts"],"sourcesContent":["import * as jwt from 'atlassian-jwt';\nimport type { JWT } from '~';\n\nexport function createJWTAuthentication(\n { jwt: { issuer, secret, expiryTimeSeconds } }: JWT,\n requestData: {\n method: string;\n url: string;\n },\n) {\n const { method, url } = requestData;\n\n const now = Math.floor(Date.now() / 1000);\n const expire = now + (expiryTimeSeconds ?? 180);\n\n const request = jwt.fromMethodAndUrl(method, url);\n const tokenData = {\n iss: issuer,\n qsh: jwt.createQueryStringHash(request),\n iat: now,\n exp: expire,\n };\n\n const token = jwt.encodeSymmetric(tokenData, secret);\n\n return `JWT ${token}`;\n}\n"],"names":["jwt"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGgB,SAAA,uBAAuB,CACrC,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,EAAO,EACnD,WAGC,EAAA;AAED,IAAA,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,WAAW;AAEnC,IAAA,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;IACzC,MAAM,MAAM,GAAG,GAAG,IAAI,iBAAiB,IAAI,GAAG,CAAC;IAE/C,MAAM,OAAO,GAAGA,cAAG,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC;AACjD,IAAA,MAAM,SAAS,GAAG;AAChB,QAAA,GAAG,EAAE,MAAM;AACX,QAAA,GAAG,EAAEA,cAAG,CAAC,qBAAqB,CAAC,OAAO,CAAC;AACvC,QAAA,GAAG,EAAE,GAAG;AACR,QAAA,GAAG,EAAE,MAAM;KACZ;IAED,MAAM,KAAK,GAAGA,cAAG,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC;IAEpD,OAAO,CAAA,IAAA,EAAO,KAAK,CAAA,CAAE;AACvB;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"createOAuth2AuthenticationToken.js","sources":["../../../../../../src/services/authenticationService/authentications/createOAuth2AuthenticationToken.ts"],"sourcesContent":["import type { OAuth2 } from '~';\n\nexport function createOAuth2AuthenticationToken({ oauth2: { accessToken } }: OAuth2) {\n return `Bearer ${accessToken}`;\n}\n"],"names":[],"mappings":";;AAEM,SAAU,+BAA+B,CAAC,EAAE,MAAM,EAAE,EAAE,WAAW,EAAE,EAAU,EAAA;IACjF,OAAO,CAAA,OAAA,EAAU,WAAW,CAAA,CAAE;AAChC;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"base64Encoder.js","sources":["../../../../../src/services/authenticationService/base64Encoder.ts"],"sourcesContent":["/* eslint-disable */\n/** @copyright The code was taken from the portal http://www.webtoolkit.info/javascript-base64.html */\n\nexport namespace Base64Encoder {\n const base64Sequence = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n const utf8Encode = (value: string) => {\n value = value.replace(/\\r\\n/g, '\\n');\n\n let utftext = '';\n\n for (let n = 0; n < value.length; n++) {\n const c = value.charCodeAt(n);\n\n if (c < 128) {\n utftext += String.fromCharCode(c);\n } else if (c > 127 && c < 2048) {\n utftext += String.fromCharCode((c >> 6) | 192);\n\n utftext += String.fromCharCode((c & 63) | 128);\n } else {\n utftext += String.fromCharCode((c >> 12) | 224);\n\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n\n utftext += String.fromCharCode((c & 63) | 128);\n }\n }\n\n return utftext;\n };\n\n export const encode = (input: string) => {\n let output = '';\n let chr1;\n let chr2;\n let chr3;\n let enc1;\n let enc2;\n let enc3;\n let enc4;\n let i = 0;\n\n input = utf8Encode(input);\n\n while (i < input.length) {\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n\n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n\n output += `${base64Sequence.charAt(enc1)}${base64Sequence.charAt(enc2)}${base64Sequence.charAt(\n enc3,\n )}${base64Sequence.charAt(enc4)}`;\n }\n\n return output;\n };\n}\n"],"names":["Base64Encoder"],"mappings":";;AAAA;AACA;AAEiBA;AAAjB,CAAA,UAAiB,aAAa,EAAA;IAC5B,MAAM,cAAc,GAAG,mEAAmE;AAE1F,IAAA,MAAM,UAAU,GAAG,CAAC,KAAa,KAAI;QACnC,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC;QAEpC,IAAI,OAAO,GAAG,EAAE;AAEhB,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;AAE7B,YAAA,IAAI,CAAC,GAAG,GAAG,EAAE;AACX,gBAAA,OAAO,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;;iBAC5B,IAAI,CAAC,GAAG,GAAG,IAAI,CAAC,GAAG,IAAI,EAAE;AAC9B,gBAAA,OAAO,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,GAAG,CAAC;AAE9C,gBAAA,OAAO,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,EAAE,IAAI,GAAG,CAAC;;iBACzC;AACL,gBAAA,OAAO,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC,IAAI,EAAE,IAAI,GAAG,CAAC;AAE/C,gBA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;;AAGX,YAAA,MAAM,IAAI,CAAA,EAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAG,EAAA,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAG,EAAA,cAAc,CAAC,MAAM,CAC5F,IAAI,CACL,CAAA,EAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;;AAGnC,QAAA,OAAO,MAAM;AACf,KAAC;AACH,CAAC,EAjEgBA,qBAAa,KAAbA,qBAAa,GAiE7B,EAAA,CAAA,CAAA;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.js","sources":["../../../../src/api/analytics.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class Analytics {\n constructor(private client: Client) {}\n\n /** Get the total number of views a piece of content has. */\n async getViews<T = Models.GetViews>(parameters: Parameters.GetViews, callback: Callback<T>): Promise<void>;\n /** Get the total number of views a piece of content has. */\n async getViews<T = Models.GetViews>(parameters: Parameters.GetViews, callback?: never): Promise<T>;\n async getViews<T = Models.GetViews>(parameters: Parameters.GetViews, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/analytics/content/${parameters.contentId}/views`,\n method: 'GET',\n params: {\n fromDate: parameters.fromDate,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /** Get the total number of distinct viewers a piece of content has. */\n async getViewers<T = Models.GetViewers>(parameters: Parameters.GetViewers, callback: Callback<T>): Promise<void>;\n /** Get the total number of distinct viewers a piece of content has. */\n async getViewers<T = Models.GetViewers>(parameters: Parameters.GetViewers, callback?: never): Promise<T>;\n async getViewers<T = Models.GetViewers>(\n parameters: Parameters.GetViewers,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/analytics/content/${parameters.contentId}/viewers`,\n method: 'GET',\n params: {\n fromDate: parameters.fromDate,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,SAAS,CAAA;AACA,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAM1B,IAAA,MAAM,QAAQ,CAAsB,UAA+B,EAAE,QAAsB,EAAA;AACzF,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,uBAAA,EAA0B,UAAU,CAAC,SAAS,CAAQ,MAAA,CAAA;AAC3D,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,QAAQ,EAAE,UAAU,CAAC,QAAQ;AAC9B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAOlD,IAAA,MAAM,UAAU,CACd,UAAiC,EACjC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,uBAAA,EAA0B,UAAU,CAAC,SAAS,CAAU,QAAA,CAAA;AAC7D,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,QAAQ,EAAE,UAAU,CAAC,QAAQ;AAC9B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"audit.js","sources":["../../../../src/api/audit.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class Audit {\n constructor(private client: Client) {}\n\n /**\n * Returns all records in the audit log, optionally for a certain date range. This contains information about events\n * like space exports, group membership changes, app installations, etc. For more information, see [Audit\n * log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the Confluence administrator's guide.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getAuditRecords<T = Models.AuditRecordArray>(\n parameters: Parameters.GetAuditRecords | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all records in the audit log, optionally for a certain date range. This contains information about events\n * like space exports, group membership changes, app installations, etc. For more information, see [Audit\n * log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the Confluence administrator's guide.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getAuditRecords<T = Models.AuditRecordArray>(\n parameters?: Parameters.GetAuditRecords,\n callback?: never,\n ): Promise<T>;\n async getAuditRecords<T = Models.AuditRecordArray>(\n parameters?: Parameters.GetAuditRecords,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit',\n method: 'GET',\n params: {\n startDate: parameters?.startDate,\n endDate: parameters?.endDate,\n searchString: parameters?.searchString,\n start: parameters?.start,\n limit: parameters?.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a record in the audit log.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async createAuditRecord<T = Models.AuditRecord>(\n parameters: Parameters.CreateAuditRecord | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a record in the audit log.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async createAuditRecord<T = Models.AuditRecord>(\n parameters?: Parameters.CreateAuditRecord,\n callback?: never,\n ): Promise<T>;\n async createAuditRecord<T = Models.AuditRecord>(\n parameters?: Parameters.CreateAuditRecord,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit',\n method: 'POST',\n data: {\n author: parameters?.author,\n remoteAddress: parameters?.remoteAddress,\n creationDate: parameters?.creationDate,\n summary: parameters?.summary,\n description: parameters?.description,\n category: parameters?.category,\n sysAdmin: parameters?.sysAdmin,\n affectedObject: parameters?.affectedObject,\n changedValues: parameters?.changedValues,\n associatedObjects: parameters?.associatedObjects,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Exports audit records as a CSV file or ZIP file.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async exportAuditRecords<T = unknown>(\n parameters: Parameters.ExportAuditRecords | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Exports audit records as a CSV file or ZIP file.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async exportAuditRecords<T = unknown>(parameters?: Parameters.ExportAuditRecords, callback?: never): Promise<T>;\n async exportAuditRecords<T = unknown>(\n parameters?: Parameters.ExportAuditRecords,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit/export',\n method: 'GET',\n params: {\n startDate: parameters?.startDate,\n endDate: parameters?.endDate,\n searchString: parameters?.searchString,\n format: parameters?.format,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the retention period for records in the audit log. The retention period is how long an audit record is kept\n * for, from creation date until it is deleted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getRetentionPeriod<T = Models.RetentionPeriod>(callback: Callback<T>): Promise<void>;\n /**\n * Returns the retention period for records in the audit log. The retention period is how long an audit record is kept\n * for, from creation date until it is deleted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getRetentionPeriod<T = Models.RetentionPeriod>(callback?: never): Promise<T>;\n async getRetentionPeriod<T = Models.RetentionPeriod>(callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit/retention',\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 20 years.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async setRetentionPeriod<T = Models.RetentionPeriod>(\n parameters: Parameters.SetRetentionPeriod | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 20 years.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async setRetentionPeriod<T = Models.RetentionPeriod>(\n parameters?: Parameters.SetRetentionPeriod,\n callback?: never,\n ): Promise<T>;\n async setRetentionPeriod<T = Models.RetentionPeriod>(\n parameters?: Parameters.SetRetentionPeriod,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit/retention',\n method: 'PUT',\n data: {\n number: parameters?.number,\n units: parameters?.units,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns records from the audit log, for a time period back from the current date. For example, you can use this\n * method to get the last 3 months of records.\n *\n * This contains information about events like space exports, group membership changes, app installations, etc. For\n * more information, see [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the\n * Confluence administrator's guide.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getAuditRecordsForTimePeriod<T = Models.AuditRecordArray>(\n parameters: Parameters.GetAuditRecordsForTimePeriod | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns records from the audit log, for a time period back from the current date. For example, you can use this\n * method to get the last 3 months of records.\n *\n * This contains information about events like space exports, group membership changes, app installations, etc. For\n * more information, see [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the\n * Confluence administrator's guide.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getAuditRecordsForTimePeriod<T = Models.AuditRecordArray>(\n parameters?: Parameters.GetAuditRecordsForTimePeriod,\n callback?: never,\n ): Promise<T>;\n async getAuditRecordsForTimePeriod<T = Models.AuditRecordArray>(\n parameters?: Parameters.GetAuditRecordsForTimePeriod,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit/since',\n method: 'GET',\n params: {\n number: parameters?.number,\n units: parameters?.units,\n searchString: parameters?.searchString,\n start: parameters?.start,\n limit: parameters?.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,KAAK,CAAA;AACI,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AA0B1B,IAAA,MAAM,eAAe,CACnB,UAAuC,EACvC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,YAAY;AACjB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,SAAS,EAAE,UAAU,EAAE,SAAS;gBAChC,OAAO,EAAE,UAAU,EAAE,OAAO;gBAC5B,YAAY,EAAE,UAAU,EAAE,YAAY;gBACtC,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,KAAK,EAAE,UAAU,EAAE,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAuBlD,IAAA,MAAM,iBAAiB,CACrB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,YAAY;AACjB,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,MAAM,EAAE,UAAU,EAAE,MAAM;gBAC1B,aAAa,EAAE,UAAU,EAAE,aAAa;gBACxC,YAAY,EAAE,UAA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E,MAAM;gBAC1B,KAAK,EAAE,UAAU,EAAE,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAiClD,IAAA,MAAM,4BAA4B,CAChC,UAAoD,EACpD,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,kBAAkB;AACvB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,EAAE,MAAM;gBAC1B,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,YAAY,EAAE,UAAU,EAAE,YAAY;gBACtC,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,KAAK,EAAE,UAAU,EAAE,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content.js","sources":["../../../../src/api/content.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class Content {\n constructor(private client: Client) {}\n\n /**\n * Returns all content in a Confluence instance.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). Only content that the user has permission to view will be returned.\n */\n async getContent<T = Models.ContentArray>(\n parameters: Parameters.GetContent | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all content in a Confluence instance.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). Only content that the user has permission to view will be returned.\n */\n async getContent<T = Models.ContentArray>(parameters?: Parameters.GetContent, callback?: never): Promise<T>;\n async getContent<T = Models.ContentArray>(\n parameters?: Parameters.GetContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content',\n method: 'GET',\n params: {\n type: parameters?.type,\n spaceKey: parameters?.spaceKey,\n title: parameters?.title,\n status: parameters?.status,\n postingDay: parameters?.postingDay,\n trigger: parameters?.trigger,\n orderby: parameters?.orderby,\n start: parameters?.start,\n limit: parameters?.limit,\n expand: parameters?.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a new piece of content or publishes an existing draft.\n *\n * To publish a draft, add the `id` and `status` properties to the body of the request. Set the `id` to the ID of the\n * draft and set the `status` to 'current'. When the request is sent, a new piece of content will be created and the\n * metadata from the draft will be transferred into it.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the\n * content will be created in, and permission to view the draft if publishing a draft.\n */\n async createContent<T = Models.Content>(\n parameters: Parameters.CreateContent | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new piece of content or publishes an existing draft.\n *\n * To publish a draft, add the `id` and `status` properties to the body of the request. Set the `id` to the ID of the\n * draft and set the `status` to 'current'. When the request is sent, a new piece of content will be created and the\n * metadata from the draft will be transferred into it.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the\n * content will be created in, and permission to view the draft if publishing a draft.\n */\n async createContent<T = Models.Content>(parameters?: Parameters.CreateContent, callback?: never): Promise<T>;\n async createContent<T = Models.Content>(\n parameters?: Parameters.CreateContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content',\n method: 'POST',\n params: {\n status: parameters?.status,\n expand: parameters?.expand,\n },\n data: {\n ...parameters,\n status: undefined,\n expand: undefined,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Archives a list of pages. The pages to be archived are specified as a list of content IDs. This API accepts the\n * archival request and returns a task ID. The archival process happens asynchronously. Use the /longtask/<taskId>\n * REST API to get the copy task status.\n *\n * Each content ID needs to resolve to page objects that are not already in an archived state. The content IDs need\n * not belong to the same space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Archive' permission for each of the pages\n * in the corresponding space it belongs to.\n */\n async archivePages<T = Models.LongTask>(parameters: Parameters.ArchivePages, callback: Callback<T>): Promise<void>;\n /**\n * Archives a list of pages. The pages to be archived are specified as a list of content IDs. This API accepts the\n * archival request and returns a task ID. The archival process happens asynchronously. Use the /longtask/<taskId>\n * REST API to get the copy task status.\n *\n * Each content ID needs to resolve to page objects that are not already in an archived state. The content IDs need\n * not belong to the same space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Archive' permission for each of the pages\n * in the corresponding space it belongs to.\n */\n async archivePages<T = Models.LongTask>(parameters: Parameters.ArchivePages, callback?: never): Promise<T>;\n async archivePages<T = Models.LongTask>(\n parameters: Parameters.ArchivePages,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content/archive',\n method: 'POST',\n data: {\n pages: parameters.pages,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favor of\n * shared drafts. For now, this method works the same as [Publish shared\n * draft](#api-content-blueprint-instance-draftId-put).\n *\n * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add'\n * permission for the space that the content will be created in.\n */\n async publishLegacyDraft<T = Models.Content>(\n parameters: Parameters.PublishLegacyDraft,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favor of\n * shared drafts. For now, this method works the same as [Publish shared\n * draft](#api-content-blueprint-instance-draftId-put).\n *\n * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add'\n * permission for the space that the content will be created in.\n */\n async publishLegacyDraft<T = Models.Content>(parameters: Parameters.PublishLegacyDraft, callback?: never): Promise<T>;\n async publishLegacyDraft<T = Models.Content>(\n parameters: Parameters.PublishLegacyDraft,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/blueprint/instance/${parameters.draftId}`,\n method: 'POST',\n params: {\n status: parameters.status,\n },\n data: {\n ...parameters,\n version: parameters.version,\n title: parameters.title,\n type: parameters.type,\n status: parameters.bodyStatus,\n space: parameters.space,\n ancestors: parameters.ancestors,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Publishes a shared draft of a page created from a blueprint.\n *\n * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add'\n * permission for the space that the content will be created in.\n */\n async publishSharedDraft<T = Models.Content>(\n parameters: Parameters.PublishSharedDraft,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Publishes a shared draft of a page created from a blueprint.\n *\n * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add'\n * permission for the space that the content will be created in.\n */\n async publishSharedDraft<T = Models.Content>(parameters: Parameters.PublishSharedDraft, callback?: never): Promise<T>;\n async publishSharedDraft<T = Models.Content>(\n parameters: Parameters.PublishSharedDraft,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/blueprint/instance/${parameters.draftId}`,\n method: 'PUT',\n params: {\n status: parameters.status,\n },\n data: {\n ...parameters,\n version: parameters.version,\n title: parameters.title,\n type: parameters.type,\n status: parameters.bodyStatus,\n space: parameters.space,\n ancestors: parameters.ancestors,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the list of content that matches a Confluence Query Language (CQL) query. For information on CQL, see:\n * [Advanced searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).\n *\n * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The\n * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of\n * results returned in each call. Example subsequent call (taken from example response):\n *\n * https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg\n *\n * The response to this will have a `prev` URL similar to the `next` in the example response.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). Only content that the user has permission to view will be returned.\n */\n async searchContentByCQL<T = Models.ContentArray>(\n parameters: Parameters.SearchContentByCQL,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the list of content that matches a Confluence Query Language (CQL) query. For information on CQL, see:\n * [Advanced searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).\n *\n * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The\n * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of\n * results returned in each call. Example subsequent call (taken from example response):\n *\n * https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg\n *\n * The response to this will have a `prev` URL similar to the `next` in the example response.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). Only content that the user has permission to view will be returned.\n */\n async searchContentByCQL<T = Models.ContentArray>(\n parameters: Parameters.SearchContentByCQL,\n callback?: never,\n ): Promise<T>;\n async searchContentByCQL<T = Models.ContentArray>(\n parameters: Parameters.SearchContentByCQL,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content/search',\n method: 'GET',\n params: {\n cql: parameters.cql,\n cqlcontext: parameters.cqlcontext,\n cursor: parameters.cursor,\n limit: parameters.limit,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a single piece of content, like a page or a blog post.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the\n * content is a blog post, 'View' permission for the space is required.\n */\n async getContentById<T = Models.Content>(parameters: Parameters.GetContentById, callback: Callback<T>): Promise<void>;\n /**\n * Returns a single piece of content, like a page or a blog post.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the\n * content is a blog post, 'View' permission for the space is required.\n */\n async getContentById<T = Models.Content>(parameters: Parameters.GetContentById, callback?: never): Promise<T>;\n async getContentById<T = Models.Content>(\n parameters: Parameters.GetContentById,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}`,\n method: 'GET',\n params: {\n status: parameters.status,\n version: parameters.version,\n embeddedContentRender: parameters.embeddedContentRender,\n trigger: parameters.trigger,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates a piece of content. Use this method to update the title or body of a piece of content, change the status,\n * change the parent page, and more.\n *\n * Note, updating draft content is currently not supported.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateContent<T = Models.Content>(parameters: Parameters.UpdateContent, callback: Callback<T>): Promise<void>;\n /**\n * Updates a piece of content. Use this method to update the title or body of a piece of content, change the status,\n * change the parent page, and more.\n *\n * Note, updating draft content is currently not supported.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateContent<T = Models.Content>(parameters: Parameters.UpdateContent, callback?: never): Promise<T>;\n async updateContent<T = Models.Content>(\n parameters: Parameters.UpdateContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}`,\n method: 'PUT',\n params: {\n status: parameters.status,\n conflictPolicy: parameters.conflictPolicy,\n },\n data: {\n version: parameters.version,\n title: parameters.title,\n type: parameters.type,\n status: parameters.statusBody,\n ancestors: parameters.ancestors,\n body: parameters.body,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and\n * status:\n *\n * - If the content's type is `page` or `blogpost` and its status is `current`, it will be trashed.\n * - If the content's type is `page` or `blogpost` and its status is `trashed`, the content will be purged from the\n * trash and deleted permanently. Note, you must also set the `status` query parameter to `trashed` in your\n * request.\n * - If the content's type is `comment` or `attachment`, it will be deleted permanently without being trashed.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the\n * content is in.\n */\n async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback: Callback<T>): Promise<void>;\n /**\n * Moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and\n * status:\n *\n * - If the content's type is `page` or `blogpost` and its status is `current`, it will be trashed.\n * - If the content's type is `page` or `blogpost` and its status is `trashed`, the content will be purged from the\n * trash and deleted permanently. Note, you must also set the `status` query parameter to `trashed` in your\n * request.\n * - If the content's type is `comment` or `attachment`, it will be deleted permanently without being trashed.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the\n * content is in.\n */\n async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback?: never): Promise<T>;\n async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}`,\n method: 'DELETE',\n params: {\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the most recent update for a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getHistoryForContent<T = Models.ContentHistory>(\n parameters: Parameters.GetHistoryForContent,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the most recent update for a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getHistoryForContent<T = Models.ContentHistory>(\n parameters: Parameters.GetHistoryForContent,\n callback?: never,\n ): Promise<T>;\n async getHistoryForContent<T = Models.ContentHistory>(\n parameters: Parameters.GetHistoryForContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/history`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,OAAO,CAAA;AACE,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAuB1B,IAAA,MAAM,UAAU,CACd,UAAkC,EAClC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,cAAc;AACnB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,IAAI,EAAE,UAAU,EAAE,IAAI;gBACtB,QAAQ,EAAE,UAAU,EAAE,QAAQ;gBAC9B,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,MAAM,EAAE,UAAU,EAAE,MAAM;gBAC1B,UAAU,EAAE,UAAU,EAAE,UAAU;gBAClC,OAAO,EAAE,UAAU,EAAE,OAAO;gBAC5B,OAAO,EAAE,UAAU,EAAE,OAAO;gBAC5B,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,MAAM,EAAE,UAAU,EAAE,MAAM;AAC3B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAA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,CAAW,UAAoC,EAAE,QAAsB,EAAA;AACxF,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAE,CAAA;AACpC,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAqBlD,IAAA,MAAM,oBAAoB,CACxB,UAA2C,EAC3C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAU,QAAA,CAAA;AAC5C,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contentAttachments.js","sources":["../../../../src/api/contentAttachments.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unnecessary-condition */\nimport FormData from 'form-data';\nimport type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentAttachments {\n constructor(private client: Client) {}\n\n /**\n * Returns the attachments for a piece of content.\n *\n * By default, the following objects are expanded: `metadata`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the\n * content is a blog post, 'View' permission for the space is required.\n */\n async getAttachments<T = Models.ContentArray<Models.Attachment>>(\n parameters: Parameters.GetAttachments,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the attachments for a piece of content.\n *\n * By default, the following objects are expanded: `metadata`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the\n * content is a blog post, 'View' permission for the space is required.\n */\n async getAttachments<T = Models.ContentArray<Models.Attachment>>(\n parameters: Parameters.GetAttachments,\n callback?: never,\n ): Promise<T>;\n async getAttachments<T = Models.ContentArray<Models.Attachment>>(\n parameters: Parameters.GetAttachments,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment`,\n method: 'GET',\n params: {\n start: parameters.start,\n limit: parameters.limit,\n filename: parameters.filename,\n mediaType: parameters.mediaType,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds an attachment to a piece of content. This method only adds a new attachment. If you want to update an existing\n * attachment, use [Create or update\n * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateAttachments,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds an attachment to a piece of content. This method only adds a new attachment. If you want to update an existing\n * attachment, use [Create or update\n * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateAttachments,\n callback?: never,\n ): Promise<T>;\n async createAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateAttachments,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const formData = new FormData();\n const attachments = Array.isArray(parameters.attachments) ? parameters.attachments : [parameters.attachments];\n\n attachments.forEach(attachment => {\n formData.append('minorEdit', attachment.minorEdit.toString(), 'minorEdit');\n formData.append('file', attachment.file, {\n filename: attachment.filename,\n contentType: attachment.contentType,\n });\n\n if (attachment.comment) {\n formData.append('comment', attachment.comment, 'comment');\n }\n });\n\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment`,\n method: 'POST',\n headers: {\n 'X-Atlassian-Token': 'no-check',\n 'Content-Type': 'multipart/form-data',\n ...formData.getHeaders?.(),\n },\n params: {\n status: parameters.status,\n },\n data: formData,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds an attachment to a piece of content. If the attachment already exists for the content, then the attachment is\n * updated (i.e. a new version of the attachment is created).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createOrUpdateAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateOrUpdateAttachments,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds an attachment to a piece of content. If the attachment already exists for the content, then the attachment is\n * updated (i.e. a new version of the attachment is created).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createOrUpdateAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateOrUpdateAttachments,\n callback?: never,\n ): Promise<T>;\n async createOrUpdateAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateOrUpdateAttachments,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const formData = new FormData();\n const attachments = Array.isArray(parameters.attachments) ? parameters.attachments : [parameters.attachments];\n\n attachments.forEach(attachment => {\n formData.append('minorEdit', attachment.minorEdit.toString(), 'minorEdit');\n formData.append('file', attachment.file, {\n filename: attachment.filename,\n contentType: attachment.contentType,\n });\n\n if (attachment.comment) {\n formData.append('comment', attachment.comment, 'comment');\n }\n });\n\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment`,\n method: 'PUT',\n headers: {\n 'X-Atlassian-Token': 'no-check',\n 'Content-Type': 'multipart/form-data',\n ...formData.getHeaders?.(),\n },\n params: {\n status: parameters.status,\n },\n data: formData,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates the attachment properties, i.e. the non-binary data of an attachment like the filename, media-type,\n * comment, and parent container.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateAttachmentProperties<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentProperties,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates the attachment properties, i.e. the non-binary data of an attachment like the filename, media-type,\n * comment, and parent container.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateAttachmentProperties<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentProperties,\n callback?: never,\n ): Promise<T>;\n async updateAttachmentProperties<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentProperties,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}`,\n method: 'PUT',\n data: parameters.update,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates the binary data of an attachment, given the attachment ID, and optionally the comment and the minor edit\n * field.\n *\n * This method is essentially the same as [Create or update\n * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put),\n * except that it matches the attachment ID rather than the name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateAttachmentData<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentData,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates the binary data of an attachment, given the attachment ID, and optionally the comment and the minor edit\n * field.\n *\n * This method is essentially the same as [Create or update\n * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put),\n * except that it matches the attachment ID rather than the name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateAttachmentData<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentData,\n callback?: never,\n ): Promise<T>;\n async updateAttachmentData<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentData,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const { attachment } = parameters;\n\n const formData = new FormData();\n\n formData.append('minorEdit', attachment.minorEdit.toString(), 'minorEdit');\n formData.append('file', attachment.file, {\n filename: attachment.filename,\n contentType: attachment.contentType,\n });\n\n if (attachment.comment) {\n formData.append('comment', attachment.comment, 'comment');\n }\n\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}/data`,\n method: 'POST',\n headers: {\n 'X-Atlassian-Token': 'no-check',\n 'Content-Type': 'multipart/form-data',\n ...formData.getHeaders?.(),\n },\n data: formData,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /** Redirects the client to a URL that serves an attachment's binary data. */\n async downloadAttachment<T = Buffer>(parameters: Parameters.DownloadAttachment, callback: Callback<T>): Promise<void>;\n /** Redirects the client to a URL that serves an attachment's binary data. */\n async downloadAttachment<T = Buffer>(parameters: Parameters.DownloadAttachment, callback?: never): Promise<T>;\n async downloadAttachment<T = Buffer>(\n parameters: Parameters.DownloadAttachment,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}/download`,\n method: 'GET',\n responseType: 'arraybuffer',\n params: {\n version: parameters.version,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;AAAA;MAQa,kBAAkB,CAAA;AACT,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AA0B1B,IAAA,MAAM,cAAc,CAClB,UAAqC,EACrC,QAAsB,EAAA;AAEt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AAC;;AAG3D,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,gBAAgB,UAAU,CAAC,EAAE,CAAqB,kBAAA,EAAA,UAAU,CAAC,YAAY,CAAO,KAAA,CAAA;AACrF,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,OAAO,EAAE;AACP,gBAAA,mBAAmB,EAAE,UAAU;AAC/B,gBAAA,cAAc,EAAE,qBAAqB;AACrC,gBAAA,GAAG,QAAQ,CAAC,UAAU,IAAI;AAC3B,aAAA;AACD,YAAA,IAAI,EAAE,QAAQ;SACf;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAOlD,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,gBAAgB,UAAU,CAAC,EAAE,CAAqB,kBAAA,EAAA,UAAU,CAAC,YAAY,CAAW,SAAA,CAAA;AACzF,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,YAAY,EAAE,aAAa;AAC3B,YAAA,MAAM,EAAE;gBACN,OAAO,EAAE,UAAU,CAAC,OAAO;AAC5B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contentBody.js","sources":["../../../../src/api/contentBody.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentBody {\n constructor(private client: Client) {}\n\n /**\n * Converts a content body from one format to another format.\n *\n * Supported conversions:\n *\n * - Storage: view, export_view, styled_view, editor\n * - Editor: storage\n * - View: none\n * - Export_view: none\n * - Styled_view: none\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async convertContentBody<T = Models.ContentBody>(\n parameters: Parameters.ConvertContentBody,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Converts a content body from one format to another format.\n *\n * Supported conversions:\n *\n * - Storage: view, export_view, styled_view, editor\n * - Editor: storage\n * - View: none\n * - Export_view: none\n * - Styled_view: none\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async convertContentBody<T = Models.ContentBody>(\n parameters: Parameters.ConvertContentBody,\n callback?: never,\n ): Promise<T>;\n async convertContentBody<T = Models.ContentBody>(\n parameters: Parameters.ConvertContentBody,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/contentbody/convert/${parameters.to}`,\n method: 'POST',\n params: {\n spaceKeyContext: parameters.spaceKeyContext,\n contentIdContext: parameters.contentIdContext,\n embeddedContentRender: parameters.embeddedContentRender,\n expand: parameters.expand,\n },\n data: {\n value: parameters.value,\n representation: parameters.representation,\n ...parameters.additionalProperties,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Converts a content body from one format to another format asynchronously. Returns the asyncId for the asynchronous\n * task.\n *\n * Supported conversions:\n *\n * - Storage: export_view\n *\n * No other conversions are supported at the moment. Once a conversion is completed, it will be available for 5\n * minutes at the result endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async asyncConvertContentBodyRequest<T = Models.AsyncId>(\n parameters: Parameters.AsyncConvertContentBodyRequest,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Converts a content body from one format to another format asynchronously. Returns the asyncId for the asynchronous\n * task.\n *\n * Supported conversions:\n *\n * - Storage: export_view\n *\n * No other conversions are supported at the moment. Once a conversion is completed, it will be available for 5\n * minutes at the result endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async asyncConvertContentBodyRequest<T = Models.AsyncId>(\n parameters: Parameters.AsyncConvertContentBodyRequest,\n callback?: never,\n ): Promise<T>;\n async asyncConvertContentBodyRequest<T = Models.AsyncId>(\n parameters: Parameters.AsyncConvertContentBodyRequest,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/contentbody/convert/async/${parameters.to}`,\n method: 'POST',\n params: {\n spaceKeyContext: parameters.spaceKeyContext,\n contentIdContext: parameters.contentIdContext,\n allowCache: parameters.allowCache,\n embeddedContentRender: parameters.embeddedContentRender,\n expand: parameters.expand,\n },\n data: {\n value: parameters.value,\n representation: parameters.representation,\n ...parameters.additionalProperties,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the Asynchronous Content Body for the corresponding asyncId if the task is complete or returns the status\n * of the task.\n *\n * After the task is completed, the result can be obtained for 5 minutes, or until an identical conversion request is\n * made again, with allowCache query param set to false.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async asyncConvertContentBodyResponse<T = Models.AsyncContentBody>(\n parameters: Parameters.AsyncConvertContentBodyResponse,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the Asynchronous Content Body for the corresponding asyncId if the task is complete or returns the status\n * of the task.\n *\n * After the task is completed, the result can be obtained for 5 minutes, or until an identical conversion request is\n * made again, with allowCache query param set to false.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async asyncConvertContentBodyResponse<T = Models.AsyncContentBody>(\n parameters: Parameters.AsyncConvertContentBodyResponse,\n callback?: never,\n ): Promise<T>;\n async asyncConvertContentBodyResponse<T = Models.AsyncContentBody>(\n parameters: Parameters.AsyncConvertContentBodyResponse,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/contentbody/convert/async/${parameters.id}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,WAAW,CAAA;AACF,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAsC1B,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,yBAAA,EAA4B,UAAU,CAAC,EAAE,CAAE,CAAA;AAChD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,MAAM,EAAE;gBACN,eAAe,EAAE,UAAU,CAAC,eAAe;gBAC3C,gBAAgB,EAAE,UAAU,CAAC,gBAAgB;gBAC7C,qBAAqB,EAAE,UAAU,CAAC,qBAAqB;gBACvD,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;AACD,YAAA,IAAI,EAAE;gBACJ,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,cAAc,EAAE,UAAU,CAAC,cAAc;gBACzC,GAAG,UAAU,CAAC,oBAAoB;AACnC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAuClD,IAAA,MAAM,8BAA8B,CAClC,UAAqD,EACrD,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,+BAAA,EAAkC,UAAU,CAAC,EAAE,CAAE,CAAA;AACtD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,MAAM,EAAE;gBACN,eAAe,EAAE,UAAU,CAAC,eAAe;gBAC3C,gBAAgB,EAAE,UAAU,CAAC,gBAAgB;gBAC7C,UAAU,EAAE,UAAU,CAAC,UAAU;gBACjC,qBAAqB,EAAE,UAAU,CAAC,qBAAqB;gBACvD,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;AACD,YAAA,IAAI,EAAE;gBACJ,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,cAAc,EAAE,UAAU,CAAC,cAAc;gBACzC,GAAG,UAAU,CAAC,oBAAoB;AACnC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AA+BlD,IAAA,MAAM,+BAA+B,CACnC,UAAsD,EACtD,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,+BAAA,EAAkC,UAAU,CAAC,EAAE,CAAE,CAAA;AACtD,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contentChildrenAndDescendants.js","sources":["../../../../src/api/contentChildrenAndDescendants.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentChildrenAndDescendants {\n constructor(private client: Client) {}\n\n /**\n * Returns a map of the direct children of a piece of content. A piece of content has different types of child\n * content, depending on its type. These are the default parent-child content type relationships:\n *\n * - `page`: child content is `page`, `comment`, `attachment`\n * - `blogpost`: child content is `comment`, `attachment`\n * - `attachment`: child content is `comment`\n * - `comment`: child content is `attachment`\n *\n * Apps can override these default relationships. Apps can also introduce new content types that create new\n * parent-child content relationships.\n *\n * Note, the map will always include all child content types that are valid for the content. However, if the content\n * has no instances of a child content type, the map will contain an empty array for that child content type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentChildren<T = Models.ContentChildren>(\n parameters: Parameters.GetContentChildren,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a map of the direct children of a piece of content. A piece of content has different types of child\n * content, depending on its type. These are the default parent-child content type relationships:\n *\n * - `page`: child content is `page`, `comment`, `attachment`\n * - `blogpost`: child content is `comment`, `attachment`\n * - `attachment`: child content is `comment`\n * - `comment`: child content is `attachment`\n *\n * Apps can override these default relationships. Apps can also introduce new content types that create new\n * parent-child content relationships.\n *\n * Note, the map will always include all child content types that are valid for the content. However, if the content\n * has no instances of a child content type, the map will contain an empty array for that child content type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentChildren<T = Models.ContentChildren>(\n parameters: Parameters.GetContentChildren,\n callback?: never,\n ): Promise<T>;\n async getContentChildren<T = Models.ContentChildren>(\n parameters: Parameters.GetContentChildren,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n parentVersion: parameters.parentVersion,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Move a page to a new location relative to a target page:\n *\n * - `before` - move the page under the same parent as the target, before the target in the list of children\n * - `after` - move the page under the same parent as the target, after the target in the list of children\n * - `append` - move the page to be a child of the target\n *\n * Caution: This API can move pages to the top level of a space. Top-level pages are difficult to find in the UI\n * because they do not show up in the page tree display. To avoid this, never use `before` or `after` positions when\n * the `targetId` is a top-level page.\n */\n async movePage<T = Models.MovePage>(parameters: Parameters.MovePage, callback: Callback<T>): Promise<void>;\n /**\n * Move a page to a new location relative to a target page:\n *\n * - `before` - move the page under the same parent as the target, before the target in the list of children\n * - `after` - move the page under the same parent as the target, after the target in the list of children\n * - `append` - move the page to be a child of the target\n *\n * Caution: This API can move pages to the top level of a space. Top-level pages are difficult to find in the UI\n * because they do not show up in the page tree display. To avoid this, never use `before` or `after` positions when\n * the `targetId` is a top-level page.\n */\n async movePage<T = Models.MovePage>(parameters: Parameters.MovePage, callback?: never): Promise<T>;\n async movePage<T = Models.MovePage>(parameters: Parameters.MovePage, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.pageId}/move/${parameters.position}/${parameters.targetId}`,\n method: 'PUT',\n headers: {\n 'Content-Type': 'application/json',\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all children of a given type, for a piece of content. A piece of content has different types of child\n * content, depending on its type:\n *\n * - `page`: child content is `page`, `comment`, `attachment`\n * - `blogpost`: child content is `comment`, `attachment`\n * - `attachment`: child content is `comment`\n * - `comment`: child content is `attachment`\n *\n * Custom content types that are provided by apps can also be returned.\n *\n * Note, this method only returns direct children. To return children at all levels, use [Get descendants by\n * type](#api-content-id-descendant-type-get).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentChildrenByType<T = Models.ContentArray>(\n parameters: Parameters.GetContentChildrenByType,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all children of a given type, for a piece of content. A piece of content has different types of child\n * content, depending on its type:\n *\n * - `page`: child content is `page`, `comment`, `attachment`\n * - `blogpost`: child content is `comment`, `attachment`\n * - `attachment`: child content is `comment`\n * - `comment`: child content is `attachment`\n *\n * Custom content types that are provided by apps can also be returned.\n *\n * Note, this method only returns direct children. To return children at all levels, use [Get descendants by\n * type](#api-content-id-descendant-type-get).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentChildrenByType<T = Models.ContentArray>(\n parameters: Parameters.GetContentChildrenByType,\n callback?: never,\n ): Promise<T>;\n async getContentChildrenByType<T = Models.ContentArray>(\n parameters: Parameters.GetContentChildrenByType,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/${parameters.type}`,\n method: 'GET',\n params: {\n parentVersion: parameters.parentVersion,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a map of the descendants of a piece of content. This is similar to [Get content\n * children](#api-content-id-child-get), except that this method returns child pages at all levels, rather than just\n * the direct child pages.\n *\n * A piece of content has different types of descendants, depending on its type:\n *\n * - `page`: descendant is `page`, `comment`, `attachment`\n * - `blogpost`: descendant is `comment`, `attachment`\n * - `attachment`: descendant is `comment`\n * - `comment`: descendant is `attachment`\n *\n * The map will always include all descendant types that are valid for the content. However, if the content has no\n * instances of a descendant type, the map will contain an empty array for that descendant type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentDescendants<T = Models.ContentChildren>(\n parameters: Parameters.GetContentDescendants,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a map of the descendants of a piece of content. This is similar to [Get content\n * children](#api-content-id-child-get), except that this method returns child pages at all levels, rather than just\n * the direct child pages.\n *\n * A piece of content has different types of descendants, depending on its type:\n *\n * - `page`: descendant is `page`, `comment`, `attachment`\n * - `blogpost`: descendant is `comment`, `attachment`\n * - `attachment`: descendant is `comment`\n * - `comment`: descendant is `attachment`\n *\n * The map will always include all descendant types that are valid for the content. However, if the content has no\n * instances of a descendant type, the map will contain an empty array for that descendant type.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentDescendants<T = Models.ContentChildren>(\n parameters: Parameters.GetContentDescendants,\n callback?: never,\n ): Promise<T>;\n async getContentDescendants<T = Models.ContentChildren>(\n parameters: Parameters.GetContentDescendants,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/descendant`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all descendants of a given type, for a piece of content. This is similar to [Get content children by\n * type](#api-content-id-child-type-get), except that this method returns child pages at all levels, rather than just\n * the direct child pages.\n *\n * A piece of content has different types of descendants, depending on its type:\n *\n * - `page`: descendant is `page`, `comment`, `attachment`\n * - `blogpost`: descendant is `comment`, `attachment`\n * - `attachment`: descendant is `comment`\n * - `comment`: descendant is `attachment`\n *\n * Custom content types that are provided by apps can also be returned.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getDescendantsOfType<T = Models.ContentArray>(\n parameters: Parameters.GetDescendantsOfType,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all descendants of a given type, for a piece of content. This is similar to [Get content children by\n * type](#api-content-id-child-type-get), except that this method returns child pages at all levels, rather than just\n * the direct child pages.\n *\n * A piece of content has different types of descendants, depending on its type:\n *\n * - `page`: descendant is `page`, `comment`, `attachment`\n * - `blogpost`: descendant is `comment`, `attachment`\n * - `attachment`: descendant is `comment`\n * - `comment`: descendant is `attachment`\n *\n * Custom content types that are provided by apps can also be returned.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getDescendantsOfType<T = Models.ContentArray>(\n parameters: Parameters.GetDescendantsOfType,\n callback?: never,\n ): Promise<T>;\n async getDescendantsOfType<T = Models.ContentArray>(\n parameters: Parameters.GetDescendantsOfType,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/descendant/${parameters.type}`,\n method: 'GET',\n params: {\n depth: parameters.depth,\n start: parameters.start,\n limit: parameters.limit,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions\n * and attachments. The id path parameter refers to the content id of the page to copy, and the new parent of this\n * copied page is defined using the destinationPageId in the request body. The titleOptions object defines the rules\n * of renaming page titles during the copy; for example, search and replace can be used in conjunction to rewrite the\n * copied page titles.\n */\n async copyPageHierarchy<T = Models.LongTask>(\n parameters: Parameters.CopyPageHierarchy,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Copy page hierarchy allows the copying of an entire hierarchy of pages and their associated properties, permissions\n * and attachments. The id path parameter refers to the content id of the page to copy, and the new parent of this\n * copied page is defined using the destinationPageId in the request body. The titleOptions object defines the rules\n * of renaming page titles during the copy; for example, search and replace can be used in conjunction to rewrite the\n * copied page titles.\n */\n async copyPageHierarchy<T = Models.LongTask>(parameters: Parameters.CopyPageHierarchy, callback?: never): Promise<T>;\n async copyPageHierarchy<T = Models.LongTask>(\n parameters: Parameters.CopyPageHierarchy,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/pagehierarchy/copy`,\n method: 'POST',\n data: {\n copyAttachments: parameters.copyAttachments,\n copyPermissions: parameters.copyPermissions,\n copyProperties: parameters.copyProperties,\n copyLabels: parameters.copyLabels,\n copyCustomContents: parameters.copyCustomContents,\n copyDescendants: parameters.copyDescendants,\n destinationPageId: parameters.destinationPageId,\n titleOptions: parameters.titleOptions,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Copies a single page and its associated properties, permissions, attachments, and custom contents. The `id` path\n * parameter refers to the content ID of the page to copy. The target of the page to be copied is defined using the\n * `destination` in the request body and can be one of the following types.\n *\n * - `space`: page will be copied to the specified space as a root page on the space\n * - `parent_page`: page will be copied as a child of the specified parent page\n * - `existing_page`: page will be copied and replace the specified page\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the\n * content will be copied in and permission to update the content if copying to an `existing_page`.\n */\n async copyPage<T = unknown>(parameters: Parameters.CopyPage, callback: Callback<T>): Promise<void>;\n /**\n * Copies a single page and its associated properties, permissions, attachments, and custom contents. The `id` path\n * parameter refers to the content ID of the page to copy. The target of the page to be copied is defined using the\n * `destination` in the request body and can be one of the following types.\n *\n * - `space`: page will be copied to the specified space as a root page on the space\n * - `parent_page`: page will be copied as a child of the specified parent page\n * - `existing_page`: page will be copied and replace the specified page\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the\n * content will be copied in and permission to update the content if copying to an `existing_page`.\n */\n async copyPage<T = unknown>(parameters: Parameters.CopyPage, callback?: never): Promise<T>;\n async copyPage<T = unknown>(parameters: Parameters.CopyPage, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/copy`,\n method: 'POST',\n params: {\n expand: parameters.expand,\n },\n data: parameters.bodyParameters,\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,6BAA6B,CAAA;AACpB,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AA8C1B,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAQ,MAAA,CAAA;AAC1C,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,aAAa,EAAE,UAAU,CAAC,aAAa;AACxC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AA2BlD,IAAA,MAAM,QAAQ,CAAsB,UAA+B,EAAE,QAAsB,EAAA;AACzF,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,MAAM,CAAA,MAAA,EAAS,UAAU,CAAC,QAAQ,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AO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contentComments.js","sources":["../../../../src/api/contentComments.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentComments {\n constructor(private client: Client) {}\n\n /**\n * Returns the comments on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentComments<T = Models.ContentArray>(\n parameters: Parameters.GetContentComments,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the comments on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentComments<T = Models.ContentArray>(\n parameters: Parameters.GetContentComments,\n callback?: never,\n ): Promise<T>;\n async getContentComments<T = Models.ContentArray>(\n parameters: Parameters.GetContentComments,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/comment`,\n method: 'GET',\n params: {\n parentVersion: parameters.parentVersion,\n start: parameters.start,\n limit: parameters.limit,\n location: parameters.location,\n depth: parameters.depth,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,eAAe,CAAA;AACN,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAsB1B,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAgB,cAAA,CAAA;AAClD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,aAAa,EAAE,UAAU,CAAC,aAAa;gBACvC,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contentLabels.js","sources":["../../../../src/api/contentLabels.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentLabels {\n constructor(private client: Client) {}\n\n /**\n * Returns the labels on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space and\n * permission to view the content if it is a page.\n */\n async getLabelsForContent<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForContent,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the labels on a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space and\n * permission to view the content if it is a page.\n */\n async getLabelsForContent<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForContent,\n callback?: never,\n ): Promise<T>;\n async getLabelsForContent<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/label`,\n method: 'GET',\n params: {\n prefix: parameters.prefix,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds labels to a piece of content. Does not modify the existing labels.\n *\n * Notes:\n *\n * - Labels can also be added when creating content ([Create content](#api-content-post)).\n * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing\n * labels and replace them with the labels in the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async addLabelsToContent<T = Models.LabelArray>(\n parameters: Parameters.AddLabelsToContent,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds labels to a piece of content. Does not modify the existing labels.\n *\n * Notes:\n *\n * - Labels can also be added when creating content ([Create content](#api-content-post)).\n * - Labels can be updated when updating content ([Update content](#api-content-id-put)). This will delete the existing\n * labels and replace them with the labels in the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async addLabelsToContent<T = Models.LabelArray>(\n parameters: Parameters.AddLabelsToContent,\n callback?: never,\n ): Promise<T>;\n async addLabelsToContent<T = Models.LabelArray>(\n parameters: Parameters.AddLabelsToContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/label`,\n method: 'POST',\n params: {\n 'use-400-error-response': parameters['use-400-error-response'],\n },\n data: parameters.body,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a label from a piece of content. This is similar to [Remove label from\n * content](#api-content-id-label-label-delete) except that the label name is specified via a query parameter.\n *\n * Use this method if the label name has \"/\" characters, as [Remove label from content using query\n * parameter](#api-content-id-label-delete) does not accept \"/\" characters for the label name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async removeLabelFromContentUsingQueryParameter<T = void>(\n parameters: Parameters.RemoveLabelFromContentUsingQueryParameter,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes a label from a piece of content. This is similar to [Remove label from\n * content](#api-content-id-label-label-delete) except that the label name is specified via a query parameter.\n *\n * Use this method if the label name has \"/\" characters, as [Remove label from content using query\n * parameter](#api-content-id-label-delete) does not accept \"/\" characters for the label name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async removeLabelFromContentUsingQueryParameter<T = void>(\n parameters: Parameters.RemoveLabelFromContentUsingQueryParameter,\n callback?: never,\n ): Promise<T>;\n async removeLabelFromContentUsingQueryParameter<T = void>(\n parameters: Parameters.RemoveLabelFromContentUsingQueryParameter,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/label`,\n method: 'DELETE',\n params: {\n name: parameters.name,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a label from a piece of content. This is similar to [Remove label from content using query\n * parameter](#api-content-id-label-delete) except that the label name is specified via a path parameter.\n *\n * Use this method if the label name does not have \"/\" characters, as the path parameter does not accept \"/\"\n * characters for security reasons. Otherwise, use [Remove label from content using query\n * parameter](#api-content-id-label-delete).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async removeLabelFromContent<T = void>(\n parameters: Parameters.RemoveLabelFromContent,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes a label from a piece of content. This is similar to [Remove label from content using query\n * parameter](#api-content-id-label-delete) except that the label name is specified via a path parameter.\n *\n * Use this method if the label name does not have \"/\" characters, as the path parameter does not accept \"/\"\n * characters for security reasons. Otherwise, use [Remove label from content using query\n * parameter](#api-content-id-label-delete).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async removeLabelFromContent<T = void>(parameters: Parameters.RemoveLabelFromContent, callback?: never): Promise<T>;\n async removeLabelFromContent<T = void>(\n parameters: Parameters.RemoveLabelFromContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/label/${parameters.label}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,aAAa,CAAA;AACJ,IAAA,MAAA;AAApB,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AAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AA4BlD,IAAA,MAAM,sBAAsB,CAC1B,UAA6C,EAC7C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,gBAAgB,UAAU,CAAC,EAAE,CAAU,OAAA,EAAA,UAAU,CAAC,KAAK,CAAE,CAAA;AAC9D,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contentMacroBody.js","sources":["../../../../src/api/contentMacroBody.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentMacroBody {\n constructor(private client: Client) {}\n\n /**\n * Returns the body of a macro in storage format, for the given macro ID. This includes information like the name of\n * the macro, the body of the macro, and any macro parameters. This method is mainly used by Cloud apps.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is\n * only modified by Confluence if there are conflicting IDs.\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getMacroBodyByMacroId<T = Models.MacroInstance>(\n parameters: Parameters.GetMacroBodyByMacroId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the body of a macro in storage format, for the given macro ID. This includes information like the name of\n * the macro, the body of the macro, and any macro parameters. This method is mainly used by Cloud apps.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is\n * only modified by Confluence if there are conflicting IDs.\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getMacroBodyByMacroId<T = Models.MacroInstance>(\n parameters: Parameters.GetMacroBodyByMacroId,\n callback?: never,\n ): Promise<T>;\n async getMacroBodyByMacroId<T = Models.MacroInstance>(\n parameters: Parameters.GetMacroBodyByMacroId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the body of a macro in format specified in path, for the given macro ID. This includes information like the\n * name of the macro, the body of the macro, and any macro parameters.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is\n * only modified by Confluence if there are conflicting IDs.\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getAndConvertMacroBodyByMacroId<T = Models.ContentBody>(\n parameters: Parameters.GetAndConvertMacroBodyByMacroId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the body of a macro in format specified in path, for the given macro ID. This includes information like the\n * name of the macro, the body of the macro, and any macro parameters.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '50884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is\n * only modified by Confluence if there are conflicting IDs.\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getAndConvertMacroBodyByMacroId<T = Models.ContentBody>(\n parameters: Parameters.GetAndConvertMacroBodyByMacroId,\n callback?: never,\n ): Promise<T>;\n async getAndConvertMacroBodyByMacroId<T = Models.ContentBody>(\n parameters: Parameters.GetAndConvertMacroBodyByMacroId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}/convert/${parameters.to}`,\n method: 'GET',\n params: {\n spaceKeyContext: parameters.spaceKeyContext,\n embeddedContentRender: parameters.embeddedContentRender,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns Async Id of the conversion task which will convert the macro into a content body of the desired format. The\n * result will be available for 5 minutes after completion of the conversion.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is only\n * modified by Confluence if there are conflicting IDs.\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getAndAsyncConvertMacroBodyByMacroId<T = Models.AsyncId>(\n parameters: Parameters.GetAndAsyncConvertMacroBodyByMacroId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns Async Id of the conversion task which will convert the macro into a content body of the desired format. The\n * result will be available for 5 minutes after completion of the conversion.\n *\n * About the macro ID: When a macro is created in a new version of content, Confluence will generate a random ID for\n * it, unless an ID is specified (by an app). The macro ID will look similar to this:\n * '884bd9-0cb8-41d5-98be-f80943c14f96'. The ID is then persisted as new versions of content are created, and is only\n * modified by Confluence if there are conflicting IDs.\n *\n * Note, to preserve backwards compatibility this resource will also match on the hash of the macro body, even if a\n * macro ID is found. This check will eventually become redundant, as macro IDs are generated for pages and\n * transparently propagate out to all instances.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content that the\n * macro is in.\n */\n async getAndAsyncConvertMacroBodyByMacroId<T = Models.AsyncId>(\n parameters: Parameters.GetAndAsyncConvertMacroBodyByMacroId,\n callback?: never,\n ): Promise<T>;\n async getAndAsyncConvertMacroBodyByMacroId<T = Models.AsyncId>(\n parameters: Parameters.GetAndAsyncConvertMacroBodyByMacroId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/history/${parameters.version}/macro/id/${parameters.macroId}/convert/async/${parameters.to}`,\n method: 'GET',\n params: {\n allowCache: parameters.allowCache,\n spaceKeyContext: parameters.spaceKeyContext,\n embeddedContentRender: parameters.embeddedContentRender,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,gBAAgB,CAAA;AACP,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AA0C1B,IAAA,MAAM,qBAAqB,CACzB,UAA4C,EAC5C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,SAAA,EAAY,UAAU,CAAC,OAAO,CAAA,UAAA,E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@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contentPermissions.js","sources":["../../../../src/api/contentPermissions.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentPermissions {\n constructor(private client: Client) {}\n\n /**\n * Check if a user or a group can perform an operation to the specified content. The `operation` to check must be\n * provided. The user’s account ID or the ID of the group can be provided in the `subject` to check permissions\n * against a specified user or group. The following permission checks are done to make sure that the user or group has\n * the proper access:\n *\n * - Site permissions\n * - Space permissions\n * - Content restrictions\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission) if checking permission for self, otherwise 'Confluence Administrator' global\n * permission is required.\n */\n async checkContentPermission<T = Models.PermissionCheckResponse>(\n parameters: Parameters.CheckContentPermission,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Check if a user or a group can perform an operation to the specified content. The `operation` to check must be\n * provided. The user’s account ID or the ID of the group can be provided in the `subject` to check permissions\n * against a specified user or group. The following permission checks are done to make sure that the user or group has\n * the proper access:\n *\n * - Site permissions\n * - Space permissions\n * - Content restrictions\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission) if checking permission for self, otherwise 'Confluence Administrator' global\n * permission is required.\n */\n async checkContentPermission<T = Models.PermissionCheckResponse>(\n parameters: Parameters.CheckContentPermission,\n callback?: never,\n ): Promise<T>;\n async checkContentPermission<T = Models.PermissionCheckResponse>(\n parameters: Parameters.CheckContentPermission,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/permission/check`,\n method: 'POST',\n data: {\n subject: parameters.subject,\n operation: parameters.operation,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,kBAAkB,CAAA;AACT,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAsC1B,IAAA,MAAM,sBAAsB,CAC1B,UAA6C,EAC7C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAmB,iBAAA,CAAA;AACrD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,SAAS,EAAE,UAAU,CAAC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"contentProperties.js","sources":["../../../../src/api/contentProperties.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentProperties {\n constructor(private client: Client) {}\n\n /**\n * Returns the properties for a piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentProperties<T = Models.ContentPropertyArray>(\n parameters: Parameters.GetContentProperties,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the properties for a piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentProperties<T = Models.ContentPropertyArray>(\n parameters: Parameters.GetContentProperties,\n callback?: never,\n ): Promise<T>;\n async getContentProperties<T = Models.ContentPropertyArray>(\n parameters: Parameters.GetContentProperties,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property`,\n method: 'GET',\n params: {\n key: parameters.key,\n expand: parameters.expand,\n start: parameters.start,\n limit: parameters.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a property for an existing piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * This is the same as [Create content property for key](#api-content-id-property-key-post) except that the key is\n * specified in the request body instead of as a path parameter.\n *\n * Content properties can also be added when creating a new piece of content by including them in the\n * `metadata.properties` of the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a property for an existing piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * This is the same as [Create content property for key](#api-content-id-property-key-post) except that the key is\n * specified in the request body instead of as a path parameter.\n *\n * Content properties can also be added when creating a new piece of content by including them in the\n * `metadata.properties` of the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentProperty,\n callback?: never,\n ): Promise<T>;\n async createContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property`,\n method: 'POST',\n data: {\n key: parameters.key,\n value: parameters.value,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a content property for a piece of content. For more information, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.GetContentProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a content property for a piece of content. For more information, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if it is a page.\n */\n async getContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.GetContentProperty,\n callback?: never,\n ): Promise<T>;\n async getContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.GetContentProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property/${parameters.key}`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a property for an existing piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * This is the same as [Create content property](#api-content-id-property-post) except that the key is specified as a\n * path parameter instead of in the request body.\n *\n * Content properties can also be added when creating a new piece of content by including them in the\n * `metadata.properties` of the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createContentPropertyForKey<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentPropertyForKey,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a property for an existing piece of content. For more information about content properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * This is the same as [Create content property](#api-content-id-property-post) except that the key is specified as a\n * path parameter instead of in the request body.\n *\n * Content properties can also be added when creating a new piece of content by including them in the\n * `metadata.properties` of the request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createContentPropertyForKey<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentPropertyForKey,\n callback?: never,\n ): Promise<T>;\n async createContentPropertyForKey<T = Models.ContentProperty>(\n parameters: Parameters.CreateContentPropertyForKey,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property/${parameters.key}`,\n method: 'POST',\n data: {\n value: parameters.value,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates an existing content property. This method will also create a new property for a piece of content, if the\n * property key does not exist and the property version is 1. For more information about content properties, see\n * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.UpdateContentProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates an existing content property. This method will also create a new property for a piece of content, if the\n * property key does not exist and the property version is 1. For more information about content properties, see\n * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.UpdateContentProperty,\n callback?: never,\n ): Promise<T>;\n async updateContentProperty<T = Models.ContentProperty>(\n parameters: Parameters.UpdateContentProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property/${parameters.key}`,\n method: 'PUT',\n data: {\n value: parameters.value,\n version: parameters.version,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Deletes a content property. For more information about content properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async deleteContentProperty<T = void>(\n parameters: Parameters.DeleteContentProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Deletes a content property. For more information about content properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async deleteContentProperty<T = void>(parameters: Parameters.DeleteContentProperty, callback?: never): Promise<T>;\n async deleteContentProperty<T = void>(\n parameters: Parameters.DeleteContentProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/property/${parameters.key}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,iBAAiB,CAAA;AACR,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAwB1B,IAAA,MAAM,oBAAoB,CACxB,UAA2C,EAC3C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAW,SAAA,CAAA;AAC7C,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,MAAM,EAAE,UAAU,CAAC,MAAM;gBACzB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAmClD,IAAA,MAAM,qBAAqB,CACzB,UAA4C,EAC5C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAW,SAAA,CAAA;AAC7C,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;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