@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
|
@@ -13,6 +13,11 @@
|
|
|
13
13
|
*/
|
|
14
14
|
|
|
15
15
|
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type GetZapierCourses,
|
|
18
|
+
GetZapierCoursesFromJSON,
|
|
19
|
+
GetZapierCoursesToJSON,
|
|
20
|
+
} from '../models/GetZapierCourses';
|
|
16
21
|
import {
|
|
17
22
|
type GetZapierMe,
|
|
18
23
|
GetZapierMeFromJSON,
|
|
@@ -23,6 +28,21 @@ import {
|
|
|
23
28
|
GetZapierSetupFromJSON,
|
|
24
29
|
GetZapierSetupToJSON,
|
|
25
30
|
} from '../models/GetZapierSetup';
|
|
31
|
+
import {
|
|
32
|
+
type GetZapierShopifyCourseMappings,
|
|
33
|
+
GetZapierShopifyCourseMappingsFromJSON,
|
|
34
|
+
GetZapierShopifyCourseMappingsToJSON,
|
|
35
|
+
} from '../models/GetZapierShopifyCourseMappings';
|
|
36
|
+
import {
|
|
37
|
+
type GetZapierUsers,
|
|
38
|
+
GetZapierUsersFromJSON,
|
|
39
|
+
GetZapierUsersToJSON,
|
|
40
|
+
} from '../models/GetZapierUsers';
|
|
41
|
+
import {
|
|
42
|
+
type PostZapierEnrollment,
|
|
43
|
+
PostZapierEnrollmentFromJSON,
|
|
44
|
+
PostZapierEnrollmentToJSON,
|
|
45
|
+
} from '../models/PostZapierEnrollment';
|
|
26
46
|
import {
|
|
27
47
|
type PostZapierSetup,
|
|
28
48
|
PostZapierSetupFromJSON,
|
|
@@ -33,30 +53,109 @@ import {
|
|
|
33
53
|
PostZapierSetupResponseFromJSON,
|
|
34
54
|
PostZapierSetupResponseToJSON,
|
|
35
55
|
} from '../models/PostZapierSetupResponse';
|
|
56
|
+
import {
|
|
57
|
+
type PostZapierShopifyCourseMapping,
|
|
58
|
+
PostZapierShopifyCourseMappingFromJSON,
|
|
59
|
+
PostZapierShopifyCourseMappingToJSON,
|
|
60
|
+
} from '../models/PostZapierShopifyCourseMapping';
|
|
61
|
+
import {
|
|
62
|
+
type PostZapierShopifyEnrollment,
|
|
63
|
+
PostZapierShopifyEnrollmentFromJSON,
|
|
64
|
+
PostZapierShopifyEnrollmentToJSON,
|
|
65
|
+
} from '../models/PostZapierShopifyEnrollment';
|
|
66
|
+
import {
|
|
67
|
+
type PostZapierShopifyEnrollmentResponse,
|
|
68
|
+
PostZapierShopifyEnrollmentResponseFromJSON,
|
|
69
|
+
PostZapierShopifyEnrollmentResponseToJSON,
|
|
70
|
+
} from '../models/PostZapierShopifyEnrollmentResponse';
|
|
71
|
+
import {
|
|
72
|
+
type PostZapierUser,
|
|
73
|
+
PostZapierUserFromJSON,
|
|
74
|
+
PostZapierUserToJSON,
|
|
75
|
+
} from '../models/PostZapierUser';
|
|
36
76
|
import {
|
|
37
77
|
type PutZapierSetup,
|
|
38
78
|
PutZapierSetupFromJSON,
|
|
39
79
|
PutZapierSetupToJSON,
|
|
40
80
|
} from '../models/PutZapierSetup';
|
|
81
|
+
import {
|
|
82
|
+
type ZapierEnrollment,
|
|
83
|
+
ZapierEnrollmentFromJSON,
|
|
84
|
+
ZapierEnrollmentToJSON,
|
|
85
|
+
} from '../models/ZapierEnrollment';
|
|
41
86
|
import {
|
|
42
87
|
type ZapierIntegration,
|
|
43
88
|
ZapierIntegrationFromJSON,
|
|
44
89
|
ZapierIntegrationToJSON,
|
|
45
90
|
} from '../models/ZapierIntegration';
|
|
91
|
+
import {
|
|
92
|
+
type ZapierShopifyCourseMapping,
|
|
93
|
+
ZapierShopifyCourseMappingFromJSON,
|
|
94
|
+
ZapierShopifyCourseMappingToJSON,
|
|
95
|
+
} from '../models/ZapierShopifyCourseMapping';
|
|
96
|
+
import {
|
|
97
|
+
type ZapierUser,
|
|
98
|
+
ZapierUserFromJSON,
|
|
99
|
+
ZapierUserToJSON,
|
|
100
|
+
} from '../models/ZapierUser';
|
|
46
101
|
|
|
47
102
|
export interface DeleteZapierSetupRequest {
|
|
48
103
|
zapierIntegrationId: string;
|
|
49
104
|
}
|
|
50
105
|
|
|
106
|
+
export interface GetZapierCoursesRequest {
|
|
107
|
+
xAPIKEY: string;
|
|
108
|
+
xPORTALSUBDOMAIN: string;
|
|
109
|
+
page?: number;
|
|
110
|
+
pageSize?: number;
|
|
111
|
+
search?: string;
|
|
112
|
+
}
|
|
113
|
+
|
|
51
114
|
export interface GetZapierMeRequest {
|
|
52
115
|
xAPIKEY: string;
|
|
53
116
|
xPORTALSUBDOMAIN: string;
|
|
54
117
|
}
|
|
55
118
|
|
|
119
|
+
export interface GetZapierShopifyCourseMappingsRequest {
|
|
120
|
+
xAPIKEY: string;
|
|
121
|
+
xPORTALSUBDOMAIN: string;
|
|
122
|
+
shopDomain?: string;
|
|
123
|
+
}
|
|
124
|
+
|
|
125
|
+
export interface GetZapierUsersRequest {
|
|
126
|
+
xAPIKEY: string;
|
|
127
|
+
xPORTALSUBDOMAIN: string;
|
|
128
|
+
email: string;
|
|
129
|
+
}
|
|
130
|
+
|
|
131
|
+
export interface PostZapierEnrollmentRequest {
|
|
132
|
+
xAPIKEY: string;
|
|
133
|
+
xPORTALSUBDOMAIN: string;
|
|
134
|
+
postZapierEnrollment: PostZapierEnrollment;
|
|
135
|
+
}
|
|
136
|
+
|
|
56
137
|
export interface PostZapierSetupRequest {
|
|
57
138
|
postZapierSetup: PostZapierSetup;
|
|
58
139
|
}
|
|
59
140
|
|
|
141
|
+
export interface PostZapierShopifyCourseMappingRequest {
|
|
142
|
+
xAPIKEY: string;
|
|
143
|
+
xPORTALSUBDOMAIN: string;
|
|
144
|
+
postZapierShopifyCourseMapping: PostZapierShopifyCourseMapping;
|
|
145
|
+
}
|
|
146
|
+
|
|
147
|
+
export interface PostZapierShopifyEnrollmentRequest {
|
|
148
|
+
xAPIKEY: string;
|
|
149
|
+
xPORTALSUBDOMAIN: string;
|
|
150
|
+
postZapierShopifyEnrollment: PostZapierShopifyEnrollment;
|
|
151
|
+
}
|
|
152
|
+
|
|
153
|
+
export interface PostZapierUserRequest {
|
|
154
|
+
xAPIKEY: string;
|
|
155
|
+
xPORTALSUBDOMAIN: string;
|
|
156
|
+
postZapierUser: PostZapierUser;
|
|
157
|
+
}
|
|
158
|
+
|
|
60
159
|
export interface PutZapierSetupRequest {
|
|
61
160
|
zapierIntegrationId: string;
|
|
62
161
|
putZapierSetup: PutZapierSetup;
|
|
@@ -111,6 +210,77 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
111
210
|
await this.deleteZapierSetupRaw(requestParameters, initOverrides);
|
|
112
211
|
}
|
|
113
212
|
|
|
213
|
+
/**
|
|
214
|
+
* Creates request options for getZapierCourses without sending the request
|
|
215
|
+
*/
|
|
216
|
+
async getZapierCoursesRequestOpts(requestParameters: GetZapierCoursesRequest): Promise<runtime.RequestOpts> {
|
|
217
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
218
|
+
throw new runtime.RequiredError(
|
|
219
|
+
'xAPIKEY',
|
|
220
|
+
'Required parameter "xAPIKEY" was null or undefined when calling getZapierCourses().'
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
225
|
+
throw new runtime.RequiredError(
|
|
226
|
+
'xPORTALSUBDOMAIN',
|
|
227
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierCourses().'
|
|
228
|
+
);
|
|
229
|
+
}
|
|
230
|
+
|
|
231
|
+
const queryParameters: any = {};
|
|
232
|
+
|
|
233
|
+
if (requestParameters['page'] != null) {
|
|
234
|
+
queryParameters['page'] = requestParameters['page'];
|
|
235
|
+
}
|
|
236
|
+
|
|
237
|
+
if (requestParameters['pageSize'] != null) {
|
|
238
|
+
queryParameters['pageSize'] = requestParameters['pageSize'];
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
if (requestParameters['search'] != null) {
|
|
242
|
+
queryParameters['search'] = requestParameters['search'];
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
246
|
+
|
|
247
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
248
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
249
|
+
}
|
|
250
|
+
|
|
251
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
252
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
|
|
256
|
+
let urlPath = `/integrations/zapier/courses`;
|
|
257
|
+
|
|
258
|
+
return {
|
|
259
|
+
path: urlPath,
|
|
260
|
+
method: 'GET',
|
|
261
|
+
headers: headerParameters,
|
|
262
|
+
query: queryParameters,
|
|
263
|
+
};
|
|
264
|
+
}
|
|
265
|
+
|
|
266
|
+
/**
|
|
267
|
+
* List published courses available to a Zapier connection
|
|
268
|
+
*/
|
|
269
|
+
async getZapierCoursesRaw(requestParameters: GetZapierCoursesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetZapierCourses>> {
|
|
270
|
+
const requestOptions = await this.getZapierCoursesRequestOpts(requestParameters);
|
|
271
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
272
|
+
|
|
273
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetZapierCoursesFromJSON(jsonValue));
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
/**
|
|
277
|
+
* List published courses available to a Zapier connection
|
|
278
|
+
*/
|
|
279
|
+
async getZapierCourses(requestParameters: GetZapierCoursesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetZapierCourses> {
|
|
280
|
+
const response = await this.getZapierCoursesRaw(requestParameters, initOverrides);
|
|
281
|
+
return await response.value();
|
|
282
|
+
}
|
|
283
|
+
|
|
114
284
|
/**
|
|
115
285
|
* Creates request options for getZapierMe without sending the request
|
|
116
286
|
*/
|
|
@@ -207,6 +377,208 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
207
377
|
return await response.value();
|
|
208
378
|
}
|
|
209
379
|
|
|
380
|
+
/**
|
|
381
|
+
* Creates request options for getZapierShopifyCourseMappings without sending the request
|
|
382
|
+
*/
|
|
383
|
+
async getZapierShopifyCourseMappingsRequestOpts(requestParameters: GetZapierShopifyCourseMappingsRequest): Promise<runtime.RequestOpts> {
|
|
384
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
385
|
+
throw new runtime.RequiredError(
|
|
386
|
+
'xAPIKEY',
|
|
387
|
+
'Required parameter "xAPIKEY" was null or undefined when calling getZapierShopifyCourseMappings().'
|
|
388
|
+
);
|
|
389
|
+
}
|
|
390
|
+
|
|
391
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
392
|
+
throw new runtime.RequiredError(
|
|
393
|
+
'xPORTALSUBDOMAIN',
|
|
394
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierShopifyCourseMappings().'
|
|
395
|
+
);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
const queryParameters: any = {};
|
|
399
|
+
|
|
400
|
+
if (requestParameters['shopDomain'] != null) {
|
|
401
|
+
queryParameters['shopDomain'] = requestParameters['shopDomain'];
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
405
|
+
|
|
406
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
407
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
408
|
+
}
|
|
409
|
+
|
|
410
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
411
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
let urlPath = `/integrations/zapier/shopify/course-mappings`;
|
|
416
|
+
|
|
417
|
+
return {
|
|
418
|
+
path: urlPath,
|
|
419
|
+
method: 'GET',
|
|
420
|
+
headers: headerParameters,
|
|
421
|
+
query: queryParameters,
|
|
422
|
+
};
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
/**
|
|
426
|
+
* List Shopify variant-to-course mappings
|
|
427
|
+
*/
|
|
428
|
+
async getZapierShopifyCourseMappingsRaw(requestParameters: GetZapierShopifyCourseMappingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetZapierShopifyCourseMappings>> {
|
|
429
|
+
const requestOptions = await this.getZapierShopifyCourseMappingsRequestOpts(requestParameters);
|
|
430
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
431
|
+
|
|
432
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetZapierShopifyCourseMappingsFromJSON(jsonValue));
|
|
433
|
+
}
|
|
434
|
+
|
|
435
|
+
/**
|
|
436
|
+
* List Shopify variant-to-course mappings
|
|
437
|
+
*/
|
|
438
|
+
async getZapierShopifyCourseMappings(requestParameters: GetZapierShopifyCourseMappingsRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetZapierShopifyCourseMappings> {
|
|
439
|
+
const response = await this.getZapierShopifyCourseMappingsRaw(requestParameters, initOverrides);
|
|
440
|
+
return await response.value();
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
/**
|
|
444
|
+
* Creates request options for getZapierUsers without sending the request
|
|
445
|
+
*/
|
|
446
|
+
async getZapierUsersRequestOpts(requestParameters: GetZapierUsersRequest): Promise<runtime.RequestOpts> {
|
|
447
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
448
|
+
throw new runtime.RequiredError(
|
|
449
|
+
'xAPIKEY',
|
|
450
|
+
'Required parameter "xAPIKEY" was null or undefined when calling getZapierUsers().'
|
|
451
|
+
);
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
455
|
+
throw new runtime.RequiredError(
|
|
456
|
+
'xPORTALSUBDOMAIN',
|
|
457
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling getZapierUsers().'
|
|
458
|
+
);
|
|
459
|
+
}
|
|
460
|
+
|
|
461
|
+
if (requestParameters['email'] == null) {
|
|
462
|
+
throw new runtime.RequiredError(
|
|
463
|
+
'email',
|
|
464
|
+
'Required parameter "email" was null or undefined when calling getZapierUsers().'
|
|
465
|
+
);
|
|
466
|
+
}
|
|
467
|
+
|
|
468
|
+
const queryParameters: any = {};
|
|
469
|
+
|
|
470
|
+
if (requestParameters['email'] != null) {
|
|
471
|
+
queryParameters['email'] = requestParameters['email'];
|
|
472
|
+
}
|
|
473
|
+
|
|
474
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
475
|
+
|
|
476
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
477
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
478
|
+
}
|
|
479
|
+
|
|
480
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
481
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
let urlPath = `/integrations/zapier/users`;
|
|
486
|
+
|
|
487
|
+
return {
|
|
488
|
+
path: urlPath,
|
|
489
|
+
method: 'GET',
|
|
490
|
+
headers: headerParameters,
|
|
491
|
+
query: queryParameters,
|
|
492
|
+
};
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
/**
|
|
496
|
+
* Find a learner by exact email address
|
|
497
|
+
*/
|
|
498
|
+
async getZapierUsersRaw(requestParameters: GetZapierUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetZapierUsers>> {
|
|
499
|
+
const requestOptions = await this.getZapierUsersRequestOpts(requestParameters);
|
|
500
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
501
|
+
|
|
502
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetZapierUsersFromJSON(jsonValue));
|
|
503
|
+
}
|
|
504
|
+
|
|
505
|
+
/**
|
|
506
|
+
* Find a learner by exact email address
|
|
507
|
+
*/
|
|
508
|
+
async getZapierUsers(requestParameters: GetZapierUsersRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetZapierUsers> {
|
|
509
|
+
const response = await this.getZapierUsersRaw(requestParameters, initOverrides);
|
|
510
|
+
return await response.value();
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* Creates request options for postZapierEnrollment without sending the request
|
|
515
|
+
*/
|
|
516
|
+
async postZapierEnrollmentRequestOpts(requestParameters: PostZapierEnrollmentRequest): Promise<runtime.RequestOpts> {
|
|
517
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
518
|
+
throw new runtime.RequiredError(
|
|
519
|
+
'xAPIKEY',
|
|
520
|
+
'Required parameter "xAPIKEY" was null or undefined when calling postZapierEnrollment().'
|
|
521
|
+
);
|
|
522
|
+
}
|
|
523
|
+
|
|
524
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
525
|
+
throw new runtime.RequiredError(
|
|
526
|
+
'xPORTALSUBDOMAIN',
|
|
527
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierEnrollment().'
|
|
528
|
+
);
|
|
529
|
+
}
|
|
530
|
+
|
|
531
|
+
if (requestParameters['postZapierEnrollment'] == null) {
|
|
532
|
+
throw new runtime.RequiredError(
|
|
533
|
+
'postZapierEnrollment',
|
|
534
|
+
'Required parameter "postZapierEnrollment" was null or undefined when calling postZapierEnrollment().'
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
|
|
538
|
+
const queryParameters: any = {};
|
|
539
|
+
|
|
540
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
541
|
+
|
|
542
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
543
|
+
|
|
544
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
545
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
546
|
+
}
|
|
547
|
+
|
|
548
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
549
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
550
|
+
}
|
|
551
|
+
|
|
552
|
+
|
|
553
|
+
let urlPath = `/integrations/zapier/enrollments`;
|
|
554
|
+
|
|
555
|
+
return {
|
|
556
|
+
path: urlPath,
|
|
557
|
+
method: 'POST',
|
|
558
|
+
headers: headerParameters,
|
|
559
|
+
query: queryParameters,
|
|
560
|
+
body: PostZapierEnrollmentToJSON(requestParameters['postZapierEnrollment']),
|
|
561
|
+
};
|
|
562
|
+
}
|
|
563
|
+
|
|
564
|
+
/**
|
|
565
|
+
* Enroll an existing learner in a course
|
|
566
|
+
*/
|
|
567
|
+
async postZapierEnrollmentRaw(requestParameters: PostZapierEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZapierEnrollment>> {
|
|
568
|
+
const requestOptions = await this.postZapierEnrollmentRequestOpts(requestParameters);
|
|
569
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
570
|
+
|
|
571
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ZapierEnrollmentFromJSON(jsonValue));
|
|
572
|
+
}
|
|
573
|
+
|
|
574
|
+
/**
|
|
575
|
+
* Enroll an existing learner in a course
|
|
576
|
+
*/
|
|
577
|
+
async postZapierEnrollment(requestParameters: PostZapierEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZapierEnrollment> {
|
|
578
|
+
const response = await this.postZapierEnrollmentRaw(requestParameters, initOverrides);
|
|
579
|
+
return await response.value();
|
|
580
|
+
}
|
|
581
|
+
|
|
210
582
|
/**
|
|
211
583
|
* Creates request options for postZapierSetup without sending the request
|
|
212
584
|
*/
|
|
@@ -254,6 +626,213 @@ export class IntegrationApi extends runtime.BaseAPI {
|
|
|
254
626
|
return await response.value();
|
|
255
627
|
}
|
|
256
628
|
|
|
629
|
+
/**
|
|
630
|
+
* Creates request options for postZapierShopifyCourseMapping without sending the request
|
|
631
|
+
*/
|
|
632
|
+
async postZapierShopifyCourseMappingRequestOpts(requestParameters: PostZapierShopifyCourseMappingRequest): Promise<runtime.RequestOpts> {
|
|
633
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
634
|
+
throw new runtime.RequiredError(
|
|
635
|
+
'xAPIKEY',
|
|
636
|
+
'Required parameter "xAPIKEY" was null or undefined when calling postZapierShopifyCourseMapping().'
|
|
637
|
+
);
|
|
638
|
+
}
|
|
639
|
+
|
|
640
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
641
|
+
throw new runtime.RequiredError(
|
|
642
|
+
'xPORTALSUBDOMAIN',
|
|
643
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierShopifyCourseMapping().'
|
|
644
|
+
);
|
|
645
|
+
}
|
|
646
|
+
|
|
647
|
+
if (requestParameters['postZapierShopifyCourseMapping'] == null) {
|
|
648
|
+
throw new runtime.RequiredError(
|
|
649
|
+
'postZapierShopifyCourseMapping',
|
|
650
|
+
'Required parameter "postZapierShopifyCourseMapping" was null or undefined when calling postZapierShopifyCourseMapping().'
|
|
651
|
+
);
|
|
652
|
+
}
|
|
653
|
+
|
|
654
|
+
const queryParameters: any = {};
|
|
655
|
+
|
|
656
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
657
|
+
|
|
658
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
659
|
+
|
|
660
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
661
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
662
|
+
}
|
|
663
|
+
|
|
664
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
665
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
666
|
+
}
|
|
667
|
+
|
|
668
|
+
|
|
669
|
+
let urlPath = `/integrations/zapier/shopify/course-mappings`;
|
|
670
|
+
|
|
671
|
+
return {
|
|
672
|
+
path: urlPath,
|
|
673
|
+
method: 'POST',
|
|
674
|
+
headers: headerParameters,
|
|
675
|
+
query: queryParameters,
|
|
676
|
+
body: PostZapierShopifyCourseMappingToJSON(requestParameters['postZapierShopifyCourseMapping']),
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
|
|
680
|
+
/**
|
|
681
|
+
* Create or update a Shopify variant-to-course mapping
|
|
682
|
+
*/
|
|
683
|
+
async postZapierShopifyCourseMappingRaw(requestParameters: PostZapierShopifyCourseMappingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZapierShopifyCourseMapping>> {
|
|
684
|
+
const requestOptions = await this.postZapierShopifyCourseMappingRequestOpts(requestParameters);
|
|
685
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
686
|
+
|
|
687
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ZapierShopifyCourseMappingFromJSON(jsonValue));
|
|
688
|
+
}
|
|
689
|
+
|
|
690
|
+
/**
|
|
691
|
+
* Create or update a Shopify variant-to-course mapping
|
|
692
|
+
*/
|
|
693
|
+
async postZapierShopifyCourseMapping(requestParameters: PostZapierShopifyCourseMappingRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZapierShopifyCourseMapping> {
|
|
694
|
+
const response = await this.postZapierShopifyCourseMappingRaw(requestParameters, initOverrides);
|
|
695
|
+
return await response.value();
|
|
696
|
+
}
|
|
697
|
+
|
|
698
|
+
/**
|
|
699
|
+
* Creates request options for postZapierShopifyEnrollment without sending the request
|
|
700
|
+
*/
|
|
701
|
+
async postZapierShopifyEnrollmentRequestOpts(requestParameters: PostZapierShopifyEnrollmentRequest): Promise<runtime.RequestOpts> {
|
|
702
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
703
|
+
throw new runtime.RequiredError(
|
|
704
|
+
'xAPIKEY',
|
|
705
|
+
'Required parameter "xAPIKEY" was null or undefined when calling postZapierShopifyEnrollment().'
|
|
706
|
+
);
|
|
707
|
+
}
|
|
708
|
+
|
|
709
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
710
|
+
throw new runtime.RequiredError(
|
|
711
|
+
'xPORTALSUBDOMAIN',
|
|
712
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierShopifyEnrollment().'
|
|
713
|
+
);
|
|
714
|
+
}
|
|
715
|
+
|
|
716
|
+
if (requestParameters['postZapierShopifyEnrollment'] == null) {
|
|
717
|
+
throw new runtime.RequiredError(
|
|
718
|
+
'postZapierShopifyEnrollment',
|
|
719
|
+
'Required parameter "postZapierShopifyEnrollment" was null or undefined when calling postZapierShopifyEnrollment().'
|
|
720
|
+
);
|
|
721
|
+
}
|
|
722
|
+
|
|
723
|
+
const queryParameters: any = {};
|
|
724
|
+
|
|
725
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
726
|
+
|
|
727
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
728
|
+
|
|
729
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
730
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
731
|
+
}
|
|
732
|
+
|
|
733
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
734
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
735
|
+
}
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
let urlPath = `/integrations/zapier/shopify/enrollments`;
|
|
739
|
+
|
|
740
|
+
return {
|
|
741
|
+
path: urlPath,
|
|
742
|
+
method: 'POST',
|
|
743
|
+
headers: headerParameters,
|
|
744
|
+
query: queryParameters,
|
|
745
|
+
body: PostZapierShopifyEnrollmentToJSON(requestParameters['postZapierShopifyEnrollment']),
|
|
746
|
+
};
|
|
747
|
+
}
|
|
748
|
+
|
|
749
|
+
/**
|
|
750
|
+
* Find or invite a Shopify customer and enroll them using the purchased variant mapping
|
|
751
|
+
*/
|
|
752
|
+
async postZapierShopifyEnrollmentRaw(requestParameters: PostZapierShopifyEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostZapierShopifyEnrollmentResponse>> {
|
|
753
|
+
const requestOptions = await this.postZapierShopifyEnrollmentRequestOpts(requestParameters);
|
|
754
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
755
|
+
|
|
756
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostZapierShopifyEnrollmentResponseFromJSON(jsonValue));
|
|
757
|
+
}
|
|
758
|
+
|
|
759
|
+
/**
|
|
760
|
+
* Find or invite a Shopify customer and enroll them using the purchased variant mapping
|
|
761
|
+
*/
|
|
762
|
+
async postZapierShopifyEnrollment(requestParameters: PostZapierShopifyEnrollmentRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostZapierShopifyEnrollmentResponse> {
|
|
763
|
+
const response = await this.postZapierShopifyEnrollmentRaw(requestParameters, initOverrides);
|
|
764
|
+
return await response.value();
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
/**
|
|
768
|
+
* Creates request options for postZapierUser without sending the request
|
|
769
|
+
*/
|
|
770
|
+
async postZapierUserRequestOpts(requestParameters: PostZapierUserRequest): Promise<runtime.RequestOpts> {
|
|
771
|
+
if (requestParameters['xAPIKEY'] == null) {
|
|
772
|
+
throw new runtime.RequiredError(
|
|
773
|
+
'xAPIKEY',
|
|
774
|
+
'Required parameter "xAPIKEY" was null or undefined when calling postZapierUser().'
|
|
775
|
+
);
|
|
776
|
+
}
|
|
777
|
+
|
|
778
|
+
if (requestParameters['xPORTALSUBDOMAIN'] == null) {
|
|
779
|
+
throw new runtime.RequiredError(
|
|
780
|
+
'xPORTALSUBDOMAIN',
|
|
781
|
+
'Required parameter "xPORTALSUBDOMAIN" was null or undefined when calling postZapierUser().'
|
|
782
|
+
);
|
|
783
|
+
}
|
|
784
|
+
|
|
785
|
+
if (requestParameters['postZapierUser'] == null) {
|
|
786
|
+
throw new runtime.RequiredError(
|
|
787
|
+
'postZapierUser',
|
|
788
|
+
'Required parameter "postZapierUser" was null or undefined when calling postZapierUser().'
|
|
789
|
+
);
|
|
790
|
+
}
|
|
791
|
+
|
|
792
|
+
const queryParameters: any = {};
|
|
793
|
+
|
|
794
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
795
|
+
|
|
796
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
797
|
+
|
|
798
|
+
if (requestParameters['xAPIKEY'] != null) {
|
|
799
|
+
headerParameters['X-API-KEY'] = String(requestParameters['xAPIKEY']);
|
|
800
|
+
}
|
|
801
|
+
|
|
802
|
+
if (requestParameters['xPORTALSUBDOMAIN'] != null) {
|
|
803
|
+
headerParameters['X-PORTAL-SUBDOMAIN'] = String(requestParameters['xPORTALSUBDOMAIN']);
|
|
804
|
+
}
|
|
805
|
+
|
|
806
|
+
|
|
807
|
+
let urlPath = `/integrations/zapier/users`;
|
|
808
|
+
|
|
809
|
+
return {
|
|
810
|
+
path: urlPath,
|
|
811
|
+
method: 'POST',
|
|
812
|
+
headers: headerParameters,
|
|
813
|
+
query: queryParameters,
|
|
814
|
+
body: PostZapierUserToJSON(requestParameters['postZapierUser']),
|
|
815
|
+
};
|
|
816
|
+
}
|
|
817
|
+
|
|
818
|
+
/**
|
|
819
|
+
* Find or invite a learner to the connected portal
|
|
820
|
+
*/
|
|
821
|
+
async postZapierUserRaw(requestParameters: PostZapierUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<ZapierUser>> {
|
|
822
|
+
const requestOptions = await this.postZapierUserRequestOpts(requestParameters);
|
|
823
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
824
|
+
|
|
825
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => ZapierUserFromJSON(jsonValue));
|
|
826
|
+
}
|
|
827
|
+
|
|
828
|
+
/**
|
|
829
|
+
* Find or invite a learner to the connected portal
|
|
830
|
+
*/
|
|
831
|
+
async postZapierUser(requestParameters: PostZapierUserRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ZapierUser> {
|
|
832
|
+
const response = await this.postZapierUserRaw(requestParameters, initOverrides);
|
|
833
|
+
return await response.value();
|
|
834
|
+
}
|
|
835
|
+
|
|
257
836
|
/**
|
|
258
837
|
* Creates request options for putZapierSetup without sending the request
|
|
259
838
|
*/
|