@selfcommunity/api-services 0.1.6-alpha.1 → 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.
- package/lib/cjs/index.js +10 -0
- package/lib/cjs/services/webhook/index.js +38 -206
- package/lib/cjs/types/index.js +12 -0
- package/lib/cjs/{services/webhook/types.js → types/paginatedResponse.js} +0 -0
- package/lib/{esm/services/webhook/types.js → cjs/types/webhook.js} +0 -0
- package/lib/cjs/utils/apiRequest.js +26 -0
- package/lib/esm/api-services/src/index.d.ts +6 -1
- package/lib/esm/api-services/src/index.d.ts.map +1 -1
- package/lib/esm/api-services/src/services/webhook/index.d.ts +13 -13
- package/lib/esm/api-services/src/services/webhook/index.d.ts.map +1 -1
- package/lib/esm/api-services/src/types/index.d.ts +4 -0
- package/lib/esm/api-services/src/types/index.d.ts.map +1 -0
- package/lib/esm/api-services/src/types/paginatedResponse.d.ts +10 -0
- package/lib/esm/api-services/src/types/paginatedResponse.d.ts.map +1 -0
- package/lib/esm/api-services/src/{services/webhook/types.d.ts → types/webhook.d.ts} +1 -1
- package/lib/esm/api-services/src/types/webhook.d.ts.map +1 -0
- package/lib/esm/api-services/src/utils/apiRequest.d.ts +2 -0
- package/lib/esm/api-services/src/utils/apiRequest.d.ts.map +1 -0
- package/lib/esm/index.js +10 -0
- package/lib/esm/services/webhook/index.js +38 -206
- package/lib/esm/types/index.js +12 -0
- package/lib/esm/types/paginatedResponse.js +3 -0
- package/lib/esm/types/webhook.js +3 -0
- package/lib/esm/utils/apiRequest.js +26 -0
- package/lib/umd/api-services.js +1 -1
- package/lib/umd/api-services.js.map +1 -1
- package/package.json +4 -4
- package/lib/esm/api-services/src/services/webhook/types.d.ts.map +0 -1
package/lib/cjs/index.js
CHANGED
|
@@ -22,6 +22,10 @@ var _token = require("./utils/token");
|
|
|
22
22
|
exports.generateJWTToken = _token.generateJWTToken;
|
|
23
23
|
exports.parseJwt = _token.parseJwt;
|
|
24
24
|
|
|
25
|
+
var _apiRequest = require("./utils/apiRequest");
|
|
26
|
+
|
|
27
|
+
exports.apiRequest = _apiRequest.apiRequest;
|
|
28
|
+
|
|
25
29
|
var _category = _interopRequireWildcard(require("./services/category"));
|
|
26
30
|
|
|
27
31
|
exports.CategoryService = _category.default;
|
|
@@ -172,6 +176,12 @@ exports.WebhookService = _webhook.default;
|
|
|
172
176
|
exports.WebhookApiClient = _webhook.WebhookApiClient;
|
|
173
177
|
exports.WebhookApiClientInterface = _webhook.WebhookApiClientInterface;
|
|
174
178
|
|
|
179
|
+
var _types = require("./types");
|
|
180
|
+
|
|
181
|
+
exports.SCPaginatedResponse = _types.SCPaginatedResponse;
|
|
182
|
+
exports.WebhookParamType = _types.WebhookParamType;
|
|
183
|
+
exports.WebhookEventsType = _types.WebhookEventsType;
|
|
184
|
+
|
|
175
185
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
176
186
|
|
|
177
187
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
@@ -3,10 +3,10 @@
|
|
|
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
12
|
/**
|
|
@@ -17,20 +17,7 @@ class WebhookApiClient {
|
|
|
17
17
|
* This endpoint retrieves all webhook endpoints
|
|
18
18
|
*/
|
|
19
19
|
static getAllWebhookEndpoints() {
|
|
20
|
-
return
|
|
21
|
-
url: _Endpoints.default.WebhookEndpointsList.url({}),
|
|
22
|
-
method: _Endpoints.default.WebhookEndpointsList.method
|
|
23
|
-
}).then(res => {
|
|
24
|
-
if (res.status >= 300) {
|
|
25
|
-
console.log(`Unable to retrieve webhook endpoints (Response code: ${res.status}).`);
|
|
26
|
-
return Promise.reject(res);
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
return Promise.resolve(res);
|
|
30
|
-
}).catch(error => {
|
|
31
|
-
console.log('Unable to retrieve endpoints.');
|
|
32
|
-
return Promise.reject(error);
|
|
33
|
-
});
|
|
20
|
+
return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookEndpointsList.url({}), _Endpoints.default.WebhookEndpointsList.method);
|
|
34
21
|
}
|
|
35
22
|
/**
|
|
36
23
|
* This endpoint retrieves webhook events that can be enabled in the endpoint.
|
|
@@ -38,45 +25,16 @@ class WebhookApiClient {
|
|
|
38
25
|
|
|
39
26
|
|
|
40
27
|
static getAllWebhookEvents() {
|
|
41
|
-
return
|
|
42
|
-
url: _Endpoints.default.WebhookEventsList.url({}),
|
|
43
|
-
method: _Endpoints.default.WebhookEventsList.method
|
|
44
|
-
}).then(res => {
|
|
45
|
-
if (res.status >= 300) {
|
|
46
|
-
console.log(`Unable to retrieve webhook endpoints events (Response code: ${res.status}).`);
|
|
47
|
-
return Promise.reject(res);
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return Promise.resolve(res);
|
|
51
|
-
}).catch(error => {
|
|
52
|
-
console.log('Unable to retrieve endpoints events.');
|
|
53
|
-
return Promise.reject(error);
|
|
54
|
-
});
|
|
28
|
+
return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookEventsList.url({}), _Endpoints.default.WebhookEventsList.method);
|
|
55
29
|
}
|
|
56
30
|
/**
|
|
57
31
|
* This endpoint creates a webhook endpoint and connects it to the given webhook events.
|
|
58
|
-
* @param
|
|
32
|
+
* @param data
|
|
59
33
|
*/
|
|
60
34
|
|
|
61
35
|
|
|
62
|
-
static createWebhookEndpoint(
|
|
63
|
-
return
|
|
64
|
-
url: _Endpoints.default.WebhookCreate.url({}),
|
|
65
|
-
method: _Endpoints.default.WebhookCreate.method,
|
|
66
|
-
data: {
|
|
67
|
-
params
|
|
68
|
-
}
|
|
69
|
-
}).then(res => {
|
|
70
|
-
if (res.status >= 300) {
|
|
71
|
-
console.log(`Unable to perform action (Response code: ${res.status}).`);
|
|
72
|
-
return Promise.reject(res);
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
return Promise.resolve(res.data);
|
|
76
|
-
}).catch(error => {
|
|
77
|
-
console.log('Unable to perform action.');
|
|
78
|
-
return Promise.reject(error);
|
|
79
|
-
});
|
|
36
|
+
static createWebhookEndpoint(data) {
|
|
37
|
+
return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookCreate.url({}), _Endpoints.default.WebhookCreate.method, data);
|
|
80
38
|
}
|
|
81
39
|
/**
|
|
82
40
|
* This endpoint retrieves a specific webhook endpoint using ID.
|
|
@@ -85,22 +43,9 @@ class WebhookApiClient {
|
|
|
85
43
|
|
|
86
44
|
|
|
87
45
|
static getASpecificWebhookEndpoint(id) {
|
|
88
|
-
return
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
}),
|
|
92
|
-
method: _Endpoints.default.GetSpecificWebhook.method
|
|
93
|
-
}).then(res => {
|
|
94
|
-
if (res.status >= 300) {
|
|
95
|
-
console.log(`Unable to retrieve webhook (Response code: ${res.status}).`);
|
|
96
|
-
return Promise.reject(res);
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
return Promise.resolve(res.data);
|
|
100
|
-
}).catch(error => {
|
|
101
|
-
console.log('Unable to retrieve webhook.');
|
|
102
|
-
return Promise.reject(error);
|
|
103
|
-
});
|
|
46
|
+
return (0, _apiRequest.apiRequest)(_Endpoints.default.GetSpecificWebhook.url({
|
|
47
|
+
id
|
|
48
|
+
}), _Endpoints.default.GetSpecificWebhook.method);
|
|
104
49
|
}
|
|
105
50
|
/**
|
|
106
51
|
* This endpoint updates a specific webhook endpoint.
|
|
@@ -110,25 +55,9 @@ class WebhookApiClient {
|
|
|
110
55
|
|
|
111
56
|
|
|
112
57
|
static updateASpecificWebhookEndpoint(id, params) {
|
|
113
|
-
return
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
}),
|
|
117
|
-
method: _Endpoints.default.WebhookUpdate.method,
|
|
118
|
-
data: {
|
|
119
|
-
params
|
|
120
|
-
}
|
|
121
|
-
}).then(res => {
|
|
122
|
-
if (res.status >= 300) {
|
|
123
|
-
console.log(`Unable to perform action (Response code: ${res.status}).`);
|
|
124
|
-
return Promise.reject(res);
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
return Promise.resolve(res.data);
|
|
128
|
-
}).catch(error => {
|
|
129
|
-
console.log('Unable to perform action.');
|
|
130
|
-
return Promise.reject(error);
|
|
131
|
-
});
|
|
58
|
+
return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookUpdate.url({
|
|
59
|
+
id
|
|
60
|
+
}), _Endpoints.default.WebhookUpdate.method, params);
|
|
132
61
|
}
|
|
133
62
|
/**
|
|
134
63
|
* This endpoint updates a specific field for a specific webhook endpoint.
|
|
@@ -138,25 +67,9 @@ class WebhookApiClient {
|
|
|
138
67
|
|
|
139
68
|
|
|
140
69
|
static updateASingleWebhookEndpointField(id, params) {
|
|
141
|
-
return
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
}),
|
|
145
|
-
method: _Endpoints.default.WebhookPatch.method,
|
|
146
|
-
data: {
|
|
147
|
-
params
|
|
148
|
-
}
|
|
149
|
-
}).then(res => {
|
|
150
|
-
if (res.status >= 300) {
|
|
151
|
-
console.log(`Unable to perform action (Response code: ${res.status}).`);
|
|
152
|
-
return Promise.reject(res);
|
|
153
|
-
}
|
|
154
|
-
|
|
155
|
-
return Promise.resolve(res.data);
|
|
156
|
-
}).catch(error => {
|
|
157
|
-
console.log('Unable to perform action.');
|
|
158
|
-
return Promise.reject(error);
|
|
159
|
-
});
|
|
70
|
+
return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookPatch.url({
|
|
71
|
+
id
|
|
72
|
+
}), _Endpoints.default.WebhookPatch.method, params);
|
|
160
73
|
}
|
|
161
74
|
/**
|
|
162
75
|
* This endpoint deletes a Webhook Endpoint.
|
|
@@ -165,22 +78,9 @@ class WebhookApiClient {
|
|
|
165
78
|
|
|
166
79
|
|
|
167
80
|
static deleteWebhookEndpoint(id) {
|
|
168
|
-
return
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
}),
|
|
172
|
-
method: _Endpoints.default.WebhookDelete.method
|
|
173
|
-
}).then(res => {
|
|
174
|
-
if (res.status >= 300) {
|
|
175
|
-
console.log(`Unable to perform action (Response code: ${res.status}).`);
|
|
176
|
-
return Promise.reject(res);
|
|
177
|
-
}
|
|
178
|
-
|
|
179
|
-
return Promise.resolve(res);
|
|
180
|
-
}).catch(error => {
|
|
181
|
-
console.log('Unable to perform action.');
|
|
182
|
-
return Promise.reject(error);
|
|
183
|
-
});
|
|
81
|
+
return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookDelete.url({
|
|
82
|
+
id
|
|
83
|
+
}), _Endpoints.default.WebhookDelete.method);
|
|
184
84
|
}
|
|
185
85
|
/**
|
|
186
86
|
* This endpoint retrieves the attempts related to this endpoint.
|
|
@@ -189,22 +89,9 @@ class WebhookApiClient {
|
|
|
189
89
|
|
|
190
90
|
|
|
191
91
|
static getAllWebhookEndpointAttempts(id) {
|
|
192
|
-
return
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
}),
|
|
196
|
-
method: _Endpoints.default.WebhookEndpointAttempts.method
|
|
197
|
-
}).then(res => {
|
|
198
|
-
if (res.status >= 300) {
|
|
199
|
-
console.log(`Unable to retrieve webhook endpoint attempts (Response code: ${res.status}).`);
|
|
200
|
-
return Promise.reject(res);
|
|
201
|
-
}
|
|
202
|
-
|
|
203
|
-
return Promise.resolve(res.data);
|
|
204
|
-
}).catch(error => {
|
|
205
|
-
console.log('Unable to retrieve webhook endpoint attempts.');
|
|
206
|
-
return Promise.reject(error);
|
|
207
|
-
});
|
|
92
|
+
return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookEndpointAttempts.url({
|
|
93
|
+
id
|
|
94
|
+
}), _Endpoints.default.WebhookEndpointAttempts.method);
|
|
208
95
|
}
|
|
209
96
|
/**
|
|
210
97
|
* This endpoint expires the secret associated with this endpoint.
|
|
@@ -213,22 +100,9 @@ class WebhookApiClient {
|
|
|
213
100
|
|
|
214
101
|
|
|
215
102
|
static expireWebhookSigningSecret(id) {
|
|
216
|
-
return
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
}),
|
|
220
|
-
method: _Endpoints.default.WebhookExpireSigningSecret.method
|
|
221
|
-
}).then(res => {
|
|
222
|
-
if (res.status >= 300) {
|
|
223
|
-
console.log(`Unable to perform action (Response code: ${res.status}).`);
|
|
224
|
-
return Promise.reject(res);
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
return Promise.resolve(res.data);
|
|
228
|
-
}).catch(error => {
|
|
229
|
-
console.log('Unable to perform action.');
|
|
230
|
-
return Promise.reject(error);
|
|
231
|
-
});
|
|
103
|
+
return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookExpireSigningSecret.url({
|
|
104
|
+
id
|
|
105
|
+
}), _Endpoints.default.WebhookExpireSigningSecret.method);
|
|
232
106
|
}
|
|
233
107
|
/**
|
|
234
108
|
* This endpoint reveals the secret associated with this endpoint.
|
|
@@ -238,25 +112,11 @@ class WebhookApiClient {
|
|
|
238
112
|
|
|
239
113
|
|
|
240
114
|
static revealWebhookSigningSecret(id, password) {
|
|
241
|
-
return
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
data: {
|
|
247
|
-
password: password != null ? password : null
|
|
248
|
-
}
|
|
249
|
-
}).then(res => {
|
|
250
|
-
if (res.status >= 300) {
|
|
251
|
-
console.log(`Unable to perform action(Response code: ${res.status}).`);
|
|
252
|
-
return Promise.reject(res);
|
|
253
|
-
}
|
|
254
|
-
|
|
255
|
-
return Promise.resolve(res.data);
|
|
256
|
-
}).catch(error => {
|
|
257
|
-
console.log('Unable to perform action.');
|
|
258
|
-
return Promise.reject(error);
|
|
259
|
-
});
|
|
115
|
+
return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookRevealSigningSecret.url({
|
|
116
|
+
id
|
|
117
|
+
}), _Endpoints.default.WebhookRevealSigningSecret.method, password ? {
|
|
118
|
+
password: password
|
|
119
|
+
} : null);
|
|
260
120
|
}
|
|
261
121
|
/**
|
|
262
122
|
* This endpoint resends the event specified as parameter to the endpoint specified by the id parameter.
|
|
@@ -266,24 +126,10 @@ class WebhookApiClient {
|
|
|
266
126
|
|
|
267
127
|
|
|
268
128
|
static resendWebhookEndpointEvent(id, event) {
|
|
269
|
-
return
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
method: _Endpoints.default.WebhookResendEndpointEvent.method,
|
|
274
|
-
data: {
|
|
275
|
-
event: event
|
|
276
|
-
}
|
|
277
|
-
}).then(res => {
|
|
278
|
-
if (res.status >= 300) {
|
|
279
|
-
console.log(`Unable to perform action (Response code: ${res.status}).`);
|
|
280
|
-
return Promise.reject(res);
|
|
281
|
-
}
|
|
282
|
-
|
|
283
|
-
return Promise.resolve(res);
|
|
284
|
-
}).catch(error => {
|
|
285
|
-
console.log('Unable to perform action.');
|
|
286
|
-
return Promise.reject(error);
|
|
129
|
+
return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookResendEndpointEvent.url({
|
|
130
|
+
id
|
|
131
|
+
}), _Endpoints.default.WebhookResendEndpointEvent.method, {
|
|
132
|
+
event: event
|
|
287
133
|
});
|
|
288
134
|
}
|
|
289
135
|
/**
|
|
@@ -294,24 +140,10 @@ class WebhookApiClient {
|
|
|
294
140
|
|
|
295
141
|
|
|
296
142
|
static resendMultipleWebhookEndpointEvent(id, event) {
|
|
297
|
-
return
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
method: _Endpoints.default.WebhookResendMultipleEndpointEvent.method,
|
|
302
|
-
data: {
|
|
303
|
-
event: event
|
|
304
|
-
}
|
|
305
|
-
}).then(res => {
|
|
306
|
-
if (res.status >= 300) {
|
|
307
|
-
console.log(`Unable to perform action (Response code: ${res.status}).`);
|
|
308
|
-
return Promise.reject(res);
|
|
309
|
-
}
|
|
310
|
-
|
|
311
|
-
return Promise.resolve(res);
|
|
312
|
-
}).catch(error => {
|
|
313
|
-
console.log('Unable to perform action.');
|
|
314
|
-
return Promise.reject(error);
|
|
143
|
+
return (0, _apiRequest.apiRequest)(_Endpoints.default.WebhookResendMultipleEndpointEvent.url({
|
|
144
|
+
id
|
|
145
|
+
}), _Endpoints.default.WebhookResendMultipleEndpointEvent.method, {
|
|
146
|
+
event: event
|
|
315
147
|
});
|
|
316
148
|
}
|
|
317
149
|
|
|
@@ -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;
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
exports.__esModule = true;
|
|
4
|
+
exports.apiRequest = apiRequest;
|
|
5
|
+
|
|
6
|
+
var _client = _interopRequireDefault(require("../client"));
|
|
7
|
+
|
|
8
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
9
|
+
|
|
10
|
+
function apiRequest(url, method, data) {
|
|
11
|
+
return _client.default.request({
|
|
12
|
+
url,
|
|
13
|
+
method,
|
|
14
|
+
data: data != null ? data : null
|
|
15
|
+
}).then(res => {
|
|
16
|
+
if (res.status >= 300) {
|
|
17
|
+
console.log(`Unable to ${method} ${url} (Response code: ${res.status}).`);
|
|
18
|
+
return Promise.reject(res);
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
return Promise.resolve(res.data);
|
|
22
|
+
}).catch(error => {
|
|
23
|
+
console.log(`Unable to ${method} ${url}`);
|
|
24
|
+
return Promise.reject(error);
|
|
25
|
+
});
|
|
26
|
+
}
|
|
@@ -11,6 +11,7 @@ import Endpoints, { EndpointType } from './constants/Endpoints';
|
|
|
11
11
|
*/
|
|
12
12
|
import { formatHttpError } from './utils/http';
|
|
13
13
|
import { generateJWTToken, parseJwt } from './utils/token';
|
|
14
|
+
import { apiRequest } from './utils/apiRequest';
|
|
14
15
|
/**
|
|
15
16
|
* Services
|
|
16
17
|
*/
|
|
@@ -39,8 +40,12 @@ import SuggestionService, { SuggestionApiClient, SuggestionApiClientInterface }
|
|
|
39
40
|
import TagService, { TagApiClient, TagApiClientInterface } from './services/tag';
|
|
40
41
|
import UserService, { UserApiClient, UserApiClientInterface } from './services/user';
|
|
41
42
|
import WebhookService, { WebhookApiClient, WebhookApiClientInterface } from './services/webhook';
|
|
43
|
+
/**
|
|
44
|
+
* Types
|
|
45
|
+
*/
|
|
46
|
+
import { SCPaginatedResponse, WebhookParamType, WebhookEventsType } from './types';
|
|
42
47
|
/**
|
|
43
48
|
* Export all
|
|
44
49
|
*/
|
|
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 };
|
|
50
|
+
export { http, HttpResponse, HttpMethod, apiRequest, 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, SCPaginatedResponse, WebhookParamType, WebhookEventsType };
|
|
46
51
|
//# 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,EAAE,UAAU,EAAC,MAAM,UAAU,CAAC;AAExD;;GAEG;AACH,OAAO,SAAS,EAAE,EAAC,YAAY,EAAC,MAAM,uBAAuB,CAAC;AAE9D;;GAEG;AACH,OAAO,EAAC,eAAe,EAAC,MAAM,cAAc,CAAC;AAC7C,OAAO,EAAC,gBAAgB,EAAE,QAAQ,EAAC,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sour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,CAAC"}
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { HttpResponse } from '../../client';
|
|
2
1
|
import { SCWebhookEndpointType, SCWebhookEndpointAttemptType, SCWebhookEndpointSecretType } from '@selfcommunity/types';
|
|
3
|
-
import { WebhookParamType } from '
|
|
2
|
+
import { WebhookParamType } from '../../types';
|
|
3
|
+
import { SCPaginatedResponse } from '../../types';
|
|
4
4
|
export interface WebhookApiClientInterface {
|
|
5
|
-
getAllWebhookEndpoints(): Promise<SCWebhookEndpointType
|
|
6
|
-
getAllWebhookEvents(): Promise<
|
|
5
|
+
getAllWebhookEndpoints(): Promise<SCPaginatedResponse<SCWebhookEndpointType>>;
|
|
6
|
+
getAllWebhookEvents(): Promise<string[]>;
|
|
7
7
|
createWebhookEndpoint(params: WebhookParamType): Promise<SCWebhookEndpointType>;
|
|
8
8
|
getASpecificWebhookEndpoint(id: number): Promise<SCWebhookEndpointType>;
|
|
9
9
|
updateASpecificWebhookEndpoint(id: number, params: WebhookParamType): Promise<SCWebhookEndpointType>;
|
|
10
10
|
updateASingleWebhookEndpointField(id: number, params: WebhookParamType): Promise<SCWebhookEndpointType>;
|
|
11
11
|
deleteWebhookEndpoint(id: number): Promise<any>;
|
|
12
|
-
getAllWebhookEndpointAttempts(id: number): Promise<SCWebhookEndpointAttemptType
|
|
12
|
+
getAllWebhookEndpointAttempts(id: number): Promise<SCPaginatedResponse<SCWebhookEndpointAttemptType>>;
|
|
13
13
|
expireWebhookSigningSecret(id: number): Promise<SCWebhookEndpointType>;
|
|
14
14
|
revealWebhookSigningSecret(id: number, password?: string): Promise<SCWebhookEndpointSecretType>;
|
|
15
15
|
resendWebhookEndpointEvent(id: number, event: number): Promise<any>;
|
|
@@ -22,16 +22,16 @@ export declare class WebhookApiClient {
|
|
|
22
22
|
/**
|
|
23
23
|
* This endpoint retrieves all webhook endpoints
|
|
24
24
|
*/
|
|
25
|
-
static getAllWebhookEndpoints(): Promise<
|
|
25
|
+
static getAllWebhookEndpoints(): Promise<SCPaginatedResponse<SCWebhookEndpointType>>;
|
|
26
26
|
/**
|
|
27
27
|
* This endpoint retrieves webhook events that can be enabled in the endpoint.
|
|
28
28
|
*/
|
|
29
|
-
static getAllWebhookEvents(): Promise<
|
|
29
|
+
static getAllWebhookEvents(): Promise<string[]>;
|
|
30
30
|
/**
|
|
31
31
|
* This endpoint creates a webhook endpoint and connects it to the given webhook events.
|
|
32
|
-
* @param
|
|
32
|
+
* @param data
|
|
33
33
|
*/
|
|
34
|
-
static createWebhookEndpoint(
|
|
34
|
+
static createWebhookEndpoint(data: WebhookParamType): Promise<SCWebhookEndpointType>;
|
|
35
35
|
/**
|
|
36
36
|
* This endpoint retrieves a specific webhook endpoint using ID.
|
|
37
37
|
* @param id
|
|
@@ -58,7 +58,7 @@ export declare class WebhookApiClient {
|
|
|
58
58
|
* This endpoint retrieves the attempts related to this endpoint.
|
|
59
59
|
* @param id
|
|
60
60
|
*/
|
|
61
|
-
static getAllWebhookEndpointAttempts(id: number): Promise<SCWebhookEndpointAttemptType
|
|
61
|
+
static getAllWebhookEndpointAttempts(id: number): Promise<SCPaginatedResponse<SCWebhookEndpointAttemptType>>;
|
|
62
62
|
/**
|
|
63
63
|
* This endpoint expires the secret associated with this endpoint.
|
|
64
64
|
* @param id
|
|
@@ -84,14 +84,14 @@ export declare class WebhookApiClient {
|
|
|
84
84
|
static resendMultipleWebhookEndpointEvent(id: number, event: number[]): Promise<any>;
|
|
85
85
|
}
|
|
86
86
|
export default class WebhookService {
|
|
87
|
-
static getAllWebhookEndpoints(): Promise<
|
|
87
|
+
static getAllWebhookEndpoints(): Promise<SCPaginatedResponse<SCWebhookEndpointType>>;
|
|
88
88
|
static getAllWebhookEvents(): Promise<any>;
|
|
89
|
-
static createWebhookEndpoint(params: WebhookParamType): Promise<
|
|
89
|
+
static createWebhookEndpoint(params: WebhookParamType): Promise<SCWebhookEndpointType>;
|
|
90
90
|
static getASpecificWebhookEndpoint(id: number): Promise<SCWebhookEndpointType>;
|
|
91
91
|
static updateASpecificWebhookEndpoint(id: number, params: WebhookParamType): Promise<SCWebhookEndpointType>;
|
|
92
92
|
static updateASingleWebhookEndpointField(id: number, params: WebhookParamType): Promise<SCWebhookEndpointType>;
|
|
93
93
|
static deleteWebhookEndpoint(id: number): Promise<any>;
|
|
94
|
-
static getAllWebhookEndpointAttempts(id: number): Promise<SCWebhookEndpointAttemptType
|
|
94
|
+
static getAllWebhookEndpointAttempts(id: number): Promise<SCPaginatedResponse<SCWebhookEndpointAttemptType>>;
|
|
95
95
|
static expireWebhookSigningSecret(id: number): Promise<SCWebhookEndpointType>;
|
|
96
96
|
static revealWebhookSigningSecret(id: number, password?: string): Promise<SCWebhookEndpointSecretType>;
|
|
97
97
|
static resendWebhookEndpointEvent(id: number, event: number): Promise<any>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/services/webhook/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/services/webhook/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAC,qBAAqB,EAAE,4BAA4B,EAAE,2BAA2B,EAAC,MAAM,sBAAsB,CAAC;AACtH,OAAO,EAAC,gBAAgB,EAAC,MAAM,aAAa,CAAC;AAC7C,OAAO,EAAC,mBAAmB,EAAC,MAAM,aAAa,CAAC;AAGhD,MAAM,WAAW,yBAAyB;IACxC,sBAAsB,IAAI,OAAO,CAAC,mBAAmB,CAAC,qBAAqB,CAAC,CAAC,CAAC;IAC9E,mBAAmB,IAAI,OAAO,CAAC,MAAM,EAAE,CAAC,CAAC;IACzC,qBAAqB,CAAC,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IAChF,2BAA2B,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACxE,8BAA8B,CAAC,EAAE,EAAE,MAAM,EAAE,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;WAGpG,iCAAiC,CAAC,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,gBAAgB,GAAG,OAAO,CAAC,qBAAqB,CAAC;WAGvG,qBAAqB,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC;WAG/C,6BAA6B,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,mBAAmB,CAAC,4BAA4B,CAAC,CAAC;WAGrG,0BAA0B,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,qBAAqB,CAAC;WAGtE,0BAA0B,CAAC,EAAE,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC,2BAA2B,CAAC;WAG/F,0BAA0B,CAAC,EAAE,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,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 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/types/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,mBAAmB,EAAC,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAC,gBAAgB,EAAE,iBAAiB,EAAC,MAAM,WAAW,CAAC;AAE9D,OAAO,EAAC,mBAAmB,EAAE,gBAAgB,EAAE,iBAAiB,EAAC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"paginatedResponse.d.ts","sourceRoot":"","sources":["../../../../../src/types/paginatedResponse.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,MAAM,WAAW,mBAAmB,CAAC,CAAC,GAAG,EAAE;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,CAAC,CAAC;CACZ"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../../../../src/types/webhook.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"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"apiRequest.d.ts","sourceRoot":"","sources":["../../../../../src/utils/apiRequest.ts"],"names":[],"mappings":"AAEA,wBAAgB,UAAU,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,GAAG,gBAkBjE"}
|
package/lib/esm/index.js
CHANGED
|
@@ -22,6 +22,10 @@ var _token = require("./utils/token");
|
|
|
22
22
|
exports.generateJWTToken = _token.generateJWTToken;
|
|
23
23
|
exports.parseJwt = _token.parseJwt;
|
|
24
24
|
|
|
25
|
+
var _apiRequest = require("./utils/apiRequest");
|
|
26
|
+
|
|
27
|
+
exports.apiRequest = _apiRequest.apiRequest;
|
|
28
|
+
|
|
25
29
|
var _category = _interopRequireWildcard(require("./services/category"));
|
|
26
30
|
|
|
27
31
|
exports.CategoryService = _category.default;
|
|
@@ -172,6 +176,12 @@ exports.WebhookService = _webhook.default;
|
|
|
172
176
|
exports.WebhookApiClient = _webhook.WebhookApiClient;
|
|
173
177
|
exports.WebhookApiClientInterface = _webhook.WebhookApiClientInterface;
|
|
174
178
|
|
|
179
|
+
var _types = require("./types");
|
|
180
|
+
|
|
181
|
+
exports.SCPaginatedResponse = _types.SCPaginatedResponse;
|
|
182
|
+
exports.WebhookParamType = _types.WebhookParamType;
|
|
183
|
+
exports.WebhookEventsType = _types.WebhookEventsType;
|
|
184
|
+
|
|
175
185
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function (nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
176
186
|
|
|
177
187
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|