confluence.js 1.3.0 → 1.3.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 (62) hide show
  1. package/out/api/audit.js +6 -6
  2. package/out/api/content.js +10 -10
  3. package/out/api/contentAttachments.js +6 -6
  4. package/out/api/contentBody.js +1 -1
  5. package/out/api/contentChildrenAndDescendants.js +7 -7
  6. package/out/api/contentComments.js +1 -1
  7. package/out/api/contentLabels.js +4 -4
  8. package/out/api/contentMacroBody.js +1 -1
  9. package/out/api/contentPermissions.js +1 -1
  10. package/out/api/contentProperties.js +6 -6
  11. package/out/api/contentRestrictions.js +15 -15
  12. package/out/api/contentVersions.js +4 -4
  13. package/out/api/contentWatches.js +12 -12
  14. package/out/api/dynamicModules.js +3 -3
  15. package/out/api/experimental.js +5 -5
  16. package/out/api/group.js +15 -15
  17. package/out/api/inlineTasks.js +3 -3
  18. package/out/api/labelInfo.js +1 -1
  19. package/out/api/longRunningTask.js +2 -2
  20. package/out/api/relation.js +5 -5
  21. package/out/api/search.d.ts +2 -2
  22. package/out/api/search.js +3 -2
  23. package/out/api/settings.js +6 -6
  24. package/out/api/space.js +9 -10
  25. package/out/api/spacePermissions.js +3 -3
  26. package/out/api/spaceProperties.js +6 -6
  27. package/out/api/spaceSettings.js +2 -2
  28. package/out/api/template.js +6 -6
  29. package/out/api/themes.js +6 -6
  30. package/out/api/users.js +8 -8
  31. package/out/clients/baseClient.js +6 -2
  32. package/package.json +3 -3
  33. package/src/api/audit.ts +6 -6
  34. package/src/api/content.ts +10 -10
  35. package/src/api/contentAttachments.ts +6 -6
  36. package/src/api/contentBody.ts +1 -1
  37. package/src/api/contentChildrenAndDescendants.ts +7 -7
  38. package/src/api/contentComments.ts +1 -1
  39. package/src/api/contentLabels.ts +4 -4
  40. package/src/api/contentMacroBody.ts +1 -1
  41. package/src/api/contentPermissions.ts +1 -1
  42. package/src/api/contentProperties.ts +6 -6
  43. package/src/api/contentRestrictions.ts +15 -15
  44. package/src/api/contentVersions.ts +4 -4
  45. package/src/api/contentWatches.ts +12 -12
  46. package/src/api/dynamicModules.ts +3 -3
  47. package/src/api/experimental.ts +5 -5
  48. package/src/api/group.ts +16 -15
  49. package/src/api/inlineTasks.ts +3 -3
  50. package/src/api/labelInfo.ts +1 -1
  51. package/src/api/longRunningTask.ts +2 -2
  52. package/src/api/relation.ts +5 -5
  53. package/src/api/search.ts +6 -4
  54. package/src/api/settings.ts +6 -6
  55. package/src/api/space.ts +9 -9
  56. package/src/api/spacePermissions.ts +3 -3
  57. package/src/api/spaceProperties.ts +6 -6
  58. package/src/api/spaceSettings.ts +2 -2
  59. package/src/api/template.ts +6 -6
  60. package/src/api/themes.ts +6 -6
  61. package/src/api/users.ts +8 -8
  62. package/src/clients/baseClient.ts +6 -2
@@ -34,7 +34,7 @@ export class SpaceSettings {
34
34
  method: 'GET',
35
35
  };
36
36
 
37
- return this.client.sendRequest(config, callback, { methodName: 'getSpaceSettings' });
37
+ return this.client.sendRequest(config, callback);
38
38
  }
39
39
 
40
40
  /**
@@ -67,6 +67,6 @@ export class SpaceSettings {
67
67
  },
68
68
  };
69
69
 
70
- return this.client.sendRequest(config, callback, { methodName: 'updateSpaceSettings' });
70
+ return this.client.sendRequest(config, callback);
71
71
  }
72
72
  }
@@ -44,7 +44,7 @@ export class Template {
44
44
  },
45
45
  };
46
46
 
47
- return this.client.sendRequest(config, callback, { methodName: 'createContentTemplate' });
47
+ return this.client.sendRequest(config, callback);
48
48
  }
49
49
 
50
50
  /**
@@ -85,7 +85,7 @@ export class Template {
85
85
  },
86
86
  };
87
87
 
88
- return this.client.sendRequest(config, callback, { methodName: 'updateContentTemplate' });
88
+ return this.client.sendRequest(config, callback);
89
89
  }
90
90
 
91
91
  /**
@@ -133,7 +133,7 @@ export class Template {
133
133
  },
134
134
  };
135
135
 
136
- return this.client.sendRequest(config, callback, { methodName: 'getBlueprintTemplates' });
136
+ return this.client.sendRequest(config, callback);
137
137
  }
138
138
 
139
139
  /**
@@ -171,7 +171,7 @@ export class Template {
171
171
  },
172
172
  };
173
173
 
174
- return this.client.sendRequest(config, callback, { methodName: 'getContentTemplates' });
174
+ return this.client.sendRequest(config, callback);
175
175
  }
176
176
 
177
177
  /**
@@ -205,7 +205,7 @@ export class Template {
205
205
  method: 'GET',
206
206
  };
207
207
 
208
- return this.client.sendRequest(config, callback, { methodName: 'getContentTemplate' });
208
+ return this.client.sendRequest(config, callback);
209
209
  }
210
210
 
211
211
  /**
@@ -242,6 +242,6 @@ export class Template {
242
242
  method: 'DELETE',
243
243
  };
244
244
 
245
- return this.client.sendRequest(config, callback, { methodName: 'removeTemplate' });
245
+ return this.client.sendRequest(config, callback);
246
246
  }
247
247
  }
package/src/api/themes.ts CHANGED
@@ -32,7 +32,7 @@ export class Themes {
32
32
  },
33
33
  };
34
34
 
35
- return this.client.sendRequest(config, callback, { methodName: 'getThemes' });
35
+ return this.client.sendRequest(config, callback);
36
36
  }
37
37
 
38
38
  /**
@@ -53,7 +53,7 @@ export class Themes {
53
53
  method: 'GET',
54
54
  };
55
55
 
56
- return this.client.sendRequest(config, callback, { methodName: 'getGlobalTheme' });
56
+ return this.client.sendRequest(config, callback);
57
57
  }
58
58
 
59
59
  /**
@@ -74,7 +74,7 @@ export class Themes {
74
74
  method: 'GET',
75
75
  };
76
76
 
77
- return this.client.sendRequest(config, callback, { methodName: 'getTheme' });
77
+ return this.client.sendRequest(config, callback);
78
78
  }
79
79
 
80
80
  /**
@@ -100,7 +100,7 @@ export class Themes {
100
100
  method: 'GET',
101
101
  };
102
102
 
103
- return this.client.sendRequest(config, callback, { methodName: 'getSpaceTheme' });
103
+ return this.client.sendRequest(config, callback);
104
104
  }
105
105
 
106
106
  /**
@@ -129,7 +129,7 @@ export class Themes {
129
129
  },
130
130
  };
131
131
 
132
- return this.client.sendRequest(config, callback, { methodName: 'setSpaceTheme' });
132
+ return this.client.sendRequest(config, callback);
133
133
  }
134
134
 
135
135
  /**
@@ -150,6 +150,6 @@ export class Themes {
150
150
  method: 'DELETE',
151
151
  };
152
152
 
153
- return this.client.sendRequest(config, callback, { methodName: 'resetSpaceTheme' });
153
+ return this.client.sendRequest(config, callback);
154
154
  }
155
155
  }
package/src/api/users.ts CHANGED
@@ -41,7 +41,7 @@ export class Users {
41
41
  },
42
42
  };
43
43
 
44
- return this.client.sendRequest(config, callback, { methodName: 'getUser' });
44
+ return this.client.sendRequest(config, callback);
45
45
  }
46
46
 
47
47
  /**
@@ -76,7 +76,7 @@ export class Users {
76
76
  },
77
77
  };
78
78
 
79
- return this.client.sendRequest(config, callback, { methodName: 'getAnonymousUser' });
79
+ return this.client.sendRequest(config, callback);
80
80
  }
81
81
 
82
82
  /**
@@ -110,7 +110,7 @@ export class Users {
110
110
  },
111
111
  };
112
112
 
113
- return this.client.sendRequest(config, callback, { methodName: 'getCurrentUser' });
113
+ return this.client.sendRequest(config, callback);
114
114
  }
115
115
 
116
116
  /**
@@ -149,7 +149,7 @@ export class Users {
149
149
  },
150
150
  };
151
151
 
152
- return this.client.sendRequest(config, callback, { methodName: 'getGroupMembershipsForUser' });
152
+ return this.client.sendRequest(config, callback);
153
153
  }
154
154
 
155
155
  /**
@@ -186,7 +186,7 @@ export class Users {
186
186
  },
187
187
  };
188
188
 
189
- return this.client.sendRequest(config, callback, { methodName: 'getBulkUserLookup' });
189
+ return this.client.sendRequest(config, callback);
190
190
  }
191
191
 
192
192
  /**
@@ -223,7 +223,7 @@ export class Users {
223
223
  },
224
224
  };
225
225
 
226
- return this.client.sendRequest(config, callback, { methodName: 'getPrivacyUnsafeUserEmail' });
226
+ return this.client.sendRequest(config, callback);
227
227
  }
228
228
 
229
229
  /**
@@ -266,7 +266,7 @@ export class Users {
266
266
  },
267
267
  };
268
268
 
269
- return this.client.sendRequest(config, callback, { methodName: 'getPrivacyUnsafeUserEmailBulk' });
269
+ return this.client.sendRequest(config, callback);
270
270
  }
271
271
 
272
272
  /**
@@ -306,6 +306,6 @@ export class Users {
306
306
  },
307
307
  };
308
308
 
309
- return this.client.sendRequest(config, callback, { methodName: 'getBulkUserMigration' });
309
+ return this.client.sendRequest(config, callback);
310
310
  }
311
311
  }
@@ -20,7 +20,7 @@ export class BaseClient implements Client {
20
20
 
21
21
  Object.entries(parameters).forEach(([key, value]) => {
22
22
  if (value === null || typeof value === 'undefined') {
23
- return undefined;
23
+ return;
24
24
  }
25
25
 
26
26
  if (Array.isArray(value)) {
@@ -34,11 +34,15 @@ export class BaseClient implements Client {
34
34
  } else if (value !== null && typeof value === 'object') {
35
35
  // eslint-disable-next-line no-param-reassign
36
36
  value = JSON.stringify(value);
37
+ } else if (value instanceof Function) {
38
+ const part = value();
39
+
40
+ return part && parts.push(part);
37
41
  }
38
42
 
39
43
  parts.push(`${this.encode(key)}=${this.encode(value)}`);
40
44
 
41
- return undefined;
45
+ return;
42
46
  });
43
47
 
44
48
  return parts.join('&');