@easyedu/js-lsm-api 1.128.0 → 1.130.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 +8 -0
- package/README.md +7 -2
- package/dist/apis/MarketingApi.d.ts +34 -0
- package/dist/apis/MarketingApi.js +74 -0
- package/dist/apis/UserApi.d.ts +16 -0
- package/dist/apis/UserApi.js +42 -0
- package/dist/apis/index.d.ts +1 -0
- package/dist/apis/index.js +1 -0
- package/dist/esm/apis/MarketingApi.d.ts +34 -0
- package/dist/esm/apis/MarketingApi.js +70 -0
- package/dist/esm/apis/UserApi.d.ts +16 -0
- package/dist/esm/apis/UserApi.js +42 -0
- package/dist/esm/apis/index.d.ts +1 -0
- package/dist/esm/apis/index.js +1 -0
- package/dist/esm/models/GetSignupSlugAvailability.d.ts +38 -0
- package/dist/esm/models/GetSignupSlugAvailability.js +47 -0
- package/dist/esm/models/PostDemoRequest.d.ts +100 -0
- package/dist/esm/models/PostDemoRequest.js +83 -0
- package/dist/esm/models/PostDemoRequestResponse.d.ts +38 -0
- package/dist/esm/models/PostDemoRequestResponse.js +47 -0
- package/dist/esm/models/PostSignupRequest.d.ts +6 -0
- package/dist/esm/models/PostSignupRequest.js +2 -0
- package/dist/esm/models/index.d.ts +3 -0
- package/dist/esm/models/index.js +3 -0
- package/dist/models/GetSignupSlugAvailability.d.ts +38 -0
- package/dist/models/GetSignupSlugAvailability.js +54 -0
- package/dist/models/PostDemoRequest.d.ts +100 -0
- package/dist/models/PostDemoRequest.js +91 -0
- package/dist/models/PostDemoRequestResponse.d.ts +38 -0
- package/dist/models/PostDemoRequestResponse.js +54 -0
- package/dist/models/PostSignupRequest.d.ts +6 -0
- package/dist/models/PostSignupRequest.js +2 -0
- package/dist/models/index.d.ts +3 -0
- package/dist/models/index.js +3 -0
- package/docs/GetSignupSlugAvailability.md +36 -0
- package/docs/MarketingApi.md +78 -0
- package/docs/PostDemoRequest.md +50 -0
- package/docs/PostDemoRequestResponse.md +36 -0
- package/docs/PostSignupRequest.md +2 -0
- package/docs/UserApi.md +69 -0
- package/package.json +1 -1
- package/src/apis/MarketingApi.ts +83 -0
- package/src/apis/UserApi.ts +57 -0
- package/src/apis/index.ts +1 -0
- package/src/models/GetSignupSlugAvailability.ts +75 -0
- package/src/models/PostDemoRequest.ts +157 -0
- package/src/models/PostDemoRequestResponse.ts +75 -0
- package/src/models/PostSignupRequest.ts +8 -0
- package/src/models/index.ts +3 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/* tslint:disable */
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
/**
|
|
5
|
+
* LMS API
|
|
6
|
+
* LMS API
|
|
7
|
+
*
|
|
8
|
+
* The version of the OpenAPI document: 1.0.0
|
|
9
|
+
*
|
|
10
|
+
*
|
|
11
|
+
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
12
|
+
* https://openapi-generator.tech
|
|
13
|
+
* Do not edit the class manually.
|
|
14
|
+
*/
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
exports.instanceOfPostDemoRequestResponse = instanceOfPostDemoRequestResponse;
|
|
17
|
+
exports.PostDemoRequestResponseFromJSON = PostDemoRequestResponseFromJSON;
|
|
18
|
+
exports.PostDemoRequestResponseFromJSONTyped = PostDemoRequestResponseFromJSONTyped;
|
|
19
|
+
exports.PostDemoRequestResponseToJSON = PostDemoRequestResponseToJSON;
|
|
20
|
+
exports.PostDemoRequestResponseToJSONTyped = PostDemoRequestResponseToJSONTyped;
|
|
21
|
+
/**
|
|
22
|
+
* Check if a given object implements the PostDemoRequestResponse interface.
|
|
23
|
+
*/
|
|
24
|
+
function instanceOfPostDemoRequestResponse(value) {
|
|
25
|
+
if (!('requestId' in value) || value['requestId'] === undefined)
|
|
26
|
+
return false;
|
|
27
|
+
if (!('message' in value) || value['message'] === undefined)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
function PostDemoRequestResponseFromJSON(json) {
|
|
32
|
+
return PostDemoRequestResponseFromJSONTyped(json, false);
|
|
33
|
+
}
|
|
34
|
+
function PostDemoRequestResponseFromJSONTyped(json, ignoreDiscriminator) {
|
|
35
|
+
if (json == null) {
|
|
36
|
+
return json;
|
|
37
|
+
}
|
|
38
|
+
return {
|
|
39
|
+
'requestId': json['request_id'],
|
|
40
|
+
'message': json['message'],
|
|
41
|
+
};
|
|
42
|
+
}
|
|
43
|
+
function PostDemoRequestResponseToJSON(json) {
|
|
44
|
+
return PostDemoRequestResponseToJSONTyped(json, false);
|
|
45
|
+
}
|
|
46
|
+
function PostDemoRequestResponseToJSONTyped(value, ignoreDiscriminator = false) {
|
|
47
|
+
if (value == null) {
|
|
48
|
+
return value;
|
|
49
|
+
}
|
|
50
|
+
return {
|
|
51
|
+
'request_id': value['requestId'],
|
|
52
|
+
'message': value['message'],
|
|
53
|
+
};
|
|
54
|
+
}
|
|
@@ -45,6 +45,12 @@ export interface PostSignupRequest {
|
|
|
45
45
|
* @memberof PostSignupRequest
|
|
46
46
|
*/
|
|
47
47
|
organization: string;
|
|
48
|
+
/**
|
|
49
|
+
* Requested learner subdomain, without the domain suffix. Must be available and not reserved. If omitted, it is derived from the organization. Availability does not reserve the address; verification checks again and never substitutes another address.
|
|
50
|
+
* @type {string}
|
|
51
|
+
* @memberof PostSignupRequest
|
|
52
|
+
*/
|
|
53
|
+
slug?: string;
|
|
48
54
|
/**
|
|
49
55
|
* Signup/onboarding role supplied by the user; not an LMS RBAC role.
|
|
50
56
|
* @type {string}
|
|
@@ -51,6 +51,7 @@ function PostSignupRequestFromJSONTyped(json, ignoreDiscriminator) {
|
|
|
51
51
|
'email': json['email'],
|
|
52
52
|
'password': json['password'],
|
|
53
53
|
'organization': json['organization'],
|
|
54
|
+
'slug': json['slug'] == null ? undefined : json['slug'],
|
|
54
55
|
'jobRole': json['job_role'],
|
|
55
56
|
'learnerCount': json['learner_count'],
|
|
56
57
|
};
|
|
@@ -68,6 +69,7 @@ function PostSignupRequestToJSONTyped(value, ignoreDiscriminator = false) {
|
|
|
68
69
|
'email': value['email'],
|
|
69
70
|
'password': value['password'],
|
|
70
71
|
'organization': value['organization'],
|
|
72
|
+
'slug': value['slug'],
|
|
71
73
|
'job_role': value['jobRole'],
|
|
72
74
|
'learner_count': value['learnerCount'],
|
|
73
75
|
};
|
package/dist/models/index.d.ts
CHANGED
|
@@ -155,6 +155,7 @@ export * from './GetResourceUsageCoursesInner';
|
|
|
155
155
|
export * from './GetResourceVersionUpload';
|
|
156
156
|
export * from './GetRichTextAssetUpload';
|
|
157
157
|
export * from './GetRole';
|
|
158
|
+
export * from './GetSignupSlugAvailability';
|
|
158
159
|
export * from './GetSupportTicket';
|
|
159
160
|
export * from './GetSupportTicketAttachment';
|
|
160
161
|
export * from './GetSupportTicketComment';
|
|
@@ -241,6 +242,8 @@ export * from './PostCourseVersionPublish';
|
|
|
241
242
|
export * from './PostCourseVersionSection';
|
|
242
243
|
export * from './PostCourseVersionSectionDuplicate';
|
|
243
244
|
export * from './PostCustomWebhookIntegration';
|
|
245
|
+
export * from './PostDemoRequest';
|
|
246
|
+
export * from './PostDemoRequestResponse';
|
|
244
247
|
export * from './PostDispatchItemLaunch';
|
|
245
248
|
export * from './PostDispatchItemLaunchResponse';
|
|
246
249
|
export * from './PostDispatchLaunch';
|
package/dist/models/index.js
CHANGED
|
@@ -173,6 +173,7 @@ __exportStar(require("./GetResourceUsageCoursesInner"), exports);
|
|
|
173
173
|
__exportStar(require("./GetResourceVersionUpload"), exports);
|
|
174
174
|
__exportStar(require("./GetRichTextAssetUpload"), exports);
|
|
175
175
|
__exportStar(require("./GetRole"), exports);
|
|
176
|
+
__exportStar(require("./GetSignupSlugAvailability"), exports);
|
|
176
177
|
__exportStar(require("./GetSupportTicket"), exports);
|
|
177
178
|
__exportStar(require("./GetSupportTicketAttachment"), exports);
|
|
178
179
|
__exportStar(require("./GetSupportTicketComment"), exports);
|
|
@@ -259,6 +260,8 @@ __exportStar(require("./PostCourseVersionPublish"), exports);
|
|
|
259
260
|
__exportStar(require("./PostCourseVersionSection"), exports);
|
|
260
261
|
__exportStar(require("./PostCourseVersionSectionDuplicate"), exports);
|
|
261
262
|
__exportStar(require("./PostCustomWebhookIntegration"), exports);
|
|
263
|
+
__exportStar(require("./PostDemoRequest"), exports);
|
|
264
|
+
__exportStar(require("./PostDemoRequestResponse"), exports);
|
|
262
265
|
__exportStar(require("./PostDispatchItemLaunch"), exports);
|
|
263
266
|
__exportStar(require("./PostDispatchItemLaunchResponse"), exports);
|
|
264
267
|
__exportStar(require("./PostDispatchLaunch"), exports);
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# GetSignupSlugAvailability
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`slug` | string
|
|
10
|
+
`available` | boolean
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { GetSignupSlugAvailability } from '@easyedu/js-lsm-api'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"slug": null,
|
|
20
|
+
"available": null,
|
|
21
|
+
} satisfies GetSignupSlugAvailability
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as GetSignupSlugAvailability
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
# MarketingApi
|
|
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
|
+
| [**postDemoRequest**](MarketingApi.md#postdemorequest) | **POST** /mktg/demo-requests | Save a demo or sales inquiry and notify sales |
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
## postDemoRequest
|
|
12
|
+
|
|
13
|
+
> PostDemoRequestResponse postDemoRequest(postDemoRequest)
|
|
14
|
+
|
|
15
|
+
Save a demo or sales inquiry and notify sales
|
|
16
|
+
|
|
17
|
+
### Example
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
import {
|
|
21
|
+
Configuration,
|
|
22
|
+
MarketingApi,
|
|
23
|
+
} from '@easyedu/js-lsm-api';
|
|
24
|
+
import type { PostDemoRequestRequest } from '@easyedu/js-lsm-api';
|
|
25
|
+
|
|
26
|
+
async function example() {
|
|
27
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
28
|
+
const api = new MarketingApi();
|
|
29
|
+
|
|
30
|
+
const body = {
|
|
31
|
+
// PostDemoRequest
|
|
32
|
+
postDemoRequest: ...,
|
|
33
|
+
} satisfies PostDemoRequestRequest;
|
|
34
|
+
|
|
35
|
+
try {
|
|
36
|
+
const data = await api.postDemoRequest(body);
|
|
37
|
+
console.log(data);
|
|
38
|
+
} catch (error) {
|
|
39
|
+
console.error(error);
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Run the test
|
|
44
|
+
example().catch(console.error);
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
### Parameters
|
|
48
|
+
|
|
49
|
+
|
|
50
|
+
| Name | Type | Description | Notes |
|
|
51
|
+
|------------- | ------------- | ------------- | -------------|
|
|
52
|
+
| **postDemoRequest** | [PostDemoRequest](PostDemoRequest.md) | | |
|
|
53
|
+
|
|
54
|
+
### Return type
|
|
55
|
+
|
|
56
|
+
[**PostDemoRequestResponse**](PostDemoRequestResponse.md)
|
|
57
|
+
|
|
58
|
+
### Authorization
|
|
59
|
+
|
|
60
|
+
No authorization required
|
|
61
|
+
|
|
62
|
+
### HTTP request headers
|
|
63
|
+
|
|
64
|
+
- **Content-Type**: `application/json`
|
|
65
|
+
- **Accept**: `application/json`
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
### HTTP response details
|
|
69
|
+
| Status code | Description | Response headers |
|
|
70
|
+
|-------------|-------------|------------------|
|
|
71
|
+
| **201** | Request saved and sales notification queued; unchanged retries return the same result | - |
|
|
72
|
+
| **400** | Invalid request | - |
|
|
73
|
+
| **409** | Submission ID already used with different details | - |
|
|
74
|
+
| **413** | Request exceeds the 16 KiB body limit | - |
|
|
75
|
+
| **500** | Request could not be saved or notification queued; retry with the same submission ID | - |
|
|
76
|
+
|
|
77
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
78
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
|
|
2
|
+
# PostDemoRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`submissionId` | string
|
|
10
|
+
`fullName` | string
|
|
11
|
+
`email` | string
|
|
12
|
+
`organization` | string
|
|
13
|
+
`learnerRange` | string
|
|
14
|
+
`message` | string
|
|
15
|
+
`inquiryType` | string
|
|
16
|
+
`sourcePath` | string
|
|
17
|
+
`sourceCta` | string
|
|
18
|
+
|
|
19
|
+
## Example
|
|
20
|
+
|
|
21
|
+
```typescript
|
|
22
|
+
import type { PostDemoRequest } from '@easyedu/js-lsm-api'
|
|
23
|
+
|
|
24
|
+
// TODO: Update the object below with actual values
|
|
25
|
+
const example = {
|
|
26
|
+
"submissionId": null,
|
|
27
|
+
"fullName": null,
|
|
28
|
+
"email": null,
|
|
29
|
+
"organization": null,
|
|
30
|
+
"learnerRange": null,
|
|
31
|
+
"message": null,
|
|
32
|
+
"inquiryType": null,
|
|
33
|
+
"sourcePath": null,
|
|
34
|
+
"sourceCta": null,
|
|
35
|
+
} satisfies PostDemoRequest
|
|
36
|
+
|
|
37
|
+
console.log(example)
|
|
38
|
+
|
|
39
|
+
// Convert the instance to a JSON string
|
|
40
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
41
|
+
console.log(exampleJSON)
|
|
42
|
+
|
|
43
|
+
// Parse the JSON string back to an object
|
|
44
|
+
const exampleParsed = JSON.parse(exampleJSON) as PostDemoRequest
|
|
45
|
+
console.log(exampleParsed)
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
49
|
+
|
|
50
|
+
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
|
|
2
|
+
# PostDemoRequestResponse
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`requestId` | string
|
|
10
|
+
`message` | string
|
|
11
|
+
|
|
12
|
+
## Example
|
|
13
|
+
|
|
14
|
+
```typescript
|
|
15
|
+
import type { PostDemoRequestResponse } from '@easyedu/js-lsm-api'
|
|
16
|
+
|
|
17
|
+
// TODO: Update the object below with actual values
|
|
18
|
+
const example = {
|
|
19
|
+
"requestId": null,
|
|
20
|
+
"message": null,
|
|
21
|
+
} satisfies PostDemoRequestResponse
|
|
22
|
+
|
|
23
|
+
console.log(example)
|
|
24
|
+
|
|
25
|
+
// Convert the instance to a JSON string
|
|
26
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
27
|
+
console.log(exampleJSON)
|
|
28
|
+
|
|
29
|
+
// Parse the JSON string back to an object
|
|
30
|
+
const exampleParsed = JSON.parse(exampleJSON) as PostDemoRequestResponse
|
|
31
|
+
console.log(exampleParsed)
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
35
|
+
|
|
36
|
+
|
|
@@ -11,6 +11,7 @@ Name | Type
|
|
|
11
11
|
`email` | string
|
|
12
12
|
`password` | string
|
|
13
13
|
`organization` | string
|
|
14
|
+
`slug` | string
|
|
14
15
|
`jobRole` | string
|
|
15
16
|
`learnerCount` | number
|
|
16
17
|
|
|
@@ -26,6 +27,7 @@ const example = {
|
|
|
26
27
|
"email": null,
|
|
27
28
|
"password": null,
|
|
28
29
|
"organization": null,
|
|
30
|
+
"slug": null,
|
|
29
31
|
"jobRole": null,
|
|
30
32
|
"learnerCount": null,
|
|
31
33
|
} satisfies PostSignupRequest
|
package/docs/UserApi.md
CHANGED
|
@@ -7,6 +7,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
|
|
|
7
7
|
| [**deleteUserAvatar**](UserApi.md#deleteuseravatar) | **DELETE** /users/{userId}/avatar | Remove the current user\'s profile photo |
|
|
8
8
|
| [**getAuthCheck**](UserApi.md#getauthcheck) | **GET** /auth/check | Check if a user is logged in |
|
|
9
9
|
| [**getCurrentUserPermissions**](UserApi.md#getcurrentuserpermissions) | **GET** /users/current/permissions | Get the current user\'s permissions |
|
|
10
|
+
| [**getSignupSlugAvailability**](UserApi.md#getsignupslugavailability) | **GET** /auth/signup/slug-availability | Check whether a learner subdomain is available |
|
|
10
11
|
| [**getUser**](UserApi.md#getuser) | **GET** /users/{userId} | Get a user by id |
|
|
11
12
|
| [**getUserCourses**](UserApi.md#getusercourses) | **GET** /users/{userId}/courses | Get enrolled courses for a user |
|
|
12
13
|
| [**getUserEnrollments**](UserApi.md#getuserenrollments) | **GET** /users/{userId}/enrollments | Get user enrollments |
|
|
@@ -205,6 +206,72 @@ No authorization required
|
|
|
205
206
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
206
207
|
|
|
207
208
|
|
|
209
|
+
## getSignupSlugAvailability
|
|
210
|
+
|
|
211
|
+
> GetSignupSlugAvailability getSignupSlugAvailability(slug)
|
|
212
|
+
|
|
213
|
+
Check whether a learner subdomain is available
|
|
214
|
+
|
|
215
|
+
### Example
|
|
216
|
+
|
|
217
|
+
```ts
|
|
218
|
+
import {
|
|
219
|
+
Configuration,
|
|
220
|
+
UserApi,
|
|
221
|
+
} from '@easyedu/js-lsm-api';
|
|
222
|
+
import type { GetSignupSlugAvailabilityRequest } from '@easyedu/js-lsm-api';
|
|
223
|
+
|
|
224
|
+
async function example() {
|
|
225
|
+
console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
|
|
226
|
+
const api = new UserApi();
|
|
227
|
+
|
|
228
|
+
const body = {
|
|
229
|
+
// string
|
|
230
|
+
slug: slug_example,
|
|
231
|
+
} satisfies GetSignupSlugAvailabilityRequest;
|
|
232
|
+
|
|
233
|
+
try {
|
|
234
|
+
const data = await api.getSignupSlugAvailability(body);
|
|
235
|
+
console.log(data);
|
|
236
|
+
} catch (error) {
|
|
237
|
+
console.error(error);
|
|
238
|
+
}
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
// Run the test
|
|
242
|
+
example().catch(console.error);
|
|
243
|
+
```
|
|
244
|
+
|
|
245
|
+
### Parameters
|
|
246
|
+
|
|
247
|
+
|
|
248
|
+
| Name | Type | Description | Notes |
|
|
249
|
+
|------------- | ------------- | ------------- | -------------|
|
|
250
|
+
| **slug** | `string` | | [Defaults to `undefined`] |
|
|
251
|
+
|
|
252
|
+
### Return type
|
|
253
|
+
|
|
254
|
+
[**GetSignupSlugAvailability**](GetSignupSlugAvailability.md)
|
|
255
|
+
|
|
256
|
+
### Authorization
|
|
257
|
+
|
|
258
|
+
No authorization required
|
|
259
|
+
|
|
260
|
+
### HTTP request headers
|
|
261
|
+
|
|
262
|
+
- **Content-Type**: Not defined
|
|
263
|
+
- **Accept**: `application/json`
|
|
264
|
+
|
|
265
|
+
|
|
266
|
+
### HTTP response details
|
|
267
|
+
| Status code | Description | Response headers |
|
|
268
|
+
|-------------|-------------|------------------|
|
|
269
|
+
| **200** | Current availability; does not reserve the address | - |
|
|
270
|
+
| **400** | Invalid or reserved subdomain | - |
|
|
271
|
+
|
|
272
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
273
|
+
|
|
274
|
+
|
|
208
275
|
## getUser
|
|
209
276
|
|
|
210
277
|
> GetUser getUser(userId)
|
|
@@ -621,6 +688,7 @@ No authorization required
|
|
|
621
688
|
|-------------|-------------|------------------|
|
|
622
689
|
| **200** | signup request accepted | - |
|
|
623
690
|
| **400** | signup request validation error | - |
|
|
691
|
+
| **409** | Learner subdomain is already in use | - |
|
|
624
692
|
|
|
625
693
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
626
694
|
|
|
@@ -957,6 +1025,7 @@ No authorization required
|
|
|
957
1025
|
|-------------|-------------|------------------|
|
|
958
1026
|
| **303** | signup verified and redirected to portal signin | - |
|
|
959
1027
|
| **400** | invalid or expired signup verification token | - |
|
|
1028
|
+
| **409** | Saved learner subdomain was claimed before verification; submit signup again with another address | - |
|
|
960
1029
|
|
|
961
1030
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
962
1031
|
|
package/package.json
CHANGED
|
@@ -0,0 +1,83 @@
|
|
|
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
|
+
|
|
15
|
+
import * as runtime from '../runtime';
|
|
16
|
+
import {
|
|
17
|
+
type PostDemoRequest,
|
|
18
|
+
PostDemoRequestFromJSON,
|
|
19
|
+
PostDemoRequestToJSON,
|
|
20
|
+
} from '../models/PostDemoRequest';
|
|
21
|
+
import {
|
|
22
|
+
type PostDemoRequestResponse,
|
|
23
|
+
PostDemoRequestResponseFromJSON,
|
|
24
|
+
PostDemoRequestResponseToJSON,
|
|
25
|
+
} from '../models/PostDemoRequestResponse';
|
|
26
|
+
|
|
27
|
+
export interface PostDemoRequestRequest {
|
|
28
|
+
postDemoRequest: PostDemoRequest;
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
*
|
|
33
|
+
*/
|
|
34
|
+
export class MarketingApi extends runtime.BaseAPI {
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Creates request options for postDemoRequest without sending the request
|
|
38
|
+
*/
|
|
39
|
+
async postDemoRequestRequestOpts(requestParameters: PostDemoRequestRequest): Promise<runtime.RequestOpts> {
|
|
40
|
+
if (requestParameters['postDemoRequest'] == null) {
|
|
41
|
+
throw new runtime.RequiredError(
|
|
42
|
+
'postDemoRequest',
|
|
43
|
+
'Required parameter "postDemoRequest" was null or undefined when calling postDemoRequest().'
|
|
44
|
+
);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const queryParameters: any = {};
|
|
48
|
+
|
|
49
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
50
|
+
|
|
51
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
let urlPath = `/mktg/demo-requests`;
|
|
55
|
+
|
|
56
|
+
return {
|
|
57
|
+
path: urlPath,
|
|
58
|
+
method: 'POST',
|
|
59
|
+
headers: headerParameters,
|
|
60
|
+
query: queryParameters,
|
|
61
|
+
body: PostDemoRequestToJSON(requestParameters['postDemoRequest']),
|
|
62
|
+
};
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Save a demo or sales inquiry and notify sales
|
|
67
|
+
*/
|
|
68
|
+
async postDemoRequestRaw(requestParameters: PostDemoRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<PostDemoRequestResponse>> {
|
|
69
|
+
const requestOptions = await this.postDemoRequestRequestOpts(requestParameters);
|
|
70
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
71
|
+
|
|
72
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => PostDemoRequestResponseFromJSON(jsonValue));
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
/**
|
|
76
|
+
* Save a demo or sales inquiry and notify sales
|
|
77
|
+
*/
|
|
78
|
+
async postDemoRequest(requestParameters: PostDemoRequestRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<PostDemoRequestResponse> {
|
|
79
|
+
const response = await this.postDemoRequestRaw(requestParameters, initOverrides);
|
|
80
|
+
return await response.value();
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
}
|
package/src/apis/UserApi.ts
CHANGED
|
@@ -18,6 +18,11 @@ import {
|
|
|
18
18
|
GetCourseEnrollmentListFromJSON,
|
|
19
19
|
GetCourseEnrollmentListToJSON,
|
|
20
20
|
} from '../models/GetCourseEnrollmentList';
|
|
21
|
+
import {
|
|
22
|
+
type GetSignupSlugAvailability,
|
|
23
|
+
GetSignupSlugAvailabilityFromJSON,
|
|
24
|
+
GetSignupSlugAvailabilityToJSON,
|
|
25
|
+
} from '../models/GetSignupSlugAvailability';
|
|
21
26
|
import {
|
|
22
27
|
type GetUser,
|
|
23
28
|
GetUserFromJSON,
|
|
@@ -73,6 +78,10 @@ export interface DeleteUserAvatarRequest {
|
|
|
73
78
|
userId: string;
|
|
74
79
|
}
|
|
75
80
|
|
|
81
|
+
export interface GetSignupSlugAvailabilityRequest {
|
|
82
|
+
slug: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
76
85
|
export interface GetUserRequest {
|
|
77
86
|
userId: string;
|
|
78
87
|
}
|
|
@@ -250,6 +259,54 @@ export class UserApi extends runtime.BaseAPI {
|
|
|
250
259
|
return await response.value();
|
|
251
260
|
}
|
|
252
261
|
|
|
262
|
+
/**
|
|
263
|
+
* Creates request options for getSignupSlugAvailability without sending the request
|
|
264
|
+
*/
|
|
265
|
+
async getSignupSlugAvailabilityRequestOpts(requestParameters: GetSignupSlugAvailabilityRequest): Promise<runtime.RequestOpts> {
|
|
266
|
+
if (requestParameters['slug'] == null) {
|
|
267
|
+
throw new runtime.RequiredError(
|
|
268
|
+
'slug',
|
|
269
|
+
'Required parameter "slug" was null or undefined when calling getSignupSlugAvailability().'
|
|
270
|
+
);
|
|
271
|
+
}
|
|
272
|
+
|
|
273
|
+
const queryParameters: any = {};
|
|
274
|
+
|
|
275
|
+
if (requestParameters['slug'] != null) {
|
|
276
|
+
queryParameters['slug'] = requestParameters['slug'];
|
|
277
|
+
}
|
|
278
|
+
|
|
279
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
280
|
+
|
|
281
|
+
|
|
282
|
+
let urlPath = `/auth/signup/slug-availability`;
|
|
283
|
+
|
|
284
|
+
return {
|
|
285
|
+
path: urlPath,
|
|
286
|
+
method: 'GET',
|
|
287
|
+
headers: headerParameters,
|
|
288
|
+
query: queryParameters,
|
|
289
|
+
};
|
|
290
|
+
}
|
|
291
|
+
|
|
292
|
+
/**
|
|
293
|
+
* Check whether a learner subdomain is available
|
|
294
|
+
*/
|
|
295
|
+
async getSignupSlugAvailabilityRaw(requestParameters: GetSignupSlugAvailabilityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSignupSlugAvailability>> {
|
|
296
|
+
const requestOptions = await this.getSignupSlugAvailabilityRequestOpts(requestParameters);
|
|
297
|
+
const response = await this.request(requestOptions, initOverrides);
|
|
298
|
+
|
|
299
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => GetSignupSlugAvailabilityFromJSON(jsonValue));
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
/**
|
|
303
|
+
* Check whether a learner subdomain is available
|
|
304
|
+
*/
|
|
305
|
+
async getSignupSlugAvailability(requestParameters: GetSignupSlugAvailabilityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSignupSlugAvailability> {
|
|
306
|
+
const response = await this.getSignupSlugAvailabilityRaw(requestParameters, initOverrides);
|
|
307
|
+
return await response.value();
|
|
308
|
+
}
|
|
309
|
+
|
|
253
310
|
/**
|
|
254
311
|
* Creates request options for getUser without sending the request
|
|
255
312
|
*/
|
package/src/apis/index.ts
CHANGED
|
@@ -13,6 +13,7 @@ export * from './DispatchApi';
|
|
|
13
13
|
export * from './EmailTemplateApi';
|
|
14
14
|
export * from './IntegrationApi';
|
|
15
15
|
export * from './LearnerExperienceApi';
|
|
16
|
+
export * from './MarketingApi';
|
|
16
17
|
export * from './OtherApi';
|
|
17
18
|
export * from './PlayerApi';
|
|
18
19
|
export * from './PortalApi';
|
|
@@ -0,0 +1,75 @@
|
|
|
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
|
+
|
|
15
|
+
import { mapValues } from '../runtime';
|
|
16
|
+
/**
|
|
17
|
+
*
|
|
18
|
+
* @export
|
|
19
|
+
* @interface GetSignupSlugAvailability
|
|
20
|
+
*/
|
|
21
|
+
export interface GetSignupSlugAvailability {
|
|
22
|
+
/**
|
|
23
|
+
* Normalized subdomain checked.
|
|
24
|
+
* @type {string}
|
|
25
|
+
* @memberof GetSignupSlugAvailability
|
|
26
|
+
*/
|
|
27
|
+
slug: string;
|
|
28
|
+
/**
|
|
29
|
+
* Whether the subdomain is currently unused. This check does not reserve it.
|
|
30
|
+
* @type {boolean}
|
|
31
|
+
* @memberof GetSignupSlugAvailability
|
|
32
|
+
*/
|
|
33
|
+
available: boolean;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* Check if a given object implements the GetSignupSlugAvailability interface.
|
|
38
|
+
*/
|
|
39
|
+
export function instanceOfGetSignupSlugAvailability(value: object): value is GetSignupSlugAvailability {
|
|
40
|
+
if (!('slug' in value) || value['slug'] === undefined) return false;
|
|
41
|
+
if (!('available' in value) || value['available'] === undefined) return false;
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
export function GetSignupSlugAvailabilityFromJSON(json: any): GetSignupSlugAvailability {
|
|
46
|
+
return GetSignupSlugAvailabilityFromJSONTyped(json, false);
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
export function GetSignupSlugAvailabilityFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSignupSlugAvailability {
|
|
50
|
+
if (json == null) {
|
|
51
|
+
return json;
|
|
52
|
+
}
|
|
53
|
+
return {
|
|
54
|
+
|
|
55
|
+
'slug': json['slug'],
|
|
56
|
+
'available': json['available'],
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
export function GetSignupSlugAvailabilityToJSON(json: any): GetSignupSlugAvailability {
|
|
61
|
+
return GetSignupSlugAvailabilityToJSONTyped(json, false);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
export function GetSignupSlugAvailabilityToJSONTyped(value?: GetSignupSlugAvailability | null, ignoreDiscriminator: boolean = false): any {
|
|
65
|
+
if (value == null) {
|
|
66
|
+
return value;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
return {
|
|
70
|
+
|
|
71
|
+
'slug': value['slug'],
|
|
72
|
+
'available': value['available'],
|
|
73
|
+
};
|
|
74
|
+
}
|
|
75
|
+
|