confluence.js 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +52 -2
- package/README.md +145 -183
- 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.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 +3 -1
- 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.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 +3 -1
- 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/confluenceClient.d.ts +6 -1
- package/eslint.config.ts +11 -16
- package/package.json +29 -28
- 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 +1 -5
- package/src/clients/confluenceClient.ts +6 -0
- package/src/config.ts +4 -1
- package/src/services/authenticationService/authentications/createJWTAuthentication.ts +1 -1
- package/favicon.svg +0 -7
package/dist/cjs/config.cjs
CHANGED
|
@@ -49,7 +49,9 @@ const MiddlewaresSchema = zod.z.object({
|
|
|
49
49
|
onResponse: zod.z.optional(zod.z.function().args(zod.z.any()).returns(zod.z.void())),
|
|
50
50
|
});
|
|
51
51
|
const ConfigSchema = zod.z.object({
|
|
52
|
-
host: zod.z.string().url({
|
|
52
|
+
host: zod.z.string().url({
|
|
53
|
+
message: 'Couldn\'t parse the host URL. Perhaps you forgot to add \'http://\' or \'https://\' at the beginning of the URL?',
|
|
54
|
+
}),
|
|
53
55
|
baseRequestConfig: zod.z.optional(RequestConfigSchema),
|
|
54
56
|
authentication: zod.z.optional(AuthenticationSchema),
|
|
55
57
|
middlewares: zod.z.optional(MiddlewaresSchema),
|
package/dist/cjs/config.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.cjs","sources":["../../../src/config.ts"],"sourcesContent":["import { z } from 'zod';\nimport type { AxiosError } from 'axios';\n\n/**\n * Basic authentication configuration using email and API token\n *\n * @see {@link https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/} for how to create API tokens\n */\nexport const BasicSchema = z.strictObject({\n basic: z.strictObject({\n /** User's email associated with Atlassian account */\n email: z.string().email(),\n /**\n * API token generated from Atlassian account settings\n *\n * @see {@link https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/} for how to create API tokens\n */\n apiToken: z.string().min(1, 'API token is required'),\n }),\n});\n\n/** JWT authentication configuration */\nexport const JWTSchema = z.strictObject({\n jwt: z.strictObject({\n /** The key from the app descriptor */\n issuer: z.string(),\n /** The shared secret key from app installation */\n secret: z.string(),\n /** Token expiry time (default: 180) */\n expiryTimeSeconds: z.optional(z.number()),\n }),\n});\n\n/** OAuth2 authentication configuration */\nexport const OAuth2Schema = z.strictObject({\n oauth2: z.strictObject({\n /** OAuth2 access token */\n accessToken: z.string(),\n }),\n});\n\n/** Authentication configuration schema */\nexport const AuthenticationSchema = z.union([BasicSchema, JWTSchema, OAuth2Schema]);\n\n/** Base request configuration */\nexport const RequestConfigSchema = z.any();\n\n/** Middleware configuration schema */\nexport const MiddlewaresSchema = z.object({\n /** Error handler middleware */\n onError: z.optional(z.function().args(z.any()).returns(z.void())),\n /** Response handler middleware */\n onResponse: z.optional(z.function().args(z.any()).returns(z.void())),\n});\n\nexport const ConfigSchema = z.object({\n host: z.string().url({
|
|
1
|
+
{"version":3,"file":"config.cjs","sources":["../../../src/config.ts"],"sourcesContent":["import { z } from 'zod';\nimport type { AxiosError } from 'axios';\n\n/**\n * Basic authentication configuration using email and API token\n *\n * @see {@link https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/} for how to create API tokens\n */\nexport const BasicSchema = z.strictObject({\n basic: z.strictObject({\n /** User's email associated with Atlassian account */\n email: z.string().email(),\n /**\n * API token generated from Atlassian account settings\n *\n * @see {@link https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/} for how to create API tokens\n */\n apiToken: z.string().min(1, 'API token is required'),\n }),\n});\n\n/** JWT authentication configuration */\nexport const JWTSchema = z.strictObject({\n jwt: z.strictObject({\n /** The key from the app descriptor */\n issuer: z.string(),\n /** The shared secret key from app installation */\n secret: z.string(),\n /** Token expiry time (default: 180) */\n expiryTimeSeconds: z.optional(z.number()),\n }),\n});\n\n/** OAuth2 authentication configuration */\nexport const OAuth2Schema = z.strictObject({\n oauth2: z.strictObject({\n /** OAuth2 access token */\n accessToken: z.string(),\n }),\n});\n\n/** Authentication configuration schema */\nexport const AuthenticationSchema = z.union([BasicSchema, JWTSchema, OAuth2Schema]);\n\n/** Base request configuration */\nexport const RequestConfigSchema = z.any();\n\n/** Middleware configuration schema */\nexport const MiddlewaresSchema = z.object({\n /** Error handler middleware */\n onError: z.optional(z.function().args(z.any()).returns(z.void())),\n /** Response handler middleware */\n onResponse: z.optional(z.function().args(z.any()).returns(z.void())),\n});\n\nexport const ConfigSchema = z.object({\n host: z.string().url({\n message:\n 'Couldn\\'t parse the host URL. Perhaps you forgot to add \\'http://\\' or \\'https://\\' at the beginning of the URL?',\n }),\n baseRequestConfig: z.optional(RequestConfigSchema),\n authentication: z.optional(AuthenticationSchema),\n middlewares: z.optional(MiddlewaresSchema),\n /** Adds `'X-Atlassian-Token': 'no-check'` to each request header */\n noCheckAtlassianToken: z.optional(z.boolean()),\n /** Prefix for all API routes. */\n apiPrefix: z.optional(z.string()),\n});\n\nexport type Config = z.infer<typeof ConfigSchema>;\nexport type Authentication = z.infer<typeof AuthenticationSchema>;\nexport type Basic = z.infer<typeof BasicSchema>;\nexport type JWT = z.infer<typeof JWTSchema>;\nexport type OAuth2 = z.infer<typeof OAuth2Schema>;\nexport type Error = AxiosError;\n"],"names":["z"],"mappings":";;;;AAGA;;;;AAIG;AACI,MAAM,WAAW,GAAGA,KAAC,CAAC,YAAY,CAAC;AACxC,IAAA,KAAK,EAAEA,KAAC,CAAC,YAAY,CAAC;;AAEpB,QAAA,KAAK,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;AACzB;;;;AAIG;QACH,QAAQ,EAAEA,KAAC,CAAC,MAAM,EAAE,CAAC,GAAG,CAAC,CAAC,EAAE,uBAAuB,CAAC;KACrD,CAAC;AACH,CAAA;AAED;AACO,MAAM,SAAS,GAAGA,KAAC,CAAC,YAAY,CAAC;AACtC,IAAA,GAAG,EAAEA,KAAC,CAAC,YAAY,CAAC;;AAElB,QAAA,MAAM,EAAEA,KAAC,CAAC,MAAM,EAAE;;AAElB,QAAA,MAAM,EAAEA,KAAC,CAAC,MAAM,EAAE;;QAElB,iBAAiB,EAAEA,KAAC,CAAC,QAAQ,CAACA,KAAC,CAAC,MAAM,EAAE,CAAC;KAC1C,CAAC;AACH,CAAA;AAED;AACO,MAAM,YAAY,GAAGA,KAAC,CAAC,YAAY,CAAC;AACzC,IAAA,MAAM,EAAEA,KAAC,CAAC,YAAY,CAAC;;AAErB,QAAA,WAAW,EAAEA,KAAC,CAAC,MA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er(key: string, values?: string | string[]) {\n if (typeof values === 'string') {\n return () => `${key}=${values}`;\n }\n\n if (!values) {\n return undefined;\n }\n\n if (!values.length) {\n return '';\n }\n\n return () => values.map(value => `${key}=${value}`).join('&');\n}\n"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"paramSerializer.cjs","sources":["../../../src/paramSerializer.ts"],"sourcesContent":["export function paramSerializer(key: string, values?: string | string[]) {\n if (typeof values === 'string') {\n return () => `${key}=${values}`;\n }\n\n if (!values) {\n return undefined;\n }\n\n if (!values.length) {\n return '';\n }\n\n return () => values.map(value => `${key}=${value}`).join('&');\n}\n"],"names":[],"mappings":";;AAAM,SAAU,eAAe,CAAC,GAAW,EAAE,MAA0B,EAAA;AACrE,IAAA,IAAI,OAAO,MAAM,KAAK,QAAQ,EAAE;QAC9B,OAAO,MAAM,CAAA,EAAG,GAAG,CAAA,CAAA,EAAI,MAAM,EAAE;IACjC;IAEA,IAAI,CAAC,MAAM,EAAE;AACX,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,IAAI,CAAC,MAAM,CAAC,MAAM,EAAE;AAClB,QAAA,OAAO,EAAE;IACX;IAEA,OAAO,MAAM,MAAM,CAAC,GAAG,CAAC,KAAK,IAAI,GAAG,GAAG,CAAA,CAAA,EAAI,KAAK,CAAA,CAAE,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC;AAC/D;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authenticationService.cjs","sources":["../../../../../src/services/authenticationService/authenticationService.ts"],"sourcesContent":["import type { Authentication } from '~/config';\nimport {\n createBasicAuthenticationToken,\n createJWTAuthentication,\n createOAuth2AuthenticationToken,\n} from './authentications';\n\nexport async function getAuthenticationToken(\n authentication: Authentication | undefined,\n requestData?: {\n baseURL: string;\n url: string;\n method: string;\n },\n): Promise<string | undefined> {\n if (!authentication) {\n return undefined;\n }\n\n if ('basic' in authentication) {\n return createBasicAuthenticationToken(authentication);\n }\n\n if ('oauth2' in authentication) {\n return createOAuth2AuthenticationToken(authentication);\n }\n\n if ('jwt' in authentication) {\n return createJWTAuthentication(authentication, requestData!);\n }\n\n return undefined;\n}\n"],"names":["createBasicAuthenticationToken","createOAuth2AuthenticationToken","createJWTAuthentication"],"mappings":";;;;;;AAOO,eAAe,sBAAsB,CAC1C,cAA0C,EAC1C,WAIC,EAAA;IAED,IAAI,CAAC,cAAc,EAAE;AACnB,QAAA,OAAO,SAAS
|
|
1
|
+
{"version":3,"file":"authenticationService.cjs","sources":["../../../../../src/services/authenticationService/authenticationService.ts"],"sourcesContent":["import type { Authentication } from '~/config';\nimport {\n createBasicAuthenticationToken,\n createJWTAuthentication,\n createOAuth2AuthenticationToken,\n} from './authentications';\n\nexport async function getAuthenticationToken(\n authentication: Authentication | undefined,\n requestData?: {\n baseURL: string;\n url: string;\n method: string;\n },\n): Promise<string | undefined> {\n if (!authentication) {\n return undefined;\n }\n\n if ('basic' in authentication) {\n return createBasicAuthenticationToken(authentication);\n }\n\n if ('oauth2' in authentication) {\n return createOAuth2AuthenticationToken(authentication);\n }\n\n if ('jwt' in authentication) {\n return createJWTAuthentication(authentication, requestData!);\n }\n\n return undefined;\n}\n"],"names":["createBasicAuthenticationToken","createOAuth2AuthenticationToken","createJWTAuthentication"],"mappings":";;;;;;AAOO,eAAe,sBAAsB,CAC1C,cAA0C,EAC1C,WAIC,EAAA;IAED,IAAI,CAAC,cAAc,EAAE;AACnB,QAAA,OAAO,SAAS;IAClB;AAEA,IAAA,IAAI,OAAO,IAAI,cAAc,EAAE;AAC7B,QAAA,OAAOA,6DAA8B,CAAC,cAAc,CAAC;IACvD;AAEA,IAAA,IAAI,QAAQ,IAAI,cAAc,EAAE;AAC9B,QAAA,OAAOC,+DAA+B,CAAC,cAAc,CAAC;IACxD;AAEA,IAAA,IAAI,KAAK,IAAI,cAAc,EAAE;AAC3B,QAAA,OAAOC,+CAAuB,CAAC,cAAc,EAAE,WAAY,CAAC;IAC9D;AAEA,IAAA,OAAO,SAAS;AAClB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createBasicAuthenticationToken.cjs","sources":["../../../../../../src/services/authenticationService/authentications/createBasicAuthenticationToken.ts"],"sourcesContent":["import { Base64Encoder } from '../base64Encoder';\nimport type { Basic } from '~';\n\nexport function createBasicAuthenticationToken({ basic: { email, apiToken } }: Basic) {\n const token = Base64Encoder.encode(`${email}:${apiToken}`);\n\n return `Basic ${token}`;\n}\n"],"names":["Base64Encoder"],"mappings":";;;;AAGM,SAAU,8BAA8B,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAS,EAAA;AAClF,IAAA,MAAM,KAAK,GAAGA,2BAAa,CAAC,MAAM,CAAC,
|
|
1
|
+
{"version":3,"file":"createBasicAuthenticationToken.cjs","sources":["../../../../../../src/services/authenticationService/authentications/createBasicAuthenticationToken.ts"],"sourcesContent":["import { Base64Encoder } from '../base64Encoder';\nimport type { Basic } from '~';\n\nexport function createBasicAuthenticationToken({ basic: { email, apiToken } }: Basic) {\n const token = Base64Encoder.encode(`${email}:${apiToken}`);\n\n return `Basic ${token}`;\n}\n"],"names":["Base64Encoder"],"mappings":";;;;AAGM,SAAU,8BAA8B,CAAC,EAAE,KAAK,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,EAAS,EAAA;AAClF,IAAA,MAAM,KAAK,GAAGA,2BAAa,CAAC,MAAM,CAAC,CAAA,EAAG,KAAK,CAAA,CAAA,EAAI,QAAQ,CAAA,CAAE,CAAC;IAE1D,OAAO,CAAA,MAAA,EAAS,KAAK,CAAA,CAAE;AACzB;;;;"}
|
package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createJWTAuthentication.cjs","sources":["../../../../../../src/services/authenticationService/authentications/createJWTAuthentication.ts"],"sourcesContent":["import * as jwt from 'atlassian-jwt';\nimport type { JWT } from '~';\n\nexport function createJWTAuthentication(\n { jwt: { issuer, secret, expiryTimeSeconds } }: JWT,\n requestData: {\n method: string;\n url: string;\n },\n) {\n const { method, url } = requestData;\n\n const now = Math.floor(Date.now() / 1000);\n const expire = now + (expiryTimeSeconds ?? 180);\n\n const request = jwt.fromMethodAndUrl(method, url);\n const tokenData = {\n iss: issuer,\n qsh: jwt.createQueryStringHash(request),\n iat: now,\n exp: expire,\n };\n\n const token = jwt.encodeSymmetric(tokenData, secret);\n\n return `JWT ${token}`;\n}\n"],"names":["jwt"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"createJWTAuthentication.cjs","sources":["../../../../../../src/services/authenticationService/authentications/createJWTAuthentication.ts"],"sourcesContent":["import * as jwt from '@atlassian/atlassian-jwt';\nimport type { JWT } from '~';\n\nexport function createJWTAuthentication(\n { jwt: { issuer, secret, expiryTimeSeconds } }: JWT,\n requestData: {\n method: string;\n url: string;\n },\n) {\n const { method, url } = requestData;\n\n const now = Math.floor(Date.now() / 1000);\n const expire = now + (expiryTimeSeconds ?? 180);\n\n const request = jwt.fromMethodAndUrl(method, url);\n const tokenData = {\n iss: issuer,\n qsh: jwt.createQueryStringHash(request),\n iat: now,\n exp: expire,\n };\n\n const token = jwt.encodeSymmetric(tokenData, secret);\n\n return `JWT ${token}`;\n}\n"],"names":["jwt"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;AAGM,SAAU,uBAAuB,CACrC,EAAE,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,iBAAiB,EAAE,EAAO,EACnD,WAGC,EAAA;AAED,IAAA,MAAM,EAAE,MAAM,EAAE,GAAG,EAAE,GAAG,WAAW;AAEnC,IAAA,MAAM,GAAG,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,IAAI,CAAC;IACzC,MAAM,MAAM,GAAG,GAAG,IAAI,iBAAiB,IAAI,GAAG,CAAC;IAE/C,MAAM,OAAO,GAAGA,cAAG,CAAC,gBAAgB,CAAC,MAAM,EAAE,GAAG,CAAC;AACjD,IAAA,MAAM,SAAS,GAAG;AAChB,QAAA,GAAG,EAAE,MAAM;AACX,QAAA,GAAG,EAAEA,cAAG,CAAC,qBAAqB,CAAC,OAAO,CAAC;AACvC,QAAA,GAAG,EAAE,GAAG;AACR,QAAA,GAAG,EAAE,MAAM;KACZ;IAED,MAAM,KAAK,GAAGA,cAAG,CAAC,eAAe,CAAC,SAAS,EAAE,MAAM,CAAC;IAEpD,OAAO,CAAA,IAAA,EAAO,KAAK,CAAA,CAAE;AACvB;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base64Encoder.cjs","sources":["../../../../../src/services/authenticationService/base64Encoder.ts"],"sourcesContent":["/* eslint-disable */\n/** @copyright The code was taken from the portal http://www.webtoolkit.info/javascript-base64.html */\n\nexport namespace Base64Encoder {\n const base64Sequence = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n const utf8Encode = (value: string) => {\n value = value.replace(/\\r\\n/g, '\\n');\n\n let utftext = '';\n\n for (let n = 0; n < value.length; n++) {\n const c = value.charCodeAt(n);\n\n if (c < 128) {\n utftext += String.fromCharCode(c);\n } else if (c > 127 && c < 2048) {\n utftext += String.fromCharCode((c >> 6) | 192);\n\n utftext += String.fromCharCode((c & 63) | 128);\n } else {\n utftext += String.fromCharCode((c >> 12) | 224);\n\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n\n utftext += String.fromCharCode((c & 63) | 128);\n }\n }\n\n return utftext;\n };\n\n export const encode = (input: string) => {\n let output = '';\n let chr1;\n let chr2;\n let chr3;\n let enc1;\n let enc2;\n let enc3;\n let enc4;\n let i = 0;\n\n input = utf8Encode(input);\n\n while (i < input.length) {\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n\n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n\n output += `${base64Sequence.charAt(enc1)}${base64Sequence.charAt(enc2)}${base64Sequence.charAt(\n enc3,\n )}${base64Sequence.charAt(enc4)}`;\n }\n\n return output;\n };\n}\n"],"names":["Base64Encoder"],"mappings":";;AAAA;AACA;AAEiBA;AAAjB,CAAA,UAAiB,aAAa,EAAA;IAC5B,MAAM,cAAc,GAAG,mEAAmE;AAE1F,IAAA,MAAM,UAAU,GAAG,CAAC,KAAa,KAAI;QACnC,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC;QAEpC,IAAI,OAAO,GAAG,EAAE;AAEhB,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;AAE7B,YAAA,IAAI,CAAC,GAAG,GAAG,EAAE;AACX,gBAAA,OAAO,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC
|
|
1
|
+
{"version":3,"file":"base64Encoder.cjs","sources":["../../../../../src/services/authenticationService/base64Encoder.ts"],"sourcesContent":["/* eslint-disable */\n/** @copyright The code was taken from the portal http://www.webtoolkit.info/javascript-base64.html */\n\nexport namespace Base64Encoder {\n const base64Sequence = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';\n\n const utf8Encode = (value: string) => {\n value = value.replace(/\\r\\n/g, '\\n');\n\n let utftext = '';\n\n for (let n = 0; n < value.length; n++) {\n const c = value.charCodeAt(n);\n\n if (c < 128) {\n utftext += String.fromCharCode(c);\n } else if (c > 127 && c < 2048) {\n utftext += String.fromCharCode((c >> 6) | 192);\n\n utftext += String.fromCharCode((c & 63) | 128);\n } else {\n utftext += String.fromCharCode((c >> 12) | 224);\n\n utftext += String.fromCharCode(((c >> 6) & 63) | 128);\n\n utftext += String.fromCharCode((c & 63) | 128);\n }\n }\n\n return utftext;\n };\n\n export const encode = (input: string) => {\n let output = '';\n let chr1;\n let chr2;\n let chr3;\n let enc1;\n let enc2;\n let enc3;\n let enc4;\n let i = 0;\n\n input = utf8Encode(input);\n\n while (i < input.length) {\n chr1 = input.charCodeAt(i++);\n chr2 = input.charCodeAt(i++);\n chr3 = input.charCodeAt(i++);\n\n enc1 = chr1 >> 2;\n enc2 = ((chr1 & 3) << 4) | (chr2 >> 4);\n enc3 = ((chr2 & 15) << 2) | (chr3 >> 6);\n enc4 = chr3 & 63;\n\n if (isNaN(chr2)) {\n enc3 = enc4 = 64;\n } else if (isNaN(chr3)) {\n enc4 = 64;\n }\n\n output += `${base64Sequence.charAt(enc1)}${base64Sequence.charAt(enc2)}${base64Sequence.charAt(\n enc3,\n )}${base64Sequence.charAt(enc4)}`;\n }\n\n return output;\n };\n}\n"],"names":["Base64Encoder"],"mappings":";;AAAA;AACA;AAEiBA;AAAjB,CAAA,UAAiB,aAAa,EAAA;IAC5B,MAAM,cAAc,GAAG,mEAAmE;AAE1F,IAAA,MAAM,UAAU,GAAG,CAAC,KAAa,KAAI;QACnC,KAAK,GAAG,KAAK,CAAC,OAAO,CAAC,OAAO,EAAE,IAAI,CAAC;QAEpC,IAAI,OAAO,GAAG,EAAE;AAEhB,QAAA,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,MAAM,CAAC,GAAG,KAAK,CAAC,UAAU,CAAC,CAAC,CAAC;AAE7B,YAAA,IAAI,CAAC,GAAG,GAAG,EAAE;AACX,gBAAA,OAAO,IAAI,MAAM,CAAC,YAAY,CAAC,CAAC,CAAC;YACnC;iBAAO,IAAI,CAAC,GAAG,G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C,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;AACtC,YAAA,IAAI,GAAG,CAAC,CAAC,IAAI,GAAG,EAAE,KAAK,CAAC,KAAK,IAAI,IAAI,CAAC,CAAC;AACvC,YAAA,IAAI,GAAG,IAAI,GAAG,EAAE;AAEhB,YAAA,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE;AACf,gBAAA,IAAI,GAAG,IAAI,GAAG,EAAE;YAClB;AAAO,iBAAA,IAAI,KAAK,CAAC,IAAI,CAAC,EAAE;gBACtB,IAAI,GAAG,EAAE;YACX;AAEA,YAAA,MAAM,IAAI,CAAA,EAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA,EAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,CAAA,EAAG,cAAc,CAAC,MAAM,CAC5F,IAAI,CACL,CAAA,EAAG,cAAc,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE;QACnC;AAEA,QAAA,OAAO,MAAM;AACf,IAAA,CAAC;AACH,CAAC,EAjEgBA,qBAAa,KAAbA,qBAAa,GAAA,EAAA,CAAA,CAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"analytics.mjs","sources":["../../../../src/api/analytics.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type {
|
|
1
|
+
{"version":3,"file":"analytics.mjs","sources":["../../../../src/api/analytics.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 Analytics {\n constructor(private client: Client) {}\n\n /** Get the total number of views a piece of content has. */\n async getViews<T = Models.GetViews>(parameters: Parameters.GetViews, callback: Callback<T>): Promise<void>;\n /** Get the total number of views a piece of content has. */\n async getViews<T = Models.GetViews>(parameters: Parameters.GetViews, callback?: never): Promise<T>;\n async getViews<T = Models.GetViews>(parameters: Parameters.GetViews, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/analytics/content/${parameters.contentId}/views`,\n method: 'GET',\n params: {\n fromDate: parameters.fromDate,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /** Get the total number of distinct viewers a piece of content has. */\n async getViewers<T = Models.GetViewers>(parameters: Parameters.GetViewers, callback: Callback<T>): Promise<void>;\n /** Get the total number of distinct viewers a piece of content has. */\n async getViewers<T = Models.GetViewers>(parameters: Parameters.GetViewers, callback?: never): Promise<T>;\n async getViewers<T = Models.GetViewers>(\n parameters: Parameters.GetViewers,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/analytics/content/${parameters.contentId}/viewers`,\n method: 'GET',\n params: {\n fromDate: parameters.fromDate,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,SAAS,CAAA;AACA,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AAMrC,IAAA,MAAM,QAAQ,CAAsB,UAA+B,EAAE,QAAsB,EAAA;AACzF,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,uBAAA,EAA0B,UAAU,CAAC,SAAS,CAAA,MAAA,CAAQ;AAC3D,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,QAAQ,EAAE,UAAU,CAAC,QAAQ;AAC9B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAMA,IAAA,MAAM,UAAU,CACd,UAAiC,EACjC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,uBAAA,EAA0B,UAAU,CAAC,SAAS,CAAA,QAAA,CAAU;AAC7D,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,QAAQ,EAAE,UAAU,CAAC,QAAQ;AAC9B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"audit.mjs","sources":["../../../../src/api/audit.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class Audit {\n constructor(private client: Client) {}\n\n /**\n * Returns all records in the audit log, optionally for a certain date range. This contains information about events\n * like space exports, group membership changes, app installations, etc. For more information, see [Audit\n * log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the Confluence administrator's guide.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getAuditRecords<T = Models.AuditRecordArray>(\n parameters: Parameters.GetAuditRecords | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all records in the audit log, optionally for a certain date range. This contains information about events\n * like space exports, group membership changes, app installations, etc. For more information, see [Audit\n * log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the Confluence administrator's guide.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getAuditRecords<T = Models.AuditRecordArray>(\n parameters?: Parameters.GetAuditRecords,\n callback?: never,\n ): Promise<T>;\n async getAuditRecords<T = Models.AuditRecordArray>(\n parameters?: Parameters.GetAuditRecords,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit',\n method: 'GET',\n params: {\n startDate: parameters?.startDate,\n endDate: parameters?.endDate,\n searchString: parameters?.searchString,\n start: parameters?.start,\n limit: parameters?.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a record in the audit log.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async createAuditRecord<T = Models.AuditRecord>(\n parameters: Parameters.CreateAuditRecord | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a record in the audit log.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async createAuditRecord<T = Models.AuditRecord>(\n parameters?: Parameters.CreateAuditRecord,\n callback?: never,\n ): Promise<T>;\n async createAuditRecord<T = Models.AuditRecord>(\n parameters?: Parameters.CreateAuditRecord,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit',\n method: 'POST',\n data: {\n author: parameters?.author,\n remoteAddress: parameters?.remoteAddress,\n creationDate: parameters?.creationDate,\n summary: parameters?.summary,\n description: parameters?.description,\n category: parameters?.category,\n sysAdmin: parameters?.sysAdmin,\n affectedObject: parameters?.affectedObject,\n changedValues: parameters?.changedValues,\n associatedObjects: parameters?.associatedObjects,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Exports audit records as a CSV file or ZIP file.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async exportAuditRecords<T = unknown>(\n parameters: Parameters.ExportAuditRecords | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Exports audit records as a CSV file or ZIP file.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async exportAuditRecords<T = unknown>(parameters?: Parameters.ExportAuditRecords, callback?: never): Promise<T>;\n async exportAuditRecords<T = unknown>(\n parameters?: Parameters.ExportAuditRecords,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit/export',\n method: 'GET',\n params: {\n startDate: parameters?.startDate,\n endDate: parameters?.endDate,\n searchString: parameters?.searchString,\n format: parameters?.format,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the retention period for records in the audit log. The retention period is how long an audit record is kept\n * for, from creation date until it is deleted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getRetentionPeriod<T = Models.RetentionPeriod>(callback: Callback<T>): Promise<void>;\n /**\n * Returns the retention period for records in the audit log. The retention period is how long an audit record is kept\n * for, from creation date until it is deleted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getRetentionPeriod<T = Models.RetentionPeriod>(callback?: never): Promise<T>;\n async getRetentionPeriod<T = Models.RetentionPeriod>(callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit/retention',\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 20 years.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async setRetentionPeriod<T = Models.RetentionPeriod>(\n parameters: Parameters.SetRetentionPeriod | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 20 years.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async setRetentionPeriod<T = Models.RetentionPeriod>(\n parameters?: Parameters.SetRetentionPeriod,\n callback?: never,\n ): Promise<T>;\n async setRetentionPeriod<T = Models.RetentionPeriod>(\n parameters?: Parameters.SetRetentionPeriod,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit/retention',\n method: 'PUT',\n data: {\n number: parameters?.number,\n units: parameters?.units,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns records from the audit log, for a time period back from the current date. For example, you can use this\n * method to get the last 3 months of records.\n *\n * This contains information about events like space exports, group membership changes, app installations, etc. For\n * more information, see [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the\n * Confluence administrator's guide.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getAuditRecordsForTimePeriod<T = Models.AuditRecordArray>(\n parameters: Parameters.GetAuditRecordsForTimePeriod | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns records from the audit log, for a time period back from the current date. For example, you can use this\n * method to get the last 3 months of records.\n *\n * This contains information about events like space exports, group membership changes, app installations, etc. For\n * more information, see [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the\n * Confluence administrator's guide.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getAuditRecordsForTimePeriod<T = Models.AuditRecordArray>(\n parameters?: Parameters.GetAuditRecordsForTimePeriod,\n callback?: never,\n ): Promise<T>;\n async getAuditRecordsForTimePeriod<T = Models.AuditRecordArray>(\n parameters?: Parameters.GetAuditRecordsForTimePeriod,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit/since',\n method: 'GET',\n params: {\n number: parameters?.number,\n units: parameters?.units,\n searchString: parameters?.searchString,\n start: parameters?.start,\n limit: parameters?.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,KAAK,CAAA;AACI,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AA0B1B,IAAA,MAAM,eAAe,CACnB,UAAuC,EACvC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,YAAY;AACjB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,SAAS,EAAE,UAAU,EAAE,SAAS;gBAChC,OAAO,EAAE,UAAU,EAAE,O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AAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;IAmBlD,MAAM,kBAAkB,CAA6B,QAAsB,EAAA;AACzE,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,sBAAsB;AAC3B,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAuBlD,IAAA,MAAM,kBAAkB,CACtB,UAA0C,EAC1C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,sBAAsB;AAC3B,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE;gBACJ,MAAM,EAAE,UAAU,EAAE,MAAM;gBAC1B,KAAK,EAAE,UAAU,EAAE,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAiClD,IAAA,MAAM,4BAA4B,CAChC,UAAoD,EACpD,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,kBAAkB;AACvB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,EAAE,MAAM;gBAC1B,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,YAAY,EAAE,UAAU,EAAE,YAAY;gBACtC,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,KAAK,EAAE,UAAU,EAAE,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
1
|
+
{"version":3,"file":"audit.mjs","sources":["../../../../src/api/audit.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 Audit {\n constructor(private client: Client) {}\n\n /**\n * Returns all records in the audit log, optionally for a certain date range. This contains information about events\n * like space exports, group membership changes, app installations, etc. For more information, see [Audit\n * log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the Confluence administrator's guide.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getAuditRecords<T = Models.AuditRecordArray>(\n parameters: Parameters.GetAuditRecords | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all records in the audit log, optionally for a certain date range. This contains information about events\n * like space exports, group membership changes, app installations, etc. For more information, see [Audit\n * log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the Confluence administrator's guide.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getAuditRecords<T = Models.AuditRecordArray>(\n parameters?: Parameters.GetAuditRecords,\n callback?: never,\n ): Promise<T>;\n async getAuditRecords<T = Models.AuditRecordArray>(\n parameters?: Parameters.GetAuditRecords,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit',\n method: 'GET',\n params: {\n startDate: parameters?.startDate,\n endDate: parameters?.endDate,\n searchString: parameters?.searchString,\n start: parameters?.start,\n limit: parameters?.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a record in the audit log.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async createAuditRecord<T = Models.AuditRecord>(\n parameters: Parameters.CreateAuditRecord | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a record in the audit log.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async createAuditRecord<T = Models.AuditRecord>(\n parameters?: Parameters.CreateAuditRecord,\n callback?: never,\n ): Promise<T>;\n async createAuditRecord<T = Models.AuditRecord>(\n parameters?: Parameters.CreateAuditRecord,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit',\n method: 'POST',\n data: {\n author: parameters?.author,\n remoteAddress: parameters?.remoteAddress,\n creationDate: parameters?.creationDate,\n summary: parameters?.summary,\n description: parameters?.description,\n category: parameters?.category,\n sysAdmin: parameters?.sysAdmin,\n affectedObject: parameters?.affectedObject,\n changedValues: parameters?.changedValues,\n associatedObjects: parameters?.associatedObjects,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Exports audit records as a CSV file or ZIP file.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async exportAuditRecords<T = unknown>(\n parameters: Parameters.ExportAuditRecords | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Exports audit records as a CSV file or ZIP file.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async exportAuditRecords<T = unknown>(parameters?: Parameters.ExportAuditRecords, callback?: never): Promise<T>;\n async exportAuditRecords<T = unknown>(\n parameters?: Parameters.ExportAuditRecords,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit/export',\n method: 'GET',\n params: {\n startDate: parameters?.startDate,\n endDate: parameters?.endDate,\n searchString: parameters?.searchString,\n format: parameters?.format,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the retention period for records in the audit log. The retention period is how long an audit record is kept\n * for, from creation date until it is deleted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getRetentionPeriod<T = Models.RetentionPeriod>(callback: Callback<T>): Promise<void>;\n /**\n * Returns the retention period for records in the audit log. The retention period is how long an audit record is kept\n * for, from creation date until it is deleted.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getRetentionPeriod<T = Models.RetentionPeriod>(callback?: never): Promise<T>;\n async getRetentionPeriod<T = Models.RetentionPeriod>(callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit/retention',\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 1 year.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async setRetentionPeriod<T = Models.RetentionPeriod>(\n parameters: Parameters.SetRetentionPeriod | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 1 year.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async setRetentionPeriod<T = Models.RetentionPeriod>(\n parameters?: Parameters.SetRetentionPeriod,\n callback?: never,\n ): Promise<T>;\n async setRetentionPeriod<T = Models.RetentionPeriod>(\n parameters?: Parameters.SetRetentionPeriod,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit/retention',\n method: 'PUT',\n data: {\n number: parameters?.number,\n units: parameters?.units,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns records from the audit log, for a time period back from the current date. For example, you can use this\n * method to get the last 3 months of records.\n *\n * This contains information about events like space exports, group membership changes, app installations, etc. For\n * more information, see [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the\n * Confluence administrator's guide.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getAuditRecordsForTimePeriod<T = Models.AuditRecordArray>(\n parameters: Parameters.GetAuditRecordsForTimePeriod | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns records from the audit log, for a time period back from the current date. For example, you can use this\n * method to get the last 3 months of records.\n *\n * This contains information about events like space exports, group membership changes, app installations, etc. For\n * more information, see [Audit log](https://confluence.atlassian.com/confcloud/audit-log-802164269.html) in the\n * Confluence administrator's guide.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global\n * permission.\n */\n async getAuditRecordsForTimePeriod<T = Models.AuditRecordArray>(\n parameters?: Parameters.GetAuditRecordsForTimePeriod,\n callback?: never,\n ): Promise<T>;\n async getAuditRecordsForTimePeriod<T = Models.AuditRecordArray>(\n parameters?: Parameters.GetAuditRecordsForTimePeriod,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/audit/since',\n method: 'GET',\n params: {\n number: parameters?.number,\n units: parameters?.units,\n searchString: parameters?.searchString,\n start: parameters?.start,\n limit: parameters?.limit,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,KAAK,CAAA;AACI,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AA0BrC,IAAA,MAAM,eAAe,CACnB,UAAuC,EACvC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,YAAY;AACjB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,SAAS,EAAE,UAAU,EAAE,SAAS;gBAChC,OAAO,EAAE,UAAU,EAAE,OAAO;gBAC5B,YAAY,EAAE,UAAU,EAAE,YAAY;gBACtC,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,KAAK,EAAE,UAAU,EAAE,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAsBA,IAAA,MAAM,iBAAiB,CACrB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5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AAkB,CACtB,UAA0C,EAC1C,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,sBAAsB;AAC3B,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,IAAI,EAAE;gBACJ,MAAM,EAAE,UAAU,EAAE,MAAM;gBAC1B,KAAK,EAAE,UAAU,EAAE,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAgCA,IAAA,MAAM,4BAA4B,CAChC,UAAoD,EACpD,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,kBAAkB;AACvB,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,MAAM,EAAE,UAAU,EAAE,MAAM;gBAC1B,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,YAAY,EAAE,UAAU,EAAE,YAAY;gBACtC,KAAK,EAAE,UAAU,EAAE,KAAK;gBACxB,KAAK,EAAE,UAAU,EAAE,KAAK;AACzB,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
|
package/dist/esm/api/content.mjs
CHANGED
|
@@ -76,12 +76,7 @@ class Content {
|
|
|
76
76
|
},
|
|
77
77
|
data: {
|
|
78
78
|
...parameters,
|
|
79
|
-
version: parameters.version,
|
|
80
|
-
title: parameters.title,
|
|
81
|
-
type: parameters.type,
|
|
82
79
|
status: parameters.bodyStatus,
|
|
83
|
-
space: parameters.space,
|
|
84
|
-
ancestors: parameters.ancestors,
|
|
85
80
|
},
|
|
86
81
|
};
|
|
87
82
|
return this.client.sendRequest(config, callback);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content.mjs","sources":["../../../../src/api/content.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class Content {\n constructor(private client: Client) {}\n\n /**\n * Returns all content in a Confluence instance.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). Only content that the user has permission to view will be returned.\n */\n async getContent<T = Models.ContentArray>(\n parameters: Parameters.GetContent | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all content in a Confluence instance.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). Only content that the user has permission to view will be returned.\n */\n async getContent<T = Models.ContentArray>(parameters?: Parameters.GetContent, callback?: never): Promise<T>;\n async getContent<T = Models.ContentArray>(\n parameters?: Parameters.GetContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content',\n method: 'GET',\n params: {\n type: parameters?.type,\n spaceKey: parameters?.spaceKey,\n title: parameters?.title,\n status: parameters?.status,\n postingDay: parameters?.postingDay,\n trigger: parameters?.trigger,\n orderby: parameters?.orderby,\n start: parameters?.start,\n limit: parameters?.limit,\n expand: parameters?.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a new piece of content or publishes an existing draft.\n *\n * To publish a draft, add the `id` and `status` properties to the body of the request. Set the `id` to the ID of the\n * draft and set the `status` to 'current'. When the request is sent, a new piece of content will be created and the\n * metadata from the draft will be transferred into it.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the\n * content will be created in, and permission to view the draft if publishing a draft.\n */\n async createContent<T = Models.Content>(\n parameters: Parameters.CreateContent | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new piece of content or publishes an existing draft.\n *\n * To publish a draft, add the `id` and `status` properties to the body of the request. Set the `id` to the ID of the\n * draft and set the `status` to 'current'. When the request is sent, a new piece of content will be created and the\n * metadata from the draft will be transferred into it.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the\n * content will be created in, and permission to view the draft if publishing a draft.\n */\n async createContent<T = Models.Content>(parameters?: Parameters.CreateContent, callback?: never): Promise<T>;\n async createContent<T = Models.Content>(\n parameters?: Parameters.CreateContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content',\n method: 'POST',\n params: {\n status: parameters?.status,\n expand: parameters?.expand,\n },\n data: {\n ...parameters,\n status: undefined,\n expand: undefined,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Archives a list of pages. The pages to be archived are specified as a list of content IDs. This API accepts the\n * archival request and returns a task ID. The archival process happens asynchronously. Use the /longtask/<taskId>\n * REST API to get the copy task status.\n *\n * Each content ID needs to resolve to page objects that are not already in an archived state. The content IDs need\n * not belong to the same space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Archive' permission for each of the pages\n * in the corresponding space it belongs to.\n */\n async archivePages<T = Models.LongTask>(parameters: Parameters.ArchivePages, callback: Callback<T>): Promise<void>;\n /**\n * Archives a list of pages. The pages to be archived are specified as a list of content IDs. This API accepts the\n * archival request and returns a task ID. The archival process happens asynchronously. Use the /longtask/<taskId>\n * REST API to get the copy task status.\n *\n * Each content ID needs to resolve to page objects that are not already in an archived state. The content IDs need\n * not belong to the same space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Archive' permission for each of the pages\n * in the corresponding space it belongs to.\n */\n async archivePages<T = Models.LongTask>(parameters: Parameters.ArchivePages, callback?: never): Promise<T>;\n async archivePages<T = Models.LongTask>(\n parameters: Parameters.ArchivePages,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content/archive',\n method: 'POST',\n data: {\n pages: parameters.pages,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favor of\n * shared drafts. For now, this method works the same as [Publish shared\n * draft](#api-content-blueprint-instance-draftId-put).\n *\n * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add'\n * permission for the space that the content will be created in.\n */\n async publishLegacyDraft<T = Models.Content>(\n parameters: Parameters.PublishLegacyDraft,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favor of\n * shared drafts. For now, this method works the same as [Publish shared\n * draft](#api-content-blueprint-instance-draftId-put).\n *\n * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add'\n * permission for the space that the content will be created in.\n */\n async publishLegacyDraft<T = Models.Content>(parameters: Parameters.PublishLegacyDraft, callback?: never): Promise<T>;\n async publishLegacyDraft<T = Models.Content>(\n parameters: Parameters.PublishLegacyDraft,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/blueprint/instance/${parameters.draftId}`,\n method: 'POST',\n params: {\n status: parameters.status,\n },\n data: {\n ...parameters,\n version: parameters.version,\n title: parameters.title,\n type: parameters.type,\n status: parameters.bodyStatus,\n space: parameters.space,\n ancestors: parameters.ancestors,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Publishes a shared draft of a page created from a blueprint.\n *\n * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add'\n * permission for the space that the content will be created in.\n */\n async publishSharedDraft<T = Models.Content>(\n parameters: Parameters.PublishSharedDraft,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Publishes a shared draft of a page created from a blueprint.\n *\n * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add'\n * permission for the space that the content will be created in.\n */\n async publishSharedDraft<T = Models.Content>(parameters: Parameters.PublishSharedDraft, callback?: never): Promise<T>;\n async publishSharedDraft<T = Models.Content>(\n parameters: Parameters.PublishSharedDraft,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/blueprint/instance/${parameters.draftId}`,\n method: 'PUT',\n params: {\n status: parameters.status,\n },\n data: {\n ...parameters,\n version: parameters.version,\n title: parameters.title,\n type: parameters.type,\n status: parameters.bodyStatus,\n space: parameters.space,\n ancestors: parameters.ancestors,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the list of content that matches a Confluence Query Language (CQL) query. For information on CQL, see:\n * [Advanced searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).\n *\n * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The\n * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of\n * results returned in each call. Example subsequent call (taken from example response):\n *\n * https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg\n *\n * The response to this will have a `prev` URL similar to the `next` in the example response.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). Only content that the user has permission to view will be returned.\n */\n async searchContentByCQL<T = Models.ContentArray>(\n parameters: Parameters.SearchContentByCQL,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the list of content that matches a Confluence Query Language (CQL) query. For information on CQL, see:\n * [Advanced searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).\n *\n * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The\n * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of\n * results returned in each call. Example subsequent call (taken from example response):\n *\n * https://your-domain.atlassian.net/wiki/rest/api/content/search?cql=type=page&limit=25&cursor=raNDoMsTRiNg\n *\n * The response to this will have a `prev` URL similar to the `next` in the example response.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). Only content that the user has permission to view will be returned.\n */\n async searchContentByCQL<T = Models.ContentArray>(\n parameters: Parameters.SearchContentByCQL,\n callback?: never,\n ): Promise<T>;\n async searchContentByCQL<T = Models.ContentArray>(\n parameters: Parameters.SearchContentByCQL,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content/search',\n method: 'GET',\n params: {\n cql: parameters.cql,\n cqlcontext: parameters.cqlcontext,\n cursor: parameters.cursor,\n limit: parameters.limit,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a single piece of content, like a page or a blog post.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the\n * content is a blog post, 'View' permission for the space is required.\n */\n async getContentById<T = Models.Content>(parameters: Parameters.GetContentById, callback: Callback<T>): Promise<void>;\n /**\n * Returns a single piece of content, like a page or a blog post.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the\n * content is a blog post, 'View' permission for the space is required.\n */\n async getContentById<T = Models.Content>(parameters: Parameters.GetContentById, callback?: never): Promise<T>;\n async getContentById<T = Models.Content>(\n parameters: Parameters.GetContentById,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}`,\n method: 'GET',\n params: {\n status: parameters.status,\n version: parameters.version,\n embeddedContentRender: parameters.embeddedContentRender,\n trigger: parameters.trigger,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates a piece of content. Use this method to update the title or body of a piece of content, change the status,\n * change the parent page, and more.\n *\n * Note, updating draft content is currently not supported.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateContent<T = Models.Content>(parameters: Parameters.UpdateContent, callback: Callback<T>): Promise<void>;\n /**\n * Updates a piece of content. Use this method to update the title or body of a piece of content, change the status,\n * change the parent page, and more.\n *\n * Note, updating draft content is currently not supported.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateContent<T = Models.Content>(parameters: Parameters.UpdateContent, callback?: never): Promise<T>;\n async updateContent<T = Models.Content>(\n parameters: Parameters.UpdateContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}`,\n method: 'PUT',\n params: {\n status: parameters.status,\n conflictPolicy: parameters.conflictPolicy,\n },\n data: {\n version: parameters.version,\n title: parameters.title,\n type: parameters.type,\n status: parameters.statusBody,\n ancestors: parameters.ancestors,\n body: parameters.body,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and\n * status:\n *\n * - If the content's type is `page` or `blogpost` and its status is `current`, it will be trashed.\n * - If the content's type is `page` or `blogpost` and its status is `trashed`, the content will be purged from the\n * trash and deleted permanently. Note, you must also set the `status` query parameter to `trashed` in your\n * request.\n * - If the content's type is `comment` or `attachment`, it will be deleted permanently without being trashed.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the\n * content is in.\n */\n async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback: Callback<T>): Promise<void>;\n /**\n * Moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and\n * status:\n *\n * - If the content's type is `page` or `blogpost` and its status is `current`, it will be trashed.\n * - If the content's type is `page` or `blogpost` and its status is `trashed`, the content will be purged from the\n * trash and deleted permanently. Note, you must also set the `status` query parameter to `trashed` in your\n * request.\n * - If the content's type is `comment` or `attachment`, it will be deleted permanently without being trashed.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the\n * content is in.\n */\n async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback?: never): Promise<T>;\n async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}`,\n method: 'DELETE',\n params: {\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the most recent update for a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getHistoryForContent<T = Models.ContentHistory>(\n parameters: Parameters.GetHistoryForContent,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the most recent update for a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n */\n async getHistoryForContent<T = Models.ContentHistory>(\n parameters: Parameters.GetHistoryForContent,\n callback?: never,\n ): Promise<T>;\n async getHistoryForContent<T = Models.ContentHistory>(\n parameters: Parameters.GetHistoryForContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/history`,\n method: 'GET',\n params: {\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,OAAO,CAAA;AACE,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAuB1B,IAAA,MAAM,UAAU,CACd,UAAkC,EAClC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,G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file":"content.mjs","sources":["../../../../src/api/content.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 Content {\n constructor(private client: Client) {}\n\n /**\n * Returns all content in a Confluence instance.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). Only content that the user has permission to view will be returned.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContent<T = Models.ContentArray>(\n parameters: Parameters.GetContent | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns all content in a Confluence instance.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission). Only content that the user has permission to view will be returned.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContent<T = Models.ContentArray>(parameters?: Parameters.GetContent, callback?: never): Promise<T>;\n async getContent<T = Models.ContentArray>(\n parameters?: Parameters.GetContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content',\n method: 'GET',\n params: {\n type: parameters?.type,\n spaceKey: parameters?.spaceKey,\n title: parameters?.title,\n status: parameters?.status,\n postingDay: parameters?.postingDay,\n trigger: parameters?.trigger,\n orderby: parameters?.orderby,\n start: parameters?.start,\n limit: parameters?.limit,\n expand: parameters?.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Creates a new piece of content or publishes an existing draft.\n *\n * To publish a draft, add the `id` and `status` properties to the body of the request. Set the `id` to the ID of the\n * draft and set the `status` to 'current'. When the request is sent, a new piece of content will be created and the\n * metadata from the draft will be transferred into it.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the\n * content will be created in, and permission to view the draft if publishing a draft.\n *\n * @deprecated Will be removed in next major version.\n */\n async createContent<T = Models.Content>(\n parameters: Parameters.CreateContent | undefined,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Creates a new piece of content or publishes an existing draft.\n *\n * To publish a draft, add the `id` and `status` properties to the body of the request. Set the `id` to the ID of the\n * draft and set the `status` to 'current'. When the request is sent, a new piece of content will be created and the\n * metadata from the draft will be transferred into it.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Add' permission for the space that the\n * content will be created in, and permission to view the draft if publishing a draft.\n *\n * @deprecated Will be removed in next major version.\n */\n async createContent<T = Models.Content>(parameters?: Parameters.CreateContent, callback?: never): Promise<T>;\n async createContent<T = Models.Content>(\n parameters?: Parameters.CreateContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content',\n method: 'POST',\n params: {\n status: parameters?.status,\n expand: parameters?.expand,\n },\n data: {\n ...parameters,\n status: undefined,\n expand: undefined,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Archives a list of pages. The pages to be archived are specified as a list of content IDs. This API accepts the\n * archival request and returns a task ID. The archival process happens asynchronously. Use the /longtask/<taskId>\n * REST API to get the copy task status.\n *\n * Each content ID needs to resolve to page objects that are not already in an archived state. The content IDs need\n * not belong to the same space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Archive' permission for each of the pages\n * in the corresponding space it belongs to.\n */\n async archivePages<T = Models.LongTask>(parameters: Parameters.ArchivePages, callback: Callback<T>): Promise<void>;\n /**\n * Archives a list of pages. The pages to be archived are specified as a list of content IDs. This API accepts the\n * archival request and returns a task ID. The archival process happens asynchronously. Use the /longtask/<taskId>\n * REST API to get the copy task status.\n *\n * Each content ID needs to resolve to page objects that are not already in an archived state. The content IDs need\n * not belong to the same space.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Archive' permission for each of the pages\n * in the corresponding space it belongs to.\n */\n async archivePages<T = Models.LongTask>(parameters: Parameters.ArchivePages, callback?: never): Promise<T>;\n async archivePages<T = Models.LongTask>(\n parameters: Parameters.ArchivePages,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content/archive',\n method: 'POST',\n data: {\n pages: parameters.pages,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favor of\n * shared drafts. For now, this method works the same as [Publish shared\n * draft](#api-content-blueprint-instance-draftId-put).\n *\n * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add'\n * permission for the space that the content will be created in.\n */\n async publishLegacyDraft<T = Models.Content>(\n parameters: Parameters.PublishLegacyDraft,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Publishes a legacy draft of a page created from a blueprint. Legacy drafts will eventually be removed in favor of\n * shared drafts. For now, this method works the same as [Publish shared\n * draft](#api-content-blueprint-instance-draftId-put).\n *\n * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add'\n * permission for the space that the content will be created in.\n */\n async publishLegacyDraft<T = Models.Content>(parameters: Parameters.PublishLegacyDraft, callback?: never): Promise<T>;\n async publishLegacyDraft<T = Models.Content>(\n parameters: Parameters.PublishLegacyDraft,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/blueprint/instance/${parameters.draftId}`,\n method: 'POST',\n params: {\n status: parameters.status,\n },\n data: {\n ...parameters,\n version: parameters.version,\n title: parameters.title,\n type: parameters.type,\n status: parameters.bodyStatus,\n space: parameters.space,\n ancestors: parameters.ancestors,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Publishes a shared draft of a page created from a blueprint.\n *\n * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add'\n * permission for the space that the content will be created in.\n */\n async publishSharedDraft<T = Models.Content>(\n parameters: Parameters.PublishSharedDraft,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Publishes a shared draft of a page created from a blueprint.\n *\n * By default, the following objects are expanded: `body.storage`, `history`, `space`, `version`, `ancestors`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the draft and 'Add'\n * permission for the space that the content will be created in.\n */\n async publishSharedDraft<T = Models.Content>(parameters: Parameters.PublishSharedDraft, callback?: never): Promise<T>;\n async publishSharedDraft<T = Models.Content>(\n parameters: Parameters.PublishSharedDraft,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/blueprint/instance/${parameters.draftId}`,\n method: 'PUT',\n params: {\n status: parameters.status,\n },\n data: {\n ...parameters,\n status: parameters.bodyStatus,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the list of content that matches a Confluence Query Language (CQL) query. For information on CQL, see:\n * [Advanced searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).\n *\n * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The\n * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of\n * results returned in each call.\n *\n * The response to this will have a `prev` URL similar to the `next` in the example response.\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**: Permission to access the Confluence site\n * ('Can use' global permission). Only content that the user has permission to view will be returned.\n */\n async searchContentByCQL<T = Models.ContentArray>(\n parameters: Parameters.SearchContentByCQL,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the list of content that matches a Confluence Query Language (CQL) query. For information on CQL, see:\n * [Advanced searching using CQL](https://developer.atlassian.com/cloud/confluence/advanced-searching-using-cql/).\n *\n * When additional results are available, returns `next` and `prev` URLs to retrieve them in subsequent calls. The\n * URLs each contain a cursor that points to the appropriate set of results. Use `limit` to specify the number of\n * results returned in each call.\n *\n * The response to this will have a `prev` URL similar to the `next` in the example response.\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**: Permission to access the Confluence site\n * ('Can use' global permission). Only content that the user has permission to view will be returned.\n */\n async searchContentByCQL<T = Models.ContentArray>(\n parameters: Parameters.SearchContentByCQL,\n callback?: never,\n ): Promise<T>;\n async searchContentByCQL<T = Models.ContentArray>(\n parameters: Parameters.SearchContentByCQL,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/content/search',\n method: 'GET',\n params: {\n cql: parameters.cql,\n cqlcontext: parameters.cqlcontext,\n cursor: parameters.cursor,\n limit: parameters.limit,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns a single piece of content, like a page or a blog post.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the\n * content is a blog post, 'View' permission for the space is required.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentById<T = Models.Content>(parameters: Parameters.GetContentById, callback: Callback<T>): Promise<void>;\n /**\n * Returns a single piece of content, like a page or a blog post.\n *\n * By default, the following objects are expanded: `space`, `history`, `version`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the\n * content is a blog post, 'View' permission for the space is required.\n *\n * @deprecated Will be removed in next major version.\n */\n async getContentById<T = Models.Content>(parameters: Parameters.GetContentById, callback?: never): Promise<T>;\n async getContentById<T = Models.Content>(\n parameters: Parameters.GetContentById,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}`,\n method: 'GET',\n params: {\n status: parameters.status,\n version: parameters.version,\n embeddedContentRender: parameters.embeddedContentRender,\n trigger: parameters.trigger,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates a piece of content. Use this method to update the title or body of a piece of content, change the status,\n * change the parent page, and more.\n *\n * Note, updating draft content is currently not supported.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async updateContent<T = Models.Content>(parameters: Parameters.UpdateContent, callback: Callback<T>): Promise<void>;\n /**\n * Updates a piece of content. Use this method to update the title or body of a piece of content, change the status,\n * change the parent page, and more.\n *\n * Note, updating draft content is currently not supported.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async updateContent<T = Models.Content>(parameters: Parameters.UpdateContent, callback?: never): Promise<T>;\n async updateContent<T = Models.Content>(\n parameters: Parameters.UpdateContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}`,\n method: 'PUT',\n params: {\n status: parameters.status,\n conflictPolicy: parameters.conflictPolicy,\n },\n data: {\n version: parameters.version,\n title: parameters.title,\n type: parameters.type,\n status: parameters.statusBody,\n ancestors: parameters.ancestors,\n body: parameters.body,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and\n * status:\n *\n * - If the content's type is `page` or `blogpost` and its status is `current`, it will be trashed.\n * - If the content's type is `page` or `blogpost` and its status is `trashed`, the content will be purged from the\n * trash and deleted permanently. Note, you must also set the `status` query parameter to `trashed` in your\n * request.\n * - If the content's type is `comment` or `attachment`, it will be deleted permanently without being trashed.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the\n * content is in.\n *\n * @deprecated Will be removed in next major version.\n */\n async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback: Callback<T>): Promise<void>;\n /**\n * Moves a piece of content to the space's trash or purges it from the trash, depending on the content's type and\n * status:\n *\n * - If the content's type is `page` or `blogpost` and its status is `current`, it will be trashed.\n * - If the content's type is `page` or `blogpost` and its status is `trashed`, the content will be purged from the\n * trash and deleted permanently. Note, you must also set the `status` query parameter to `trashed` in your\n * request.\n * - If the content's type is `comment` or `attachment`, it will be deleted permanently without being trashed.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Delete' permission for the space that the\n * content is in.\n *\n * @deprecated Will be removed in next major version.\n */\n async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback?: never): Promise<T>;\n async deleteContent<T = void>(parameters: Parameters.DeleteContent, callback?: Callback<T>): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}`,\n method: 'DELETE',\n params: {\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the most recent update for a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async getHistoryForContent<T = Models.ContentHistory>(\n parameters: Parameters.GetHistoryForContent,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the most recent update for a piece of content.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async getHistoryForContent<T = Models.ContentHistory>(\n parameters: Parameters.GetHistoryForContent,\n callback?: never,\n ): Promise<T>;\n async getHistoryForContent<T = Models.ContentHistory>(\n parameters: Parameters.GetHistoryForContent,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/history`,\n method: 'GET',\n params: {\n expand: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AAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentAttachments.mjs","sources":["../../../../src/api/contentAttachments.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unnecessary-condition */\nimport FormData from 'form-data';\nimport type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentAttachments {\n constructor(private client: Client) {}\n\n /**\n * Returns the attachments for a piece of content.\n *\n * By default, the following objects are expanded: `metadata`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the\n * content is a blog post, 'View' permission for the space is required.\n */\n async getAttachments<T = Models.ContentArray<Models.Attachment>>(\n parameters: Parameters.GetAttachments,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the attachments for a piece of content.\n *\n * By default, the following objects are expanded: `metadata`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the\n * content is a blog post, 'View' permission for the space is required.\n */\n async getAttachments<T = Models.ContentArray<Models.Attachment>>(\n parameters: Parameters.GetAttachments,\n callback?: never,\n ): Promise<T>;\n async getAttachments<T = Models.ContentArray<Models.Attachment>>(\n parameters: Parameters.GetAttachments,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment`,\n method: 'GET',\n params: {\n start: parameters.start,\n limit: parameters.limit,\n filename: parameters.filename,\n mediaType: parameters.mediaType,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds an attachment to a piece of content. This method only adds a new attachment. If you want to update an existing\n * attachment, use [Create or update\n * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateAttachments,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds an attachment to a piece of content. This method only adds a new attachment. If you want to update an existing\n * attachment, use [Create or update\n * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateAttachments,\n callback?: never,\n ): Promise<T>;\n async createAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateAttachments,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const formData = new FormData();\n const attachments = Array.isArray(parameters.attachments) ? parameters.attachments : [parameters.attachments];\n\n attachments.forEach(attachment => {\n formData.append('minorEdit', attachment.minorEdit.toString(), 'minorEdit');\n formData.append('file', attachment.file, {\n filename: attachment.filename,\n contentType: attachment.contentType,\n });\n\n if (attachment.comment) {\n formData.append('comment', attachment.comment, 'comment');\n }\n });\n\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment`,\n method: 'POST',\n headers: {\n 'X-Atlassian-Token': 'no-check',\n 'Content-Type': 'multipart/form-data',\n ...formData.getHeaders?.(),\n },\n params: {\n status: parameters.status,\n },\n data: formData,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds an attachment to a piece of content. If the attachment already exists for the content, then the attachment is\n * updated (i.e. a new version of the attachment is created).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createOrUpdateAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateOrUpdateAttachments,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds an attachment to a piece of content. If the attachment already exists for the content, then the attachment is\n * updated (i.e. a new version of the attachment is created).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createOrUpdateAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateOrUpdateAttachments,\n callback?: never,\n ): Promise<T>;\n async createOrUpdateAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateOrUpdateAttachments,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const formData = new FormData();\n const attachments = Array.isArray(parameters.attachments) ? parameters.attachments : [parameters.attachments];\n\n attachments.forEach(attachment => {\n formData.append('minorEdit', attachment.minorEdit.toString(), 'minorEdit');\n formData.append('file', attachment.file, {\n filename: attachment.filename,\n contentType: attachment.contentType,\n });\n\n if (attachment.comment) {\n formData.append('comment', attachment.comment, 'comment');\n }\n });\n\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment`,\n method: 'PUT',\n headers: {\n 'X-Atlassian-Token': 'no-check',\n 'Content-Type': 'multipart/form-data',\n ...formData.getHeaders?.(),\n },\n params: {\n status: parameters.status,\n },\n data: formData,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates the attachment properties, i.e. the non-binary data of an attachment like the filename, media-type,\n * comment, and parent container.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateAttachmentProperties<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentProperties,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates the attachment properties, i.e. the non-binary data of an attachment like the filename, media-type,\n * comment, and parent container.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateAttachmentProperties<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentProperties,\n callback?: never,\n ): Promise<T>;\n async updateAttachmentProperties<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentProperties,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}`,\n method: 'PUT',\n data: parameters.update,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates the binary data of an attachment, given the attachment ID, and optionally the comment and the minor edit\n * field.\n *\n * This method is essentially the same as [Create or update\n * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put),\n * except that it matches the attachment ID rather than the name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateAttachmentData<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentData,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates the binary data of an attachment, given the attachment ID, and optionally the comment and the minor edit\n * field.\n *\n * This method is essentially the same as [Create or update\n * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put),\n * except that it matches the attachment ID rather than the name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateAttachmentData<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentData,\n callback?: never,\n ): Promise<T>;\n async updateAttachmentData<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentData,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const { attachment } = parameters;\n\n const formData = new FormData();\n\n formData.append('minorEdit', attachment.minorEdit.toString(), 'minorEdit');\n formData.append('file', attachment.file, {\n filename: attachment.filename,\n contentType: attachment.contentType,\n });\n\n if (attachment.comment) {\n formData.append('comment', attachment.comment, 'comment');\n }\n\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}/data`,\n method: 'POST',\n headers: {\n 'X-Atlassian-Token': 'no-check',\n 'Content-Type': 'multipart/form-data',\n ...formData.getHeaders?.(),\n },\n data: formData,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /** Redirects the client to a URL that serves an attachment's binary data. */\n async downloadAttachment<T = Buffer>(parameters: Parameters.DownloadAttachment, callback: Callback<T>): Promise<void>;\n /** Redirects the client to a URL that serves an attachment's binary data. */\n async downloadAttachment<T = Buffer>(parameters: Parameters.DownloadAttachment, callback?: never): Promise<T>;\n async downloadAttachment<T = Buffer>(\n parameters: Parameters.DownloadAttachment,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}/download`,\n method: 'GET',\n responseType: 'arraybuffer',\n params: {\n version: parameters.version,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;AAAA;MAQa,kBAAkB,CAAA;AACT,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AA0B1B,IAAA,MAAM,cAAc,CAClB,UAAqC,EACrC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAmB,iBAAA,CAAA;AACrD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAyBlD,IAAA,MAAM,iBAAiB,CACrB,UAAwC,EACxC,QAAsB,EAAA;AAEtB,QAAA,MAAM,QAAQ,GAAG,IAAI,QAAQ,EAAE;QAC/B,MAAM,WAAW,GAA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AAA,UAAU,CAAC,YAAY,CAAW,SAAA,CAAA;AACzF,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,YAAY,EAAE,aAAa;AAC3B,YAAA,MAAM,EAAE;gBACN,OAAO,EAAE,UAAU,CAAC,OAAO;AAC5B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
1
|
+
{"version":3,"file":"contentAttachments.mjs","sources":["../../../../src/api/contentAttachments.ts"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-unnecessary-condition */\nimport FormData from 'form-data';\nimport type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Client } from '../clients';\nimport type { Callback } from '../callback';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentAttachments {\n constructor(private client: Client) {}\n\n /**\n * Returns the attachments for a piece of content.\n *\n * By default, the following objects are expanded: `metadata`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the\n * content is a blog post, 'View' permission for the space is required.\n *\n * @deprecated Will be removed in next major version.\n */\n async getAttachments<T = Models.ContentArray<Models.Attachment>>(\n parameters: Parameters.GetAttachments,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the attachments for a piece of content.\n *\n * By default, the following objects are expanded: `metadata`.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to view the content. If the\n * content is a blog post, 'View' permission for the space is required.\n *\n * @deprecated Will be removed in next major version.\n */\n async getAttachments<T = Models.ContentArray<Models.Attachment>>(\n parameters: Parameters.GetAttachments,\n callback?: never,\n ): Promise<T>;\n async getAttachments<T = Models.ContentArray<Models.Attachment>>(\n parameters: Parameters.GetAttachments,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment`,\n method: 'GET',\n params: {\n start: parameters.start,\n limit: parameters.limit,\n filename: parameters.filename,\n mediaType: parameters.mediaType,\n expand: parameters.expand,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds an attachment to a piece of content. This method only adds a new attachment. If you want to update an existing\n * attachment, use [Create or update\n * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateAttachments,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds an attachment to a piece of content. This method only adds a new attachment. If you want to update an existing\n * attachment, use [Create or update\n * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateAttachments,\n callback?: never,\n ): Promise<T>;\n async createAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateAttachments,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const formData = new FormData();\n const attachments = Array.isArray(parameters.attachments) ? parameters.attachments : [parameters.attachments];\n\n attachments.forEach(attachment => {\n formData.append('minorEdit', attachment.minorEdit.toString(), 'minorEdit');\n formData.append('file', attachment.file, {\n filename: attachment.filename,\n contentType: attachment.contentType,\n });\n\n if (attachment.comment) {\n formData.append('comment', attachment.comment, 'comment');\n }\n });\n\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment`,\n method: 'POST',\n headers: {\n 'X-Atlassian-Token': 'no-check',\n 'Content-Type': 'multipart/form-data',\n ...formData.getHeaders?.(),\n },\n params: {\n status: parameters.status,\n },\n data: formData,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Adds an attachment to a piece of content. If the attachment already exists for the content, then the attachment is\n * updated (i.e. a new version of the attachment is created).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createOrUpdateAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateOrUpdateAttachments,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Adds an attachment to a piece of content. If the attachment already exists for the content, then the attachment is\n * updated (i.e. a new version of the attachment is created).\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async createOrUpdateAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateOrUpdateAttachments,\n callback?: never,\n ): Promise<T>;\n async createOrUpdateAttachments<T = Models.ContentArray<Models.CreatedAttachment>>(\n parameters: Parameters.CreateOrUpdateAttachments,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const formData = new FormData();\n const attachments = Array.isArray(parameters.attachments) ? parameters.attachments : [parameters.attachments];\n\n attachments.forEach(attachment => {\n formData.append('minorEdit', attachment.minorEdit.toString(), 'minorEdit');\n formData.append('file', attachment.file, {\n filename: attachment.filename,\n contentType: attachment.contentType,\n });\n\n if (attachment.comment) {\n formData.append('comment', attachment.comment, 'comment');\n }\n });\n\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment`,\n method: 'PUT',\n headers: {\n 'X-Atlassian-Token': 'no-check',\n 'Content-Type': 'multipart/form-data',\n ...formData.getHeaders?.(),\n },\n params: {\n status: parameters.status,\n },\n data: formData,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates the attachment properties, i.e. the non-binary data of an attachment like the filename, media-type,\n * comment, and parent container.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateAttachmentProperties<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentProperties,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates the attachment properties, i.e. the non-binary data of an attachment like the filename, media-type,\n * comment, and parent container.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateAttachmentProperties<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentProperties,\n callback?: never,\n ): Promise<T>;\n async updateAttachmentProperties<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentProperties,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}`,\n method: 'PUT',\n data: parameters.update,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Updates the binary data of an attachment, given the attachment ID, and optionally the comment and the minor edit\n * field.\n *\n * This method is essentially the same as [Create or update\n * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put),\n * except that it matches the attachment ID rather than the name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateAttachmentData<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentData,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Updates the binary data of an attachment, given the attachment ID, and optionally the comment and the minor edit\n * field.\n *\n * This method is essentially the same as [Create or update\n * attachments](https://developer.atlassian.com/cloud/confluence/rest/api-group-content---attachments/#api-wiki-rest-api-content-id-child-attachment-put),\n * except that it matches the attachment ID rather than the name.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to update the content.\n */\n async updateAttachmentData<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentData,\n callback?: never,\n ): Promise<T>;\n async updateAttachmentData<T = Models.CreatedAttachment>(\n parameters: Parameters.UpdateAttachmentData,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const { attachment } = parameters;\n\n const formData = new FormData();\n\n formData.append('minorEdit', attachment.minorEdit.toString(), 'minorEdit');\n formData.append('file', attachment.file, {\n filename: attachment.filename,\n contentType: attachment.contentType,\n });\n\n if (attachment.comment) {\n formData.append('comment', attachment.comment, 'comment');\n }\n\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}/data`,\n method: 'POST',\n headers: {\n 'X-Atlassian-Token': 'no-check',\n 'Content-Type': 'multipart/form-data',\n ...formData.getHeaders?.(),\n },\n data: formData,\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /** Redirects the client to a URL that serves an attachment's binary data. */\n async downloadAttachment<T = Buffer>(parameters: Parameters.DownloadAttachment, callback: Callback<T>): Promise<void>;\n /** Redirects the client to a URL that serves an attachment's binary data. */\n async downloadAttachment<T = Buffer>(parameters: Parameters.DownloadAttachment, callback?: never): Promise<T>;\n async downloadAttachment<T = Buffer>(\n parameters: Parameters.DownloadAttachment,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/content/${parameters.id}/child/attachment/${parameters.attachmentId}/download`,\n method: 'GET',\n responseType: 'arraybuffer',\n params: {\n version: parameters.version,\n status: parameters.status,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":";;AAAA;MAQa,kBAAkB,CAAA;AACT,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AA8BrC,IAAA,MAAM,cAAc,CAClB,UAAqC,EACrC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,aAAA,EAAgB,UAAU,CAAC,EAAE,CAAA,iBAAA,CAAmB;AACrD,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,MAAM,EAAE;gBACN,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,QAAQ,EAAE,UAAU,CAAC,QAAQ;gBAC7B,SAAS,EAAE,UAAU,CAAC,SAAS;gBAC/B,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO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AAQ;SACf;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AAMA,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;YAC5B,GAAG,EAAE,gBAAgB,UAAU,CAAC,EAAE,CAAA,kBAAA,EAAqB,UAAU,CAAC,YAAY,CAAA,SAAA,CAAW;AACzF,YAAA,MAAM,EAAE,KAAK;AACb,YAAA,YAAY,EAAE,aAAa;AAC3B,YAAA,MAAM,EAAE;gBACN,OAAO,EAAE,UAAU,CAAC,OAAO;gBAC3B,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;IAClD;AACD;;;;"}
|
|
@@ -47,6 +47,24 @@ class ContentBody {
|
|
|
47
47
|
};
|
|
48
48
|
return this.client.sendRequest(config, callback);
|
|
49
49
|
}
|
|
50
|
+
async bulkAsyncConvertContentBodyResponse(parameters, callback) {
|
|
51
|
+
const config = {
|
|
52
|
+
url: '/api/contentbody/convert/async/bulk/tasks',
|
|
53
|
+
method: 'GET',
|
|
54
|
+
params: {
|
|
55
|
+
ids: parameters.ids,
|
|
56
|
+
},
|
|
57
|
+
};
|
|
58
|
+
return this.client.sendRequest(config, callback);
|
|
59
|
+
}
|
|
60
|
+
async bulkAsyncConvertContentBodyRequest(parameters, callback) {
|
|
61
|
+
const config = {
|
|
62
|
+
url: '/api/contentbody/convert/async/bulk/tasks',
|
|
63
|
+
method: 'POST',
|
|
64
|
+
data: parameters,
|
|
65
|
+
};
|
|
66
|
+
return this.client.sendRequest(config, callback);
|
|
67
|
+
}
|
|
50
68
|
}
|
|
51
69
|
|
|
52
70
|
export { ContentBody };
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"contentBody.mjs","sources":["../../../../src/api/contentBody.ts"],"sourcesContent":["import type * as Models from './models';\nimport type * as Parameters from './parameters';\nimport type { Callback } from '../callback';\nimport type { Client } from '../clients';\nimport type { RequestConfig } from '../requestConfig';\n\nexport class ContentBody {\n constructor(private client: Client) {}\n\n /**\n * Converts a content body from one format to another format.\n *\n * Supported conversions:\n *\n * - Storage: view, export_view, styled_view, editor\n * - Editor: storage\n * - View: none\n * - Export_view: none\n * - Styled_view: none\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async convertContentBody<T = Models.ContentBody>(\n parameters: Parameters.ConvertContentBody,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Converts a content body from one format to another format.\n *\n * Supported conversions:\n *\n * - Storage: view, export_view, styled_view, editor\n * - Editor: storage\n * - View: none\n * - Export_view: none\n * - Styled_view: none\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async convertContentBody<T = Models.ContentBody>(\n parameters: Parameters.ConvertContentBody,\n callback?: never,\n ): Promise<T>;\n async convertContentBody<T = Models.ContentBody>(\n parameters: Parameters.ConvertContentBody,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/contentbody/convert/${parameters.to}`,\n method: 'POST',\n params: {\n spaceKeyContext: parameters.spaceKeyContext,\n contentIdContext: parameters.contentIdContext,\n embeddedContentRender: parameters.embeddedContentRender,\n expand: parameters.expand,\n },\n data: {\n value: parameters.value,\n representation: parameters.representation,\n ...parameters.additionalProperties,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Converts a content body from one format to another format asynchronously. Returns the asyncId for the asynchronous\n * task.\n *\n * Supported conversions:\n *\n * - Storage: export_view\n *\n * No other conversions are supported at the moment. Once a conversion is completed, it will be available for 5\n * minutes at the result endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async asyncConvertContentBodyRequest<T = Models.AsyncId>(\n parameters: Parameters.AsyncConvertContentBodyRequest,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Converts a content body from one format to another format asynchronously. Returns the asyncId for the asynchronous\n * task.\n *\n * Supported conversions:\n *\n * - Storage: export_view\n *\n * No other conversions are supported at the moment. Once a conversion is completed, it will be available for 5\n * minutes at the result endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async asyncConvertContentBodyRequest<T = Models.AsyncId>(\n parameters: Parameters.AsyncConvertContentBodyRequest,\n callback?: never,\n ): Promise<T>;\n async asyncConvertContentBodyRequest<T = Models.AsyncId>(\n parameters: Parameters.AsyncConvertContentBodyRequest,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/contentbody/convert/async/${parameters.to}`,\n method: 'POST',\n params: {\n spaceKeyContext: parameters.spaceKeyContext,\n contentIdContext: parameters.contentIdContext,\n allowCache: parameters.allowCache,\n embeddedContentRender: parameters.embeddedContentRender,\n expand: parameters.expand,\n },\n data: {\n value: parameters.value,\n representation: parameters.representation,\n ...parameters.additionalProperties,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the Asynchronous Content Body for the corresponding asyncId if the task is complete or returns the status\n * of the task.\n *\n * After the task is completed, the result can be obtained for 5 minutes, or until an identical conversion request is\n * made again, with allowCache query param set to false.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async asyncConvertContentBodyResponse<T = Models.AsyncContentBody>(\n parameters: Parameters.AsyncConvertContentBodyResponse,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the Asynchronous Content Body for the corresponding asyncId if the task is complete or returns the status\n * of the task.\n *\n * After the task is completed, the result can be obtained for 5 minutes, or until an identical conversion request is\n * made again, with allowCache query param set to false.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async asyncConvertContentBodyResponse<T = Models.AsyncContentBody>(\n parameters: Parameters.AsyncConvertContentBodyResponse,\n callback?: never,\n ): Promise<T>;\n async asyncConvertContentBodyResponse<T = Models.AsyncContentBody>(\n parameters: Parameters.AsyncConvertContentBodyResponse,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/contentbody/convert/async/${parameters.id}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,WAAW,CAAA;AACF,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAM,CAAA,MAAA,GAAN,MAAM;;AAsC1B,IAAA,MAAM,kBAAkB,CACtB,UAAyC,EACzC,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,yBAAA,EAA4B,UAAU,CAAC,EAAE,CAAE,CAAA;AAChD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,MAAM,EAAE;gBACN,eAAe,EAAE,UAAU,CAAC,eAAe;gBAC3C,gBAAgB,EAAE,UAAU,CAAC,gBAAgB;gBAC7C,qBAAqB,EAAE,UAAU,CAAC,qBAAqB;gBACvD,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;AACD,YAAA,IAAI,EAAE;gBACJ,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,cAAc,EAAE,UAAU,CAAC,cAAc;gBACzC,GAAG,UAAU,CAAC,oBAAoB;AACnC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAuClD,IAAA,MAAM,8BAA8B,CAClC,UAAqD,EACrD,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,+BAAA,EAAkC,UAAU,CAAC,EAAE,CAAE,CAAA;AACtD,YAAA,MAAM,EAAE,MAAM;AACd,YAAA,MAAM,EAAE;gBACN,eAAe,EAAE,UAAU,CAAC,eAAe;gBAC3C,gBAAgB,EAAE,UAAU,CAAC,gBAAgB;gBAC7C,UAAU,EAAE,UAAU,CAAC,UAAU;gBACjC,qBAAqB,EAAE,UAAU,CAAC,qBAAqB;gBACvD,MAAM,EAAE,UAAU,CAAC,MAAM;AAC1B,aAAA;AACD,YAAA,IAAI,EAAE;gBACJ,KAAK,EAAE,UAAU,CAAC,KAAK;gBACvB,cAAc,EAAE,UAAU,CAAC,cAAc;gBACzC,GAAG,UAAU,CAAC,oBAAoB;AACnC,aAAA;SACF;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AA+BlD,IAAA,MAAM,+BAA+B,CACnC,UAAsD,EACtD,QAAsB,EAAA;AAEtB,QAAA,MAAM,MAAM,GAAkB;AAC5B,YAAA,GAAG,EAAE,CAAA,+BAAA,EAAkC,UAAU,CAAC,EAAE,CAAE,CAAA;AACtD,YAAA,MAAM,EAAE,KAAK;SACd;QAED,OAAO,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,MAAM,EAAE,QAAQ,CAAC;;AAEnD;;;;"}
|
|
1
|
+
{"version":3,"file":"contentBody.mjs","sources":["../../../../src/api/contentBody.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 ContentBody {\n constructor(private client: Client) {}\n\n /**\n * Converts a content body from one format to another format.\n *\n * Supported conversions:\n *\n * - Storage: view, export_view, styled_view, editor\n * - Editor: storage\n * - View: none\n * - Export_view: none\n * - Styled_view: none\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async convertContentBody<T = Models.ContentBody>(\n parameters: Parameters.ConvertContentBody,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Converts a content body from one format to another format.\n *\n * Supported conversions:\n *\n * - Storage: view, export_view, styled_view, editor\n * - Editor: storage\n * - View: none\n * - Export_view: none\n * - Styled_view: none\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n *\n * @deprecated Will be removed in next major version.\n */\n async convertContentBody<T = Models.ContentBody>(\n parameters: Parameters.ConvertContentBody,\n callback?: never,\n ): Promise<T>;\n async convertContentBody<T = Models.ContentBody>(\n parameters: Parameters.ConvertContentBody,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/contentbody/convert/${parameters.to}`,\n method: 'POST',\n params: {\n spaceKeyContext: parameters.spaceKeyContext,\n contentIdContext: parameters.contentIdContext,\n embeddedContentRender: parameters.embeddedContentRender,\n expand: parameters.expand,\n },\n data: {\n value: parameters.value,\n representation: parameters.representation,\n ...parameters.additionalProperties,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Converts a content body from one format to another format asynchronously. Returns the asyncId for the asynchronous\n * task.\n *\n * Supported conversions:\n *\n * - Atlas_doc_format: editor, export_view, storage, styled_view, view\n * - Storage: atlas_doc_format, editor, export_view, styled_view, view\n * - Editor: storage\n *\n * No other conversions are supported at the moment. Once a conversion is completed, it will be available for 5\n * minutes at the result endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async asyncConvertContentBodyRequest<T = Models.AsyncId>(\n parameters: Parameters.AsyncConvertContentBodyRequest,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Converts a content body from one format to another format asynchronously. Returns the asyncId for the asynchronous\n * task.\n *\n * Supported conversions:\n *\n * - Atlas_doc_format: editor, export_view, storage, styled_view, view\n * - Storage: atlas_doc_format, editor, export_view, styled_view, view\n * - Editor: storage\n *\n * No other conversions are supported at the moment. Once a conversion is completed, it will be available for 5\n * minutes at the result endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async asyncConvertContentBodyRequest<T = Models.AsyncId>(\n parameters: Parameters.AsyncConvertContentBodyRequest,\n callback?: never,\n ): Promise<T>;\n async asyncConvertContentBodyRequest<T = Models.AsyncId>(\n parameters: Parameters.AsyncConvertContentBodyRequest,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/contentbody/convert/async/${parameters.to}`,\n method: 'POST',\n params: {\n spaceKeyContext: parameters.spaceKeyContext,\n contentIdContext: parameters.contentIdContext,\n allowCache: parameters.allowCache,\n embeddedContentRender: parameters.embeddedContentRender,\n expand: parameters.expand,\n },\n data: {\n value: parameters.value,\n representation: parameters.representation,\n ...parameters.additionalProperties,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the asynchronous content body for the corresponding id if the task is complete or returns the status of the\n * task.\n *\n * After the task is completed, the result can be obtained for 5 minutes, or until an identical conversion request is\n * made again, with allowCache query param set to false.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async asyncConvertContentBodyResponse<T = Models.AsyncContentBody>(\n parameters: Parameters.AsyncConvertContentBodyResponse,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the asynchronous content body for the corresponding id if the task is complete or returns the status of the\n * task.\n *\n * After the task is completed, the result can be obtained for 5 minutes, or until an identical conversion request is\n * made again, with allowCache query param set to false.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: If request specifies 'contentIdContext',\n * 'View' permission for the space, and permission to view the content.\n */\n async asyncConvertContentBodyResponse<T = Models.AsyncContentBody>(\n parameters: Parameters.AsyncConvertContentBodyResponse,\n callback?: never,\n ): Promise<T>;\n async asyncConvertContentBodyResponse<T = Models.AsyncContentBody>(\n parameters: Parameters.AsyncConvertContentBodyResponse,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: `/api/contentbody/convert/async/${parameters.id}`,\n method: 'GET',\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Returns the content body for the corresponding `asyncId` of a completed conversion task. If the task is not\n * completed, the task status is returned instead.\n *\n * Once a conversion task is completed, the result can be obtained for up to 5 minutes, or until an identical\n * conversion request is made again with the `allowCache` parameter set to false.\n *\n * Note that there is a maximum limit of 50 task results per request to this endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async bulkAsyncConvertContentBodyResponse<T = Models.AsyncContentBody[]>(\n parameters: Parameters.BulkAsyncConvertContentBodyResponse,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Returns the content body for the corresponding `asyncId` of a completed conversion task. If the task is not\n * completed, the task status is returned instead.\n *\n * Once a conversion task is completed, the result can be obtained for up to 5 minutes, or until an identical\n * conversion request is made again with the `allowCache` parameter set to false.\n *\n * Note that there is a maximum limit of 50 task results per request to this endpoint.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: Permission to access the Confluence site\n * ('Can use' global permission).\n */\n async bulkAsyncConvertContentBodyResponse<T = Models.AsyncContentBody[]>(\n parameters: Parameters.BulkAsyncConvertContentBodyResponse,\n callback?: never,\n ): Promise<T>;\n async bulkAsyncConvertContentBodyResponse<T = Models.AsyncContentBody[]>(\n parameters: Parameters.BulkAsyncConvertContentBodyResponse,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/contentbody/convert/async/bulk/tasks',\n method: 'GET',\n params: {\n ids: parameters.ids,\n },\n };\n\n return this.client.sendRequest(config, callback);\n }\n\n /**\n * Asynchronously converts content bodies from one format to another format in bulk. Use the Content body REST API to\n * get the status of conversion tasks. Note that there is a maximum limit of 10 conversions per request to this\n * endpoint.\n *\n * Supported conversions:\n *\n * - Storage: editor, export_view, styled_view, view\n * - Editor: storage\n *\n * Once a conversion task is completed, it is available for polling for up to 5 minutes.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if the `spaceKeyContext` or `contentIdContext` are present.\n */\n async bulkAsyncConvertContentBodyRequest<T = Models.AsyncId[]>(\n parameters: Parameters.BulkAsyncConvertContentBodyRequest,\n callback: Callback<T>,\n ): Promise<void>;\n /**\n * Asynchronously converts content bodies from one format to another format in bulk. Use the Content body REST API to\n * get the status of conversion tasks. Note that there is a maximum limit of 10 conversions per request to this\n * endpoint.\n *\n * Supported conversions:\n *\n * - Storage: editor, export_view, styled_view, view\n * - Editor: storage\n *\n * Once a conversion task is completed, it is available for polling for up to 5 minutes.\n *\n * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'View' permission for the space, and\n * permission to view the content if the `spaceKeyContext` or `contentIdContext` are present.\n */\n async bulkAsyncConvertContentBodyRequest<T = Models.AsyncId[]>(\n parameters: Parameters.BulkAsyncConvertContentBodyRequest,\n callback?: never,\n ): Promise<T>;\n async bulkAsyncConvertContentBodyRequest<T = Models.AsyncId[]>(\n parameters: Parameters.BulkAsyncConvertContentBodyRequest,\n callback?: Callback<T>,\n ): Promise<void | T> {\n const config: RequestConfig = {\n url: '/api/contentbody/convert/async/bulk/tasks',\n method: 'POST',\n data: parameters,\n };\n\n return this.client.sendRequest(config, callback);\n }\n}\n"],"names":[],"mappings":"MAMa,WAAW,CAAA;AACF,IAAA,MAAA;AAApB,IAAA,WAAA,CAAoB,MAAc,EAAA;QAAd,IAAA,CAAA,MAAM,GAAN,MAAM;IAAW;AA0CrC,IAAA,MAAM,kBAAkB,C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