confluence.js 1.6.3 → 1.7.1

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 (168) hide show
  1. package/.prettierrc +8 -3
  2. package/CHANGELOG.md +4 -0
  3. package/README.md +16 -0
  4. package/out/api/contentChildrenAndDescendants.js +3 -0
  5. package/out/api/contentChildrenAndDescendants.js.map +1 -1
  6. package/out/api/models/addContentRestriction.d.ts +8 -3
  7. package/out/api/models/appDescriptor.d.ts +6 -3
  8. package/out/api/models/asyncContentBody.d.ts +2 -2
  9. package/out/api/models/attachmentUpdate.d.ts +1 -1
  10. package/out/api/models/auditRecordCreate.d.ts +6 -2
  11. package/out/api/models/contentBlueprintDraft.d.ts +2 -1
  12. package/out/api/models/contentRestrictionUpdate.d.ts +8 -3
  13. package/out/api/models/contentTemplateUpdate.d.ts +4 -1
  14. package/out/api/models/labeledContentType.js +1 -1
  15. package/out/api/models/labeledContentType.js.map +1 -1
  16. package/out/api/models/lifecycle.d.ts +6 -2
  17. package/out/api/parameters/addLabelsToContent.d.ts +2 -1
  18. package/out/api/parameters/createContent.d.ts +12 -3
  19. package/out/api/parameters/createContent.js +13 -4
  20. package/out/api/parameters/createContent.js.map +1 -1
  21. package/out/api/parameters/createRelationship.d.ts +4 -1
  22. package/out/api/parameters/createUserProperty.d.ts +2 -2
  23. package/out/api/parameters/delete.d.ts +4 -1
  24. package/out/api/parameters/deleteRelationship.d.ts +8 -5
  25. package/out/api/parameters/deleteUserProperty.d.ts +2 -2
  26. package/out/api/parameters/findSourcesForTarget.d.ts +2 -1
  27. package/out/api/parameters/findTargetFromSource.d.ts +2 -1
  28. package/out/api/parameters/getAttachments.d.ts +12 -3
  29. package/out/api/parameters/getAttachments.js +13 -4
  30. package/out/api/parameters/getAttachments.js.map +1 -1
  31. package/out/api/parameters/getAvailableContentStates.d.ts +1 -1
  32. package/out/api/parameters/getContent.d.ts +16 -4
  33. package/out/api/parameters/getContent.js +13 -4
  34. package/out/api/parameters/getContent.js.map +1 -1
  35. package/out/api/parameters/getContentById.d.ts +12 -3
  36. package/out/api/parameters/getContentById.js +13 -4
  37. package/out/api/parameters/getContentById.js.map +1 -1
  38. package/out/api/parameters/getContentProperties.d.ts +4 -2
  39. package/out/api/parameters/getContentProperty.d.ts +10 -8
  40. package/out/api/parameters/getContentTemplates.d.ts +4 -1
  41. package/out/api/parameters/getContentVersion.d.ts +2 -1
  42. package/out/api/parameters/getContentVersions.d.ts +2 -1
  43. package/out/api/parameters/getDescendantsOfType.d.ts +12 -3
  44. package/out/api/parameters/getDescendantsOfType.js +13 -4
  45. package/out/api/parameters/getDescendantsOfType.js.map +1 -1
  46. package/out/api/parameters/getHistoryForContent.d.ts +2 -1
  47. package/out/api/parameters/getLabelsForContent.d.ts +2 -1
  48. package/out/api/parameters/getRelationship.d.ts +6 -2
  49. package/out/api/parameters/getSpaces.d.ts +10 -3
  50. package/out/api/parameters/removeGroupById.d.ts +2 -2
  51. package/out/api/parameters/removeGroupByName.d.ts +2 -2
  52. package/out/api/parameters/removeModules.d.ts +2 -1
  53. package/out/api/parameters/restoreContentVersion.d.ts +2 -1
  54. package/out/api/parameters/search.d.ts +2 -2
  55. package/out/api/parameters/updateAttachmentProperties.d.ts +15 -15
  56. package/out/api/parameters/updateUserProperty.d.ts +2 -2
  57. package/out/clients/baseClient.d.ts +0 -1
  58. package/out/clients/baseClient.js +2 -2
  59. package/out/clients/baseClient.js.map +1 -1
  60. package/out/clients/confluenceClient.d.ts +2 -0
  61. package/out/clients/confluenceClient.js +3 -2
  62. package/out/clients/confluenceClient.js.map +1 -1
  63. package/out/clients/serverClient.d.ts +2 -1
  64. package/out/clients/serverClient.js +3 -3
  65. package/out/clients/serverClient.js.map +1 -1
  66. package/out/config.d.ts +7 -7
  67. package/out/server/parameters/createAuditRecord.d.ts +6 -2
  68. package/out/server/parameters/getAttachments.d.ts +12 -3
  69. package/out/server/parameters/getAttachments.js +13 -4
  70. package/out/server/parameters/getAttachments.js.map +1 -1
  71. package/out/services/authenticationService/authenticationService.js +1 -1
  72. package/out/services/authenticationService/authenticationService.js.map +1 -1
  73. package/out/services/authenticationService/authentications/createJWTAuthentication.js +1 -1
  74. package/out/services/authenticationService/authentications/createJWTAuthentication.js.map +1 -1
  75. package/out/services/authenticationService/base64Encoder.d.ts +1 -3
  76. package/out/services/authenticationService/base64Encoder.js +3 -5
  77. package/out/services/authenticationService/base64Encoder.js.map +1 -1
  78. package/out/utilityTypes.d.ts +5 -1
  79. package/package.json +25 -25
  80. package/src/api/audit.ts +9 -9
  81. package/src/api/content.ts +8 -8
  82. package/src/api/contentAttachments.ts +10 -10
  83. package/src/api/contentBody.ts +6 -6
  84. package/src/api/contentChildrenAndDescendants.ts +14 -11
  85. package/src/api/contentComments.ts +2 -2
  86. package/src/api/contentContentState.ts +10 -10
  87. package/src/api/contentLabels.ts +7 -7
  88. package/src/api/contentMacroBody.ts +6 -6
  89. package/src/api/contentPermissions.ts +4 -4
  90. package/src/api/contentProperties.ts +11 -11
  91. package/src/api/contentRestrictions.ts +26 -26
  92. package/src/api/contentStates.ts +12 -12
  93. package/src/api/contentVersions.ts +6 -6
  94. package/src/api/contentWatches.ts +11 -11
  95. package/src/api/dynamicModules.ts +1 -1
  96. package/src/api/experimental.ts +9 -9
  97. package/src/api/group.ts +18 -18
  98. package/src/api/inlineTasks.ts +1 -1
  99. package/src/api/labelInfo.ts +2 -2
  100. package/src/api/longRunningTask.ts +2 -2
  101. package/src/api/models/addContentRestriction.ts +8 -3
  102. package/src/api/models/appDescriptor.ts +6 -3
  103. package/src/api/models/asyncContentBody.ts +2 -2
  104. package/src/api/models/attachmentContainer.ts +1 -1
  105. package/src/api/models/attachmentUpdate.ts +1 -1
  106. package/src/api/models/auditRecordCreate.ts +6 -2
  107. package/src/api/models/contentBlueprintDraft.ts +2 -1
  108. package/src/api/models/contentRestrictionUpdate.ts +8 -3
  109. package/src/api/models/contentTemplateUpdate.ts +4 -1
  110. package/src/api/models/lifecycle.ts +6 -2
  111. package/src/api/parameters/addLabelsToContent.ts +2 -1
  112. package/src/api/parameters/createContent.ts +12 -3
  113. package/src/api/parameters/createRelationship.ts +4 -1
  114. package/src/api/parameters/createUserProperty.ts +2 -2
  115. package/src/api/parameters/delete.ts +4 -1
  116. package/src/api/parameters/deleteRelationship.ts +8 -5
  117. package/src/api/parameters/deleteUserProperty.ts +2 -2
  118. package/src/api/parameters/findSourcesForTarget.ts +2 -1
  119. package/src/api/parameters/findTargetFromSource.ts +2 -1
  120. package/src/api/parameters/getAttachments.ts +12 -3
  121. package/src/api/parameters/getAvailableContentStates.ts +1 -1
  122. package/src/api/parameters/getContent.ts +16 -4
  123. package/src/api/parameters/getContentById.ts +12 -3
  124. package/src/api/parameters/getContentProperties.ts +4 -2
  125. package/src/api/parameters/getContentProperty.ts +10 -8
  126. package/src/api/parameters/getContentTemplates.ts +4 -1
  127. package/src/api/parameters/getContentVersion.ts +2 -1
  128. package/src/api/parameters/getContentVersions.ts +2 -1
  129. package/src/api/parameters/getDescendantsOfType.ts +12 -3
  130. package/src/api/parameters/getHistoryForContent.ts +2 -1
  131. package/src/api/parameters/getLabelsForContent.ts +2 -1
  132. package/src/api/parameters/getRelationship.ts +6 -2
  133. package/src/api/parameters/getSpaces.ts +10 -3
  134. package/src/api/parameters/removeGroupById.ts +2 -2
  135. package/src/api/parameters/removeGroupByName.ts +2 -2
  136. package/src/api/parameters/removeModules.ts +2 -1
  137. package/src/api/parameters/restoreContentVersion.ts +2 -1
  138. package/src/api/parameters/search.ts +2 -2
  139. package/src/api/parameters/updateAttachmentProperties.ts +15 -15
  140. package/src/api/parameters/updateUserProperty.ts +2 -2
  141. package/src/api/relation.ts +8 -8
  142. package/src/api/search.ts +7 -7
  143. package/src/api/settings.ts +12 -12
  144. package/src/api/space.ts +7 -7
  145. package/src/api/spacePermissions.ts +5 -5
  146. package/src/api/spaceProperties.ts +10 -10
  147. package/src/api/spaceSettings.ts +4 -4
  148. package/src/api/template.ts +10 -10
  149. package/src/api/themes.ts +1 -1
  150. package/src/api/users.ts +13 -13
  151. package/src/clients/baseClient.ts +4 -4
  152. package/src/clients/confluenceClient.ts +8 -0
  153. package/src/clients/serverClient.ts +7 -1
  154. package/src/config.ts +19 -11
  155. package/src/server/audit.ts +9 -9
  156. package/src/server/content.ts +49 -49
  157. package/src/server/contentBody.ts +2 -2
  158. package/src/server/group.ts +2 -2
  159. package/src/server/longTask.ts +1 -1
  160. package/src/server/parameters/createAuditRecord.ts +6 -2
  161. package/src/server/parameters/getAttachments.ts +12 -3
  162. package/src/server/parameters/updateAttachmentData.ts +1 -1
  163. package/src/server/search.ts +2 -2
  164. package/src/server/space.ts +16 -16
  165. package/src/server/user.ts +7 -7
  166. package/src/services/authenticationService/authentications/createJWTAuthentication.ts +1 -4
  167. package/src/services/authenticationService/base64Encoder.ts +5 -5
  168. package/src/utilityTypes.ts +7 -1
@@ -65,7 +65,10 @@ export namespace GetAttachments {
65
65
  UpdateGroupRestriction = 'restrictions.update.restrictions.group',
66
66
  /** Returns the history of the content, including the date it was created. */
67
67
  History = 'history',
68
- /** Returns information about the most recent update of the content, including who updated it and when it was updated. */
68
+ /**
69
+ * Returns information about the most recent update of the content, including who updated it and when it was
70
+ * updated.
71
+ */
69
72
  LastUpdated = 'history.lastUpdated',
70
73
  /** Returns information about the update prior to the current content update. */
71
74
  PreviousVersion = 'history.previousVersion',
@@ -75,9 +78,15 @@ export namespace GetAttachments {
75
78
  NextVersion = 'history.nextVersion',
76
79
  /** Returns the parent page, if the content is a page. */
77
80
  Ancestors = 'ancestors',
78
- /** Returns the body of the content in different formats, including the editor format, view format, and export format. */
81
+ /**
82
+ * Returns the body of the content in different formats, including the editor format, view format, and export
83
+ * format.
84
+ */
79
85
  Body = 'body',
80
- /** Returns information about the most recent update of the content, including who updated it and when it was updated. */
86
+ /**
87
+ * Returns information about the most recent update of the content, including who updated it and when it was
88
+ * updated.
89
+ */
81
90
  Version = 'version',
82
91
  /** Returns pages that are descendants at any level below the content. */
83
92
  PageDescendant = 'descendants.page',
@@ -8,5 +8,5 @@ export interface UpdateAttachmentData {
8
8
  /** A comment to be added to the attachment */
9
9
  comment?: string;
10
10
  /** The actual file content to upload */
11
- file: Buffer
11
+ file: Buffer;
12
12
  }
@@ -11,12 +11,12 @@ export class Search {
11
11
  /** Search for entities in Confluence using the Confluence Query Language (CQL) */
12
12
  async search<T = Pagination<Models.SearchResult>>(
13
13
  parameters: Parameters.SearchContent | undefined,
14
- callback: Callback<T>
14
+ callback: Callback<T>,
15
15
  ): Promise<void>;
16
16
  /** Search for entities in Confluence using the Confluence Query Language (CQL) */
17
17
  async search<T = Pagination<Models.SearchResult>>(
18
18
  parameters?: Parameters.SearchContent,
19
- callback?: never
19
+ callback?: never,
20
20
  ): Promise<T>;
21
21
  async search<T = Pagination<Models.SearchResult>>(
22
22
  parameters?: Parameters.SearchContent,
@@ -11,7 +11,7 @@ export class Space {
11
11
  /** Returns information about a number of spaces. */
12
12
  async getSpaces<T = Pagination<Models.Space>>(
13
13
  parameters: Parameters.GetSpaces | undefined,
14
- callback: Callback<T>
14
+ callback: Callback<T>,
15
15
  ): Promise<void>;
16
16
  /** Returns information about a number of spaces. */
17
17
  async getSpaces<T = Pagination<Models.Space>>(parameters?: Parameters.GetSpaces, callback?: never): Promise<T>;
@@ -71,7 +71,7 @@ export class Space {
71
71
  */
72
72
  async createPrivateSpace<T = Models.Space>(
73
73
  parameters: Parameters.CreatePrivateSpace,
74
- callback: Callback<T>
74
+ callback: Callback<T>,
75
75
  ): Promise<void>;
76
76
  /**
77
77
  * Creates a new private Space, viewable only by its creator.
@@ -159,12 +159,12 @@ export class Space {
159
159
  /** Returns the content in this given space */
160
160
  async getContentForSpace<T = Pagination<Models.Content>>(
161
161
  parameters: Parameters.GetContentForSpace,
162
- callback: Callback<T>
162
+ callback: Callback<T>,
163
163
  ): Promise<void>;
164
164
  /** Returns the content in this given space */
165
165
  async getContentForSpace<T = Pagination<Models.Content>>(
166
166
  parameters: Parameters.GetContentForSpace,
167
- callback?: never
167
+ callback?: never,
168
168
  ): Promise<T>;
169
169
  async getContentForSpace<T = Pagination<Models.Content>>(
170
170
  parameters: Parameters.GetContentForSpace,
@@ -187,12 +187,12 @@ export class Space {
187
187
  /** Returns the content in this given space with the given type */
188
188
  async getContentByType<T = Pagination<Models.Content>>(
189
189
  parameters: Parameters.GetContentByType,
190
- callback: Callback<T>
190
+ callback: Callback<T>,
191
191
  ): Promise<void>;
192
192
  /** Returns the content in this given space with the given type */
193
193
  async getContentByType<T = Pagination<Models.Content>>(
194
194
  parameters: Parameters.GetContentByType,
195
- callback?: never
195
+ callback?: never,
196
196
  ): Promise<T>;
197
197
  async getContentByType<T = Pagination<Models.Content>>(
198
198
  parameters: Parameters.GetContentByType,
@@ -215,12 +215,12 @@ export class Space {
215
215
  /** Returns a paginated list of space properties. */
216
216
  async getSpaceProperties<T = Pagination<Models.SpaceProperty>>(
217
217
  parameters: Parameters.GetSpaceProperties,
218
- callback: Callback<T>
218
+ callback: Callback<T>,
219
219
  ): Promise<void>;
220
220
  /** Returns a paginated list of space properties. */
221
221
  async getSpaceProperties<T = Pagination<Models.SpaceProperty>>(
222
222
  parameters: Parameters.GetSpaceProperties,
223
- callback?: never
223
+ callback?: never,
224
224
  ): Promise<T>;
225
225
  async getSpaceProperties<T = Pagination<Models.SpaceProperty>>(
226
226
  parameters: Parameters.GetSpaceProperties,
@@ -242,12 +242,12 @@ export class Space {
242
242
  /** Creates a new space property. */
243
243
  async createSpaceProperty<T = Models.SpaceProperty>(
244
244
  parameters: Parameters.CreateSpaceProperty,
245
- callback: Callback<T>
245
+ callback: Callback<T>,
246
246
  ): Promise<void>;
247
247
  /** Creates a new space property. */
248
248
  async createSpaceProperty<T = Models.SpaceProperty>(
249
249
  parameters: Parameters.CreateSpaceProperty,
250
- callback?: never
250
+ callback?: never,
251
251
  ): Promise<T>;
252
252
  async createSpaceProperty<T = Models.SpaceProperty>(
253
253
  parameters: Parameters.CreateSpaceProperty,
@@ -268,12 +268,12 @@ export class Space {
268
268
  /** Returns a paginated list of space properties. */
269
269
  async getSpaceProperty<T = Models.SpaceProperty>(
270
270
  parameters: Parameters.GetSpaceProperty,
271
- callback: Callback<T>
271
+ callback: Callback<T>,
272
272
  ): Promise<void>;
273
273
  /** Returns a paginated list of space properties. */
274
274
  async getSpaceProperty<T = Models.SpaceProperty>(
275
275
  parameters: Parameters.GetSpaceProperty,
276
- callback?: never
276
+ callback?: never,
277
277
  ): Promise<T>;
278
278
  async getSpaceProperty<T = Models.SpaceProperty>(
279
279
  parameters: Parameters.GetSpaceProperty,
@@ -293,12 +293,12 @@ export class Space {
293
293
  /** Creates a new space property. */
294
294
  async createSpacePropertyForKey<T = Models.SpaceProperty>(
295
295
  parameters: Parameters.CreateSpacePropertyForKey,
296
- callback: Callback<T>
296
+ callback: Callback<T>,
297
297
  ): Promise<void>;
298
298
  /** Creates a new space property. */
299
299
  async createSpacePropertyForKey<T = Models.SpaceProperty>(
300
300
  parameters: Parameters.CreateSpacePropertyForKey,
301
- callback?: never
301
+ callback?: never,
302
302
  ): Promise<T>;
303
303
  async createSpacePropertyForKey<T = Models.SpaceProperty>(
304
304
  parameters: Parameters.CreateSpacePropertyForKey,
@@ -322,7 +322,7 @@ export class Space {
322
322
  */
323
323
  async updateSpaceProperty<T = Models.SpaceProperty>(
324
324
  parameters: Parameters.UpdateSpaceProperty,
325
- callback: Callback<T>
325
+ callback: Callback<T>,
326
326
  ): Promise<void>;
327
327
  /**
328
328
  * Updates a space property. The body contains the representation of the space property. Must include new version
@@ -331,7 +331,7 @@ export class Space {
331
331
  */
332
332
  async updateSpaceProperty<T = Models.SpaceProperty>(
333
333
  parameters: Parameters.UpdateSpaceProperty,
334
- callback?: never
334
+ callback?: never,
335
335
  ): Promise<T>;
336
336
  async updateSpaceProperty<T = Models.SpaceProperty>(
337
337
  parameters: Parameters.UpdateSpaceProperty,
@@ -42,7 +42,7 @@ export class User {
42
42
  /** Get information about the current logged-in user. */
43
43
  async getCurrentUser<T = Models.User>(
44
44
  parameters: Parameters.GetCurrentUser | undefined,
45
- callback: Callback<T>
45
+ callback: Callback<T>,
46
46
  ): Promise<void>;
47
47
  /** Get information about the current logged-in user. */
48
48
  async getCurrentUser<T = Models.User>(parameters?: Parameters.GetCurrentUser, callback?: never): Promise<T>;
@@ -64,12 +64,12 @@ export class User {
64
64
  /** Get a paginated collection of groups that the given user is a member of */
65
65
  async getGroupMembershipsForUser<T = Pagination<Models.Group>>(
66
66
  parameters: Parameters.GetGroups | undefined,
67
- callback: Callback<T>
67
+ callback: Callback<T>,
68
68
  ): Promise<void>;
69
69
  /** Get a paginated collection of groups that the given user is a member of */
70
70
  async getGroupMembershipsForUser<T = Pagination<Models.Group>>(
71
71
  parameters?: Parameters.GetGroups,
72
- callback?: never
72
+ callback?: never,
73
73
  ): Promise<T>;
74
74
  async getGroupMembershipsForUser<T = Pagination<Models.Group>>(
75
75
  parameters?: Parameters.GetGroups,
@@ -99,7 +99,7 @@ export class User {
99
99
  */
100
100
  async getContentWatchStatus<T = Models.UserWatch>(
101
101
  parameters: Parameters.GetContentWatchStatus,
102
- callback: Callback<T>
102
+ callback: Callback<T>,
103
103
  ): Promise<void>;
104
104
  /**
105
105
  * Get information about whether a user is watching a specified content.
@@ -110,7 +110,7 @@ export class User {
110
110
  */
111
111
  async getContentWatchStatus<T = Models.UserWatch>(
112
112
  parameters: Parameters.GetContentWatchStatus,
113
- callback?: never
113
+ callback?: never,
114
114
  ): Promise<T>;
115
115
  async getContentWatchStatus<T = Models.UserWatch>(
116
116
  parameters: Parameters.GetContentWatchStatus,
@@ -169,7 +169,7 @@ export class User {
169
169
  */
170
170
  async removeContentWatcher<T = void>(
171
171
  parameters: Parameters.RemoveContentWatcher,
172
- callback: Callback<T>
172
+ callback: Callback<T>,
173
173
  ): Promise<void>;
174
174
  /**
175
175
  * Delete an existing watcher for the given user and content id.
@@ -204,7 +204,7 @@ export class User {
204
204
  */
205
205
  async isWatchingSpace<T = Models.UserWatch>(
206
206
  parameters: Parameters.IsWatchingSpace,
207
- callback: Callback<T>
207
+ callback: Callback<T>,
208
208
  ): Promise<void>;
209
209
  /**
210
210
  * Get information about whether a user is watching a specified space.
@@ -8,10 +8,7 @@ export function createJWTAuthentication(
8
8
  url: string;
9
9
  },
10
10
  ) {
11
- const {
12
- method,
13
- url,
14
- } = requestData;
11
+ const { method, url } = requestData;
15
12
 
16
13
  const now = Math.floor(Date.now() / 1000);
17
14
  const expire = now + 180;
@@ -1,7 +1,5 @@
1
1
  /* eslint-disable */
2
- /**
3
- * @copyright The code was taken from the portal http://www.webtoolkit.info/javascript-base64.html
4
- */
2
+ /** @copyright The code was taken from the portal http://www.webtoolkit.info/javascript-base64.html */
5
3
 
6
4
  export namespace Base64Encoder {
7
5
  const base64Sequence = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=';
@@ -16,7 +14,7 @@ export namespace Base64Encoder {
16
14
 
17
15
  if (c < 128) {
18
16
  utftext += String.fromCharCode(c);
19
- } else if ((c > 127) && (c < 2048)) {
17
+ } else if (c > 127 && c < 2048) {
20
18
  utftext += String.fromCharCode((c >> 6) | 192);
21
19
 
22
20
  utftext += String.fromCharCode((c & 63) | 128);
@@ -61,7 +59,9 @@ export namespace Base64Encoder {
61
59
  enc4 = 64;
62
60
  }
63
61
 
64
- output += `${base64Sequence.charAt(enc1)}${base64Sequence.charAt(enc2)}${base64Sequence.charAt(enc3)}${base64Sequence.charAt(enc4)}`;
62
+ output += `${base64Sequence.charAt(enc1)}${base64Sequence.charAt(enc2)}${base64Sequence.charAt(
63
+ enc3,
64
+ )}${base64Sequence.charAt(enc4)}`;
65
65
  }
66
66
 
67
67
  return output;
@@ -2,6 +2,12 @@ export namespace UtilityTypes {
2
2
  /** Mark some properties which only the former including as optional and set the value to never */
3
3
  export type Without<T, U> = { [P in Exclude<keyof T, keyof U>]?: never };
4
4
 
5
- /** get the XOR type which could make 2 types exclude each other */
5
+ /** Get the XOR type which could make 2 types exclude each other */
6
6
  export type XOR<T, U> = T | U extends object ? (Without<T, U> & U) | (Without<U, T> & T) : T | U;
7
+
8
+ /** Get the XOR type which could make 3 types exclude each other */
9
+ export type XOR3<T, U, V> = XOR<T, XOR<U, V>>;
10
+
11
+ /** Get the XOR type which could make 4 types exclude each other */
12
+ export type XOR4<T, U, V, W> = XOR<T, XOR3<U, V, W>>;
7
13
  }