@resolution/confluence-api-client 0.4.3 → 0.4.5

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.
Files changed (171) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/README.md +4 -0
  3. package/lib/openapi/v1/services/AnalyticsService.d.ts +10 -10
  4. package/lib/openapi/v1/services/AnalyticsService.js +62 -59
  5. package/lib/openapi/v1/services/AnalyticsService.js.map +1 -1
  6. package/lib/openapi/v1/services/AuditService.d.ts +25 -25
  7. package/lib/openapi/v1/services/AuditService.js +205 -202
  8. package/lib/openapi/v1/services/AuditService.js.map +1 -1
  9. package/lib/openapi/v1/services/ContentAttachmentsService.d.ts +20 -20
  10. package/lib/openapi/v1/services/ContentAttachmentsService.js +317 -314
  11. package/lib/openapi/v1/services/ContentAttachmentsService.js.map +1 -1
  12. package/lib/openapi/v1/services/ContentBodyService.d.ts +15 -15
  13. package/lib/openapi/v1/services/ContentBodyService.js +140 -137
  14. package/lib/openapi/v1/services/ContentBodyService.js.map +1 -1
  15. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.d.ts +27 -27
  16. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js +391 -388
  17. package/lib/openapi/v1/services/ContentChildrenAndDescendantsService.js.map +1 -1
  18. package/lib/openapi/v1/services/ContentCommentsService.d.ts +8 -8
  19. package/lib/openapi/v1/services/ContentCommentsService.js +49 -46
  20. package/lib/openapi/v1/services/ContentCommentsService.js.map +1 -1
  21. package/lib/openapi/v1/services/ContentLabelsService.d.ts +11 -11
  22. package/lib/openapi/v1/services/ContentLabelsService.js +150 -147
  23. package/lib/openapi/v1/services/ContentLabelsService.js.map +1 -1
  24. package/lib/openapi/v1/services/ContentMacroBodyService.d.ts +13 -13
  25. package/lib/openapi/v1/services/ContentMacroBodyService.js +155 -152
  26. package/lib/openapi/v1/services/ContentMacroBodyService.js.map +1 -1
  27. package/lib/openapi/v1/services/ContentPermissionsService.d.ts +2 -2
  28. package/lib/openapi/v1/services/ContentPermissionsService.js +48 -45
  29. package/lib/openapi/v1/services/ContentPermissionsService.js.map +1 -1
  30. package/lib/openapi/v1/services/ContentPropertiesService.d.ts +18 -18
  31. package/lib/openapi/v1/services/ContentPropertiesService.js +237 -234
  32. package/lib/openapi/v1/services/ContentPropertiesService.js.map +1 -1
  33. package/lib/openapi/v1/services/ContentRestrictionsService.d.ts +49 -49
  34. package/lib/openapi/v1/services/ContentRestrictionsService.js +505 -502
  35. package/lib/openapi/v1/services/ContentRestrictionsService.js.map +1 -1
  36. package/lib/openapi/v1/services/ContentService.d.ts +50 -50
  37. package/lib/openapi/v1/services/ContentService.js +475 -472
  38. package/lib/openapi/v1/services/ContentService.js.map +1 -1
  39. package/lib/openapi/v1/services/ContentStatesService.d.ts +25 -25
  40. package/lib/openapi/v1/services/ContentStatesService.js +359 -356
  41. package/lib/openapi/v1/services/ContentStatesService.js.map +1 -1
  42. package/lib/openapi/v1/services/ContentVersionsService.d.ts +13 -13
  43. package/lib/openapi/v1/services/ContentVersionsService.js +144 -141
  44. package/lib/openapi/v1/services/ContentVersionsService.js.map +1 -1
  45. package/lib/openapi/v1/services/ContentWatchesService.d.ts +57 -57
  46. package/lib/openapi/v1/services/ContentWatchesService.js +454 -451
  47. package/lib/openapi/v1/services/ContentWatchesService.js.map +1 -1
  48. package/lib/openapi/v1/services/DynamicModulesService.d.ts +5 -5
  49. package/lib/openapi/v1/services/DynamicModulesService.js +70 -67
  50. package/lib/openapi/v1/services/DynamicModulesService.js.map +1 -1
  51. package/lib/openapi/v1/services/ExperimentalService.d.ts +12 -12
  52. package/lib/openapi/v1/services/ExperimentalService.js +151 -148
  53. package/lib/openapi/v1/services/ExperimentalService.js.map +1 -1
  54. package/lib/openapi/v1/services/GroupService.d.ts +52 -52
  55. package/lib/openapi/v1/services/GroupService.js +445 -442
  56. package/lib/openapi/v1/services/GroupService.js.map +1 -1
  57. package/lib/openapi/v1/services/InlineTasksService.d.ts +20 -20
  58. package/lib/openapi/v1/services/InlineTasksService.js +118 -115
  59. package/lib/openapi/v1/services/InlineTasksService.js.map +1 -1
  60. package/lib/openapi/v1/services/LabelInfoService.d.ts +5 -5
  61. package/lib/openapi/v1/services/LabelInfoService.js +37 -34
  62. package/lib/openapi/v1/services/LabelInfoService.js.map +1 -1
  63. package/lib/openapi/v1/services/LongRunningTaskService.d.ts +8 -6
  64. package/lib/openapi/v1/services/LongRunningTaskService.js +67 -63
  65. package/lib/openapi/v1/services/LongRunningTaskService.js.map +1 -1
  66. package/lib/openapi/v1/services/RelationService.d.ts +37 -37
  67. package/lib/openapi/v1/services/RelationService.js +231 -228
  68. package/lib/openapi/v1/services/RelationService.js.map +1 -1
  69. package/lib/openapi/v1/services/SearchService.d.ts +20 -20
  70. package/lib/openapi/v1/services/SearchService.js +136 -133
  71. package/lib/openapi/v1/services/SearchService.js.map +1 -1
  72. package/lib/openapi/v1/services/SettingsService.d.ts +15 -15
  73. package/lib/openapi/v1/services/SettingsService.js +204 -201
  74. package/lib/openapi/v1/services/SettingsService.js.map +1 -1
  75. package/lib/openapi/v1/services/SpacePermissionsService.d.ts +6 -6
  76. package/lib/openapi/v1/services/SpacePermissionsService.js +99 -96
  77. package/lib/openapi/v1/services/SpacePermissionsService.js.map +1 -1
  78. package/lib/openapi/v1/services/SpacePropertiesService.d.ts +16 -16
  79. package/lib/openapi/v1/services/SpacePropertiesService.js +227 -224
  80. package/lib/openapi/v1/services/SpacePropertiesService.js.map +1 -1
  81. package/lib/openapi/v1/services/SpaceService.d.ts +38 -38
  82. package/lib/openapi/v1/services/SpaceService.js +320 -317
  83. package/lib/openapi/v1/services/SpaceService.js.map +1 -1
  84. package/lib/openapi/v1/services/SpaceSettingsService.d.ts +4 -4
  85. package/lib/openapi/v1/services/SpaceSettingsService.js +68 -65
  86. package/lib/openapi/v1/services/SpaceSettingsService.js.map +1 -1
  87. package/lib/openapi/v1/services/TemplateService.d.ts +20 -20
  88. package/lib/openapi/v1/services/TemplateService.js +214 -211
  89. package/lib/openapi/v1/services/TemplateService.js.map +1 -1
  90. package/lib/openapi/v1/services/ThemesService.d.ts +13 -13
  91. package/lib/openapi/v1/services/ThemesService.js +179 -176
  92. package/lib/openapi/v1/services/ThemesService.js.map +1 -1
  93. package/lib/openapi/v1/services/UserPropertiesService.d.ts +12 -12
  94. package/lib/openapi/v1/services/UserPropertiesService.js +165 -162
  95. package/lib/openapi/v1/services/UserPropertiesService.js.map +1 -1
  96. package/lib/openapi/v1/services/UsersService.d.ts +21 -21
  97. package/lib/openapi/v1/services/UsersService.js +229 -226
  98. package/lib/openapi/v1/services/UsersService.js.map +1 -1
  99. package/lib/openapi/v2/models/user.d.ts +0 -2
  100. package/lib/openapi/v2/models/user.js +0 -2
  101. package/lib/openapi/v2/models/user.js.map +1 -1
  102. package/lib/openapi/v2/services/AncestorsService.d.ts +17 -17
  103. package/lib/openapi/v2/services/AncestorsService.js +174 -171
  104. package/lib/openapi/v2/services/AncestorsService.js.map +1 -1
  105. package/lib/openapi/v2/services/AttachmentService.d.ts +62 -62
  106. package/lib/openapi/v2/services/AttachmentService.js +261 -258
  107. package/lib/openapi/v2/services/AttachmentService.js.map +1 -1
  108. package/lib/openapi/v2/services/BlogPostService.d.ts +70 -70
  109. package/lib/openapi/v2/services/BlogPostService.js +270 -267
  110. package/lib/openapi/v2/services/BlogPostService.js.map +1 -1
  111. package/lib/openapi/v2/services/ChildrenService.d.ts +14 -14
  112. package/lib/openapi/v2/services/ChildrenService.js +77 -74
  113. package/lib/openapi/v2/services/ChildrenService.js.map +1 -1
  114. package/lib/openapi/v2/services/ClassificationLevelService.d.ts +21 -21
  115. package/lib/openapi/v2/services/ClassificationLevelService.js +304 -301
  116. package/lib/openapi/v2/services/ClassificationLevelService.js.map +1 -1
  117. package/lib/openapi/v2/services/CommentService.d.ts +136 -136
  118. package/lib/openapi/v2/services/CommentService.js +635 -632
  119. package/lib/openapi/v2/services/CommentService.js.map +1 -1
  120. package/lib/openapi/v2/services/ContentPropertiesService.d.ts +128 -128
  121. package/lib/openapi/v2/services/ContentPropertiesService.js +1242 -1239
  122. package/lib/openapi/v2/services/ContentPropertiesService.js.map +1 -1
  123. package/lib/openapi/v2/services/ContentService.d.ts +2 -2
  124. package/lib/openapi/v2/services/ContentService.js +40 -37
  125. package/lib/openapi/v2/services/ContentService.js.map +1 -1
  126. package/lib/openapi/v2/services/CustomContentService.d.ts +72 -72
  127. package/lib/openapi/v2/services/CustomContentService.js +299 -296
  128. package/lib/openapi/v2/services/CustomContentService.js.map +1 -1
  129. package/lib/openapi/v2/services/DataPoliciesService.d.ts +10 -10
  130. package/lib/openapi/v2/services/DataPoliciesService.js +67 -64
  131. package/lib/openapi/v2/services/DataPoliciesService.js.map +1 -1
  132. package/lib/openapi/v2/services/DatabaseService.d.ts +17 -17
  133. package/lib/openapi/v2/services/DatabaseService.js +90 -87
  134. package/lib/openapi/v2/services/DatabaseService.js.map +1 -1
  135. package/lib/openapi/v2/services/LabelService.d.ts +57 -57
  136. package/lib/openapi/v2/services/LabelService.js +263 -260
  137. package/lib/openapi/v2/services/LabelService.js.map +1 -1
  138. package/lib/openapi/v2/services/LikeService.d.ts +36 -36
  139. package/lib/openapi/v2/services/LikeService.js +250 -247
  140. package/lib/openapi/v2/services/LikeService.js.map +1 -1
  141. package/lib/openapi/v2/services/OperationService.d.ts +20 -20
  142. package/lib/openapi/v2/services/OperationService.js +298 -295
  143. package/lib/openapi/v2/services/OperationService.js.map +1 -1
  144. package/lib/openapi/v2/services/PageService.d.ts +73 -73
  145. package/lib/openapi/v2/services/PageService.js +272 -269
  146. package/lib/openapi/v2/services/PageService.js.map +1 -1
  147. package/lib/openapi/v2/services/SmartLinkService.d.ts +19 -17
  148. package/lib/openapi/v2/services/SmartLinkService.js +92 -89
  149. package/lib/openapi/v2/services/SmartLinkService.js.map +1 -1
  150. package/lib/openapi/v2/services/SpacePermissionsService.d.ts +6 -6
  151. package/lib/openapi/v2/services/SpacePermissionsService.js +35 -32
  152. package/lib/openapi/v2/services/SpacePermissionsService.js.map +1 -1
  153. package/lib/openapi/v2/services/SpacePropertiesService.d.ts +15 -15
  154. package/lib/openapi/v2/services/SpacePropertiesService.js +165 -162
  155. package/lib/openapi/v2/services/SpacePropertiesService.js.map +1 -1
  156. package/lib/openapi/v2/services/SpaceService.d.ts +28 -28
  157. package/lib/openapi/v2/services/SpaceService.js +83 -80
  158. package/lib/openapi/v2/services/SpaceService.js.map +1 -1
  159. package/lib/openapi/v2/services/TaskService.d.ts +40 -40
  160. package/lib/openapi/v2/services/TaskService.js +120 -117
  161. package/lib/openapi/v2/services/TaskService.js.map +1 -1
  162. package/lib/openapi/v2/services/UserService.d.ts +11 -11
  163. package/lib/openapi/v2/services/UserService.js +91 -88
  164. package/lib/openapi/v2/services/UserService.js.map +1 -1
  165. package/lib/openapi/v2/services/VersionService.d.ts +59 -59
  166. package/lib/openapi/v2/services/VersionService.js +395 -392
  167. package/lib/openapi/v2/services/VersionService.js.map +1 -1
  168. package/lib/openapi/v2/services/WhiteboardService.d.ts +17 -17
  169. package/lib/openapi/v2/services/WhiteboardService.js +90 -87
  170. package/lib/openapi/v2/services/WhiteboardService.js.map +1 -1
  171. package/package.json +4 -3
@@ -30,7 +30,7 @@ export declare class ContentMacroBodyService extends CommonHttpService {
30
30
  * @scopes-beta read:content.metadata:confluence
31
31
  * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-macro-body#api-wiki-rest-api-content-id-history-version-macro-id-macroid-convert-async-to-get
32
32
  */
33
- getAndAsyncConvertMacroBodyByMacroId({ id, version, macroId, to, expand, allowCache, spaceKeyContext, embeddedContentRender, }: {
33
+ getAndAsyncConvertMacroBodyByMacroId: ({ id, version, macroId, to, expand, allowCache, spaceKeyContext, embeddedContentRender, }: {
34
34
  /** The ID for the content that contains the macro. */
35
35
  id: string;
36
36
  /**
@@ -93,7 +93,7 @@ export declare class ContentMacroBodyService extends CommonHttpService {
93
93
  * - `webresource.tags.js` returns common dependencies as html `<script>` and
94
94
  * `<style>` tags
95
95
  */
96
- expand?: string[];
96
+ expand?: string[] | undefined;
97
97
  /**
98
98
  * If this field is false, the cache will erase its current value and begin a
99
99
  * conversion.
@@ -105,7 +105,7 @@ export declare class ContentMacroBodyService extends CommonHttpService {
105
105
  * potentially stale data, immediately should set this field to true.
106
106
  * Cache values are stored per macro per user per content and expansions.
107
107
  */
108
- allowCache?: boolean;
108
+ allowCache?: boolean | undefined;
109
109
  /**
110
110
  * The space key used for resolving embedded content (page includes,
111
111
  * files, and links) in the content body. For example, if the source content
@@ -114,7 +114,7 @@ export declare class ContentMacroBodyService extends CommonHttpService {
114
114
  * and the `spaceKeyContext=TEST` parameter is provided, then the link
115
115
  * will be converted to a link to the "Example page" page in the "TEST" space.
116
116
  */
117
- spaceKeyContext?: string;
117
+ spaceKeyContext?: string | undefined;
118
118
  /**
119
119
  * Mode used for rendering embedded content, like attachments.
120
120
  *
@@ -122,8 +122,8 @@ export declare class ContentMacroBodyService extends CommonHttpService {
122
122
  * - `version-at-save` renders the embedded content using the version at
123
123
  * the time of save.
124
124
  */
125
- embeddedContentRender?: "current" | "version-at-save";
126
- }): Promise<AsyncId>;
125
+ embeddedContentRender?: "current" | "version-at-save" | undefined;
126
+ }) => Promise<AsyncId>;
127
127
  /**
128
128
  * Returns the body of a macro in format specified in path, for the given macro ID.
129
129
  * This includes information like the name of the macro, the body of the macro,
@@ -151,7 +151,7 @@ export declare class ContentMacroBodyService extends CommonHttpService {
151
151
  * @scopes-beta read:content.metadata:confluence
152
152
  * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-macro-body#api-wiki-rest-api-content-id-history-version-macro-id-macroid-convert-to-get
153
153
  */
154
- getAndConvertMacroBodyByMacroId({ id, version, macroId, to, expand, spaceKeyContext, embeddedContentRender, }: {
154
+ getAndConvertMacroBodyByMacroId: ({ id, version, macroId, to, expand, spaceKeyContext, embeddedContentRender, }: {
155
155
  /** The ID for the content that contains the macro. */
156
156
  id: string;
157
157
  /**
@@ -206,7 +206,7 @@ export declare class ContentMacroBodyService extends CommonHttpService {
206
206
  * - `webresource.tags.js` returns common dependencies as html `<script>` and
207
207
  * `<style>` tags
208
208
  */
209
- expand?: string[];
209
+ expand?: string[] | undefined;
210
210
  /**
211
211
  * The space key used for resolving embedded content (page includes,
212
212
  * files, and links) in the content body. For example, if the source content
@@ -215,7 +215,7 @@ export declare class ContentMacroBodyService extends CommonHttpService {
215
215
  * and the `spaceKeyContext=TEST` parameter is provided, then the link
216
216
  * will be converted to a link to the "Example page" page in the "TEST" space.
217
217
  */
218
- spaceKeyContext?: string;
218
+ spaceKeyContext?: string | undefined;
219
219
  /**
220
220
  * Mode used for rendering embedded content, like attachments.
221
221
  *
@@ -223,8 +223,8 @@ export declare class ContentMacroBodyService extends CommonHttpService {
223
223
  * - `version-at-save` renders the embedded content using the version at
224
224
  * the time of save.
225
225
  */
226
- embeddedContentRender?: "current" | "version-at-save";
227
- }): Promise<ContentBody>;
226
+ embeddedContentRender?: "current" | "version-at-save" | undefined;
227
+ }) => Promise<ContentBody>;
228
228
  /**
229
229
  * Returns the body of a macro in storage format, for the given macro ID.
230
230
  * This includes information like the name of the macro, the body of the macro,
@@ -251,7 +251,7 @@ export declare class ContentMacroBodyService extends CommonHttpService {
251
251
  * @scopes-beta read:content.metadata:confluence
252
252
  * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-macro-body#api-wiki-rest-api-content-id-history-version-macro-id-macroid-get
253
253
  */
254
- getMacroBodyByMacroId({ id, version, macroId, }: {
254
+ getMacroBodyByMacroId: ({ id, version, macroId, }: {
255
255
  /** The ID for the content that contains the macro. */
256
256
  id: string;
257
257
  /**
@@ -267,6 +267,6 @@ export declare class ContentMacroBodyService extends CommonHttpService {
267
267
  * For example, '/content/196611/version/7?expand=content.body.storage'.
268
268
  */
269
269
  macroId: string;
270
- }): Promise<MacroInstance>;
270
+ }) => Promise<MacroInstance>;
271
271
  static initialize(): void;
272
272
  }
@@ -12,158 +12,161 @@ const contentMacroBody_1 = require("../models/contentMacroBody");
12
12
  const validationSchemaStorage_1 = require("../validationSchemaStorage");
13
13
  /** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-macro-body */
14
14
  class ContentMacroBodyService extends CommonHttpService_1.CommonHttpService {
15
- /**
16
- * Returns Async Id of the conversion task which will convert the macro into a
17
- * content body of the desired format.
18
- * The result will be available for 5 minutes after completion of the conversion.
19
- *
20
- * About the macro ID: When a macro is created in a new version of content,
21
- * Confluence will generate a random ID for it, unless an ID is specified
22
- * (by an app). The macro ID will look similar to this:
23
- * '884bd9-0cb8-41d5-98be-f80943c14f96'.
24
- * The ID is then persisted as new versions of content are created, and is
25
- * only modified by Confluence if there are conflicting IDs.
26
- *
27
- * Note, to preserve backwards compatibility this resource will also match on
28
- * the hash of the macro body, even if a macro ID is found. This check will
29
- * eventually become redundant, as macro IDs are generated for pages and
30
- * transparently propagate out to all instances.
31
- *
32
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
33
- * Permission to view the content that the macro is in.
34
- *
35
- * @returns Returned if the requested macro conversion request is created.
36
- * @path {GET}
37
- * /wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}/convert/async/{to}
38
- * @scopes-current read:confluence-content.all
39
- * @scopes-beta read:content.metadata:confluence
40
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-macro-body#api-wiki-rest-api-content-id-history-version-macro-id-macroid-convert-async-to-get
41
- */
42
- getAndAsyncConvertMacroBodyByMacroId({ id, version, macroId, to, expand, allowCache, spaceKeyContext, embeddedContentRender, }) {
43
- return this.getClientInstance()
44
- .request({
45
- path: "/wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}/convert/async/{to}",
46
- method: "GET",
47
- pathParams: {
48
- id,
49
- version,
50
- macroId,
51
- to,
52
- },
53
- query: {
54
- expand,
55
- allowCache,
56
- spaceKeyContext,
57
- embeddedContentRender,
58
- },
59
- })
60
- .then(this.getClientInstance().responseHandler({
61
- 200: {
62
- "application/json": "json",
63
- },
64
- }))
65
- .then(commonHttpClient.castResponse())
66
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentMacroBodyService.getAndAsyncConvertMacroBodyByMacroId.response"))
67
- .then(commonHttpClient.getBody);
68
- }
69
- /**
70
- * Returns the body of a macro in format specified in path, for the given macro ID.
71
- * This includes information like the name of the macro, the body of the macro,
72
- * and any macro parameters.
73
- *
74
- * About the macro ID: When a macro is created in a new version of content,
75
- * Confluence will generate a random ID for it, unless an ID is specified
76
- * (by an app). The macro ID will look similar to this:
77
- * '50884bd9-0cb8-41d5-98be-f80943c14f96'.
78
- * The ID is then persisted as new versions of content are created, and is
79
- * only modified by Confluence if there are conflicting IDs.
80
- *
81
- * Note, to preserve backwards compatibility this resource will also match on
82
- * the hash of the macro body, even if a macro ID is found. This check will
83
- * eventually become redundant, as macro IDs are generated for pages and
84
- * transparently propagate out to all instances.
85
- *
86
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
87
- * Permission to view the content that the macro is in.
88
- *
89
- * @returns Returned if the requested content body is returned.
90
- * @path {GET}
91
- * /wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}/convert/{to}
92
- * @scopes-current read:confluence-content.all
93
- * @scopes-beta read:content.metadata:confluence
94
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-macro-body#api-wiki-rest-api-content-id-history-version-macro-id-macroid-convert-to-get
95
- */
96
- getAndConvertMacroBodyByMacroId({ id, version, macroId, to, expand, spaceKeyContext, embeddedContentRender, }) {
97
- return this.getClientInstance()
98
- .request({
99
- path: "/wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}/convert/{to}",
100
- method: "GET",
101
- pathParams: {
102
- id,
103
- version,
104
- macroId,
105
- to,
106
- },
107
- query: {
108
- expand,
109
- spaceKeyContext,
110
- embeddedContentRender,
111
- },
112
- })
113
- .then(this.getClientInstance().responseHandler({
114
- 200: {
115
- "application/json": "json",
116
- },
117
- }))
118
- .then(commonHttpClient.castResponse())
119
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentMacroBodyService.getAndConvertMacroBodyByMacroId.response"))
120
- .then(commonHttpClient.getBody);
121
- }
122
- /**
123
- * Returns the body of a macro in storage format, for the given macro ID.
124
- * This includes information like the name of the macro, the body of the macro,
125
- * and any macro parameters. This method is mainly used by Cloud apps.
126
- *
127
- * About the macro ID: When a macro is created in a new version of content,
128
- * Confluence will generate a random ID for it, unless an ID is specified
129
- * (by an app). The macro ID will look similar to this:
130
- * '50884bd9-0cb8-41d5-98be-f80943c14f96'.
131
- * The ID is then persisted as new versions of content are created, and is
132
- * only modified by Confluence if there are conflicting IDs.
133
- *
134
- * Note, to preserve backwards compatibility this resource will also match on
135
- * the hash of the macro body, even if a macro ID is found. This check will
136
- * eventually become redundant, as macro IDs are generated for pages and
137
- * transparently propagate out to all instances.
138
- *
139
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
140
- * Permission to view the content that the macro is in.
141
- *
142
- * @returns Returned if the requested macro body is returned.
143
- * @path {GET} /wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}
144
- * @scopes-current read:confluence-content.all
145
- * @scopes-beta read:content.metadata:confluence
146
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-macro-body#api-wiki-rest-api-content-id-history-version-macro-id-macroid-get
147
- */
148
- getMacroBodyByMacroId({ id, version, macroId, }) {
149
- return this.getClientInstance()
150
- .request({
151
- path: "/wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}",
152
- method: "GET",
153
- pathParams: {
154
- id,
155
- version,
156
- macroId,
157
- },
158
- })
159
- .then(this.getClientInstance().responseHandler({
160
- 200: {
161
- "application/json": "json",
162
- },
163
- }))
164
- .then(commonHttpClient.castResponse())
165
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentMacroBodyService.getMacroBodyByMacroId.response"))
166
- .then(commonHttpClient.getBody);
15
+ constructor() {
16
+ super(...arguments);
17
+ /**
18
+ * Returns Async Id of the conversion task which will convert the macro into a
19
+ * content body of the desired format.
20
+ * The result will be available for 5 minutes after completion of the conversion.
21
+ *
22
+ * About the macro ID: When a macro is created in a new version of content,
23
+ * Confluence will generate a random ID for it, unless an ID is specified
24
+ * (by an app). The macro ID will look similar to this:
25
+ * '884bd9-0cb8-41d5-98be-f80943c14f96'.
26
+ * The ID is then persisted as new versions of content are created, and is
27
+ * only modified by Confluence if there are conflicting IDs.
28
+ *
29
+ * Note, to preserve backwards compatibility this resource will also match on
30
+ * the hash of the macro body, even if a macro ID is found. This check will
31
+ * eventually become redundant, as macro IDs are generated for pages and
32
+ * transparently propagate out to all instances.
33
+ *
34
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
35
+ * Permission to view the content that the macro is in.
36
+ *
37
+ * @returns Returned if the requested macro conversion request is created.
38
+ * @path {GET}
39
+ * /wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}/convert/async/{to}
40
+ * @scopes-current read:confluence-content.all
41
+ * @scopes-beta read:content.metadata:confluence
42
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-macro-body#api-wiki-rest-api-content-id-history-version-macro-id-macroid-convert-async-to-get
43
+ */
44
+ this.getAndAsyncConvertMacroBodyByMacroId = ({ id, version, macroId, to, expand, allowCache, spaceKeyContext, embeddedContentRender, }) => {
45
+ return this.getClientInstance()
46
+ .request({
47
+ path: "/wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}/convert/async/{to}",
48
+ method: "GET",
49
+ pathParams: {
50
+ id,
51
+ version,
52
+ macroId,
53
+ to,
54
+ },
55
+ query: {
56
+ expand,
57
+ allowCache,
58
+ spaceKeyContext,
59
+ embeddedContentRender,
60
+ },
61
+ })
62
+ .then(this.getClientInstance().responseHandler({
63
+ 200: {
64
+ "application/json": "json",
65
+ },
66
+ }))
67
+ .then(commonHttpClient.castResponse())
68
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentMacroBodyService.getAndAsyncConvertMacroBodyByMacroId.response"))
69
+ .then(commonHttpClient.getBody);
70
+ };
71
+ /**
72
+ * Returns the body of a macro in format specified in path, for the given macro ID.
73
+ * This includes information like the name of the macro, the body of the macro,
74
+ * and any macro parameters.
75
+ *
76
+ * About the macro ID: When a macro is created in a new version of content,
77
+ * Confluence will generate a random ID for it, unless an ID is specified
78
+ * (by an app). The macro ID will look similar to this:
79
+ * '50884bd9-0cb8-41d5-98be-f80943c14f96'.
80
+ * The ID is then persisted as new versions of content are created, and is
81
+ * only modified by Confluence if there are conflicting IDs.
82
+ *
83
+ * Note, to preserve backwards compatibility this resource will also match on
84
+ * the hash of the macro body, even if a macro ID is found. This check will
85
+ * eventually become redundant, as macro IDs are generated for pages and
86
+ * transparently propagate out to all instances.
87
+ *
88
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
89
+ * Permission to view the content that the macro is in.
90
+ *
91
+ * @returns Returned if the requested content body is returned.
92
+ * @path {GET}
93
+ * /wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}/convert/{to}
94
+ * @scopes-current read:confluence-content.all
95
+ * @scopes-beta read:content.metadata:confluence
96
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-macro-body#api-wiki-rest-api-content-id-history-version-macro-id-macroid-convert-to-get
97
+ */
98
+ this.getAndConvertMacroBodyByMacroId = ({ id, version, macroId, to, expand, spaceKeyContext, embeddedContentRender, }) => {
99
+ return this.getClientInstance()
100
+ .request({
101
+ path: "/wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}/convert/{to}",
102
+ method: "GET",
103
+ pathParams: {
104
+ id,
105
+ version,
106
+ macroId,
107
+ to,
108
+ },
109
+ query: {
110
+ expand,
111
+ spaceKeyContext,
112
+ embeddedContentRender,
113
+ },
114
+ })
115
+ .then(this.getClientInstance().responseHandler({
116
+ 200: {
117
+ "application/json": "json",
118
+ },
119
+ }))
120
+ .then(commonHttpClient.castResponse())
121
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentMacroBodyService.getAndConvertMacroBodyByMacroId.response"))
122
+ .then(commonHttpClient.getBody);
123
+ };
124
+ /**
125
+ * Returns the body of a macro in storage format, for the given macro ID.
126
+ * This includes information like the name of the macro, the body of the macro,
127
+ * and any macro parameters. This method is mainly used by Cloud apps.
128
+ *
129
+ * About the macro ID: When a macro is created in a new version of content,
130
+ * Confluence will generate a random ID for it, unless an ID is specified
131
+ * (by an app). The macro ID will look similar to this:
132
+ * '50884bd9-0cb8-41d5-98be-f80943c14f96'.
133
+ * The ID is then persisted as new versions of content are created, and is
134
+ * only modified by Confluence if there are conflicting IDs.
135
+ *
136
+ * Note, to preserve backwards compatibility this resource will also match on
137
+ * the hash of the macro body, even if a macro ID is found. This check will
138
+ * eventually become redundant, as macro IDs are generated for pages and
139
+ * transparently propagate out to all instances.
140
+ *
141
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
142
+ * Permission to view the content that the macro is in.
143
+ *
144
+ * @returns Returned if the requested macro body is returned.
145
+ * @path {GET} /wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}
146
+ * @scopes-current read:confluence-content.all
147
+ * @scopes-beta read:content.metadata:confluence
148
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-macro-body#api-wiki-rest-api-content-id-history-version-macro-id-macroid-get
149
+ */
150
+ this.getMacroBodyByMacroId = ({ id, version, macroId, }) => {
151
+ return this.getClientInstance()
152
+ .request({
153
+ path: "/wiki/rest/api/content/{id}/history/{version}/macro/id/{macroId}",
154
+ method: "GET",
155
+ pathParams: {
156
+ id,
157
+ version,
158
+ macroId,
159
+ },
160
+ })
161
+ .then(this.getClientInstance().responseHandler({
162
+ 200: {
163
+ "application/json": "json",
164
+ },
165
+ }))
166
+ .then(commonHttpClient.castResponse())
167
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentMacroBodyService.getMacroBodyByMacroId.response"))
168
+ .then(commonHttpClient.getBody);
169
+ };
167
170
  }
168
171
  static initialize() {
169
172
  validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentMacroBodyService.getMacroBodyByMacroId.response", zod_1.z
@@ -1 +1 @@
1
- {"version":3,"file":"ContentMacroBodyService.js","sourceRoot":"","sources":["../../../../src/openapi/v1/services/ContentMacroBodyService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,6BAAwB;AAExB,6DAA6D;AAC7D,iEAA8D;AAC9D,6CAI0B;AAC1B,iEAGoC;AACpC,wEAAqE;AACrE,iGAAiG;AACjG,MAAa,uBAAwB,SAAQ,qCAAiB;IAC5D;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,oCAAoC,CAAC,EACnC,EAAE,EACF,OAAO,EACP,OAAO,EACP,EAAE,EACF,MAAM,EACN,UAAU,EACV,eAAe,EACf,qBAAqB,GA8FtB;QACC,OAAO,IAAI,CAAC,iBAAiB,EAAE;aAC5B,OAAO,CAAC;YACP,IAAI,EAAE,qFAAqF;YAC3F,MAAM,EAAE,KAAK;YACb,UAAU,EAAE;gBACV,EAAE;gBACF,OAAO;gBACP,OAAO;gBACP,EAAE;aACH;YACD,KAAK,EAAE;gBACL,MAAM;gBACN,UAAU;gBACV,eAAe;gBACf,qBAAqB;aACtB;SACF,CAAC;aACD,IAAI,CACH,IAAI,CAAC,iBAAiB,EAAE,CAAC,eAAe,CAAC;YACvC,GAAG,EAAE;gBACH,kBAAkB,EAAE,MAAM;aAC3B;SACF,CAAC,CACH;aACA,IAAI,CACH,gBAAgB,CAAC,YAAY,EAIzB,CACL;aACA,IAAI,CACH,iDAAuB,CAAC,SAAS,CAC/B,uEAAuE,CACxE,CACF;aACA,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IACD;;;;;;;;;;;;;;;;;;;;;;;;;;OA0BG;IACH,+BAA+B,CAAC,EAC9B,EAAE,EACF,OAAO,EACP,OAAO,EACP,EAAE,EACF,MAAM,EACN,eAAe,EACf,qBAAqB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AAM,EAAE,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YACtB,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,iDAAuB,CAAC,IAAI,CAAC,eAAe,CAAC;SACpD,CAAC;aACD,QAAQ,CAAC,wDAAwD,CAAC,CACtE,CAAC;QACF,iDAAuB,CAAC,kBAAkB,CACxC,kEAAkE,EAClE,OAAC;aACE,MAAM,CAAC;YACN,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YACtB,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,iDAAuB,CAAC,IAAI,CAAC,aAAa,CAAC;SAClD,CAAC;aACD,QAAQ,CACP,kEAAkE,CACnE,CACJ,CAAC;QACF,iDAAuB,CAAC,kBAAkB,CACxC,uEAAuE,EACvE,OAAC;aACE,MAAM,CAAC;YACN,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YACtB,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,iDAAuB,CAAC,IAAI,CAAC,SAAS,CAAC;SAC9C,CAAC;aACD,QAAQ,CACP,uEAAuE,CACxE,CACJ,CAAC;QACF,iDAAuB,CAAC,YAAY,CAAC;YACnC,4DAAyC;YACzC,wCAA+B;SAChC,CAAC,CAAC;IACL,CAAC;CACF;AAjbD,0DAibC"}
1
+ {"version":3,"file":"ContentMacroBodyService.js","sourceRoot":"","sources":["../../../../src/openapi/v1/services/ContentMacroBodyService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,6BAAwB;AAExB,6DAA6D;AAC7D,iEAA8D;AAC9D,6CAI0B;AAC1B,iEAGoC;AACpC,wEAAqE;AACrE,iGAAiG;AACjG,MAAa,uBAAwB,SAAQ,qCAAiB;IAA9D;;QACE;;;;;;;;;;;;;;;;;;;;;;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AClE,OAAC;aACE,MAAM,CAAC;YACN,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YACtB,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,iDAAuB,CAAC,IAAI,CAAC,aAAa,CAAC;SAClD,CAAC;aACD,QAAQ,CACP,kEAAkE,CACnE,CACJ,CAAC;QACF,iDAAuB,CAAC,kBAAkB,CACxC,uEAAuE,EACvE,OAAC;aACE,MAAM,CAAC;YACN,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YACtB,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,iDAAuB,CAAC,IAAI,CAAC,SAAS,CAAC;SAC9C,CAAC;aACD,QAAQ,CACP,uEAAuE,CACxE,CACJ,CAAC;QACF,iDAAuB,CAAC,YAAY,CAAC;YACnC,4DAAyC;YACzC,wCAA+B;SAChC,CAAC,CAAC;IACL,CAAC;CACF;AAjbD,0DAibC"}
@@ -26,11 +26,11 @@ export declare class ContentPermissionsService extends CommonHttpService {
26
26
  * @scopes-beta read:content.permission:confluence
27
27
  * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-permissions#api-wiki-rest-api-content-id-permission-check-post
28
28
  */
29
- checkContentPermission({ id, contentPermissionRequest, }: {
29
+ checkContentPermission: ({ id, contentPermissionRequest, }: {
30
30
  /** The ID of the content to check permissions against. */
31
31
  id: string;
32
32
  /** The content permission request. */
33
33
  contentPermissionRequest: ContentPermissionRequest;
34
- }): Promise<PermissionCheckResponse>;
34
+ }) => Promise<PermissionCheckResponse>;
35
35
  static initialize(): void;
36
36
  }
@@ -11,51 +11,54 @@ const contentPermissions_1 = require("../models/contentPermissions");
11
11
  const validationSchemaStorage_1 = require("../validationSchemaStorage");
12
12
  /** @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-permissions */
13
13
  class ContentPermissionsService extends CommonHttpService_1.CommonHttpService {
14
- /**
15
- * Check if a user or a group can perform an operation to the specified content.
16
- * The `operation` to check
17
- * must be provided. The user’s account ID or the ID of the group can be provided
18
- * in the `subject` to check
19
- * permissions against a specified user or group. The following permission checks
20
- * are done to make sure that the
21
- * user or group has the proper access:
22
- *
23
- * - site permissions
24
- * - space permissions
25
- * - content restrictions
26
- *
27
- * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
28
- * Permission to access the Confluence site ('Can use' global permission) if
29
- * checking permission for self,
30
- * otherwise 'Confluence Administrator' global permission is required.
31
- *
32
- * @returns Returned if the permission check completed successfully
33
- * @path {POST} /wiki/rest/api/content/{id}/permission/check
34
- * @scopes-current read:confluence-content.permission
35
- * @scopes-beta read:content.permission:confluence
36
- * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-permissions#api-wiki-rest-api-content-id-permission-check-post
37
- */
38
- checkContentPermission({ id, contentPermissionRequest, }) {
39
- return this.getClientInstance()
40
- .request({
41
- path: "/wiki/rest/api/content/{id}/permission/check",
42
- method: "POST",
43
- pathParams: {
44
- id,
45
- },
46
- headers: {
47
- "Content-Type": "application/json",
48
- },
49
- body: contentPermissionRequest,
50
- })
51
- .then(this.getClientInstance().responseHandler({
52
- 200: {
53
- "application/json": "json",
54
- },
55
- }))
56
- .then(commonHttpClient.castResponse())
57
- .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentPermissionsService.checkContentPermission.response"))
58
- .then(commonHttpClient.getBody);
14
+ constructor() {
15
+ super(...arguments);
16
+ /**
17
+ * Check if a user or a group can perform an operation to the specified content.
18
+ * The `operation` to check
19
+ * must be provided. The user’s account ID or the ID of the group can be provided
20
+ * in the `subject` to check
21
+ * permissions against a specified user or group. The following permission checks
22
+ * are done to make sure that the
23
+ * user or group has the proper access:
24
+ *
25
+ * - site permissions
26
+ * - space permissions
27
+ * - content restrictions
28
+ *
29
+ * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**:
30
+ * Permission to access the Confluence site ('Can use' global permission) if
31
+ * checking permission for self,
32
+ * otherwise 'Confluence Administrator' global permission is required.
33
+ *
34
+ * @returns Returned if the permission check completed successfully
35
+ * @path {POST} /wiki/rest/api/content/{id}/permission/check
36
+ * @scopes-current read:confluence-content.permission
37
+ * @scopes-beta read:content.permission:confluence
38
+ * @see https://developer.atlassian.com/cloud/confluence/rest/v1/api-group-content-permissions#api-wiki-rest-api-content-id-permission-check-post
39
+ */
40
+ this.checkContentPermission = ({ id, contentPermissionRequest, }) => {
41
+ return this.getClientInstance()
42
+ .request({
43
+ path: "/wiki/rest/api/content/{id}/permission/check",
44
+ method: "POST",
45
+ pathParams: {
46
+ id,
47
+ },
48
+ headers: {
49
+ "Content-Type": "application/json",
50
+ },
51
+ body: contentPermissionRequest,
52
+ })
53
+ .then(this.getClientInstance().responseHandler({
54
+ 200: {
55
+ "application/json": "json",
56
+ },
57
+ }))
58
+ .then(commonHttpClient.castResponse())
59
+ .then(validationSchemaStorage_1.validationSchemaStorage.validator("ContentPermissionsService.checkContentPermission.response"))
60
+ .then(commonHttpClient.getBody);
61
+ };
59
62
  }
60
63
  static initialize() {
61
64
  validationSchemaStorage_1.validationSchemaStorage.registerExtensible("ContentPermissionsService.checkContentPermission.response", zod_1.z
@@ -1 +1 @@
1
- {"version":3,"file":"ContentPermissionsService.js","sourceRoot":"","sources":["../../../../src/openapi/v1/services/ContentPermissionsService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,6BAAwB;AAExB,6DAA6D;AAC7D,iEAA8D;AAC9D,qEAIsC;AACtC,wEAAqE;AACrE,kGAAkG;AAClG,MAAa,yBAA0B,SAAQ,qCAAiB;IAC9D;;;;;;;;;;;;;;;;;;;;;;;OAuBG;IACH,sBAAsB,CAAC,EACrB,EAAE,EACF,wBAAwB,GAMzB;QACC,OAAO,IAAI,CAAC,iBAAiB,EAAE;aAC5B,OAAO,CAAC;YACP,IAAI,EAAE,8CAA8C;YACpD,MAAM,EAAE,MAAM;YACd,UAAU,EAAE;gBACV,EAAE;aACH;YACD,OAAO,EAAE;gBACP,cAAc,EAAE,kBAAkB;aACnC;YACD,IAAI,EAAE,wBAAwB;SAC/B,CAAC;aACD,IAAI,CACH,IAAI,CAAC,iBAAiB,EAAE,CAAC,eAAe,CAAC;YACvC,GAAG,EAAE;gBACH,kBAAkB,EAAE,MAAM;aAC3B;SACF,CAAC,CACH;aACA,IAAI,CACH,gBAAgB,CAAC,YAAY,EAIzB,CACL;aACA,IAAI,CACH,iDAAuB,CAAC,SAAS,CAC/B,2DAA2D,CAC5D,CACF;aACA,IAAI,CAAC,gBAAgB,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC;IACD,MAAM,CAAC,UAAU;QACf,iDAAuB,CAAC,kBAAkB,CACxC,2DAA2D,EAC3D,OAAC;aACE,MAAM,CAAC;YACN,MAAM,EAAE,OAAC,CAAC,OAAO,CAAC,GAAG,CAAC;YACtB,SAAS,EAAE,OAAC,CAAC,OAAO,CAAC,kBAAkB,CAAC;YACxC,IAAI,EAAE,iDAAuB,CAAC,IAAI,CAAC,yBAAyB,CAAC;SAC9D,CAAC;aACD,QAAQ,CAAC,2DAA2D,CAAC,CACzE,CAAC;QACF,iDAAuB,CAAC,YAAY,CAAC;YACnC,gEAA2C;SAC5C,CAAC,CAAC;IACL,CAAC;CACF;AAlFD,8DAkFC"}
1
+ {"version":3,"file":"ContentPermissionsService.js","sourceRoot":"","sources":["../../../../src/openapi/v1/services/ContentPermissionsService.ts"],"names":[],"mappings":";;;AAAA,eAAe;AACf,wDAAwD;AACxD,gDAAgD;AAChD,6BAAwB;AAExB,6DAA6D;AAC7D,iEAA8D;AAC9D,qEAIsC;AACtC,wEAAqE;AACrE,kGAAkG;AAClG,MAAa,yBAA0B,SAAQ,qCAAiB;IAAhE;;QACE;;;;;;;;;;;;;;;;;;;;;;;WAuBG;QACH,2BAAsB,GAAG,CAAC,EACxB,EAAE,EACF,wBAAwB,GAMzB,EAAoC,EAAE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