@selfcommunity/api-services 0.1.5 → 0.1.6-alpha.2

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 (74) hide show
  1. package/lib/cjs/constants/Endpoints.js +8 -16
  2. package/lib/cjs/index.js +10 -6
  3. package/lib/cjs/services/webhook/index.js +122 -207
  4. package/lib/cjs/types/index.js +12 -0
  5. package/lib/cjs/types/paginatedResponse.js +3 -0
  6. package/lib/cjs/types/webhook.js +3 -0
  7. package/lib/cjs/utils/apiRequest.js +26 -0
  8. package/lib/esm/api-services/src/constants/Endpoints.d.ts.map +1 -1
  9. package/lib/esm/api-services/src/index.d.ts +6 -2
  10. package/lib/esm/api-services/src/index.d.ts.map +1 -1
  11. package/lib/esm/api-services/src/services/webhook/index.d.ts +89 -32
  12. package/lib/esm/api-services/src/services/webhook/index.d.ts.map +1 -1
  13. package/lib/esm/api-services/src/types/index.d.ts +4 -0
  14. package/lib/esm/api-services/src/types/index.d.ts.map +1 -0
  15. package/lib/esm/api-services/src/types/paginatedResponse.d.ts +10 -0
  16. package/lib/esm/api-services/src/types/paginatedResponse.d.ts.map +1 -0
  17. package/lib/esm/api-services/src/types/webhook.d.ts +32 -0
  18. package/lib/esm/api-services/src/types/webhook.d.ts.map +1 -0
  19. package/lib/esm/api-services/src/utils/apiRequest.d.ts +2 -0
  20. package/lib/esm/api-services/src/utils/apiRequest.d.ts.map +1 -0
  21. package/lib/esm/constants/Endpoints.js +8 -16
  22. package/lib/esm/index.js +10 -6
  23. package/lib/esm/services/webhook/index.js +122 -207
  24. package/lib/esm/types/index.js +12 -0
  25. package/lib/esm/types/paginatedResponse.js +3 -0
  26. package/lib/esm/types/src/index.d.ts +9 -0
  27. package/lib/esm/types/src/index.d.ts.map +1 -0
  28. package/lib/esm/types/src/types/auth.d.ts +26 -0
  29. package/lib/esm/types/src/types/auth.d.ts.map +1 -0
  30. package/lib/esm/types/src/types/broadcastMessage.d.ts +73 -0
  31. package/lib/esm/types/src/types/broadcastMessage.d.ts.map +1 -0
  32. package/lib/esm/types/src/types/category.d.ts +100 -0
  33. package/lib/esm/types/src/types/category.d.ts.map +1 -0
  34. package/lib/esm/types/src/types/comment.d.ts +97 -0
  35. package/lib/esm/types/src/types/comment.d.ts.map +1 -0
  36. package/lib/esm/types/src/types/customAdv.d.ts +53 -0
  37. package/lib/esm/types/src/types/customAdv.d.ts.map +1 -0
  38. package/lib/esm/types/src/types/customNotification.d.ts +28 -0
  39. package/lib/esm/types/src/types/customNotification.d.ts.map +1 -0
  40. package/lib/esm/types/src/types/embed.d.ts +33 -0
  41. package/lib/esm/types/src/types/embed.d.ts.map +1 -0
  42. package/lib/esm/types/src/types/feed.d.ts +208 -0
  43. package/lib/esm/types/src/types/feed.d.ts.map +1 -0
  44. package/lib/esm/types/src/types/incubator.d.ts +53 -0
  45. package/lib/esm/types/src/types/incubator.d.ts.map +1 -0
  46. package/lib/esm/types/src/types/index.d.ts +23 -0
  47. package/lib/esm/types/src/types/index.d.ts.map +1 -0
  48. package/lib/esm/types/src/types/location.d.ts +61 -0
  49. package/lib/esm/types/src/types/location.d.ts.map +1 -0
  50. package/lib/esm/types/src/types/media.d.ts +52 -0
  51. package/lib/esm/types/src/types/media.d.ts.map +1 -0
  52. package/lib/esm/types/src/types/notification.d.ts +416 -0
  53. package/lib/esm/types/src/types/notification.d.ts.map +1 -0
  54. package/lib/esm/types/src/types/poll.d.ts +77 -0
  55. package/lib/esm/types/src/types/poll.d.ts.map +1 -0
  56. package/lib/esm/types/src/types/privateMessage.d.ts +109 -0
  57. package/lib/esm/types/src/types/privateMessage.d.ts.map +1 -0
  58. package/lib/esm/types/src/types/prize.d.ts +48 -0
  59. package/lib/esm/types/src/types/prize.d.ts.map +1 -0
  60. package/lib/esm/types/src/types/tag.d.ts +47 -0
  61. package/lib/esm/types/src/types/tag.d.ts.map +1 -0
  62. package/lib/esm/types/src/types/user.d.ts +231 -0
  63. package/lib/esm/types/src/types/user.d.ts.map +1 -0
  64. package/lib/esm/types/src/types/webhook.d.ts +91 -0
  65. package/lib/esm/types/src/types/webhook.d.ts.map +1 -0
  66. package/lib/esm/types/webhook.js +3 -0
  67. package/lib/esm/utils/apiRequest.js +26 -0
  68. package/lib/umd/api-services.js +1 -1
  69. package/lib/umd/api-services.js.map +1 -1
  70. package/package.json +4 -4
  71. package/lib/cjs/services/dynamic_preference/index.js +0 -85
  72. package/lib/esm/api-services/src/services/dynamic_preference/index.d.ts +0 -16
  73. package/lib/esm/api-services/src/services/dynamic_preference/index.d.ts.map +0 -1
  74. package/lib/esm/services/dynamic_preference/index.js +0 -85
@@ -3,232 +3,147 @@
3
3
  exports.__esModule = true;
4
4
  exports.default = exports.WebhookApiClient = void 0;
5
5
 
6
- var _client = _interopRequireDefault(require("../../client"));
7
-
8
6
  var _Endpoints = _interopRequireDefault(require("../../constants/Endpoints"));
9
7
 
8
+ var _apiRequest = require("../../utils/apiRequest");
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
- return _client.default.request({
15
- url: _Endpoints.default.WebhookEndpointsList.url({}),
16
- method: _Endpoints.default.WebhookEndpointsList.method
17
- }).then(res => {
18
- if (res.status >= 300) {
19
- console.log(`Unable to retrieve webhook endpoints (Response code: ${res.status}).`);
20
- return Promise.reject(res);
21
- }
22
-
23
- return Promise.resolve(res);
24
- }).catch(error => {
25
- console.log('Unable to retrieve endpoints.');
26
- return Promise.reject(error);
27
- });
20
+ return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookEndpointsList.url({}), _Endpoints.default.WebhookEndpointsList.method);
28
21
  }
22
+ /**
23
+ * This endpoint retrieves webhook events that can be enabled in the endpoint.
24
+ */
25
+
29
26
 
30
27
  static getAllWebhookEvents() {
31
- return _client.default.request({
32
- url: _Endpoints.default.WebhookEventsList.url({}),
33
- method: _Endpoints.default.WebhookEventsList.method
34
- }).then(res => {
35
- if (res.status >= 300) {
36
- console.log(`Unable to retrieve webhook endpoints events (Response code: ${res.status}).`);
37
- return Promise.reject(res);
38
- }
39
-
40
- return Promise.resolve(res);
41
- }).catch(error => {
42
- console.log('Unable to retrieve endpoints events.');
43
- return Promise.reject(error);
44
- });
28
+ return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookEventsList.url({}), _Endpoints.default.WebhookEventsList.method);
45
29
  }
30
+ /**
31
+ * This endpoint creates a webhook endpoint and connects it to the given webhook events.
32
+ * @param data
33
+ */
46
34
 
47
- static createWebhookEndpoint() {
48
- return _client.default.request({
49
- url: _Endpoints.default.WebhookCreate.url({}),
50
- method: _Endpoints.default.WebhookCreate.method
51
- }).then(res => {
52
- if (res.status >= 300) {
53
- console.log(`Unable to perform action (Response code: ${res.status}).`);
54
- return Promise.reject(res);
55
- }
56
-
57
- return Promise.resolve(res.data);
58
- }).catch(error => {
59
- console.log('Unable to perform action.');
60
- return Promise.reject(error);
61
- });
35
+
36
+ static createWebhookEndpoint(data) {
37
+ return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookCreate.url({}), _Endpoints.default.WebhookCreate.method, data);
62
38
  }
39
+ /**
40
+ * This endpoint retrieves a specific webhook endpoint using ID.
41
+ * @param id
42
+ */
43
+
63
44
 
64
45
  static getASpecificWebhookEndpoint(id) {
65
- return _client.default.request({
66
- url: _Endpoints.default.GetSpecificWebhook.url({
67
- id
68
- }),
69
- method: _Endpoints.default.GetSpecificWebhook.method
70
- }).then(res => {
71
- if (res.status >= 300) {
72
- console.log(`Unable to retrieve webhook (Response code: ${res.status}).`);
73
- return Promise.reject(res);
74
- }
75
-
76
- return Promise.resolve(res.data);
77
- }).catch(error => {
78
- console.log('Unable to retrieve webhook.');
79
- return Promise.reject(error);
80
- });
46
+ return (0, _apiRequest.apiRequest)(_Endpoints.default.GetSpecificWebhook.url({
47
+ id
48
+ }), _Endpoints.default.GetSpecificWebhook.method);
81
49
  }
50
+ /**
51
+ * This endpoint updates a specific webhook endpoint.
52
+ * @param id
53
+ * @param params
54
+ */
82
55
 
83
- static updateASpecificWebhookEndpoint(id) {
84
- return _client.default.request({
85
- url: _Endpoints.default.WebhookUpdate.url({
86
- id
87
- }),
88
- method: _Endpoints.default.WebhookUpdate.method
89
- }).then(res => {
90
- if (res.status >= 300) {
91
- console.log(`Unable to perform action (Response code: ${res.status}).`);
92
- return Promise.reject(res);
93
- }
94
-
95
- return Promise.resolve(res.data);
96
- }).catch(error => {
97
- console.log('Unable to perform action.');
98
- return Promise.reject(error);
99
- });
56
+
57
+ static updateASpecificWebhookEndpoint(id, params) {
58
+ return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookUpdate.url({
59
+ id
60
+ }), _Endpoints.default.WebhookUpdate.method, params);
100
61
  }
62
+ /**
63
+ * This endpoint updates a specific field for a specific webhook endpoint.
64
+ * @param id
65
+ * @param params
66
+ */
101
67
 
102
- static updateASingleWebhookEndpointField(id) {
103
- return _client.default.request({
104
- url: _Endpoints.default.WebhookPatch.url({
105
- id
106
- }),
107
- method: _Endpoints.default.WebhookPatch.method
108
- }).then(res => {
109
- if (res.status >= 300) {
110
- console.log(`Unable to perform action (Response code: ${res.status}).`);
111
- return Promise.reject(res);
112
- }
113
-
114
- return Promise.resolve(res.data);
115
- }).catch(error => {
116
- console.log('Unable to perform action.');
117
- return Promise.reject(error);
118
- });
68
+
69
+ static updateASingleWebhookEndpointField(id, params) {
70
+ return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookPatch.url({
71
+ id
72
+ }), _Endpoints.default.WebhookPatch.method, params);
119
73
  }
74
+ /**
75
+ * This endpoint deletes a Webhook Endpoint.
76
+ * @param id
77
+ */
78
+
120
79
 
121
80
  static deleteWebhookEndpoint(id) {
122
- return _client.default.request({
123
- url: _Endpoints.default.WebhookDelete.url({
124
- id
125
- }),
126
- method: _Endpoints.default.WebhookDelete.method
127
- }).then(res => {
128
- if (res.status >= 300) {
129
- console.log(`Unable to perform action (Response code: ${res.status}).`);
130
- return Promise.reject(res);
131
- }
132
-
133
- return Promise.resolve(res.data);
134
- }).catch(error => {
135
- console.log('Unable to perform action.');
136
- return Promise.reject(error);
137
- });
81
+ return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookDelete.url({
82
+ id
83
+ }), _Endpoints.default.WebhookDelete.method);
138
84
  }
85
+ /**
86
+ * This endpoint retrieves the attempts related to this endpoint.
87
+ * @param id
88
+ */
89
+
139
90
 
140
91
  static getAllWebhookEndpointAttempts(id) {
141
- return _client.default.request({
142
- url: _Endpoints.default.WebhookEndpointAttempts.url({
143
- id
144
- }),
145
- method: _Endpoints.default.WebhookEndpointAttempts.method
146
- }).then(res => {
147
- if (res.status >= 300) {
148
- console.log(`Unable to retrieve webhook endpoint attempts (Response code: ${res.status}).`);
149
- return Promise.reject(res);
150
- }
151
-
152
- return Promise.resolve(res.data);
153
- }).catch(error => {
154
- console.log('Unable to retrieve webhook endpoint attempts.');
155
- return Promise.reject(error);
156
- });
92
+ return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookEndpointAttempts.url({
93
+ id
94
+ }), _Endpoints.default.WebhookEndpointAttempts.method);
157
95
  }
96
+ /**
97
+ * This endpoint expires the secret associated with this endpoint.
98
+ * @param id
99
+ */
158
100
 
159
- static expireWebhookSigningSecret(id) {
160
- return _client.default.request({
161
- url: _Endpoints.default.WebhookExpireSigningSecret.url({
162
- id
163
- }),
164
- method: _Endpoints.default.WebhookExpireSigningSecret.method
165
- }).then(res => {
166
- if (res.status >= 300) {
167
- console.log(`Unable to perform action (Response code: ${res.status}).`);
168
- return Promise.reject(res);
169
- }
170
-
171
- return Promise.resolve(res.data);
172
- }).catch(error => {
173
- console.log('Unable to perform action.');
174
- return Promise.reject(error);
175
- });
176
- }
177
101
 
178
- static revealWebhookSigningSecret(id) {
179
- return _client.default.request({
180
- url: _Endpoints.default.WebhookRevealSigningSecret.url({
181
- id
182
- }),
183
- method: _Endpoints.default.WebhookRevealSigningSecret.method
184
- }).then(res => {
185
- if (res.status >= 300) {
186
- console.log(`Unable to perform action(Response code: ${res.status}).`);
187
- return Promise.reject(res);
188
- }
189
-
190
- return Promise.resolve(res.data);
191
- }).catch(error => {
192
- console.log('Unable to perform action.');
193
- return Promise.reject(error);
102
+ static expireWebhookSigningSecret(id) {
103
+ return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookExpireSigningSecret.url({
104
+ id
105
+ }), _Endpoints.default.WebhookExpireSigningSecret.method);
106
+ }
107
+ /**
108
+ * This endpoint reveals the secret associated with this endpoint.
109
+ * @param id
110
+ * @param password
111
+ */
112
+
113
+
114
+ static revealWebhookSigningSecret(id, password) {
115
+ return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookRevealSigningSecret.url({
116
+ id
117
+ }), _Endpoints.default.WebhookRevealSigningSecret.method, password ? {
118
+ password: password
119
+ } : null);
120
+ }
121
+ /**
122
+ * This endpoint resends the event specified as parameter to the endpoint specified by the id parameter.
123
+ * @param id
124
+ * @param event
125
+ */
126
+
127
+
128
+ static resendWebhookEndpointEvent(id, event) {
129
+ return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookResendEndpointEvent.url({
130
+ id
131
+ }), _Endpoints.default.WebhookResendEndpointEvent.method, {
132
+ event: event
194
133
  });
195
134
  }
135
+ /**
136
+ * This endpoint resends the events specified as parameters to the endpoint specified by the id parameter.
137
+ * @param id
138
+ * @param event
139
+ */
196
140
 
197
- static resendWebhookEndpointEvent(id) {
198
- return _client.default.request({
199
- url: _Endpoints.default.WebhookResendEndpointEvent.url({
200
- id
201
- }),
202
- method: _Endpoints.default.WebhookResendEndpointEvent.method
203
- }).then(res => {
204
- if (res.status >= 300) {
205
- console.log(`Unable to perform action (Response code: ${res.status}).`);
206
- return Promise.reject(res);
207
- }
208
-
209
- return Promise.resolve(res.data);
210
- }).catch(error => {
211
- console.log('Unable to perform action.');
212
- return Promise.reject(error);
213
- });
214
- }
215
141
 
216
- static resendMultipleWebhookEndpointEvent(id) {
217
- return _client.default.request({
218
- url: _Endpoints.default.WebhookResendMultipleEndpointEvent.url({
219
- id
220
- }),
221
- method: _Endpoints.default.WebhookResendMultipleEndpointEvent.method
222
- }).then(res => {
223
- if (res.status >= 300) {
224
- console.log(`Unable to perform action (Response code: ${res.status}).`);
225
- return Promise.reject(res);
226
- }
227
-
228
- return Promise.resolve(res.data);
229
- }).catch(error => {
230
- console.log('Unable to perform action.');
231
- return Promise.reject(error);
142
+ static resendMultipleWebhookEndpointEvent(id, event) {
143
+ return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookResendMultipleEndpointEvent.url({
144
+ id
145
+ }), _Endpoints.default.WebhookResendMultipleEndpointEvent.method, {
146
+ event: event
232
147
  });
233
148
  }
234
149
 
@@ -245,20 +160,20 @@ class WebhookService {
245
160
  return WebhookApiClient.getAllWebhookEvents();
246
161
  }
247
162
 
248
- static async createWebhookEndpoint() {
249
- return WebhookApiClient.createWebhookEndpoint();
163
+ static async createWebhookEndpoint(params) {
164
+ return WebhookApiClient.createWebhookEndpoint(params);
250
165
  }
251
166
 
252
167
  static async getASpecificWebhookEndpoint(id) {
253
168
  return WebhookApiClient.getASpecificWebhookEndpoint(id);
254
169
  }
255
170
 
256
- static async updateASpecificWebhookEndpoint(id) {
257
- return WebhookApiClient.updateASpecificWebhookEndpoint(id);
171
+ static async updateASpecificWebhookEndpoint(id, params) {
172
+ return WebhookApiClient.updateASpecificWebhookEndpoint(id, params);
258
173
  }
259
174
 
260
- static async updateASingleWebhookEndpointField(id) {
261
- return WebhookApiClient.updateASingleWebhookEndpointField(id);
175
+ static async updateASingleWebhookEndpointField(id, params) {
176
+ return WebhookApiClient.updateASingleWebhookEndpointField(id, params);
262
177
  }
263
178
 
264
179
  static async deleteWebhookEndpoint(id) {
@@ -273,16 +188,16 @@ class WebhookService {
273
188
  return WebhookApiClient.expireWebhookSigningSecret(id);
274
189
  }
275
190
 
276
- static async revealWebhookSigningSecret(id) {
277
- return WebhookApiClient.revealWebhookSigningSecret(id);
191
+ static async revealWebhookSigningSecret(id, password) {
192
+ return WebhookApiClient.revealWebhookSigningSecret(id, password);
278
193
  }
279
194
 
280
- static async resendWebhookEndpointEvent(id) {
281
- return WebhookApiClient.resendWebhookEndpointEvent(id);
195
+ static async resendWebhookEndpointEvent(id, event) {
196
+ return WebhookApiClient.resendWebhookEndpointEvent(id, event);
282
197
  }
283
198
 
284
- static async resendMultipleWebhookEndpointEvent(id) {
285
- return WebhookApiClient.resendMultipleWebhookEndpointEvent(id);
199
+ static async resendMultipleWebhookEndpointEvent(id, event) {
200
+ return WebhookApiClient.resendMultipleWebhookEndpointEvent(id, event);
286
201
  }
287
202
 
288
203
  }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
4
+
5
+ var _paginatedResponse = require("./paginatedResponse");
6
+
7
+ exports.SCPaginatedResponse = _paginatedResponse.SCPaginatedResponse;
8
+
9
+ var _webhook = require("./webhook");
10
+
11
+ exports.WebhookParamType = _webhook.WebhookParamType;
12
+ exports.WebhookEventsType = _webhook.WebhookEventsType;
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+
3
+ exports.__esModule = true;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Types
3
+ */
4
+ import { SCBroadcastMessageBannerType, SCBannerType, SCBroadcastMessageType, SCAuthTokenType, SCCustomAdvPosition, SCCustomAdvType, SCUserFields, SCUserType, SCUserSettingsType, SCUserStatus, SCUserBlockedSettingsType, SCTagType, SCCategoryType, SCEmbedType, SCMediaType, SCContributionLocation, SCLocalityType, SCPollChoiceType, SCPollType, SCFeedUnitType, SCFeedUnitActivityType, SCFeedObjectType, SCFeedPostType, SCFeedDiscussionType, SCFeedStatusType, SCFeedObjectTypologyType, SCFeedUnitActivityTypologyType, SCFeedTypologyType, SCCommentTypologyType, SCCommentsOrderBy, SCCommentType, SCPrivateMessageType, SCPrivateMessageStatusType, SCPrivateMessageFileType, SCMessageFileType, SCNotificationTypologyType, SCNotificationAggregatedType, SCNotificationCommentType, SCNotificationConnectionAcceptType, SCNotificationConnectionRequestType, SCNotificationPrivateMessageType, SCNotificationMentionType, SCNotificationType, SCNotificationBlockedUserType, SCNotificationCollapsedForType, SCNotificationCustomNotificationType, SCNotificationDeletedForType, SCNotificationFollowType, SCNotificationKindlyNoticeType, SCNotificationUnBlockedUserType, SCNotificationUnDeletedForType, SCNotificationUserFollowType, SCNotificationVoteUpType, SCCustomNotificationType, SCIncubatorType, SCNotificationIncubatorType, SCNotificationTopicType, SCPrizeType, SCWebhookEndpointType, SCWebhookEndpointAttemptType, SCWebhookEndpointSecretType, SCWebhookEventsType } from './types';
5
+ /**
6
+ * List all exports
7
+ */
8
+ export { SCBroadcastMessageBannerType, SCBannerType, SCBroadcastMessageType, SCCustomAdvPosition, SCCustomAdvType, SCAuthTokenType, SCUserFields, SCUserType, SCUserSettingsType, SCUserStatus, SCUserBlockedSettingsType, SCTagType, SCCategoryType, SCEmbedType, SCMediaType, SCContributionLocation, SCLocalityType, SCPollChoiceType, SCPollType, SCFeedUnitType, SCFeedUnitActivityType, SCFeedObjectType, SCFeedPostType, SCFeedDiscussionType, SCFeedStatusType, SCFeedObjectTypologyType, SCFeedUnitActivityTypologyType, SCFeedTypologyType, SCCommentTypologyType, SCCommentsOrderBy, SCCommentType, SCPrivateMessageType, SCPrivateMessageStatusType, SCPrivateMessageFileType, SCMessageFileType, SCNotificationTypologyType, SCNotificationAggregatedType, SCNotificationCommentType, SCNotificationConnectionAcceptType, SCNotificationConnectionRequestType, SCNotificationPrivateMessageType, SCNotificationMentionType, SCNotificationType, SCNotificationBlockedUserType, SCNotificationCollapsedForType, SCNotificationCustomNotificationType, SCNotificationDeletedForType, SCNotificationFollowType, SCNotificationKindlyNoticeType, SCNotificationUnBlockedUserType, SCNotificationUnDeletedForType, SCNotificationUserFollowType, SCNotificationVoteUpType, SCCustomNotificationType, SCNotificationTopicType, SCIncubatorType, SCNotificationIncubatorType, SCPrizeType, SCWebhookEndpointType, SCWebhookEndpointAttemptType, SCWebhookEndpointSecretType, SCWebhookEventsType };
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../types/src/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,OAAO,EACL,4BAA4B,EAC5B,YAAY,EACZ,sBAAsB,EACtB,eAAe,EACf,mBAAmB,EACnB,eAAe,EACf,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,yBAAyB,EACzB,SAAS,EACT,cAAc,EACd,WAAW,EACX,WAAW,EACX,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,wBAAwB,EACxB,8BAA8B,EAC9B,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,EACxB,iBAAiB,EACjB,0BAA0B,EAC1B,4BAA4B,EAC5B,yBAAyB,EACzB,kCAAkC,EAClC,mCAAmC,EACnC,gCAAgC,EAChC,yBAAyB,EACzB,kBAAkB,EAClB,6BAA6B,EAC7B,8BAA8B,EAC9B,oCAAoC,EACpC,4BAA4B,EAC5B,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,8BAA8B,EAC9B,4BAA4B,EAC5B,wBAAwB,EACxB,wBAAwB,EACxB,eAAe,EACf,2BAA2B,EAC3B,uBAAuB,EACvB,WAAW,EACX,qBAAqB,EACrB,4BAA4B,EAC5B,2BAA2B,EAC3B,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB;;GAEG;AACH,OAAO,EACL,4BAA4B,EAC5B,YAAY,EACZ,sBAAsB,EACtB,mBAAmB,EACnB,eAAe,EACf,eAAe,EACf,YAAY,EACZ,UAAU,EACV,kBAAkB,EAClB,YAAY,EACZ,yBAAyB,EACzB,SAAS,EACT,cAAc,EACd,WAAW,EACX,WAAW,EACX,sBAAsB,EACtB,cAAc,EACd,gBAAgB,EAChB,UAAU,EACV,cAAc,EACd,sBAAsB,EACtB,gBAAgB,EAChB,cAAc,EACd,oBAAoB,EACpB,gBAAgB,EAChB,wBAAwB,EACxB,8BAA8B,EAC9B,kBAAkB,EAClB,qBAAqB,EACrB,iBAAiB,EACjB,aAAa,EACb,oBAAoB,EACpB,0BAA0B,EAC1B,wBAAwB,EACxB,iBAAiB,EACjB,0BAA0B,EAC1B,4BAA4B,EAC5B,yBAAyB,EACzB,kCAAkC,EAClC,mCAAmC,EACnC,gCAAgC,EAChC,yBAAyB,EACzB,kBAAkB,EAClB,6BAA6B,EAC7B,8BAA8B,EAC9B,oCAAoC,EACpC,4BAA4B,EAC5B,wBAAwB,EACxB,8BAA8B,EAC9B,+BAA+B,EAC/B,8BAA8B,EAC9B,4BAA4B,EAC5B,wBAAwB,EACxB,wBAAwB,EACxB,uBAAuB,EACvB,eAAe,EACf,2BAA2B,EAC3B,WAAW,EACX,qBAAqB,EACrB,4BAA4B,EAC5B,2BAA2B,EAC3B,mBAAmB,EACpB,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Interface SCAuthTokenType
3
+ */
4
+ export interface SCAuthTokenType {
5
+ /**
6
+ * Access token.
7
+ */
8
+ accessToken: string;
9
+ /**
10
+ * Refresh token.
11
+ */
12
+ refreshToken?: string;
13
+ /**
14
+ * Token Type.
15
+ */
16
+ tokenType?: string;
17
+ /**
18
+ * Expire in.
19
+ */
20
+ expiresIn?: number;
21
+ /**
22
+ * Token scopes;
23
+ */
24
+ scope?: Array<string>;
25
+ }
26
+ //# sourceMappingURL=auth.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../../../types/src/types/auth.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,MAAM,WAAW,eAAe;IAC9B;;OAEG;IACH,WAAW,EAAE,MAAM,CAAC;IAEpB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,KAAK,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAC;CACvB"}
@@ -0,0 +1,73 @@
1
+ /**
2
+ * Define the various types of banners
3
+ */
4
+ export declare enum SCBroadcastMessageBannerType {
5
+ HTML = "html_banner",
6
+ NOTIFICATION = "notification_banner"
7
+ }
8
+ export interface SCBannerType {
9
+ /**
10
+ * The type of the banner, based on it the behaviour of the render component must be different
11
+ */
12
+ type_banner: SCBroadcastMessageBannerType;
13
+ /**
14
+ * The html to insert into the DOM
15
+ * This field is used when type_banner is html_banner
16
+ */
17
+ html?: string;
18
+ /**
19
+ * The title of the banner
20
+ */
21
+ title?: string;
22
+ /**
23
+ * The text of the banner
24
+ */
25
+ body_text?: string;
26
+ /**
27
+ * The text of the link associated to the banner
28
+ */
29
+ link_text?: string;
30
+ /**
31
+ * The action link of the banner
32
+ */
33
+ link?: string;
34
+ /**
35
+ * The image url to insert into the banner
36
+ */
37
+ image?: string;
38
+ /**
39
+ * The date the Banner was created
40
+ */
41
+ added_at: Date;
42
+ /**
43
+ * If true tell to open the banner in new tab
44
+ */
45
+ open_in_new_tab: boolean;
46
+ }
47
+ /**
48
+ * Interface SCBroadcastMessageType.
49
+ * Broadcast Message object
50
+ */
51
+ export interface SCBroadcastMessageType {
52
+ /**
53
+ * The ID of the category.
54
+ */
55
+ id: number;
56
+ /**
57
+ * The Banner associated to the Broadcast messages
58
+ */
59
+ banner: SCBannerType;
60
+ /**
61
+ * The date the BroadcastMessage was added
62
+ */
63
+ added_at: Date;
64
+ /**
65
+ * The date the BroadcastMessage was disposed
66
+ */
67
+ disposed_at: Date | null;
68
+ /**
69
+ * The date the BroadcastMessage was viewed the first time
70
+ */
71
+ viewed_at: Date | null;
72
+ }
73
+ //# sourceMappingURL=broadcastMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"broadcastMessage.d.ts","sourceRoot":"","sources":["../../../../../../types/src/types/broadcastMessage.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,oBAAY,4BAA4B;IACtC,IAAI,gBAAgB;IACpB,YAAY,wBAAwB;CACrC;AAED,MAAM,WAAW,YAAY;IAC3B;;OAEG;IACH,WAAW,EAAE,4BAA4B,CAAC;IAE1C;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;OAEG;IACH,QAAQ,EAAE,IAAI,CAAC;IACf;;OAEG;IACH,eAAe,EAAE,OAAO,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,MAAM,EAAE,YAAY,CAAC;IAErB;;OAEG;IACH,QAAQ,EAAE,IAAI,CAAC;IAEf;;OAEG;IACH,WAAW,EAAE,IAAI,GAAG,IAAI,CAAC;IAEzB;;OAEG;IACH,SAAS,EAAE,IAAI,GAAG,IAAI,CAAC;CACxB"}
@@ -0,0 +1,100 @@
1
+ import { SCTagType } from './tag';
2
+ /**
3
+ * Interface SCCategoryType.
4
+ * Category Schema.
5
+ */
6
+ export interface SCCategoryType {
7
+ /**
8
+ * The ID of the category.
9
+ */
10
+ id: number;
11
+ /**
12
+ * The manual ordering number of the category.
13
+ */
14
+ order?: number;
15
+ /**
16
+ * The name of the category.
17
+ */
18
+ name: string;
19
+ /**
20
+ * The synonyms/aliases of the category.
21
+ */
22
+ name_synonyms?: string;
23
+ /**
24
+ * The slug of the category.
25
+ */
26
+ slug?: string;
27
+ /**
28
+ * The slogan of the category.
29
+ */
30
+ slogan?: string;
31
+ /**
32
+ * The category's html text.
33
+ */
34
+ html_info?: string;
35
+ /**
36
+ * The category's html meta tag.
37
+ */
38
+ seo_title?: string;
39
+ /**
40
+ * The description for category's html meta tag.
41
+ */
42
+ seo_description?: string;
43
+ /**
44
+ * The category's auto follow behaviour.
45
+ */
46
+ auto_follow?: string;
47
+ /**
48
+ * The category status.
49
+ */
50
+ active?: boolean;
51
+ /**
52
+ * The category status.
53
+ */
54
+ deleted?: boolean;
55
+ /**
56
+ * The category's image with min size.
57
+ */
58
+ image_original?: string;
59
+ /**
60
+ * The category's auto generated bigger size.
61
+ */
62
+ image_bigger?: string;
63
+ /**
64
+ * The category's auto generated big size.
65
+ */
66
+ image_big?: string;
67
+ /**
68
+ * The category's auto generated medium size.
69
+ */
70
+ image_medium?: string;
71
+ /**
72
+ * The category's auto generated small size.
73
+ */
74
+ image_small?: string;
75
+ /**
76
+ * The landscape format image for category hub.
77
+ */
78
+ emotional_image_original?: string;
79
+ /**
80
+ * The css background-position.
81
+ */
82
+ emotional_image_position?: number;
83
+ /**
84
+ * The last modify (datetime)
85
+ */
86
+ lastmod_datetime?: string;
87
+ /**
88
+ * The order of the category feed.
89
+ */
90
+ stream_order_by?: string;
91
+ /**
92
+ * The category's tags.
93
+ */
94
+ tags?: Array<SCTagType>;
95
+ /**
96
+ * Followers counter for the category.
97
+ */
98
+ followers_counter?: number;
99
+ }
100
+ //# sourceMappingURL=category.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"category.d.ts","sourceRoot":"","sources":["../../../../../../types/src/types/category.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAEhC;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,aAAa,CAAC,EAAE,MAAM,CAAC;IAEvB;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;OAEG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;IAEhB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IAEjB;;OAEG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IAExB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IAEtB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IAErB;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;OAEG;IACH,wBAAwB,CAAC,EAAE,MAAM,CAAC;IAElC;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAE1B;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IAEzB;;OAEG;IACH,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,CAAC;IACxB;;OAEG;IACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B"}