@easyedu/js-lsm-api 1.115.0 → 1.116.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.openapi-generator/FILES +24 -0
- package/README.md +21 -2
- package/dist/apis/IntegrationApi.d.ts +132 -0
- package/dist/apis/IntegrationApi.js +378 -0
- package/dist/esm/apis/IntegrationApi.d.ts +132 -0
- package/dist/esm/apis/IntegrationApi.js +378 -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/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/PostZapierUser.d.ts +44 -0
- package/dist/esm/models/PostZapierUser.js +51 -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/ZapierUser.d.ts +56 -0
- package/dist/esm/models/ZapierUser.js +59 -0
- package/dist/esm/models/index.d.ts +12 -0
- package/dist/esm/models/index.js +12 -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/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/PostZapierUser.d.ts +44 -0
- package/dist/models/PostZapierUser.js +58 -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/ZapierUser.d.ts +56 -0
- package/dist/models/ZapierUser.js +66 -0
- package/dist/models/index.d.ts +12 -0
- package/dist/models/index.js +12 -0
- package/docs/GetZapierCourses.md +40 -0
- package/docs/GetZapierShopifyCourseMappings.md +34 -0
- package/docs/GetZapierUsers.md +34 -0
- package/docs/IntegrationApi.md +536 -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/PostZapierUser.md +38 -0
- package/docs/ZapierCourse.md +40 -0
- package/docs/ZapierEnrollment.md +48 -0
- package/docs/ZapierShopifyCourseMapping.md +46 -0
- package/docs/ZapierUser.md +42 -0
- package/package.json +1 -1
- package/src/apis/IntegrationApi.ts +579 -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/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/PostZapierUser.ts +84 -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/ZapierUser.ts +102 -0
- package/src/models/index.ts +12 -0
|
@@ -21,12 +21,23 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
21
21
|
});
|
|
22
22
|
};
|
|
23
23
|
import * as runtime from '../runtime';
|
|
24
|
+
import { GetZapierCoursesFromJSON, } from '../models/GetZapierCourses';
|
|
24
25
|
import { GetZapierMeFromJSON, } from '../models/GetZapierMe';
|
|
25
26
|
import { GetZapierSetupFromJSON, } from '../models/GetZapierSetup';
|
|
27
|
+
import { GetZapierShopifyCourseMappingsFromJSON, } from '../models/GetZapierShopifyCourseMappings';
|
|
28
|
+
import { GetZapierUsersFromJSON, } from '../models/GetZapierUsers';
|
|
29
|
+
import { PostZapierEnrollmentToJSON, } from '../models/PostZapierEnrollment';
|
|
26
30
|
import { PostZapierSetupToJSON, } from '../models/PostZapierSetup';
|
|
27
31
|
import { PostZapierSetupResponseFromJSON, } from '../models/PostZapierSetupResponse';
|
|
32
|
+
import { PostZapierShopifyCourseMappingToJSON, } from '../models/PostZapierShopifyCourseMapping';
|
|
33
|
+
import { PostZapierShopifyEnrollmentToJSON, } from '../models/PostZapierShopifyEnrollment';
|
|
34
|
+
import { PostZapierShopifyEnrollmentResponseFromJSON, } from '../models/PostZapierShopifyEnrollmentResponse';
|
|
35
|
+
import { PostZapierUserToJSON, } from '../models/PostZapierUser';
|
|
28
36
|
import { PutZapierSetupToJSON, } from '../models/PutZapierSetup';
|
|
37
|
+
import { ZapierEnrollmentFromJSON, } from '../models/ZapierEnrollment';
|
|
29
38
|
import { ZapierIntegrationFromJSON, } from '../models/ZapierIntegration';
|
|
39
|
+
import { ZapierShopifyCourseMappingFromJSON, } from '../models/ZapierShopifyCourseMapping';
|
|
40
|
+
import { ZapierUserFromJSON, } from '../models/ZapierUser';
|
|
30
41
|
/**
|
|
31
42
|
*
|
|
32
43
|
*/
|
|
@@ -69,6 +80,62 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
69
80
|
yield this.deleteZapierSetupRaw(requestParameters, initOverrides);
|
|
70
81
|
});
|
|
71
82
|
}
|
|
83
|
+
/**
|
|
84
|
+
* Creates request options for getZapierCourses without sending the request
|
|
85
|
+
*/
|
|
86
|
+
getZapierCoursesRequestOpts(requestParameters) {
|
|
87
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
88
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
89
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling getZapierCourses().');
|
|
90
|
+
}
|
|
91
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
92
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierCourses().');
|
|
93
|
+
}
|
|
94
|
+
const queryParameters = {};
|
|
95
|
+
if (requestParameters['page'] != null) {
|
|
96
|
+
queryParameters['page'] = requestParameters['page'];
|
|
97
|
+
}
|
|
98
|
+
if (requestParameters['pageSize'] != null) {
|
|
99
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
100
|
+
}
|
|
101
|
+
if (requestParameters['search'] != null) {
|
|
102
|
+
queryParameters['search'] = requestParameters['search'];
|
|
103
|
+
}
|
|
104
|
+
const headerParameters = {};
|
|
105
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
106
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
107
|
+
}
|
|
108
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
109
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
110
|
+
}
|
|
111
|
+
let urlPath = `/integrations/zapier/courses`;
|
|
112
|
+
return {
|
|
113
|
+
path: urlPath,
|
|
114
|
+
method: 'GET',
|
|
115
|
+
headers: headerParameters,
|
|
116
|
+
query: queryParameters,
|
|
117
|
+
};
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* List published courses available to a Zapier connection
|
|
122
|
+
*/
|
|
123
|
+
getZapierCoursesRaw(requestParameters, initOverrides) {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
const requestOptions = yield this.getZapierCoursesRequestOpts(requestParameters);
|
|
126
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
127
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetZapierCoursesFromJSON(jsonValue));
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* List published courses available to a Zapier connection
|
|
132
|
+
*/
|
|
133
|
+
getZapierCourses(requestParameters, initOverrides) {
|
|
134
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
135
|
+
const response = yield this.getZapierCoursesRaw(requestParameters, initOverrides);
|
|
136
|
+
return yield response.value();
|
|
137
|
+
});
|
|
138
|
+
}
|
|
72
139
|
/**
|
|
73
140
|
* Creates request options for getZapierMe without sending the request
|
|
74
141
|
*/
|
|
@@ -151,6 +218,161 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
151
218
|
return yield response.value();
|
|
152
219
|
});
|
|
153
220
|
}
|
|
221
|
+
/**
|
|
222
|
+
* Creates request options for getZapierShopifyCourseMappings without sending the request
|
|
223
|
+
*/
|
|
224
|
+
getZapierShopifyCourseMappingsRequestOpts(requestParameters) {
|
|
225
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
226
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
227
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling getZapierShopifyCourseMappings().');
|
|
228
|
+
}
|
|
229
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
230
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierShopifyCourseMappings().');
|
|
231
|
+
}
|
|
232
|
+
const queryParameters = {};
|
|
233
|
+
if (requestParameters['shopDomain'] != null) {
|
|
234
|
+
queryParameters['shopDomain'] = requestParameters['shopDomain'];
|
|
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/shopify/course-mappings`;
|
|
244
|
+
return {
|
|
245
|
+
path: urlPath,
|
|
246
|
+
method: 'GET',
|
|
247
|
+
headers: headerParameters,
|
|
248
|
+
query: queryParameters,
|
|
249
|
+
};
|
|
250
|
+
});
|
|
251
|
+
}
|
|
252
|
+
/**
|
|
253
|
+
* List Shopify variant-to-course mappings
|
|
254
|
+
*/
|
|
255
|
+
getZapierShopifyCourseMappingsRaw(requestParameters, initOverrides) {
|
|
256
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
257
|
+
const requestOptions = yield this.getZapierShopifyCourseMappingsRequestOpts(requestParameters);
|
|
258
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
259
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetZapierShopifyCourseMappingsFromJSON(jsonValue));
|
|
260
|
+
});
|
|
261
|
+
}
|
|
262
|
+
/**
|
|
263
|
+
* List Shopify variant-to-course mappings
|
|
264
|
+
*/
|
|
265
|
+
getZapierShopifyCourseMappings(requestParameters, initOverrides) {
|
|
266
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
267
|
+
const response = yield this.getZapierShopifyCourseMappingsRaw(requestParameters, initOverrides);
|
|
268
|
+
return yield response.value();
|
|
269
|
+
});
|
|
270
|
+
}
|
|
271
|
+
/**
|
|
272
|
+
* Creates request options for getZapierUsers without sending the request
|
|
273
|
+
*/
|
|
274
|
+
getZapierUsersRequestOpts(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 getZapierUsers().');
|
|
278
|
+
}
|
|
279
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
280
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierUsers().');
|
|
281
|
+
}
|
|
282
|
+
if (requestParameters['email'] == null) {
|
|
283
|
+
throw new runtime.RequiredError('email', 'Required parameter "email" was null or undefined when calling getZapierUsers().');
|
|
284
|
+
}
|
|
285
|
+
const queryParameters = {};
|
|
286
|
+
if (requestParameters['email'] != null) {
|
|
287
|
+
queryParameters['email'] = requestParameters['email'];
|
|
288
|
+
}
|
|
289
|
+
const headerParameters = {};
|
|
290
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
291
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
292
|
+
}
|
|
293
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
294
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
295
|
+
}
|
|
296
|
+
let urlPath = `/integrations/zapier/users`;
|
|
297
|
+
return {
|
|
298
|
+
path: urlPath,
|
|
299
|
+
method: 'GET',
|
|
300
|
+
headers: headerParameters,
|
|
301
|
+
query: queryParameters,
|
|
302
|
+
};
|
|
303
|
+
});
|
|
304
|
+
}
|
|
305
|
+
/**
|
|
306
|
+
* Find a learner by exact email address
|
|
307
|
+
*/
|
|
308
|
+
getZapierUsersRaw(requestParameters, initOverrides) {
|
|
309
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
310
|
+
const requestOptions = yield this.getZapierUsersRequestOpts(requestParameters);
|
|
311
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
312
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetZapierUsersFromJSON(jsonValue));
|
|
313
|
+
});
|
|
314
|
+
}
|
|
315
|
+
/**
|
|
316
|
+
* Find a learner by exact email address
|
|
317
|
+
*/
|
|
318
|
+
getZapierUsers(requestParameters, initOverrides) {
|
|
319
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
320
|
+
const response = yield this.getZapierUsersRaw(requestParameters, initOverrides);
|
|
321
|
+
return yield response.value();
|
|
322
|
+
});
|
|
323
|
+
}
|
|
324
|
+
/**
|
|
325
|
+
* Creates request options for postZapierEnrollment without sending the request
|
|
326
|
+
*/
|
|
327
|
+
postZapierEnrollmentRequestOpts(requestParameters) {
|
|
328
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
329
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
330
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling postZapierEnrollment().');
|
|
331
|
+
}
|
|
332
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
333
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierEnrollment().');
|
|
334
|
+
}
|
|
335
|
+
if (requestParameters['postZapierEnrollment'] == null) {
|
|
336
|
+
throw new runtime.RequiredError('postZapierEnrollment', 'Required parameter "postZapierEnrollment" was null or undefined when calling postZapierEnrollment().');
|
|
337
|
+
}
|
|
338
|
+
const queryParameters = {};
|
|
339
|
+
const headerParameters = {};
|
|
340
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
341
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
342
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
343
|
+
}
|
|
344
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
345
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
346
|
+
}
|
|
347
|
+
let urlPath = `/integrations/zapier/enrollments`;
|
|
348
|
+
return {
|
|
349
|
+
path: urlPath,
|
|
350
|
+
method: 'POST',
|
|
351
|
+
headers: headerParameters,
|
|
352
|
+
query: queryParameters,
|
|
353
|
+
body: PostZapierEnrollmentToJSON(requestParameters['postZapierEnrollment']),
|
|
354
|
+
};
|
|
355
|
+
});
|
|
356
|
+
}
|
|
357
|
+
/**
|
|
358
|
+
* Enroll an existing learner in a course
|
|
359
|
+
*/
|
|
360
|
+
postZapierEnrollmentRaw(requestParameters, initOverrides) {
|
|
361
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
362
|
+
const requestOptions = yield this.postZapierEnrollmentRequestOpts(requestParameters);
|
|
363
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
364
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ZapierEnrollmentFromJSON(jsonValue));
|
|
365
|
+
});
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Enroll an existing learner in a course
|
|
369
|
+
*/
|
|
370
|
+
postZapierEnrollment(requestParameters, initOverrides) {
|
|
371
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
372
|
+
const response = yield this.postZapierEnrollmentRaw(requestParameters, initOverrides);
|
|
373
|
+
return yield response.value();
|
|
374
|
+
});
|
|
375
|
+
}
|
|
154
376
|
/**
|
|
155
377
|
* Creates request options for postZapierSetup without sending the request
|
|
156
378
|
*/
|
|
@@ -191,6 +413,162 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
191
413
|
return yield response.value();
|
|
192
414
|
});
|
|
193
415
|
}
|
|
416
|
+
/**
|
|
417
|
+
* Creates request options for postZapierShopifyCourseMapping without sending the request
|
|
418
|
+
*/
|
|
419
|
+
postZapierShopifyCourseMappingRequestOpts(requestParameters) {
|
|
420
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
421
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
422
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling postZapierShopifyCourseMapping().');
|
|
423
|
+
}
|
|
424
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
425
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierShopifyCourseMapping().');
|
|
426
|
+
}
|
|
427
|
+
if (requestParameters['postZapierShopifyCourseMapping'] == null) {
|
|
428
|
+
throw new runtime.RequiredError('postZapierShopifyCourseMapping', 'Required parameter "postZapierShopifyCourseMapping" was null or undefined when calling postZapierShopifyCourseMapping().');
|
|
429
|
+
}
|
|
430
|
+
const queryParameters = {};
|
|
431
|
+
const headerParameters = {};
|
|
432
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
433
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
434
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
435
|
+
}
|
|
436
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
437
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
438
|
+
}
|
|
439
|
+
let urlPath = `/integrations/zapier/shopify/course-mappings`;
|
|
440
|
+
return {
|
|
441
|
+
path: urlPath,
|
|
442
|
+
method: 'POST',
|
|
443
|
+
headers: headerParameters,
|
|
444
|
+
query: queryParameters,
|
|
445
|
+
body: PostZapierShopifyCourseMappingToJSON(requestParameters['postZapierShopifyCourseMapping']),
|
|
446
|
+
};
|
|
447
|
+
});
|
|
448
|
+
}
|
|
449
|
+
/**
|
|
450
|
+
* Create or update a Shopify variant-to-course mapping
|
|
451
|
+
*/
|
|
452
|
+
postZapierShopifyCourseMappingRaw(requestParameters, initOverrides) {
|
|
453
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
454
|
+
const requestOptions = yield this.postZapierShopifyCourseMappingRequestOpts(requestParameters);
|
|
455
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
456
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ZapierShopifyCourseMappingFromJSON(jsonValue));
|
|
457
|
+
});
|
|
458
|
+
}
|
|
459
|
+
/**
|
|
460
|
+
* Create or update a Shopify variant-to-course mapping
|
|
461
|
+
*/
|
|
462
|
+
postZapierShopifyCourseMapping(requestParameters, initOverrides) {
|
|
463
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
464
|
+
const response = yield this.postZapierShopifyCourseMappingRaw(requestParameters, initOverrides);
|
|
465
|
+
return yield response.value();
|
|
466
|
+
});
|
|
467
|
+
}
|
|
468
|
+
/**
|
|
469
|
+
* Creates request options for postZapierShopifyEnrollment without sending the request
|
|
470
|
+
*/
|
|
471
|
+
postZapierShopifyEnrollmentRequestOpts(requestParameters) {
|
|
472
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
473
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
474
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling postZapierShopifyEnrollment().');
|
|
475
|
+
}
|
|
476
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
477
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierShopifyEnrollment().');
|
|
478
|
+
}
|
|
479
|
+
if (requestParameters['postZapierShopifyEnrollment'] == null) {
|
|
480
|
+
throw new runtime.RequiredError('postZapierShopifyEnrollment', 'Required parameter "postZapierShopifyEnrollment" was null or undefined when calling postZapierShopifyEnrollment().');
|
|
481
|
+
}
|
|
482
|
+
const queryParameters = {};
|
|
483
|
+
const headerParameters = {};
|
|
484
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
485
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
486
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
487
|
+
}
|
|
488
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
489
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
490
|
+
}
|
|
491
|
+
let urlPath = `/integrations/zapier/shopify/enrollments`;
|
|
492
|
+
return {
|
|
493
|
+
path: urlPath,
|
|
494
|
+
method: 'POST',
|
|
495
|
+
headers: headerParameters,
|
|
496
|
+
query: queryParameters,
|
|
497
|
+
body: PostZapierShopifyEnrollmentToJSON(requestParameters['postZapierShopifyEnrollment']),
|
|
498
|
+
};
|
|
499
|
+
});
|
|
500
|
+
}
|
|
501
|
+
/**
|
|
502
|
+
* Find or invite a Shopify customer and enroll them using the purchased variant mapping
|
|
503
|
+
*/
|
|
504
|
+
postZapierShopifyEnrollmentRaw(requestParameters, initOverrides) {
|
|
505
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
506
|
+
const requestOptions = yield this.postZapierShopifyEnrollmentRequestOpts(requestParameters);
|
|
507
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
508
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostZapierShopifyEnrollmentResponseFromJSON(jsonValue));
|
|
509
|
+
});
|
|
510
|
+
}
|
|
511
|
+
/**
|
|
512
|
+
* Find or invite a Shopify customer and enroll them using the purchased variant mapping
|
|
513
|
+
*/
|
|
514
|
+
postZapierShopifyEnrollment(requestParameters, initOverrides) {
|
|
515
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
516
|
+
const response = yield this.postZapierShopifyEnrollmentRaw(requestParameters, initOverrides);
|
|
517
|
+
return yield response.value();
|
|
518
|
+
});
|
|
519
|
+
}
|
|
520
|
+
/**
|
|
521
|
+
* Creates request options for postZapierUser without sending the request
|
|
522
|
+
*/
|
|
523
|
+
postZapierUserRequestOpts(requestParameters) {
|
|
524
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
525
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
526
|
+
throw new runtime.RequiredError('xAPIKEY', 'Required parameter "xAPIKEY" was null or undefined when calling postZapierUser().');
|
|
527
|
+
}
|
|
528
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
529
|
+
throw new runtime.RequiredError('xPORTALSUBDOMAIN', 'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierUser().');
|
|
530
|
+
}
|
|
531
|
+
if (requestParameters['postZapierUser'] == null) {
|
|
532
|
+
throw new runtime.RequiredError('postZapierUser', 'Required parameter "postZapierUser" was null or undefined when calling postZapierUser().');
|
|
533
|
+
}
|
|
534
|
+
const queryParameters = {};
|
|
535
|
+
const headerParameters = {};
|
|
536
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
537
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
538
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
539
|
+
}
|
|
540
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
541
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
542
|
+
}
|
|
543
|
+
let urlPath = `/integrations/zapier/users`;
|
|
544
|
+
return {
|
|
545
|
+
path: urlPath,
|
|
546
|
+
method: 'POST',
|
|
547
|
+
headers: headerParameters,
|
|
548
|
+
query: queryParameters,
|
|
549
|
+
body: PostZapierUserToJSON(requestParameters['postZapierUser']),
|
|
550
|
+
};
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
/**
|
|
554
|
+
* Find or invite a learner to the connected portal
|
|
555
|
+
*/
|
|
556
|
+
postZapierUserRaw(requestParameters, initOverrides) {
|
|
557
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
558
|
+
const requestOptions = yield this.postZapierUserRequestOpts(requestParameters);
|
|
559
|
+
const response = yield this.request(requestOptions, initOverrides);
|
|
560
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ZapierUserFromJSON(jsonValue));
|
|
561
|
+
});
|
|
562
|
+
}
|
|
563
|
+
/**
|
|
564
|
+
* Find or invite a learner to the connected portal
|
|
565
|
+
*/
|
|
566
|
+
postZapierUser(requestParameters, initOverrides) {
|
|
567
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
568
|
+
const response = yield this.postZapierUserRaw(requestParameters, initOverrides);
|
|
569
|
+
return yield response.value();
|
|
570
|
+
});
|
|
571
|
+
}
|
|
194
572
|
/**
|
|
195
573
|
* Creates request options for putZapierSetup without sending the request
|
|
196
574
|
*/
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ZapierCourse } from './ZapierCourse';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface GetZapierCourses
|
|
17
|
+
*/
|
|
18
|
+
export interface GetZapierCourses {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {number}
|
|
22
|
+
* @memberof GetZapierCourses
|
|
23
|
+
*/
|
|
24
|
+
page: number;
|
|
25
|
+
/**
|
|
26
|
+
*
|
|
27
|
+
* @type {number}
|
|
28
|
+
* @memberof GetZapierCourses
|
|
29
|
+
*/
|
|
30
|
+
pageSize: number;
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
* @type {number}
|
|
34
|
+
* @memberof GetZapierCourses
|
|
35
|
+
*/
|
|
36
|
+
totalItems: number;
|
|
37
|
+
/**
|
|
38
|
+
*
|
|
39
|
+
* @type {Array<ZapierCourse>}
|
|
40
|
+
* @memberof GetZapierCourses
|
|
41
|
+
*/
|
|
42
|
+
items: Array<ZapierCourse>;
|
|
43
|
+
}
|
|
44
|
+
/**
|
|
45
|
+
* Check if a given object implements the GetZapierCourses interface.
|
|
46
|
+
*/
|
|
47
|
+
export declare function instanceOfGetZapierCourses(value: object): value is GetZapierCourses;
|
|
48
|
+
export declare function GetZapierCoursesFromJSON(json: any): GetZapierCourses;
|
|
49
|
+
export declare function GetZapierCoursesFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetZapierCourses;
|
|
50
|
+
export declare function GetZapierCoursesToJSON(json: any): GetZapierCourses;
|
|
51
|
+
export declare function GetZapierCoursesToJSONTyped(value?: GetZapierCourses | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { ZapierCourseFromJSON, ZapierCourseToJSON, } from './ZapierCourse';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the GetZapierCourses interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfGetZapierCourses(value) {
|
|
19
|
+
if (!('page' in value) || value['page'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
if (!('pageSize' in value) || value['pageSize'] === undefined)
|
|
22
|
+
return false;
|
|
23
|
+
if (!('totalItems' in value) || value['totalItems'] === undefined)
|
|
24
|
+
return false;
|
|
25
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
return true;
|
|
28
|
+
}
|
|
29
|
+
export function GetZapierCoursesFromJSON(json) {
|
|
30
|
+
return GetZapierCoursesFromJSONTyped(json, false);
|
|
31
|
+
}
|
|
32
|
+
export function GetZapierCoursesFromJSONTyped(json, ignoreDiscriminator) {
|
|
33
|
+
if (json == null) {
|
|
34
|
+
return json;
|
|
35
|
+
}
|
|
36
|
+
return {
|
|
37
|
+
'page': json['page'],
|
|
38
|
+
'pageSize': json['page_size'],
|
|
39
|
+
'totalItems': json['total_items'],
|
|
40
|
+
'items': (json['items'].map(ZapierCourseFromJSON)),
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
export function GetZapierCoursesToJSON(json) {
|
|
44
|
+
return GetZapierCoursesToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
export function GetZapierCoursesToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'page': value['page'],
|
|
52
|
+
'page_size': value['pageSize'],
|
|
53
|
+
'total_items': value['totalItems'],
|
|
54
|
+
'items': (value['items'].map(ZapierCourseToJSON)),
|
|
55
|
+
};
|
|
56
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ZapierShopifyCourseMapping } from './ZapierShopifyCourseMapping';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface GetZapierShopifyCourseMappings
|
|
17
|
+
*/
|
|
18
|
+
export interface GetZapierShopifyCourseMappings {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<ZapierShopifyCourseMapping>}
|
|
22
|
+
* @memberof GetZapierShopifyCourseMappings
|
|
23
|
+
*/
|
|
24
|
+
items: Array<ZapierShopifyCourseMapping>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the GetZapierShopifyCourseMappings interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfGetZapierShopifyCourseMappings(value: object): value is GetZapierShopifyCourseMappings;
|
|
30
|
+
export declare function GetZapierShopifyCourseMappingsFromJSON(json: any): GetZapierShopifyCourseMappings;
|
|
31
|
+
export declare function GetZapierShopifyCourseMappingsFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetZapierShopifyCourseMappings;
|
|
32
|
+
export declare function GetZapierShopifyCourseMappingsToJSON(json: any): GetZapierShopifyCourseMappings;
|
|
33
|
+
export declare function GetZapierShopifyCourseMappingsToJSONTyped(value?: GetZapierShopifyCourseMappings | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { ZapierShopifyCourseMappingFromJSON, ZapierShopifyCourseMappingToJSON, } from './ZapierShopifyCourseMapping';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the GetZapierShopifyCourseMappings interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfGetZapierShopifyCourseMappings(value) {
|
|
19
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
export function GetZapierShopifyCourseMappingsFromJSON(json) {
|
|
24
|
+
return GetZapierShopifyCourseMappingsFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function GetZapierShopifyCourseMappingsFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'items': (json['items'].map(ZapierShopifyCourseMappingFromJSON)),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function GetZapierShopifyCourseMappingsToJSON(json) {
|
|
35
|
+
return GetZapierShopifyCourseMappingsToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function GetZapierShopifyCourseMappingsToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'items': (value['items'].map(ZapierShopifyCourseMappingToJSON)),
|
|
43
|
+
};
|
|
44
|
+
}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* LMS API
|
|
3
|
+
* LMS API
|
|
4
|
+
*
|
|
5
|
+
* The version of the OpenAPI document: 1.0.0
|
|
6
|
+
*
|
|
7
|
+
*
|
|
8
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
9
|
+
* https://openapi-generator.tech
|
|
10
|
+
* Do not edit the class manually.
|
|
11
|
+
*/
|
|
12
|
+
import type { ZapierUser } from './ZapierUser';
|
|
13
|
+
/**
|
|
14
|
+
*
|
|
15
|
+
* @export
|
|
16
|
+
* @interface GetZapierUsers
|
|
17
|
+
*/
|
|
18
|
+
export interface GetZapierUsers {
|
|
19
|
+
/**
|
|
20
|
+
*
|
|
21
|
+
* @type {Array<ZapierUser>}
|
|
22
|
+
* @memberof GetZapierUsers
|
|
23
|
+
*/
|
|
24
|
+
items: Array<ZapierUser>;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Check if a given object implements the GetZapierUsers interface.
|
|
28
|
+
*/
|
|
29
|
+
export declare function instanceOfGetZapierUsers(value: object): value is GetZapierUsers;
|
|
30
|
+
export declare function GetZapierUsersFromJSON(json: any): GetZapierUsers;
|
|
31
|
+
export declare function GetZapierUsersFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetZapierUsers;
|
|
32
|
+
export declare function GetZapierUsersToJSON(json: any): GetZapierUsers;
|
|
33
|
+
export declare function GetZapierUsersToJSONTyped(value?: GetZapierUsers | null, ignoreDiscriminator?: boolean): any;
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/* tslint:disable */
|
|
2
|
+
/* eslint-disable */
|
|
3
|
+
/**
|
|
4
|
+
* LMS API
|
|
5
|
+
* LMS API
|
|
6
|
+
*
|
|
7
|
+
* The version of the OpenAPI document: 1.0.0
|
|
8
|
+
*
|
|
9
|
+
*
|
|
10
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
11
|
+
* https://openapi-generator.tech
|
|
12
|
+
* Do not edit the class manually.
|
|
13
|
+
*/
|
|
14
|
+
import { ZapierUserFromJSON, ZapierUserToJSON, } from './ZapierUser';
|
|
15
|
+
/**
|
|
16
|
+
* Check if a given object implements the GetZapierUsers interface.
|
|
17
|
+
*/
|
|
18
|
+
export function instanceOfGetZapierUsers(value) {
|
|
19
|
+
if (!('items' in value) || value['items'] === undefined)
|
|
20
|
+
return false;
|
|
21
|
+
return true;
|
|
22
|
+
}
|
|
23
|
+
export function GetZapierUsersFromJSON(json) {
|
|
24
|
+
return GetZapierUsersFromJSONTyped(json, false);
|
|
25
|
+
}
|
|
26
|
+
export function GetZapierUsersFromJSONTyped(json, ignoreDiscriminator) {
|
|
27
|
+
if (json == null) {
|
|
28
|
+
return json;
|
|
29
|
+
}
|
|
30
|
+
return {
|
|
31
|
+
'items': (json['items'].map(ZapierUserFromJSON)),
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
export function GetZapierUsersToJSON(json) {
|
|
35
|
+
return GetZapierUsersToJSONTyped(json, false);
|
|
36
|
+
}
|
|
37
|
+
export function GetZapierUsersToJSONTyped(value, ignoreDiscriminator = false) {
|
|
38
|
+
if (value == null) {
|
|
39
|
+
return value;
|
|
40
|
+
}
|
|
41
|
+
return {
|
|
42
|
+
'items': (value['items'].map(ZapierUserToJSON)),
|
|
43
|
+
};
|
|
44
|
+
}
|