confluence.js 2.0.0 → 2.2.0-dev20260318121920
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/CHANGELOG.md +67 -2
- package/README.md +168 -181
- package/dist/cjs/api/analytics.cjs.map +1 -1
- package/dist/cjs/api/audit.cjs.map +1 -1
- package/dist/cjs/api/content.cjs +0 -5
- package/dist/cjs/api/content.cjs.map +1 -1
- package/dist/cjs/api/contentAttachments.cjs +1 -0
- package/dist/cjs/api/contentAttachments.cjs.map +1 -1
- package/dist/cjs/api/contentBody.cjs +18 -0
- package/dist/cjs/api/contentBody.cjs.map +1 -1
- package/dist/cjs/api/contentChildrenAndDescendants.cjs +2 -0
- package/dist/cjs/api/contentChildrenAndDescendants.cjs.map +1 -1
- package/dist/cjs/api/contentComments.cjs +1 -0
- package/dist/cjs/api/contentComments.cjs.map +1 -1
- package/dist/cjs/api/contentLabels.cjs.map +1 -1
- package/dist/cjs/api/contentMacroBody.cjs.map +1 -1
- package/dist/cjs/api/contentPermissions.cjs.map +1 -1
- package/dist/cjs/api/contentProperties.cjs +1 -0
- package/dist/cjs/api/contentProperties.cjs.map +1 -1
- package/dist/cjs/api/contentRestrictions.cjs.map +1 -1
- package/dist/cjs/api/contentStates.cjs +13 -0
- package/dist/cjs/api/contentStates.cjs.map +1 -1
- package/dist/cjs/api/contentVersions.cjs.map +1 -1
- package/dist/cjs/api/contentWatches.cjs.map +1 -1
- package/dist/cjs/api/dynamicModules.cjs.map +1 -1
- package/dist/cjs/api/experimental.cjs.map +1 -1
- package/dist/cjs/api/group.cjs +18 -17
- package/dist/cjs/api/group.cjs.map +1 -1
- package/dist/cjs/api/index.cjs +2 -0
- package/dist/cjs/api/index.cjs.map +1 -1
- package/dist/cjs/api/inlineTasks.cjs +1 -0
- package/dist/cjs/api/inlineTasks.cjs.map +1 -1
- package/dist/cjs/api/labelInfo.cjs.map +1 -1
- package/dist/cjs/api/longRunningTask.cjs +1 -0
- package/dist/cjs/api/longRunningTask.cjs.map +1 -1
- package/dist/cjs/api/models/labeledContentType.cjs.map +1 -1
- package/dist/cjs/api/relation.cjs.map +1 -1
- package/dist/cjs/api/search.cjs +1 -0
- package/dist/cjs/api/search.cjs.map +1 -1
- package/dist/cjs/api/settings.cjs.map +1 -1
- package/dist/cjs/api/space.cjs +4 -2
- package/dist/cjs/api/space.cjs.map +1 -1
- package/dist/cjs/api/spacePermissions.cjs.map +1 -1
- package/dist/cjs/api/spaceProperties.cjs +1 -0
- package/dist/cjs/api/spaceProperties.cjs.map +1 -1
- package/dist/cjs/api/spaceSettings.cjs.map +1 -1
- package/dist/cjs/api/template.cjs.map +1 -1
- package/dist/cjs/api/themes.cjs.map +1 -1
- package/dist/cjs/api/userProperties.cjs +56 -0
- package/dist/cjs/api/userProperties.cjs.map +1 -0
- package/dist/cjs/api/users.cjs.map +1 -1
- package/dist/cjs/clients/baseClient.cjs +17 -2
- package/dist/cjs/clients/baseClient.cjs.map +1 -1
- package/dist/cjs/clients/confluenceClient.cjs +6 -0
- package/dist/cjs/clients/confluenceClient.cjs.map +1 -1
- package/dist/cjs/config.cjs +7 -4
- package/dist/cjs/config.cjs.map +1 -1
- package/dist/cjs/paramSerializer.cjs.map +1 -1
- package/dist/cjs/services/authenticationService/authenticationService.cjs.map +1 -1
- package/dist/cjs/services/authenticationService/authentications/createBasicAuthenticationToken.cjs.map +1 -1
- package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs +1 -1
- package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs.map +1 -1
- package/dist/cjs/services/authenticationService/base64Encoder.cjs.map +1 -1
- package/dist/esm/api/analytics.mjs.map +1 -1
- package/dist/esm/api/audit.mjs.map +1 -1
- package/dist/esm/api/content.mjs +0 -5
- package/dist/esm/api/content.mjs.map +1 -1
- package/dist/esm/api/contentAttachments.mjs +1 -0
- package/dist/esm/api/contentAttachments.mjs.map +1 -1
- package/dist/esm/api/contentBody.mjs +18 -0
- package/dist/esm/api/contentBody.mjs.map +1 -1
- package/dist/esm/api/contentChildrenAndDescendants.mjs +2 -0
- package/dist/esm/api/contentChildrenAndDescendants.mjs.map +1 -1
- package/dist/esm/api/contentComments.mjs +1 -0
- package/dist/esm/api/contentComments.mjs.map +1 -1
- package/dist/esm/api/contentLabels.mjs.map +1 -1
- package/dist/esm/api/contentMacroBody.mjs.map +1 -1
- package/dist/esm/api/contentPermissions.mjs.map +1 -1
- package/dist/esm/api/contentProperties.mjs +1 -0
- package/dist/esm/api/contentProperties.mjs.map +1 -1
- package/dist/esm/api/contentRestrictions.mjs.map +1 -1
- package/dist/esm/api/contentStates.mjs +13 -0
- package/dist/esm/api/contentStates.mjs.map +1 -1
- package/dist/esm/api/contentVersions.mjs.map +1 -1
- package/dist/esm/api/contentWatches.mjs.map +1 -1
- package/dist/esm/api/dynamicModules.mjs.map +1 -1
- package/dist/esm/api/experimental.mjs.map +1 -1
- package/dist/esm/api/group.mjs +18 -17
- package/dist/esm/api/group.mjs.map +1 -1
- package/dist/esm/api/index.mjs +1 -0
- package/dist/esm/api/index.mjs.map +1 -1
- package/dist/esm/api/inlineTasks.mjs +1 -0
- package/dist/esm/api/inlineTasks.mjs.map +1 -1
- package/dist/esm/api/labelInfo.mjs.map +1 -1
- package/dist/esm/api/longRunningTask.mjs +1 -0
- package/dist/esm/api/longRunningTask.mjs.map +1 -1
- package/dist/esm/api/models/labeledContentType.mjs.map +1 -1
- package/dist/esm/api/relation.mjs.map +1 -1
- package/dist/esm/api/search.mjs +1 -0
- package/dist/esm/api/search.mjs.map +1 -1
- package/dist/esm/api/settings.mjs.map +1 -1
- package/dist/esm/api/space.mjs +4 -2
- package/dist/esm/api/space.mjs.map +1 -1
- package/dist/esm/api/spacePermissions.mjs.map +1 -1
- package/dist/esm/api/spaceProperties.mjs +1 -0
- package/dist/esm/api/spaceProperties.mjs.map +1 -1
- package/dist/esm/api/spaceSettings.mjs.map +1 -1
- package/dist/esm/api/template.mjs.map +1 -1
- package/dist/esm/api/themes.mjs.map +1 -1
- package/dist/esm/api/userProperties.mjs +54 -0
- package/dist/esm/api/userProperties.mjs.map +1 -0
- package/dist/esm/api/users.mjs.map +1 -1
- package/dist/esm/clients/baseClient.mjs +18 -3
- package/dist/esm/clients/baseClient.mjs.map +1 -1
- package/dist/esm/clients/confluenceClient.mjs +6 -0
- package/dist/esm/clients/confluenceClient.mjs.map +1 -1
- package/dist/esm/config.mjs +7 -4
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/paramSerializer.mjs.map +1 -1
- package/dist/esm/services/authenticationService/authenticationService.mjs.map +1 -1
- package/dist/esm/services/authenticationService/authentications/createBasicAuthenticationToken.mjs.map +1 -1
- package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs +1 -1
- package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs.map +1 -1
- package/dist/esm/services/authenticationService/base64Encoder.mjs.map +1 -1
- package/dist/esm/types/api/analytics.d.ts +1 -1
- package/dist/esm/types/api/audit.d.ts +3 -3
- package/dist/esm/types/api/content.d.ts +33 -7
- package/dist/esm/types/api/contentAttachments.d.ts +5 -1
- package/dist/esm/types/api/contentBody.d.ts +73 -7
- package/dist/esm/types/api/contentChildrenAndDescendants.d.ts +37 -5
- package/dist/esm/types/api/contentComments.d.ts +5 -0
- package/dist/esm/types/api/contentLabels.d.ts +17 -9
- package/dist/esm/types/api/contentMacroBody.d.ts +79 -1
- package/dist/esm/types/api/contentPermissions.d.ts +1 -1
- package/dist/esm/types/api/contentProperties.d.ts +25 -0
- package/dist/esm/types/api/contentRestrictions.d.ts +19 -7
- package/dist/esm/types/api/contentStates.d.ts +23 -5
- package/dist/esm/types/api/contentVersions.d.ts +9 -1
- package/dist/esm/types/api/contentWatches.d.ts +1 -1
- package/dist/esm/types/api/dynamicModules.d.ts +1 -1
- package/dist/esm/types/api/experimental.d.ts +21 -1
- package/dist/esm/types/api/group.d.ts +47 -27
- package/dist/esm/types/api/index.d.ts +1 -0
- package/dist/esm/types/api/inlineTasks.d.ts +13 -0
- package/dist/esm/types/api/labelInfo.d.ts +1 -1
- package/dist/esm/types/api/longRunningTask.d.ts +1 -1
- package/dist/esm/types/api/models/spaceCreate.d.ts +11 -2
- package/dist/esm/types/api/models/spacePrivateCreate.d.ts +11 -2
- package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyRequest.d.ts +58 -0
- package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyResponse.d.ts +4 -0
- package/dist/esm/types/api/parameters/deleteGroupById.d.ts +4 -0
- package/dist/esm/types/api/parameters/downloadAttachment.d.ts +6 -0
- package/dist/esm/types/api/parameters/getContentChildren.d.ts +6 -1
- package/dist/esm/types/api/parameters/getContentsWithState.d.ts +17 -0
- package/dist/esm/types/api/parameters/getGroupMembersByGroupId.d.ts +7 -0
- package/dist/esm/types/api/parameters/getGroupMembershipsForUser.d.ts +4 -0
- package/dist/esm/types/api/parameters/getTasks.d.ts +2 -0
- package/dist/esm/types/api/parameters/getUser.d.ts +4 -0
- package/dist/esm/types/api/parameters/index.d.ts +4 -0
- package/dist/esm/types/api/parameters/searchUser.d.ts +7 -0
- package/dist/esm/types/api/relation.d.ts +13 -15
- package/dist/esm/types/api/search.d.ts +7 -1
- package/dist/esm/types/api/settings.d.ts +5 -1
- package/dist/esm/types/api/space.d.ts +23 -7
- package/dist/esm/types/api/spacePermissions.d.ts +1 -1
- package/dist/esm/types/api/spaceProperties.d.ts +25 -0
- package/dist/esm/types/api/spaceSettings.d.ts +1 -1
- package/dist/esm/types/api/template.d.ts +1 -1
- package/dist/esm/types/api/themes.d.ts +1 -1
- package/dist/esm/types/api/userProperties.d.ts +102 -0
- package/dist/esm/types/api/users.d.ts +21 -9
- package/dist/esm/types/clients/baseClient.d.ts +1 -0
- package/dist/esm/types/clients/confluenceClient.d.ts +6 -1
- package/dist/esm/types/config.d.ts +29 -240
- package/eslint.config.ts +11 -16
- package/package.json +34 -33
- package/rollup.config.ts +8 -8
- package/src/api/analytics.ts +1 -1
- package/src/api/audit.ts +3 -3
- package/src/api/content.ts +33 -12
- package/src/api/contentAttachments.ts +6 -1
- package/src/api/contentBody.ts +113 -7
- package/src/api/contentChildrenAndDescendants.ts +39 -5
- package/src/api/contentComments.ts +5 -0
- package/src/api/contentLabels.ts +17 -9
- package/src/api/contentMacroBody.ts +79 -1
- package/src/api/contentPermissions.ts +1 -1
- package/src/api/contentProperties.ts +25 -0
- package/src/api/contentRestrictions.ts +19 -7
- package/src/api/contentStates.ts +47 -5
- package/src/api/contentVersions.ts +9 -1
- package/src/api/contentWatches.ts +1 -1
- package/src/api/dynamicModules.ts +1 -1
- package/src/api/experimental.ts +21 -1
- package/src/api/group.ts +96 -75
- package/src/api/index.ts +1 -0
- package/src/api/inlineTasks.ts +13 -0
- package/src/api/labelInfo.ts +1 -1
- package/src/api/longRunningTask.ts +2 -1
- package/src/api/models/spaceCreate.ts +11 -2
- package/src/api/models/spacePrivateCreate.ts +11 -2
- package/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts +88 -0
- package/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts +4 -0
- package/src/api/parameters/deleteGroupById.ts +4 -0
- package/src/api/parameters/downloadAttachment.ts +6 -0
- package/src/api/parameters/getContentChildren.ts +7 -1
- package/src/api/parameters/getContentsWithState.ts +17 -0
- package/src/api/parameters/getGroupMembersByGroupId.ts +7 -0
- package/src/api/parameters/getGroupMembershipsForUser.ts +4 -0
- package/src/api/parameters/getTasks.ts +2 -0
- package/src/api/parameters/getUser.ts +4 -0
- package/src/api/parameters/index.ts +4 -0
- package/src/api/parameters/searchUser.ts +7 -0
- package/src/api/relation.ts +13 -15
- package/src/api/search.ts +8 -1
- package/src/api/settings.ts +5 -1
- package/src/api/space.ts +27 -9
- package/src/api/spacePermissions.ts +1 -1
- package/src/api/spaceProperties.ts +25 -0
- package/src/api/spaceSettings.ts +1 -1
- package/src/api/template.ts +1 -1
- package/src/api/themes.ts +1 -1
- package/src/api/userProperties.ts +185 -0
- package/src/api/users.ts +21 -9
- package/src/clients/baseClient.ts +24 -8
- package/src/clients/confluenceClient.ts +6 -0
- package/src/config.ts +8 -4
- package/src/services/authenticationService/authentications/createJWTAuthentication.ts +1 -1
- package/favicon.svg +0 -7
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentStates.mjs","sources":["../../../../src/api/contentStates.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 ContentStates {\n constructor(private client: Client) {}\n\n /**\n * Gets the current content state of the draft or current version of content. To specify the draft version, set the\n * parameter status to draft, otherwise archived or current will get the relevant published state.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.GetContentState,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Gets the current content state of the draft or current version of content. To specify the draft version, set the\n * parameter status to draft, otherwise archived or current will get the relevant published state.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.GetContentState,\n callback?: never,\n ): Promise<T>;\n async getContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.GetContentState,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state`,\n method: 'GET',\n params: {\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Sets the content state of the content specified and creates a new version (publishes the content without changing\n * the body) of the content with the new state.\n *\n * You may pass in either an id of a state, or the name and color of a desired new state. If all 3 are passed in, id\n * will be used. If the name and color passed in already exist under the current user's existing custom states, the\n * existing state will be reused. If custom states are disabled in the space of the content (which can be determined\n * by getting the content state space settings of the content's space) then this set will fail.\n *\n * You may not remove a content state via this PUT request. You must use the DELETE method. A specified state is\n * required in the body of this request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async setContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.SetContentState,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Sets the content state of the content specified and creates a new version (publishes the content without changing\n * the body) of the content with the new state.\n *\n * You may pass in either an id of a state, or the name and color of a desired new state. If all 3 are passed in, id\n * will be used. If the name and color passed in already exist under the current user's existing custom states, the\n * existing state will be reused. If custom states are disabled in the space of the content (which can be determined\n * by getting the content state space settings of the content's space) then this set will fail.\n *\n * You may not remove a content state via this PUT request. You must use the DELETE method. A specified state is\n * required in the body of this request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async setContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.SetContentState,\n callback?: never,\n ): Promise<T>;\n async setContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.SetContentState,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state`,\n method: 'PUT',\n params: {\n status: parameters.status,\n },\n data: {\n name: parameters.name,\n color: parameters.color,\n id: parameters.stateId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes the content state of the content specified and creates a new version (publishes the content without\n * changing the body) of the content with the new status.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.RemoveContentState,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes the content state of the content specified and creates a new version (publishes the content without\n * changing the body) of the content with the new status.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.RemoveContentState,\n callback?: never,\n ): Promise<T>;\n async removeContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.RemoveContentState,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state`,\n method: 'DELETE',\n params: {\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Gets content states that are available for the content to be set as. Will return all enabled Space Content States.\n * Will only return most the 3 most recently published custom content states to match UI editor list. To get all\n * custom content states, use the /content-states endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async getAvailableContentStates<T = Models.AvailableContentStates>(\n parameters: Parameters.GetAvailableContentStates,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Gets content states that are available for the content to be set as. Will return all enabled Space Content States.\n * Will only return most the 3 most recently published custom content states to match UI editor list. To get all\n * custom content states, use the /content-states endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async getAvailableContentStates<T = Models.AvailableContentStates>(\n parameters: Parameters.GetAvailableContentStates,\n callback?: never,\n ): Promise<T>;\n async getAvailableContentStates<T = Models.AvailableContentStates>(\n parameters: Parameters.GetAvailableContentStates,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state/available`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Get custom content states that authenticated user has created.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required** Must have user authentication.\n */\n async getCustomContentStates<T = Models.ContentState[]>(callback: Callback<T>): Promise<void>;\n /**\n * Get custom content states that authenticated user has created.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required** Must have user authentication.\n */\n async getCustomContentStates<T = Models.ContentState[]>(callback?: never): Promise<T>;\n async getCustomContentStates<T = Models.ContentState[]>(callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content-states',\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Get content states that are suggested in the space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Space view permission\n */\n async getSpaceContentStates<T = Models.ContentState[]>(\n parameters: Parameters.GetSpaceContentStates,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Get content states that are suggested in the space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Space view permission\n */\n async getSpaceContentStates<T = Models.ContentState[]>(\n parameters: Parameters.GetSpaceContentStates,\n callback?: never,\n ): Promise<T>;\n async getSpaceContentStates<T = Models.ContentState[]>(\n parameters: Parameters.GetSpaceContentStates,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/state`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Get object describing whether content states are allowed at all, if custom content states or space content states\n * are restricted, and a list of space content states allowed for the space if they are not restricted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Space admin permission\n */\n async getContentStateSettings<T = Models.ContentStateSettings>(\n parameters: Parameters.GetContentStateSettings,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Get object describing whether content states are allowed at all, if custom content states or space content states\n * are restricted, and a list of space content states allowed for the space if they are not restricted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Space admin permission\n */\n async getContentStateSettings<T = Models.ContentStateSettings>(\n parameters: Parameters.GetContentStateSettings,\n callback?: never,\n ): Promise<T>;\n async getContentStateSettings<T = Models.ContentStateSettings>(\n parameters: Parameters.GetContentStateSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/state/settings`,\n method: 'GET',\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;;AAsB1B,IAAA,MAAM,eAAe,CACnB,UAAsC,EACt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A;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAkB,gBAAA,CAAA;AACpD,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;IAelD,MAAM,sBAAsB,CAA4B,QAAsB,EAAA;AAC5E,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,qBAAqB;AAC1B,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAqBlD,IAAA,MAAM,qBAAqB,CACzB,UAA4C,EAC5C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAQ,MAAA,CAAA;AAC9C,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAuBlD,IAAA,MAAM,uBAAuB,CAC3B,UAA8C,EAC9C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAiB,eAAA,CAAA;AACvD,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
1
|
+
{"version":3,"file":"contentStates.mjs","sources":["../../../../src/api/contentStates.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Client } from '../clients';\nimport type { Callback } from '../callback';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentStates {\n constructor(private client: Client) {}\n\n /**\n * Gets the current content state of the draft or current version of content. To specify the draft version, set the\n * parameter status to draft, otherwise archived or current will get the relevant published state.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.GetContentState,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Gets the current content state of the draft or current version of content. To specify the draft version, set the\n * parameter status to draft, otherwise archived or current will get the relevant published state.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.GetContentState,\n callback?: never,\n ): Promise<T>;\n async getContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.GetContentState,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state`,\n method: 'GET',\n params: {\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Sets the content state of the content specified and creates a new version (publishes the content without changing\n * the body) of the content with the new state.\n *\n * You may pass in either an id of a state, or the name and color of a desired new state. If all 3 are passed in, id\n * will be used. If the name and color passed in already exist under the current user's existing custom states, the\n * existing state will be reused. If custom states are disabled in the space of the content (which can be determined\n * by getting the content state space settings of the content's space) then this set will fail.\n *\n * You may not remove a content state via this PUT request. You must use the DELETE method. A specified state is\n * required in the body of this request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async setContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.SetContentState,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Sets the content state of the content specified and creates a new version (publishes the content without changing\n * the body) of the content with the new state.\n *\n * You may pass in either an id of a state, or the name and color of a desired new state. If all 3 are passed in, id\n * will be used. If the name and color passed in already exist under the current user's existing custom states, the\n * existing state will be reused. If custom states are disabled in the space of the content (which can be determined\n * by getting the content state space settings of the content's space) then this set will fail.\n *\n * You may not remove a content state via this PUT request. You must use the DELETE method. A specified state is\n * required in the body of this request.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async setContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.SetContentState,\n callback?: never,\n ): Promise<T>;\n async setContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.SetContentState,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state`,\n method: 'PUT',\n params: {\n status: parameters.status,\n },\n data: {\n name: parameters.name,\n color: parameters.color,\n id: parameters.stateId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes the content state of the content specified and creates a new version (publishes the content without\n * changing the body) of the content with the new status.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.RemoveContentState,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes the content state of the content specified and creates a new version (publishes the content without\n * changing the body) of the content with the new status.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async removeContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.RemoveContentState,\n callback?: never,\n ): Promise<T>;\n async removeContentState<T = Models.ContentStateResponse>(\n parameters: Parameters.RemoveContentState,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state`,\n method: 'DELETE',\n params: {\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Gets content states that are available for the content to be set as. Will return all enabled Space Content States.\n * Will only return most the 3 most recently published custom content states to match UI editor list. To get all\n * custom content states, use the /content-states endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async getAvailableContentStates<T = Models.AvailableContentStates>(\n parameters: Parameters.GetAvailableContentStates,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Gets content states that are available for the content to be set as. Will return all enabled Space Content States.\n * Will only return most the 3 most recently published custom content states to match UI editor list. To get all\n * custom content states, use the /content-states endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to edit the content.\n */\n async getAvailableContentStates<T = Models.AvailableContentStates>(\n parameters: Parameters.GetAvailableContentStates,\n callback?: never,\n ): Promise<T>;\n async getAvailableContentStates<T = Models.AvailableContentStates>(\n parameters: Parameters.GetAvailableContentStates,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/state/available`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Get custom content states that authenticated user has created.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required** Must have user authentication.\n */\n async getCustomContentStates<T = Models.ContentState[]>(callback: Callback<T>): Promise<void>;\n /**\n * Get custom content states that authenticated user has created.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required** Must have user authentication.\n */\n async getCustomContentStates<T = Models.ContentState[]>(callback?: never): Promise<T>;\n async getCustomContentStates<T = Models.ContentState[]>(callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content-states',\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Get content states that are suggested in the space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getSpaceContentStates<T = Models.ContentState[]>(\n parameters: Parameters.GetSpaceContentStates,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Get content states that are suggested in the space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getSpaceContentStates<T = Models.ContentState[]>(\n parameters: Parameters.GetSpaceContentStates,\n callback?: never,\n ): Promise<T>;\n async getSpaceContentStates<T = Models.ContentState[]>(\n parameters: Parameters.GetSpaceContentStates,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/state`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Get object describing whether content states are allowed at all, if custom content states or space content states\n * are restricted, and a list of space content states allowed for the space if they are not restricted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async getContentStateSettings<T = Models.ContentStateSettings>(\n parameters: Parameters.GetContentStateSettings,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Get object describing whether content states are allowed at all, if custom content states or space content states\n * are restricted, and a list of space content states allowed for the space if they are not restricted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Admin' permission for the space.\n */\n async getContentStateSettings<T = Models.ContentStateSettings>(\n parameters: Parameters.GetContentStateSettings,\n callback?: never,\n ): Promise<T>;\n async getContentStateSettings<T = Models.ContentStateSettings>(\n parameters: Parameters.GetContentStateSettings,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/state/settings`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns all content that has the provided content state in a space.\n *\n * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the\n * query limit parameter will be restricted to a maximum value of 25.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getContentsWithState<T = Models.ContentArray>(\n parameters: Parameters.GetContentsWithState,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all content that has the provided content state in a space.\n *\n * If the expand query parameter is used with the `body.export_view` and/or `body.styled_view` properties, then the\n * query limit parameter will be restricted to a maximum value of 25.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space.\n */\n async getContentsWithState<T = Models.ContentArray>(\n parameters: Parameters.GetContentsWithState,\n callback?: never,\n ): Promise<T>;\n async getContentsWithState<T = Models.ContentArray>(\n parameters: Parameters.GetContentsWithState,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/state/content`,\n method: 'GET',\n params: {\n 'state-id': parameters.stateId,\n expand: parameters.expand,\n limit: parameters.limit,\n start: parameters.start,\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,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AAsBrC,IAAA,MAAM,eAAe,CACnB,UAAsC,EACtC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,MAAA,CAAQ;AAC1C,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;IAClD;AAsCA,IAAA,MAAM,eAAe,CACnB,UAAsC,EACtC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,MAAA,CAAQ;AAC1C,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;AACD,YAAA,IAAI,EAAE;gBACJ,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,EAAE,EAAE,UAAU,CAAC,OAAO;AACvB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAsBA,IAAA,MAAM,k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GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAA,eAAA,CAAiB;AACvD,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AA0BA,IAAA,MAAM,oBAAoB,CACxB,UAA2C,EAC3C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAA,cAAA,CAAgB;AACtD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,UAAU,EAAE,UAAU,CAAC,OAAO;gBAC9B,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;IAClD;AACD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentVersions.mjs","sources":["../../../../src/api/contentVersions.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type {
|
|
1
|
+
{"version":3,"file":"contentVersions.mjs","sources":["../../../../src/api/contentVersions.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Client } from '../clients';\nimport type { Callback } from '../callback';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentVersions {\n constructor(private client: Client) {}\n\n /**\n * Returns the versions for a piece of content in descending order.\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 * @deprecated Will be removed in next major version.\n */\n async getContentVersions<T = Models.VersionArray>(\n parameters: Parameters.GetContentVersions,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the versions for a piece of content in descending order.\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 * @deprecated Will be removed in next major version.\n */\n async getContentVersions<T = Models.VersionArray>(\n parameters: Parameters.GetContentVersions,\n callback?: never,\n ): Promise<T>;\n async getContentVersions<T = Models.VersionArray>(\n parameters: Parameters.GetContentVersions,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/version`,\n method: 'GET',\n params: {\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 * Restores a historical version to be the latest version. That is, a new version is created with the content of the\n * historical version.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async restoreContentVersion<T = Models.Version>(\n parameters: Parameters.RestoreContentVersion,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Restores a historical version to be the latest version. That is, a new version is created with the content of the\n * historical version.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async restoreContentVersion<T = Models.Version>(\n parameters: Parameters.RestoreContentVersion,\n callback?: never,\n ): Promise<T>;\n async restoreContentVersion<T = Models.Version>(\n parameters: Parameters.RestoreContentVersion,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/version`,\n method: 'POST',\n params: {\n expand: parameters.expand,\n },\n data: {\n operationKey: parameters.operationKey,\n params: parameters.params,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a version for a piece of content.\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 * @deprecated Will be removed in next major version.\n */\n async getContentVersion<T = Models.Version>(\n parameters: Parameters.GetContentVersion,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a version for a piece of content.\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 * @deprecated Will be removed in next major version.\n */\n async getContentVersion<T = Models.Version>(parameters: Parameters.GetContentVersion, callback?: never): Promise<T>;\n async getContentVersion<T = Models.Version>(\n parameters: Parameters.GetContentVersion,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/version/${parameters.versionNumber}`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Delete a historical version. This does not delete the changes made to the content in that version, rather the\n * changes for the deleted version are rolled up into the next version. Note, you cannot delete the current version.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async deleteContentVersion<T = void>(\n parameters: Parameters.DeleteContentVersion,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Delete a historical version. This does not delete the changes made to the content in that version, rather the\n * changes for the deleted version are rolled up into the next version. Note, you cannot delete the current version.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async deleteContentVersion<T = void>(parameters: Parameters.DeleteContentVersion, callback?: never): Promise<T>;\n async deleteContentVersion<T = void>(\n parameters: Parameters.DeleteContentVersion,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/version/${parameters.versionNumber}`,\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,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AA0BrC,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;A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QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,gBAAgB,UAAU,CAAC,EAAE,CAAA,SAAA,EAAY,UAAU,CAAC,aAAa,CAAA,CAAE;AACxE,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentWatches.mjs","sources":["../../../../src/api/contentWatches.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 ContentWatches {\n constructor(private client: Client) {}\n\n /**\n * Returns the watches for a page. A user that watches a page will receive receive notifications when the page is\n * updated.\n *\n * If you want to manage watches for a page, use the following `user` methods:\n *\n * - [Get content watch status for user](#api-user-watch-content-contentId-get)\n * - [Add content watch](#api-user-watch-content-contentId-post)\n * - [Remove content watch](#api-user-watch-content-contentId-delete)\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getWatchesForPage<T = Models.WatchArray>(\n parameters: Parameters.GetWatchesForPage,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the watches for a page. A user that watches a page will receive receive notifications when the page is\n * updated.\n *\n * If you want to manage watches for a page, use the following `user` methods:\n *\n * - [Get content watch status for user](#api-user-watch-content-contentId-get)\n * - [Add content watch](#api-user-watch-content-contentId-post)\n * - [Remove content watch](#api-user-watch-content-contentId-delete)\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getWatchesForPage<T = Models.WatchArray>(\n parameters: Parameters.GetWatchesForPage,\n callback?: never,\n ): Promise<T>;\n async getWatchesForPage<T = Models.WatchArray>(\n parameters: Parameters.GetWatchesForPage,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/notification/child-created`,\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 all space watches for the space that the content is in. A user that watches a space will receive receive\n * notifications when any content in the space is updated.\n *\n * If you want to manage watches for a space, use the following `user` methods:\n *\n * - [Get space watch status for user](#api-user-watch-space-spaceKey-get)\n * - [Add space watch](#api-user-watch-space-spaceKey-post)\n * - [Remove space watch](#api-user-watch-space-spaceKey-delete)\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getWatchesForSpace<T = Models.SpaceWatchArray>(\n parameters: Parameters.GetWatchesForSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all space watches for the space that the content is in. A user that watches a space will receive receive\n * notifications when any content in the space is updated.\n *\n * If you want to manage watches for a space, use the following `user` methods:\n *\n * - [Get space watch status for user](#api-user-watch-space-spaceKey-get)\n * - [Add space watch](#api-user-watch-space-spaceKey-post)\n * - [Remove space watch](#api-user-watch-space-spaceKey-delete)\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getWatchesForSpace<T = Models.SpaceWatchArray>(\n parameters: Parameters.GetWatchesForSpace,\n callback?: never,\n ): Promise<T>;\n async getWatchesForSpace<T = Models.SpaceWatchArray>(\n parameters: Parameters.GetWatchesForSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/notification/created`,\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 /** Returns a list of watchers of a space */\n async getWatchersForSpace<T = Models.SpaceWatchArray>(\n parameters: Parameters.GetWatchersForSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /** Returns a list of watchers of a space */\n async getWatchersForSpace<T = Models.SpaceWatchArray>(\n parameters: Parameters.GetWatchersForSpace,\n callback?: never,\n ): Promise<T>;\n async getWatchersForSpace<T = Models.SpaceWatchArray>(\n parameters: Parameters.GetWatchersForSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/watch`,\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 whether a user is watching a piece of content. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 getContentWatchStatus<T = Models.UserWatch>(\n parameters: Parameters.GetContentWatchStatus,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns whether a user is watching a piece of content. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 getContentWatchStatus<T = Models.UserWatch>(\n parameters: Parameters.GetContentWatchStatus,\n callback?: never,\n ): Promise<T>;\n async getContentWatchStatus<T = Models.UserWatch>(\n parameters: Parameters.GetContentWatchStatus,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/content/${parameters.contentId}`,\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a user as a watcher to a piece of content. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\n *\n * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF\n * protection.\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 addContentWatcher<T = void>(parameters: Parameters.AddContentWatcher, callback: Callback<T>): Promise<void>;\n /**\n * Adds a user as a watcher to a piece of content. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\n *\n * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF\n * protection.\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 addContentWatcher<T = void>(parameters: Parameters.AddContentWatcher, callback?: never): Promise<T>;\n async addContentWatcher<T = void>(\n parameters: Parameters.AddContentWatcher,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/content/${parameters.contentId}`,\n method: 'POST',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a user as a watcher from a piece of content. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 removeContentWatcher<T = void>(\n parameters: Parameters.RemoveContentWatcher,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes a user as a watcher from a piece of content. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 removeContentWatcher<T = void>(parameters: Parameters.RemoveContentWatcher, callback?: never): Promise<T>;\n async removeContentWatcher<T = void>(\n parameters: Parameters.RemoveContentWatcher,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/content/${parameters.contentId}`,\n method: 'DELETE',\n headers: {\n 'X-Atlassian-Token': parameters['X-Atlassian-Token'],\n },\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns whether a user is watching a label. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 isWatchingLabel<T = Models.UserWatch>(\n parameters: Parameters.IsWatchingLabel,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns whether a user is watching a label. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 isWatchingLabel<T = Models.UserWatch>(parameters: Parameters.IsWatchingLabel, callback?: never): Promise<T>;\n async isWatchingLabel<T = Models.UserWatch>(\n parameters: Parameters.IsWatchingLabel,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/label/${parameters.labelName}`,\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a user as a watcher to a label. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\n *\n * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF\n * protection.\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 addLabelWatcher<T = void>(parameters: Parameters.AddLabelWatcher, callback: Callback<T>): Promise<void>;\n /**\n * Adds a user as a watcher to a label. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\n *\n * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF\n * protection.\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 addLabelWatcher<T = void>(parameters: Parameters.AddLabelWatcher, callback?: never): Promise<T>;\n async addLabelWatcher<T = void>(parameters: Parameters.AddLabelWatcher, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/label/${parameters.labelName}`,\n method: 'POST',\n headers: {\n 'X-Atlassian-Token': parameters['X-Atlassian-Token'],\n },\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a user as a watcher from a label. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 removeLabelWatcher<T = void>(parameters: Parameters.RemoveLabelWatcher, callback: Callback<T>): Promise<void>;\n /**\n * Removes a user as a watcher from a label. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 removeLabelWatcher<T = void>(parameters: Parameters.RemoveLabelWatcher, callback?: never): Promise<T>;\n async removeLabelWatcher<T = void>(\n parameters: Parameters.RemoveLabelWatcher,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/label/${parameters.labelName}`,\n method: 'DELETE',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns whether a user is watching a space. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 isWatchingSpace<T = Models.UserWatch>(\n parameters: Parameters.IsWatchingSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns whether a user is watching a space. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 isWatchingSpace<T = Models.UserWatch>(parameters: Parameters.IsWatchingSpace, callback?: never): Promise<T>;\n async isWatchingSpace<T = Models.UserWatch>(\n parameters: Parameters.IsWatchingSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/space/${parameters.spaceKey}`,\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a user as a watcher to a space. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\n *\n * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF\n * protection.\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 addSpaceWatcher<T = void>(parameters: Parameters.AddSpaceWatcher, callback: Callback<T>): Promise<void>;\n /**\n * Adds a user as a watcher to a space. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\n *\n * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF\n * protection.\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 addSpaceWatcher<T = void>(parameters: Parameters.AddSpaceWatcher, callback?: never): Promise<T>;\n async addSpaceWatcher<T = void>(parameters: Parameters.AddSpaceWatcher, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/space/${parameters.spaceKey}`,\n method: 'POST',\n headers: {\n 'X-Atlassian-Token': parameters['X-Atlassian-Token'],\n },\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a user as a watcher from a space. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 removeSpaceWatch<T = void>(parameters: Parameters.RemoveSpaceWatch, callback: Callback<T>): Promise<void>;\n /**\n * Removes a user as a watcher from a space. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 removeSpaceWatch<T = void>(parameters: Parameters.RemoveSpaceWatch, callback?: never): Promise<T>;\n async removeSpaceWatch<T = void>(parameters: Parameters.RemoveSpaceWatch, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/space/${parameters.spaceKey}`,\n method: 'DELETE',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,cAAc,CAAA;AACL,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAoC1B,IAAA,MAAM,iBAAiB,CACrB,UAAwC,EACxC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAA6B,2BAAA,CAAA;AAC/D,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,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;;AAqClD,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,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AC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AA6BlD,IAAA,MAAM,eAAe,CAAW,UAAsC,EAAE,QAAsB,EAAA;AAC5F,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,sBAAA,EAAyB,UAAU,CAAC,QAAQ,CAAE,CAAA;AACnD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,OAAO,EAAE;AACP,gBAAA,mBAAmB,EAAE,UAAU,CAAC,mBAAmB,CAAC;AACrD,aAAA;AACD,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAuBlD,IAAA,MAAM,gBAAgB,CAAW,UAAuC,EAAE,QAAsB,EAAA;AAC9F,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,sBAAA,EAAyB,UAAU,CAAC,QAAQ,CAAE,CAAA;AACnD,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
1
|
+
{"version":3,"file":"contentWatches.mjs","sources":["../../../../src/api/contentWatches.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Client } from '../clients';\nimport type { Callback } from '../callback';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentWatches {\n constructor(private client: Client) {}\n\n /**\n * Returns the watches for a page. A user that watches a page will receive receive notifications when the page is\n * updated.\n *\n * If you want to manage watches for a page, use the following `user` methods:\n *\n * - [Get content watch status for user](#api-user-watch-content-contentId-get)\n * - [Add content watch](#api-user-watch-content-contentId-post)\n * - [Remove content watch](#api-user-watch-content-contentId-delete)\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getWatchesForPage<T = Models.WatchArray>(\n parameters: Parameters.GetWatchesForPage,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the watches for a page. A user that watches a page will receive receive notifications when the page is\n * updated.\n *\n * If you want to manage watches for a page, use the following `user` methods:\n *\n * - [Get content watch status for user](#api-user-watch-content-contentId-get)\n * - [Add content watch](#api-user-watch-content-contentId-post)\n * - [Remove content watch](#api-user-watch-content-contentId-delete)\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getWatchesForPage<T = Models.WatchArray>(\n parameters: Parameters.GetWatchesForPage,\n callback?: never,\n ): Promise<T>;\n async getWatchesForPage<T = Models.WatchArray>(\n parameters: Parameters.GetWatchesForPage,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/notification/child-created`,\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 all space watches for the space that the content is in. A user that watches a space will receive receive\n * notifications when any content in the space is updated.\n *\n * If you want to manage watches for a space, use the following `user` methods:\n *\n * - [Get space watch status for user](#api-user-watch-space-spaceKey-get)\n * - [Add space watch](#api-user-watch-space-spaceKey-post)\n * - [Remove space watch](#api-user-watch-space-spaceKey-delete)\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getWatchesForSpace<T = Models.SpaceWatchArray>(\n parameters: Parameters.GetWatchesForSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all space watches for the space that the content is in. A user that watches a space will receive receive\n * notifications when any content in the space is updated.\n *\n * If you want to manage watches for a space, use the following `user` methods:\n *\n * - [Get space watch status for user](#api-user-watch-space-spaceKey-get)\n * - [Add space watch](#api-user-watch-space-spaceKey-post)\n * - [Remove space watch](#api-user-watch-space-spaceKey-delete)\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getWatchesForSpace<T = Models.SpaceWatchArray>(\n parameters: Parameters.GetWatchesForSpace,\n callback?: never,\n ): Promise<T>;\n async getWatchesForSpace<T = Models.SpaceWatchArray>(\n parameters: Parameters.GetWatchesForSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/notification/created`,\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 /** Returns a list of watchers of a space */\n async getWatchersForSpace<T = Models.SpaceWatchArray>(\n parameters: Parameters.GetWatchersForSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /** Returns a list of watchers of a space */\n async getWatchersForSpace<T = Models.SpaceWatchArray>(\n parameters: Parameters.GetWatchersForSpace,\n callback?: never,\n ): Promise<T>;\n async getWatchersForSpace<T = Models.SpaceWatchArray>(\n parameters: Parameters.GetWatchersForSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/watch`,\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 whether a user is watching a piece of content. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 getContentWatchStatus<T = Models.UserWatch>(\n parameters: Parameters.GetContentWatchStatus,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns whether a user is watching a piece of content. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 getContentWatchStatus<T = Models.UserWatch>(\n parameters: Parameters.GetContentWatchStatus,\n callback?: never,\n ): Promise<T>;\n async getContentWatchStatus<T = Models.UserWatch>(\n parameters: Parameters.GetContentWatchStatus,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/content/${parameters.contentId}`,\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a user as a watcher to a piece of content. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\n *\n * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF\n * protection.\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 addContentWatcher<T = void>(parameters: Parameters.AddContentWatcher, callback: Callback<T>): Promise<void>;\n /**\n * Adds a user as a watcher to a piece of content. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\n *\n * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF\n * protection.\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 addContentWatcher<T = void>(parameters: Parameters.AddContentWatcher, callback?: never): Promise<T>;\n async addContentWatcher<T = void>(\n parameters: Parameters.AddContentWatcher,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/content/${parameters.contentId}`,\n method: 'POST',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a user as a watcher from a piece of content. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 removeContentWatcher<T = void>(\n parameters: Parameters.RemoveContentWatcher,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Removes a user as a watcher from a piece of content. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 removeContentWatcher<T = void>(parameters: Parameters.RemoveContentWatcher, callback?: never): Promise<T>;\n async removeContentWatcher<T = void>(\n parameters: Parameters.RemoveContentWatcher,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/content/${parameters.contentId}`,\n method: 'DELETE',\n headers: {\n 'X-Atlassian-Token': parameters['X-Atlassian-Token'],\n },\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns whether a user is watching a label. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 isWatchingLabel<T = Models.UserWatch>(\n parameters: Parameters.IsWatchingLabel,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns whether a user is watching a label. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 isWatchingLabel<T = Models.UserWatch>(parameters: Parameters.IsWatchingLabel, callback?: never): Promise<T>;\n async isWatchingLabel<T = Models.UserWatch>(\n parameters: Parameters.IsWatchingLabel,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/label/${parameters.labelName}`,\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a user as a watcher to a label. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\n *\n * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF\n * protection.\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 addLabelWatcher<T = void>(parameters: Parameters.AddLabelWatcher, callback: Callback<T>): Promise<void>;\n /**\n * Adds a user as a watcher to a label. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\n *\n * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF\n * protection.\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 addLabelWatcher<T = void>(parameters: Parameters.AddLabelWatcher, callback?: never): Promise<T>;\n async addLabelWatcher<T = void>(parameters: Parameters.AddLabelWatcher, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/label/${parameters.labelName}`,\n method: 'POST',\n headers: {\n 'X-Atlassian-Token': parameters['X-Atlassian-Token'],\n },\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a user as a watcher from a label. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 removeLabelWatcher<T = void>(parameters: Parameters.RemoveLabelWatcher, callback: Callback<T>): Promise<void>;\n /**\n * Removes a user as a watcher from a label. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 removeLabelWatcher<T = void>(parameters: Parameters.RemoveLabelWatcher, callback?: never): Promise<T>;\n async removeLabelWatcher<T = void>(\n parameters: Parameters.RemoveLabelWatcher,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/label/${parameters.labelName}`,\n method: 'DELETE',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns whether a user is watching a space. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 isWatchingSpace<T = Models.UserWatch>(\n parameters: Parameters.IsWatchingSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns whether a user is watching a space. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 isWatchingSpace<T = Models.UserWatch>(parameters: Parameters.IsWatchingSpace, callback?: never): Promise<T>;\n async isWatchingSpace<T = Models.UserWatch>(\n parameters: Parameters.IsWatchingSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/space/${parameters.spaceKey}`,\n method: 'GET',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a user as a watcher to a space. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\n *\n * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF\n * protection.\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 addSpaceWatcher<T = void>(parameters: Parameters.AddSpaceWatcher, callback: Callback<T>): Promise<void>;\n /**\n * Adds a user as a watcher to a space. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\n *\n * Note, you must add the `X-Atlassian-Token: no-check` header when making a request, as this operation has XSRF\n * protection.\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 addSpaceWatcher<T = void>(parameters: Parameters.AddSpaceWatcher, callback?: never): Promise<T>;\n async addSpaceWatcher<T = void>(parameters: Parameters.AddSpaceWatcher, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/space/${parameters.spaceKey}`,\n method: 'POST',\n headers: {\n 'X-Atlassian-Token': parameters['X-Atlassian-Token'],\n },\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Removes a user as a watcher from a space. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 removeSpaceWatch<T = void>(parameters: Parameters.RemoveSpaceWatch, callback: Callback<T>): Promise<void>;\n /**\n * Removes a user as a watcher from a space. Choose the user by doing one of the following:\n *\n * - Specify a user via a query parameter: Use the `accountId` to identify the user.\n * - Do not specify a user: The currently logged-in user will be used.\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 removeSpaceWatch<T = void>(parameters: Parameters.RemoveSpaceWatch, callback?: never): Promise<T>;\n async removeSpaceWatch<T = void>(parameters: Parameters.RemoveSpaceWatch, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/watch/space/${parameters.spaceKey}`,\n method: 'DELETE',\n params: {\n key: parameters.key,\n username: parameters.username,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,cAAc,CAAA;AACL,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AAoCrC,IAAA,MAAM,iBAAiB,CACrB,UAAwC,EACxC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,2BAAA,CAA6B;AAC/D,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,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;IAClD;AAoCA,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,qBAAA,CAAuB;AACzD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,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;IAClD;AAYA,IAAA,MAAM,mBAAmB,CACvB,UAA0C,EAC1C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAA,MAAA,CAAQ;AAC9C,YAAA,MAAM,EAAE,KAAK;AACb,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G,EAAE,UAAU,CAAC,GAAG;gBACnB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAsBA,IAAA,MAAM,gBAAgB,CAAW,UAAuC,EAAE,QAAsB,EAAA;AAC9F,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,sBAAA,EAAyB,UAAU,CAAC,QAAQ,CAAA,CAAE;AACnD,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,MAAM,EAAE;gBACN,GAAG,EAAE,UAAU,CAAC,GAAG;gBACnB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"dynamicModules.mjs","sources":["../../../../src/api/dynamicModules.ts"],"sourcesContent":["import type * as Parameters from './parameters';\nimport type {
|
|
1
|
+
{"version":3,"file":"dynamicModules.mjs","sources":["../../../../src/api/dynamicModules.ts"],"sourcesContent":["import type * as Parameters from './parameters';\nimport type { Client } from '../clients';\nimport type { Callback } from '../callback';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class DynamicModules {\n constructor(private client: Client) {}\n\n /**\n * Returns all modules registered dynamically by the calling app.\n *\n * **[Permissions](#permissions) required:** Only Connect apps can make this request.\n */\n async getModules<T = unknown>(callback: Callback<T>): Promise<void>;\n /**\n * Returns all modules registered dynamically by the calling app.\n *\n * **[Permissions](#permissions) required:** Only Connect apps can make this request.\n */\n async getModules<T = unknown>(callback?: never): Promise<T>;\n async getModules<T = unknown>(callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/atlassian-connect/1/app/module/dynamic',\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Registers a list of modules. For the list of modules that support dynamic registration, see [Dynamic\n * modules](https://developer.atlassian.com/cloud/confluence/dynamic-modules/).\n *\n * **[Permissions](#permissions) required:** Only Connect apps can make this request.\n */\n async registerModules<T = unknown>(\n parameters: Parameters.RegisterModules | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Registers a list of modules. For the list of modules that support dynamic registration, see [Dynamic\n * modules](https://developer.atlassian.com/cloud/confluence/dynamic-modules/).\n *\n * **[Permissions](#permissions) required:** Only Connect apps can make this request.\n */\n async registerModules<T = unknown>(parameters?: Parameters.RegisterModules, callback?: never): Promise<T>;\n async registerModules<T = unknown>(\n parameters?: Parameters.RegisterModules,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/atlassian-connect/1/app/module/dynamic',\n method: 'POST',\n data: parameters,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Remove all or a list of modules registered by the calling app.\n *\n * **[Permissions](#permissions) required:** Only Connect apps can make this request.\n */\n async removeModules<T = void>(parameters: Parameters.RemoveModules, callback: Callback<T>): Promise<void>;\n /**\n * Remove all or a list of modules registered by the calling app.\n *\n * **[Permissions](#permissions) required:** Only Connect apps can make this request.\n */\n async removeModules<T = void>(parameters: Parameters.RemoveModules, callback?: never): Promise<T>;\n async removeModules<T = void>(parameters: Parameters.RemoveModules, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/atlassian-connect/1/app/module/dynamic',\n method: 'DELETE',\n params: {\n moduleKey: parameters.moduleKey,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAKa,cAAc,CAAA;AACL,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;IAcrC,MAAM,UAAU,CAAc,QAAsB,EAAA;AAClD,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,yCAAyC;AAC9C,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAmBA,IAAA,MAAM,eAAe,CACnB,UAAuC,EACvC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,yCAAyC;AAC9C,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE,UAAU;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAcA,IAAA,MAAM,aAAa,CAAW,UAAoC,EAAE,QAAsB,EAAA;AACxF,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,yCAAyC;AAC9C,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,MAAM,EAAE;gBACN,SAAS,EAAE,UAAU,CAAC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"experimental.mjs","sources":["../../../../src/api/experimental.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 Experimental {\n constructor(private client: Client) {}\n\n /**\n * Moves a pagetree rooted at a page to the space's trash:\n *\n * - If the content's type is `page` and its status is `current`, it will be trashed including all its descendants.\n * - For every other combination of content type and status, this API is not supported.\n *\n * This API accepts the pageTree delete request and returns a task ID. The delete process happens asynchronously.\n *\n * Use the `/longtask/<taskId>` REST API to get the copy task status.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the\n * content is in.\n */\n async deletePageTree<T = Models.LongTask>(\n parameters: Parameters.DeletePageTree,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Moves a pagetree rooted at a page to the space's trash:\n *\n * - If the content's type is `page` and its status is `current`, it will be trashed including all its descendants.\n * - For every other combination of content type and status, this API is not supported.\n *\n * This API accepts the pageTree delete request and returns a task ID. The delete process happens asynchronously.\n *\n * Use the `/longtask/<taskId>` REST API to get the copy task status.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the\n * content is in.\n */\n async deletePageTree<T = Models.LongTask>(parameters: Parameters.DeletePageTree, callback?: never): Promise<T>;\n async deletePageTree<T = Models.LongTask>(\n parameters: Parameters.DeletePageTree,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/pageTree`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different\n * types of labels.\n */\n async getLabelsForSpace<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different\n * types of labels.\n */\n async getLabelsForSpace<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForSpace,\n callback?: never,\n ): Promise<T>;\n async getLabelsForSpace<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/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 addLabelsToSpace<T = Models.LabelArray>(\n parameters: Parameters.AddLabelsToSpace,\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 addLabelsToSpace<T = Models.LabelArray>(parameters: Parameters.AddLabelsToSpace, callback?: never): Promise<T>;\n async addLabelsToSpace<T = Models.LabelArray>(\n parameters: Parameters.AddLabelsToSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/label`,\n method: 'POST',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n async deleteLabelFromSpace<T = void>(\n parameters: Parameters.DeleteLabelFromSpace,\n callback: Callback<T>,\n ): Promise<void>;\n async deleteLabelFromSpace<T = void>(parameters: Parameters.DeleteLabelFromSpace, callback?: never): Promise<T>;\n async deleteLabelFromSpace<T = void>(\n parameters: Parameters.DeleteLabelFromSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/label`,\n method: 'DELETE',\n params: {\n name: parameters.name,\n prefix: parameters.prefix,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the properties for a user as list of property keys. For more information about user properties, see\n * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n * `Note`, these properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getUserProperties<T = Models.UserPropertyKeyArray>(\n parameters: Parameters.GetUserProperties,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the properties for a user as list of property keys. For more information about user properties, see\n * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n * `Note`, these properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getUserProperties<T = Models.UserPropertyKeyArray>(\n parameters: Parameters.GetUserProperties,\n callback?: never,\n ): Promise<T>;\n async getUserProperties<T = Models.UserPropertyKeyArray>(\n parameters: Parameters.GetUserProperties,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/property`,\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 property corresponding to `key` for a user. For more information about user properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getUserProperty<T = Models.UserProperty>(\n parameters: Parameters.GetUserProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the property corresponding to `key` for a user. For more information about user properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getUserProperty<T = Models.UserProperty>(parameters: Parameters.GetUserProperty, callback?: never): Promise<T>;\n async getUserProperty<T = Models.UserProperty>(\n parameters: Parameters.GetUserProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/property/${parameters.key}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a property for a user. For more information about user properties, see [Confluence entity properties]\n * (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored\n * against a user are on a Confluence site level and not space/content level.\n *\n * `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by\n * fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access\n * the Confluence site ('Can use' global permission).\n */\n async createUserProperty<T = unknown>(\n parameters: Parameters.CreateUserProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a property for a user. For more information about user properties, see [Confluence entity properties]\n * (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored\n * against a user are on a Confluence site level and not space/content level.\n *\n * `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by\n * fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access\n * the Confluence site ('Can use' global permission).\n */\n async createUserProperty<T = unknown>(parameters: Parameters.CreateUserProperty, callback?: never): Promise<T>;\n async createUserProperty<T = unknown>(\n parameters: Parameters.CreateUserProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/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 property for the given user. Note, you cannot update the key of a user property, only the value. For more\n * information about user properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async updateUserProperty<T = void>(parameters: Parameters.UpdateUserProperty, callback: Callback<T>): Promise<void>;\n /**\n * Updates a property for the given user. Note, you cannot update the key of a user property, only the value. For more\n * information about user properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async updateUserProperty<T = void>(parameters: Parameters.UpdateUserProperty, callback?: never): Promise<T>;\n async updateUserProperty<T = void>(\n parameters: Parameters.UpdateUserProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/property/${parameters.key}`,\n method: 'PUT',\n data: {\n value: parameters.value,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Deletes a property for the given user. For more information about user properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async deleteUserProperty<T = void>(parameters: Parameters.DeleteUserProperty, callback: Callback<T>): Promise<void>;\n /**\n * Deletes a property for the given user. For more information about user properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async deleteUserProperty<T = void>(parameters: Parameters.DeleteUserProperty, callback?: never): Promise<T>;\n async deleteUserProperty<T = void>(\n parameters: Parameters.DeleteUserProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/property/${parameters.key}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,YAAY,CAAA;AACH,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,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A,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,aAAa,UAAU,CAAC,MAAM,CAAa,UAAA,EAAA,UAAU,CAAC,GAAG,CAAE,CAAA;AAChE,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE;gBACJ,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAqBlD,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,aAAa,UAAU,CAAC,MAAM,CAAa,UAAA,EAAA,UAAU,CAAC,GAAG,CAAE,CAAA;AAChE,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
1
|
+
{"version":3,"file":"experimental.mjs","sources":["../../../../src/api/experimental.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Client } from '../clients';\nimport type { Callback } from '../callback';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class Experimental {\n constructor(private client: Client) {}\n\n /**\n * Moves a pagetree rooted at a page to the space's trash:\n *\n * - If the content's type is `page` and its status is `current`, it will be trashed including all its descendants.\n * - For every other combination of content type and status, this API is not supported.\n *\n * This API accepts the pageTree delete request and returns a task ID. The delete process happens asynchronously.\n *\n * Use the `/longtask/<taskId>` REST API to get the copy task status.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the\n * content is in.\n */\n async deletePageTree<T = Models.LongTask>(\n parameters: Parameters.DeletePageTree,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Moves a pagetree rooted at a page to the space's trash:\n *\n * - If the content's type is `page` and its status is `current`, it will be trashed including all its descendants.\n * - For every other combination of content type and status, this API is not supported.\n *\n * This API accepts the pageTree delete request and returns a task ID. The delete process happens asynchronously.\n *\n * Use the `/longtask/<taskId>` REST API to get the copy task status.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the\n * content is in.\n */\n async deletePageTree<T = Models.LongTask>(parameters: Parameters.DeletePageTree, callback?: never): Promise<T>;\n async deletePageTree<T = Models.LongTask>(\n parameters: Parameters.DeletePageTree,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/pageTree`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different\n * types of labels.\n */\n async getLabelsForSpace<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForSpace,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a list of labels associated with a space. Can provide a prefix as well as other filters to select different\n * types of labels.\n */\n async getLabelsForSpace<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForSpace,\n callback?: never,\n ): Promise<T>;\n async getLabelsForSpace<T = Models.LabelArray>(\n parameters: Parameters.GetLabelsForSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/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 addLabelsToSpace<T = Models.LabelArray>(\n parameters: Parameters.AddLabelsToSpace,\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 addLabelsToSpace<T = Models.LabelArray>(parameters: Parameters.AddLabelsToSpace, callback?: never): Promise<T>;\n async addLabelsToSpace<T = Models.LabelArray>(\n parameters: Parameters.AddLabelsToSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/label`,\n method: 'POST',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n async deleteLabelFromSpace<T = void>(\n parameters: Parameters.DeleteLabelFromSpace,\n callback: Callback<T>,\n ): Promise<void>;\n async deleteLabelFromSpace<T = void>(parameters: Parameters.DeleteLabelFromSpace, callback?: never): Promise<T>;\n async deleteLabelFromSpace<T = void>(\n parameters: Parameters.DeleteLabelFromSpace,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/space/${parameters.spaceKey}/label`,\n method: 'DELETE',\n params: {\n name: parameters.name,\n prefix: parameters.prefix,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the properties for a user as list of property keys. For more information about user properties, see\n * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n * `Note`, these properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version. Use `userProperties.getUserProperties` instead.\n */\n async getUserProperties<T = Models.UserPropertyKeyArray>(\n parameters: Parameters.GetUserProperties,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the properties for a user as list of property keys. For more information about user properties, see\n * [Confluence entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/).\n * `Note`, these properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version. Use `userProperties.getUserProperties` instead.\n */\n async getUserProperties<T = Models.UserPropertyKeyArray>(\n parameters: Parameters.GetUserProperties,\n callback?: never,\n ): Promise<T>;\n async getUserProperties<T = Models.UserPropertyKeyArray>(\n parameters: Parameters.GetUserProperties,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/property`,\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 property corresponding to `key` for a user. For more information about user properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version. Use `userProperties.getUserProperty` instead.\n */\n async getUserProperty<T = Models.UserProperty>(\n parameters: Parameters.GetUserProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the property corresponding to `key` for a user. For more information about user properties, see [Confluence\n * entity properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version. Use `userProperties.getUserProperty` instead.\n */\n async getUserProperty<T = Models.UserProperty>(parameters: Parameters.GetUserProperty, callback?: never): Promise<T>;\n async getUserProperty<T = Models.UserProperty>(\n parameters: Parameters.GetUserProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/property/${parameters.key}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a property for a user. For more information about user properties, see [Confluence entity properties]\n * (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored\n * against a user are on a Confluence site level and not space/content level.\n *\n * `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by\n * fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access\n * the Confluence site ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version. Use `userProperties.createUserProperty` instead.\n */\n async createUserProperty<T = unknown>(\n parameters: Parameters.CreateUserProperty,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a property for a user. For more information about user properties, see [Confluence entity properties]\n * (https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these properties stored\n * against a user are on a Confluence site level and not space/content level.\n *\n * `Note:` the number of properties which could be created per app in a tenant for each user might be restricted by\n * fixed system limits. **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access\n * the Confluence site ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version. Use `userProperties.createUserProperty` instead.\n */\n async createUserProperty<T = unknown>(parameters: Parameters.CreateUserProperty, callback?: never): Promise<T>;\n async createUserProperty<T = unknown>(\n parameters: Parameters.CreateUserProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/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 property for the given user. Note, you cannot update the key of a user property, only the value. For more\n * information about user properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version. Use `userProperties.updateUserProperty` instead.\n */\n async updateUserProperty<T = void>(parameters: Parameters.UpdateUserProperty, callback: Callback<T>): Promise<void>;\n /**\n * Updates a property for the given user. Note, you cannot update the key of a user property, only the value. For more\n * information about user properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version. Use `userProperties.updateUserProperty` instead.\n */\n async updateUserProperty<T = void>(parameters: Parameters.UpdateUserProperty, callback?: never): Promise<T>;\n async updateUserProperty<T = void>(\n parameters: Parameters.UpdateUserProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/property/${parameters.key}`,\n method: 'PUT',\n data: {\n value: parameters.value,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Deletes a property for the given user. For more information about user properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version. Use `userProperties.deleteUserProperty` instead.\n */\n async deleteUserProperty<T = void>(parameters: Parameters.DeleteUserProperty, callback: Callback<T>): Promise<void>;\n /**\n * Deletes a property for the given user. For more information about user properties, see [Confluence entity\n * properties](https://developer.atlassian.com/cloud/confluence/confluence-entity-properties/). `Note`, these\n * properties stored against a user are on a Confluence site level and not space/content level.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version. Use `userProperties.deleteUserProperty` instead.\n */\n async deleteUserProperty<T = void>(parameters: Parameters.DeleteUserProperty, callback?: never): Promise<T>;\n async deleteUserProperty<T = void>(\n parameters: Parameters.DeleteUserProperty,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/user/${parameters.userId}/property/${parameters.key}`,\n method: 'DELETE',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,YAAY,CAAA;AACH,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AAiCrC,IAAA,MAAM,cAAc,CAClB,UAAqC,EACrC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,SAAA,CAAW;AAC7C,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAkBA,IAAA,MAAM,iBAAiB,CACrB,UAAwC,EACxC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAA,MAAA,CAAQ;AAC9C,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;IAClD;AA6BA,IAAA,MAAM,gBAAgB,CACpB,UAAuC,EACvC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,QAAQ,CAAA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MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,aAAa,UAAU,CAAC,MAAM,CAAA,UAAA,EAAa,UAAU,CAAC,GAAG,CAAA,CAAE;AAChE,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,IAAI,EAAE;gBACJ,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AA0BA,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,aAAa,UAAU,CAAC,MAAM,CAAA,UAAA,EAAa,UAAU,CAAC,GAAG,CAAA,CAAE;AAChE,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE;gBACJ,KAAK,EAAE,UAAU,CAAC,KAAK;AACxB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAwBA,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,aAAa,UAAU,CAAC,MAAM,CAAA,UAAA,EAAa,UAAU,CAAC,GAAG,CAAA,CAAE;AAChE,YAAA,MAAM,EAAE,QAAQ;SACjB;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
|
package/dist/esm/api/group.mjs
CHANGED
|
@@ -85,26 +85,28 @@ class Group {
|
|
|
85
85
|
};
|
|
86
86
|
return this.client.sendRequest(config, callback);
|
|
87
87
|
}
|
|
88
|
-
async
|
|
88
|
+
async searchGroups(parameters, callback) {
|
|
89
89
|
const config = {
|
|
90
|
-
url:
|
|
90
|
+
url: '/api/group/picker',
|
|
91
91
|
method: 'GET',
|
|
92
92
|
params: {
|
|
93
|
+
query: parameters.query,
|
|
93
94
|
start: parameters.start,
|
|
94
95
|
limit: parameters.limit,
|
|
96
|
+
shouldReturnTotalSize: parameters.shouldReturnTotalSize,
|
|
95
97
|
},
|
|
96
98
|
};
|
|
97
99
|
return this.client.sendRequest(config, callback);
|
|
98
100
|
}
|
|
99
|
-
async
|
|
101
|
+
async getGroupMembersByGroupId(parameters, callback) {
|
|
100
102
|
const config = {
|
|
101
|
-
url:
|
|
103
|
+
url: `/api/group/${parameters.groupId}/membersByGroupId`,
|
|
102
104
|
method: 'GET',
|
|
103
105
|
params: {
|
|
104
|
-
query: parameters.query,
|
|
105
106
|
start: parameters.start,
|
|
106
107
|
limit: parameters.limit,
|
|
107
108
|
shouldReturnTotalSize: parameters.shouldReturnTotalSize,
|
|
109
|
+
expand: parameters.expand,
|
|
108
110
|
},
|
|
109
111
|
};
|
|
110
112
|
return this.client.sendRequest(config, callback);
|
|
@@ -133,18 +135,6 @@ class Group {
|
|
|
133
135
|
};
|
|
134
136
|
return this.client.sendRequest(config, callback);
|
|
135
137
|
}
|
|
136
|
-
async getGroupMembersByGroupId(parameters, callback) {
|
|
137
|
-
const config = {
|
|
138
|
-
url: `/api/group/${parameters.groupId}/membersByGroupId`,
|
|
139
|
-
method: 'GET',
|
|
140
|
-
params: {
|
|
141
|
-
start: parameters.start,
|
|
142
|
-
limit: parameters.limit,
|
|
143
|
-
shouldReturnTotalSize: parameters.shouldReturnTotalSize,
|
|
144
|
-
},
|
|
145
|
-
};
|
|
146
|
-
return this.client.sendRequest(config, callback);
|
|
147
|
-
}
|
|
148
138
|
async addUserToGroup(parameters, callback) {
|
|
149
139
|
const config = {
|
|
150
140
|
url: '/api/group/user',
|
|
@@ -169,6 +159,17 @@ class Group {
|
|
|
169
159
|
};
|
|
170
160
|
return this.client.sendRequest(config, callback);
|
|
171
161
|
}
|
|
162
|
+
async getGroupMembers(parameters, callback) {
|
|
163
|
+
const config = {
|
|
164
|
+
url: `/api/group/${parameters.groupName}/member`,
|
|
165
|
+
method: 'GET',
|
|
166
|
+
params: {
|
|
167
|
+
start: parameters.start,
|
|
168
|
+
limit: parameters.limit,
|
|
169
|
+
},
|
|
170
|
+
};
|
|
171
|
+
return this.client.sendRequest(config, callback);
|
|
172
|
+
}
|
|
172
173
|
}
|
|
173
174
|
|
|
174
175
|
export { Group };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"group.mjs","sources":["../../../../src/api/group.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 Group {\n constructor(private client: Client) {}\n\n /**\n * Returns all user groups. The returned groups are ordered alphabetically in ascending order by group 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 getGroups<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.GetGroups | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all user groups. The returned groups are ordered alphabetically in ascending order by group 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 getGroups<T = Models.GroupArrayWithLinks>(parameters?: Parameters.GetGroups, callback?: never): Promise<T>;\n async getGroups<T = Models.GroupArrayWithLinks>(\n parameters?: Parameters.GetGroups,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group',\n method: 'GET',\n params: {\n start: parameters?.start,\n limit: parameters?.limit,\n accessType: parameters?.accessType,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a new user group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async createGroup<T = Models.Group>(\n parameters: Parameters.CreateGroup | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new user group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async createGroup<T = Models.Group>(parameters?: Parameters.CreateGroup, callback?: never): Promise<T>;\n async createGroup<T = Models.Group>(parameters?: Parameters.CreateGroup, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group',\n method: 'POST',\n data: {\n name: parameters?.name,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Delete user group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async removeGroup<T = void>(parameters: Parameters.RemoveGroup, callback: Callback<T>): Promise<void>;\n /**\n * Delete user group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async removeGroup<T = void>(parameters: Parameters.RemoveGroup, callback?: never): Promise<T>;\n async removeGroup<T = void>(parameters: Parameters.RemoveGroup, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group',\n method: 'DELETE',\n params: {\n name: parameters.name,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a user group for a given group 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 getGroupByQueryParam<T = Models.Group>(\n parameters: Parameters.GetGroupByQueryParam,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a user group for a given group 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 getGroupByQueryParam<T = Models.Group>(\n parameters: Parameters.GetGroupByQueryParam,\n callback?: never,\n ): Promise<T>;\n async getGroupByQueryParam<T = Models.Group>(\n parameters: Parameters.GetGroupByQueryParam,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/by-name',\n method: 'GET',\n params: {\n name: parameters.name,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a user group for a given group id.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupByGroupId<T = Models.Group>(\n parameters: Parameters.GetGroupByGroupId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a user group for a given group id.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupByGroupId<T = Models.Group>(parameters: Parameters.GetGroupByGroupId, callback?: never): Promise<T>;\n async getGroupByGroupId<T = Models.Group>(\n parameters: Parameters.GetGroupByGroupId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/by-id',\n method: 'GET',\n params: {\n id: parameters.id,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Delete user group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async removeGroupById<T = void>(parameters: Parameters.RemoveGroupById, callback: Callback<T>): Promise<void>;\n /**\n * Delete user group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async removeGroupById<T = void>(parameters: Parameters.RemoveGroupById, callback?: never): Promise<T>;\n async removeGroupById<T = void>(parameters: Parameters.RemoveGroupById, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/by-id',\n method: 'DELETE',\n params: {\n id: parameters.id,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a user group for a given group name.\n *\n * Use updated Get group API\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupByName<T = Models.Group>(parameters: Parameters.GetGroupByName, callback: Callback<T>): Promise<void>;\n /**\n * Returns a user group for a given group name.\n *\n * Use updated Get group API\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupByName<T = Models.Group>(parameters: Parameters.GetGroupByName, callback?: never): Promise<T>;\n async getGroupByName<T = Models.Group>(\n parameters: Parameters.GetGroupByName,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/group/${parameters.groupName}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the users that are members of a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getMembersByQueryParam<T = Models.UserArray>(\n parameters: Parameters.GetMembersByQueryParam,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the users that are members of a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getMembersByQueryParam<T = Models.UserArray>(\n parameters: Parameters.GetMembersByQueryParam,\n callback?: never,\n ): Promise<T>;\n async getMembersByQueryParam<T = Models.UserArray>(\n parameters: Parameters.GetMembersByQueryParam,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/member',\n method: 'GET',\n params: {\n name: parameters.name,\n start: parameters.start,\n limit: parameters.limit,\n shouldReturnTotalSize: parameters.shouldReturnTotalSize,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the users that are members of a group.\n *\n * Use updated Get group API\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupMembers<T = Models.UserArray>(\n parameters: Parameters.GetGroupMembers,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the users that are members of a group.\n *\n * Use updated Get group API\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupMembers<T = Models.UserArray>(parameters: Parameters.GetGroupMembers, callback?: never): Promise<T>;\n async getGroupMembers<T = Models.UserArray>(\n parameters: Parameters.GetGroupMembers,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/group/${parameters.groupName}/member`,\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 /** Get search results of groups by partial query provided. */\n async searchGroups<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.SearchGroups,\n callback: Callback<T>,\n ): Promise<void>;\n /** Get search results of groups by partial query provided. */\n async searchGroups<T = Models.GroupArrayWithLinks>(parameters: Parameters.SearchGroups, callback?: never): Promise<T>;\n async searchGroups<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.SearchGroups,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/picker',\n method: 'GET',\n params: {\n query: parameters.query,\n start: parameters.start,\n limit: parameters.limit,\n shouldReturnTotalSize: parameters.shouldReturnTotalSize,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a user as a member in a group represented by its groupId\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async addUserToGroupByGroupId<T = unknown>(\n parameters: Parameters.AddUserToGroupByGroupId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds a user as a member in a group represented by its groupId\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async addUserToGroupByGroupId<T = unknown>(\n parameters: Parameters.AddUserToGroupByGroupId,\n callback?: never,\n ): Promise<T>;\n async addUserToGroupByGroupId<T = unknown>(\n parameters: Parameters.AddUserToGroupByGroupId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/userByGroupId',\n method: 'POST',\n params: {\n groupId: parameters.groupId,\n },\n data: {\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Remove user as a member from a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async removeMemberFromGroupByGroupId<T = void>(\n parameters: Parameters.RemoveMemberFromGroupByGroupId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Remove user as a member from a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async removeMemberFromGroupByGroupId<T = void>(\n parameters: Parameters.RemoveMemberFromGroupByGroupId,\n callback?: never,\n ): Promise<T>;\n async removeMemberFromGroupByGroupId<T = void>(\n parameters: Parameters.RemoveMemberFromGroupByGroupId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/userByGroupId',\n method: 'DELETE',\n params: {\n groupId: parameters.groupId,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the users that are members of a group.\n *\n * Use updated Get group API\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupMembersByGroupId<T = Models.UserArray>(\n parameters: Parameters.GetGroupMembersByGroupId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the users that are members of a group.\n *\n * Use updated Get group API\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupMembersByGroupId<T = Models.UserArray>(\n parameters: Parameters.GetGroupMembersByGroupId,\n callback?: never,\n ): Promise<T>;\n async getGroupMembersByGroupId<T = Models.UserArray>(\n parameters: Parameters.GetGroupMembersByGroupId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/group/${parameters.groupId}/membersByGroupId`,\n method: 'GET',\n params: {\n start: parameters.start,\n limit: parameters.limit,\n shouldReturnTotalSize: parameters.shouldReturnTotalSize,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a user as a member in a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async addUserToGroup<T = unknown>(parameters: Parameters.AddUserToGroup, callback: Callback<T>): Promise<void>;\n /**\n * Adds a user as a member in a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async addUserToGroup<T = unknown>(parameters: Parameters.AddUserToGroup, callback?: never): Promise<T>;\n async addUserToGroup<T = unknown>(parameters: Parameters.AddUserToGroup, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/user',\n method: 'POST',\n params: {\n name: parameters.name,\n },\n data: {\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Remove user as a member from a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async removeMemberFromGroup<T = void>(\n parameters: Parameters.RemoveMemberFromGroup,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Remove user as a member from a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async removeMemberFromGroup<T = void>(parameters: Parameters.RemoveMemberFromGroup, callback?: never): Promise<T>;\n async removeMemberFromGroup<T = void>(\n parameters: Parameters.RemoveMemberFromGroup,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/user',\n method: 'DELETE',\n params: {\n name: parameters.name,\n accountId: parameters.accountId,\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;;AAmB1B,IAAA,MAAM,SAAS,CACb,UAAiC,EACjC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAA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M,GAAkB;AAC5B,YAAA,GAAG,EAAE,iBAAiB;AACtB,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,MAAM,EAAE;gBACN,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,SAAS,EAAE,UAAU,CAAC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
1
|
+
{"version":3,"file":"group.mjs","sources":["../../../../src/api/group.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Client } from '../clients';\nimport type { Callback } from '../callback';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class Group {\n constructor(private client: Client) {}\n\n /**\n * Returns all user groups. The returned groups are ordered alphabetically in ascending order by group 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 getGroups<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.GetGroups | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all user groups. The returned groups are ordered alphabetically in ascending order by group 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 getGroups<T = Models.GroupArrayWithLinks>(parameters?: Parameters.GetGroups, callback?: never): Promise<T>;\n async getGroups<T = Models.GroupArrayWithLinks>(\n parameters?: Parameters.GetGroups,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group',\n method: 'GET',\n params: {\n start: parameters?.start,\n limit: parameters?.limit,\n accessType: parameters?.accessType,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a new user group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async createGroup<T = Models.Group>(\n parameters: Parameters.CreateGroup | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new user group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async createGroup<T = Models.Group>(parameters?: Parameters.CreateGroup, callback?: never): Promise<T>;\n async createGroup<T = Models.Group>(parameters?: Parameters.CreateGroup, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group',\n method: 'POST',\n data: {\n name: parameters?.name,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Delete user group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n *\n * @deprecated Will be removed in next major version.\n */\n async removeGroup<T = void>(parameters: Parameters.RemoveGroup, callback: Callback<T>): Promise<void>;\n /**\n * Delete user group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n *\n * @deprecated Will be removed in next major version.\n */\n async removeGroup<T = void>(parameters: Parameters.RemoveGroup, callback?: never): Promise<T>;\n async removeGroup<T = void>(parameters: Parameters.RemoveGroup, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group',\n method: 'DELETE',\n params: {\n name: parameters.name,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a user group for a given group name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version.\n */\n async getGroupByQueryParam<T = Models.Group>(\n parameters: Parameters.GetGroupByQueryParam,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a user group for a given group name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version.\n */\n async getGroupByQueryParam<T = Models.Group>(\n parameters: Parameters.GetGroupByQueryParam,\n callback?: never,\n ): Promise<T>;\n async getGroupByQueryParam<T = Models.Group>(\n parameters: Parameters.GetGroupByQueryParam,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/by-name',\n method: 'GET',\n params: {\n name: parameters.name,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a user group for a given group id.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupByGroupId<T = Models.Group>(\n parameters: Parameters.GetGroupByGroupId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns a user group for a given group id.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupByGroupId<T = Models.Group>(parameters: Parameters.GetGroupByGroupId, callback?: never): Promise<T>;\n async getGroupByGroupId<T = Models.Group>(\n parameters: Parameters.GetGroupByGroupId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/by-id',\n method: 'GET',\n params: {\n id: parameters.id,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Delete user group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async removeGroupById<T = void>(parameters: Parameters.DeleteGroupById, callback: Callback<T>): Promise<void>;\n /**\n * Delete user group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async removeGroupById<T = void>(parameters: Parameters.DeleteGroupById, callback?: never): Promise<T>;\n async removeGroupById<T = void>(parameters: Parameters.DeleteGroupById, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/by-id',\n method: 'DELETE',\n params: {\n id: parameters.id,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a user group for a given group name.\n *\n * Use updated Get group API\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version.\n */\n async getGroupByName<T = Models.Group>(parameters: Parameters.GetGroupByName, callback: Callback<T>): Promise<void>;\n /**\n * Returns a user group for a given group name.\n *\n * Use updated Get group API\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version.\n */\n async getGroupByName<T = Models.Group>(parameters: Parameters.GetGroupByName, callback?: never): Promise<T>;\n async getGroupByName<T = Models.Group>(\n parameters: Parameters.GetGroupByName,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/group/${parameters.groupName}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the users that are members of a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version.\n */\n async getMembersByQueryParam<T = Models.UserArray>(\n parameters: Parameters.GetMembersByQueryParam,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the users that are members of a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version.\n */\n async getMembersByQueryParam<T = Models.UserArray>(\n parameters: Parameters.GetMembersByQueryParam,\n callback?: never,\n ): Promise<T>;\n async getMembersByQueryParam<T = Models.UserArray>(\n parameters: Parameters.GetMembersByQueryParam,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/member',\n method: 'GET',\n params: {\n name: parameters.name,\n start: parameters.start,\n limit: parameters.limit,\n shouldReturnTotalSize: parameters.shouldReturnTotalSize,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /** Get search results of groups by partial query provided. */\n async searchGroups<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.SearchGroups,\n callback: Callback<T>,\n ): Promise<void>;\n /** Get search results of groups by partial query provided. */\n async searchGroups<T = Models.GroupArrayWithLinks>(parameters: Parameters.SearchGroups, callback?: never): Promise<T>;\n async searchGroups<T = Models.GroupArrayWithLinks>(\n parameters: Parameters.SearchGroups,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/picker',\n method: 'GET',\n params: {\n query: parameters.query,\n start: parameters.start,\n limit: parameters.limit,\n shouldReturnTotalSize: parameters.shouldReturnTotalSize,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the users that are members of a group.\n *\n * Use updated Get group API\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupMembersByGroupId<T = Models.UserArray>(\n parameters: Parameters.GetGroupMembersByGroupId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the users that are members of a group.\n *\n * Use updated Get group API\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async getGroupMembersByGroupId<T = Models.UserArray>(\n parameters: Parameters.GetGroupMembersByGroupId,\n callback?: never,\n ): Promise<T>;\n async getGroupMembersByGroupId<T = Models.UserArray>(\n parameters: Parameters.GetGroupMembersByGroupId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/group/${parameters.groupId}/membersByGroupId`,\n method: 'GET',\n params: {\n start: parameters.start,\n limit: parameters.limit,\n shouldReturnTotalSize: parameters.shouldReturnTotalSize,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a user as a member in a group represented by its groupId\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async addUserToGroupByGroupId<T = unknown>(\n parameters: Parameters.AddUserToGroupByGroupId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds a user as a member in a group represented by its groupId\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async addUserToGroupByGroupId<T = unknown>(\n parameters: Parameters.AddUserToGroupByGroupId,\n callback?: never,\n ): Promise<T>;\n async addUserToGroupByGroupId<T = unknown>(\n parameters: Parameters.AddUserToGroupByGroupId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/userByGroupId',\n method: 'POST',\n params: {\n groupId: parameters.groupId,\n },\n data: {\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Remove user as a member from a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async removeMemberFromGroupByGroupId<T = void>(\n parameters: Parameters.RemoveMemberFromGroupByGroupId,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Remove user as a member from a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async removeMemberFromGroupByGroupId<T = void>(\n parameters: Parameters.RemoveMemberFromGroupByGroupId,\n callback?: never,\n ): Promise<T>;\n async removeMemberFromGroupByGroupId<T = void>(\n parameters: Parameters.RemoveMemberFromGroupByGroupId,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/userByGroupId',\n method: 'DELETE',\n params: {\n groupId: parameters.groupId,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds a user as a member in a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async addUserToGroup<T = unknown>(parameters: Parameters.AddUserToGroup, callback: Callback<T>): Promise<void>;\n /**\n * Adds a user as a member in a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async addUserToGroup<T = unknown>(parameters: Parameters.AddUserToGroup, callback?: never): Promise<T>;\n async addUserToGroup<T = unknown>(parameters: Parameters.AddUserToGroup, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/user',\n method: 'POST',\n params: {\n name: parameters.name,\n },\n data: {\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Remove user as a member from a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async removeMemberFromGroup<T = void>(\n parameters: Parameters.RemoveMemberFromGroup,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Remove user as a member from a group.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: User must be a site admin.\n */\n async removeMemberFromGroup<T = void>(parameters: Parameters.RemoveMemberFromGroup, callback?: never): Promise<T>;\n async removeMemberFromGroup<T = void>(\n parameters: Parameters.RemoveMemberFromGroup,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/group/user',\n method: 'DELETE',\n params: {\n name: parameters.name,\n accountId: parameters.accountId,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the users that are members of a group.\n *\n * Use updated Get group API\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version. Use `group.getGroupMembersByGroupId`\n */\n async getGroupMembers<T = Models.UserArray>(\n parameters: Parameters.GetGroupMembers,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the users that are members of a group.\n *\n * Use updated Get group API\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n *\n * @deprecated Will be removed in next major version. Use `group.getGroupMembersByGroupId`\n */\n async getGroupMembers<T = Models.UserArray>(parameters: Parameters.GetGroupMembers, callback?: never): Promise<T>;\n async getGroupMembers<T = Models.UserArray>(\n parameters: Parameters.GetGroupMembers,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/group/${parameters.groupName}/member`,\n method: 'GET',\n params: {\n start: parameters.start,\n limit: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C5B,YAAA,GAAG,EAAE,iBAAiB;AACtB,YAAA,MAAM,EAAE,QAAQ;AAChB,YAAA,MAAM,EAAE;gBACN,IAAI,EAAE,UAAU,CAAC,IAAI;gBACrB,SAAS,EAAE,UAAU,CAAC,SAAS;AAChC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AA2BA,IAAA,MAAM,eAAe,CACnB,UAAsC,EACtC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,WAAA,EAAc,UAAU,CAAC,SAAS,CAAA,OAAA,CAAS;AAChD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,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;IAClD;AACD;;;;"}
|
package/dist/esm/api/index.mjs
CHANGED
|
@@ -29,4 +29,5 @@ export { SpaceSettings } from './spaceSettings.mjs';
|
|
|
29
29
|
export { Template } from './template.mjs';
|
|
30
30
|
export { Themes } from './themes.mjs';
|
|
31
31
|
export { Users } from './users.mjs';
|
|
32
|
+
export { UserProperties } from './userProperties.mjs';
|
|
32
33
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.mjs","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|