@easyedu/js-lsm-api 1.116.0 → 1.117.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 +24 -0
- package/README.md +21 -2
- package/dist/apis/IntegrationApi.d.ts +125 -0
- package/dist/apis/IntegrationApi.js +330 -1
- package/dist/esm/apis/IntegrationApi.d.ts +125 -0
- package/dist/esm/apis/IntegrationApi.js +329 -0
- package/dist/esm/models/CustomWebhookIntegration.d.ts +83 -0
- package/dist/esm/models/CustomWebhookIntegration.js +79 -0
- package/dist/esm/models/IntegrationEvent.d.ts +98 -0
- package/dist/esm/models/IntegrationEvent.js +92 -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 +61 -0
- package/dist/esm/models/IntegrationEventData.js +64 -0
- package/dist/esm/models/IntegrationEventEnrollment.d.ts +71 -0
- package/dist/esm/models/IntegrationEventEnrollment.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/PostCustomWebhookIntegration.d.ts +65 -0
- package/dist/esm/models/PostCustomWebhookIntegration.js +65 -0
- package/dist/esm/models/PostZapierSubscription.d.ts +53 -0
- package/dist/esm/models/PostZapierSubscription.js +57 -0
- package/dist/esm/models/PutCustomWebhookIntegration.d.ts +65 -0
- package/dist/esm/models/PutCustomWebhookIntegration.js +57 -0
- package/dist/esm/models/ZapierSubscription.d.ts +53 -0
- package/dist/esm/models/ZapierSubscription.js +59 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -0
- package/dist/models/CustomWebhookIntegration.d.ts +83 -0
- package/dist/models/CustomWebhookIntegration.js +87 -0
- package/dist/models/IntegrationEvent.d.ts +98 -0
- package/dist/models/IntegrationEvent.js +100 -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 +61 -0
- package/dist/models/IntegrationEventData.js +71 -0
- package/dist/models/IntegrationEventEnrollment.d.ts +71 -0
- package/dist/models/IntegrationEventEnrollment.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/PostCustomWebhookIntegration.d.ts +65 -0
- package/dist/models/PostCustomWebhookIntegration.js +73 -0
- package/dist/models/PostZapierSubscription.d.ts +53 -0
- package/dist/models/PostZapierSubscription.js +65 -0
- package/dist/models/PutCustomWebhookIntegration.d.ts +65 -0
- package/dist/models/PutCustomWebhookIntegration.js +65 -0
- package/dist/models/ZapierSubscription.d.ts +53 -0
- package/dist/models/ZapierSubscription.js +67 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -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 +42 -0
- package/docs/IntegrationEventEnrollment.md +44 -0
- package/docs/IntegrationEventLearner.md +40 -0
- package/docs/IntegrationEventPortal.md +38 -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 +464 -0
- package/src/models/CustomWebhookIntegration.ts +141 -0
- package/src/models/IntegrationEvent.ts +165 -0
- package/src/models/IntegrationEventCertificate.ts +133 -0
- package/src/models/IntegrationEventCourse.ts +75 -0
- package/src/models/IntegrationEventData.ts +138 -0
- package/src/models/IntegrationEventEnrollment.ts +123 -0
- package/src/models/IntegrationEventLearner.ts +93 -0
- package/src/models/IntegrationEventPortal.ts +84 -0
- package/src/models/PostCustomWebhookIntegration.ts +113 -0
- package/src/models/PostZapierSubscription.ts +95 -0
- package/src/models/PutCustomWebhookIntegration.ts +109 -0
- package/src/models/ZapierSubscription.ts +96 -0
- package/src/models/index.ts +12 -0
package/docs/IntegrationApi.md
CHANGED
|
@@ -4,21 +4,95 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
4
4
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
|
+
| [**deleteCustomWebhookIntegration**](IntegrationApi.md#deletecustomwebhookintegration) | **DELETE** /integrations/webhooks/{webhookIntegrationId} | Delete a custom webhook destination |
|
|
7
8
|
| [**deleteZapierSetup**](IntegrationApi.md#deletezapiersetup) | **DELETE** /integrations/zapier/setup/{zapierIntegrationId} | Revoke a Zapier connection and its API key |
|
|
9
|
+
| [**deleteZapierSubscription**](IntegrationApi.md#deletezapiersubscription) | **DELETE** /integrations/zapier/subscriptions/{subscriptionId} | Unsubscribe a Zap from an Edaxu lifecycle event |
|
|
10
|
+
| [**getCustomWebhookIntegrations**](IntegrationApi.md#getcustomwebhookintegrations) | **GET** /integrations/webhooks | List custom webhook destinations for the selected portal |
|
|
8
11
|
| [**getZapierCourses**](IntegrationApi.md#getzapiercourses) | **GET** /integrations/zapier/courses | List published courses available to a Zapier connection |
|
|
12
|
+
| [**getZapierEvents**](IntegrationApi.md#getzapierevents) | **GET** /integrations/zapier/events | List recent lifecycle events for Zapier trigger setup |
|
|
9
13
|
| [**getZapierMe**](IntegrationApi.md#getzapierme) | **GET** /integrations/zapier/me | Test a Zapier API key and return its portal and enabled permissions |
|
|
10
14
|
| [**getZapierSetup**](IntegrationApi.md#getzapiersetup) | **GET** /integrations/zapier/setup | List Zapier connections and permissions available to the selected portal |
|
|
11
15
|
| [**getZapierShopifyCourseMappings**](IntegrationApi.md#getzapiershopifycoursemappings) | **GET** /integrations/zapier/shopify/course-mappings | List Shopify variant-to-course mappings |
|
|
12
16
|
| [**getZapierUsers**](IntegrationApi.md#getzapierusers) | **GET** /integrations/zapier/users | Find a learner by exact email address |
|
|
17
|
+
| [**postCustomWebhookIntegration**](IntegrationApi.md#postcustomwebhookintegration) | **POST** /integrations/webhooks | Create a custom webhook destination for lifecycle events |
|
|
13
18
|
| [**postZapierEnrollment**](IntegrationApi.md#postzapierenrollment) | **POST** /integrations/zapier/enrollments | Enroll an existing learner in a course |
|
|
14
19
|
| [**postZapierSetup**](IntegrationApi.md#postzapiersetup) | **POST** /integrations/zapier/setup | Create a Zapier connection and API key for the selected portal |
|
|
15
20
|
| [**postZapierShopifyCourseMapping**](IntegrationApi.md#postzapiershopifycoursemapping) | **POST** /integrations/zapier/shopify/course-mappings | Create or update a Shopify variant-to-course mapping |
|
|
16
21
|
| [**postZapierShopifyEnrollment**](IntegrationApi.md#postzapiershopifyenrollment) | **POST** /integrations/zapier/shopify/enrollments | Find or invite a Shopify customer and enroll them using the purchased variant mapping |
|
|
22
|
+
| [**postZapierSubscription**](IntegrationApi.md#postzapiersubscription) | **POST** /integrations/zapier/subscriptions | Subscribe a Zap to an Edaxu lifecycle event |
|
|
17
23
|
| [**postZapierUser**](IntegrationApi.md#postzapieruser) | **POST** /integrations/zapier/users | Find or invite a learner to the connected portal |
|
|
24
|
+
| [**putCustomWebhookIntegration**](IntegrationApi.md#putcustomwebhookintegration) | **PUT** /integrations/webhooks/{webhookIntegrationId} | Update a custom webhook destination |
|
|
18
25
|
| [**putZapierSetup**](IntegrationApi.md#putzapiersetup) | **PUT** /integrations/zapier/setup/{zapierIntegrationId} | Update a Zapier connection\'s name or permissions |
|
|
19
26
|
|
|
20
27
|
|
|
21
28
|
|
|
29
|
+
## deleteCustomWebhookIntegration
|
|
30
|
+
|
|
31
|
+
> deleteCustomWebhookIntegration(webhookIntegrationId)
|
|
32
|
+
|
|
33
|
+
Delete a custom webhook destination
|
|
34
|
+
|
|
35
|
+
### Example
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import {
|
|
39
|
+
Configuration,
|
|
40
|
+
IntegrationApi,
|
|
41
|
+
} from '@easyedu/js-lsm-api';
|
|
42
|
+
import type { DeleteCustomWebhookIntegrationRequest } from '@easyedu/js-lsm-api';
|
|
43
|
+
|
|
44
|
+
async function example() {
|
|
45
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
46
|
+
const api = new IntegrationApi();
|
|
47
|
+
|
|
48
|
+
const body = {
|
|
49
|
+
// string
|
|
50
|
+
webhookIntegrationId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
51
|
+
} satisfies DeleteCustomWebhookIntegrationRequest;
|
|
52
|
+
|
|
53
|
+
try {
|
|
54
|
+
const data = await api.deleteCustomWebhookIntegration(body);
|
|
55
|
+
console.log(data);
|
|
56
|
+
} catch (error) {
|
|
57
|
+
console.error(error);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
// Run the test
|
|
62
|
+
example().catch(console.error);
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
### Parameters
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
| Name | Type | Description | Notes |
|
|
69
|
+
|------------- | ------------- | ------------- | -------------|
|
|
70
|
+
| **webhookIntegrationId** | `string` | | [Defaults to `undefined`] |
|
|
71
|
+
|
|
72
|
+
### Return type
|
|
73
|
+
|
|
74
|
+
`void` (Empty response body)
|
|
75
|
+
|
|
76
|
+
### Authorization
|
|
77
|
+
|
|
78
|
+
No authorization required
|
|
79
|
+
|
|
80
|
+
### HTTP request headers
|
|
81
|
+
|
|
82
|
+
- **Content-Type**: Not defined
|
|
83
|
+
- **Accept**: Not defined
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
### HTTP response details
|
|
87
|
+
| Status code | Description | Response headers |
|
|
88
|
+
|-------------|-------------|------------------|
|
|
89
|
+
| **204** | Custom webhook destination deleted | - |
|
|
90
|
+
| **403** | Forbidden | - |
|
|
91
|
+
| **404** | Custom webhook destination not found | - |
|
|
92
|
+
|
|
93
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
94
|
+
|
|
95
|
+
|
|
22
96
|
## deleteZapierSetup
|
|
23
97
|
|
|
24
98
|
> deleteZapierSetup(zapierIntegrationId)
|
|
@@ -86,6 +160,136 @@ No authorization required
|
|
|
86
160
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
87
161
|
|
|
88
162
|
|
|
163
|
+
## deleteZapierSubscription
|
|
164
|
+
|
|
165
|
+
> deleteZapierSubscription(subscriptionId, xAPIKEY, xPORTALSUBDOMAIN)
|
|
166
|
+
|
|
167
|
+
Unsubscribe a Zap from an Edaxu lifecycle event
|
|
168
|
+
|
|
169
|
+
### Example
|
|
170
|
+
|
|
171
|
+
```ts
|
|
172
|
+
import {
|
|
173
|
+
Configuration,
|
|
174
|
+
IntegrationApi,
|
|
175
|
+
} from '@easyedu/js-lsm-api';
|
|
176
|
+
import type { DeleteZapierSubscriptionRequest } from '@easyedu/js-lsm-api';
|
|
177
|
+
|
|
178
|
+
async function example() {
|
|
179
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
180
|
+
const api = new IntegrationApi();
|
|
181
|
+
|
|
182
|
+
const body = {
|
|
183
|
+
// string
|
|
184
|
+
subscriptionId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
185
|
+
// string
|
|
186
|
+
xAPIKEY: xAPIKEY_example,
|
|
187
|
+
// string
|
|
188
|
+
xPORTALSUBDOMAIN: xPORTALSUBDOMAIN_example,
|
|
189
|
+
} satisfies DeleteZapierSubscriptionRequest;
|
|
190
|
+
|
|
191
|
+
try {
|
|
192
|
+
const data = await api.deleteZapierSubscription(body);
|
|
193
|
+
console.log(data);
|
|
194
|
+
} catch (error) {
|
|
195
|
+
console.error(error);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
// Run the test
|
|
200
|
+
example().catch(console.error);
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### Parameters
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
| Name | Type | Description | Notes |
|
|
207
|
+
|------------- | ------------- | ------------- | -------------|
|
|
208
|
+
| **subscriptionId** | `string` | | [Defaults to `undefined`] |
|
|
209
|
+
| **xAPIKEY** | `string` | | [Defaults to `undefined`] |
|
|
210
|
+
| **xPORTALSUBDOMAIN** | `string` | | [Defaults to `undefined`] |
|
|
211
|
+
|
|
212
|
+
### Return type
|
|
213
|
+
|
|
214
|
+
`void` (Empty response body)
|
|
215
|
+
|
|
216
|
+
### Authorization
|
|
217
|
+
|
|
218
|
+
No authorization required
|
|
219
|
+
|
|
220
|
+
### HTTP request headers
|
|
221
|
+
|
|
222
|
+
- **Content-Type**: Not defined
|
|
223
|
+
- **Accept**: Not defined
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
### HTTP response details
|
|
227
|
+
| Status code | Description | Response headers |
|
|
228
|
+
|-------------|-------------|------------------|
|
|
229
|
+
| **204** | Subscription is inactive | - |
|
|
230
|
+
| **401** | Missing, invalid, or revoked API key | - |
|
|
231
|
+
|
|
232
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
233
|
+
|
|
234
|
+
|
|
235
|
+
## getCustomWebhookIntegrations
|
|
236
|
+
|
|
237
|
+
> Array<CustomWebhookIntegration> getCustomWebhookIntegrations()
|
|
238
|
+
|
|
239
|
+
List custom webhook destinations for the selected portal
|
|
240
|
+
|
|
241
|
+
### Example
|
|
242
|
+
|
|
243
|
+
```ts
|
|
244
|
+
import {
|
|
245
|
+
Configuration,
|
|
246
|
+
IntegrationApi,
|
|
247
|
+
} from '@easyedu/js-lsm-api';
|
|
248
|
+
import type { GetCustomWebhookIntegrationsRequest } from '@easyedu/js-lsm-api';
|
|
249
|
+
|
|
250
|
+
async function example() {
|
|
251
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
252
|
+
const api = new IntegrationApi();
|
|
253
|
+
|
|
254
|
+
try {
|
|
255
|
+
const data = await api.getCustomWebhookIntegrations();
|
|
256
|
+
console.log(data);
|
|
257
|
+
} catch (error) {
|
|
258
|
+
console.error(error);
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
|
|
262
|
+
// Run the test
|
|
263
|
+
example().catch(console.error);
|
|
264
|
+
```
|
|
265
|
+
|
|
266
|
+
### Parameters
|
|
267
|
+
|
|
268
|
+
This endpoint does not need any parameter.
|
|
269
|
+
|
|
270
|
+
### Return type
|
|
271
|
+
|
|
272
|
+
[**Array<CustomWebhookIntegration>**](CustomWebhookIntegration.md)
|
|
273
|
+
|
|
274
|
+
### Authorization
|
|
275
|
+
|
|
276
|
+
No authorization required
|
|
277
|
+
|
|
278
|
+
### HTTP request headers
|
|
279
|
+
|
|
280
|
+
- **Content-Type**: Not defined
|
|
281
|
+
- **Accept**: `application/json`
|
|
282
|
+
|
|
283
|
+
|
|
284
|
+
### HTTP response details
|
|
285
|
+
| Status code | Description | Response headers |
|
|
286
|
+
|-------------|-------------|------------------|
|
|
287
|
+
| **200** | Custom webhook destinations | - |
|
|
288
|
+
| **403** | Forbidden | - |
|
|
289
|
+
|
|
290
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
291
|
+
|
|
292
|
+
|
|
89
293
|
## getZapierCourses
|
|
90
294
|
|
|
91
295
|
> GetZapierCourses getZapierCourses(xAPIKEY, xPORTALSUBDOMAIN, page, pageSize, search)
|
|
@@ -165,6 +369,83 @@ No authorization required
|
|
|
165
369
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
166
370
|
|
|
167
371
|
|
|
372
|
+
## getZapierEvents
|
|
373
|
+
|
|
374
|
+
> Array<IntegrationEvent> getZapierEvents(xAPIKEY, xPORTALSUBDOMAIN, eventType, pageSize)
|
|
375
|
+
|
|
376
|
+
List recent lifecycle events for Zapier trigger setup
|
|
377
|
+
|
|
378
|
+
### Example
|
|
379
|
+
|
|
380
|
+
```ts
|
|
381
|
+
import {
|
|
382
|
+
Configuration,
|
|
383
|
+
IntegrationApi,
|
|
384
|
+
} from '@easyedu/js-lsm-api';
|
|
385
|
+
import type { GetZapierEventsRequest } from '@easyedu/js-lsm-api';
|
|
386
|
+
|
|
387
|
+
async function example() {
|
|
388
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
389
|
+
const api = new IntegrationApi();
|
|
390
|
+
|
|
391
|
+
const body = {
|
|
392
|
+
// string
|
|
393
|
+
xAPIKEY: xAPIKEY_example,
|
|
394
|
+
// string
|
|
395
|
+
xPORTALSUBDOMAIN: xPORTALSUBDOMAIN_example,
|
|
396
|
+
// 'com.edaxu.enrollment.enrolled.v1' | 'com.edaxu.enrollment.completed.v1' | 'com.edaxu.certificate.issued.v1'
|
|
397
|
+
eventType: eventType_example,
|
|
398
|
+
// number (optional)
|
|
399
|
+
pageSize: 56,
|
|
400
|
+
} satisfies GetZapierEventsRequest;
|
|
401
|
+
|
|
402
|
+
try {
|
|
403
|
+
const data = await api.getZapierEvents(body);
|
|
404
|
+
console.log(data);
|
|
405
|
+
} catch (error) {
|
|
406
|
+
console.error(error);
|
|
407
|
+
}
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
// Run the test
|
|
411
|
+
example().catch(console.error);
|
|
412
|
+
```
|
|
413
|
+
|
|
414
|
+
### Parameters
|
|
415
|
+
|
|
416
|
+
|
|
417
|
+
| Name | Type | Description | Notes |
|
|
418
|
+
|------------- | ------------- | ------------- | -------------|
|
|
419
|
+
| **xAPIKEY** | `string` | | [Defaults to `undefined`] |
|
|
420
|
+
| **xPORTALSUBDOMAIN** | `string` | | [Defaults to `undefined`] |
|
|
421
|
+
| **eventType** | `com.edaxu.enrollment.enrolled.v1`, `com.edaxu.enrollment.completed.v1`, `com.edaxu.certificate.issued.v1` | | [Defaults to `undefined`] [Enum: com.edaxu.enrollment.enrolled.v1, com.edaxu.enrollment.completed.v1, com.edaxu.certificate.issued.v1] |
|
|
422
|
+
| **pageSize** | `number` | | [Optional] [Defaults to `3`] |
|
|
423
|
+
|
|
424
|
+
### Return type
|
|
425
|
+
|
|
426
|
+
[**Array<IntegrationEvent>**](IntegrationEvent.md)
|
|
427
|
+
|
|
428
|
+
### Authorization
|
|
429
|
+
|
|
430
|
+
No authorization required
|
|
431
|
+
|
|
432
|
+
### HTTP request headers
|
|
433
|
+
|
|
434
|
+
- **Content-Type**: Not defined
|
|
435
|
+
- **Accept**: `application/json`
|
|
436
|
+
|
|
437
|
+
|
|
438
|
+
### HTTP response details
|
|
439
|
+
| Status code | Description | Response headers |
|
|
440
|
+
|-------------|-------------|------------------|
|
|
441
|
+
| **200** | Recent matching events, newest first | - |
|
|
442
|
+
| **400** | Unsupported event type | - |
|
|
443
|
+
| **401** | Missing, invalid, or revoked API key | - |
|
|
444
|
+
| **403** | The API key lacks the permission required for the event type | - |
|
|
445
|
+
|
|
446
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
447
|
+
|
|
448
|
+
|
|
168
449
|
## getZapierMe
|
|
169
450
|
|
|
170
451
|
> GetZapierMe getZapierMe(xAPIKEY, xPORTALSUBDOMAIN)
|
|
@@ -439,6 +720,73 @@ No authorization required
|
|
|
439
720
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
440
721
|
|
|
441
722
|
|
|
723
|
+
## postCustomWebhookIntegration
|
|
724
|
+
|
|
725
|
+
> CustomWebhookIntegration postCustomWebhookIntegration(postCustomWebhookIntegration)
|
|
726
|
+
|
|
727
|
+
Create a custom webhook destination for lifecycle events
|
|
728
|
+
|
|
729
|
+
### Example
|
|
730
|
+
|
|
731
|
+
```ts
|
|
732
|
+
import {
|
|
733
|
+
Configuration,
|
|
734
|
+
IntegrationApi,
|
|
735
|
+
} from '@easyedu/js-lsm-api';
|
|
736
|
+
import type { PostCustomWebhookIntegrationRequest } from '@easyedu/js-lsm-api';
|
|
737
|
+
|
|
738
|
+
async function example() {
|
|
739
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
740
|
+
const api = new IntegrationApi();
|
|
741
|
+
|
|
742
|
+
const body = {
|
|
743
|
+
// PostCustomWebhookIntegration
|
|
744
|
+
postCustomWebhookIntegration: ...,
|
|
745
|
+
} satisfies PostCustomWebhookIntegrationRequest;
|
|
746
|
+
|
|
747
|
+
try {
|
|
748
|
+
const data = await api.postCustomWebhookIntegration(body);
|
|
749
|
+
console.log(data);
|
|
750
|
+
} catch (error) {
|
|
751
|
+
console.error(error);
|
|
752
|
+
}
|
|
753
|
+
}
|
|
754
|
+
|
|
755
|
+
// Run the test
|
|
756
|
+
example().catch(console.error);
|
|
757
|
+
```
|
|
758
|
+
|
|
759
|
+
### Parameters
|
|
760
|
+
|
|
761
|
+
|
|
762
|
+
| Name | Type | Description | Notes |
|
|
763
|
+
|------------- | ------------- | ------------- | -------------|
|
|
764
|
+
| **postCustomWebhookIntegration** | [PostCustomWebhookIntegration](PostCustomWebhookIntegration.md) | | |
|
|
765
|
+
|
|
766
|
+
### Return type
|
|
767
|
+
|
|
768
|
+
[**CustomWebhookIntegration**](CustomWebhookIntegration.md)
|
|
769
|
+
|
|
770
|
+
### Authorization
|
|
771
|
+
|
|
772
|
+
No authorization required
|
|
773
|
+
|
|
774
|
+
### HTTP request headers
|
|
775
|
+
|
|
776
|
+
- **Content-Type**: `application/json`
|
|
777
|
+
- **Accept**: `application/json`
|
|
778
|
+
|
|
779
|
+
|
|
780
|
+
### HTTP response details
|
|
781
|
+
| Status code | Description | Response headers |
|
|
782
|
+
|-------------|-------------|------------------|
|
|
783
|
+
| **201** | Custom webhook destination created | - |
|
|
784
|
+
| **400** | Invalid destination, token, or event selection | - |
|
|
785
|
+
| **403** | Forbidden | - |
|
|
786
|
+
|
|
787
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
788
|
+
|
|
789
|
+
|
|
442
790
|
## postZapierEnrollment
|
|
443
791
|
|
|
444
792
|
> ZapierEnrollment postZapierEnrollment(xAPIKEY, xPORTALSUBDOMAIN, postZapierEnrollment)
|
|
@@ -735,6 +1083,81 @@ No authorization required
|
|
|
735
1083
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
736
1084
|
|
|
737
1085
|
|
|
1086
|
+
## postZapierSubscription
|
|
1087
|
+
|
|
1088
|
+
> ZapierSubscription postZapierSubscription(xAPIKEY, xPORTALSUBDOMAIN, postZapierSubscription)
|
|
1089
|
+
|
|
1090
|
+
Subscribe a Zap to an Edaxu lifecycle event
|
|
1091
|
+
|
|
1092
|
+
### Example
|
|
1093
|
+
|
|
1094
|
+
```ts
|
|
1095
|
+
import {
|
|
1096
|
+
Configuration,
|
|
1097
|
+
IntegrationApi,
|
|
1098
|
+
} from '@easyedu/js-lsm-api';
|
|
1099
|
+
import type { PostZapierSubscriptionRequest } from '@easyedu/js-lsm-api';
|
|
1100
|
+
|
|
1101
|
+
async function example() {
|
|
1102
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1103
|
+
const api = new IntegrationApi();
|
|
1104
|
+
|
|
1105
|
+
const body = {
|
|
1106
|
+
// string
|
|
1107
|
+
xAPIKEY: xAPIKEY_example,
|
|
1108
|
+
// string
|
|
1109
|
+
xPORTALSUBDOMAIN: xPORTALSUBDOMAIN_example,
|
|
1110
|
+
// PostZapierSubscription
|
|
1111
|
+
postZapierSubscription: ...,
|
|
1112
|
+
} satisfies PostZapierSubscriptionRequest;
|
|
1113
|
+
|
|
1114
|
+
try {
|
|
1115
|
+
const data = await api.postZapierSubscription(body);
|
|
1116
|
+
console.log(data);
|
|
1117
|
+
} catch (error) {
|
|
1118
|
+
console.error(error);
|
|
1119
|
+
}
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
// Run the test
|
|
1123
|
+
example().catch(console.error);
|
|
1124
|
+
```
|
|
1125
|
+
|
|
1126
|
+
### Parameters
|
|
1127
|
+
|
|
1128
|
+
|
|
1129
|
+
| Name | Type | Description | Notes |
|
|
1130
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1131
|
+
| **xAPIKEY** | `string` | | [Defaults to `undefined`] |
|
|
1132
|
+
| **xPORTALSUBDOMAIN** | `string` | | [Defaults to `undefined`] |
|
|
1133
|
+
| **postZapierSubscription** | [PostZapierSubscription](PostZapierSubscription.md) | | |
|
|
1134
|
+
|
|
1135
|
+
### Return type
|
|
1136
|
+
|
|
1137
|
+
[**ZapierSubscription**](ZapierSubscription.md)
|
|
1138
|
+
|
|
1139
|
+
### Authorization
|
|
1140
|
+
|
|
1141
|
+
No authorization required
|
|
1142
|
+
|
|
1143
|
+
### HTTP request headers
|
|
1144
|
+
|
|
1145
|
+
- **Content-Type**: `application/json`
|
|
1146
|
+
- **Accept**: `application/json`
|
|
1147
|
+
|
|
1148
|
+
|
|
1149
|
+
### HTTP response details
|
|
1150
|
+
| Status code | Description | Response headers |
|
|
1151
|
+
|-------------|-------------|------------------|
|
|
1152
|
+
| **200** | Existing matching subscription returned | - |
|
|
1153
|
+
| **201** | Zapier event subscription created | - |
|
|
1154
|
+
| **400** | Unsupported event type or target URL | - |
|
|
1155
|
+
| **401** | Missing, invalid, or revoked API key | - |
|
|
1156
|
+
| **403** | The API key lacks the permission required for the event type | - |
|
|
1157
|
+
|
|
1158
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1159
|
+
|
|
1160
|
+
|
|
738
1161
|
## postZapierUser
|
|
739
1162
|
|
|
740
1163
|
> ZapierUser postZapierUser(xAPIKEY, xPORTALSUBDOMAIN, postZapierUser)
|
|
@@ -810,6 +1233,77 @@ No authorization required
|
|
|
810
1233
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
811
1234
|
|
|
812
1235
|
|
|
1236
|
+
## putCustomWebhookIntegration
|
|
1237
|
+
|
|
1238
|
+
> CustomWebhookIntegration putCustomWebhookIntegration(webhookIntegrationId, putCustomWebhookIntegration)
|
|
1239
|
+
|
|
1240
|
+
Update a custom webhook destination
|
|
1241
|
+
|
|
1242
|
+
### Example
|
|
1243
|
+
|
|
1244
|
+
```ts
|
|
1245
|
+
import {
|
|
1246
|
+
Configuration,
|
|
1247
|
+
IntegrationApi,
|
|
1248
|
+
} from '@easyedu/js-lsm-api';
|
|
1249
|
+
import type { PutCustomWebhookIntegrationRequest } from '@easyedu/js-lsm-api';
|
|
1250
|
+
|
|
1251
|
+
async function example() {
|
|
1252
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
1253
|
+
const api = new IntegrationApi();
|
|
1254
|
+
|
|
1255
|
+
const body = {
|
|
1256
|
+
// string
|
|
1257
|
+
webhookIntegrationId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
1258
|
+
// PutCustomWebhookIntegration
|
|
1259
|
+
putCustomWebhookIntegration: ...,
|
|
1260
|
+
} satisfies PutCustomWebhookIntegrationRequest;
|
|
1261
|
+
|
|
1262
|
+
try {
|
|
1263
|
+
const data = await api.putCustomWebhookIntegration(body);
|
|
1264
|
+
console.log(data);
|
|
1265
|
+
} catch (error) {
|
|
1266
|
+
console.error(error);
|
|
1267
|
+
}
|
|
1268
|
+
}
|
|
1269
|
+
|
|
1270
|
+
// Run the test
|
|
1271
|
+
example().catch(console.error);
|
|
1272
|
+
```
|
|
1273
|
+
|
|
1274
|
+
### Parameters
|
|
1275
|
+
|
|
1276
|
+
|
|
1277
|
+
| Name | Type | Description | Notes |
|
|
1278
|
+
|------------- | ------------- | ------------- | -------------|
|
|
1279
|
+
| **webhookIntegrationId** | `string` | | [Defaults to `undefined`] |
|
|
1280
|
+
| **putCustomWebhookIntegration** | [PutCustomWebhookIntegration](PutCustomWebhookIntegration.md) | | |
|
|
1281
|
+
|
|
1282
|
+
### Return type
|
|
1283
|
+
|
|
1284
|
+
[**CustomWebhookIntegration**](CustomWebhookIntegration.md)
|
|
1285
|
+
|
|
1286
|
+
### Authorization
|
|
1287
|
+
|
|
1288
|
+
No authorization required
|
|
1289
|
+
|
|
1290
|
+
### HTTP request headers
|
|
1291
|
+
|
|
1292
|
+
- **Content-Type**: `application/json`
|
|
1293
|
+
- **Accept**: `application/json`
|
|
1294
|
+
|
|
1295
|
+
|
|
1296
|
+
### HTTP response details
|
|
1297
|
+
| Status code | Description | Response headers |
|
|
1298
|
+
|-------------|-------------|------------------|
|
|
1299
|
+
| **200** | Custom webhook destination updated | - |
|
|
1300
|
+
| **400** | Invalid destination, token, event selection, or empty update | - |
|
|
1301
|
+
| **403** | Forbidden | - |
|
|
1302
|
+
| **404** | Custom webhook destination not found | - |
|
|
1303
|
+
|
|
1304
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
1305
|
+
|
|
1306
|
+
|
|
813
1307
|
## putZapierSetup
|
|
814
1308
|
|
|
815
1309
|
> ZapierIntegration putZapierSetup(zapierIntegrationId, putZapierSetup)
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
|
|
2
|
+
# IntegrationEvent
|
|
3
|
+
|
|
4
|
+
A CloudEvents 1.0 structured JSON event emitted by Edaxu.
|
|
5
|
+
|
|
6
|
+
## Properties
|
|
7
|
+
|
|
8
|
+
Name | Type
|
|
9
|
+
------------ | -------------
|
|
10
|
+
`specversion` | string
|
|
11
|
+
`id` | string
|
|
12
|
+
`source` | string
|
|
13
|
+
`type` | string
|
|
14
|
+
`time` | Date
|
|
15
|
+
`subject` | string
|
|
16
|
+
`datacontenttype` | string
|
|
17
|
+
`data` | [IntegrationEventData](IntegrationEventData.md)
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import type { IntegrationEvent } from '@easyedu/js-lsm-api'
|
|
23
|
+
|
|
24
|
+
// TODO: Update the object below with actual values
|
|
25
|
+
const example = {
|
|
26
|
+
"specversion": null,
|
|
27
|
+
"id": null,
|
|
28
|
+
"source": null,
|
|
29
|
+
"type": null,
|
|
30
|
+
"time": null,
|
|
31
|
+
"subject": null,
|
|
32
|
+
"datacontenttype": null,
|
|
33
|
+
"data": null,
|
|
34
|
+
} satisfies IntegrationEvent
|
|
35
|
+
|
|
36
|
+
console.log(example)
|
|
37
|
+
|
|
38
|
+
// Convert the instance to a JSON string
|
|
39
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
40
|
+
console.log(exampleJSON)
|
|
41
|
+
|
|
42
|
+
// Parse the JSON string back to an object
|
|
43
|
+
const exampleParsed = JSON.parse(exampleJSON) as IntegrationEvent
|
|
44
|
+
console.log(exampleParsed)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
48
|
+
|
|
49
|
+
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
|
|
2
|
+
# IntegrationEventCertificate
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
`status` | string
|
|
11
|
+
`issuanceType` | string
|
|
12
|
+
`issuedAt` | Date
|
|
13
|
+
`expiresAt` | Date
|
|
14
|
+
`verificationUrl` | string
|
|
15
|
+
`enrollmentId` | string
|
|
16
|
+
|
|
17
|
+
## Example
|
|
18
|
+
|
|
19
|
+
```typescript
|
|
20
|
+
import type { IntegrationEventCertificate } from '@easyedu/js-lsm-api'
|
|
21
|
+
|
|
22
|
+
// TODO: Update the object below with actual values
|
|
23
|
+
const example = {
|
|
24
|
+
"id": null,
|
|
25
|
+
"status": null,
|
|
26
|
+
"issuanceType": null,
|
|
27
|
+
"issuedAt": null,
|
|
28
|
+
"expiresAt": null,
|
|
29
|
+
"verificationUrl": null,
|
|
30
|
+
"enrollmentId": null,
|
|
31
|
+
} satisfies IntegrationEventCertificate
|
|
32
|
+
|
|
33
|
+
console.log(example)
|
|
34
|
+
|
|
35
|
+
// Convert the instance to a JSON string
|
|
36
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
37
|
+
console.log(exampleJSON)
|
|
38
|
+
|
|
39
|
+
// Parse the JSON string back to an object
|
|
40
|
+
const exampleParsed = JSON.parse(exampleJSON) as IntegrationEventCertificate
|
|
41
|
+
console.log(exampleParsed)
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
45
|
+
|
|
46
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# IntegrationEventCourse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`id` | string
|
|
10
|
+
`name` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { IntegrationEventCourse } from '@easyedu/js-lsm-api'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"id": null,
|
|
20
|
+
"name": null,
|
|
21
|
+
} satisfies IntegrationEventCourse
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as IntegrationEventCourse
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|