@easyedu/js-lsm-api 1.115.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 +48 -0
- package/README.md +40 -2
- package/dist/apis/IntegrationApi.d.ts +257 -0
- package/dist/apis/IntegrationApi.js +708 -1
- package/dist/esm/apis/IntegrationApi.d.ts +257 -0
- package/dist/esm/apis/IntegrationApi.js +707 -0
- package/dist/esm/models/CustomWebhookIntegration.d.ts +83 -0
- package/dist/esm/models/CustomWebhookIntegration.js +79 -0
- package/dist/esm/models/GetZapierCourses.d.ts +51 -0
- package/dist/esm/models/GetZapierCourses.js +56 -0
- package/dist/esm/models/GetZapierShopifyCourseMappings.d.ts +33 -0
- package/dist/esm/models/GetZapierShopifyCourseMappings.js +44 -0
- package/dist/esm/models/GetZapierUsers.d.ts +33 -0
- package/dist/esm/models/GetZapierUsers.js +44 -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/PostZapierEnrollment.d.ts +76 -0
- package/dist/esm/models/PostZapierEnrollment.js +64 -0
- package/dist/esm/models/PostZapierShopifyCourseMapping.d.ts +50 -0
- package/dist/esm/models/PostZapierShopifyCourseMapping.js +53 -0
- package/dist/esm/models/PostZapierShopifyEnrollment.d.ts +100 -0
- package/dist/esm/models/PostZapierShopifyEnrollment.js +82 -0
- package/dist/esm/models/PostZapierShopifyEnrollmentResponse.d.ts +47 -0
- package/dist/esm/models/PostZapierShopifyEnrollmentResponse.js +54 -0
- package/dist/esm/models/PostZapierSubscription.d.ts +53 -0
- package/dist/esm/models/PostZapierSubscription.js +57 -0
- package/dist/esm/models/PostZapierUser.d.ts +44 -0
- package/dist/esm/models/PostZapierUser.js +51 -0
- package/dist/esm/models/PutCustomWebhookIntegration.d.ts +65 -0
- package/dist/esm/models/PutCustomWebhookIntegration.js +57 -0
- package/dist/esm/models/ZapierCourse.d.ts +50 -0
- package/dist/esm/models/ZapierCourse.js +55 -0
- package/dist/esm/models/ZapierEnrollment.d.ts +74 -0
- package/dist/esm/models/ZapierEnrollment.js +69 -0
- package/dist/esm/models/ZapierShopifyCourseMapping.d.ts +69 -0
- package/dist/esm/models/ZapierShopifyCourseMapping.js +66 -0
- package/dist/esm/models/ZapierSubscription.d.ts +53 -0
- package/dist/esm/models/ZapierSubscription.js +59 -0
- package/dist/esm/models/ZapierUser.d.ts +56 -0
- package/dist/esm/models/ZapierUser.js +59 -0
- package/dist/esm/models/index.d.ts +24 -0
- package/dist/esm/models/index.js +24 -0
- package/dist/models/CustomWebhookIntegration.d.ts +83 -0
- package/dist/models/CustomWebhookIntegration.js +87 -0
- package/dist/models/GetZapierCourses.d.ts +51 -0
- package/dist/models/GetZapierCourses.js +63 -0
- package/dist/models/GetZapierShopifyCourseMappings.d.ts +33 -0
- package/dist/models/GetZapierShopifyCourseMappings.js +51 -0
- package/dist/models/GetZapierUsers.d.ts +33 -0
- package/dist/models/GetZapierUsers.js +51 -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/PostZapierEnrollment.d.ts +76 -0
- package/dist/models/PostZapierEnrollment.js +72 -0
- package/dist/models/PostZapierShopifyCourseMapping.d.ts +50 -0
- package/dist/models/PostZapierShopifyCourseMapping.js +60 -0
- package/dist/models/PostZapierShopifyEnrollment.d.ts +100 -0
- package/dist/models/PostZapierShopifyEnrollment.js +90 -0
- package/dist/models/PostZapierShopifyEnrollmentResponse.d.ts +47 -0
- package/dist/models/PostZapierShopifyEnrollmentResponse.js +61 -0
- package/dist/models/PostZapierSubscription.d.ts +53 -0
- package/dist/models/PostZapierSubscription.js +65 -0
- package/dist/models/PostZapierUser.d.ts +44 -0
- package/dist/models/PostZapierUser.js +58 -0
- package/dist/models/PutCustomWebhookIntegration.d.ts +65 -0
- package/dist/models/PutCustomWebhookIntegration.js +65 -0
- package/dist/models/ZapierCourse.d.ts +50 -0
- package/dist/models/ZapierCourse.js +62 -0
- package/dist/models/ZapierEnrollment.d.ts +74 -0
- package/dist/models/ZapierEnrollment.js +76 -0
- package/dist/models/ZapierShopifyCourseMapping.d.ts +69 -0
- package/dist/models/ZapierShopifyCourseMapping.js +73 -0
- package/dist/models/ZapierSubscription.d.ts +53 -0
- package/dist/models/ZapierSubscription.js +67 -0
- package/dist/models/ZapierUser.d.ts +56 -0
- package/dist/models/ZapierUser.js +66 -0
- package/dist/models/index.d.ts +24 -0
- package/dist/models/index.js +24 -0
- package/docs/CustomWebhookIntegration.md +48 -0
- package/docs/GetZapierCourses.md +40 -0
- package/docs/GetZapierShopifyCourseMappings.md +34 -0
- package/docs/GetZapierUsers.md +34 -0
- package/docs/IntegrationApi.md +1060 -30
- 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/PostZapierEnrollment.md +46 -0
- package/docs/PostZapierShopifyCourseMapping.md +40 -0
- package/docs/PostZapierShopifyEnrollment.md +54 -0
- package/docs/PostZapierShopifyEnrollmentResponse.md +38 -0
- package/docs/PostZapierSubscription.md +38 -0
- package/docs/PostZapierUser.md +38 -0
- package/docs/PutCustomWebhookIntegration.md +42 -0
- package/docs/ZapierCourse.md +40 -0
- package/docs/ZapierEnrollment.md +48 -0
- package/docs/ZapierShopifyCourseMapping.md +46 -0
- package/docs/ZapierSubscription.md +38 -0
- package/docs/ZapierUser.md +42 -0
- package/package.json +1 -1
- package/src/apis/IntegrationApi.ts +1104 -61
- package/src/models/CustomWebhookIntegration.ts +141 -0
- package/src/models/GetZapierCourses.ts +101 -0
- package/src/models/GetZapierShopifyCourseMappings.ts +74 -0
- package/src/models/GetZapierUsers.ts +74 -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/PostZapierEnrollment.ts +126 -0
- package/src/models/PostZapierShopifyCourseMapping.ts +92 -0
- package/src/models/PostZapierShopifyEnrollment.ts +163 -0
- package/src/models/PostZapierShopifyEnrollmentResponse.ts +106 -0
- package/src/models/PostZapierSubscription.ts +95 -0
- package/src/models/PostZapierUser.ts +84 -0
- package/src/models/PutCustomWebhookIntegration.ts +109 -0
- package/src/models/ZapierCourse.ts +93 -0
- package/src/models/ZapierEnrollment.ts +128 -0
- package/src/models/ZapierShopifyCourseMapping.ts +127 -0
- package/src/models/ZapierSubscription.ts +96 -0
- package/src/models/ZapierUser.ts +102 -0
- package/src/models/index.ts +24 -0
|
@@ -13,6 +13,16 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type CustomWebhookIntegration,
|
|
18
|
+
CustomWebhookIntegrationFromJSON,
|
|
19
|
+
CustomWebhookIntegrationToJSON,
|
|
20
|
+
} from '../models/CustomWebhookIntegration';
|
|
21
|
+
import {
|
|
22
|
+
type GetZapierCourses,
|
|
23
|
+
GetZapierCoursesFromJSON,
|
|
24
|
+
GetZapierCoursesToJSON,
|
|
25
|
+
} from '../models/GetZapierCourses';
|
|
16
26
|
import {
|
|
17
27
|
type GetZapierMe,
|
|
18
28
|
GetZapierMeFromJSON,
|
|
@@ -23,6 +33,31 @@ import {
|
|
|
23
33
|
GetZapierSetupFromJSON,
|
|
24
34
|
GetZapierSetupToJSON,
|
|
25
35
|
} from '../models/GetZapierSetup';
|
|
36
|
+
import {
|
|
37
|
+
type GetZapierShopifyCourseMappings,
|
|
38
|
+
GetZapierShopifyCourseMappingsFromJSON,
|
|
39
|
+
GetZapierShopifyCourseMappingsToJSON,
|
|
40
|
+
} from '../models/GetZapierShopifyCourseMappings';
|
|
41
|
+
import {
|
|
42
|
+
type GetZapierUsers,
|
|
43
|
+
GetZapierUsersFromJSON,
|
|
44
|
+
GetZapierUsersToJSON,
|
|
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';
|
|
56
|
+
import {
|
|
57
|
+
type PostZapierEnrollment,
|
|
58
|
+
PostZapierEnrollmentFromJSON,
|
|
59
|
+
PostZapierEnrollmentToJSON,
|
|
60
|
+
} from '../models/PostZapierEnrollment';
|
|
26
61
|
import {
|
|
27
62
|
type PostZapierSetup,
|
|
28
63
|
PostZapierSetupFromJSON,
|
|
@@ -33,30 +68,156 @@ import {
|
|
|
33
68
|
PostZapierSetupResponseFromJSON,
|
|
34
69
|
PostZapierSetupResponseToJSON,
|
|
35
70
|
} from '../models/PostZapierSetupResponse';
|
|
71
|
+
import {
|
|
72
|
+
type PostZapierShopifyCourseMapping,
|
|
73
|
+
PostZapierShopifyCourseMappingFromJSON,
|
|
74
|
+
PostZapierShopifyCourseMappingToJSON,
|
|
75
|
+
} from '../models/PostZapierShopifyCourseMapping';
|
|
76
|
+
import {
|
|
77
|
+
type PostZapierShopifyEnrollment,
|
|
78
|
+
PostZapierShopifyEnrollmentFromJSON,
|
|
79
|
+
PostZapierShopifyEnrollmentToJSON,
|
|
80
|
+
} from '../models/PostZapierShopifyEnrollment';
|
|
81
|
+
import {
|
|
82
|
+
type PostZapierShopifyEnrollmentResponse,
|
|
83
|
+
PostZapierShopifyEnrollmentResponseFromJSON,
|
|
84
|
+
PostZapierShopifyEnrollmentResponseToJSON,
|
|
85
|
+
} from '../models/PostZapierShopifyEnrollmentResponse';
|
|
86
|
+
import {
|
|
87
|
+
type PostZapierSubscription,
|
|
88
|
+
PostZapierSubscriptionFromJSON,
|
|
89
|
+
PostZapierSubscriptionToJSON,
|
|
90
|
+
} from '../models/PostZapierSubscription';
|
|
91
|
+
import {
|
|
92
|
+
type PostZapierUser,
|
|
93
|
+
PostZapierUserFromJSON,
|
|
94
|
+
PostZapierUserToJSON,
|
|
95
|
+
} from '../models/PostZapierUser';
|
|
96
|
+
import {
|
|
97
|
+
type PutCustomWebhookIntegration,
|
|
98
|
+
PutCustomWebhookIntegrationFromJSON,
|
|
99
|
+
PutCustomWebhookIntegrationToJSON,
|
|
100
|
+
} from '../models/PutCustomWebhookIntegration';
|
|
36
101
|
import {
|
|
37
102
|
type PutZapierSetup,
|
|
38
103
|
PutZapierSetupFromJSON,
|
|
39
104
|
PutZapierSetupToJSON,
|
|
40
105
|
} from '../models/PutZapierSetup';
|
|
106
|
+
import {
|
|
107
|
+
type ZapierEnrollment,
|
|
108
|
+
ZapierEnrollmentFromJSON,
|
|
109
|
+
ZapierEnrollmentToJSON,
|
|
110
|
+
} from '../models/ZapierEnrollment';
|
|
41
111
|
import {
|
|
42
112
|
type ZapierIntegration,
|
|
43
113
|
ZapierIntegrationFromJSON,
|
|
44
114
|
ZapierIntegrationToJSON,
|
|
45
115
|
} from '../models/ZapierIntegration';
|
|
116
|
+
import {
|
|
117
|
+
type ZapierShopifyCourseMapping,
|
|
118
|
+
ZapierShopifyCourseMappingFromJSON,
|
|
119
|
+
ZapierShopifyCourseMappingToJSON,
|
|
120
|
+
} from '../models/ZapierShopifyCourseMapping';
|
|
121
|
+
import {
|
|
122
|
+
type ZapierSubscription,
|
|
123
|
+
ZapierSubscriptionFromJSON,
|
|
124
|
+
ZapierSubscriptionToJSON,
|
|
125
|
+
} from '../models/ZapierSubscription';
|
|
126
|
+
import {
|
|
127
|
+
type ZapierUser,
|
|
128
|
+
ZapierUserFromJSON,
|
|
129
|
+
ZapierUserToJSON,
|
|
130
|
+
} from '../models/ZapierUser';
|
|
131
|
+
|
|
132
|
+
export interface DeleteCustomWebhookIntegrationRequest {
|
|
133
|
+
webhookIntegrationId: string;
|
|
134
|
+
}
|
|
46
135
|
|
|
47
136
|
export interface DeleteZapierSetupRequest {
|
|
48
137
|
zapierIntegrationId: string;
|
|
49
138
|
}
|
|
50
139
|
|
|
140
|
+
export interface DeleteZapierSubscriptionRequest {
|
|
141
|
+
subscriptionId: string;
|
|
142
|
+
xAPIKEY: string;
|
|
143
|
+
xPORTALSUBDOMAIN: string;
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
export interface GetZapierCoursesRequest {
|
|
147
|
+
xAPIKEY: string;
|
|
148
|
+
xPORTALSUBDOMAIN: string;
|
|
149
|
+
page?: number;
|
|
150
|
+
pageSize?: number;
|
|
151
|
+
search?: string;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
export interface GetZapierEventsRequest {
|
|
155
|
+
xAPIKEY: string;
|
|
156
|
+
xPORTALSUBDOMAIN: string;
|
|
157
|
+
eventType: GetZapierEventsEventTypeEnum;
|
|
158
|
+
pageSize?: number;
|
|
159
|
+
}
|
|
160
|
+
|
|
51
161
|
export interface GetZapierMeRequest {
|
|
52
162
|
xAPIKEY: string;
|
|
53
163
|
xPORTALSUBDOMAIN: string;
|
|
54
164
|
}
|
|
55
165
|
|
|
166
|
+
export interface GetZapierShopifyCourseMappingsRequest {
|
|
167
|
+
xAPIKEY: string;
|
|
168
|
+
xPORTALSUBDOMAIN: string;
|
|
169
|
+
shopDomain?: string;
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
export interface GetZapierUsersRequest {
|
|
173
|
+
xAPIKEY: string;
|
|
174
|
+
xPORTALSUBDOMAIN: string;
|
|
175
|
+
email: string;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
export interface PostCustomWebhookIntegrationRequest {
|
|
179
|
+
postCustomWebhookIntegration: PostCustomWebhookIntegration;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
export interface PostZapierEnrollmentRequest {
|
|
183
|
+
xAPIKEY: string;
|
|
184
|
+
xPORTALSUBDOMAIN: string;
|
|
185
|
+
postZapierEnrollment: PostZapierEnrollment;
|
|
186
|
+
}
|
|
187
|
+
|
|
56
188
|
export interface PostZapierSetupRequest {
|
|
57
189
|
postZapierSetup: PostZapierSetup;
|
|
58
190
|
}
|
|
59
191
|
|
|
192
|
+
export interface PostZapierShopifyCourseMappingRequest {
|
|
193
|
+
xAPIKEY: string;
|
|
194
|
+
xPORTALSUBDOMAIN: string;
|
|
195
|
+
postZapierShopifyCourseMapping: PostZapierShopifyCourseMapping;
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
export interface PostZapierShopifyEnrollmentRequest {
|
|
199
|
+
xAPIKEY: string;
|
|
200
|
+
xPORTALSUBDOMAIN: string;
|
|
201
|
+
postZapierShopifyEnrollment: PostZapierShopifyEnrollment;
|
|
202
|
+
}
|
|
203
|
+
|
|
204
|
+
export interface PostZapierSubscriptionRequest {
|
|
205
|
+
xAPIKEY: string;
|
|
206
|
+
xPORTALSUBDOMAIN: string;
|
|
207
|
+
postZapierSubscription: PostZapierSubscription;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
export interface PostZapierUserRequest {
|
|
211
|
+
xAPIKEY: string;
|
|
212
|
+
xPORTALSUBDOMAIN: string;
|
|
213
|
+
postZapierUser: PostZapierUser;
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
export interface PutCustomWebhookIntegrationRequest {
|
|
217
|
+
webhookIntegrationId: string;
|
|
218
|
+
putCustomWebhookIntegration: PutCustomWebhookIntegration;
|
|
219
|
+
}
|
|
220
|
+
|
|
60
221
|
export interface PutZapierSetupRequest {
|
|
61
222
|
zapierIntegrationId: string;
|
|
62
223
|
putZapierSetup: PutZapierSetup;
|
|
@@ -67,6 +228,50 @@ export interface PutZapierSetupRequest {
|
|
|
67
228
|
*/
|
|
68
229
|
export class IntegrationApi extends runtime.BaseAPI {
|
|
69
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
|
+
|
|
70
275
|
/**
|
|
71
276
|
* Creates request options for deleteZapierSetup without sending the request
|
|
72
277
|
*/
|
|
@@ -112,20 +317,27 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
112
317
|
}
|
|
113
318
|
|
|
114
319
|
/**
|
|
115
|
-
* Creates request options for
|
|
320
|
+
* Creates request options for deleteZapierSubscription without sending the request
|
|
116
321
|
*/
|
|
117
|
-
async
|
|
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
|
+
|
|
118
330
|
if (requestParameters['xAPIKEY'] == null) {
|
|
119
331
|
throw new runtime.RequiredError(
|
|
120
332
|
'xAPIKEY',
|
|
121
|
-
'Required parameter "xAPIKEY" was null or undefined when calling
|
|
333
|
+
'Required parameter "xAPIKEY" was null or undefined when calling deleteZapierSubscription().'
|
|
122
334
|
);
|
|
123
335
|
}
|
|
124
336
|
|
|
125
337
|
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
126
338
|
throw new runtime.RequiredError(
|
|
127
339
|
'xPORTALSUBDOMAIN',
|
|
128
|
-
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling
|
|
340
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling deleteZapierSubscription().'
|
|
129
341
|
);
|
|
130
342
|
}
|
|
131
343
|
|
|
@@ -142,44 +354,44 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
142
354
|
}
|
|
143
355
|
|
|
144
356
|
|
|
145
|
-
let urlPath = `/integrations/zapier/
|
|
357
|
+
let urlPath = `/integrations/zapier/subscriptions/{subscriptionId}`;
|
|
358
|
+
urlPath = urlPath.replace('{subscriptionId}', encodeURIComponent(String(requestParameters['subscriptionId'])));
|
|
146
359
|
|
|
147
360
|
return {
|
|
148
361
|
path: urlPath,
|
|
149
|
-
method: '
|
|
362
|
+
method: 'DELETE',
|
|
150
363
|
headers: headerParameters,
|
|
151
364
|
query: queryParameters,
|
|
152
365
|
};
|
|
153
366
|
}
|
|
154
367
|
|
|
155
368
|
/**
|
|
156
|
-
*
|
|
369
|
+
* Unsubscribe a Zap from an Edaxu lifecycle event
|
|
157
370
|
*/
|
|
158
|
-
async
|
|
159
|
-
const requestOptions = await this.
|
|
371
|
+
async deleteZapierSubscriptionRaw(requestParameters: DeleteZapierSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
|
|
372
|
+
const requestOptions = await this.deleteZapierSubscriptionRequestOpts(requestParameters);
|
|
160
373
|
const response = await this.request(requestOptions, initOverrides);
|
|
161
374
|
|
|
162
|
-
return new runtime.
|
|
375
|
+
return new runtime.VoidApiResponse(response);
|
|
163
376
|
}
|
|
164
377
|
|
|
165
378
|
/**
|
|
166
|
-
*
|
|
379
|
+
* Unsubscribe a Zap from an Edaxu lifecycle event
|
|
167
380
|
*/
|
|
168
|
-
async
|
|
169
|
-
|
|
170
|
-
return await response.value();
|
|
381
|
+
async deleteZapierSubscription(requestParameters: DeleteZapierSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
|
|
382
|
+
await this.deleteZapierSubscriptionRaw(requestParameters, initOverrides);
|
|
171
383
|
}
|
|
172
384
|
|
|
173
385
|
/**
|
|
174
|
-
* Creates request options for
|
|
386
|
+
* Creates request options for getCustomWebhookIntegrations without sending the request
|
|
175
387
|
*/
|
|
176
|
-
async
|
|
388
|
+
async getCustomWebhookIntegrationsRequestOpts(): Promise<runtime.RequestOpts> {
|
|
177
389
|
const queryParameters: any = {};
|
|
178
390
|
|
|
179
391
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
180
392
|
|
|
181
393
|
|
|
182
|
-
let urlPath = `/integrations/
|
|
394
|
+
let urlPath = `/integrations/webhooks`;
|
|
183
395
|
|
|
184
396
|
return {
|
|
185
397
|
path: urlPath,
|
|
@@ -190,123 +402,954 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
190
402
|
}
|
|
191
403
|
|
|
192
404
|
/**
|
|
193
|
-
* List
|
|
405
|
+
* List custom webhook destinations for the selected portal
|
|
194
406
|
*/
|
|
195
|
-
async
|
|
196
|
-
const requestOptions = await this.
|
|
407
|
+
async getCustomWebhookIntegrationsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<CustomWebhookIntegration>>> {
|
|
408
|
+
const requestOptions = await this.getCustomWebhookIntegrationsRequestOpts();
|
|
197
409
|
const response = await this.request(requestOptions, initOverrides);
|
|
198
410
|
|
|
199
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
411
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CustomWebhookIntegrationFromJSON));
|
|
200
412
|
}
|
|
201
413
|
|
|
202
414
|
/**
|
|
203
|
-
* List
|
|
415
|
+
* List custom webhook destinations for the selected portal
|
|
204
416
|
*/
|
|
205
|
-
async
|
|
206
|
-
const response = await this.
|
|
417
|
+
async getCustomWebhookIntegrations(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<CustomWebhookIntegration>> {
|
|
418
|
+
const response = await this.getCustomWebhookIntegrationsRaw(initOverrides);
|
|
207
419
|
return await response.value();
|
|
208
420
|
}
|
|
209
421
|
|
|
210
422
|
/**
|
|
211
|
-
* Creates request options for
|
|
423
|
+
* Creates request options for getZapierCourses without sending the request
|
|
212
424
|
*/
|
|
213
|
-
async
|
|
214
|
-
if (requestParameters['
|
|
425
|
+
async getZapierCoursesRequestOpts(requestParameters: GetZapierCoursesRequest): Promise<runtime.RequestOpts> {
|
|
426
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
215
427
|
throw new runtime.RequiredError(
|
|
216
|
-
'
|
|
217
|
-
'Required parameter "
|
|
428
|
+
'xAPIKEY',
|
|
429
|
+
'Required parameter "xAPIKEY" was null or undefined when calling getZapierCourses().'
|
|
430
|
+
);
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
434
|
+
throw new runtime.RequiredError(
|
|
435
|
+
'xPORTALSUBDOMAIN',
|
|
436
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierCourses().'
|
|
218
437
|
);
|
|
219
438
|
}
|
|
220
439
|
|
|
221
440
|
const queryParameters: any = {};
|
|
222
441
|
|
|
442
|
+
if (requestParameters['page'] != null) {
|
|
443
|
+
queryParameters['page'] = requestParameters['page'];
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
if (requestParameters['pageSize'] != null) {
|
|
447
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
448
|
+
}
|
|
449
|
+
|
|
450
|
+
if (requestParameters['search'] != null) {
|
|
451
|
+
queryParameters['search'] = requestParameters['search'];
|
|
452
|
+
}
|
|
453
|
+
|
|
223
454
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
224
455
|
|
|
225
|
-
|
|
456
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
457
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
458
|
+
}
|
|
459
|
+
|
|
460
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
461
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
462
|
+
}
|
|
226
463
|
|
|
227
464
|
|
|
228
|
-
let urlPath = `/integrations/zapier/
|
|
465
|
+
let urlPath = `/integrations/zapier/courses`;
|
|
229
466
|
|
|
230
467
|
return {
|
|
231
468
|
path: urlPath,
|
|
232
|
-
method: '
|
|
469
|
+
method: 'GET',
|
|
233
470
|
headers: headerParameters,
|
|
234
471
|
query: queryParameters,
|
|
235
|
-
body: PostZapierSetupToJSON(requestParameters['postZapierSetup']),
|
|
236
472
|
};
|
|
237
473
|
}
|
|
238
474
|
|
|
239
475
|
/**
|
|
240
|
-
*
|
|
476
|
+
* List published courses available to a Zapier connection
|
|
241
477
|
*/
|
|
242
|
-
async
|
|
243
|
-
const requestOptions = await this.
|
|
478
|
+
async getZapierCoursesRaw(requestParameters: GetZapierCoursesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetZapierCourses>> {
|
|
479
|
+
const requestOptions = await this.getZapierCoursesRequestOpts(requestParameters);
|
|
244
480
|
const response = await this.request(requestOptions, initOverrides);
|
|
245
481
|
|
|
246
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
482
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetZapierCoursesFromJSON(jsonValue));
|
|
247
483
|
}
|
|
248
484
|
|
|
249
485
|
/**
|
|
250
|
-
*
|
|
486
|
+
* List published courses available to a Zapier connection
|
|
251
487
|
*/
|
|
252
|
-
async
|
|
253
|
-
const response = await this.
|
|
488
|
+
async getZapierCourses(requestParameters: GetZapierCoursesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetZapierCourses> {
|
|
489
|
+
const response = await this.getZapierCoursesRaw(requestParameters, initOverrides);
|
|
254
490
|
return await response.value();
|
|
255
491
|
}
|
|
256
492
|
|
|
257
493
|
/**
|
|
258
|
-
* Creates request options for
|
|
494
|
+
* Creates request options for getZapierEvents without sending the request
|
|
259
495
|
*/
|
|
260
|
-
async
|
|
261
|
-
if (requestParameters['
|
|
496
|
+
async getZapierEventsRequestOpts(requestParameters: GetZapierEventsRequest): Promise<runtime.RequestOpts> {
|
|
497
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
262
498
|
throw new runtime.RequiredError(
|
|
263
|
-
'
|
|
264
|
-
'Required parameter "
|
|
499
|
+
'xAPIKEY',
|
|
500
|
+
'Required parameter "xAPIKEY" was null or undefined when calling getZapierEvents().'
|
|
265
501
|
);
|
|
266
502
|
}
|
|
267
503
|
|
|
268
|
-
if (requestParameters['
|
|
504
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
269
505
|
throw new runtime.RequiredError(
|
|
270
|
-
'
|
|
271
|
-
'Required parameter "
|
|
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().'
|
|
272
515
|
);
|
|
273
516
|
}
|
|
274
517
|
|
|
275
518
|
const queryParameters: any = {};
|
|
276
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
|
+
|
|
277
528
|
const headerParameters: runtime.HTTPHeaders = {};
|
|
278
529
|
|
|
279
|
-
|
|
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
|
+
}
|
|
280
537
|
|
|
281
538
|
|
|
282
|
-
let urlPath = `/integrations/zapier/
|
|
283
|
-
urlPath = urlPath.replace('{zapierIntegrationId}', encodeURIComponent(String(requestParameters['zapierIntegrationId'])));
|
|
539
|
+
let urlPath = `/integrations/zapier/events`;
|
|
284
540
|
|
|
285
541
|
return {
|
|
286
542
|
path: urlPath,
|
|
287
|
-
method: '
|
|
543
|
+
method: 'GET',
|
|
288
544
|
headers: headerParameters,
|
|
289
545
|
query: queryParameters,
|
|
290
|
-
body: PutZapierSetupToJSON(requestParameters['putZapierSetup']),
|
|
291
546
|
};
|
|
292
547
|
}
|
|
293
548
|
|
|
294
549
|
/**
|
|
295
|
-
*
|
|
550
|
+
* List recent lifecycle events for Zapier trigger setup
|
|
296
551
|
*/
|
|
297
|
-
async
|
|
298
|
-
const requestOptions = await this.
|
|
552
|
+
async getZapierEventsRaw(requestParameters: GetZapierEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Array<IntegrationEvent>>> {
|
|
553
|
+
const requestOptions = await this.getZapierEventsRequestOpts(requestParameters);
|
|
299
554
|
const response = await this.request(requestOptions, initOverrides);
|
|
300
555
|
|
|
301
|
-
return new runtime.JSONApiResponse(response, (jsonValue) =>
|
|
556
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(IntegrationEventFromJSON));
|
|
302
557
|
}
|
|
303
558
|
|
|
304
559
|
/**
|
|
305
|
-
*
|
|
560
|
+
* List recent lifecycle events for Zapier trigger setup
|
|
306
561
|
*/
|
|
307
|
-
async
|
|
308
|
-
const response = await this.
|
|
562
|
+
async getZapierEvents(requestParameters: GetZapierEventsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<IntegrationEvent>> {
|
|
563
|
+
const response = await this.getZapierEventsRaw(requestParameters, initOverrides);
|
|
309
564
|
return await response.value();
|
|
310
565
|
}
|
|
311
566
|
|
|
312
|
-
|
|
567
|
+
/**
|
|
568
|
+
* Creates request options for getZapierMe without sending the request
|
|
569
|
+
*/
|
|
570
|
+
async getZapierMeRequestOpts(requestParameters: GetZapierMeRequest): Promise<runtime.RequestOpts> {
|
|
571
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
572
|
+
throw new runtime.RequiredError(
|
|
573
|
+
'xAPIKEY',
|
|
574
|
+
'Required parameter "xAPIKEY" was null or undefined when calling getZapierMe().'
|
|
575
|
+
);
|
|
576
|
+
}
|
|
577
|
+
|
|
578
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
579
|
+
throw new runtime.RequiredError(
|
|
580
|
+
'xPORTALSUBDOMAIN',
|
|
581
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierMe().'
|
|
582
|
+
);
|
|
583
|
+
}
|
|
584
|
+
|
|
585
|
+
const queryParameters: any = {};
|
|
586
|
+
|
|
587
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
588
|
+
|
|
589
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
590
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
591
|
+
}
|
|
592
|
+
|
|
593
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
594
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
595
|
+
}
|
|
596
|
+
|
|
597
|
+
|
|
598
|
+
let urlPath = `/integrations/zapier/me`;
|
|
599
|
+
|
|
600
|
+
return {
|
|
601
|
+
path: urlPath,
|
|
602
|
+
method: 'GET',
|
|
603
|
+
headers: headerParameters,
|
|
604
|
+
query: queryParameters,
|
|
605
|
+
};
|
|
606
|
+
}
|
|
607
|
+
|
|
608
|
+
/**
|
|
609
|
+
* Test a Zapier API key and return its portal and enabled permissions
|
|
610
|
+
*/
|
|
611
|
+
async getZapierMeRaw(requestParameters: GetZapierMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetZapierMe>> {
|
|
612
|
+
const requestOptions = await this.getZapierMeRequestOpts(requestParameters);
|
|
613
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
614
|
+
|
|
615
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetZapierMeFromJSON(jsonValue));
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Test a Zapier API key and return its portal and enabled permissions
|
|
620
|
+
*/
|
|
621
|
+
async getZapierMe(requestParameters: GetZapierMeRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetZapierMe> {
|
|
622
|
+
const response = await this.getZapierMeRaw(requestParameters, initOverrides);
|
|
623
|
+
return await response.value();
|
|
624
|
+
}
|
|
625
|
+
|
|
626
|
+
/**
|
|
627
|
+
* Creates request options for getZapierSetup without sending the request
|
|
628
|
+
*/
|
|
629
|
+
async getZapierSetupRequestOpts(): Promise<runtime.RequestOpts> {
|
|
630
|
+
const queryParameters: any = {};
|
|
631
|
+
|
|
632
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
633
|
+
|
|
634
|
+
|
|
635
|
+
let urlPath = `/integrations/zapier/setup`;
|
|
636
|
+
|
|
637
|
+
return {
|
|
638
|
+
path: urlPath,
|
|
639
|
+
method: 'GET',
|
|
640
|
+
headers: headerParameters,
|
|
641
|
+
query: queryParameters,
|
|
642
|
+
};
|
|
643
|
+
}
|
|
644
|
+
|
|
645
|
+
/**
|
|
646
|
+
* List Zapier connections and permissions available to the selected portal
|
|
647
|
+
*/
|
|
648
|
+
async getZapierSetupRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetZapierSetup>> {
|
|
649
|
+
const requestOptions = await this.getZapierSetupRequestOpts();
|
|
650
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
651
|
+
|
|
652
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetZapierSetupFromJSON(jsonValue));
|
|
653
|
+
}
|
|
654
|
+
|
|
655
|
+
/**
|
|
656
|
+
* List Zapier connections and permissions available to the selected portal
|
|
657
|
+
*/
|
|
658
|
+
async getZapierSetup(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetZapierSetup> {
|
|
659
|
+
const response = await this.getZapierSetupRaw(initOverrides);
|
|
660
|
+
return await response.value();
|
|
661
|
+
}
|
|
662
|
+
|
|
663
|
+
/**
|
|
664
|
+
* Creates request options for getZapierShopifyCourseMappings without sending the request
|
|
665
|
+
*/
|
|
666
|
+
async getZapierShopifyCourseMappingsRequestOpts(requestParameters: GetZapierShopifyCourseMappingsRequest): Promise<runtime.RequestOpts> {
|
|
667
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
668
|
+
throw new runtime.RequiredError(
|
|
669
|
+
'xAPIKEY',
|
|
670
|
+
'Required parameter "xAPIKEY" was null or undefined when calling getZapierShopifyCourseMappings().'
|
|
671
|
+
);
|
|
672
|
+
}
|
|
673
|
+
|
|
674
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
675
|
+
throw new runtime.RequiredError(
|
|
676
|
+
'xPORTALSUBDOMAIN',
|
|
677
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierShopifyCourseMappings().'
|
|
678
|
+
);
|
|
679
|
+
}
|
|
680
|
+
|
|
681
|
+
const queryParameters: any = {};
|
|
682
|
+
|
|
683
|
+
if (requestParameters['shopDomain'] != null) {
|
|
684
|
+
queryParameters['shopDomain'] = requestParameters['shopDomain'];
|
|
685
|
+
}
|
|
686
|
+
|
|
687
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
688
|
+
|
|
689
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
690
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
691
|
+
}
|
|
692
|
+
|
|
693
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
694
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
|
|
698
|
+
let urlPath = `/integrations/zapier/shopify/course-mappings`;
|
|
699
|
+
|
|
700
|
+
return {
|
|
701
|
+
path: urlPath,
|
|
702
|
+
method: 'GET',
|
|
703
|
+
headers: headerParameters,
|
|
704
|
+
query: queryParameters,
|
|
705
|
+
};
|
|
706
|
+
}
|
|
707
|
+
|
|
708
|
+
/**
|
|
709
|
+
* List Shopify variant-to-course mappings
|
|
710
|
+
*/
|
|
711
|
+
async getZapierShopifyCourseMappingsRaw(requestParameters: GetZapierShopifyCourseMappingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetZapierShopifyCourseMappings>> {
|
|
712
|
+
const requestOptions = await this.getZapierShopifyCourseMappingsRequestOpts(requestParameters);
|
|
713
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
714
|
+
|
|
715
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetZapierShopifyCourseMappingsFromJSON(jsonValue));
|
|
716
|
+
}
|
|
717
|
+
|
|
718
|
+
/**
|
|
719
|
+
* List Shopify variant-to-course mappings
|
|
720
|
+
*/
|
|
721
|
+
async getZapierShopifyCourseMappings(requestParameters: GetZapierShopifyCourseMappingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetZapierShopifyCourseMappings> {
|
|
722
|
+
const response = await this.getZapierShopifyCourseMappingsRaw(requestParameters, initOverrides);
|
|
723
|
+
return await response.value();
|
|
724
|
+
}
|
|
725
|
+
|
|
726
|
+
/**
|
|
727
|
+
* Creates request options for getZapierUsers without sending the request
|
|
728
|
+
*/
|
|
729
|
+
async getZapierUsersRequestOpts(requestParameters: GetZapierUsersRequest): Promise<runtime.RequestOpts> {
|
|
730
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
731
|
+
throw new runtime.RequiredError(
|
|
732
|
+
'xAPIKEY',
|
|
733
|
+
'Required parameter "xAPIKEY" was null or undefined when calling getZapierUsers().'
|
|
734
|
+
);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
738
|
+
throw new runtime.RequiredError(
|
|
739
|
+
'xPORTALSUBDOMAIN',
|
|
740
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierUsers().'
|
|
741
|
+
);
|
|
742
|
+
}
|
|
743
|
+
|
|
744
|
+
if (requestParameters['email'] == null) {
|
|
745
|
+
throw new runtime.RequiredError(
|
|
746
|
+
'email',
|
|
747
|
+
'Required parameter "email" was null or undefined when calling getZapierUsers().'
|
|
748
|
+
);
|
|
749
|
+
}
|
|
750
|
+
|
|
751
|
+
const queryParameters: any = {};
|
|
752
|
+
|
|
753
|
+
if (requestParameters['email'] != null) {
|
|
754
|
+
queryParameters['email'] = requestParameters['email'];
|
|
755
|
+
}
|
|
756
|
+
|
|
757
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
758
|
+
|
|
759
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
760
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
761
|
+
}
|
|
762
|
+
|
|
763
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
764
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
|
|
768
|
+
let urlPath = `/integrations/zapier/users`;
|
|
769
|
+
|
|
770
|
+
return {
|
|
771
|
+
path: urlPath,
|
|
772
|
+
method: 'GET',
|
|
773
|
+
headers: headerParameters,
|
|
774
|
+
query: queryParameters,
|
|
775
|
+
};
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
/**
|
|
779
|
+
* Find a learner by exact email address
|
|
780
|
+
*/
|
|
781
|
+
async getZapierUsersRaw(requestParameters: GetZapierUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetZapierUsers>> {
|
|
782
|
+
const requestOptions = await this.getZapierUsersRequestOpts(requestParameters);
|
|
783
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
784
|
+
|
|
785
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetZapierUsersFromJSON(jsonValue));
|
|
786
|
+
}
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* Find a learner by exact email address
|
|
790
|
+
*/
|
|
791
|
+
async getZapierUsers(requestParameters: GetZapierUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetZapierUsers> {
|
|
792
|
+
const response = await this.getZapierUsersRaw(requestParameters, initOverrides);
|
|
793
|
+
return await response.value();
|
|
794
|
+
}
|
|
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
|
+
|
|
843
|
+
/**
|
|
844
|
+
* Creates request options for postZapierEnrollment without sending the request
|
|
845
|
+
*/
|
|
846
|
+
async postZapierEnrollmentRequestOpts(requestParameters: PostZapierEnrollmentRequest): Promise<runtime.RequestOpts> {
|
|
847
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
848
|
+
throw new runtime.RequiredError(
|
|
849
|
+
'xAPIKEY',
|
|
850
|
+
'Required parameter "xAPIKEY" was null or undefined when calling postZapierEnrollment().'
|
|
851
|
+
);
|
|
852
|
+
}
|
|
853
|
+
|
|
854
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
855
|
+
throw new runtime.RequiredError(
|
|
856
|
+
'xPORTALSUBDOMAIN',
|
|
857
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierEnrollment().'
|
|
858
|
+
);
|
|
859
|
+
}
|
|
860
|
+
|
|
861
|
+
if (requestParameters['postZapierEnrollment'] == null) {
|
|
862
|
+
throw new runtime.RequiredError(
|
|
863
|
+
'postZapierEnrollment',
|
|
864
|
+
'Required parameter "postZapierEnrollment" was null or undefined when calling postZapierEnrollment().'
|
|
865
|
+
);
|
|
866
|
+
}
|
|
867
|
+
|
|
868
|
+
const queryParameters: any = {};
|
|
869
|
+
|
|
870
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
871
|
+
|
|
872
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
873
|
+
|
|
874
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
875
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
876
|
+
}
|
|
877
|
+
|
|
878
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
879
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
|
|
883
|
+
let urlPath = `/integrations/zapier/enrollments`;
|
|
884
|
+
|
|
885
|
+
return {
|
|
886
|
+
path: urlPath,
|
|
887
|
+
method: 'POST',
|
|
888
|
+
headers: headerParameters,
|
|
889
|
+
query: queryParameters,
|
|
890
|
+
body: PostZapierEnrollmentToJSON(requestParameters['postZapierEnrollment']),
|
|
891
|
+
};
|
|
892
|
+
}
|
|
893
|
+
|
|
894
|
+
/**
|
|
895
|
+
* Enroll an existing learner in a course
|
|
896
|
+
*/
|
|
897
|
+
async postZapierEnrollmentRaw(requestParameters: PostZapierEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZapierEnrollment>> {
|
|
898
|
+
const requestOptions = await this.postZapierEnrollmentRequestOpts(requestParameters);
|
|
899
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
900
|
+
|
|
901
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ZapierEnrollmentFromJSON(jsonValue));
|
|
902
|
+
}
|
|
903
|
+
|
|
904
|
+
/**
|
|
905
|
+
* Enroll an existing learner in a course
|
|
906
|
+
*/
|
|
907
|
+
async postZapierEnrollment(requestParameters: PostZapierEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZapierEnrollment> {
|
|
908
|
+
const response = await this.postZapierEnrollmentRaw(requestParameters, initOverrides);
|
|
909
|
+
return await response.value();
|
|
910
|
+
}
|
|
911
|
+
|
|
912
|
+
/**
|
|
913
|
+
* Creates request options for postZapierSetup without sending the request
|
|
914
|
+
*/
|
|
915
|
+
async postZapierSetupRequestOpts(requestParameters: PostZapierSetupRequest): Promise<runtime.RequestOpts> {
|
|
916
|
+
if (requestParameters['postZapierSetup'] == null) {
|
|
917
|
+
throw new runtime.RequiredError(
|
|
918
|
+
'postZapierSetup',
|
|
919
|
+
'Required parameter "postZapierSetup" was null or undefined when calling postZapierSetup().'
|
|
920
|
+
);
|
|
921
|
+
}
|
|
922
|
+
|
|
923
|
+
const queryParameters: any = {};
|
|
924
|
+
|
|
925
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
926
|
+
|
|
927
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
928
|
+
|
|
929
|
+
|
|
930
|
+
let urlPath = `/integrations/zapier/setup`;
|
|
931
|
+
|
|
932
|
+
return {
|
|
933
|
+
path: urlPath,
|
|
934
|
+
method: 'POST',
|
|
935
|
+
headers: headerParameters,
|
|
936
|
+
query: queryParameters,
|
|
937
|
+
body: PostZapierSetupToJSON(requestParameters['postZapierSetup']),
|
|
938
|
+
};
|
|
939
|
+
}
|
|
940
|
+
|
|
941
|
+
/**
|
|
942
|
+
* Create a Zapier connection and API key for the selected portal
|
|
943
|
+
*/
|
|
944
|
+
async postZapierSetupRaw(requestParameters: PostZapierSetupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostZapierSetupResponse>> {
|
|
945
|
+
const requestOptions = await this.postZapierSetupRequestOpts(requestParameters);
|
|
946
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
947
|
+
|
|
948
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostZapierSetupResponseFromJSON(jsonValue));
|
|
949
|
+
}
|
|
950
|
+
|
|
951
|
+
/**
|
|
952
|
+
* Create a Zapier connection and API key for the selected portal
|
|
953
|
+
*/
|
|
954
|
+
async postZapierSetup(requestParameters: PostZapierSetupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostZapierSetupResponse> {
|
|
955
|
+
const response = await this.postZapierSetupRaw(requestParameters, initOverrides);
|
|
956
|
+
return await response.value();
|
|
957
|
+
}
|
|
958
|
+
|
|
959
|
+
/**
|
|
960
|
+
* Creates request options for postZapierShopifyCourseMapping without sending the request
|
|
961
|
+
*/
|
|
962
|
+
async postZapierShopifyCourseMappingRequestOpts(requestParameters: PostZapierShopifyCourseMappingRequest): Promise<runtime.RequestOpts> {
|
|
963
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
964
|
+
throw new runtime.RequiredError(
|
|
965
|
+
'xAPIKEY',
|
|
966
|
+
'Required parameter "xAPIKEY" was null or undefined when calling postZapierShopifyCourseMapping().'
|
|
967
|
+
);
|
|
968
|
+
}
|
|
969
|
+
|
|
970
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
971
|
+
throw new runtime.RequiredError(
|
|
972
|
+
'xPORTALSUBDOMAIN',
|
|
973
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierShopifyCourseMapping().'
|
|
974
|
+
);
|
|
975
|
+
}
|
|
976
|
+
|
|
977
|
+
if (requestParameters['postZapierShopifyCourseMapping'] == null) {
|
|
978
|
+
throw new runtime.RequiredError(
|
|
979
|
+
'postZapierShopifyCourseMapping',
|
|
980
|
+
'Required parameter "postZapierShopifyCourseMapping" was null or undefined when calling postZapierShopifyCourseMapping().'
|
|
981
|
+
);
|
|
982
|
+
}
|
|
983
|
+
|
|
984
|
+
const queryParameters: any = {};
|
|
985
|
+
|
|
986
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
987
|
+
|
|
988
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
989
|
+
|
|
990
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
991
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
992
|
+
}
|
|
993
|
+
|
|
994
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
995
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
996
|
+
}
|
|
997
|
+
|
|
998
|
+
|
|
999
|
+
let urlPath = `/integrations/zapier/shopify/course-mappings`;
|
|
1000
|
+
|
|
1001
|
+
return {
|
|
1002
|
+
path: urlPath,
|
|
1003
|
+
method: 'POST',
|
|
1004
|
+
headers: headerParameters,
|
|
1005
|
+
query: queryParameters,
|
|
1006
|
+
body: PostZapierShopifyCourseMappingToJSON(requestParameters['postZapierShopifyCourseMapping']),
|
|
1007
|
+
};
|
|
1008
|
+
}
|
|
1009
|
+
|
|
1010
|
+
/**
|
|
1011
|
+
* Create or update a Shopify variant-to-course mapping
|
|
1012
|
+
*/
|
|
1013
|
+
async postZapierShopifyCourseMappingRaw(requestParameters: PostZapierShopifyCourseMappingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZapierShopifyCourseMapping>> {
|
|
1014
|
+
const requestOptions = await this.postZapierShopifyCourseMappingRequestOpts(requestParameters);
|
|
1015
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1016
|
+
|
|
1017
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ZapierShopifyCourseMappingFromJSON(jsonValue));
|
|
1018
|
+
}
|
|
1019
|
+
|
|
1020
|
+
/**
|
|
1021
|
+
* Create or update a Shopify variant-to-course mapping
|
|
1022
|
+
*/
|
|
1023
|
+
async postZapierShopifyCourseMapping(requestParameters: PostZapierShopifyCourseMappingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZapierShopifyCourseMapping> {
|
|
1024
|
+
const response = await this.postZapierShopifyCourseMappingRaw(requestParameters, initOverrides);
|
|
1025
|
+
return await response.value();
|
|
1026
|
+
}
|
|
1027
|
+
|
|
1028
|
+
/**
|
|
1029
|
+
* Creates request options for postZapierShopifyEnrollment without sending the request
|
|
1030
|
+
*/
|
|
1031
|
+
async postZapierShopifyEnrollmentRequestOpts(requestParameters: PostZapierShopifyEnrollmentRequest): Promise<runtime.RequestOpts> {
|
|
1032
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
1033
|
+
throw new runtime.RequiredError(
|
|
1034
|
+
'xAPIKEY',
|
|
1035
|
+
'Required parameter "xAPIKEY" was null or undefined when calling postZapierShopifyEnrollment().'
|
|
1036
|
+
);
|
|
1037
|
+
}
|
|
1038
|
+
|
|
1039
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
1040
|
+
throw new runtime.RequiredError(
|
|
1041
|
+
'xPORTALSUBDOMAIN',
|
|
1042
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierShopifyEnrollment().'
|
|
1043
|
+
);
|
|
1044
|
+
}
|
|
1045
|
+
|
|
1046
|
+
if (requestParameters['postZapierShopifyEnrollment'] == null) {
|
|
1047
|
+
throw new runtime.RequiredError(
|
|
1048
|
+
'postZapierShopifyEnrollment',
|
|
1049
|
+
'Required parameter "postZapierShopifyEnrollment" was null or undefined when calling postZapierShopifyEnrollment().'
|
|
1050
|
+
);
|
|
1051
|
+
}
|
|
1052
|
+
|
|
1053
|
+
const queryParameters: any = {};
|
|
1054
|
+
|
|
1055
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1056
|
+
|
|
1057
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1058
|
+
|
|
1059
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
1060
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
1061
|
+
}
|
|
1062
|
+
|
|
1063
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
1064
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
1065
|
+
}
|
|
1066
|
+
|
|
1067
|
+
|
|
1068
|
+
let urlPath = `/integrations/zapier/shopify/enrollments`;
|
|
1069
|
+
|
|
1070
|
+
return {
|
|
1071
|
+
path: urlPath,
|
|
1072
|
+
method: 'POST',
|
|
1073
|
+
headers: headerParameters,
|
|
1074
|
+
query: queryParameters,
|
|
1075
|
+
body: PostZapierShopifyEnrollmentToJSON(requestParameters['postZapierShopifyEnrollment']),
|
|
1076
|
+
};
|
|
1077
|
+
}
|
|
1078
|
+
|
|
1079
|
+
/**
|
|
1080
|
+
* Find or invite a Shopify customer and enroll them using the purchased variant mapping
|
|
1081
|
+
*/
|
|
1082
|
+
async postZapierShopifyEnrollmentRaw(requestParameters: PostZapierShopifyEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostZapierShopifyEnrollmentResponse>> {
|
|
1083
|
+
const requestOptions = await this.postZapierShopifyEnrollmentRequestOpts(requestParameters);
|
|
1084
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1085
|
+
|
|
1086
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostZapierShopifyEnrollmentResponseFromJSON(jsonValue));
|
|
1087
|
+
}
|
|
1088
|
+
|
|
1089
|
+
/**
|
|
1090
|
+
* Find or invite a Shopify customer and enroll them using the purchased variant mapping
|
|
1091
|
+
*/
|
|
1092
|
+
async postZapierShopifyEnrollment(requestParameters: PostZapierShopifyEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostZapierShopifyEnrollmentResponse> {
|
|
1093
|
+
const response = await this.postZapierShopifyEnrollmentRaw(requestParameters, initOverrides);
|
|
1094
|
+
return await response.value();
|
|
1095
|
+
}
|
|
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
|
+
|
|
1166
|
+
/**
|
|
1167
|
+
* Creates request options for postZapierUser without sending the request
|
|
1168
|
+
*/
|
|
1169
|
+
async postZapierUserRequestOpts(requestParameters: PostZapierUserRequest): Promise<runtime.RequestOpts> {
|
|
1170
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
1171
|
+
throw new runtime.RequiredError(
|
|
1172
|
+
'xAPIKEY',
|
|
1173
|
+
'Required parameter "xAPIKEY" was null or undefined when calling postZapierUser().'
|
|
1174
|
+
);
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1177
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
1178
|
+
throw new runtime.RequiredError(
|
|
1179
|
+
'xPORTALSUBDOMAIN',
|
|
1180
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierUser().'
|
|
1181
|
+
);
|
|
1182
|
+
}
|
|
1183
|
+
|
|
1184
|
+
if (requestParameters['postZapierUser'] == null) {
|
|
1185
|
+
throw new runtime.RequiredError(
|
|
1186
|
+
'postZapierUser',
|
|
1187
|
+
'Required parameter "postZapierUser" was null or undefined when calling postZapierUser().'
|
|
1188
|
+
);
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
const queryParameters: any = {};
|
|
1192
|
+
|
|
1193
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1194
|
+
|
|
1195
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1196
|
+
|
|
1197
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
1198
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
1199
|
+
}
|
|
1200
|
+
|
|
1201
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
1202
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
1203
|
+
}
|
|
1204
|
+
|
|
1205
|
+
|
|
1206
|
+
let urlPath = `/integrations/zapier/users`;
|
|
1207
|
+
|
|
1208
|
+
return {
|
|
1209
|
+
path: urlPath,
|
|
1210
|
+
method: 'POST',
|
|
1211
|
+
headers: headerParameters,
|
|
1212
|
+
query: queryParameters,
|
|
1213
|
+
body: PostZapierUserToJSON(requestParameters['postZapierUser']),
|
|
1214
|
+
};
|
|
1215
|
+
}
|
|
1216
|
+
|
|
1217
|
+
/**
|
|
1218
|
+
* Find or invite a learner to the connected portal
|
|
1219
|
+
*/
|
|
1220
|
+
async postZapierUserRaw(requestParameters: PostZapierUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZapierUser>> {
|
|
1221
|
+
const requestOptions = await this.postZapierUserRequestOpts(requestParameters);
|
|
1222
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1223
|
+
|
|
1224
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ZapierUserFromJSON(jsonValue));
|
|
1225
|
+
}
|
|
1226
|
+
|
|
1227
|
+
/**
|
|
1228
|
+
* Find or invite a learner to the connected portal
|
|
1229
|
+
*/
|
|
1230
|
+
async postZapierUser(requestParameters: PostZapierUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZapierUser> {
|
|
1231
|
+
const response = await this.postZapierUserRaw(requestParameters, initOverrides);
|
|
1232
|
+
return await response.value();
|
|
1233
|
+
}
|
|
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
|
+
|
|
1290
|
+
/**
|
|
1291
|
+
* Creates request options for putZapierSetup without sending the request
|
|
1292
|
+
*/
|
|
1293
|
+
async putZapierSetupRequestOpts(requestParameters: PutZapierSetupRequest): Promise<runtime.RequestOpts> {
|
|
1294
|
+
if (requestParameters['zapierIntegrationId'] == null) {
|
|
1295
|
+
throw new runtime.RequiredError(
|
|
1296
|
+
'zapierIntegrationId',
|
|
1297
|
+
'Required parameter "zapierIntegrationId" was null or undefined when calling putZapierSetup().'
|
|
1298
|
+
);
|
|
1299
|
+
}
|
|
1300
|
+
|
|
1301
|
+
if (requestParameters['putZapierSetup'] == null) {
|
|
1302
|
+
throw new runtime.RequiredError(
|
|
1303
|
+
'putZapierSetup',
|
|
1304
|
+
'Required parameter "putZapierSetup" was null or undefined when calling putZapierSetup().'
|
|
1305
|
+
);
|
|
1306
|
+
}
|
|
1307
|
+
|
|
1308
|
+
const queryParameters: any = {};
|
|
1309
|
+
|
|
1310
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
1311
|
+
|
|
1312
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
1313
|
+
|
|
1314
|
+
|
|
1315
|
+
let urlPath = `/integrations/zapier/setup/{zapierIntegrationId}`;
|
|
1316
|
+
urlPath = urlPath.replace('{zapierIntegrationId}', encodeURIComponent(String(requestParameters['zapierIntegrationId'])));
|
|
1317
|
+
|
|
1318
|
+
return {
|
|
1319
|
+
path: urlPath,
|
|
1320
|
+
method: 'PUT',
|
|
1321
|
+
headers: headerParameters,
|
|
1322
|
+
query: queryParameters,
|
|
1323
|
+
body: PutZapierSetupToJSON(requestParameters['putZapierSetup']),
|
|
1324
|
+
};
|
|
1325
|
+
}
|
|
1326
|
+
|
|
1327
|
+
/**
|
|
1328
|
+
* Update a Zapier connection\'s name or permissions
|
|
1329
|
+
*/
|
|
1330
|
+
async putZapierSetupRaw(requestParameters: PutZapierSetupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZapierIntegration>> {
|
|
1331
|
+
const requestOptions = await this.putZapierSetupRequestOpts(requestParameters);
|
|
1332
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
1333
|
+
|
|
1334
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ZapierIntegrationFromJSON(jsonValue));
|
|
1335
|
+
}
|
|
1336
|
+
|
|
1337
|
+
/**
|
|
1338
|
+
* Update a Zapier connection\'s name or permissions
|
|
1339
|
+
*/
|
|
1340
|
+
async putZapierSetup(requestParameters: PutZapierSetupRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZapierIntegration> {
|
|
1341
|
+
const response = await this.putZapierSetupRaw(requestParameters, initOverrides);
|
|
1342
|
+
return await response.value();
|
|
1343
|
+
}
|
|
1344
|
+
|
|
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
|
+
} as const;
|
|
1355
|
+
export type GetZapierEventsEventTypeEnum = typeof GetZapierEventsEventTypeEnum[keyof typeof GetZapierEventsEventTypeEnum];
|