@selfcommunity/api-services 0.1.6-alpha.0 → 0.1.6-alpha.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/lib/cjs/constants/Endpoints.js +8 -16
  2. package/lib/cjs/index.js +0 -6
  3. package/lib/cjs/services/webhook/index.js +110 -27
  4. package/lib/cjs/services/webhook/types.js +3 -0
  5. package/lib/esm/api-services/src/constants/Endpoints.d.ts.map +1 -1
  6. package/lib/esm/api-services/src/index.d.ts +1 -2
  7. package/lib/esm/api-services/src/index.d.ts.map +1 -1
  8. package/lib/esm/api-services/src/services/webhook/index.d.ts +87 -30
  9. package/lib/esm/api-services/src/services/webhook/index.d.ts.map +1 -1
  10. package/lib/esm/api-services/src/services/webhook/types.d.ts +32 -0
  11. package/lib/esm/api-services/src/services/webhook/types.d.ts.map +1 -0
  12. package/lib/esm/constants/Endpoints.js +8 -16
  13. package/lib/esm/index.js +0 -6
  14. package/lib/esm/services/webhook/index.js +110 -27
  15. package/lib/esm/services/webhook/types.js +3 -0
  16. package/lib/esm/types/src/index.d.ts +9 -0
  17. package/lib/esm/types/src/index.d.ts.map +1 -0
  18. package/lib/esm/types/src/types/auth.d.ts +26 -0
  19. package/lib/esm/types/src/types/auth.d.ts.map +1 -0
  20. package/lib/esm/types/src/types/broadcastMessage.d.ts +73 -0
  21. package/lib/esm/types/src/types/broadcastMessage.d.ts.map +1 -0
  22. package/lib/esm/types/src/types/category.d.ts +100 -0
  23. package/lib/esm/types/src/types/category.d.ts.map +1 -0
  24. package/lib/esm/types/src/types/comment.d.ts +97 -0
  25. package/lib/esm/types/src/types/comment.d.ts.map +1 -0
  26. package/lib/esm/types/src/types/customAdv.d.ts +53 -0
  27. package/lib/esm/types/src/types/customAdv.d.ts.map +1 -0
  28. package/lib/esm/types/src/types/customNotification.d.ts +28 -0
  29. package/lib/esm/types/src/types/customNotification.d.ts.map +1 -0
  30. package/lib/esm/types/src/types/embed.d.ts +33 -0
  31. package/lib/esm/types/src/types/embed.d.ts.map +1 -0
  32. package/lib/esm/types/src/types/feed.d.ts +208 -0
  33. package/lib/esm/types/src/types/feed.d.ts.map +1 -0
  34. package/lib/esm/types/src/types/incubator.d.ts +53 -0
  35. package/lib/esm/types/src/types/incubator.d.ts.map +1 -0
  36. package/lib/esm/types/src/types/index.d.ts +23 -0
  37. package/lib/esm/types/src/types/index.d.ts.map +1 -0
  38. package/lib/esm/types/src/types/location.d.ts +61 -0
  39. package/lib/esm/types/src/types/location.d.ts.map +1 -0
  40. package/lib/esm/types/src/types/media.d.ts +52 -0
  41. package/lib/esm/types/src/types/media.d.ts.map +1 -0
  42. package/lib/esm/types/src/types/notification.d.ts +416 -0
  43. package/lib/esm/types/src/types/notification.d.ts.map +1 -0
  44. package/lib/esm/types/src/types/poll.d.ts +77 -0
  45. package/lib/esm/types/src/types/poll.d.ts.map +1 -0
  46. package/lib/esm/types/src/types/privateMessage.d.ts +109 -0
  47. package/lib/esm/types/src/types/privateMessage.d.ts.map +1 -0
  48. package/lib/esm/types/src/types/prize.d.ts +48 -0
  49. package/lib/esm/types/src/types/prize.d.ts.map +1 -0
  50. package/lib/esm/types/src/types/tag.d.ts +47 -0
  51. package/lib/esm/types/src/types/tag.d.ts.map +1 -0
  52. package/lib/esm/types/src/types/user.d.ts +231 -0
  53. package/lib/esm/types/src/types/user.d.ts.map +1 -0
  54. package/lib/esm/types/src/types/webhook.d.ts +91 -0
  55. package/lib/esm/types/src/types/webhook.d.ts.map +1 -0
  56. package/lib/umd/api-services.js +1 -1
  57. package/lib/umd/api-services.js.map +1 -1
  58. package/package.json +4 -4
  59. package/lib/cjs/services/dynamic_preference/index.js +0 -85
  60. package/lib/esm/api-services/src/services/dynamic_preference/index.d.ts +0 -16
  61. package/lib/esm/api-services/src/services/dynamic_preference/index.d.ts.map +0 -1
  62. package/lib/esm/services/dynamic_preference/index.js +0 -85
@@ -14,6 +14,14 @@ const Endpoints = {
14
14
  method: 'POST'
15
15
  },
16
16
 
17
+ /**
18
+ * Dynamic Preference Endpoints
19
+ */
20
+ Preferences: {
21
+ url: (0, _utils.urlReplacer)('/api/v2/dynamic_preference/'),
22
+ method: 'GET'
23
+ },
24
+
17
25
  /**
18
26
  * SSO Endpoints
19
27
  */
@@ -26,22 +34,6 @@ const Endpoints = {
26
34
  method: 'POST'
27
35
  },
28
36
 
29
- /**
30
- * Dynamic Preference Endpoints
31
- */
32
- Preferences: {
33
- url: (0, _utils.urlReplacer)('/api/v2/dynamic_preference/'),
34
- method: 'GET'
35
- },
36
- PreferencesSearch: {
37
- url: (0, _utils.urlReplacer)('/api/v2/dynamic_preference/search/'),
38
- method: 'GET'
39
- },
40
- SpecificPreference: {
41
- url: (0, _utils.urlReplacer)('/api/v2/dynamic_preference/$(id)/'),
42
- method: 'GET'
43
- },
44
-
45
37
  /**
46
38
  * Features Endpoints
47
39
  * */
package/lib/cjs/index.js CHANGED
@@ -52,12 +52,6 @@ exports.DataPortabilityService = _data_portability.default;
52
52
  exports.DataPortabilityApiClient = _data_portability.DataPortabilityApiClient;
53
53
  exports.DataPortabilityApiClientInterface = _data_portability.DataPortabilityApiClientInterface;
54
54
 
55
- var _dynamic_preference = _interopRequireWildcard(require("./services/dynamic_preference"));
56
-
57
- exports.DynamicPreferenceService = _dynamic_preference.default;
58
- exports.DynamicPreferenceApiClient = _dynamic_preference.DynamicPreferenceApiClient;
59
- exports.DynamicPreferenceApiClientInterface = _dynamic_preference.DynamicPreferenceApiClientInterface;
60
-
61
55
  var _embed = _interopRequireWildcard(require("./services/embed"));
62
56
 
63
57
  exports.EmbedService = _embed.default;
@@ -9,7 +9,13 @@ var _Endpoints = _interopRequireDefault(require("../../constants/Endpoints"));
9
9
 
10
10
  function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
11
11
 
12
+ /**
13
+ * Contains all the endpoints needed to manage webhooks.
14
+ */
12
15
  class WebhookApiClient {
16
+ /**
17
+ * This endpoint retrieves all webhook endpoints
18
+ */
13
19
  static getAllWebhookEndpoints() {
14
20
  return _client.default.request({
15
21
  url: _Endpoints.default.WebhookEndpointsList.url({}),
@@ -26,6 +32,10 @@ class WebhookApiClient {
26
32
  return Promise.reject(error);
27
33
  });
28
34
  }
35
+ /**
36
+ * This endpoint retrieves webhook events that can be enabled in the endpoint.
37
+ */
38
+
29
39
 
30
40
  static getAllWebhookEvents() {
31
41
  return _client.default.request({
@@ -43,11 +53,19 @@ class WebhookApiClient {
43
53
  return Promise.reject(error);
44
54
  });
45
55
  }
56
+ /**
57
+ * This endpoint creates a webhook endpoint and connects it to the given webhook events.
58
+ * @param params
59
+ */
60
+
46
61
 
47
- static createWebhookEndpoint() {
62
+ static createWebhookEndpoint(params) {
48
63
  return _client.default.request({
49
64
  url: _Endpoints.default.WebhookCreate.url({}),
50
- method: _Endpoints.default.WebhookCreate.method
65
+ method: _Endpoints.default.WebhookCreate.method,
66
+ data: {
67
+ params
68
+ }
51
69
  }).then(res => {
52
70
  if (res.status >= 300) {
53
71
  console.log(`Unable to perform action (Response code: ${res.status}).`);
@@ -60,6 +78,11 @@ class WebhookApiClient {
60
78
  return Promise.reject(error);
61
79
  });
62
80
  }
81
+ /**
82
+ * This endpoint retrieves a specific webhook endpoint using ID.
83
+ * @param id
84
+ */
85
+
63
86
 
64
87
  static getASpecificWebhookEndpoint(id) {
65
88
  return _client.default.request({
@@ -79,13 +102,22 @@ class WebhookApiClient {
79
102
  return Promise.reject(error);
80
103
  });
81
104
  }
105
+ /**
106
+ * This endpoint updates a specific webhook endpoint.
107
+ * @param id
108
+ * @param params
109
+ */
110
+
82
111
 
83
- static updateASpecificWebhookEndpoint(id) {
112
+ static updateASpecificWebhookEndpoint(id, params) {
84
113
  return _client.default.request({
85
114
  url: _Endpoints.default.WebhookUpdate.url({
86
115
  id
87
116
  }),
88
- method: _Endpoints.default.WebhookUpdate.method
117
+ method: _Endpoints.default.WebhookUpdate.method,
118
+ data: {
119
+ params
120
+ }
89
121
  }).then(res => {
90
122
  if (res.status >= 300) {
91
123
  console.log(`Unable to perform action (Response code: ${res.status}).`);
@@ -98,13 +130,22 @@ class WebhookApiClient {
98
130
  return Promise.reject(error);
99
131
  });
100
132
  }
133
+ /**
134
+ * This endpoint updates a specific field for a specific webhook endpoint.
135
+ * @param id
136
+ * @param params
137
+ */
101
138
 
102
- static updateASingleWebhookEndpointField(id) {
139
+
140
+ static updateASingleWebhookEndpointField(id, params) {
103
141
  return _client.default.request({
104
142
  url: _Endpoints.default.WebhookPatch.url({
105
143
  id
106
144
  }),
107
- method: _Endpoints.default.WebhookPatch.method
145
+ method: _Endpoints.default.WebhookPatch.method,
146
+ data: {
147
+ params
148
+ }
108
149
  }).then(res => {
109
150
  if (res.status >= 300) {
110
151
  console.log(`Unable to perform action (Response code: ${res.status}).`);
@@ -117,6 +158,11 @@ class WebhookApiClient {
117
158
  return Promise.reject(error);
118
159
  });
119
160
  }
161
+ /**
162
+ * This endpoint deletes a Webhook Endpoint.
163
+ * @param id
164
+ */
165
+
120
166
 
121
167
  static deleteWebhookEndpoint(id) {
122
168
  return _client.default.request({
@@ -130,12 +176,17 @@ class WebhookApiClient {
130
176
  return Promise.reject(res);
131
177
  }
132
178
 
133
- return Promise.resolve(res.data);
179
+ return Promise.resolve(res);
134
180
  }).catch(error => {
135
181
  console.log('Unable to perform action.');
136
182
  return Promise.reject(error);
137
183
  });
138
184
  }
185
+ /**
186
+ * This endpoint retrieves the attempts related to this endpoint.
187
+ * @param id
188
+ */
189
+
139
190
 
140
191
  static getAllWebhookEndpointAttempts(id) {
141
192
  return _client.default.request({
@@ -155,6 +206,11 @@ class WebhookApiClient {
155
206
  return Promise.reject(error);
156
207
  });
157
208
  }
209
+ /**
210
+ * This endpoint expires the secret associated with this endpoint.
211
+ * @param id
212
+ */
213
+
158
214
 
159
215
  static expireWebhookSigningSecret(id) {
160
216
  return _client.default.request({
@@ -174,13 +230,22 @@ class WebhookApiClient {
174
230
  return Promise.reject(error);
175
231
  });
176
232
  }
233
+ /**
234
+ * This endpoint reveals the secret associated with this endpoint.
235
+ * @param id
236
+ * @param password
237
+ */
238
+
177
239
 
178
- static revealWebhookSigningSecret(id) {
240
+ static revealWebhookSigningSecret(id, password) {
179
241
  return _client.default.request({
180
242
  url: _Endpoints.default.WebhookRevealSigningSecret.url({
181
243
  id
182
244
  }),
183
- method: _Endpoints.default.WebhookRevealSigningSecret.method
245
+ method: _Endpoints.default.WebhookRevealSigningSecret.method,
246
+ data: {
247
+ password: password != null ? password : null
248
+ }
184
249
  }).then(res => {
185
250
  if (res.status >= 300) {
186
251
  console.log(`Unable to perform action(Response code: ${res.status}).`);
@@ -193,39 +258,57 @@ class WebhookApiClient {
193
258
  return Promise.reject(error);
194
259
  });
195
260
  }
261
+ /**
262
+ * This endpoint resends the event specified as parameter to the endpoint specified by the id parameter.
263
+ * @param id
264
+ * @param event
265
+ */
196
266
 
197
- static resendWebhookEndpointEvent(id) {
267
+
268
+ static resendWebhookEndpointEvent(id, event) {
198
269
  return _client.default.request({
199
270
  url: _Endpoints.default.WebhookResendEndpointEvent.url({
200
271
  id
201
272
  }),
202
- method: _Endpoints.default.WebhookResendEndpointEvent.method
273
+ method: _Endpoints.default.WebhookResendEndpointEvent.method,
274
+ data: {
275
+ event: event
276
+ }
203
277
  }).then(res => {
204
278
  if (res.status >= 300) {
205
279
  console.log(`Unable to perform action (Response code: ${res.status}).`);
206
280
  return Promise.reject(res);
207
281
  }
208
282
 
209
- return Promise.resolve(res.data);
283
+ return Promise.resolve(res);
210
284
  }).catch(error => {
211
285
  console.log('Unable to perform action.');
212
286
  return Promise.reject(error);
213
287
  });
214
288
  }
289
+ /**
290
+ * This endpoint resends the events specified as parameters to the endpoint specified by the id parameter.
291
+ * @param id
292
+ * @param event
293
+ */
294
+
215
295
 
216
- static resendMultipleWebhookEndpointEvent(id) {
296
+ static resendMultipleWebhookEndpointEvent(id, event) {
217
297
  return _client.default.request({
218
298
  url: _Endpoints.default.WebhookResendMultipleEndpointEvent.url({
219
299
  id
220
300
  }),
221
- method: _Endpoints.default.WebhookResendMultipleEndpointEvent.method
301
+ method: _Endpoints.default.WebhookResendMultipleEndpointEvent.method,
302
+ data: {
303
+ event: event
304
+ }
222
305
  }).then(res => {
223
306
  if (res.status >= 300) {
224
307
  console.log(`Unable to perform action (Response code: ${res.status}).`);
225
308
  return Promise.reject(res);
226
309
  }
227
310
 
228
- return Promise.resolve(res.data);
311
+ return Promise.resolve(res);
229
312
  }).catch(error => {
230
313
  console.log('Unable to perform action.');
231
314
  return Promise.reject(error);
@@ -245,20 +328,20 @@ class WebhookService {
245
328
  return WebhookApiClient.getAllWebhookEvents();
246
329
  }
247
330
 
248
- static async createWebhookEndpoint() {
249
- return WebhookApiClient.createWebhookEndpoint();
331
+ static async createWebhookEndpoint(params) {
332
+ return WebhookApiClient.createWebhookEndpoint(params);
250
333
  }
251
334
 
252
335
  static async getASpecificWebhookEndpoint(id) {
253
336
  return WebhookApiClient.getASpecificWebhookEndpoint(id);
254
337
  }
255
338
 
256
- static async updateASpecificWebhookEndpoint(id) {
257
- return WebhookApiClient.updateASpecificWebhookEndpoint(id);
339
+ static async updateASpecificWebhookEndpoint(id, params) {
340
+ return WebhookApiClient.updateASpecificWebhookEndpoint(id, params);
258
341
  }
259
342
 
260
- static async updateASingleWebhookEndpointField(id) {
261
- return WebhookApiClient.updateASingleWebhookEndpointField(id);
343
+ static async updateASingleWebhookEndpointField(id, params) {
344
+ return WebhookApiClient.updateASingleWebhookEndpointField(id, params);
262
345
  }
263
346
 
264
347
  static async deleteWebhookEndpoint(id) {
@@ -273,16 +356,16 @@ class WebhookService {
273
356
  return WebhookApiClient.expireWebhookSigningSecret(id);
274
357
  }
275
358
 
276
- static async revealWebhookSigningSecret(id) {
277
- return WebhookApiClient.revealWebhookSigningSecret(id);
359
+ static async revealWebhookSigningSecret(id, password) {
360
+ return WebhookApiClient.revealWebhookSigningSecret(id, password);
278
361
  }
279
362
 
280
- static async resendWebhookEndpointEvent(id) {
281
- return WebhookApiClient.resendWebhookEndpointEvent(id);
363
+ static async resendWebhookEndpointEvent(id, event) {
364
+ return WebhookApiClient.resendWebhookEndpointEvent(id, event);
282
365
  }
283
366
 
284
- static async resendMultipleWebhookEndpointEvent(id) {
285
- return WebhookApiClient.resendMultipleWebhookEndpointEvent(id);
367
+ static async resendMultipleWebhookEndpointEvent(id, event) {
368
+ return WebhookApiClient.resendMultipleWebhookEndpointEvent(id, event);
286
369
  }
287
370
 
288
371
  }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
@@ -1 +1 @@
1
- {"version":3,"file":"Endpoints.d.ts","sourceRoot":"","sources":["../../../../../src/constants/Endpoints.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAC,MAAM,WAAW,CAAC;AAErC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;CAsgC5C,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"Endpoints.d.ts","sourceRoot":"","sources":["../../../../../src/constants/Endpoints.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,UAAU,EAAC,MAAM,WAAW,CAAC;AAErC,MAAM,WAAW,YAAY;IAC3B,GAAG,EAAE,CAAC,MAAM,CAAC,EAAE,MAAM,KAAK,MAAM,CAAC;IACjC,MAAM,EAAE,UAAU,CAAC;CACpB;AAED,QAAA,MAAM,SAAS,EAAE;IAAC,CAAC,GAAG,EAAE,MAAM,GAAG,YAAY,CAAA;CA8/B5C,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -19,7 +19,6 @@ import CommentService, { CommentApiClient, CommentApiClientInterface } from './s
19
19
  import CustomAdvService, { CustomAdvApiClient, CustomAdvApiClientInterface } from './services/custom_adv';
20
20
  import CustomPageService, { CustomPageApiClient, CustomPageApiClientInterface } from './services/custom_page';
21
21
  import DataPortabilityService, { DataPortabilityApiClient, DataPortabilityApiClientInterface } from './services/data_portability';
22
- import DynamicPreferenceService, { DynamicPreferenceApiClient, DynamicPreferenceApiClientInterface } from './services/dynamic_preference';
23
22
  import EmbedService, { EmbedApiClient, EmbedApiClientInterface } from './services/embed';
24
23
  import FeatureService, { FeatureApiClient, FeatureApiClientInterface } from './services/feature';
25
24
  import FeedService, { FeedApiClient, FeedApiClientInterface } from './services/feed';
@@ -43,5 +42,5 @@ import WebhookService, { WebhookApiClient, WebhookApiClientInterface } from './s
43
42
  /**
44
43
  * Export all
45
44
  */
46
- export { http, HttpResponse, HttpMethod, formatHttpError, generateJWTToken, parseJwt, Endpoints, EndpointType, PreferenceService, PreferenceApiClient, PreferenceApiClientInterface, UserService, UserApiClient, UserApiClientInterface, FeatureService, FeatureApiClient, FeatureApiClientInterface, CategoryService, CategoryApiClient, CategoryApiClientInterface, CommentService, CommentApiClient, CommentApiClientInterface, CustomAdvService, CustomAdvApiClient, CustomAdvApiClientInterface, CustomPageService, CustomPageApiClient, CustomPageApiClientInterface, DataPortabilityService, DataPortabilityApiClient, DataPortabilityApiClientInterface, DynamicPreferenceService, DynamicPreferenceApiClient, DynamicPreferenceApiClientInterface, EmbedService, EmbedApiClient, EmbedApiClientInterface, FeedService, FeedApiClient, FeedApiClientInterface, FeedObjectService, FeedObjectApiClient, FeedObjectApiClientInterface, IncubatorService, IncubatorApiClient, IncubatorApiClientInterface, InsightService, InsightApiClient, InsightApiClientInterface, LegalPageService, LegalPageApiClient, LegalPageApiClientInterface, LocalityService, LocalityApiClient, LocalityApiClientInterface, LoyaltyService, LoyaltyApiClient, LoyaltyApiClientInterface, MediaService, MediaApiClient, MediaApiClientInterface, ModerationService, ModerationApiClient, ModerationApiClientInterface, NotificationService, NotificationApiClient, NotificationApiClientInterface, PrivateMessageService, PrivateMessageApiClient, PrivateMessageApiClientInterface, ScoreService, ScoreApiClient, ScoreApiClientInterface, SSOService, SSOApiClient, SSOApiClientInterface, SuggestionService, SuggestionApiClient, SuggestionApiClientInterface, TagService, TagApiClient, TagApiClientInterface, WebhookService, WebhookApiClient, WebhookApiClientInterface };
45
+ export { http, HttpResponse, HttpMethod, formatHttpError, generateJWTToken, parseJwt, Endpoints, EndpointType, PreferenceService, PreferenceApiClient, PreferenceApiClientInterface, UserService, UserApiClient, UserApiClientInterface, FeatureService, FeatureApiClient, FeatureApiClientInterface, CategoryService, CategoryApiClient, CategoryApiClientInterface, CommentService, CommentApiClient, CommentApiClientInterface, CustomAdvService, CustomAdvApiClient, CustomAdvApiClientInterface, CustomPageService, CustomPageApiClient, CustomPageApiClientInterface, DataPortabilityService, DataPortabilityApiClient, DataPortabilityApiClientInterface, EmbedService, EmbedApiClient, EmbedApiClientInterface, FeedService, FeedApiClient, FeedApiClientInterface, FeedObjectService, FeedObjectApiClient, FeedObjectApiClientInterface, IncubatorService, IncubatorApiClient, IncubatorApiClientInterface, InsightService, InsightApiClient, InsightApiClientInterface, LegalPageService, LegalPageApiClient, LegalPageApiClientInterface, LocalityService, LocalityApiClient, LocalityApiClientInterface, LoyaltyService, LoyaltyApiClient, LoyaltyApiClientInterface, MediaService, MediaApiClient, MediaApiClientInterface, ModerationService, ModerationApiClient, ModerationApiClientInterface, NotificationService, NotificationApiClient, NotificationApiClientInterface, PrivateMessageService, PrivateMessageApiClient, PrivateMessageApiClientInterface, ScoreService, ScoreApiClient, ScoreApiClientInterface, SSOService, SSOApiClient, SSOApiClientInterface, SuggestionService, SuggestionApiClient, SuggestionApiClientInterface, TagService, TagApiClient, TagApiClientInterface, WebhookService, WebhookApiClient, WebhookApiClientInterface };
47
46
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,IAAI,EAAE,EAAC,YAAY,E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,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,WAAW,EACX,aAAa,EACb,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,eAAe,EACf,iBAAiB,EACjB,0BAA0B,EAC1B,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,sBAAsB,EACtB,wBAAwB,EACxB,iCAAiC,EACjC,wBAAwB,EACxB,0BAA0B,EAC1B,mCAAmC,EACnC,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,eAAe,EACf,iBAAiB,EACjB,0BAA0B,EAC1B,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,mBAAmB,EACnB,qBAAqB,EACrB,8BAA8B,EAC9B,qBAAqB,EACrB,uBAAuB,EACvB,gCAAgC,EAChC,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EAC1B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,IAAI,EAAE,EAAC,YAAY,EAAE,UAAU,EAAC,MAAM,UAAU,CAA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,EACzB,eAAe,EACf,iBAAiB,EACjB,0BAA0B,EAC1B,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,sBAAsB,EACtB,wBAAwB,EACxB,iCAAiC,EACjC,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,WAAW,EACX,aAAa,EACb,sBAAsB,EACtB,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,eAAe,EACf,iBAAiB,EACjB,0BAA0B,EAC1B,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EACzB,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,mBAAmB,EACnB,qBAAqB,EACrB,8BAA8B,EAC9B,qBAAqB,EACrB,uBAAuB,EACvB,gCAAgC,EAChC,YAAY,EACZ,cAAc,EACd,uBAAuB,EACvB,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,iBAAiB,EACjB,mBAAmB,EACnB,4BAA4B,EAC5B,UAAU,EACV,YAAY,EACZ,qBAAqB,EACrB,cAAc,EACd,gBAAgB,EAChB,yBAAyB,EAC1B,CAAC"}
@@ -1,43 +1,100 @@
1
+ import { HttpResponse } from '../../client';
2
+ import { SCWebhookEndpointType, SCWebhookEndpointAttemptType, SCWebhookEndpointSecretType } from '@selfcommunity/types';
3
+ import { WebhookParamType } from './types';
1
4
  export interface WebhookApiClientInterface {
2
- getAllWebhookEndpoints(): Promise<any>;
5
+ getAllWebhookEndpoints(): Promise<SCWebhookEndpointType>;
3
6
  getAllWebhookEvents(): Promise<any>;
4
- createWebhookEndpoint(): Promise<any>;
5
- getASpecificWebhookEndpoint(id: number): Promise<any>;
6
- updateASpecificWebhookEndpoint(id: number): Promise<any>;
7
- updateASingleWebhookEndpointField(id: number): Promise<any>;
7
+ createWebhookEndpoint(params: WebhookParamType): Promise<SCWebhookEndpointType>;
8
+ getASpecificWebhookEndpoint(id: number): Promise<SCWebhookEndpointType>;
9
+ updateASpecificWebhookEndpoint(id: number, params: WebhookParamType): Promise<SCWebhookEndpointType>;
10
+ updateASingleWebhookEndpointField(id: number, params: WebhookParamType): Promise<SCWebhookEndpointType>;
8
11
  deleteWebhookEndpoint(id: number): Promise<any>;
9
- getAllWebhookEndpointAttempts(): Promise<any>;
10
- expireWebhookSigningSecret(id: number): Promise<any>;
11
- revealWebhookSigningSecret(id: number): Promise<any>;
12
- resendWebhookEndpointEvent(id: number): Promise<any>;
13
- resendMultipleWebhookEndpointEvent(id: number): Promise<any>;
12
+ getAllWebhookEndpointAttempts(id: number): Promise<SCWebhookEndpointAttemptType>;
13
+ expireWebhookSigningSecret(id: number): Promise<SCWebhookEndpointType>;
14
+ revealWebhookSigningSecret(id: number, password?: string): Promise<SCWebhookEndpointSecretType>;
15
+ resendWebhookEndpointEvent(id: number, event: number): Promise<any>;
16
+ resendMultipleWebhookEndpointEvent(id: number, event: number[]): Promise<any>;
14
17
  }
18
+ /**
19
+ * Contains all the endpoints needed to manage webhooks.
20
+ */
15
21
  export declare class WebhookApiClient {
16
- static getAllWebhookEndpoints(): Promise<any>;
22
+ /**
23
+ * This endpoint retrieves all webhook endpoints
24
+ */
25
+ static getAllWebhookEndpoints(): Promise<HttpResponse<SCWebhookEndpointType>>;
26
+ /**
27
+ * This endpoint retrieves webhook events that can be enabled in the endpoint.
28
+ */
17
29
  static getAllWebhookEvents(): Promise<any>;
18
- static createWebhookEndpoint(): Promise<any>;
19
- static getASpecificWebhookEndpoint(id: number): Promise<any>;
20
- static updateASpecificWebhookEndpoint(id: number): Promise<any>;
21
- static updateASingleWebhookEndpointField(id: number): Promise<any>;
30
+ /**
31
+ * This endpoint creates a webhook endpoint and connects it to the given webhook events.
32
+ * @param params
33
+ */
34
+ static createWebhookEndpoint(params: WebhookParamType): Promise<HttpResponse<SCWebhookEndpointType>>;
35
+ /**
36
+ * This endpoint retrieves a specific webhook endpoint using ID.
37
+ * @param id
38
+ */
39
+ static getASpecificWebhookEndpoint(id: number): Promise<SCWebhookEndpointType>;
40
+ /**
41
+ * This endpoint updates a specific webhook endpoint.
42
+ * @param id
43
+ * @param params
44
+ */
45
+ static updateASpecificWebhookEndpoint(id: number, params: WebhookParamType): Promise<SCWebhookEndpointType>;
46
+ /**
47
+ * This endpoint updates a specific field for a specific webhook endpoint.
48
+ * @param id
49
+ * @param params
50
+ */
51
+ static updateASingleWebhookEndpointField(id: number, params: WebhookParamType): Promise<SCWebhookEndpointType>;
52
+ /**
53
+ * This endpoint deletes a Webhook Endpoint.
54
+ * @param id
55
+ */
22
56
  static deleteWebhookEndpoint(id: number): Promise<any>;
23
- static getAllWebhookEndpointAttempts(id: number): Promise<any>;
24
- static expireWebhookSigningSecret(id: number): Promise<any>;
25
- static revealWebhookSigningSecret(id: number): Promise<any>;
26
- static resendWebhookEndpointEvent(id: number): Promise<any>;
27
- static resendMultipleWebhookEndpointEvent(id: number): Promise<any>;
57
+ /**
58
+ * This endpoint retrieves the attempts related to this endpoint.
59
+ * @param id
60
+ */
61
+ static getAllWebhookEndpointAttempts(id: number): Promise<SCWebhookEndpointAttemptType>;
62
+ /**
63
+ * This endpoint expires the secret associated with this endpoint.
64
+ * @param id
65
+ */
66
+ static expireWebhookSigningSecret(id: number): Promise<SCWebhookEndpointType>;
67
+ /**
68
+ * This endpoint reveals the secret associated with this endpoint.
69
+ * @param id
70
+ * @param password
71
+ */
72
+ static revealWebhookSigningSecret(id: number, password?: string): Promise<SCWebhookEndpointSecretType>;
73
+ /**
74
+ * This endpoint resends the event specified as parameter to the endpoint specified by the id parameter.
75
+ * @param id
76
+ * @param event
77
+ */
78
+ static resendWebhookEndpointEvent(id: number, event: number): Promise<any>;
79
+ /**
80
+ * This endpoint resends the events specified as parameters to the endpoint specified by the id parameter.
81
+ * @param id
82
+ * @param event
83
+ */
84
+ static resendMultipleWebhookEndpointEvent(id: number, event: number[]): Promise<any>;
28
85
  }
29
86
  export default class WebhookService {
30
- static getAllWebhookEndpoints(): Promise<any>;
87
+ static getAllWebhookEndpoints(): Promise<HttpResponse<SCWebhookEndpointType>>;
31
88
  static getAllWebhookEvents(): Promise<any>;
32
- static createWebhookEndpoint(): Promise<any>;
33
- static getASpecificWebhookEndpoint(id: number): Promise<any>;
34
- static updateASpecificWebhookEndpoint(id: number): Promise<any>;
35
- static updateASingleWebhookEndpointField(id: number): Promise<any>;
89
+ static createWebhookEndpoint(params: WebhookParamType): Promise<HttpResponse<SCWebhookEndpointType>>;
90
+ static getASpecificWebhookEndpoint(id: number): Promise<SCWebhookEndpointType>;
91
+ static updateASpecificWebhookEndpoint(id: number, params: WebhookParamType): Promise<SCWebhookEndpointType>;
92
+ static updateASingleWebhookEndpointField(id: number, params: WebhookParamType): Promise<SCWebhookEndpointType>;
36
93
  static deleteWebhookEndpoint(id: number): Promise<any>;
37
- static getAllWebhookEndpointAttempts(id: number): Promise<any>;
38
- static expireWebhookSigningSecret(id: number): Promise<any>;
39
- static revealWebhookSigningSecret(id: number): Promise<any>;
40
- static resendWebhookEndpointEvent(id: number): Promise<any>;
41
- static resendMultipleWebhookEndpointEvent(id: number): Promise<any>;
94
+ static getAllWebhookEndpointAttempts(id: number): Promise<SCWebhookEndpointAttemptType>;
95
+ static expireWebhookSigningSecret(id: number): Promise<SCWebhookEndpointType>;
96
+ static revealWebhookSigningSecret(id: number, password?: string): Promise<SCWebhookEndpointSecretType>;
97
+ static resendWebhookEndpointEvent(id: number, event: number): Promise<any>;
98
+ static resendMultipleWebhookEndpointEvent(id: number, event: number[]): Promise<any>;
42
99
  }
43
100
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../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AAM,GAAG,OAAO,CAAC,GAAG,CAAC;WAGnE,kCAAkC,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,GAAG,OAAO,CAAC,GAAG,CAAC;CAG3F"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Interface WebhookParamType
3
+ */
4
+ export interface WebhookParamType {
5
+ /**
6
+ * Active status
7
+ */
8
+ is_active?: boolean;
9
+ /**
10
+ * Webhook target
11
+ */
12
+ target: string;
13
+ /**
14
+ * Webhook description
15
+ */
16
+ description?: string;
17
+ /**
18
+ * Webhook events
19
+ */
20
+ events: WebhookEventsType[];
21
+ /**
22
+ * Webhook SSL certificates for HTTPS requests.
23
+ */
24
+ ssl_cert_verification?: boolean;
25
+ }
26
+ /**
27
+ * Interface WebhookEventsType
28
+ */
29
+ export interface WebhookEventsType {
30
+ type: string;
31
+ }
32
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/services/webhook/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;OAEG;IACH,MAAM,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;OAEG;IACH,MAAM,EAAE,iBAAiB,EAAE,CAAC;IAC5B;;OAEG;IACH,qBAAqB,CAAC,EAAE,OAAO,CAAC;CACjC;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,IAAI,EAAE,MAAM,CAAC;CACd"}
@@ -14,6 +14,14 @@ const Endpoints = {
14
14
  method: 'POST'
15
15
  },
16
16
 
17
+ /**
18
+ * Dynamic Preference Endpoints
19
+ */
20
+ Preferences: {
21
+ url: (0, _utils.urlReplacer)('/api/v2/dynamic_preference/'),
22
+ method: 'GET'
23
+ },
24
+
17
25
  /**
18
26
  * SSO Endpoints
19
27
  */
@@ -26,22 +34,6 @@ const Endpoints = {
26
34
  method: 'POST'
27
35
  },
28
36
 
29
- /**
30
- * Dynamic Preference Endpoints
31
- */
32
- Preferences: {
33
- url: (0, _utils.urlReplacer)('/api/v2/dynamic_preference/'),
34
- method: 'GET'
35
- },
36
- PreferencesSearch: {
37
- url: (0, _utils.urlReplacer)('/api/v2/dynamic_preference/search/'),
38
- method: 'GET'
39
- },
40
- SpecificPreference: {
41
- url: (0, _utils.urlReplacer)('/api/v2/dynamic_preference/$(id)/'),
42
- method: 'GET'
43
- },
44
-
45
37
  /**
46
38
  * Features Endpoints
47
39
  * */
package/lib/esm/index.js CHANGED
@@ -52,12 +52,6 @@ exports.DataPortabilityService = _data_portability.default;
52
52
  exports.DataPortabilityApiClient = _data_portability.DataPortabilityApiClient;
53
53
  exports.DataPortabilityApiClientInterface = _data_portability.DataPortabilityApiClientInterface;
54
54
 
55
- var _dynamic_preference = _interopRequireWildcard(require("./services/dynamic_preference"));
56
-
57
- exports.DynamicPreferenceService = _dynamic_preference.default;
58
- exports.DynamicPreferenceApiClient = _dynamic_preference.DynamicPreferenceApiClient;
59
- exports.DynamicPreferenceApiClientInterface = _dynamic_preference.DynamicPreferenceApiClientInterface;
60
-
61
55
  var _embed = _interopRequireWildcard(require("./services/embed"));
62
56
 
63
57
  exports.EmbedService = _embed.default;