confluence.js 2.0.0 → 2.2.0-dev20260318121920

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (229) hide show
  1. package/CHANGELOG.md +67 -2
  2. package/README.md +168 -181
  3. package/dist/cjs/api/analytics.cjs.map +1 -1
  4. package/dist/cjs/api/audit.cjs.map +1 -1
  5. package/dist/cjs/api/content.cjs +0 -5
  6. package/dist/cjs/api/content.cjs.map +1 -1
  7. package/dist/cjs/api/contentAttachments.cjs +1 -0
  8. package/dist/cjs/api/contentAttachments.cjs.map +1 -1
  9. package/dist/cjs/api/contentBody.cjs +18 -0
  10. package/dist/cjs/api/contentBody.cjs.map +1 -1
  11. package/dist/cjs/api/contentChildrenAndDescendants.cjs +2 -0
  12. package/dist/cjs/api/contentChildrenAndDescendants.cjs.map +1 -1
  13. package/dist/cjs/api/contentComments.cjs +1 -0
  14. package/dist/cjs/api/contentComments.cjs.map +1 -1
  15. package/dist/cjs/api/contentLabels.cjs.map +1 -1
  16. package/dist/cjs/api/contentMacroBody.cjs.map +1 -1
  17. package/dist/cjs/api/contentPermissions.cjs.map +1 -1
  18. package/dist/cjs/api/contentProperties.cjs +1 -0
  19. package/dist/cjs/api/contentProperties.cjs.map +1 -1
  20. package/dist/cjs/api/contentRestrictions.cjs.map +1 -1
  21. package/dist/cjs/api/contentStates.cjs +13 -0
  22. package/dist/cjs/api/contentStates.cjs.map +1 -1
  23. package/dist/cjs/api/contentVersions.cjs.map +1 -1
  24. package/dist/cjs/api/contentWatches.cjs.map +1 -1
  25. package/dist/cjs/api/dynamicModules.cjs.map +1 -1
  26. package/dist/cjs/api/experimental.cjs.map +1 -1
  27. package/dist/cjs/api/group.cjs +18 -17
  28. package/dist/cjs/api/group.cjs.map +1 -1
  29. package/dist/cjs/api/index.cjs +2 -0
  30. package/dist/cjs/api/index.cjs.map +1 -1
  31. package/dist/cjs/api/inlineTasks.cjs +1 -0
  32. package/dist/cjs/api/inlineTasks.cjs.map +1 -1
  33. package/dist/cjs/api/labelInfo.cjs.map +1 -1
  34. package/dist/cjs/api/longRunningTask.cjs +1 -0
  35. package/dist/cjs/api/longRunningTask.cjs.map +1 -1
  36. package/dist/cjs/api/models/labeledContentType.cjs.map +1 -1
  37. package/dist/cjs/api/relation.cjs.map +1 -1
  38. package/dist/cjs/api/search.cjs +1 -0
  39. package/dist/cjs/api/search.cjs.map +1 -1
  40. package/dist/cjs/api/settings.cjs.map +1 -1
  41. package/dist/cjs/api/space.cjs +4 -2
  42. package/dist/cjs/api/space.cjs.map +1 -1
  43. package/dist/cjs/api/spacePermissions.cjs.map +1 -1
  44. package/dist/cjs/api/spaceProperties.cjs +1 -0
  45. package/dist/cjs/api/spaceProperties.cjs.map +1 -1
  46. package/dist/cjs/api/spaceSettings.cjs.map +1 -1
  47. package/dist/cjs/api/template.cjs.map +1 -1
  48. package/dist/cjs/api/themes.cjs.map +1 -1
  49. package/dist/cjs/api/userProperties.cjs +56 -0
  50. package/dist/cjs/api/userProperties.cjs.map +1 -0
  51. package/dist/cjs/api/users.cjs.map +1 -1
  52. package/dist/cjs/clients/baseClient.cjs +17 -2
  53. package/dist/cjs/clients/baseClient.cjs.map +1 -1
  54. package/dist/cjs/clients/confluenceClient.cjs +6 -0
  55. package/dist/cjs/clients/confluenceClient.cjs.map +1 -1
  56. package/dist/cjs/config.cjs +7 -4
  57. package/dist/cjs/config.cjs.map +1 -1
  58. package/dist/cjs/paramSerializer.cjs.map +1 -1
  59. package/dist/cjs/services/authenticationService/authenticationService.cjs.map +1 -1
  60. package/dist/cjs/services/authenticationService/authentications/createBasicAuthenticationToken.cjs.map +1 -1
  61. package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs +1 -1
  62. package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs.map +1 -1
  63. package/dist/cjs/services/authenticationService/base64Encoder.cjs.map +1 -1
  64. package/dist/esm/api/analytics.mjs.map +1 -1
  65. package/dist/esm/api/audit.mjs.map +1 -1
  66. package/dist/esm/api/content.mjs +0 -5
  67. package/dist/esm/api/content.mjs.map +1 -1
  68. package/dist/esm/api/contentAttachments.mjs +1 -0
  69. package/dist/esm/api/contentAttachments.mjs.map +1 -1
  70. package/dist/esm/api/contentBody.mjs +18 -0
  71. package/dist/esm/api/contentBody.mjs.map +1 -1
  72. package/dist/esm/api/contentChildrenAndDescendants.mjs +2 -0
  73. package/dist/esm/api/contentChildrenAndDescendants.mjs.map +1 -1
  74. package/dist/esm/api/contentComments.mjs +1 -0
  75. package/dist/esm/api/contentComments.mjs.map +1 -1
  76. package/dist/esm/api/contentLabels.mjs.map +1 -1
  77. package/dist/esm/api/contentMacroBody.mjs.map +1 -1
  78. package/dist/esm/api/contentPermissions.mjs.map +1 -1
  79. package/dist/esm/api/contentProperties.mjs +1 -0
  80. package/dist/esm/api/contentProperties.mjs.map +1 -1
  81. package/dist/esm/api/contentRestrictions.mjs.map +1 -1
  82. package/dist/esm/api/contentStates.mjs +13 -0
  83. package/dist/esm/api/contentStates.mjs.map +1 -1
  84. package/dist/esm/api/contentVersions.mjs.map +1 -1
  85. package/dist/esm/api/contentWatches.mjs.map +1 -1
  86. package/dist/esm/api/dynamicModules.mjs.map +1 -1
  87. package/dist/esm/api/experimental.mjs.map +1 -1
  88. package/dist/esm/api/group.mjs +18 -17
  89. package/dist/esm/api/group.mjs.map +1 -1
  90. package/dist/esm/api/index.mjs +1 -0
  91. package/dist/esm/api/index.mjs.map +1 -1
  92. package/dist/esm/api/inlineTasks.mjs +1 -0
  93. package/dist/esm/api/inlineTasks.mjs.map +1 -1
  94. package/dist/esm/api/labelInfo.mjs.map +1 -1
  95. package/dist/esm/api/longRunningTask.mjs +1 -0
  96. package/dist/esm/api/longRunningTask.mjs.map +1 -1
  97. package/dist/esm/api/models/labeledContentType.mjs.map +1 -1
  98. package/dist/esm/api/relation.mjs.map +1 -1
  99. package/dist/esm/api/search.mjs +1 -0
  100. package/dist/esm/api/search.mjs.map +1 -1
  101. package/dist/esm/api/settings.mjs.map +1 -1
  102. package/dist/esm/api/space.mjs +4 -2
  103. package/dist/esm/api/space.mjs.map +1 -1
  104. package/dist/esm/api/spacePermissions.mjs.map +1 -1
  105. package/dist/esm/api/spaceProperties.mjs +1 -0
  106. package/dist/esm/api/spaceProperties.mjs.map +1 -1
  107. package/dist/esm/api/spaceSettings.mjs.map +1 -1
  108. package/dist/esm/api/template.mjs.map +1 -1
  109. package/dist/esm/api/themes.mjs.map +1 -1
  110. package/dist/esm/api/userProperties.mjs +54 -0
  111. package/dist/esm/api/userProperties.mjs.map +1 -0
  112. package/dist/esm/api/users.mjs.map +1 -1
  113. package/dist/esm/clients/baseClient.mjs +18 -3
  114. package/dist/esm/clients/baseClient.mjs.map +1 -1
  115. package/dist/esm/clients/confluenceClient.mjs +6 -0
  116. package/dist/esm/clients/confluenceClient.mjs.map +1 -1
  117. package/dist/esm/config.mjs +7 -4
  118. package/dist/esm/config.mjs.map +1 -1
  119. package/dist/esm/paramSerializer.mjs.map +1 -1
  120. package/dist/esm/services/authenticationService/authenticationService.mjs.map +1 -1
  121. package/dist/esm/services/authenticationService/authentications/createBasicAuthenticationToken.mjs.map +1 -1
  122. package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs +1 -1
  123. package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs.map +1 -1
  124. package/dist/esm/services/authenticationService/base64Encoder.mjs.map +1 -1
  125. package/dist/esm/types/api/analytics.d.ts +1 -1
  126. package/dist/esm/types/api/audit.d.ts +3 -3
  127. package/dist/esm/types/api/content.d.ts +33 -7
  128. package/dist/esm/types/api/contentAttachments.d.ts +5 -1
  129. package/dist/esm/types/api/contentBody.d.ts +73 -7
  130. package/dist/esm/types/api/contentChildrenAndDescendants.d.ts +37 -5
  131. package/dist/esm/types/api/contentComments.d.ts +5 -0
  132. package/dist/esm/types/api/contentLabels.d.ts +17 -9
  133. package/dist/esm/types/api/contentMacroBody.d.ts +79 -1
  134. package/dist/esm/types/api/contentPermissions.d.ts +1 -1
  135. package/dist/esm/types/api/contentProperties.d.ts +25 -0
  136. package/dist/esm/types/api/contentRestrictions.d.ts +19 -7
  137. package/dist/esm/types/api/contentStates.d.ts +23 -5
  138. package/dist/esm/types/api/contentVersions.d.ts +9 -1
  139. package/dist/esm/types/api/contentWatches.d.ts +1 -1
  140. package/dist/esm/types/api/dynamicModules.d.ts +1 -1
  141. package/dist/esm/types/api/experimental.d.ts +21 -1
  142. package/dist/esm/types/api/group.d.ts +47 -27
  143. package/dist/esm/types/api/index.d.ts +1 -0
  144. package/dist/esm/types/api/inlineTasks.d.ts +13 -0
  145. package/dist/esm/types/api/labelInfo.d.ts +1 -1
  146. package/dist/esm/types/api/longRunningTask.d.ts +1 -1
  147. package/dist/esm/types/api/models/spaceCreate.d.ts +11 -2
  148. package/dist/esm/types/api/models/spacePrivateCreate.d.ts +11 -2
  149. package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyRequest.d.ts +58 -0
  150. package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyResponse.d.ts +4 -0
  151. package/dist/esm/types/api/parameters/deleteGroupById.d.ts +4 -0
  152. package/dist/esm/types/api/parameters/downloadAttachment.d.ts +6 -0
  153. package/dist/esm/types/api/parameters/getContentChildren.d.ts +6 -1
  154. package/dist/esm/types/api/parameters/getContentsWithState.d.ts +17 -0
  155. package/dist/esm/types/api/parameters/getGroupMembersByGroupId.d.ts +7 -0
  156. package/dist/esm/types/api/parameters/getGroupMembershipsForUser.d.ts +4 -0
  157. package/dist/esm/types/api/parameters/getTasks.d.ts +2 -0
  158. package/dist/esm/types/api/parameters/getUser.d.ts +4 -0
  159. package/dist/esm/types/api/parameters/index.d.ts +4 -0
  160. package/dist/esm/types/api/parameters/searchUser.d.ts +7 -0
  161. package/dist/esm/types/api/relation.d.ts +13 -15
  162. package/dist/esm/types/api/search.d.ts +7 -1
  163. package/dist/esm/types/api/settings.d.ts +5 -1
  164. package/dist/esm/types/api/space.d.ts +23 -7
  165. package/dist/esm/types/api/spacePermissions.d.ts +1 -1
  166. package/dist/esm/types/api/spaceProperties.d.ts +25 -0
  167. package/dist/esm/types/api/spaceSettings.d.ts +1 -1
  168. package/dist/esm/types/api/template.d.ts +1 -1
  169. package/dist/esm/types/api/themes.d.ts +1 -1
  170. package/dist/esm/types/api/userProperties.d.ts +102 -0
  171. package/dist/esm/types/api/users.d.ts +21 -9
  172. package/dist/esm/types/clients/baseClient.d.ts +1 -0
  173. package/dist/esm/types/clients/confluenceClient.d.ts +6 -1
  174. package/dist/esm/types/config.d.ts +29 -240
  175. package/eslint.config.ts +11 -16
  176. package/package.json +34 -33
  177. package/rollup.config.ts +8 -8
  178. package/src/api/analytics.ts +1 -1
  179. package/src/api/audit.ts +3 -3
  180. package/src/api/content.ts +33 -12
  181. package/src/api/contentAttachments.ts +6 -1
  182. package/src/api/contentBody.ts +113 -7
  183. package/src/api/contentChildrenAndDescendants.ts +39 -5
  184. package/src/api/contentComments.ts +5 -0
  185. package/src/api/contentLabels.ts +17 -9
  186. package/src/api/contentMacroBody.ts +79 -1
  187. package/src/api/contentPermissions.ts +1 -1
  188. package/src/api/contentProperties.ts +25 -0
  189. package/src/api/contentRestrictions.ts +19 -7
  190. package/src/api/contentStates.ts +47 -5
  191. package/src/api/contentVersions.ts +9 -1
  192. package/src/api/contentWatches.ts +1 -1
  193. package/src/api/dynamicModules.ts +1 -1
  194. package/src/api/experimental.ts +21 -1
  195. package/src/api/group.ts +96 -75
  196. package/src/api/index.ts +1 -0
  197. package/src/api/inlineTasks.ts +13 -0
  198. package/src/api/labelInfo.ts +1 -1
  199. package/src/api/longRunningTask.ts +2 -1
  200. package/src/api/models/spaceCreate.ts +11 -2
  201. package/src/api/models/spacePrivateCreate.ts +11 -2
  202. package/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts +88 -0
  203. package/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts +4 -0
  204. package/src/api/parameters/deleteGroupById.ts +4 -0
  205. package/src/api/parameters/downloadAttachment.ts +6 -0
  206. package/src/api/parameters/getContentChildren.ts +7 -1
  207. package/src/api/parameters/getContentsWithState.ts +17 -0
  208. package/src/api/parameters/getGroupMembersByGroupId.ts +7 -0
  209. package/src/api/parameters/getGroupMembershipsForUser.ts +4 -0
  210. package/src/api/parameters/getTasks.ts +2 -0
  211. package/src/api/parameters/getUser.ts +4 -0
  212. package/src/api/parameters/index.ts +4 -0
  213. package/src/api/parameters/searchUser.ts +7 -0
  214. package/src/api/relation.ts +13 -15
  215. package/src/api/search.ts +8 -1
  216. package/src/api/settings.ts +5 -1
  217. package/src/api/space.ts +27 -9
  218. package/src/api/spacePermissions.ts +1 -1
  219. package/src/api/spaceProperties.ts +25 -0
  220. package/src/api/spaceSettings.ts +1 -1
  221. package/src/api/template.ts +1 -1
  222. package/src/api/themes.ts +1 -1
  223. package/src/api/userProperties.ts +185 -0
  224. package/src/api/users.ts +21 -9
  225. package/src/clients/baseClient.ts +24 -8
  226. package/src/clients/confluenceClient.ts +6 -0
  227. package/src/config.ts +8 -4
  228. package/src/services/authenticationService/authentications/createJWTAuthentication.ts +1 -1
  229. package/favicon.svg +0 -7
@@ -15,24 +15,8 @@ export declare const BasicSchema: z.ZodObject<{
15
15
  * @see {@link https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/} for how to create API tokens
16
16
  */
17
17
  apiToken: z.ZodString;
18
- }, "strict", z.ZodTypeAny, {
19
- email: string;
20
- apiToken: string;
21
- }, {
22
- email: string;
23
- apiToken: string;
24
- }>;
25
- }, "strict", z.ZodTypeAny, {
26
- basic: {
27
- email: string;
28
- apiToken: string;
29
- };
30
- }, {
31
- basic: {
32
- email: string;
33
- apiToken: string;
34
- };
35
- }>;
18
+ }, z.core.$strict>;
19
+ }, z.core.$strict>;
36
20
  /** JWT authentication configuration */
37
21
  export declare const JWTSchema: z.ZodObject<{
38
22
  jwt: z.ZodObject<{
@@ -42,49 +26,17 @@ export declare const JWTSchema: z.ZodObject<{
42
26
  secret: z.ZodString;
43
27
  /** Token expiry time (default: 180) */
44
28
  expiryTimeSeconds: z.ZodOptional<z.ZodNumber>;
45
- }, "strict", z.ZodTypeAny, {
46
- issuer: string;
47
- secret: string;
48
- expiryTimeSeconds?: number | undefined;
49
- }, {
50
- issuer: string;
51
- secret: string;
52
- expiryTimeSeconds?: number | undefined;
53
- }>;
54
- }, "strict", z.ZodTypeAny, {
55
- jwt: {
56
- issuer: string;
57
- secret: string;
58
- expiryTimeSeconds?: number | undefined;
59
- };
60
- }, {
61
- jwt: {
62
- issuer: string;
63
- secret: string;
64
- expiryTimeSeconds?: number | undefined;
65
- };
66
- }>;
29
+ }, z.core.$strict>;
30
+ }, z.core.$strict>;
67
31
  /** OAuth2 authentication configuration */
68
32
  export declare const OAuth2Schema: z.ZodObject<{
69
33
  oauth2: z.ZodObject<{
70
34
  /** OAuth2 access token */
71
35
  accessToken: z.ZodString;
72
- }, "strict", z.ZodTypeAny, {
73
- accessToken: string;
74
- }, {
75
- accessToken: string;
76
- }>;
77
- }, "strict", z.ZodTypeAny, {
78
- oauth2: {
79
- accessToken: string;
80
- };
81
- }, {
82
- oauth2: {
83
- accessToken: string;
84
- };
85
- }>;
36
+ }, z.core.$strict>;
37
+ }, z.core.$strict>;
86
38
  /** Authentication configuration schema */
87
- export declare const AuthenticationSchema: z.ZodUnion<[z.ZodObject<{
39
+ export declare const AuthenticationSchema: z.ZodUnion<readonly [z.ZodObject<{
88
40
  basic: z.ZodObject<{
89
41
  /** User's email associated with Atlassian account */
90
42
  email: z.ZodString;
@@ -94,24 +46,8 @@ export declare const AuthenticationSchema: z.ZodUnion<[z.ZodObject<{
94
46
  * @see {@link https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/} for how to create API tokens
95
47
  */
96
48
  apiToken: z.ZodString;
97
- }, "strict", z.ZodTypeAny, {
98
- email: string;
99
- apiToken: string;
100
- }, {
101
- email: string;
102
- apiToken: string;
103
- }>;
104
- }, "strict", z.ZodTypeAny, {
105
- basic: {
106
- email: string;
107
- apiToken: string;
108
- };
109
- }, {
110
- basic: {
111
- email: string;
112
- apiToken: string;
113
- };
114
- }>, z.ZodObject<{
49
+ }, z.core.$strict>;
50
+ }, z.core.$strict>, z.ZodObject<{
115
51
  jwt: z.ZodObject<{
116
52
  /** The key from the app descriptor */
117
53
  issuer: z.ZodString;
@@ -119,64 +55,24 @@ export declare const AuthenticationSchema: z.ZodUnion<[z.ZodObject<{
119
55
  secret: z.ZodString;
120
56
  /** Token expiry time (default: 180) */
121
57
  expiryTimeSeconds: z.ZodOptional<z.ZodNumber>;
122
- }, "strict", z.ZodTypeAny, {
123
- issuer: string;
124
- secret: string;
125
- expiryTimeSeconds?: number | undefined;
126
- }, {
127
- issuer: string;
128
- secret: string;
129
- expiryTimeSeconds?: number | undefined;
130
- }>;
131
- }, "strict", z.ZodTypeAny, {
132
- jwt: {
133
- issuer: string;
134
- secret: string;
135
- expiryTimeSeconds?: number | undefined;
136
- };
137
- }, {
138
- jwt: {
139
- issuer: string;
140
- secret: string;
141
- expiryTimeSeconds?: number | undefined;
142
- };
143
- }>, z.ZodObject<{
58
+ }, z.core.$strict>;
59
+ }, z.core.$strict>, z.ZodObject<{
144
60
  oauth2: z.ZodObject<{
145
61
  /** OAuth2 access token */
146
62
  accessToken: z.ZodString;
147
- }, "strict", z.ZodTypeAny, {
148
- accessToken: string;
149
- }, {
150
- accessToken: string;
151
- }>;
152
- }, "strict", z.ZodTypeAny, {
153
- oauth2: {
154
- accessToken: string;
155
- };
156
- }, {
157
- oauth2: {
158
- accessToken: string;
159
- };
160
- }>]>;
63
+ }, z.core.$strict>;
64
+ }, z.core.$strict>]>;
161
65
  /** Base request configuration */
162
66
  export declare const RequestConfigSchema: z.ZodAny;
163
67
  /** Middleware configuration schema */
164
68
  export declare const MiddlewaresSchema: z.ZodObject<{
165
- /** Error handler middleware */
166
- onError: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
167
- /** Response handler middleware */
168
- onResponse: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
169
- }, "strip", z.ZodTypeAny, {
170
- onError?: ((args_0: any, ...args: unknown[]) => void) | undefined;
171
- onResponse?: ((args_0: any, ...args: unknown[]) => void) | undefined;
172
- }, {
173
- onError?: ((args_0: any, ...args: unknown[]) => void) | undefined;
174
- onResponse?: ((args_0: any, ...args: unknown[]) => void) | undefined;
175
- }>;
69
+ onError: z.ZodOptional<z.ZodCustom<(input: unknown) => void, (input: unknown) => void>>;
70
+ onResponse: z.ZodOptional<z.ZodCustom<(input: unknown) => void, (input: unknown) => void>>;
71
+ }, z.core.$strip>;
176
72
  export declare const ConfigSchema: z.ZodObject<{
177
- host: z.ZodString;
73
+ host: z.ZodURL;
178
74
  baseRequestConfig: z.ZodOptional<z.ZodAny>;
179
- authentication: z.ZodOptional<z.ZodUnion<[z.ZodObject<{
75
+ authentication: z.ZodOptional<z.ZodUnion<readonly [z.ZodObject<{
180
76
  basic: z.ZodObject<{
181
77
  /** User's email associated with Atlassian account */
182
78
  email: z.ZodString;
@@ -186,24 +82,8 @@ export declare const ConfigSchema: z.ZodObject<{
186
82
  * @see {@link https://support.atlassian.com/atlassian-account/docs/manage-api-tokens-for-your-atlassian-account/} for how to create API tokens
187
83
  */
188
84
  apiToken: z.ZodString;
189
- }, "strict", z.ZodTypeAny, {
190
- email: string;
191
- apiToken: string;
192
- }, {
193
- email: string;
194
- apiToken: string;
195
- }>;
196
- }, "strict", z.ZodTypeAny, {
197
- basic: {
198
- email: string;
199
- apiToken: string;
200
- };
201
- }, {
202
- basic: {
203
- email: string;
204
- apiToken: string;
205
- };
206
- }>, z.ZodObject<{
85
+ }, z.core.$strict>;
86
+ }, z.core.$strict>, z.ZodObject<{
207
87
  jwt: z.ZodObject<{
208
88
  /** The key from the app descriptor */
209
89
  issuer: z.ZodString;
@@ -211,112 +91,21 @@ export declare const ConfigSchema: z.ZodObject<{
211
91
  secret: z.ZodString;
212
92
  /** Token expiry time (default: 180) */
213
93
  expiryTimeSeconds: z.ZodOptional<z.ZodNumber>;
214
- }, "strict", z.ZodTypeAny, {
215
- issuer: string;
216
- secret: string;
217
- expiryTimeSeconds?: number | undefined;
218
- }, {
219
- issuer: string;
220
- secret: string;
221
- expiryTimeSeconds?: number | undefined;
222
- }>;
223
- }, "strict", z.ZodTypeAny, {
224
- jwt: {
225
- issuer: string;
226
- secret: string;
227
- expiryTimeSeconds?: number | undefined;
228
- };
229
- }, {
230
- jwt: {
231
- issuer: string;
232
- secret: string;
233
- expiryTimeSeconds?: number | undefined;
234
- };
235
- }>, z.ZodObject<{
94
+ }, z.core.$strict>;
95
+ }, z.core.$strict>, z.ZodObject<{
236
96
  oauth2: z.ZodObject<{
237
97
  /** OAuth2 access token */
238
98
  accessToken: z.ZodString;
239
- }, "strict", z.ZodTypeAny, {
240
- accessToken: string;
241
- }, {
242
- accessToken: string;
243
- }>;
244
- }, "strict", z.ZodTypeAny, {
245
- oauth2: {
246
- accessToken: string;
247
- };
248
- }, {
249
- oauth2: {
250
- accessToken: string;
251
- };
252
- }>]>>;
99
+ }, z.core.$strict>;
100
+ }, z.core.$strict>]>>;
253
101
  middlewares: z.ZodOptional<z.ZodObject<{
254
- /** Error handler middleware */
255
- onError: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
256
- /** Response handler middleware */
257
- onResponse: z.ZodOptional<z.ZodFunction<z.ZodTuple<[z.ZodAny], z.ZodUnknown>, z.ZodVoid>>;
258
- }, "strip", z.ZodTypeAny, {
259
- onError?: ((args_0: any, ...args: unknown[]) => void) | undefined;
260
- onResponse?: ((args_0: any, ...args: unknown[]) => void) | undefined;
261
- }, {
262
- onError?: ((args_0: any, ...args: unknown[]) => void) | undefined;
263
- onResponse?: ((args_0: any, ...args: unknown[]) => void) | undefined;
264
- }>>;
265
- /** Adds `'X-Atlassian-Token': 'no-check'` to each request header */
102
+ onError: z.ZodOptional<z.ZodCustom<(input: unknown) => void, (input: unknown) => void>>;
103
+ onResponse: z.ZodOptional<z.ZodCustom<(input: unknown) => void, (input: unknown) => void>>;
104
+ }, z.core.$strip>>;
266
105
  noCheckAtlassianToken: z.ZodOptional<z.ZodBoolean>;
267
- /** Prefix for all API routes. */
106
+ suppressWarnings: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
268
107
  apiPrefix: z.ZodOptional<z.ZodString>;
269
- }, "strip", z.ZodTypeAny, {
270
- host: string;
271
- baseRequestConfig?: any;
272
- authentication?: {
273
- basic: {
274
- email: string;
275
- apiToken: string;
276
- };
277
- } | {
278
- jwt: {
279
- issuer: string;
280
- secret: string;
281
- expiryTimeSeconds?: number | undefined;
282
- };
283
- } | {
284
- oauth2: {
285
- accessToken: string;
286
- };
287
- } | undefined;
288
- middlewares?: {
289
- onError?: ((args_0: any, ...args: unknown[]) => void) | undefined;
290
- onResponse?: ((args_0: any, ...args: unknown[]) => void) | undefined;
291
- } | undefined;
292
- noCheckAtlassianToken?: boolean | undefined;
293
- apiPrefix?: string | undefined;
294
- }, {
295
- host: string;
296
- baseRequestConfig?: any;
297
- authentication?: {
298
- basic: {
299
- email: string;
300
- apiToken: string;
301
- };
302
- } | {
303
- jwt: {
304
- issuer: string;
305
- secret: string;
306
- expiryTimeSeconds?: number | undefined;
307
- };
308
- } | {
309
- oauth2: {
310
- accessToken: string;
311
- };
312
- } | undefined;
313
- middlewares?: {
314
- onError?: ((args_0: any, ...args: unknown[]) => void) | undefined;
315
- onResponse?: ((args_0: any, ...args: unknown[]) => void) | undefined;
316
- } | undefined;
317
- noCheckAtlassianToken?: boolean | undefined;
318
- apiPrefix?: string | undefined;
319
- }>;
108
+ }, z.core.$strip>;
320
109
  export type Config = z.infer<typeof ConfigSchema>;
321
110
  export type Authentication = z.infer<typeof AuthenticationSchema>;
322
111
  export type Basic = z.infer<typeof BasicSchema>;
package/eslint.config.ts CHANGED
@@ -2,8 +2,7 @@ import js from '@eslint/js';
2
2
  import globals from 'globals';
3
3
  import tseslint from 'typescript-eslint';
4
4
  import { defineConfig } from 'eslint/config';
5
- import stylisticJs from '@stylistic/eslint-plugin-js';
6
- import stylisticTs from '@stylistic/eslint-plugin-ts';
5
+ import stylistic from '@stylistic/eslint-plugin';
7
6
 
8
7
  export default defineConfig([
9
8
  { files: ['**/*.{js,mjs,cjs,ts}'], plugins: { js }, extends: ['js/recommended'] },
@@ -17,13 +16,12 @@ export default defineConfig([
17
16
  },
18
17
  },
19
18
  plugins: {
20
- '@stylistic/js': stylisticJs,
21
- '@stylistic/ts': stylisticTs,
19
+ '@stylistic': stylistic,
22
20
  },
23
21
  rules: {
24
- '@stylistic/js/no-trailing-spaces': 'error',
25
- '@stylistic/ts/indent': ['error', 2],
26
- '@stylistic/ts/lines-between-class-members': [
22
+ '@stylistic/comma-dangle': ['error', 'always-multiline'],
23
+ '@stylistic/indent': ['error', 2],
24
+ '@stylistic/lines-between-class-members': [
27
25
  'error',
28
26
  'always',
29
27
  {
@@ -31,7 +29,9 @@ export default defineConfig([
31
29
  exceptAfterSingleLine: true,
32
30
  },
33
31
  ],
34
- '@stylistic/ts/padding-line-between-statements': [
32
+ '@stylistic/no-trailing-spaces': 'error',
33
+ '@stylistic/object-curly-spacing': ['error', 'always'],
34
+ '@stylistic/padding-line-between-statements': [
35
35
  'error',
36
36
  // Return statements
37
37
  { blankLine: 'always', prev: '*', next: 'return' },
@@ -39,8 +39,8 @@ export default defineConfig([
39
39
  { blankLine: 'always', prev: 'import', next: '*' },
40
40
  { blankLine: 'any', prev: 'import', next: 'import' },
41
41
  ],
42
- '@stylistic/ts/quotes': ['error', 'single'],
43
- '@stylistic/ts/semi': ['error', 'always'],
42
+ '@stylistic/quotes': ['error', 'single'],
43
+ '@stylistic/semi': ['error', 'always'],
44
44
  '@typescript-eslint/consistent-type-imports': [
45
45
  'error',
46
46
  {
@@ -49,14 +49,9 @@ export default defineConfig([
49
49
  },
50
50
  ],
51
51
  '@typescript-eslint/no-empty-object-type': 'off',
52
- '@typescript-eslint/no-redundant-type-constituents': 'off', // todo fix it
53
- '@typescript-eslint/no-unnecessary-condition': 'error', // todo fix it
54
- '@typescript-eslint/no-unsafe-argument': 'off', // todo fix it
55
- '@typescript-eslint/no-unsafe-assignment': 'off', // todo fix it
56
- '@typescript-eslint/no-unsafe-call': 'off', // todo fix it
52
+ '@typescript-eslint/no-unnecessary-condition': 'error',
57
53
  '@typescript-eslint/no-unsafe-member-access': 'off',
58
54
  '@typescript-eslint/prefer-optional-chain': 'error',
59
- '@stylistic/ts/object-curly-spacing': ["error", "always"]
60
55
  },
61
56
  },
62
57
  ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "confluence.js",
3
- "version": "2.0.0",
3
+ "version": "2.2.0-dev20260318121920",
4
4
  "description": "confluence.js is a powerful Node.JS/Browser module that allows you to interact with the Confluence API very easily",
5
5
  "author": "Vladislav Tupikin <vladislav.tupikin@icloud.com>",
6
6
  "license": "MIT",
@@ -16,13 +16,13 @@
16
16
  "exports": {
17
17
  ".": {
18
18
  "types": "./dist/esm/types/index.d.ts",
19
- "import": "./dist/esm/index.mjs",
20
- "require": "./dist/cjs/index.cjs"
19
+ "require": "./dist/cjs/index.cjs",
20
+ "import": "./dist/esm/index.mjs"
21
21
  },
22
22
  "./*": {
23
23
  "types": "./dist/esm/types/*.d.ts",
24
- "import": "./dist/esm/*.mjs",
25
- "require": "./dist/cjs/*.cjs"
24
+ "require": "./dist/cjs/*.cjs",
25
+ "import": "./dist/esm/*.mjs"
26
26
  },
27
27
  "./package.json": "./package.json"
28
28
  },
@@ -44,37 +44,36 @@
44
44
  "node": ">=20"
45
45
  },
46
46
  "dependencies": {
47
- "atlassian-jwt": "^2.0.3",
48
- "axios": "^1.9.0",
49
- "form-data": "^4.0.2",
47
+ "@atlassian/atlassian-jwt": "^2.2.0",
48
+ "axios": "^1.13.6",
49
+ "form-data": "^4.0.5",
50
50
  "oauth": "^0.10.2",
51
- "zod": "^3.24.4"
51
+ "zod": "^4.3.6"
52
52
  },
53
53
  "devDependencies": {
54
- "@eslint/js": "^9.26.0",
55
- "@rollup/plugin-alias": "^5.1.1",
56
- "@rollup/plugin-commonjs": "^28.0.3",
57
- "@rollup/plugin-node-resolve": "^16.0.1",
58
- "@rollup/plugin-typescript": "^12.1.2",
59
- "@stylistic/eslint-plugin-js": "^4.2.0",
60
- "@stylistic/eslint-plugin-ts": "^4.2.0",
61
- "@types/express": "^4.17.21",
62
- "@types/node": "^20.17.46",
54
+ "@eslint/js": "^10.0.1",
55
+ "@rollup/plugin-alias": "^6.0.0",
56
+ "@rollup/plugin-commonjs": "^29.0.2",
57
+ "@rollup/plugin-node-resolve": "^16.0.3",
58
+ "@rollup/plugin-typescript": "^12.3.0",
59
+ "@stylistic/eslint-plugin": "^5.10.0",
60
+ "@types/express": "^4.17.25",
61
+ "@types/node": "^20.19.37",
63
62
  "@types/oauth": "^0.9.6",
64
- "dotenv": "^16.5.0",
65
- "eslint": "^9.26.0",
66
- "globals": "^16.1.0",
67
- "jiti": "^2.4.2",
68
- "prettier": "^3.5.3",
69
- "prettier-plugin-jsdoc": "^1.3.2",
70
- "rollup": "^4.40.2",
71
- "rollup-plugin-esnext-to-nodenext": "^1.0.0",
72
- "rollup-plugin-node-externals": "^8.0.0",
63
+ "dotenv": "^17.3.1",
64
+ "eslint": "^10.0.3",
65
+ "globals": "^17.4.0",
66
+ "jiti": "^2.6.1",
67
+ "prettier": "^3.8.1",
68
+ "prettier-plugin-jsdoc": "^1.8.0",
69
+ "rollup": "^4.59.0",
70
+ "rollup-plugin-esnext-to-nodenext": "^1.0.1",
71
+ "rollup-plugin-node-externals": "^8.1.2",
73
72
  "tslib": "^2.8.1",
74
- "typedoc": "^0.28.4",
75
- "typescript": "^5.8.3",
76
- "typescript-eslint": "^8.32.1",
77
- "vitest": "^3.1.3"
73
+ "typedoc": "^0.28.17",
74
+ "typescript": "^5.9.3",
75
+ "typescript-eslint": "^8.57.1",
76
+ "vitest": "^4.1.0"
78
77
  },
79
78
  "scripts": {
80
79
  "build": "rollup -c rollup.config.ts --configPlugin typescript",
@@ -83,8 +82,10 @@
83
82
  "doc": "typedoc --name \"Confluence.js - Cloud and Server API library\" --out docs ./src/index.ts --favicon https://bad37fb3-cb50-4e0b-9035-a3e09e8afb3b.selstorage.ru/confluence.js%2Ffavicon.svg",
84
83
  "lint": "eslint --ext .ts src tests",
85
84
  "lint:fix": "pnpm run lint --fix",
86
- "test:unit": "vitest run tests/unit --minWorkers=1 --maxWorkers=8 --sequence.concurrent",
85
+ "test:unit": "vitest run tests/unit",
87
86
  "test:integration": "vitest run tests/integration --bail=1 --no-file-parallelism --max-concurrency 1 -c vitest.config.mts --hookTimeout 100000 --testTimeout 100000",
88
- "code:formatting": "npm run prettier && npm run lint:fix"
87
+ "replace:wiki-rest": "grep -rl '/wiki/rest' src/api | xargs sed -i '' 's|/wiki/rest||g'",
88
+ "replace:all": "pnpm run replace:wiki-rest",
89
+ "code:formatting": "pnpm run replace:all && pnpm run prettier && pnpm run lint:fix"
89
90
  }
90
91
  }
package/rollup.config.ts CHANGED
@@ -26,8 +26,8 @@ export default defineConfig([
26
26
  nodeExternals(),
27
27
  alias({
28
28
  entries: [
29
- { find: '~', replacement: `${__dirname}/src` }
30
- ]
29
+ { find: '~', replacement: `${__dirname}/src` },
30
+ ],
31
31
  }),
32
32
  resolve(),
33
33
  commonjs(),
@@ -38,8 +38,8 @@ export default defineConfig([
38
38
  declarationDir: 'dist/esm/types',
39
39
  tsconfig: './tsconfig.json',
40
40
  }),
41
- esnextToNodeNext()
42
- ]
41
+ esnextToNodeNext(),
42
+ ],
43
43
  },
44
44
  {
45
45
  input: 'src/index.ts',
@@ -56,8 +56,8 @@ export default defineConfig([
56
56
  nodeExternals(),
57
57
  alias({
58
58
  entries: [
59
- { find: '~', replacement: `${__dirname}/src` }
60
- ]
59
+ { find: '~', replacement: `${__dirname}/src` },
60
+ ],
61
61
  }),
62
62
  resolve(),
63
63
  commonjs(),
@@ -67,6 +67,6 @@ export default defineConfig([
67
67
  declaration: false,
68
68
  tsconfig: './tsconfig.json',
69
69
  }),
70
- ]
71
- }
70
+ ],
71
+ },
72
72
  ]);
@@ -1,7 +1,7 @@
1
1
  import type * as Models from './models';
2
2
  import type * as Parameters from './parameters';
3
- import type { Callback } from '../callback';
4
3
  import type { Client } from '../clients';
4
+ import type { Callback } from '../callback';
5
5
  import type { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class Analytics {
package/src/api/audit.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import type * as Models from './models';
2
2
  import type * as Parameters from './parameters';
3
- import type { Callback } from '../callback';
4
3
  import type { Client } from '../clients';
4
+ import type { Callback } from '../callback';
5
5
  import type { RequestConfig } from '../requestConfig';
6
6
 
7
7
  export class Audit {
@@ -155,7 +155,7 @@ export class Audit {
155
155
  }
156
156
 
157
157
  /**
158
- * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 20 years.
158
+ * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 1 year.
159
159
  *
160
160
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global
161
161
  * permission.
@@ -165,7 +165,7 @@ export class Audit {
165
165
  callback: Callback<T>,
166
166
  ): Promise<void>;
167
167
  /**
168
- * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 20 years.
168
+ * Sets the retention period for records in the audit log. The retention period can be set to a maximum of 1 year.
169
169
  *
170
170
  * **[Permissions](https://confluence.atlassian.com/x/_AozKw) required**: 'Confluence Administrator' global
171
171
  * permission.