confluence.js 2.0.0 → 2.2.0-dev20260318121920
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +67 -2
- package/README.md +168 -181
- package/dist/cjs/api/analytics.cjs.map +1 -1
- package/dist/cjs/api/audit.cjs.map +1 -1
- package/dist/cjs/api/content.cjs +0 -5
- package/dist/cjs/api/content.cjs.map +1 -1
- package/dist/cjs/api/contentAttachments.cjs +1 -0
- package/dist/cjs/api/contentAttachments.cjs.map +1 -1
- package/dist/cjs/api/contentBody.cjs +18 -0
- package/dist/cjs/api/contentBody.cjs.map +1 -1
- package/dist/cjs/api/contentChildrenAndDescendants.cjs +2 -0
- package/dist/cjs/api/contentChildrenAndDescendants.cjs.map +1 -1
- package/dist/cjs/api/contentComments.cjs +1 -0
- package/dist/cjs/api/contentComments.cjs.map +1 -1
- package/dist/cjs/api/contentLabels.cjs.map +1 -1
- package/dist/cjs/api/contentMacroBody.cjs.map +1 -1
- package/dist/cjs/api/contentPermissions.cjs.map +1 -1
- package/dist/cjs/api/contentProperties.cjs +1 -0
- package/dist/cjs/api/contentProperties.cjs.map +1 -1
- package/dist/cjs/api/contentRestrictions.cjs.map +1 -1
- package/dist/cjs/api/contentStates.cjs +13 -0
- package/dist/cjs/api/contentStates.cjs.map +1 -1
- package/dist/cjs/api/contentVersions.cjs.map +1 -1
- package/dist/cjs/api/contentWatches.cjs.map +1 -1
- package/dist/cjs/api/dynamicModules.cjs.map +1 -1
- package/dist/cjs/api/experimental.cjs.map +1 -1
- package/dist/cjs/api/group.cjs +18 -17
- package/dist/cjs/api/group.cjs.map +1 -1
- package/dist/cjs/api/index.cjs +2 -0
- package/dist/cjs/api/index.cjs.map +1 -1
- package/dist/cjs/api/inlineTasks.cjs +1 -0
- package/dist/cjs/api/inlineTasks.cjs.map +1 -1
- package/dist/cjs/api/labelInfo.cjs.map +1 -1
- package/dist/cjs/api/longRunningTask.cjs +1 -0
- package/dist/cjs/api/longRunningTask.cjs.map +1 -1
- package/dist/cjs/api/models/labeledContentType.cjs.map +1 -1
- package/dist/cjs/api/relation.cjs.map +1 -1
- package/dist/cjs/api/search.cjs +1 -0
- package/dist/cjs/api/search.cjs.map +1 -1
- package/dist/cjs/api/settings.cjs.map +1 -1
- package/dist/cjs/api/space.cjs +4 -2
- package/dist/cjs/api/space.cjs.map +1 -1
- package/dist/cjs/api/spacePermissions.cjs.map +1 -1
- package/dist/cjs/api/spaceProperties.cjs +1 -0
- package/dist/cjs/api/spaceProperties.cjs.map +1 -1
- package/dist/cjs/api/spaceSettings.cjs.map +1 -1
- package/dist/cjs/api/template.cjs.map +1 -1
- package/dist/cjs/api/themes.cjs.map +1 -1
- package/dist/cjs/api/userProperties.cjs +56 -0
- package/dist/cjs/api/userProperties.cjs.map +1 -0
- package/dist/cjs/api/users.cjs.map +1 -1
- package/dist/cjs/clients/baseClient.cjs +17 -2
- package/dist/cjs/clients/baseClient.cjs.map +1 -1
- package/dist/cjs/clients/confluenceClient.cjs +6 -0
- package/dist/cjs/clients/confluenceClient.cjs.map +1 -1
- package/dist/cjs/config.cjs +7 -4
- package/dist/cjs/config.cjs.map +1 -1
- package/dist/cjs/paramSerializer.cjs.map +1 -1
- package/dist/cjs/services/authenticationService/authenticationService.cjs.map +1 -1
- package/dist/cjs/services/authenticationService/authentications/createBasicAuthenticationToken.cjs.map +1 -1
- package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs +1 -1
- package/dist/cjs/services/authenticationService/authentications/createJWTAuthentication.cjs.map +1 -1
- package/dist/cjs/services/authenticationService/base64Encoder.cjs.map +1 -1
- package/dist/esm/api/analytics.mjs.map +1 -1
- package/dist/esm/api/audit.mjs.map +1 -1
- package/dist/esm/api/content.mjs +0 -5
- package/dist/esm/api/content.mjs.map +1 -1
- package/dist/esm/api/contentAttachments.mjs +1 -0
- package/dist/esm/api/contentAttachments.mjs.map +1 -1
- package/dist/esm/api/contentBody.mjs +18 -0
- package/dist/esm/api/contentBody.mjs.map +1 -1
- package/dist/esm/api/contentChildrenAndDescendants.mjs +2 -0
- package/dist/esm/api/contentChildrenAndDescendants.mjs.map +1 -1
- package/dist/esm/api/contentComments.mjs +1 -0
- package/dist/esm/api/contentComments.mjs.map +1 -1
- package/dist/esm/api/contentLabels.mjs.map +1 -1
- package/dist/esm/api/contentMacroBody.mjs.map +1 -1
- package/dist/esm/api/contentPermissions.mjs.map +1 -1
- package/dist/esm/api/contentProperties.mjs +1 -0
- package/dist/esm/api/contentProperties.mjs.map +1 -1
- package/dist/esm/api/contentRestrictions.mjs.map +1 -1
- package/dist/esm/api/contentStates.mjs +13 -0
- package/dist/esm/api/contentStates.mjs.map +1 -1
- package/dist/esm/api/contentVersions.mjs.map +1 -1
- package/dist/esm/api/contentWatches.mjs.map +1 -1
- package/dist/esm/api/dynamicModules.mjs.map +1 -1
- package/dist/esm/api/experimental.mjs.map +1 -1
- package/dist/esm/api/group.mjs +18 -17
- package/dist/esm/api/group.mjs.map +1 -1
- package/dist/esm/api/index.mjs +1 -0
- package/dist/esm/api/index.mjs.map +1 -1
- package/dist/esm/api/inlineTasks.mjs +1 -0
- package/dist/esm/api/inlineTasks.mjs.map +1 -1
- package/dist/esm/api/labelInfo.mjs.map +1 -1
- package/dist/esm/api/longRunningTask.mjs +1 -0
- package/dist/esm/api/longRunningTask.mjs.map +1 -1
- package/dist/esm/api/models/labeledContentType.mjs.map +1 -1
- package/dist/esm/api/relation.mjs.map +1 -1
- package/dist/esm/api/search.mjs +1 -0
- package/dist/esm/api/search.mjs.map +1 -1
- package/dist/esm/api/settings.mjs.map +1 -1
- package/dist/esm/api/space.mjs +4 -2
- package/dist/esm/api/space.mjs.map +1 -1
- package/dist/esm/api/spacePermissions.mjs.map +1 -1
- package/dist/esm/api/spaceProperties.mjs +1 -0
- package/dist/esm/api/spaceProperties.mjs.map +1 -1
- package/dist/esm/api/spaceSettings.mjs.map +1 -1
- package/dist/esm/api/template.mjs.map +1 -1
- package/dist/esm/api/themes.mjs.map +1 -1
- package/dist/esm/api/userProperties.mjs +54 -0
- package/dist/esm/api/userProperties.mjs.map +1 -0
- package/dist/esm/api/users.mjs.map +1 -1
- package/dist/esm/clients/baseClient.mjs +18 -3
- package/dist/esm/clients/baseClient.mjs.map +1 -1
- package/dist/esm/clients/confluenceClient.mjs +6 -0
- package/dist/esm/clients/confluenceClient.mjs.map +1 -1
- package/dist/esm/config.mjs +7 -4
- package/dist/esm/config.mjs.map +1 -1
- package/dist/esm/paramSerializer.mjs.map +1 -1
- package/dist/esm/services/authenticationService/authenticationService.mjs.map +1 -1
- package/dist/esm/services/authenticationService/authentications/createBasicAuthenticationToken.mjs.map +1 -1
- package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs +1 -1
- package/dist/esm/services/authenticationService/authentications/createJWTAuthentication.mjs.map +1 -1
- package/dist/esm/services/authenticationService/base64Encoder.mjs.map +1 -1
- package/dist/esm/types/api/analytics.d.ts +1 -1
- package/dist/esm/types/api/audit.d.ts +3 -3
- package/dist/esm/types/api/content.d.ts +33 -7
- package/dist/esm/types/api/contentAttachments.d.ts +5 -1
- package/dist/esm/types/api/contentBody.d.ts +73 -7
- package/dist/esm/types/api/contentChildrenAndDescendants.d.ts +37 -5
- package/dist/esm/types/api/contentComments.d.ts +5 -0
- package/dist/esm/types/api/contentLabels.d.ts +17 -9
- package/dist/esm/types/api/contentMacroBody.d.ts +79 -1
- package/dist/esm/types/api/contentPermissions.d.ts +1 -1
- package/dist/esm/types/api/contentProperties.d.ts +25 -0
- package/dist/esm/types/api/contentRestrictions.d.ts +19 -7
- package/dist/esm/types/api/contentStates.d.ts +23 -5
- package/dist/esm/types/api/contentVersions.d.ts +9 -1
- package/dist/esm/types/api/contentWatches.d.ts +1 -1
- package/dist/esm/types/api/dynamicModules.d.ts +1 -1
- package/dist/esm/types/api/experimental.d.ts +21 -1
- package/dist/esm/types/api/group.d.ts +47 -27
- package/dist/esm/types/api/index.d.ts +1 -0
- package/dist/esm/types/api/inlineTasks.d.ts +13 -0
- package/dist/esm/types/api/labelInfo.d.ts +1 -1
- package/dist/esm/types/api/longRunningTask.d.ts +1 -1
- package/dist/esm/types/api/models/spaceCreate.d.ts +11 -2
- package/dist/esm/types/api/models/spacePrivateCreate.d.ts +11 -2
- package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyRequest.d.ts +58 -0
- package/dist/esm/types/api/parameters/bulkAsyncConvertContentBodyResponse.d.ts +4 -0
- package/dist/esm/types/api/parameters/deleteGroupById.d.ts +4 -0
- package/dist/esm/types/api/parameters/downloadAttachment.d.ts +6 -0
- package/dist/esm/types/api/parameters/getContentChildren.d.ts +6 -1
- package/dist/esm/types/api/parameters/getContentsWithState.d.ts +17 -0
- package/dist/esm/types/api/parameters/getGroupMembersByGroupId.d.ts +7 -0
- package/dist/esm/types/api/parameters/getGroupMembershipsForUser.d.ts +4 -0
- package/dist/esm/types/api/parameters/getTasks.d.ts +2 -0
- package/dist/esm/types/api/parameters/getUser.d.ts +4 -0
- package/dist/esm/types/api/parameters/index.d.ts +4 -0
- package/dist/esm/types/api/parameters/searchUser.d.ts +7 -0
- package/dist/esm/types/api/relation.d.ts +13 -15
- package/dist/esm/types/api/search.d.ts +7 -1
- package/dist/esm/types/api/settings.d.ts +5 -1
- package/dist/esm/types/api/space.d.ts +23 -7
- package/dist/esm/types/api/spacePermissions.d.ts +1 -1
- package/dist/esm/types/api/spaceProperties.d.ts +25 -0
- package/dist/esm/types/api/spaceSettings.d.ts +1 -1
- package/dist/esm/types/api/template.d.ts +1 -1
- package/dist/esm/types/api/themes.d.ts +1 -1
- package/dist/esm/types/api/userProperties.d.ts +102 -0
- package/dist/esm/types/api/users.d.ts +21 -9
- package/dist/esm/types/clients/baseClient.d.ts +1 -0
- package/dist/esm/types/clients/confluenceClient.d.ts +6 -1
- package/dist/esm/types/config.d.ts +29 -240
- package/eslint.config.ts +11 -16
- package/package.json +34 -33
- package/rollup.config.ts +8 -8
- package/src/api/analytics.ts +1 -1
- package/src/api/audit.ts +3 -3
- package/src/api/content.ts +33 -12
- package/src/api/contentAttachments.ts +6 -1
- package/src/api/contentBody.ts +113 -7
- package/src/api/contentChildrenAndDescendants.ts +39 -5
- package/src/api/contentComments.ts +5 -0
- package/src/api/contentLabels.ts +17 -9
- package/src/api/contentMacroBody.ts +79 -1
- package/src/api/contentPermissions.ts +1 -1
- package/src/api/contentProperties.ts +25 -0
- package/src/api/contentRestrictions.ts +19 -7
- package/src/api/contentStates.ts +47 -5
- package/src/api/contentVersions.ts +9 -1
- package/src/api/contentWatches.ts +1 -1
- package/src/api/dynamicModules.ts +1 -1
- package/src/api/experimental.ts +21 -1
- package/src/api/group.ts +96 -75
- package/src/api/index.ts +1 -0
- package/src/api/inlineTasks.ts +13 -0
- package/src/api/labelInfo.ts +1 -1
- package/src/api/longRunningTask.ts +2 -1
- package/src/api/models/spaceCreate.ts +11 -2
- package/src/api/models/spacePrivateCreate.ts +11 -2
- package/src/api/parameters/bulkAsyncConvertContentBodyRequest.ts +88 -0
- package/src/api/parameters/bulkAsyncConvertContentBodyResponse.ts +4 -0
- package/src/api/parameters/deleteGroupById.ts +4 -0
- package/src/api/parameters/downloadAttachment.ts +6 -0
- package/src/api/parameters/getContentChildren.ts +7 -1
- package/src/api/parameters/getContentsWithState.ts +17 -0
- package/src/api/parameters/getGroupMembersByGroupId.ts +7 -0
- package/src/api/parameters/getGroupMembershipsForUser.ts +4 -0
- package/src/api/parameters/getTasks.ts +2 -0
- package/src/api/parameters/getUser.ts +4 -0
- package/src/api/parameters/index.ts +4 -0
- package/src/api/parameters/searchUser.ts +7 -0
- package/src/api/relation.ts +13 -15
- package/src/api/search.ts +8 -1
- package/src/api/settings.ts +5 -1
- package/src/api/space.ts +27 -9
- package/src/api/spacePermissions.ts +1 -1
- package/src/api/spaceProperties.ts +25 -0
- package/src/api/spaceSettings.ts +1 -1
- package/src/api/template.ts +1 -1
- package/src/api/themes.ts +1 -1
- package/src/api/userProperties.ts +185 -0
- package/src/api/users.ts +21 -9
- package/src/clients/baseClient.ts +24 -8
- package/src/clients/confluenceClient.ts +6 -0
- package/src/config.ts +8 -4
- package/src/services/authenticationService/authentications/createJWTAuthentication.ts +1 -1
- package/favicon.svg +0 -7
|
@@ -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
|
-
},
|
|
19
|
-
|
|
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
|
-
},
|
|
46
|
-
|
|
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
|
-
},
|
|
73
|
-
|
|
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
|
-
},
|
|
98
|
-
|
|
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
|
-
},
|
|
123
|
-
|
|
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
|
-
},
|
|
148
|
-
|
|
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
|
-
|
|
166
|
-
|
|
167
|
-
|
|
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.
|
|
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
|
-
},
|
|
190
|
-
|
|
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
|
-
},
|
|
215
|
-
|
|
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
|
-
},
|
|
240
|
-
|
|
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
|
-
|
|
255
|
-
|
|
256
|
-
|
|
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
|
-
|
|
106
|
+
suppressWarnings: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
268
107
|
apiPrefix: z.ZodOptional<z.ZodString>;
|
|
269
|
-
},
|
|
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
|
|
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
|
|
21
|
-
'@stylistic/ts': stylisticTs,
|
|
19
|
+
'@stylistic': stylistic,
|
|
22
20
|
},
|
|
23
21
|
rules: {
|
|
24
|
-
'@stylistic/
|
|
25
|
-
'@stylistic/
|
|
26
|
-
'@stylistic/
|
|
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/
|
|
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/
|
|
43
|
-
'@stylistic/
|
|
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-
|
|
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.
|
|
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
|
-
"
|
|
20
|
-
"
|
|
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
|
-
"
|
|
25
|
-
"
|
|
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
|
|
48
|
-
"axios": "^1.
|
|
49
|
-
"form-data": "^4.0.
|
|
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.
|
|
51
|
+
"zod": "^4.3.6"
|
|
52
52
|
},
|
|
53
53
|
"devDependencies": {
|
|
54
|
-
"@eslint/js": "^
|
|
55
|
-
"@rollup/plugin-alias": "^
|
|
56
|
-
"@rollup/plugin-commonjs": "^
|
|
57
|
-
"@rollup/plugin-node-resolve": "^16.0.
|
|
58
|
-
"@rollup/plugin-typescript": "^12.
|
|
59
|
-
"@stylistic/eslint-plugin
|
|
60
|
-
"@
|
|
61
|
-
"@types/
|
|
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": "^
|
|
65
|
-
"eslint": "^
|
|
66
|
-
"globals": "^
|
|
67
|
-
"jiti": "^2.
|
|
68
|
-
"prettier": "^3.
|
|
69
|
-
"prettier-plugin-jsdoc": "^1.
|
|
70
|
-
"rollup": "^4.
|
|
71
|
-
"rollup-plugin-esnext-to-nodenext": "^1.0.
|
|
72
|
-
"rollup-plugin-node-externals": "^8.
|
|
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.
|
|
75
|
-
"typescript": "^5.
|
|
76
|
-
"typescript-eslint": "^8.
|
|
77
|
-
"vitest": "^
|
|
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
|
|
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
|
-
"
|
|
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
|
]);
|
package/src/api/analytics.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 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
|
|
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
|
|
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.
|