@easyedu/js-lsm-api 1.114.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 +38 -0
- package/README.md +32 -2
- package/dist/apis/IntegrationApi.d.ts +229 -0
- package/dist/apis/IntegrationApi.js +620 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/IntegrationApi.d.ts +229 -0
- package/dist/esm/apis/IntegrationApi.js +616 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/GetZapierCourses.d.ts +51 -0
- package/dist/esm/models/GetZapierCourses.js +56 -0
- package/dist/esm/models/GetZapierMe.d.ts +62 -0
- package/dist/esm/models/GetZapierMe.js +63 -0
- package/dist/esm/models/GetZapierSetup.d.ts +40 -0
- package/dist/esm/models/GetZapierSetup.js +49 -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/PostZapierSetup.d.ts +38 -0
- package/dist/esm/models/PostZapierSetup.js +47 -0
- package/dist/esm/models/PostZapierSetupResponse.d.ts +39 -0
- package/dist/esm/models/PostZapierSetupResponse.js +48 -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/PutZapierSetup.d.ts +38 -0
- package/dist/esm/models/PutZapierSetup.js +43 -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/ZapierIntegration.d.ts +92 -0
- package/dist/esm/models/ZapierIntegration.js +79 -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 +18 -0
- package/dist/esm/models/index.js +18 -0
- package/dist/models/GetZapierCourses.d.ts +51 -0
- package/dist/models/GetZapierCourses.js +63 -0
- package/dist/models/GetZapierMe.d.ts +62 -0
- package/dist/models/GetZapierMe.js +70 -0
- package/dist/models/GetZapierSetup.d.ts +40 -0
- package/dist/models/GetZapierSetup.js +56 -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/PostZapierSetup.d.ts +38 -0
- package/dist/models/PostZapierSetup.js +54 -0
- package/dist/models/PostZapierSetupResponse.d.ts +39 -0
- package/dist/models/PostZapierSetupResponse.js +55 -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/PutZapierSetup.d.ts +38 -0
- package/dist/models/PutZapierSetup.js +50 -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/ZapierIntegration.d.ts +92 -0
- package/dist/models/ZapierIntegration.js +86 -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 +18 -0
- package/dist/models/index.js +18 -0
- package/docs/GetZapierCourses.md +40 -0
- package/docs/GetZapierMe.md +44 -0
- package/docs/GetZapierSetup.md +36 -0
- package/docs/GetZapierShopifyCourseMappings.md +34 -0
- package/docs/GetZapierUsers.md +34 -0
- package/docs/IntegrationApi.md +882 -0
- package/docs/PostZapierEnrollment.md +46 -0
- package/docs/PostZapierSetup.md +36 -0
- package/docs/PostZapierSetupResponse.md +37 -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/PutZapierSetup.md +36 -0
- package/docs/ZapierCourse.md +40 -0
- package/docs/ZapierEnrollment.md +48 -0
- package/docs/ZapierIntegration.md +55 -0
- package/docs/ZapierShopifyCourseMapping.md +46 -0
- package/docs/ZapierUser.md +42 -0
- package/package.json +1 -1
- package/src/apis/IntegrationApi.ts +891 -0
- package/src/apis/index.ts +1 -0
- package/src/models/GetZapierCourses.ts +101 -0
- package/src/models/GetZapierMe.ts +111 -0
- package/src/models/GetZapierSetup.ts +90 -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/PostZapierSetup.ts +75 -0
- package/src/models/PostZapierSetupResponse.ts +83 -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/PutZapierSetup.ts +73 -0
- package/src/models/ZapierCourse.ts +93 -0
- package/src/models/ZapierEnrollment.ts +128 -0
- package/src/models/ZapierIntegration.ts +154 -0
- package/src/models/ZapierShopifyCourseMapping.ts +127 -0
- package/src/models/ZapierUser.ts +102 -0
- package/src/models/index.ts +18 -0
|
@@ -0,0 +1,882 @@
|
|
|
1
|
+
# IntegrationApi
|
|
2
|
+
|
|
3
|
+
All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com/stage1*
|
|
4
|
+
|
|
5
|
+
| Method | HTTP request | Description |
|
|
6
|
+
|------------- | ------------- | -------------|
|
|
7
|
+
| [**deleteZapierSetup**](IntegrationApi.md#deletezapiersetup) | **DELETE** /integrations/zapier/setup/{zapierIntegrationId} | Revoke a Zapier connection and its API key |
|
|
8
|
+
| [**getZapierCourses**](IntegrationApi.md#getzapiercourses) | **GET** /integrations/zapier/courses | List published courses available to a Zapier connection |
|
|
9
|
+
| [**getZapierMe**](IntegrationApi.md#getzapierme) | **GET** /integrations/zapier/me | Test a Zapier API key and return its portal and enabled permissions |
|
|
10
|
+
| [**getZapierSetup**](IntegrationApi.md#getzapiersetup) | **GET** /integrations/zapier/setup | List Zapier connections and permissions available to the selected portal |
|
|
11
|
+
| [**getZapierShopifyCourseMappings**](IntegrationApi.md#getzapiershopifycoursemappings) | **GET** /integrations/zapier/shopify/course-mappings | List Shopify variant-to-course mappings |
|
|
12
|
+
| [**getZapierUsers**](IntegrationApi.md#getzapierusers) | **GET** /integrations/zapier/users | Find a learner by exact email address |
|
|
13
|
+
| [**postZapierEnrollment**](IntegrationApi.md#postzapierenrollment) | **POST** /integrations/zapier/enrollments | Enroll an existing learner in a course |
|
|
14
|
+
| [**postZapierSetup**](IntegrationApi.md#postzapiersetup) | **POST** /integrations/zapier/setup | Create a Zapier connection and API key for the selected portal |
|
|
15
|
+
| [**postZapierShopifyCourseMapping**](IntegrationApi.md#postzapiershopifycoursemapping) | **POST** /integrations/zapier/shopify/course-mappings | Create or update a Shopify variant-to-course mapping |
|
|
16
|
+
| [**postZapierShopifyEnrollment**](IntegrationApi.md#postzapiershopifyenrollment) | **POST** /integrations/zapier/shopify/enrollments | Find or invite a Shopify customer and enroll them using the purchased variant mapping |
|
|
17
|
+
| [**postZapierUser**](IntegrationApi.md#postzapieruser) | **POST** /integrations/zapier/users | Find or invite a learner to the connected portal |
|
|
18
|
+
| [**putZapierSetup**](IntegrationApi.md#putzapiersetup) | **PUT** /integrations/zapier/setup/{zapierIntegrationId} | Update a Zapier connection\'s name or permissions |
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
## deleteZapierSetup
|
|
23
|
+
|
|
24
|
+
> deleteZapierSetup(zapierIntegrationId)
|
|
25
|
+
|
|
26
|
+
Revoke a Zapier connection and its API key
|
|
27
|
+
|
|
28
|
+
### Example
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import {
|
|
32
|
+
Configuration,
|
|
33
|
+
IntegrationApi,
|
|
34
|
+
} from '@easyedu/js-lsm-api';
|
|
35
|
+
import type { DeleteZapierSetupRequest } from '@easyedu/js-lsm-api';
|
|
36
|
+
|
|
37
|
+
async function example() {
|
|
38
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
39
|
+
const api = new IntegrationApi();
|
|
40
|
+
|
|
41
|
+
const body = {
|
|
42
|
+
// string
|
|
43
|
+
zapierIntegrationId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
44
|
+
} satisfies DeleteZapierSetupRequest;
|
|
45
|
+
|
|
46
|
+
try {
|
|
47
|
+
const data = await api.deleteZapierSetup(body);
|
|
48
|
+
console.log(data);
|
|
49
|
+
} catch (error) {
|
|
50
|
+
console.error(error);
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// Run the test
|
|
55
|
+
example().catch(console.error);
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
### Parameters
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
| Name | Type | Description | Notes |
|
|
62
|
+
|------------- | ------------- | ------------- | -------------|
|
|
63
|
+
| **zapierIntegrationId** | `string` | | [Defaults to `undefined`] |
|
|
64
|
+
|
|
65
|
+
### Return type
|
|
66
|
+
|
|
67
|
+
`void` (Empty response body)
|
|
68
|
+
|
|
69
|
+
### Authorization
|
|
70
|
+
|
|
71
|
+
No authorization required
|
|
72
|
+
|
|
73
|
+
### HTTP request headers
|
|
74
|
+
|
|
75
|
+
- **Content-Type**: Not defined
|
|
76
|
+
- **Accept**: Not defined
|
|
77
|
+
|
|
78
|
+
|
|
79
|
+
### HTTP response details
|
|
80
|
+
| Status code | Description | Response headers |
|
|
81
|
+
|-------------|-------------|------------------|
|
|
82
|
+
| **204** | Zapier connection revoked | - |
|
|
83
|
+
| **403** | Forbidden | - |
|
|
84
|
+
| **404** | Zapier connection not found | - |
|
|
85
|
+
|
|
86
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
## getZapierCourses
|
|
90
|
+
|
|
91
|
+
> GetZapierCourses getZapierCourses(xAPIKEY, xPORTALSUBDOMAIN, page, pageSize, search)
|
|
92
|
+
|
|
93
|
+
List published courses available to a Zapier connection
|
|
94
|
+
|
|
95
|
+
### Example
|
|
96
|
+
|
|
97
|
+
```ts
|
|
98
|
+
import {
|
|
99
|
+
Configuration,
|
|
100
|
+
IntegrationApi,
|
|
101
|
+
} from '@easyedu/js-lsm-api';
|
|
102
|
+
import type { GetZapierCoursesRequest } from '@easyedu/js-lsm-api';
|
|
103
|
+
|
|
104
|
+
async function example() {
|
|
105
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
106
|
+
const api = new IntegrationApi();
|
|
107
|
+
|
|
108
|
+
const body = {
|
|
109
|
+
// string
|
|
110
|
+
xAPIKEY: xAPIKEY_example,
|
|
111
|
+
// string
|
|
112
|
+
xPORTALSUBDOMAIN: xPORTALSUBDOMAIN_example,
|
|
113
|
+
// number (optional)
|
|
114
|
+
page: 56,
|
|
115
|
+
// number (optional)
|
|
116
|
+
pageSize: 56,
|
|
117
|
+
// string (optional)
|
|
118
|
+
search: search_example,
|
|
119
|
+
} satisfies GetZapierCoursesRequest;
|
|
120
|
+
|
|
121
|
+
try {
|
|
122
|
+
const data = await api.getZapierCourses(body);
|
|
123
|
+
console.log(data);
|
|
124
|
+
} catch (error) {
|
|
125
|
+
console.error(error);
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// Run the test
|
|
130
|
+
example().catch(console.error);
|
|
131
|
+
```
|
|
132
|
+
|
|
133
|
+
### Parameters
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
| Name | Type | Description | Notes |
|
|
137
|
+
|------------- | ------------- | ------------- | -------------|
|
|
138
|
+
| **xAPIKEY** | `string` | | [Defaults to `undefined`] |
|
|
139
|
+
| **xPORTALSUBDOMAIN** | `string` | | [Defaults to `undefined`] |
|
|
140
|
+
| **page** | `number` | | [Optional] [Defaults to `1`] |
|
|
141
|
+
| **pageSize** | `number` | | [Optional] [Defaults to `100`] |
|
|
142
|
+
| **search** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
143
|
+
|
|
144
|
+
### Return type
|
|
145
|
+
|
|
146
|
+
[**GetZapierCourses**](GetZapierCourses.md)
|
|
147
|
+
|
|
148
|
+
### Authorization
|
|
149
|
+
|
|
150
|
+
No authorization required
|
|
151
|
+
|
|
152
|
+
### HTTP request headers
|
|
153
|
+
|
|
154
|
+
- **Content-Type**: Not defined
|
|
155
|
+
- **Accept**: `application/json`
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
### HTTP response details
|
|
159
|
+
| Status code | Description | Response headers |
|
|
160
|
+
|-------------|-------------|------------------|
|
|
161
|
+
| **200** | Published courses available to the connection | - |
|
|
162
|
+
| **401** | Missing, invalid, or revoked API key | - |
|
|
163
|
+
| **403** | The API key does not have course:list | - |
|
|
164
|
+
|
|
165
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
## getZapierMe
|
|
169
|
+
|
|
170
|
+
> GetZapierMe getZapierMe(xAPIKEY, xPORTALSUBDOMAIN)
|
|
171
|
+
|
|
172
|
+
Test a Zapier API key and return its portal and enabled permissions
|
|
173
|
+
|
|
174
|
+
### Example
|
|
175
|
+
|
|
176
|
+
```ts
|
|
177
|
+
import {
|
|
178
|
+
Configuration,
|
|
179
|
+
IntegrationApi,
|
|
180
|
+
} from '@easyedu/js-lsm-api';
|
|
181
|
+
import type { GetZapierMeRequest } from '@easyedu/js-lsm-api';
|
|
182
|
+
|
|
183
|
+
async function example() {
|
|
184
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
185
|
+
const api = new IntegrationApi();
|
|
186
|
+
|
|
187
|
+
const body = {
|
|
188
|
+
// string
|
|
189
|
+
xAPIKEY: xAPIKEY_example,
|
|
190
|
+
// string
|
|
191
|
+
xPORTALSUBDOMAIN: xPORTALSUBDOMAIN_example,
|
|
192
|
+
} satisfies GetZapierMeRequest;
|
|
193
|
+
|
|
194
|
+
try {
|
|
195
|
+
const data = await api.getZapierMe(body);
|
|
196
|
+
console.log(data);
|
|
197
|
+
} catch (error) {
|
|
198
|
+
console.error(error);
|
|
199
|
+
}
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
// Run the test
|
|
203
|
+
example().catch(console.error);
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
### Parameters
|
|
207
|
+
|
|
208
|
+
|
|
209
|
+
| Name | Type | Description | Notes |
|
|
210
|
+
|------------- | ------------- | ------------- | -------------|
|
|
211
|
+
| **xAPIKEY** | `string` | | [Defaults to `undefined`] |
|
|
212
|
+
| **xPORTALSUBDOMAIN** | `string` | | [Defaults to `undefined`] |
|
|
213
|
+
|
|
214
|
+
### Return type
|
|
215
|
+
|
|
216
|
+
[**GetZapierMe**](GetZapierMe.md)
|
|
217
|
+
|
|
218
|
+
### Authorization
|
|
219
|
+
|
|
220
|
+
No authorization required
|
|
221
|
+
|
|
222
|
+
### HTTP request headers
|
|
223
|
+
|
|
224
|
+
- **Content-Type**: Not defined
|
|
225
|
+
- **Accept**: `application/json`
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
### HTTP response details
|
|
229
|
+
| Status code | Description | Response headers |
|
|
230
|
+
|-------------|-------------|------------------|
|
|
231
|
+
| **200** | Connected Zapier account details | - |
|
|
232
|
+
| **401** | Missing, invalid, or revoked API key | - |
|
|
233
|
+
| **403** | API key does not belong to the supplied portal subdomain | - |
|
|
234
|
+
|
|
235
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
## getZapierSetup
|
|
239
|
+
|
|
240
|
+
> GetZapierSetup getZapierSetup()
|
|
241
|
+
|
|
242
|
+
List Zapier connections and permissions available to the selected portal
|
|
243
|
+
|
|
244
|
+
### Example
|
|
245
|
+
|
|
246
|
+
```ts
|
|
247
|
+
import {
|
|
248
|
+
Configuration,
|
|
249
|
+
IntegrationApi,
|
|
250
|
+
} from '@easyedu/js-lsm-api';
|
|
251
|
+
import type { GetZapierSetupRequest } from '@easyedu/js-lsm-api';
|
|
252
|
+
|
|
253
|
+
async function example() {
|
|
254
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
255
|
+
const api = new IntegrationApi();
|
|
256
|
+
|
|
257
|
+
try {
|
|
258
|
+
const data = await api.getZapierSetup();
|
|
259
|
+
console.log(data);
|
|
260
|
+
} catch (error) {
|
|
261
|
+
console.error(error);
|
|
262
|
+
}
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
// Run the test
|
|
266
|
+
example().catch(console.error);
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
### Parameters
|
|
270
|
+
|
|
271
|
+
This endpoint does not need any parameter.
|
|
272
|
+
|
|
273
|
+
### Return type
|
|
274
|
+
|
|
275
|
+
[**GetZapierSetup**](GetZapierSetup.md)
|
|
276
|
+
|
|
277
|
+
### Authorization
|
|
278
|
+
|
|
279
|
+
No authorization required
|
|
280
|
+
|
|
281
|
+
### HTTP request headers
|
|
282
|
+
|
|
283
|
+
- **Content-Type**: Not defined
|
|
284
|
+
- **Accept**: `application/json`
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
### HTTP response details
|
|
288
|
+
| Status code | Description | Response headers |
|
|
289
|
+
|-------------|-------------|------------------|
|
|
290
|
+
| **200** | Zapier setup details | - |
|
|
291
|
+
| **403** | Forbidden | - |
|
|
292
|
+
|
|
293
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
294
|
+
|
|
295
|
+
|
|
296
|
+
## getZapierShopifyCourseMappings
|
|
297
|
+
|
|
298
|
+
> GetZapierShopifyCourseMappings getZapierShopifyCourseMappings(xAPIKEY, xPORTALSUBDOMAIN, shopDomain)
|
|
299
|
+
|
|
300
|
+
List Shopify variant-to-course mappings
|
|
301
|
+
|
|
302
|
+
### Example
|
|
303
|
+
|
|
304
|
+
```ts
|
|
305
|
+
import {
|
|
306
|
+
Configuration,
|
|
307
|
+
IntegrationApi,
|
|
308
|
+
} from '@easyedu/js-lsm-api';
|
|
309
|
+
import type { GetZapierShopifyCourseMappingsRequest } from '@easyedu/js-lsm-api';
|
|
310
|
+
|
|
311
|
+
async function example() {
|
|
312
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
313
|
+
const api = new IntegrationApi();
|
|
314
|
+
|
|
315
|
+
const body = {
|
|
316
|
+
// string
|
|
317
|
+
xAPIKEY: xAPIKEY_example,
|
|
318
|
+
// string
|
|
319
|
+
xPORTALSUBDOMAIN: xPORTALSUBDOMAIN_example,
|
|
320
|
+
// string (optional)
|
|
321
|
+
shopDomain: shopDomain_example,
|
|
322
|
+
} satisfies GetZapierShopifyCourseMappingsRequest;
|
|
323
|
+
|
|
324
|
+
try {
|
|
325
|
+
const data = await api.getZapierShopifyCourseMappings(body);
|
|
326
|
+
console.log(data);
|
|
327
|
+
} catch (error) {
|
|
328
|
+
console.error(error);
|
|
329
|
+
}
|
|
330
|
+
}
|
|
331
|
+
|
|
332
|
+
// Run the test
|
|
333
|
+
example().catch(console.error);
|
|
334
|
+
```
|
|
335
|
+
|
|
336
|
+
### Parameters
|
|
337
|
+
|
|
338
|
+
|
|
339
|
+
| Name | Type | Description | Notes |
|
|
340
|
+
|------------- | ------------- | ------------- | -------------|
|
|
341
|
+
| **xAPIKEY** | `string` | | [Defaults to `undefined`] |
|
|
342
|
+
| **xPORTALSUBDOMAIN** | `string` | | [Defaults to `undefined`] |
|
|
343
|
+
| **shopDomain** | `string` | | [Optional] [Defaults to `undefined`] |
|
|
344
|
+
|
|
345
|
+
### Return type
|
|
346
|
+
|
|
347
|
+
[**GetZapierShopifyCourseMappings**](GetZapierShopifyCourseMappings.md)
|
|
348
|
+
|
|
349
|
+
### Authorization
|
|
350
|
+
|
|
351
|
+
No authorization required
|
|
352
|
+
|
|
353
|
+
### HTTP request headers
|
|
354
|
+
|
|
355
|
+
- **Content-Type**: Not defined
|
|
356
|
+
- **Accept**: `application/json`
|
|
357
|
+
|
|
358
|
+
|
|
359
|
+
### HTTP response details
|
|
360
|
+
| Status code | Description | Response headers |
|
|
361
|
+
|-------------|-------------|------------------|
|
|
362
|
+
| **200** | Shopify course mappings for the connected portal | - |
|
|
363
|
+
| **401** | Missing, invalid, or revoked API key | - |
|
|
364
|
+
| **403** | The API key does not have course:list | - |
|
|
365
|
+
|
|
366
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
## getZapierUsers
|
|
370
|
+
|
|
371
|
+
> GetZapierUsers getZapierUsers(xAPIKEY, xPORTALSUBDOMAIN, email)
|
|
372
|
+
|
|
373
|
+
Find a learner by exact email address
|
|
374
|
+
|
|
375
|
+
### Example
|
|
376
|
+
|
|
377
|
+
```ts
|
|
378
|
+
import {
|
|
379
|
+
Configuration,
|
|
380
|
+
IntegrationApi,
|
|
381
|
+
} from '@easyedu/js-lsm-api';
|
|
382
|
+
import type { GetZapierUsersRequest } from '@easyedu/js-lsm-api';
|
|
383
|
+
|
|
384
|
+
async function example() {
|
|
385
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
386
|
+
const api = new IntegrationApi();
|
|
387
|
+
|
|
388
|
+
const body = {
|
|
389
|
+
// string
|
|
390
|
+
xAPIKEY: xAPIKEY_example,
|
|
391
|
+
// string
|
|
392
|
+
xPORTALSUBDOMAIN: xPORTALSUBDOMAIN_example,
|
|
393
|
+
// string
|
|
394
|
+
email: email_example,
|
|
395
|
+
} satisfies GetZapierUsersRequest;
|
|
396
|
+
|
|
397
|
+
try {
|
|
398
|
+
const data = await api.getZapierUsers(body);
|
|
399
|
+
console.log(data);
|
|
400
|
+
} catch (error) {
|
|
401
|
+
console.error(error);
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
|
|
405
|
+
// Run the test
|
|
406
|
+
example().catch(console.error);
|
|
407
|
+
```
|
|
408
|
+
|
|
409
|
+
### Parameters
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
| Name | Type | Description | Notes |
|
|
413
|
+
|------------- | ------------- | ------------- | -------------|
|
|
414
|
+
| **xAPIKEY** | `string` | | [Defaults to `undefined`] |
|
|
415
|
+
| **xPORTALSUBDOMAIN** | `string` | | [Defaults to `undefined`] |
|
|
416
|
+
| **email** | `string` | | [Defaults to `undefined`] |
|
|
417
|
+
|
|
418
|
+
### Return type
|
|
419
|
+
|
|
420
|
+
[**GetZapierUsers**](GetZapierUsers.md)
|
|
421
|
+
|
|
422
|
+
### Authorization
|
|
423
|
+
|
|
424
|
+
No authorization required
|
|
425
|
+
|
|
426
|
+
### HTTP request headers
|
|
427
|
+
|
|
428
|
+
- **Content-Type**: Not defined
|
|
429
|
+
- **Accept**: `application/json`
|
|
430
|
+
|
|
431
|
+
|
|
432
|
+
### HTTP response details
|
|
433
|
+
| Status code | Description | Response headers |
|
|
434
|
+
|-------------|-------------|------------------|
|
|
435
|
+
| **200** | Zero or one exact learner match | - |
|
|
436
|
+
| **401** | Missing, invalid, or revoked API key | - |
|
|
437
|
+
| **403** | The API key does not have user:read_any | - |
|
|
438
|
+
|
|
439
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
440
|
+
|
|
441
|
+
|
|
442
|
+
## postZapierEnrollment
|
|
443
|
+
|
|
444
|
+
> ZapierEnrollment postZapierEnrollment(xAPIKEY, xPORTALSUBDOMAIN, postZapierEnrollment)
|
|
445
|
+
|
|
446
|
+
Enroll an existing learner in a course
|
|
447
|
+
|
|
448
|
+
### Example
|
|
449
|
+
|
|
450
|
+
```ts
|
|
451
|
+
import {
|
|
452
|
+
Configuration,
|
|
453
|
+
IntegrationApi,
|
|
454
|
+
} from '@easyedu/js-lsm-api';
|
|
455
|
+
import type { PostZapierEnrollmentRequest } from '@easyedu/js-lsm-api';
|
|
456
|
+
|
|
457
|
+
async function example() {
|
|
458
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
459
|
+
const api = new IntegrationApi();
|
|
460
|
+
|
|
461
|
+
const body = {
|
|
462
|
+
// string
|
|
463
|
+
xAPIKEY: xAPIKEY_example,
|
|
464
|
+
// string
|
|
465
|
+
xPORTALSUBDOMAIN: xPORTALSUBDOMAIN_example,
|
|
466
|
+
// PostZapierEnrollment
|
|
467
|
+
postZapierEnrollment: ...,
|
|
468
|
+
} satisfies PostZapierEnrollmentRequest;
|
|
469
|
+
|
|
470
|
+
try {
|
|
471
|
+
const data = await api.postZapierEnrollment(body);
|
|
472
|
+
console.log(data);
|
|
473
|
+
} catch (error) {
|
|
474
|
+
console.error(error);
|
|
475
|
+
}
|
|
476
|
+
}
|
|
477
|
+
|
|
478
|
+
// Run the test
|
|
479
|
+
example().catch(console.error);
|
|
480
|
+
```
|
|
481
|
+
|
|
482
|
+
### Parameters
|
|
483
|
+
|
|
484
|
+
|
|
485
|
+
| Name | Type | Description | Notes |
|
|
486
|
+
|------------- | ------------- | ------------- | -------------|
|
|
487
|
+
| **xAPIKEY** | `string` | | [Defaults to `undefined`] |
|
|
488
|
+
| **xPORTALSUBDOMAIN** | `string` | | [Defaults to `undefined`] |
|
|
489
|
+
| **postZapierEnrollment** | [PostZapierEnrollment](PostZapierEnrollment.md) | | |
|
|
490
|
+
|
|
491
|
+
### Return type
|
|
492
|
+
|
|
493
|
+
[**ZapierEnrollment**](ZapierEnrollment.md)
|
|
494
|
+
|
|
495
|
+
### Authorization
|
|
496
|
+
|
|
497
|
+
No authorization required
|
|
498
|
+
|
|
499
|
+
### HTTP request headers
|
|
500
|
+
|
|
501
|
+
- **Content-Type**: `application/json`
|
|
502
|
+
- **Accept**: `application/json`
|
|
503
|
+
|
|
504
|
+
|
|
505
|
+
### HTTP response details
|
|
506
|
+
| Status code | Description | Response headers |
|
|
507
|
+
|-------------|-------------|------------------|
|
|
508
|
+
| **200** | Existing idempotent enrollment result returned | - |
|
|
509
|
+
| **201** | Learner enrolled | - |
|
|
510
|
+
| **400** | Invalid enrollment input | - |
|
|
511
|
+
| **401** | Missing, invalid, or revoked API key | - |
|
|
512
|
+
| **403** | The API key does not have enrollment:create | - |
|
|
513
|
+
| **404** | Course or learner not found in the connected portal | - |
|
|
514
|
+
| **409** | Enrollment conflicts with the current course or portal state | - |
|
|
515
|
+
|
|
516
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
517
|
+
|
|
518
|
+
|
|
519
|
+
## postZapierSetup
|
|
520
|
+
|
|
521
|
+
> PostZapierSetupResponse postZapierSetup(postZapierSetup)
|
|
522
|
+
|
|
523
|
+
Create a Zapier connection and API key for the selected portal
|
|
524
|
+
|
|
525
|
+
### Example
|
|
526
|
+
|
|
527
|
+
```ts
|
|
528
|
+
import {
|
|
529
|
+
Configuration,
|
|
530
|
+
IntegrationApi,
|
|
531
|
+
} from '@easyedu/js-lsm-api';
|
|
532
|
+
import type { PostZapierSetupRequest } from '@easyedu/js-lsm-api';
|
|
533
|
+
|
|
534
|
+
async function example() {
|
|
535
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
536
|
+
const api = new IntegrationApi();
|
|
537
|
+
|
|
538
|
+
const body = {
|
|
539
|
+
// PostZapierSetup
|
|
540
|
+
postZapierSetup: ...,
|
|
541
|
+
} satisfies PostZapierSetupRequest;
|
|
542
|
+
|
|
543
|
+
try {
|
|
544
|
+
const data = await api.postZapierSetup(body);
|
|
545
|
+
console.log(data);
|
|
546
|
+
} catch (error) {
|
|
547
|
+
console.error(error);
|
|
548
|
+
}
|
|
549
|
+
}
|
|
550
|
+
|
|
551
|
+
// Run the test
|
|
552
|
+
example().catch(console.error);
|
|
553
|
+
```
|
|
554
|
+
|
|
555
|
+
### Parameters
|
|
556
|
+
|
|
557
|
+
|
|
558
|
+
| Name | Type | Description | Notes |
|
|
559
|
+
|------------- | ------------- | ------------- | -------------|
|
|
560
|
+
| **postZapierSetup** | [PostZapierSetup](PostZapierSetup.md) | | |
|
|
561
|
+
|
|
562
|
+
### Return type
|
|
563
|
+
|
|
564
|
+
[**PostZapierSetupResponse**](PostZapierSetupResponse.md)
|
|
565
|
+
|
|
566
|
+
### Authorization
|
|
567
|
+
|
|
568
|
+
No authorization required
|
|
569
|
+
|
|
570
|
+
### HTTP request headers
|
|
571
|
+
|
|
572
|
+
- **Content-Type**: `application/json`
|
|
573
|
+
- **Accept**: `application/json`
|
|
574
|
+
|
|
575
|
+
|
|
576
|
+
### HTTP response details
|
|
577
|
+
| Status code | Description | Response headers |
|
|
578
|
+
|-------------|-------------|------------------|
|
|
579
|
+
| **201** | Zapier connection created; the API key is returned only once | - |
|
|
580
|
+
| **400** | Invalid name or permission selection | - |
|
|
581
|
+
| **403** | Forbidden | - |
|
|
582
|
+
|
|
583
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
584
|
+
|
|
585
|
+
|
|
586
|
+
## postZapierShopifyCourseMapping
|
|
587
|
+
|
|
588
|
+
> ZapierShopifyCourseMapping postZapierShopifyCourseMapping(xAPIKEY, xPORTALSUBDOMAIN, postZapierShopifyCourseMapping)
|
|
589
|
+
|
|
590
|
+
Create or update a Shopify variant-to-course mapping
|
|
591
|
+
|
|
592
|
+
### Example
|
|
593
|
+
|
|
594
|
+
```ts
|
|
595
|
+
import {
|
|
596
|
+
Configuration,
|
|
597
|
+
IntegrationApi,
|
|
598
|
+
} from '@easyedu/js-lsm-api';
|
|
599
|
+
import type { PostZapierShopifyCourseMappingRequest } from '@easyedu/js-lsm-api';
|
|
600
|
+
|
|
601
|
+
async function example() {
|
|
602
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
603
|
+
const api = new IntegrationApi();
|
|
604
|
+
|
|
605
|
+
const body = {
|
|
606
|
+
// string
|
|
607
|
+
xAPIKEY: xAPIKEY_example,
|
|
608
|
+
// string
|
|
609
|
+
xPORTALSUBDOMAIN: xPORTALSUBDOMAIN_example,
|
|
610
|
+
// PostZapierShopifyCourseMapping
|
|
611
|
+
postZapierShopifyCourseMapping: ...,
|
|
612
|
+
} satisfies PostZapierShopifyCourseMappingRequest;
|
|
613
|
+
|
|
614
|
+
try {
|
|
615
|
+
const data = await api.postZapierShopifyCourseMapping(body);
|
|
616
|
+
console.log(data);
|
|
617
|
+
} catch (error) {
|
|
618
|
+
console.error(error);
|
|
619
|
+
}
|
|
620
|
+
}
|
|
621
|
+
|
|
622
|
+
// Run the test
|
|
623
|
+
example().catch(console.error);
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
### Parameters
|
|
627
|
+
|
|
628
|
+
|
|
629
|
+
| Name | Type | Description | Notes |
|
|
630
|
+
|------------- | ------------- | ------------- | -------------|
|
|
631
|
+
| **xAPIKEY** | `string` | | [Defaults to `undefined`] |
|
|
632
|
+
| **xPORTALSUBDOMAIN** | `string` | | [Defaults to `undefined`] |
|
|
633
|
+
| **postZapierShopifyCourseMapping** | [PostZapierShopifyCourseMapping](PostZapierShopifyCourseMapping.md) | | |
|
|
634
|
+
|
|
635
|
+
### Return type
|
|
636
|
+
|
|
637
|
+
[**ZapierShopifyCourseMapping**](ZapierShopifyCourseMapping.md)
|
|
638
|
+
|
|
639
|
+
### Authorization
|
|
640
|
+
|
|
641
|
+
No authorization required
|
|
642
|
+
|
|
643
|
+
### HTTP request headers
|
|
644
|
+
|
|
645
|
+
- **Content-Type**: `application/json`
|
|
646
|
+
- **Accept**: `application/json`
|
|
647
|
+
|
|
648
|
+
|
|
649
|
+
### HTTP response details
|
|
650
|
+
| Status code | Description | Response headers |
|
|
651
|
+
|-------------|-------------|------------------|
|
|
652
|
+
| **200** | Mapping created or updated | - |
|
|
653
|
+
| **400** | Invalid Shopify mapping | - |
|
|
654
|
+
| **401** | Missing, invalid, or revoked API key | - |
|
|
655
|
+
| **403** | The API key lacks a required permission | - |
|
|
656
|
+
| **404** | Course not found in the connected portal | - |
|
|
657
|
+
|
|
658
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
659
|
+
|
|
660
|
+
|
|
661
|
+
## postZapierShopifyEnrollment
|
|
662
|
+
|
|
663
|
+
> PostZapierShopifyEnrollmentResponse postZapierShopifyEnrollment(xAPIKEY, xPORTALSUBDOMAIN, postZapierShopifyEnrollment)
|
|
664
|
+
|
|
665
|
+
Find or invite a Shopify customer and enroll them using the purchased variant mapping
|
|
666
|
+
|
|
667
|
+
### Example
|
|
668
|
+
|
|
669
|
+
```ts
|
|
670
|
+
import {
|
|
671
|
+
Configuration,
|
|
672
|
+
IntegrationApi,
|
|
673
|
+
} from '@easyedu/js-lsm-api';
|
|
674
|
+
import type { PostZapierShopifyEnrollmentRequest } from '@easyedu/js-lsm-api';
|
|
675
|
+
|
|
676
|
+
async function example() {
|
|
677
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
678
|
+
const api = new IntegrationApi();
|
|
679
|
+
|
|
680
|
+
const body = {
|
|
681
|
+
// string
|
|
682
|
+
xAPIKEY: xAPIKEY_example,
|
|
683
|
+
// string
|
|
684
|
+
xPORTALSUBDOMAIN: xPORTALSUBDOMAIN_example,
|
|
685
|
+
// PostZapierShopifyEnrollment
|
|
686
|
+
postZapierShopifyEnrollment: ...,
|
|
687
|
+
} satisfies PostZapierShopifyEnrollmentRequest;
|
|
688
|
+
|
|
689
|
+
try {
|
|
690
|
+
const data = await api.postZapierShopifyEnrollment(body);
|
|
691
|
+
console.log(data);
|
|
692
|
+
} catch (error) {
|
|
693
|
+
console.error(error);
|
|
694
|
+
}
|
|
695
|
+
}
|
|
696
|
+
|
|
697
|
+
// Run the test
|
|
698
|
+
example().catch(console.error);
|
|
699
|
+
```
|
|
700
|
+
|
|
701
|
+
### Parameters
|
|
702
|
+
|
|
703
|
+
|
|
704
|
+
| Name | Type | Description | Notes |
|
|
705
|
+
|------------- | ------------- | ------------- | -------------|
|
|
706
|
+
| **xAPIKEY** | `string` | | [Defaults to `undefined`] |
|
|
707
|
+
| **xPORTALSUBDOMAIN** | `string` | | [Defaults to `undefined`] |
|
|
708
|
+
| **postZapierShopifyEnrollment** | [PostZapierShopifyEnrollment](PostZapierShopifyEnrollment.md) | | |
|
|
709
|
+
|
|
710
|
+
### Return type
|
|
711
|
+
|
|
712
|
+
[**PostZapierShopifyEnrollmentResponse**](PostZapierShopifyEnrollmentResponse.md)
|
|
713
|
+
|
|
714
|
+
### Authorization
|
|
715
|
+
|
|
716
|
+
No authorization required
|
|
717
|
+
|
|
718
|
+
### HTTP request headers
|
|
719
|
+
|
|
720
|
+
- **Content-Type**: `application/json`
|
|
721
|
+
- **Accept**: `application/json`
|
|
722
|
+
|
|
723
|
+
|
|
724
|
+
### HTTP response details
|
|
725
|
+
| Status code | Description | Response headers |
|
|
726
|
+
|-------------|-------------|------------------|
|
|
727
|
+
| **200** | Existing idempotent Shopify enrollment result returned | - |
|
|
728
|
+
| **201** | Shopify customer enrolled | - |
|
|
729
|
+
| **400** | Invalid Shopify order data | - |
|
|
730
|
+
| **401** | Missing, invalid, or revoked API key | - |
|
|
731
|
+
| **403** | The API key lacks a required permission | - |
|
|
732
|
+
| **404** | Shopify variant mapping or course not found | - |
|
|
733
|
+
| **409** | Enrollment conflicts with the current course or portal state | - |
|
|
734
|
+
|
|
735
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
736
|
+
|
|
737
|
+
|
|
738
|
+
## postZapierUser
|
|
739
|
+
|
|
740
|
+
> ZapierUser postZapierUser(xAPIKEY, xPORTALSUBDOMAIN, postZapierUser)
|
|
741
|
+
|
|
742
|
+
Find or invite a learner to the connected portal
|
|
743
|
+
|
|
744
|
+
### Example
|
|
745
|
+
|
|
746
|
+
```ts
|
|
747
|
+
import {
|
|
748
|
+
Configuration,
|
|
749
|
+
IntegrationApi,
|
|
750
|
+
} from '@easyedu/js-lsm-api';
|
|
751
|
+
import type { PostZapierUserRequest } from '@easyedu/js-lsm-api';
|
|
752
|
+
|
|
753
|
+
async function example() {
|
|
754
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
755
|
+
const api = new IntegrationApi();
|
|
756
|
+
|
|
757
|
+
const body = {
|
|
758
|
+
// string
|
|
759
|
+
xAPIKEY: xAPIKEY_example,
|
|
760
|
+
// string
|
|
761
|
+
xPORTALSUBDOMAIN: xPORTALSUBDOMAIN_example,
|
|
762
|
+
// PostZapierUser
|
|
763
|
+
postZapierUser: ...,
|
|
764
|
+
} satisfies PostZapierUserRequest;
|
|
765
|
+
|
|
766
|
+
try {
|
|
767
|
+
const data = await api.postZapierUser(body);
|
|
768
|
+
console.log(data);
|
|
769
|
+
} catch (error) {
|
|
770
|
+
console.error(error);
|
|
771
|
+
}
|
|
772
|
+
}
|
|
773
|
+
|
|
774
|
+
// Run the test
|
|
775
|
+
example().catch(console.error);
|
|
776
|
+
```
|
|
777
|
+
|
|
778
|
+
### Parameters
|
|
779
|
+
|
|
780
|
+
|
|
781
|
+
| Name | Type | Description | Notes |
|
|
782
|
+
|------------- | ------------- | ------------- | -------------|
|
|
783
|
+
| **xAPIKEY** | `string` | | [Defaults to `undefined`] |
|
|
784
|
+
| **xPORTALSUBDOMAIN** | `string` | | [Defaults to `undefined`] |
|
|
785
|
+
| **postZapierUser** | [PostZapierUser](PostZapierUser.md) | | |
|
|
786
|
+
|
|
787
|
+
### Return type
|
|
788
|
+
|
|
789
|
+
[**ZapierUser**](ZapierUser.md)
|
|
790
|
+
|
|
791
|
+
### Authorization
|
|
792
|
+
|
|
793
|
+
No authorization required
|
|
794
|
+
|
|
795
|
+
### HTTP request headers
|
|
796
|
+
|
|
797
|
+
- **Content-Type**: `application/json`
|
|
798
|
+
- **Accept**: `application/json`
|
|
799
|
+
|
|
800
|
+
|
|
801
|
+
### HTTP response details
|
|
802
|
+
| Status code | Description | Response headers |
|
|
803
|
+
|-------------|-------------|------------------|
|
|
804
|
+
| **200** | Existing learner returned | - |
|
|
805
|
+
| **201** | Learner created and invitation queued | - |
|
|
806
|
+
| **401** | Missing, invalid, or revoked API key | - |
|
|
807
|
+
| **403** | The API key does not have portal:invite_user | - |
|
|
808
|
+
| **409** | Email belongs to another portal in the hosted organization | - |
|
|
809
|
+
|
|
810
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
811
|
+
|
|
812
|
+
|
|
813
|
+
## putZapierSetup
|
|
814
|
+
|
|
815
|
+
> ZapierIntegration putZapierSetup(zapierIntegrationId, putZapierSetup)
|
|
816
|
+
|
|
817
|
+
Update a Zapier connection\'s name or permissions
|
|
818
|
+
|
|
819
|
+
### Example
|
|
820
|
+
|
|
821
|
+
```ts
|
|
822
|
+
import {
|
|
823
|
+
Configuration,
|
|
824
|
+
IntegrationApi,
|
|
825
|
+
} from '@easyedu/js-lsm-api';
|
|
826
|
+
import type { PutZapierSetupRequest } from '@easyedu/js-lsm-api';
|
|
827
|
+
|
|
828
|
+
async function example() {
|
|
829
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
830
|
+
const api = new IntegrationApi();
|
|
831
|
+
|
|
832
|
+
const body = {
|
|
833
|
+
// string
|
|
834
|
+
zapierIntegrationId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
835
|
+
// PutZapierSetup
|
|
836
|
+
putZapierSetup: ...,
|
|
837
|
+
} satisfies PutZapierSetupRequest;
|
|
838
|
+
|
|
839
|
+
try {
|
|
840
|
+
const data = await api.putZapierSetup(body);
|
|
841
|
+
console.log(data);
|
|
842
|
+
} catch (error) {
|
|
843
|
+
console.error(error);
|
|
844
|
+
}
|
|
845
|
+
}
|
|
846
|
+
|
|
847
|
+
// Run the test
|
|
848
|
+
example().catch(console.error);
|
|
849
|
+
```
|
|
850
|
+
|
|
851
|
+
### Parameters
|
|
852
|
+
|
|
853
|
+
|
|
854
|
+
| Name | Type | Description | Notes |
|
|
855
|
+
|------------- | ------------- | ------------- | -------------|
|
|
856
|
+
| **zapierIntegrationId** | `string` | | [Defaults to `undefined`] |
|
|
857
|
+
| **putZapierSetup** | [PutZapierSetup](PutZapierSetup.md) | | |
|
|
858
|
+
|
|
859
|
+
### Return type
|
|
860
|
+
|
|
861
|
+
[**ZapierIntegration**](ZapierIntegration.md)
|
|
862
|
+
|
|
863
|
+
### Authorization
|
|
864
|
+
|
|
865
|
+
No authorization required
|
|
866
|
+
|
|
867
|
+
### HTTP request headers
|
|
868
|
+
|
|
869
|
+
- **Content-Type**: `application/json`
|
|
870
|
+
- **Accept**: `application/json`
|
|
871
|
+
|
|
872
|
+
|
|
873
|
+
### HTTP response details
|
|
874
|
+
| Status code | Description | Response headers |
|
|
875
|
+
|-------------|-------------|------------------|
|
|
876
|
+
| **200** | Zapier connection updated | - |
|
|
877
|
+
| **400** | Invalid name or permission selection | - |
|
|
878
|
+
| **403** | Forbidden | - |
|
|
879
|
+
| **404** | Zapier connection not found | - |
|
|
880
|
+
|
|
881
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
882
|
+
|