@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
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type CustomWebhookIntegration,
|
|
18
|
+
CustomWebhookIntegrationFromJSON,
|
|
19
|
+
CustomWebhookIntegrationToJSON,
|
|
20
|
+
} from '../models/CustomWebhookIntegration';
|
|
16
21
|
import {
|
|
17
22
|
type GetZapierCourses,
|
|
18
23
|
GetZapierCoursesFromJSON,
|
|
@@ -38,6 +43,16 @@ import {
|
|
|
38
43
|
GetZapierUsersFromJSON,
|
|
39
44
|
GetZapierUsersToJSON,
|
|
40
45
|
} from '../models/GetZapierUsers';
|
|
46
|
+
import {
|
|
47
|
+
type IntegrationEvent,
|
|
48
|
+
IntegrationEventFromJSON,
|
|
49
|
+
IntegrationEventToJSON,
|
|
50
|
+
} from '../models/IntegrationEvent';
|
|
51
|
+
import {
|
|
52
|
+
type PostCustomWebhookIntegration,
|
|
53
|
+
PostCustomWebhookIntegrationFromJSON,
|
|
54
|
+
PostCustomWebhookIntegrationToJSON,
|
|
55
|
+
} from '../models/PostCustomWebhookIntegration';
|
|
41
56
|
import {
|
|
42
57
|
type PostZapierEnrollment,
|
|
43
58
|
PostZapierEnrollmentFromJSON,
|
|
@@ -68,11 +83,21 @@ import {
|
|
|
68
83
|
PostZapierShopifyEnrollmentResponseFromJSON,
|
|
69
84
|
PostZapierShopifyEnrollmentResponseToJSON,
|
|
70
85
|
} from '../models/PostZapierShopifyEnrollmentResponse';
|
|
86
|
+
import {
|
|
87
|
+
type PostZapierSubscription,
|
|
88
|
+
PostZapierSubscriptionFromJSON,
|
|
89
|
+
PostZapierSubscriptionToJSON,
|
|
90
|
+
} from '../models/PostZapierSubscription';
|
|
71
91
|
import {
|
|
72
92
|
type PostZapierUser,
|
|
73
93
|
PostZapierUserFromJSON,
|
|
74
94
|
PostZapierUserToJSON,
|
|
75
95
|
} from '../models/PostZapierUser';
|
|
96
|
+
import {
|
|
97
|
+
type PutCustomWebhookIntegration,
|
|
98
|
+
PutCustomWebhookIntegrationFromJSON,
|
|
99
|
+
PutCustomWebhookIntegrationToJSON,
|
|
100
|
+
} from '../models/PutCustomWebhookIntegration';
|
|
76
101
|
import {
|
|
77
102
|
type PutZapierSetup,
|
|
78
103
|
PutZapierSetupFromJSON,
|
|
@@ -93,16 +118,31 @@ import {
|
|
|
93
118
|
ZapierShopifyCourseMappingFromJSON,
|
|
94
119
|
ZapierShopifyCourseMappingToJSON,
|
|
95
120
|
} from '../models/ZapierShopifyCourseMapping';
|
|
121
|
+
import {
|
|
122
|
+
type ZapierSubscription,
|
|
123
|
+
ZapierSubscriptionFromJSON,
|
|
124
|
+
ZapierSubscriptionToJSON,
|
|
125
|
+
} from '../models/ZapierSubscription';
|
|
96
126
|
import {
|
|
97
127
|
type ZapierUser,
|
|
98
128
|
ZapierUserFromJSON,
|
|
99
129
|
ZapierUserToJSON,
|
|
100
130
|
} from '../models/ZapierUser';
|
|
101
131
|
|
|
132
|
+
export interface DeleteCustomWebhookIntegrationRequest {
|
|
133
|
+
webhookIntegrationId: string;
|
|
134
|
+
}
|
|
135
|
+
|
|
102
136
|
export interface DeleteZapierSetupRequest {
|
|
103
137
|
zapierIntegrationId: string;
|
|
104
138
|
}
|
|
105
139
|
|
|
140
|
+
export interface DeleteZapierSubscriptionRequest {
|
|
141
|
+
subscriptionId: string;
|
|
142
|
+
xAPIKEY: string;
|
|
143
|
+
xPORTALSUBDOMAIN: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
106
146
|
export interface GetZapierCoursesRequest {
|
|
107
147
|
xAPIKEY: string;
|
|
108
148
|
xPORTALSUBDOMAIN: string;
|
|
@@ -111,6 +151,13 @@ export interface GetZapierCoursesRequest {
|
|
|
111
151
|
search?: string;
|
|
112
152
|
}
|
|
113
153
|
|
|
154
|
+
export interface GetZapierEventsRequest {
|
|
155
|
+
xAPIKEY: string;
|
|
156
|
+
xPORTALSUBDOMAIN: string;
|
|
157
|
+
eventType: GetZapierEventsEventTypeEnum;
|
|
158
|
+
pageSize?: number;
|
|
159
|
+
}
|
|
160
|
+
|
|
114
161
|
export interface GetZapierMeRequest {
|
|
115
162
|
xAPIKEY: string;
|
|
116
163
|
xPORTALSUBDOMAIN: string;
|
|
@@ -128,6 +175,10 @@ export interface GetZapierUsersRequest {
|
|
|
128
175
|
email: string;
|
|
129
176
|
}
|
|
130
177
|
|
|
178
|
+
export interface PostCustomWebhookIntegrationRequest {
|
|
179
|
+
postCustomWebhookIntegration: PostCustomWebhookIntegration;
|
|
180
|
+
}
|
|
181
|
+
|
|
131
182
|
export interface PostZapierEnrollmentRequest {
|
|
132
183
|
xAPIKEY: string;
|
|
133
184
|
xPORTALSUBDOMAIN: string;
|
|
@@ -150,12 +201,23 @@ export interface PostZapierShopifyEnrollmentRequest {
|
|
|
150
201
|
postZapierShopifyEnrollment: PostZapierShopifyEnrollment;
|
|
151
202
|
}
|
|
152
203
|
|
|
204
|
+
export interface PostZapierSubscriptionRequest {
|
|
205
|
+
xAPIKEY: string;
|
|
206
|
+
xPORTALSUBDOMAIN: string;
|
|
207
|
+
postZapierSubscription: PostZapierSubscription;
|
|
208
|
+
}
|
|
209
|
+
|
|
153
210
|
export interface PostZapierUserRequest {
|
|
154
211
|
xAPIKEY: string;
|
|
155
212
|
xPORTALSUBDOMAIN: string;
|
|
156
213
|
postZapierUser: PostZapierUser;
|
|
157
214
|
}
|
|
158
215
|
|
|
216
|
+
export interface PutCustomWebhookIntegrationRequest {
|
|
217
|
+
webhookIntegrationId: string;
|
|
218
|
+
putCustomWebhookIntegration: PutCustomWebhookIntegration;
|
|
219
|
+
}
|
|
220
|
+
|
|
159
221
|
export interface PutZapierSetupRequest {
|
|
160
222
|
zapierIntegrationId: string;
|
|
161
223
|
putZapierSetup: PutZapierSetup;
|
|
@@ -166,6 +228,50 @@ export interface PutZapierSetupRequest {
|
|
|
166
228
|
*/
|
|
167
229
|
export class IntegrationApi extends runtime.BaseAPI {
|
|
168
230
|
|
|
231
|
+
/**
|
|
232
|
+
* Creates request options for deleteCustomWebhookIntegration without sending the request
|
|
233
|
+
*/
|
|
234
|
+
async deleteCustomWebhookIntegrationRequestOpts(requestParameters: DeleteCustomWebhookIntegrationRequest): Promise<runtime.RequestOpts> {
|
|
235
|
+
if (requestParameters['webhookIntegrationId'] == null) {
|
|
236
|
+
throw new runtime.RequiredError(
|
|
237
|
+
'webhookIntegrationId',
|
|
238
|
+
'Required parameter "webhookIntegrationId" was null or undefined when calling deleteCustomWebhookIntegration().'
|
|
239
|
+
);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
const queryParameters: any = {};
|
|
243
|
+
|
|
244
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
let urlPath = `/integrations/webhooks/{webhookIntegrationId}`;
|
|
248
|
+
urlPath = urlPath.replace('{webhookIntegrationId}', encodeURIComponent(String(requestParameters['webhookIntegrationId'])));
|
|
249
|
+
|
|
250
|
+
return {
|
|
251
|
+
path: urlPath,
|
|
252
|
+
method: 'DELETE',
|
|
253
|
+
headers: headerParameters,
|
|
254
|
+
query: queryParameters,
|
|
255
|
+
};
|
|
256
|
+
}
|
|
257
|
+
|
|
258
|
+
/**
|
|
259
|
+
* Delete a custom webhook destination
|
|
260
|
+
*/
|
|
261
|
+
async deleteCustomWebhookIntegrationRaw(requestParameters: DeleteCustomWebhookIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
262
|
+
const requestOptions = await this.deleteCustomWebhookIntegrationRequestOpts(requestParameters);
|
|
263
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
264
|
+
|
|
265
|
+
return new runtime.VoidApiResponse(response);
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
/**
|
|
269
|
+
* Delete a custom webhook destination
|
|
270
|
+
*/
|
|
271
|
+
async deleteCustomWebhookIntegration(requestParameters: DeleteCustomWebhookIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
272
|
+
await this.deleteCustomWebhookIntegrationRaw(requestParameters, initOverrides);
|
|
273
|
+
}
|
|
274
|
+
|
|
169
275
|
/**
|
|
170
276
|
* Creates request options for deleteZapierSetup without sending the request
|
|
171
277
|
*/
|
|
@@ -210,6 +316,109 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
210
316
|
await this.deleteZapierSetupRaw(requestParameters, initOverrides);
|
|
211
317
|
}
|
|
212
318
|
|
|
319
|
+
/**
|
|
320
|
+
* Creates request options for deleteZapierSubscription without sending the request
|
|
321
|
+
*/
|
|
322
|
+
async deleteZapierSubscriptionRequestOpts(requestParameters: DeleteZapierSubscriptionRequest): Promise<runtime.RequestOpts> {
|
|
323
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
324
|
+
throw new runtime.RequiredError(
|
|
325
|
+
'subscriptionId',
|
|
326
|
+
'Required parameter "subscriptionId" was null or undefined when calling deleteZapierSubscription().'
|
|
327
|
+
);
|
|
328
|
+
}
|
|
329
|
+
|
|
330
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
331
|
+
throw new runtime.RequiredError(
|
|
332
|
+
'xAPIKEY',
|
|
333
|
+
'Required parameter "xAPIKEY" was null or undefined when calling deleteZapierSubscription().'
|
|
334
|
+
);
|
|
335
|
+
}
|
|
336
|
+
|
|
337
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
338
|
+
throw new runtime.RequiredError(
|
|
339
|
+
'xPORTALSUBDOMAIN',
|
|
340
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling deleteZapierSubscription().'
|
|
341
|
+
);
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
const queryParameters: any = {};
|
|
345
|
+
|
|
346
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
347
|
+
|
|
348
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
349
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
353
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
354
|
+
}
|
|
355
|
+
|
|
356
|
+
|
|
357
|
+
let urlPath = `/integrations/zapier/subscriptions/{subscriptionId}`;
|
|
358
|
+
urlPath = urlPath.replace('{subscriptionId}', encodeURIComponent(String(requestParameters['subscriptionId'])));
|
|
359
|
+
|
|
360
|
+
return {
|
|
361
|
+
path: urlPath,
|
|
362
|
+
method: 'DELETE',
|
|
363
|
+
headers: headerParameters,
|
|
364
|
+
query: queryParameters,
|
|
365
|
+
};
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
/**
|
|
369
|
+
* Unsubscribe a Zap from an Edaxu lifecycle event
|
|
370
|
+
*/
|
|
371
|
+
async deleteZapierSubscriptionRaw(requestParameters: DeleteZapierSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
372
|
+
const requestOptions = await this.deleteZapierSubscriptionRequestOpts(requestParameters);
|
|
373
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
374
|
+
|
|
375
|
+
return new runtime.VoidApiResponse(response);
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
/**
|
|
379
|
+
* Unsubscribe a Zap from an Edaxu lifecycle event
|
|
380
|
+
*/
|
|
381
|
+
async deleteZapierSubscription(requestParameters: DeleteZapierSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
382
|
+
await this.deleteZapierSubscriptionRaw(requestParameters, initOverrides);
|
|
383
|
+
}
|
|
384
|
+
|
|
385
|
+
/**
|
|
386
|
+
* Creates request options for getCustomWebhookIntegrations without sending the request
|
|
387
|
+
*/
|
|
388
|
+
async getCustomWebhookIntegrationsRequestOpts(): Promise<runtime.RequestOpts> {
|
|
389
|
+
const queryParameters: any = {};
|
|
390
|
+
|
|
391
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
392
|
+
|
|
393
|
+
|
|
394
|
+
let urlPath = `/integrations/webhooks`;
|
|
395
|
+
|
|
396
|
+
return {
|
|
397
|
+
path: urlPath,
|
|
398
|
+
method: 'GET',
|
|
399
|
+
headers: headerParameters,
|
|
400
|
+
query: queryParameters,
|
|
401
|
+
};
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
/**
|
|
405
|
+
* List custom webhook destinations for the selected portal
|
|
406
|
+
*/
|
|
407
|
+
async getCustomWebhookIntegrationsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CustomWebhookIntegration>>> {
|
|
408
|
+
const requestOptions = await this.getCustomWebhookIntegrationsRequestOpts();
|
|
409
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
410
|
+
|
|
411
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CustomWebhookIntegrationFromJSON));
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
/**
|
|
415
|
+
* List custom webhook destinations for the selected portal
|
|
416
|
+
*/
|
|
417
|
+
async getCustomWebhookIntegrations(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CustomWebhookIntegration>> {
|
|
418
|
+
const response = await this.getCustomWebhookIntegrationsRaw(initOverrides);
|
|
419
|
+
return await response.value();
|
|
420
|
+
}
|
|
421
|
+
|
|
213
422
|
/**
|
|
214
423
|
* Creates request options for getZapierCourses without sending the request
|
|
215
424
|
*/
|
|
@@ -281,6 +490,80 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
281
490
|
return await response.value();
|
|
282
491
|
}
|
|
283
492
|
|
|
493
|
+
/**
|
|
494
|
+
* Creates request options for getZapierEvents without sending the request
|
|
495
|
+
*/
|
|
496
|
+
async getZapierEventsRequestOpts(requestParameters: GetZapierEventsRequest): Promise<runtime.RequestOpts> {
|
|
497
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
498
|
+
throw new runtime.RequiredError(
|
|
499
|
+
'xAPIKEY',
|
|
500
|
+
'Required parameter "xAPIKEY" was null or undefined when calling getZapierEvents().'
|
|
501
|
+
);
|
|
502
|
+
}
|
|
503
|
+
|
|
504
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
505
|
+
throw new runtime.RequiredError(
|
|
506
|
+
'xPORTALSUBDOMAIN',
|
|
507
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierEvents().'
|
|
508
|
+
);
|
|
509
|
+
}
|
|
510
|
+
|
|
511
|
+
if (requestParameters['eventType'] == null) {
|
|
512
|
+
throw new runtime.RequiredError(
|
|
513
|
+
'eventType',
|
|
514
|
+
'Required parameter "eventType" was null or undefined when calling getZapierEvents().'
|
|
515
|
+
);
|
|
516
|
+
}
|
|
517
|
+
|
|
518
|
+
const queryParameters: any = {};
|
|
519
|
+
|
|
520
|
+
if (requestParameters['eventType'] != null) {
|
|
521
|
+
queryParameters['eventType'] = requestParameters['eventType'];
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
if (requestParameters['pageSize'] != null) {
|
|
525
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
526
|
+
}
|
|
527
|
+
|
|
528
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
529
|
+
|
|
530
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
531
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
532
|
+
}
|
|
533
|
+
|
|
534
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
535
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
let urlPath = `/integrations/zapier/events`;
|
|
540
|
+
|
|
541
|
+
return {
|
|
542
|
+
path: urlPath,
|
|
543
|
+
method: 'GET',
|
|
544
|
+
headers: headerParameters,
|
|
545
|
+
query: queryParameters,
|
|
546
|
+
};
|
|
547
|
+
}
|
|
548
|
+
|
|
549
|
+
/**
|
|
550
|
+
* List recent lifecycle events for Zapier trigger setup
|
|
551
|
+
*/
|
|
552
|
+
async getZapierEventsRaw(requestParameters: GetZapierEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<IntegrationEvent>>> {
|
|
553
|
+
const requestOptions = await this.getZapierEventsRequestOpts(requestParameters);
|
|
554
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
555
|
+
|
|
556
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(IntegrationEventFromJSON));
|
|
557
|
+
}
|
|
558
|
+
|
|
559
|
+
/**
|
|
560
|
+
* List recent lifecycle events for Zapier trigger setup
|
|
561
|
+
*/
|
|
562
|
+
async getZapierEvents(requestParameters: GetZapierEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<IntegrationEvent>> {
|
|
563
|
+
const response = await this.getZapierEventsRaw(requestParameters, initOverrides);
|
|
564
|
+
return await response.value();
|
|
565
|
+
}
|
|
566
|
+
|
|
284
567
|
/**
|
|
285
568
|
* Creates request options for getZapierMe without sending the request
|
|
286
569
|
*/
|
|
@@ -510,6 +793,53 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
510
793
|
return await response.value();
|
|
511
794
|
}
|
|
512
795
|
|
|
796
|
+
/**
|
|
797
|
+
* Creates request options for postCustomWebhookIntegration without sending the request
|
|
798
|
+
*/
|
|
799
|
+
async postCustomWebhookIntegrationRequestOpts(requestParameters: PostCustomWebhookIntegrationRequest): Promise<runtime.RequestOpts> {
|
|
800
|
+
if (requestParameters['postCustomWebhookIntegration'] == null) {
|
|
801
|
+
throw new runtime.RequiredError(
|
|
802
|
+
'postCustomWebhookIntegration',
|
|
803
|
+
'Required parameter "postCustomWebhookIntegration" was null or undefined when calling postCustomWebhookIntegration().'
|
|
804
|
+
);
|
|
805
|
+
}
|
|
806
|
+
|
|
807
|
+
const queryParameters: any = {};
|
|
808
|
+
|
|
809
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
810
|
+
|
|
811
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
812
|
+
|
|
813
|
+
|
|
814
|
+
let urlPath = `/integrations/webhooks`;
|
|
815
|
+
|
|
816
|
+
return {
|
|
817
|
+
path: urlPath,
|
|
818
|
+
method: 'POST',
|
|
819
|
+
headers: headerParameters,
|
|
820
|
+
query: queryParameters,
|
|
821
|
+
body: PostCustomWebhookIntegrationToJSON(requestParameters['postCustomWebhookIntegration']),
|
|
822
|
+
};
|
|
823
|
+
}
|
|
824
|
+
|
|
825
|
+
/**
|
|
826
|
+
* Create a custom webhook destination for lifecycle events
|
|
827
|
+
*/
|
|
828
|
+
async postCustomWebhookIntegrationRaw(requestParameters: PostCustomWebhookIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomWebhookIntegration>> {
|
|
829
|
+
const requestOptions = await this.postCustomWebhookIntegrationRequestOpts(requestParameters);
|
|
830
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
831
|
+
|
|
832
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CustomWebhookIntegrationFromJSON(jsonValue));
|
|
833
|
+
}
|
|
834
|
+
|
|
835
|
+
/**
|
|
836
|
+
* Create a custom webhook destination for lifecycle events
|
|
837
|
+
*/
|
|
838
|
+
async postCustomWebhookIntegration(requestParameters: PostCustomWebhookIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomWebhookIntegration> {
|
|
839
|
+
const response = await this.postCustomWebhookIntegrationRaw(requestParameters, initOverrides);
|
|
840
|
+
return await response.value();
|
|
841
|
+
}
|
|
842
|
+
|
|
513
843
|
/**
|
|
514
844
|
* Creates request options for postZapierEnrollment without sending the request
|
|
515
845
|
*/
|
|
@@ -764,6 +1094,75 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
764
1094
|
return await response.value();
|
|
765
1095
|
}
|
|
766
1096
|
|
|
1097
|
+
/**
|
|
1098
|
+
* Creates request options for postZapierSubscription without sending the request
|
|
1099
|
+
*/
|
|
1100
|
+
async postZapierSubscriptionRequestOpts(requestParameters: PostZapierSubscriptionRequest): Promise<runtime.RequestOpts> {
|
|
1101
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
1102
|
+
throw new runtime.RequiredError(
|
|
1103
|
+
'xAPIKEY',
|
|
1104
|
+
'Required parameter "xAPIKEY" was null or undefined when calling postZapierSubscription().'
|
|
1105
|
+
);
|
|
1106
|
+
}
|
|
1107
|
+
|
|
1108
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
1109
|
+
throw new runtime.RequiredError(
|
|
1110
|
+
'xPORTALSUBDOMAIN',
|
|
1111
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierSubscription().'
|
|
1112
|
+
);
|
|
1113
|
+
}
|
|
1114
|
+
|
|
1115
|
+
if (requestParameters['postZapierSubscription'] == null) {
|
|
1116
|
+
throw new runtime.RequiredError(
|
|
1117
|
+
'postZapierSubscription',
|
|
1118
|
+
'Required parameter "postZapierSubscription" was null or undefined when calling postZapierSubscription().'
|
|
1119
|
+
);
|
|
1120
|
+
}
|
|
1121
|
+
|
|
1122
|
+
const queryParameters: any = {};
|
|
1123
|
+
|
|
1124
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1125
|
+
|
|
1126
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1127
|
+
|
|
1128
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
1129
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
1130
|
+
}
|
|
1131
|
+
|
|
1132
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
1133
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
1134
|
+
}
|
|
1135
|
+
|
|
1136
|
+
|
|
1137
|
+
let urlPath = `/integrations/zapier/subscriptions`;
|
|
1138
|
+
|
|
1139
|
+
return {
|
|
1140
|
+
path: urlPath,
|
|
1141
|
+
method: 'POST',
|
|
1142
|
+
headers: headerParameters,
|
|
1143
|
+
query: queryParameters,
|
|
1144
|
+
body: PostZapierSubscriptionToJSON(requestParameters['postZapierSubscription']),
|
|
1145
|
+
};
|
|
1146
|
+
}
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* Subscribe a Zap to an Edaxu lifecycle event
|
|
1150
|
+
*/
|
|
1151
|
+
async postZapierSubscriptionRaw(requestParameters: PostZapierSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZapierSubscription>> {
|
|
1152
|
+
const requestOptions = await this.postZapierSubscriptionRequestOpts(requestParameters);
|
|
1153
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1154
|
+
|
|
1155
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ZapierSubscriptionFromJSON(jsonValue));
|
|
1156
|
+
}
|
|
1157
|
+
|
|
1158
|
+
/**
|
|
1159
|
+
* Subscribe a Zap to an Edaxu lifecycle event
|
|
1160
|
+
*/
|
|
1161
|
+
async postZapierSubscription(requestParameters: PostZapierSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZapierSubscription> {
|
|
1162
|
+
const response = await this.postZapierSubscriptionRaw(requestParameters, initOverrides);
|
|
1163
|
+
return await response.value();
|
|
1164
|
+
}
|
|
1165
|
+
|
|
767
1166
|
/**
|
|
768
1167
|
* Creates request options for postZapierUser without sending the request
|
|
769
1168
|
*/
|
|
@@ -833,6 +1232,61 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
833
1232
|
return await response.value();
|
|
834
1233
|
}
|
|
835
1234
|
|
|
1235
|
+
/**
|
|
1236
|
+
* Creates request options for putCustomWebhookIntegration without sending the request
|
|
1237
|
+
*/
|
|
1238
|
+
async putCustomWebhookIntegrationRequestOpts(requestParameters: PutCustomWebhookIntegrationRequest): Promise<runtime.RequestOpts> {
|
|
1239
|
+
if (requestParameters['webhookIntegrationId'] == null) {
|
|
1240
|
+
throw new runtime.RequiredError(
|
|
1241
|
+
'webhookIntegrationId',
|
|
1242
|
+
'Required parameter "webhookIntegrationId" was null or undefined when calling putCustomWebhookIntegration().'
|
|
1243
|
+
);
|
|
1244
|
+
}
|
|
1245
|
+
|
|
1246
|
+
if (requestParameters['putCustomWebhookIntegration'] == null) {
|
|
1247
|
+
throw new runtime.RequiredError(
|
|
1248
|
+
'putCustomWebhookIntegration',
|
|
1249
|
+
'Required parameter "putCustomWebhookIntegration" was null or undefined when calling putCustomWebhookIntegration().'
|
|
1250
|
+
);
|
|
1251
|
+
}
|
|
1252
|
+
|
|
1253
|
+
const queryParameters: any = {};
|
|
1254
|
+
|
|
1255
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1256
|
+
|
|
1257
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1258
|
+
|
|
1259
|
+
|
|
1260
|
+
let urlPath = `/integrations/webhooks/{webhookIntegrationId}`;
|
|
1261
|
+
urlPath = urlPath.replace('{webhookIntegrationId}', encodeURIComponent(String(requestParameters['webhookIntegrationId'])));
|
|
1262
|
+
|
|
1263
|
+
return {
|
|
1264
|
+
path: urlPath,
|
|
1265
|
+
method: 'PUT',
|
|
1266
|
+
headers: headerParameters,
|
|
1267
|
+
query: queryParameters,
|
|
1268
|
+
body: PutCustomWebhookIntegrationToJSON(requestParameters['putCustomWebhookIntegration']),
|
|
1269
|
+
};
|
|
1270
|
+
}
|
|
1271
|
+
|
|
1272
|
+
/**
|
|
1273
|
+
* Update a custom webhook destination
|
|
1274
|
+
*/
|
|
1275
|
+
async putCustomWebhookIntegrationRaw(requestParameters: PutCustomWebhookIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<CustomWebhookIntegration>> {
|
|
1276
|
+
const requestOptions = await this.putCustomWebhookIntegrationRequestOpts(requestParameters);
|
|
1277
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1278
|
+
|
|
1279
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => CustomWebhookIntegrationFromJSON(jsonValue));
|
|
1280
|
+
}
|
|
1281
|
+
|
|
1282
|
+
/**
|
|
1283
|
+
* Update a custom webhook destination
|
|
1284
|
+
*/
|
|
1285
|
+
async putCustomWebhookIntegration(requestParameters: PutCustomWebhookIntegrationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CustomWebhookIntegration> {
|
|
1286
|
+
const response = await this.putCustomWebhookIntegrationRaw(requestParameters, initOverrides);
|
|
1287
|
+
return await response.value();
|
|
1288
|
+
}
|
|
1289
|
+
|
|
836
1290
|
/**
|
|
837
1291
|
* Creates request options for putZapierSetup without sending the request
|
|
838
1292
|
*/
|
|
@@ -889,3 +1343,15 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
889
1343
|
}
|
|
890
1344
|
|
|
891
1345
|
}
|
|
1346
|
+
|
|
1347
|
+
/**
|
|
1348
|
+
* @export
|
|
1349
|
+
*/
|
|
1350
|
+
export const GetZapierEventsEventTypeEnum = {
|
|
1351
|
+
ComEdaxuEnrollmentEnrolledV1: 'com.edaxu.enrollment.enrolled.v1',
|
|
1352
|
+
ComEdaxuEnrollmentCompletedV1: 'com.edaxu.enrollment.completed.v1',
|
|
1353
|
+
ComEdaxuCertificateIssuedV1: 'com.edaxu.certificate.issued.v1',
|
|
1354
|
+
ComEdaxuPortalUserInvitedV1: 'com.edaxu.portal.user_invited.v1',
|
|
1355
|
+
ComEdaxuPortalUserJoinedV1: 'com.edaxu.portal.user_joined.v1'
|
|
1356
|
+
} as const;
|
|
1357
|
+
export type GetZapierEventsEventTypeEnum = typeof GetZapierEventsEventTypeEnum[keyof typeof GetZapierEventsEventTypeEnum];
|