@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
|
@@ -22,18 +22,73 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
24
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
25
|
-
exports.IntegrationApi = void 0;
|
|
25
|
+
exports.GetZapierEventsEventTypeEnum = exports.IntegrationApi = void 0;
|
|
26
26
|
const runtime = require("../runtime");
|
|
27
|
+
const CustomWebhookIntegration_1 = require("../models/CustomWebhookIntegration");
|
|
28
|
+
const GetZapierCourses_1 = require("../models/GetZapierCourses");
|
|
27
29
|
const GetZapierMe_1 = require("../models/GetZapierMe");
|
|
28
30
|
const GetZapierSetup_1 = require("../models/GetZapierSetup");
|
|
31
|
+
const GetZapierShopifyCourseMappings_1 = require("../models/GetZapierShopifyCourseMappings");
|
|
32
|
+
const GetZapierUsers_1 = require("../models/GetZapierUsers");
|
|
33
|
+
const IntegrationEvent_1 = require("../models/IntegrationEvent");
|
|
34
|
+
const PostCustomWebhookIntegration_1 = require("../models/PostCustomWebhookIntegration");
|
|
35
|
+
const PostZapierEnrollment_1 = require("../models/PostZapierEnrollment");
|
|
29
36
|
const PostZapierSetup_1 = require("../models/PostZapierSetup");
|
|
30
37
|
const PostZapierSetupResponse_1 = require("../models/PostZapierSetupResponse");
|
|
38
|
+
const PostZapierShopifyCourseMapping_1 = require("../models/PostZapierShopifyCourseMapping");
|
|
39
|
+
const PostZapierShopifyEnrollment_1 = require("../models/PostZapierShopifyEnrollment");
|
|
40
|
+
const PostZapierShopifyEnrollmentResponse_1 = require("../models/PostZapierShopifyEnrollmentResponse");
|
|
41
|
+
const PostZapierSubscription_1 = require("../models/PostZapierSubscription");
|
|
42
|
+
const PostZapierUser_1 = require("../models/PostZapierUser");
|
|
43
|
+
const PutCustomWebhookIntegration_1 = require("../models/PutCustomWebhookIntegration");
|
|
31
44
|
const PutZapierSetup_1 = require("../models/PutZapierSetup");
|
|
45
|
+
const ZapierEnrollment_1 = require("../models/ZapierEnrollment");
|
|
32
46
|
const ZapierIntegration_1 = require("../models/ZapierIntegration");
|
|
47
|
+
const ZapierShopifyCourseMapping_1 = require("../models/ZapierShopifyCourseMapping");
|
|
48
|
+
const ZapierSubscription_1 = require("../models/ZapierSubscription");
|
|
49
|
+
const ZapierUser_1 = require("../models/ZapierUser");
|
|
33
50
|
/**
|
|
34
51
|
*
|
|
35
52
|
*/
|
|
36
53
|
class IntegrationApi extends runtime.BaseAPI {
|
|
54
|
+
/**
|
|
55
|
+
* Creates request options for deleteCustomWebhookIntegration without sending the request
|
|
56
|
+
*/
|
|
57
|
+
deleteCustomWebhookIntegrationRequestOpts(requestParameters) {
|
|
58
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
59
|
+
if (requestParameters['webhookIntegrationId'] == null) {
|
|
60
|
+
throw new runtime.RequiredError('webhookIntegrationId', 'Required parameter "webhookIntegrationId" was null or undefined when calling deleteCustomWebhookIntegration().');
|
|
61
|
+
}
|
|
62
|
+
const queryParameters = {};
|
|
63
|
+
const headerParameters = {};
|
|
64
|
+
let urlPath = `/integrations/webhooks/{webhookIntegrationId}`;
|
|
65
|
+
urlPath = urlPath.replace('{webhookIntegrationId}', encodeURIComponent(String(requestParameters['webhookIntegrationId'])));
|
|
66
|
+
return {
|
|
67
|
+
path: urlPath,
|
|
68
|
+
method: 'DELETE',
|
|
69
|
+
headers: headerParameters,
|
|
70
|
+
query: queryParameters,
|
|
71
|
+
};
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
/**
|
|
75
|
+
* Delete a custom webhook destination
|
|
76
|
+
*/
|
|
77
|
+
deleteCustomWebhookIntegrationRaw(requestParameters, initOverrides) {
|
|
78
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
79
|
+
const requestOptions = yield this.deleteCustomWebhookIntegrationRequestOpts(requestParameters);
|
|
80
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
81
|
+
return new runtime.VoidApiResponse(response);
|
|
82
|
+
});
|
|
83
|
+
}
|
|
84
|
+
/**
|
|
85
|
+
* Delete a custom webhook destination
|
|
86
|
+
*/
|
|
87
|
+
deleteCustomWebhookIntegration(requestParameters, initOverrides) {
|
|
88
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
89
|
+
yield this.deleteCustomWebhookIntegrationRaw(requestParameters, initOverrides);
|
|
90
|
+
});
|
|
91
|
+
}
|
|
37
92
|
/**
|
|
38
93
|
* Creates request options for deleteZapierSetup without sending the request
|
|
39
94
|
*/
|
|
@@ -72,6 +127,203 @@ class IntegrationApi extends runtime.BaseAPI {
|
|
|
72
127
|
yield this.deleteZapierSetupRaw(requestParameters, initOverrides);
|
|
73
128
|
});
|
|
74
129
|
}
|
|
130
|
+
/**
|
|
131
|
+
* Creates request options for deleteZapierSubscription without sending the request
|
|
132
|
+
*/
|
|
133
|
+
deleteZapierSubscriptionRequestOpts(requestParameters) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
if (requestParameters['subscriptionId'] == null) {
|
|
136
|
+
throw new runtime.RequiredError('subscriptionId', 'Required parameter "subscriptionId" was null or undefined when calling deleteZapierSubscription().');
|
|
137
|
+
}
|
|
138
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
139
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling deleteZapierSubscription().');
|
|
140
|
+
}
|
|
141
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
142
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling deleteZapierSubscription().');
|
|
143
|
+
}
|
|
144
|
+
const queryParameters = {};
|
|
145
|
+
const headerParameters = {};
|
|
146
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
147
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
148
|
+
}
|
|
149
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
150
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
151
|
+
}
|
|
152
|
+
let urlPath = `/integrations/zapier/subscriptions/{subscriptionId}`;
|
|
153
|
+
urlPath = urlPath.replace('{subscriptionId}', encodeURIComponent(String(requestParameters['subscriptionId'])));
|
|
154
|
+
return {
|
|
155
|
+
path: urlPath,
|
|
156
|
+
method: 'DELETE',
|
|
157
|
+
headers: headerParameters,
|
|
158
|
+
query: queryParameters,
|
|
159
|
+
};
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Unsubscribe a Zap from an Edaxu lifecycle event
|
|
164
|
+
*/
|
|
165
|
+
deleteZapierSubscriptionRaw(requestParameters, initOverrides) {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
+
const requestOptions = yield this.deleteZapierSubscriptionRequestOpts(requestParameters);
|
|
168
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
169
|
+
return new runtime.VoidApiResponse(response);
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
/**
|
|
173
|
+
* Unsubscribe a Zap from an Edaxu lifecycle event
|
|
174
|
+
*/
|
|
175
|
+
deleteZapierSubscription(requestParameters, initOverrides) {
|
|
176
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
177
|
+
yield this.deleteZapierSubscriptionRaw(requestParameters, initOverrides);
|
|
178
|
+
});
|
|
179
|
+
}
|
|
180
|
+
/**
|
|
181
|
+
* Creates request options for getCustomWebhookIntegrations without sending the request
|
|
182
|
+
*/
|
|
183
|
+
getCustomWebhookIntegrationsRequestOpts() {
|
|
184
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
185
|
+
const queryParameters = {};
|
|
186
|
+
const headerParameters = {};
|
|
187
|
+
let urlPath = `/integrations/webhooks`;
|
|
188
|
+
return {
|
|
189
|
+
path: urlPath,
|
|
190
|
+
method: 'GET',
|
|
191
|
+
headers: headerParameters,
|
|
192
|
+
query: queryParameters,
|
|
193
|
+
};
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
/**
|
|
197
|
+
* List custom webhook destinations for the selected portal
|
|
198
|
+
*/
|
|
199
|
+
getCustomWebhookIntegrationsRaw(initOverrides) {
|
|
200
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
201
|
+
const requestOptions = yield this.getCustomWebhookIntegrationsRequestOpts();
|
|
202
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
203
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(CustomWebhookIntegration_1.CustomWebhookIntegrationFromJSON));
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
/**
|
|
207
|
+
* List custom webhook destinations for the selected portal
|
|
208
|
+
*/
|
|
209
|
+
getCustomWebhookIntegrations(initOverrides) {
|
|
210
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
211
|
+
const response = yield this.getCustomWebhookIntegrationsRaw(initOverrides);
|
|
212
|
+
return yield response.value();
|
|
213
|
+
});
|
|
214
|
+
}
|
|
215
|
+
/**
|
|
216
|
+
* Creates request options for getZapierCourses without sending the request
|
|
217
|
+
*/
|
|
218
|
+
getZapierCoursesRequestOpts(requestParameters) {
|
|
219
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
220
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
221
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling getZapierCourses().');
|
|
222
|
+
}
|
|
223
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
224
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierCourses().');
|
|
225
|
+
}
|
|
226
|
+
const queryParameters = {};
|
|
227
|
+
if (requestParameters['page'] != null) {
|
|
228
|
+
queryParameters['page'] = requestParameters['page'];
|
|
229
|
+
}
|
|
230
|
+
if (requestParameters['pageSize'] != null) {
|
|
231
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
232
|
+
}
|
|
233
|
+
if (requestParameters['search'] != null) {
|
|
234
|
+
queryParameters['search'] = requestParameters['search'];
|
|
235
|
+
}
|
|
236
|
+
const headerParameters = {};
|
|
237
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
238
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
239
|
+
}
|
|
240
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
241
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
242
|
+
}
|
|
243
|
+
let urlPath = `/integrations/zapier/courses`;
|
|
244
|
+
return {
|
|
245
|
+
path: urlPath,
|
|
246
|
+
method: 'GET',
|
|
247
|
+
headers: headerParameters,
|
|
248
|
+
query: queryParameters,
|
|
249
|
+
};
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* List published courses available to a Zapier connection
|
|
254
|
+
*/
|
|
255
|
+
getZapierCoursesRaw(requestParameters, initOverrides) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
const requestOptions = yield this.getZapierCoursesRequestOpts(requestParameters);
|
|
258
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
259
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetZapierCourses_1.GetZapierCoursesFromJSON)(jsonValue));
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* List published courses available to a Zapier connection
|
|
264
|
+
*/
|
|
265
|
+
getZapierCourses(requestParameters, initOverrides) {
|
|
266
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
267
|
+
const response = yield this.getZapierCoursesRaw(requestParameters, initOverrides);
|
|
268
|
+
return yield response.value();
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Creates request options for getZapierEvents without sending the request
|
|
273
|
+
*/
|
|
274
|
+
getZapierEventsRequestOpts(requestParameters) {
|
|
275
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
276
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
277
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling getZapierEvents().');
|
|
278
|
+
}
|
|
279
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
280
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierEvents().');
|
|
281
|
+
}
|
|
282
|
+
if (requestParameters['eventType'] == null) {
|
|
283
|
+
throw new runtime.RequiredError('eventType', 'Required parameter "eventType" was null or undefined when calling getZapierEvents().');
|
|
284
|
+
}
|
|
285
|
+
const queryParameters = {};
|
|
286
|
+
if (requestParameters['eventType'] != null) {
|
|
287
|
+
queryParameters['eventType'] = requestParameters['eventType'];
|
|
288
|
+
}
|
|
289
|
+
if (requestParameters['pageSize'] != null) {
|
|
290
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
291
|
+
}
|
|
292
|
+
const headerParameters = {};
|
|
293
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
294
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
295
|
+
}
|
|
296
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
297
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
298
|
+
}
|
|
299
|
+
let urlPath = `/integrations/zapier/events`;
|
|
300
|
+
return {
|
|
301
|
+
path: urlPath,
|
|
302
|
+
method: 'GET',
|
|
303
|
+
headers: headerParameters,
|
|
304
|
+
query: queryParameters,
|
|
305
|
+
};
|
|
306
|
+
});
|
|
307
|
+
}
|
|
308
|
+
/**
|
|
309
|
+
* List recent lifecycle events for Zapier trigger setup
|
|
310
|
+
*/
|
|
311
|
+
getZapierEventsRaw(requestParameters, initOverrides) {
|
|
312
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
313
|
+
const requestOptions = yield this.getZapierEventsRequestOpts(requestParameters);
|
|
314
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
315
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => jsonValue.map(IntegrationEvent_1.IntegrationEventFromJSON));
|
|
316
|
+
});
|
|
317
|
+
}
|
|
318
|
+
/**
|
|
319
|
+
* List recent lifecycle events for Zapier trigger setup
|
|
320
|
+
*/
|
|
321
|
+
getZapierEvents(requestParameters, initOverrides) {
|
|
322
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
323
|
+
const response = yield this.getZapierEventsRaw(requestParameters, initOverrides);
|
|
324
|
+
return yield response.value();
|
|
325
|
+
});
|
|
326
|
+
}
|
|
75
327
|
/**
|
|
76
328
|
* Creates request options for getZapierMe without sending the request
|
|
77
329
|
*/
|
|
@@ -154,6 +406,201 @@ class IntegrationApi extends runtime.BaseAPI {
|
|
|
154
406
|
return yield response.value();
|
|
155
407
|
});
|
|
156
408
|
}
|
|
409
|
+
/**
|
|
410
|
+
* Creates request options for getZapierShopifyCourseMappings without sending the request
|
|
411
|
+
*/
|
|
412
|
+
getZapierShopifyCourseMappingsRequestOpts(requestParameters) {
|
|
413
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
414
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
415
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling getZapierShopifyCourseMappings().');
|
|
416
|
+
}
|
|
417
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
418
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierShopifyCourseMappings().');
|
|
419
|
+
}
|
|
420
|
+
const queryParameters = {};
|
|
421
|
+
if (requestParameters['shopDomain'] != null) {
|
|
422
|
+
queryParameters['shopDomain'] = requestParameters['shopDomain'];
|
|
423
|
+
}
|
|
424
|
+
const headerParameters = {};
|
|
425
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
426
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
427
|
+
}
|
|
428
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
429
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
430
|
+
}
|
|
431
|
+
let urlPath = `/integrations/zapier/shopify/course-mappings`;
|
|
432
|
+
return {
|
|
433
|
+
path: urlPath,
|
|
434
|
+
method: 'GET',
|
|
435
|
+
headers: headerParameters,
|
|
436
|
+
query: queryParameters,
|
|
437
|
+
};
|
|
438
|
+
});
|
|
439
|
+
}
|
|
440
|
+
/**
|
|
441
|
+
* List Shopify variant-to-course mappings
|
|
442
|
+
*/
|
|
443
|
+
getZapierShopifyCourseMappingsRaw(requestParameters, initOverrides) {
|
|
444
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
445
|
+
const requestOptions = yield this.getZapierShopifyCourseMappingsRequestOpts(requestParameters);
|
|
446
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
447
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetZapierShopifyCourseMappings_1.GetZapierShopifyCourseMappingsFromJSON)(jsonValue));
|
|
448
|
+
});
|
|
449
|
+
}
|
|
450
|
+
/**
|
|
451
|
+
* List Shopify variant-to-course mappings
|
|
452
|
+
*/
|
|
453
|
+
getZapierShopifyCourseMappings(requestParameters, initOverrides) {
|
|
454
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
455
|
+
const response = yield this.getZapierShopifyCourseMappingsRaw(requestParameters, initOverrides);
|
|
456
|
+
return yield response.value();
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Creates request options for getZapierUsers without sending the request
|
|
461
|
+
*/
|
|
462
|
+
getZapierUsersRequestOpts(requestParameters) {
|
|
463
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
464
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
465
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling getZapierUsers().');
|
|
466
|
+
}
|
|
467
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
468
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierUsers().');
|
|
469
|
+
}
|
|
470
|
+
if (requestParameters['email'] == null) {
|
|
471
|
+
throw new runtime.RequiredError('email', 'Required parameter "email" was null or undefined when calling getZapierUsers().');
|
|
472
|
+
}
|
|
473
|
+
const queryParameters = {};
|
|
474
|
+
if (requestParameters['email'] != null) {
|
|
475
|
+
queryParameters['email'] = requestParameters['email'];
|
|
476
|
+
}
|
|
477
|
+
const headerParameters = {};
|
|
478
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
479
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
480
|
+
}
|
|
481
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
482
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
483
|
+
}
|
|
484
|
+
let urlPath = `/integrations/zapier/users`;
|
|
485
|
+
return {
|
|
486
|
+
path: urlPath,
|
|
487
|
+
method: 'GET',
|
|
488
|
+
headers: headerParameters,
|
|
489
|
+
query: queryParameters,
|
|
490
|
+
};
|
|
491
|
+
});
|
|
492
|
+
}
|
|
493
|
+
/**
|
|
494
|
+
* Find a learner by exact email address
|
|
495
|
+
*/
|
|
496
|
+
getZapierUsersRaw(requestParameters, initOverrides) {
|
|
497
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
498
|
+
const requestOptions = yield this.getZapierUsersRequestOpts(requestParameters);
|
|
499
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
500
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetZapierUsers_1.GetZapierUsersFromJSON)(jsonValue));
|
|
501
|
+
});
|
|
502
|
+
}
|
|
503
|
+
/**
|
|
504
|
+
* Find a learner by exact email address
|
|
505
|
+
*/
|
|
506
|
+
getZapierUsers(requestParameters, initOverrides) {
|
|
507
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
508
|
+
const response = yield this.getZapierUsersRaw(requestParameters, initOverrides);
|
|
509
|
+
return yield response.value();
|
|
510
|
+
});
|
|
511
|
+
}
|
|
512
|
+
/**
|
|
513
|
+
* Creates request options for postCustomWebhookIntegration without sending the request
|
|
514
|
+
*/
|
|
515
|
+
postCustomWebhookIntegrationRequestOpts(requestParameters) {
|
|
516
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
517
|
+
if (requestParameters['postCustomWebhookIntegration'] == null) {
|
|
518
|
+
throw new runtime.RequiredError('postCustomWebhookIntegration', 'Required parameter "postCustomWebhookIntegration" was null or undefined when calling postCustomWebhookIntegration().');
|
|
519
|
+
}
|
|
520
|
+
const queryParameters = {};
|
|
521
|
+
const headerParameters = {};
|
|
522
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
523
|
+
let urlPath = `/integrations/webhooks`;
|
|
524
|
+
return {
|
|
525
|
+
path: urlPath,
|
|
526
|
+
method: 'POST',
|
|
527
|
+
headers: headerParameters,
|
|
528
|
+
query: queryParameters,
|
|
529
|
+
body: (0, PostCustomWebhookIntegration_1.PostCustomWebhookIntegrationToJSON)(requestParameters['postCustomWebhookIntegration']),
|
|
530
|
+
};
|
|
531
|
+
});
|
|
532
|
+
}
|
|
533
|
+
/**
|
|
534
|
+
* Create a custom webhook destination for lifecycle events
|
|
535
|
+
*/
|
|
536
|
+
postCustomWebhookIntegrationRaw(requestParameters, initOverrides) {
|
|
537
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
538
|
+
const requestOptions = yield this.postCustomWebhookIntegrationRequestOpts(requestParameters);
|
|
539
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
540
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CustomWebhookIntegration_1.CustomWebhookIntegrationFromJSON)(jsonValue));
|
|
541
|
+
});
|
|
542
|
+
}
|
|
543
|
+
/**
|
|
544
|
+
* Create a custom webhook destination for lifecycle events
|
|
545
|
+
*/
|
|
546
|
+
postCustomWebhookIntegration(requestParameters, initOverrides) {
|
|
547
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
548
|
+
const response = yield this.postCustomWebhookIntegrationRaw(requestParameters, initOverrides);
|
|
549
|
+
return yield response.value();
|
|
550
|
+
});
|
|
551
|
+
}
|
|
552
|
+
/**
|
|
553
|
+
* Creates request options for postZapierEnrollment without sending the request
|
|
554
|
+
*/
|
|
555
|
+
postZapierEnrollmentRequestOpts(requestParameters) {
|
|
556
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
557
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
558
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling postZapierEnrollment().');
|
|
559
|
+
}
|
|
560
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
561
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierEnrollment().');
|
|
562
|
+
}
|
|
563
|
+
if (requestParameters['postZapierEnrollment'] == null) {
|
|
564
|
+
throw new runtime.RequiredError('postZapierEnrollment', 'Required parameter "postZapierEnrollment" was null or undefined when calling postZapierEnrollment().');
|
|
565
|
+
}
|
|
566
|
+
const queryParameters = {};
|
|
567
|
+
const headerParameters = {};
|
|
568
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
569
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
570
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
571
|
+
}
|
|
572
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
573
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
574
|
+
}
|
|
575
|
+
let urlPath = `/integrations/zapier/enrollments`;
|
|
576
|
+
return {
|
|
577
|
+
path: urlPath,
|
|
578
|
+
method: 'POST',
|
|
579
|
+
headers: headerParameters,
|
|
580
|
+
query: queryParameters,
|
|
581
|
+
body: (0, PostZapierEnrollment_1.PostZapierEnrollmentToJSON)(requestParameters['postZapierEnrollment']),
|
|
582
|
+
};
|
|
583
|
+
});
|
|
584
|
+
}
|
|
585
|
+
/**
|
|
586
|
+
* Enroll an existing learner in a course
|
|
587
|
+
*/
|
|
588
|
+
postZapierEnrollmentRaw(requestParameters, initOverrides) {
|
|
589
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
590
|
+
const requestOptions = yield this.postZapierEnrollmentRequestOpts(requestParameters);
|
|
591
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
592
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, ZapierEnrollment_1.ZapierEnrollmentFromJSON)(jsonValue));
|
|
593
|
+
});
|
|
594
|
+
}
|
|
595
|
+
/**
|
|
596
|
+
* Enroll an existing learner in a course
|
|
597
|
+
*/
|
|
598
|
+
postZapierEnrollment(requestParameters, initOverrides) {
|
|
599
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
600
|
+
const response = yield this.postZapierEnrollmentRaw(requestParameters, initOverrides);
|
|
601
|
+
return yield response.value();
|
|
602
|
+
});
|
|
603
|
+
}
|
|
157
604
|
/**
|
|
158
605
|
* Creates request options for postZapierSetup without sending the request
|
|
159
606
|
*/
|
|
@@ -194,6 +641,258 @@ class IntegrationApi extends runtime.BaseAPI {
|
|
|
194
641
|
return yield response.value();
|
|
195
642
|
});
|
|
196
643
|
}
|
|
644
|
+
/**
|
|
645
|
+
* Creates request options for postZapierShopifyCourseMapping without sending the request
|
|
646
|
+
*/
|
|
647
|
+
postZapierShopifyCourseMappingRequestOpts(requestParameters) {
|
|
648
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
649
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
650
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling postZapierShopifyCourseMapping().');
|
|
651
|
+
}
|
|
652
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
653
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierShopifyCourseMapping().');
|
|
654
|
+
}
|
|
655
|
+
if (requestParameters['postZapierShopifyCourseMapping'] == null) {
|
|
656
|
+
throw new runtime.RequiredError('postZapierShopifyCourseMapping', 'Required parameter "postZapierShopifyCourseMapping" was null or undefined when calling postZapierShopifyCourseMapping().');
|
|
657
|
+
}
|
|
658
|
+
const queryParameters = {};
|
|
659
|
+
const headerParameters = {};
|
|
660
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
661
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
662
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
663
|
+
}
|
|
664
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
665
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
666
|
+
}
|
|
667
|
+
let urlPath = `/integrations/zapier/shopify/course-mappings`;
|
|
668
|
+
return {
|
|
669
|
+
path: urlPath,
|
|
670
|
+
method: 'POST',
|
|
671
|
+
headers: headerParameters,
|
|
672
|
+
query: queryParameters,
|
|
673
|
+
body: (0, PostZapierShopifyCourseMapping_1.PostZapierShopifyCourseMappingToJSON)(requestParameters['postZapierShopifyCourseMapping']),
|
|
674
|
+
};
|
|
675
|
+
});
|
|
676
|
+
}
|
|
677
|
+
/**
|
|
678
|
+
* Create or update a Shopify variant-to-course mapping
|
|
679
|
+
*/
|
|
680
|
+
postZapierShopifyCourseMappingRaw(requestParameters, initOverrides) {
|
|
681
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
682
|
+
const requestOptions = yield this.postZapierShopifyCourseMappingRequestOpts(requestParameters);
|
|
683
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
684
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, ZapierShopifyCourseMapping_1.ZapierShopifyCourseMappingFromJSON)(jsonValue));
|
|
685
|
+
});
|
|
686
|
+
}
|
|
687
|
+
/**
|
|
688
|
+
* Create or update a Shopify variant-to-course mapping
|
|
689
|
+
*/
|
|
690
|
+
postZapierShopifyCourseMapping(requestParameters, initOverrides) {
|
|
691
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
692
|
+
const response = yield this.postZapierShopifyCourseMappingRaw(requestParameters, initOverrides);
|
|
693
|
+
return yield response.value();
|
|
694
|
+
});
|
|
695
|
+
}
|
|
696
|
+
/**
|
|
697
|
+
* Creates request options for postZapierShopifyEnrollment without sending the request
|
|
698
|
+
*/
|
|
699
|
+
postZapierShopifyEnrollmentRequestOpts(requestParameters) {
|
|
700
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
701
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
702
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling postZapierShopifyEnrollment().');
|
|
703
|
+
}
|
|
704
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
705
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierShopifyEnrollment().');
|
|
706
|
+
}
|
|
707
|
+
if (requestParameters['postZapierShopifyEnrollment'] == null) {
|
|
708
|
+
throw new runtime.RequiredError('postZapierShopifyEnrollment', 'Required parameter "postZapierShopifyEnrollment" was null or undefined when calling postZapierShopifyEnrollment().');
|
|
709
|
+
}
|
|
710
|
+
const queryParameters = {};
|
|
711
|
+
const headerParameters = {};
|
|
712
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
713
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
714
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
715
|
+
}
|
|
716
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
717
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
718
|
+
}
|
|
719
|
+
let urlPath = `/integrations/zapier/shopify/enrollments`;
|
|
720
|
+
return {
|
|
721
|
+
path: urlPath,
|
|
722
|
+
method: 'POST',
|
|
723
|
+
headers: headerParameters,
|
|
724
|
+
query: queryParameters,
|
|
725
|
+
body: (0, PostZapierShopifyEnrollment_1.PostZapierShopifyEnrollmentToJSON)(requestParameters['postZapierShopifyEnrollment']),
|
|
726
|
+
};
|
|
727
|
+
});
|
|
728
|
+
}
|
|
729
|
+
/**
|
|
730
|
+
* Find or invite a Shopify customer and enroll them using the purchased variant mapping
|
|
731
|
+
*/
|
|
732
|
+
postZapierShopifyEnrollmentRaw(requestParameters, initOverrides) {
|
|
733
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
734
|
+
const requestOptions = yield this.postZapierShopifyEnrollmentRequestOpts(requestParameters);
|
|
735
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
736
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, PostZapierShopifyEnrollmentResponse_1.PostZapierShopifyEnrollmentResponseFromJSON)(jsonValue));
|
|
737
|
+
});
|
|
738
|
+
}
|
|
739
|
+
/**
|
|
740
|
+
* Find or invite a Shopify customer and enroll them using the purchased variant mapping
|
|
741
|
+
*/
|
|
742
|
+
postZapierShopifyEnrollment(requestParameters, initOverrides) {
|
|
743
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
744
|
+
const response = yield this.postZapierShopifyEnrollmentRaw(requestParameters, initOverrides);
|
|
745
|
+
return yield response.value();
|
|
746
|
+
});
|
|
747
|
+
}
|
|
748
|
+
/**
|
|
749
|
+
* Creates request options for postZapierSubscription without sending the request
|
|
750
|
+
*/
|
|
751
|
+
postZapierSubscriptionRequestOpts(requestParameters) {
|
|
752
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
753
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
754
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling postZapierSubscription().');
|
|
755
|
+
}
|
|
756
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
757
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierSubscription().');
|
|
758
|
+
}
|
|
759
|
+
if (requestParameters['postZapierSubscription'] == null) {
|
|
760
|
+
throw new runtime.RequiredError('postZapierSubscription', 'Required parameter "postZapierSubscription" was null or undefined when calling postZapierSubscription().');
|
|
761
|
+
}
|
|
762
|
+
const queryParameters = {};
|
|
763
|
+
const headerParameters = {};
|
|
764
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
765
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
766
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
767
|
+
}
|
|
768
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
769
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
770
|
+
}
|
|
771
|
+
let urlPath = `/integrations/zapier/subscriptions`;
|
|
772
|
+
return {
|
|
773
|
+
path: urlPath,
|
|
774
|
+
method: 'POST',
|
|
775
|
+
headers: headerParameters,
|
|
776
|
+
query: queryParameters,
|
|
777
|
+
body: (0, PostZapierSubscription_1.PostZapierSubscriptionToJSON)(requestParameters['postZapierSubscription']),
|
|
778
|
+
};
|
|
779
|
+
});
|
|
780
|
+
}
|
|
781
|
+
/**
|
|
782
|
+
* Subscribe a Zap to an Edaxu lifecycle event
|
|
783
|
+
*/
|
|
784
|
+
postZapierSubscriptionRaw(requestParameters, initOverrides) {
|
|
785
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
786
|
+
const requestOptions = yield this.postZapierSubscriptionRequestOpts(requestParameters);
|
|
787
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
788
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, ZapierSubscription_1.ZapierSubscriptionFromJSON)(jsonValue));
|
|
789
|
+
});
|
|
790
|
+
}
|
|
791
|
+
/**
|
|
792
|
+
* Subscribe a Zap to an Edaxu lifecycle event
|
|
793
|
+
*/
|
|
794
|
+
postZapierSubscription(requestParameters, initOverrides) {
|
|
795
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
796
|
+
const response = yield this.postZapierSubscriptionRaw(requestParameters, initOverrides);
|
|
797
|
+
return yield response.value();
|
|
798
|
+
});
|
|
799
|
+
}
|
|
800
|
+
/**
|
|
801
|
+
* Creates request options for postZapierUser without sending the request
|
|
802
|
+
*/
|
|
803
|
+
postZapierUserRequestOpts(requestParameters) {
|
|
804
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
805
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
806
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling postZapierUser().');
|
|
807
|
+
}
|
|
808
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
809
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierUser().');
|
|
810
|
+
}
|
|
811
|
+
if (requestParameters['postZapierUser'] == null) {
|
|
812
|
+
throw new runtime.RequiredError('postZapierUser', 'Required parameter "postZapierUser" was null or undefined when calling postZapierUser().');
|
|
813
|
+
}
|
|
814
|
+
const queryParameters = {};
|
|
815
|
+
const headerParameters = {};
|
|
816
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
817
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
818
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
819
|
+
}
|
|
820
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
821
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
822
|
+
}
|
|
823
|
+
let urlPath = `/integrations/zapier/users`;
|
|
824
|
+
return {
|
|
825
|
+
path: urlPath,
|
|
826
|
+
method: 'POST',
|
|
827
|
+
headers: headerParameters,
|
|
828
|
+
query: queryParameters,
|
|
829
|
+
body: (0, PostZapierUser_1.PostZapierUserToJSON)(requestParameters['postZapierUser']),
|
|
830
|
+
};
|
|
831
|
+
});
|
|
832
|
+
}
|
|
833
|
+
/**
|
|
834
|
+
* Find or invite a learner to the connected portal
|
|
835
|
+
*/
|
|
836
|
+
postZapierUserRaw(requestParameters, initOverrides) {
|
|
837
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
838
|
+
const requestOptions = yield this.postZapierUserRequestOpts(requestParameters);
|
|
839
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
840
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, ZapierUser_1.ZapierUserFromJSON)(jsonValue));
|
|
841
|
+
});
|
|
842
|
+
}
|
|
843
|
+
/**
|
|
844
|
+
* Find or invite a learner to the connected portal
|
|
845
|
+
*/
|
|
846
|
+
postZapierUser(requestParameters, initOverrides) {
|
|
847
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
848
|
+
const response = yield this.postZapierUserRaw(requestParameters, initOverrides);
|
|
849
|
+
return yield response.value();
|
|
850
|
+
});
|
|
851
|
+
}
|
|
852
|
+
/**
|
|
853
|
+
* Creates request options for putCustomWebhookIntegration without sending the request
|
|
854
|
+
*/
|
|
855
|
+
putCustomWebhookIntegrationRequestOpts(requestParameters) {
|
|
856
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
857
|
+
if (requestParameters['webhookIntegrationId'] == null) {
|
|
858
|
+
throw new runtime.RequiredError('webhookIntegrationId', 'Required parameter "webhookIntegrationId" was null or undefined when calling putCustomWebhookIntegration().');
|
|
859
|
+
}
|
|
860
|
+
if (requestParameters['putCustomWebhookIntegration'] == null) {
|
|
861
|
+
throw new runtime.RequiredError('putCustomWebhookIntegration', 'Required parameter "putCustomWebhookIntegration" was null or undefined when calling putCustomWebhookIntegration().');
|
|
862
|
+
}
|
|
863
|
+
const queryParameters = {};
|
|
864
|
+
const headerParameters = {};
|
|
865
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
866
|
+
let urlPath = `/integrations/webhooks/{webhookIntegrationId}`;
|
|
867
|
+
urlPath = urlPath.replace('{webhookIntegrationId}', encodeURIComponent(String(requestParameters['webhookIntegrationId'])));
|
|
868
|
+
return {
|
|
869
|
+
path: urlPath,
|
|
870
|
+
method: 'PUT',
|
|
871
|
+
headers: headerParameters,
|
|
872
|
+
query: queryParameters,
|
|
873
|
+
body: (0, PutCustomWebhookIntegration_1.PutCustomWebhookIntegrationToJSON)(requestParameters['putCustomWebhookIntegration']),
|
|
874
|
+
};
|
|
875
|
+
});
|
|
876
|
+
}
|
|
877
|
+
/**
|
|
878
|
+
* Update a custom webhook destination
|
|
879
|
+
*/
|
|
880
|
+
putCustomWebhookIntegrationRaw(requestParameters, initOverrides) {
|
|
881
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
882
|
+
const requestOptions = yield this.putCustomWebhookIntegrationRequestOpts(requestParameters);
|
|
883
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
884
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => (0, CustomWebhookIntegration_1.CustomWebhookIntegrationFromJSON)(jsonValue));
|
|
885
|
+
});
|
|
886
|
+
}
|
|
887
|
+
/**
|
|
888
|
+
* Update a custom webhook destination
|
|
889
|
+
*/
|
|
890
|
+
putCustomWebhookIntegration(requestParameters, initOverrides) {
|
|
891
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
892
|
+
const response = yield this.putCustomWebhookIntegrationRaw(requestParameters, initOverrides);
|
|
893
|
+
return yield response.value();
|
|
894
|
+
});
|
|
895
|
+
}
|
|
197
896
|
/**
|
|
198
897
|
* Creates request options for putZapierSetup without sending the request
|
|
199
898
|
*/
|
|
@@ -240,3 +939,11 @@ class IntegrationApi extends runtime.BaseAPI {
|
|
|
240
939
|
}
|
|
241
940
|
}
|
|
242
941
|
exports.IntegrationApi = IntegrationApi;
|
|
942
|
+
/**
|
|
943
|
+
* @export
|
|
944
|
+
*/
|
|
945
|
+
exports.GetZapierEventsEventTypeEnum = {
|
|
946
|
+
ComEdaxuEnrollmentEnrolledV1: 'com.edaxu.enrollment.enrolled.v1',
|
|
947
|
+
ComEdaxuEnrollmentCompletedV1: 'com.edaxu.enrollment.completed.v1',
|
|
948
|
+
ComEdaxuCertificateIssuedV1: 'com.edaxu.certificate.issued.v1'
|
|
949
|
+
};
|