@easyedu/js-lsm-api 1.116.0 → 1.118.0
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/.openapi-generator/FILES +28 -0
- package/README.md +23 -2
- package/dist/apis/IntegrationApi.d.ts +127 -0
- package/dist/apis/IntegrationApi.js +332 -1
- package/dist/esm/apis/IntegrationApi.d.ts +127 -0
- package/dist/esm/apis/IntegrationApi.js +331 -0
- package/dist/esm/models/CustomWebhookIntegration.d.ts +85 -0
- package/dist/esm/models/CustomWebhookIntegration.js +81 -0
- package/dist/esm/models/IntegrationEvent.d.ts +100 -0
- package/dist/esm/models/IntegrationEvent.js +94 -0
- package/dist/esm/models/IntegrationEventCertificate.d.ts +78 -0
- package/dist/esm/models/IntegrationEventCertificate.js +76 -0
- package/dist/esm/models/IntegrationEventCourse.d.ts +38 -0
- package/dist/esm/models/IntegrationEventCourse.js +47 -0
- package/dist/esm/models/IntegrationEventData.d.ts +75 -0
- package/dist/esm/models/IntegrationEventData.js +74 -0
- package/dist/esm/models/IntegrationEventEnrollment.d.ts +71 -0
- package/dist/esm/models/IntegrationEventEnrollment.js +71 -0
- package/dist/esm/models/IntegrationEventInvitation.d.ts +71 -0
- package/dist/esm/models/IntegrationEventInvitation.js +71 -0
- package/dist/esm/models/IntegrationEventLearner.d.ts +50 -0
- package/dist/esm/models/IntegrationEventLearner.js +55 -0
- package/dist/esm/models/IntegrationEventPortal.d.ts +44 -0
- package/dist/esm/models/IntegrationEventPortal.js +51 -0
- package/dist/esm/models/IntegrationEventUser.d.ts +50 -0
- package/dist/esm/models/IntegrationEventUser.js +55 -0
- package/dist/esm/models/PostCustomWebhookIntegration.d.ts +67 -0
- package/dist/esm/models/PostCustomWebhookIntegration.js +67 -0
- package/dist/esm/models/PostZapierSubscription.d.ts +55 -0
- package/dist/esm/models/PostZapierSubscription.js +59 -0
- package/dist/esm/models/PutCustomWebhookIntegration.d.ts +67 -0
- package/dist/esm/models/PutCustomWebhookIntegration.js +59 -0
- package/dist/esm/models/ZapierSubscription.d.ts +55 -0
- package/dist/esm/models/ZapierSubscription.js +61 -0
- package/dist/esm/models/index.d.ts +14 -0
- package/dist/esm/models/index.js +14 -0
- package/dist/models/CustomWebhookIntegration.d.ts +85 -0
- package/dist/models/CustomWebhookIntegration.js +89 -0
- package/dist/models/IntegrationEvent.d.ts +100 -0
- package/dist/models/IntegrationEvent.js +102 -0
- package/dist/models/IntegrationEventCertificate.d.ts +78 -0
- package/dist/models/IntegrationEventCertificate.js +84 -0
- package/dist/models/IntegrationEventCourse.d.ts +38 -0
- package/dist/models/IntegrationEventCourse.js +54 -0
- package/dist/models/IntegrationEventData.d.ts +75 -0
- package/dist/models/IntegrationEventData.js +81 -0
- package/dist/models/IntegrationEventEnrollment.d.ts +71 -0
- package/dist/models/IntegrationEventEnrollment.js +79 -0
- package/dist/models/IntegrationEventInvitation.d.ts +71 -0
- package/dist/models/IntegrationEventInvitation.js +79 -0
- package/dist/models/IntegrationEventLearner.d.ts +50 -0
- package/dist/models/IntegrationEventLearner.js +62 -0
- package/dist/models/IntegrationEventPortal.d.ts +44 -0
- package/dist/models/IntegrationEventPortal.js +58 -0
- package/dist/models/IntegrationEventUser.d.ts +50 -0
- package/dist/models/IntegrationEventUser.js +62 -0
- package/dist/models/PostCustomWebhookIntegration.d.ts +67 -0
- package/dist/models/PostCustomWebhookIntegration.js +75 -0
- package/dist/models/PostZapierSubscription.d.ts +55 -0
- package/dist/models/PostZapierSubscription.js +67 -0
- package/dist/models/PutCustomWebhookIntegration.d.ts +67 -0
- package/dist/models/PutCustomWebhookIntegration.js +67 -0
- package/dist/models/ZapierSubscription.d.ts +55 -0
- package/dist/models/ZapierSubscription.js +69 -0
- package/dist/models/index.d.ts +14 -0
- package/dist/models/index.js +14 -0
- package/docs/CustomWebhookIntegration.md +48 -0
- package/docs/IntegrationApi.md +494 -0
- package/docs/IntegrationEvent.md +49 -0
- package/docs/IntegrationEventCertificate.md +46 -0
- package/docs/IntegrationEventCourse.md +36 -0
- package/docs/IntegrationEventData.md +46 -0
- package/docs/IntegrationEventEnrollment.md +44 -0
- package/docs/IntegrationEventInvitation.md +45 -0
- package/docs/IntegrationEventLearner.md +40 -0
- package/docs/IntegrationEventPortal.md +38 -0
- package/docs/IntegrationEventUser.md +41 -0
- package/docs/PostCustomWebhookIntegration.md +42 -0
- package/docs/PostZapierSubscription.md +38 -0
- package/docs/PutCustomWebhookIntegration.md +42 -0
- package/docs/ZapierSubscription.md +38 -0
- package/package.json +1 -1
- package/src/apis/IntegrationApi.ts +466 -0
- package/src/models/CustomWebhookIntegration.ts +143 -0
- package/src/models/IntegrationEvent.ts +167 -0
- package/src/models/IntegrationEventCertificate.ts +133 -0
- package/src/models/IntegrationEventCourse.ts +75 -0
- package/src/models/IntegrationEventData.ts +170 -0
- package/src/models/IntegrationEventEnrollment.ts +123 -0
- package/src/models/IntegrationEventInvitation.ts +130 -0
- package/src/models/IntegrationEventLearner.ts +93 -0
- package/src/models/IntegrationEventPortal.ts +84 -0
- package/src/models/IntegrationEventUser.ts +93 -0
- package/src/models/PostCustomWebhookIntegration.ts +115 -0
- package/src/models/PostZapierSubscription.ts +97 -0
- package/src/models/PutCustomWebhookIntegration.ts +111 -0
- package/src/models/ZapierSubscription.ts +98 -0
- package/src/models/index.ts +14 -0
|
@@ -21,27 +21,71 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
+
import { CustomWebhookIntegrationFromJSON, } from '../models/CustomWebhookIntegration';
|
|
24
25
|
import { GetZapierCoursesFromJSON, } from '../models/GetZapierCourses';
|
|
25
26
|
import { GetZapierMeFromJSON, } from '../models/GetZapierMe';
|
|
26
27
|
import { GetZapierSetupFromJSON, } from '../models/GetZapierSetup';
|
|
27
28
|
import { GetZapierShopifyCourseMappingsFromJSON, } from '../models/GetZapierShopifyCourseMappings';
|
|
28
29
|
import { GetZapierUsersFromJSON, } from '../models/GetZapierUsers';
|
|
30
|
+
import { IntegrationEventFromJSON, } from '../models/IntegrationEvent';
|
|
31
|
+
import { PostCustomWebhookIntegrationToJSON, } from '../models/PostCustomWebhookIntegration';
|
|
29
32
|
import { PostZapierEnrollmentToJSON, } from '../models/PostZapierEnrollment';
|
|
30
33
|
import { PostZapierSetupToJSON, } from '../models/PostZapierSetup';
|
|
31
34
|
import { PostZapierSetupResponseFromJSON, } from '../models/PostZapierSetupResponse';
|
|
32
35
|
import { PostZapierShopifyCourseMappingToJSON, } from '../models/PostZapierShopifyCourseMapping';
|
|
33
36
|
import { PostZapierShopifyEnrollmentToJSON, } from '../models/PostZapierShopifyEnrollment';
|
|
34
37
|
import { PostZapierShopifyEnrollmentResponseFromJSON, } from '../models/PostZapierShopifyEnrollmentResponse';
|
|
38
|
+
import { PostZapierSubscriptionToJSON, } from '../models/PostZapierSubscription';
|
|
35
39
|
import { PostZapierUserToJSON, } from '../models/PostZapierUser';
|
|
40
|
+
import { PutCustomWebhookIntegrationToJSON, } from '../models/PutCustomWebhookIntegration';
|
|
36
41
|
import { PutZapierSetupToJSON, } from '../models/PutZapierSetup';
|
|
37
42
|
import { ZapierEnrollmentFromJSON, } from '../models/ZapierEnrollment';
|
|
38
43
|
import { ZapierIntegrationFromJSON, } from '../models/ZapierIntegration';
|
|
39
44
|
import { ZapierShopifyCourseMappingFromJSON, } from '../models/ZapierShopifyCourseMapping';
|
|
45
|
+
import { ZapierSubscriptionFromJSON, } from '../models/ZapierSubscription';
|
|
40
46
|
import { ZapierUserFromJSON, } from '../models/ZapierUser';
|
|
41
47
|
/**
|
|
42
48
|
*
|
|
43
49
|
*/
|
|
44
50
|
export class IntegrationApi extends runtime.BaseAPI {
|
|
51
|
+
/**
|
|
52
|
+
* Creates request options for deleteCustomWebhookIntegration without sending the request
|
|
53
|
+
*/
|
|
54
|
+
deleteCustomWebhookIntegrationRequestOpts(requestParameters) {
|
|
55
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
56
|
+
if (requestParameters['webhookIntegrationId'] == null) {
|
|
57
|
+
throw new runtime.RequiredError('webhookIntegrationId', 'Required parameter "webhookIntegrationId" was null or undefined when calling deleteCustomWebhookIntegration().');
|
|
58
|
+
}
|
|
59
|
+
const queryParameters = {};
|
|
60
|
+
const headerParameters = {};
|
|
61
|
+
let urlPath = `/integrations/webhooks/{webhookIntegrationId}`;
|
|
62
|
+
urlPath = urlPath.replace('{webhookIntegrationId}', encodeURIComponent(String(requestParameters['webhookIntegrationId'])));
|
|
63
|
+
return {
|
|
64
|
+
path: urlPath,
|
|
65
|
+
method: 'DELETE',
|
|
66
|
+
headers: headerParameters,
|
|
67
|
+
query: queryParameters,
|
|
68
|
+
};
|
|
69
|
+
});
|
|
70
|
+
}
|
|
71
|
+
/**
|
|
72
|
+
* Delete a custom webhook destination
|
|
73
|
+
*/
|
|
74
|
+
deleteCustomWebhookIntegrationRaw(requestParameters, initOverrides) {
|
|
75
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
76
|
+
const requestOptions = yield this.deleteCustomWebhookIntegrationRequestOpts(requestParameters);
|
|
77
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
78
|
+
return new runtime.VoidApiResponse(response);
|
|
79
|
+
});
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Delete a custom webhook destination
|
|
83
|
+
*/
|
|
84
|
+
deleteCustomWebhookIntegration(requestParameters, initOverrides) {
|
|
85
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
86
|
+
yield this.deleteCustomWebhookIntegrationRaw(requestParameters, initOverrides);
|
|
87
|
+
});
|
|
88
|
+
}
|
|
45
89
|
/**
|
|
46
90
|
* Creates request options for deleteZapierSetup without sending the request
|
|
47
91
|
*/
|
|
@@ -80,6 +124,91 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
80
124
|
yield this.deleteZapierSetupRaw(requestParameters, initOverrides);
|
|
81
125
|
});
|
|
82
126
|
}
|
|
127
|
+
/**
|
|
128
|
+
* Creates request options for deleteZapierSubscription without sending the request
|
|
129
|
+
*/
|
|
130
|
+
deleteZapierSubscriptionRequestOpts(requestParameters) {
|
|
131
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
132
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
133
|
+
throw new runtime.RequiredError('subscriptionId', 'Required parameter "subscriptionId" was null or undefined when calling deleteZapierSubscription().');
|
|
134
|
+
}
|
|
135
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
136
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling deleteZapierSubscription().');
|
|
137
|
+
}
|
|
138
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
139
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling deleteZapierSubscription().');
|
|
140
|
+
}
|
|
141
|
+
const queryParameters = {};
|
|
142
|
+
const headerParameters = {};
|
|
143
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
144
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
145
|
+
}
|
|
146
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
147
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
148
|
+
}
|
|
149
|
+
let urlPath = `/integrations/zapier/subscriptions/{subscriptionId}`;
|
|
150
|
+
urlPath = urlPath.replace('{subscriptionId}', encodeURIComponent(String(requestParameters['subscriptionId'])));
|
|
151
|
+
return {
|
|
152
|
+
path: urlPath,
|
|
153
|
+
method: 'DELETE',
|
|
154
|
+
headers: headerParameters,
|
|
155
|
+
query: queryParameters,
|
|
156
|
+
};
|
|
157
|
+
});
|
|
158
|
+
}
|
|
159
|
+
/**
|
|
160
|
+
* Unsubscribe a Zap from an Edaxu lifecycle event
|
|
161
|
+
*/
|
|
162
|
+
deleteZapierSubscriptionRaw(requestParameters, initOverrides) {
|
|
163
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
164
|
+
const requestOptions = yield this.deleteZapierSubscriptionRequestOpts(requestParameters);
|
|
165
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
166
|
+
return new runtime.VoidApiResponse(response);
|
|
167
|
+
});
|
|
168
|
+
}
|
|
169
|
+
/**
|
|
170
|
+
* Unsubscribe a Zap from an Edaxu lifecycle event
|
|
171
|
+
*/
|
|
172
|
+
deleteZapierSubscription(requestParameters, initOverrides) {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
174
|
+
yield this.deleteZapierSubscriptionRaw(requestParameters, initOverrides);
|
|
175
|
+
});
|
|
176
|
+
}
|
|
177
|
+
/**
|
|
178
|
+
* Creates request options for getCustomWebhookIntegrations without sending the request
|
|
179
|
+
*/
|
|
180
|
+
getCustomWebhookIntegrationsRequestOpts() {
|
|
181
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
182
|
+
const queryParameters = {};
|
|
183
|
+
const headerParameters = {};
|
|
184
|
+
let urlPath = `/integrations/webhooks`;
|
|
185
|
+
return {
|
|
186
|
+
path: urlPath,
|
|
187
|
+
method: 'GET',
|
|
188
|
+
headers: headerParameters,
|
|
189
|
+
query: queryParameters,
|
|
190
|
+
};
|
|
191
|
+
});
|
|
192
|
+
}
|
|
193
|
+
/**
|
|
194
|
+
* List custom webhook destinations for the selected portal
|
|
195
|
+
*/
|
|
196
|
+
getCustomWebhookIntegrationsRaw(initOverrides) {
|
|
197
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
198
|
+
const requestOptions = yield this.getCustomWebhookIntegrationsRequestOpts();
|
|
199
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
200
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CustomWebhookIntegrationFromJSON));
|
|
201
|
+
});
|
|
202
|
+
}
|
|
203
|
+
/**
|
|
204
|
+
* List custom webhook destinations for the selected portal
|
|
205
|
+
*/
|
|
206
|
+
getCustomWebhookIntegrations(initOverrides) {
|
|
207
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
208
|
+
const response = yield this.getCustomWebhookIntegrationsRaw(initOverrides);
|
|
209
|
+
return yield response.value();
|
|
210
|
+
});
|
|
211
|
+
}
|
|
83
212
|
/**
|
|
84
213
|
* Creates request options for getZapierCourses without sending the request
|
|
85
214
|
*/
|
|
@@ -136,6 +265,62 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
136
265
|
return yield response.value();
|
|
137
266
|
});
|
|
138
267
|
}
|
|
268
|
+
/**
|
|
269
|
+
* Creates request options for getZapierEvents without sending the request
|
|
270
|
+
*/
|
|
271
|
+
getZapierEventsRequestOpts(requestParameters) {
|
|
272
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
273
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
274
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling getZapierEvents().');
|
|
275
|
+
}
|
|
276
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
277
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierEvents().');
|
|
278
|
+
}
|
|
279
|
+
if (requestParameters['eventType'] == null) {
|
|
280
|
+
throw new runtime.RequiredError('eventType', 'Required parameter "eventType" was null or undefined when calling getZapierEvents().');
|
|
281
|
+
}
|
|
282
|
+
const queryParameters = {};
|
|
283
|
+
if (requestParameters['eventType'] != null) {
|
|
284
|
+
queryParameters['eventType'] = requestParameters['eventType'];
|
|
285
|
+
}
|
|
286
|
+
if (requestParameters['pageSize'] != null) {
|
|
287
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
288
|
+
}
|
|
289
|
+
const headerParameters = {};
|
|
290
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
291
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
292
|
+
}
|
|
293
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
294
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
295
|
+
}
|
|
296
|
+
let urlPath = `/integrations/zapier/events`;
|
|
297
|
+
return {
|
|
298
|
+
path: urlPath,
|
|
299
|
+
method: 'GET',
|
|
300
|
+
headers: headerParameters,
|
|
301
|
+
query: queryParameters,
|
|
302
|
+
};
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* List recent lifecycle events for Zapier trigger setup
|
|
307
|
+
*/
|
|
308
|
+
getZapierEventsRaw(requestParameters, initOverrides) {
|
|
309
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
310
|
+
const requestOptions = yield this.getZapierEventsRequestOpts(requestParameters);
|
|
311
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
312
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(IntegrationEventFromJSON));
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* List recent lifecycle events for Zapier trigger setup
|
|
317
|
+
*/
|
|
318
|
+
getZapierEvents(requestParameters, initOverrides) {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
+
const response = yield this.getZapierEventsRaw(requestParameters, initOverrides);
|
|
321
|
+
return yield response.value();
|
|
322
|
+
});
|
|
323
|
+
}
|
|
139
324
|
/**
|
|
140
325
|
* Creates request options for getZapierMe without sending the request
|
|
141
326
|
*/
|
|
@@ -321,6 +506,46 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
321
506
|
return yield response.value();
|
|
322
507
|
});
|
|
323
508
|
}
|
|
509
|
+
/**
|
|
510
|
+
* Creates request options for postCustomWebhookIntegration without sending the request
|
|
511
|
+
*/
|
|
512
|
+
postCustomWebhookIntegrationRequestOpts(requestParameters) {
|
|
513
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
514
|
+
if (requestParameters['postCustomWebhookIntegration'] == null) {
|
|
515
|
+
throw new runtime.RequiredError('postCustomWebhookIntegration', 'Required parameter "postCustomWebhookIntegration" was null or undefined when calling postCustomWebhookIntegration().');
|
|
516
|
+
}
|
|
517
|
+
const queryParameters = {};
|
|
518
|
+
const headerParameters = {};
|
|
519
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
520
|
+
let urlPath = `/integrations/webhooks`;
|
|
521
|
+
return {
|
|
522
|
+
path: urlPath,
|
|
523
|
+
method: 'POST',
|
|
524
|
+
headers: headerParameters,
|
|
525
|
+
query: queryParameters,
|
|
526
|
+
body: PostCustomWebhookIntegrationToJSON(requestParameters['postCustomWebhookIntegration']),
|
|
527
|
+
};
|
|
528
|
+
});
|
|
529
|
+
}
|
|
530
|
+
/**
|
|
531
|
+
* Create a custom webhook destination for lifecycle events
|
|
532
|
+
*/
|
|
533
|
+
postCustomWebhookIntegrationRaw(requestParameters, initOverrides) {
|
|
534
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
535
|
+
const requestOptions = yield this.postCustomWebhookIntegrationRequestOpts(requestParameters);
|
|
536
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
537
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CustomWebhookIntegrationFromJSON(jsonValue));
|
|
538
|
+
});
|
|
539
|
+
}
|
|
540
|
+
/**
|
|
541
|
+
* Create a custom webhook destination for lifecycle events
|
|
542
|
+
*/
|
|
543
|
+
postCustomWebhookIntegration(requestParameters, initOverrides) {
|
|
544
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
545
|
+
const response = yield this.postCustomWebhookIntegrationRaw(requestParameters, initOverrides);
|
|
546
|
+
return yield response.value();
|
|
547
|
+
});
|
|
548
|
+
}
|
|
324
549
|
/**
|
|
325
550
|
* Creates request options for postZapierEnrollment without sending the request
|
|
326
551
|
*/
|
|
@@ -517,6 +742,58 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
517
742
|
return yield response.value();
|
|
518
743
|
});
|
|
519
744
|
}
|
|
745
|
+
/**
|
|
746
|
+
* Creates request options for postZapierSubscription without sending the request
|
|
747
|
+
*/
|
|
748
|
+
postZapierSubscriptionRequestOpts(requestParameters) {
|
|
749
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
750
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
751
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling postZapierSubscription().');
|
|
752
|
+
}
|
|
753
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
754
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierSubscription().');
|
|
755
|
+
}
|
|
756
|
+
if (requestParameters['postZapierSubscription'] == null) {
|
|
757
|
+
throw new runtime.RequiredError('postZapierSubscription', 'Required parameter "postZapierSubscription" was null or undefined when calling postZapierSubscription().');
|
|
758
|
+
}
|
|
759
|
+
const queryParameters = {};
|
|
760
|
+
const headerParameters = {};
|
|
761
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
762
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
763
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
764
|
+
}
|
|
765
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
766
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
767
|
+
}
|
|
768
|
+
let urlPath = `/integrations/zapier/subscriptions`;
|
|
769
|
+
return {
|
|
770
|
+
path: urlPath,
|
|
771
|
+
method: 'POST',
|
|
772
|
+
headers: headerParameters,
|
|
773
|
+
query: queryParameters,
|
|
774
|
+
body: PostZapierSubscriptionToJSON(requestParameters['postZapierSubscription']),
|
|
775
|
+
};
|
|
776
|
+
});
|
|
777
|
+
}
|
|
778
|
+
/**
|
|
779
|
+
* Subscribe a Zap to an Edaxu lifecycle event
|
|
780
|
+
*/
|
|
781
|
+
postZapierSubscriptionRaw(requestParameters, initOverrides) {
|
|
782
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
783
|
+
const requestOptions = yield this.postZapierSubscriptionRequestOpts(requestParameters);
|
|
784
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
785
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ZapierSubscriptionFromJSON(jsonValue));
|
|
786
|
+
});
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* Subscribe a Zap to an Edaxu lifecycle event
|
|
790
|
+
*/
|
|
791
|
+
postZapierSubscription(requestParameters, initOverrides) {
|
|
792
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
793
|
+
const response = yield this.postZapierSubscriptionRaw(requestParameters, initOverrides);
|
|
794
|
+
return yield response.value();
|
|
795
|
+
});
|
|
796
|
+
}
|
|
520
797
|
/**
|
|
521
798
|
* Creates request options for postZapierUser without sending the request
|
|
522
799
|
*/
|
|
@@ -569,6 +846,50 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
569
846
|
return yield response.value();
|
|
570
847
|
});
|
|
571
848
|
}
|
|
849
|
+
/**
|
|
850
|
+
* Creates request options for putCustomWebhookIntegration without sending the request
|
|
851
|
+
*/
|
|
852
|
+
putCustomWebhookIntegrationRequestOpts(requestParameters) {
|
|
853
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
854
|
+
if (requestParameters['webhookIntegrationId'] == null) {
|
|
855
|
+
throw new runtime.RequiredError('webhookIntegrationId', 'Required parameter "webhookIntegrationId" was null or undefined when calling putCustomWebhookIntegration().');
|
|
856
|
+
}
|
|
857
|
+
if (requestParameters['putCustomWebhookIntegration'] == null) {
|
|
858
|
+
throw new runtime.RequiredError('putCustomWebhookIntegration', 'Required parameter "putCustomWebhookIntegration" was null or undefined when calling putCustomWebhookIntegration().');
|
|
859
|
+
}
|
|
860
|
+
const queryParameters = {};
|
|
861
|
+
const headerParameters = {};
|
|
862
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
863
|
+
let urlPath = `/integrations/webhooks/{webhookIntegrationId}`;
|
|
864
|
+
urlPath = urlPath.replace('{webhookIntegrationId}', encodeURIComponent(String(requestParameters['webhookIntegrationId'])));
|
|
865
|
+
return {
|
|
866
|
+
path: urlPath,
|
|
867
|
+
method: 'PUT',
|
|
868
|
+
headers: headerParameters,
|
|
869
|
+
query: queryParameters,
|
|
870
|
+
body: PutCustomWebhookIntegrationToJSON(requestParameters['putCustomWebhookIntegration']),
|
|
871
|
+
};
|
|
872
|
+
});
|
|
873
|
+
}
|
|
874
|
+
/**
|
|
875
|
+
* Update a custom webhook destination
|
|
876
|
+
*/
|
|
877
|
+
putCustomWebhookIntegrationRaw(requestParameters, initOverrides) {
|
|
878
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
879
|
+
const requestOptions = yield this.putCustomWebhookIntegrationRequestOpts(requestParameters);
|
|
880
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
881
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CustomWebhookIntegrationFromJSON(jsonValue));
|
|
882
|
+
});
|
|
883
|
+
}
|
|
884
|
+
/**
|
|
885
|
+
* Update a custom webhook destination
|
|
886
|
+
*/
|
|
887
|
+
putCustomWebhookIntegration(requestParameters, initOverrides) {
|
|
888
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
889
|
+
const response = yield this.putCustomWebhookIntegrationRaw(requestParameters, initOverrides);
|
|
890
|
+
return yield response.value();
|
|
891
|
+
});
|
|
892
|
+
}
|
|
572
893
|
/**
|
|
573
894
|
* Creates request options for putZapierSetup without sending the request
|
|
574
895
|
*/
|
|
@@ -614,3 +935,13 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
614
935
|
});
|
|
615
936
|
}
|
|
616
937
|
}
|
|
938
|
+
/**
|
|
939
|
+
* @export
|
|
940
|
+
*/
|
|
941
|
+
export const GetZapierEventsEventTypeEnum = {
|
|
942
|
+
ComEdaxuEnrollmentEnrolledV1: 'com.edaxu.enrollment.enrolled.v1',
|
|
943
|
+
ComEdaxuEnrollmentCompletedV1: 'com.edaxu.enrollment.completed.v1',
|
|
944
|
+
ComEdaxuCertificateIssuedV1: 'com.edaxu.certificate.issued.v1',
|
|
945
|
+
ComEdaxuPortalUserInvitedV1: 'com.edaxu.portal.user_invited.v1',
|
|
946
|
+
ComEdaxuPortalUserJoinedV1: 'com.edaxu.portal.user_joined.v1'
|
|
947
|
+
};
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
/**
|
|
13
|
+
*
|
|
14
|
+
* @export
|
|
15
|
+
* @interface CustomWebhookIntegration
|
|
16
|
+
*/
|
|
17
|
+
export interface CustomWebhookIntegration {
|
|
18
|
+
/**
|
|
19
|
+
*
|
|
20
|
+
* @type {string}
|
|
21
|
+
* @memberof CustomWebhookIntegration
|
|
22
|
+
*/
|
|
23
|
+
id: string;
|
|
24
|
+
/**
|
|
25
|
+
*
|
|
26
|
+
* @type {string}
|
|
27
|
+
* @memberof CustomWebhookIntegration
|
|
28
|
+
*/
|
|
29
|
+
name: string;
|
|
30
|
+
/**
|
|
31
|
+
*
|
|
32
|
+
* @type {string}
|
|
33
|
+
* @memberof CustomWebhookIntegration
|
|
34
|
+
*/
|
|
35
|
+
targetUrl: string;
|
|
36
|
+
/**
|
|
37
|
+
*
|
|
38
|
+
* @type {Set<CustomWebhookIntegrationEventTypesEnum>}
|
|
39
|
+
* @memberof CustomWebhookIntegration
|
|
40
|
+
*/
|
|
41
|
+
eventTypes: Set<CustomWebhookIntegrationEventTypesEnum>;
|
|
42
|
+
/**
|
|
43
|
+
*
|
|
44
|
+
* @type {boolean}
|
|
45
|
+
* @memberof CustomWebhookIntegration
|
|
46
|
+
*/
|
|
47
|
+
enabled: boolean;
|
|
48
|
+
/**
|
|
49
|
+
* True when an encrypted bearer token is configured. The token is never returned.
|
|
50
|
+
* @type {boolean}
|
|
51
|
+
* @memberof CustomWebhookIntegration
|
|
52
|
+
*/
|
|
53
|
+
tokenConfigured: boolean;
|
|
54
|
+
/**
|
|
55
|
+
*
|
|
56
|
+
* @type {Date}
|
|
57
|
+
* @memberof CustomWebhookIntegration
|
|
58
|
+
*/
|
|
59
|
+
createdAt: Date;
|
|
60
|
+
/**
|
|
61
|
+
*
|
|
62
|
+
* @type {Date}
|
|
63
|
+
* @memberof CustomWebhookIntegration
|
|
64
|
+
*/
|
|
65
|
+
updatedAt: Date;
|
|
66
|
+
}
|
|
67
|
+
/**
|
|
68
|
+
* @export
|
|
69
|
+
*/
|
|
70
|
+
export declare const CustomWebhookIntegrationEventTypesEnum: {
|
|
71
|
+
readonly ComEdaxuEnrollmentEnrolledV1: "com.edaxu.enrollment.enrolled.v1";
|
|
72
|
+
readonly ComEdaxuEnrollmentCompletedV1: "com.edaxu.enrollment.completed.v1";
|
|
73
|
+
readonly ComEdaxuCertificateIssuedV1: "com.edaxu.certificate.issued.v1";
|
|
74
|
+
readonly ComEdaxuPortalUserInvitedV1: "com.edaxu.portal.user_invited.v1";
|
|
75
|
+
readonly ComEdaxuPortalUserJoinedV1: "com.edaxu.portal.user_joined.v1";
|
|
76
|
+
};
|
|
77
|
+
export type CustomWebhookIntegrationEventTypesEnum = typeof CustomWebhookIntegrationEventTypesEnum[keyof typeof CustomWebhookIntegrationEventTypesEnum];
|
|
78
|
+
/**
|
|
79
|
+
* Check if a given object implements the CustomWebhookIntegration interface.
|
|
80
|
+
*/
|
|
81
|
+
export declare function instanceOfCustomWebhookIntegration(value: object): value is CustomWebhookIntegration;
|
|
82
|
+
export declare function CustomWebhookIntegrationFromJSON(json: any): CustomWebhookIntegration;
|
|
83
|
+
export declare function CustomWebhookIntegrationFromJSONTyped(json: any, ignoreDiscriminator: boolean): CustomWebhookIntegration;
|
|
84
|
+
export declare function CustomWebhookIntegrationToJSON(json: any): CustomWebhookIntegration;
|
|
85
|
+
export declare function CustomWebhookIntegrationToJSONTyped(value?: CustomWebhookIntegration | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
/**
|
|
15
|
+
* @export
|
|
16
|
+
*/
|
|
17
|
+
export const CustomWebhookIntegrationEventTypesEnum = {
|
|
18
|
+
ComEdaxuEnrollmentEnrolledV1: 'com.edaxu.enrollment.enrolled.v1',
|
|
19
|
+
ComEdaxuEnrollmentCompletedV1: 'com.edaxu.enrollment.completed.v1',
|
|
20
|
+
ComEdaxuCertificateIssuedV1: 'com.edaxu.certificate.issued.v1',
|
|
21
|
+
ComEdaxuPortalUserInvitedV1: 'com.edaxu.portal.user_invited.v1',
|
|
22
|
+
ComEdaxuPortalUserJoinedV1: 'com.edaxu.portal.user_joined.v1'
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* Check if a given object implements the CustomWebhookIntegration interface.
|
|
26
|
+
*/
|
|
27
|
+
export function instanceOfCustomWebhookIntegration(value) {
|
|
28
|
+
if (!('id' in value) || value['id'] === undefined)
|
|
29
|
+
return false;
|
|
30
|
+
if (!('name' in value) || value['name'] === undefined)
|
|
31
|
+
return false;
|
|
32
|
+
if (!('targetUrl' in value) || value['targetUrl'] === undefined)
|
|
33
|
+
return false;
|
|
34
|
+
if (!('eventTypes' in value) || value['eventTypes'] === undefined)
|
|
35
|
+
return false;
|
|
36
|
+
if (!('enabled' in value) || value['enabled'] === undefined)
|
|
37
|
+
return false;
|
|
38
|
+
if (!('tokenConfigured' in value) || value['tokenConfigured'] === undefined)
|
|
39
|
+
return false;
|
|
40
|
+
if (!('createdAt' in value) || value['createdAt'] === undefined)
|
|
41
|
+
return false;
|
|
42
|
+
if (!('updatedAt' in value) || value['updatedAt'] === undefined)
|
|
43
|
+
return false;
|
|
44
|
+
return true;
|
|
45
|
+
}
|
|
46
|
+
export function CustomWebhookIntegrationFromJSON(json) {
|
|
47
|
+
return CustomWebhookIntegrationFromJSONTyped(json, false);
|
|
48
|
+
}
|
|
49
|
+
export function CustomWebhookIntegrationFromJSONTyped(json, ignoreDiscriminator) {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
'id': json['id'],
|
|
55
|
+
'name': json['name'],
|
|
56
|
+
'targetUrl': json['target_url'],
|
|
57
|
+
'eventTypes': new Set(json['event_types']),
|
|
58
|
+
'enabled': json['enabled'],
|
|
59
|
+
'tokenConfigured': json['token_configured'],
|
|
60
|
+
'createdAt': (new Date(json['created_at'])),
|
|
61
|
+
'updatedAt': (new Date(json['updated_at'])),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
export function CustomWebhookIntegrationToJSON(json) {
|
|
65
|
+
return CustomWebhookIntegrationToJSONTyped(json, false);
|
|
66
|
+
}
|
|
67
|
+
export function CustomWebhookIntegrationToJSONTyped(value, ignoreDiscriminator = false) {
|
|
68
|
+
if (value == null) {
|
|
69
|
+
return value;
|
|
70
|
+
}
|
|
71
|
+
return {
|
|
72
|
+
'id': value['id'],
|
|
73
|
+
'name': value['name'],
|
|
74
|
+
'target_url': value['targetUrl'],
|
|
75
|
+
'event_types': Array.from(value['eventTypes']),
|
|
76
|
+
'enabled': value['enabled'],
|
|
77
|
+
'token_configured': value['tokenConfigured'],
|
|
78
|
+
'created_at': value['createdAt'].toISOString(),
|
|
79
|
+
'updated_at': value['updatedAt'].toISOString(),
|
|
80
|
+
};
|
|
81
|
+
}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { IntegrationEventData } from './IntegrationEventData';
|
|
13
|
+
/**
|
|
14
|
+
* A CloudEvents 1.0 structured JSON event emitted by Edaxu.
|
|
15
|
+
* @export
|
|
16
|
+
* @interface IntegrationEvent
|
|
17
|
+
*/
|
|
18
|
+
export interface IntegrationEvent {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {IntegrationEventSpecversionEnum}
|
|
22
|
+
* @memberof IntegrationEvent
|
|
23
|
+
*/
|
|
24
|
+
specversion: IntegrationEventSpecversionEnum;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {string}
|
|
28
|
+
* @memberof IntegrationEvent
|
|
29
|
+
*/
|
|
30
|
+
id: string;
|
|
31
|
+
/**
|
|
32
|
+
* Stable URI identifying the portal event source.
|
|
33
|
+
* @type {string}
|
|
34
|
+
* @memberof IntegrationEvent
|
|
35
|
+
*/
|
|
36
|
+
source: string;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {IntegrationEventTypeEnum}
|
|
40
|
+
* @memberof IntegrationEvent
|
|
41
|
+
*/
|
|
42
|
+
type: IntegrationEventTypeEnum;
|
|
43
|
+
/**
|
|
44
|
+
*
|
|
45
|
+
* @type {Date}
|
|
46
|
+
* @memberof IntegrationEvent
|
|
47
|
+
*/
|
|
48
|
+
time: Date;
|
|
49
|
+
/**
|
|
50
|
+
*
|
|
51
|
+
* @type {string}
|
|
52
|
+
* @memberof IntegrationEvent
|
|
53
|
+
*/
|
|
54
|
+
subject: string;
|
|
55
|
+
/**
|
|
56
|
+
*
|
|
57
|
+
* @type {IntegrationEventDatacontenttypeEnum}
|
|
58
|
+
* @memberof IntegrationEvent
|
|
59
|
+
*/
|
|
60
|
+
datacontenttype: IntegrationEventDatacontenttypeEnum;
|
|
61
|
+
/**
|
|
62
|
+
*
|
|
63
|
+
* @type {IntegrationEventData}
|
|
64
|
+
* @memberof IntegrationEvent
|
|
65
|
+
*/
|
|
66
|
+
data: IntegrationEventData;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* @export
|
|
70
|
+
*/
|
|
71
|
+
export declare const IntegrationEventSpecversionEnum: {
|
|
72
|
+
readonly _10: "1.0";
|
|
73
|
+
};
|
|
74
|
+
export type IntegrationEventSpecversionEnum = typeof IntegrationEventSpecversionEnum[keyof typeof IntegrationEventSpecversionEnum];
|
|
75
|
+
/**
|
|
76
|
+
* @export
|
|
77
|
+
*/
|
|
78
|
+
export declare const IntegrationEventTypeEnum: {
|
|
79
|
+
readonly ComEdaxuEnrollmentEnrolledV1: "com.edaxu.enrollment.enrolled.v1";
|
|
80
|
+
readonly ComEdaxuEnrollmentCompletedV1: "com.edaxu.enrollment.completed.v1";
|
|
81
|
+
readonly ComEdaxuCertificateIssuedV1: "com.edaxu.certificate.issued.v1";
|
|
82
|
+
readonly ComEdaxuPortalUserInvitedV1: "com.edaxu.portal.user_invited.v1";
|
|
83
|
+
readonly ComEdaxuPortalUserJoinedV1: "com.edaxu.portal.user_joined.v1";
|
|
84
|
+
};
|
|
85
|
+
export type IntegrationEventTypeEnum = typeof IntegrationEventTypeEnum[keyof typeof IntegrationEventTypeEnum];
|
|
86
|
+
/**
|
|
87
|
+
* @export
|
|
88
|
+
*/
|
|
89
|
+
export declare const IntegrationEventDatacontenttypeEnum: {
|
|
90
|
+
readonly ApplicationJson: "application/json";
|
|
91
|
+
};
|
|
92
|
+
export type IntegrationEventDatacontenttypeEnum = typeof IntegrationEventDatacontenttypeEnum[keyof typeof IntegrationEventDatacontenttypeEnum];
|
|
93
|
+
/**
|
|
94
|
+
* Check if a given object implements the IntegrationEvent interface.
|
|
95
|
+
*/
|
|
96
|
+
export declare function instanceOfIntegrationEvent(value: object): value is IntegrationEvent;
|
|
97
|
+
export declare function IntegrationEventFromJSON(json: any): IntegrationEvent;
|
|
98
|
+
export declare function IntegrationEventFromJSONTyped(json: any, ignoreDiscriminator: boolean): IntegrationEvent;
|
|
99
|
+
export declare function IntegrationEventToJSON(json: any): IntegrationEvent;
|
|
100
|
+
export declare function IntegrationEventToJSONTyped(value?: IntegrationEvent | null, ignoreDiscriminator?: boolean): any;
|