@easyedu/js-lsm-api 1.128.0 → 1.129.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.
@@ -170,6 +170,7 @@ docs/GetResourceUsageCoursesInner.md
170
170
  docs/GetResourceVersionUpload.md
171
171
  docs/GetRichTextAssetUpload.md
172
172
  docs/GetRole.md
173
+ docs/GetSignupSlugAvailability.md
173
174
  docs/GetSupportTicket.md
174
175
  docs/GetSupportTicketAttachment.md
175
176
  docs/GetSupportTicketComment.md
@@ -587,6 +588,7 @@ src/models/GetResourceUsageCoursesInner.ts
587
588
  src/models/GetResourceVersionUpload.ts
588
589
  src/models/GetRichTextAssetUpload.ts
589
590
  src/models/GetRole.ts
591
+ src/models/GetSignupSlugAvailability.ts
590
592
  src/models/GetSupportTicket.ts
591
593
  src/models/GetSupportTicketAttachment.ts
592
594
  src/models/GetSupportTicketComment.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @easyedu/js-lsm-api@1.128.0
1
+ # @easyedu/js-lsm-api@1.129.0
2
2
 
3
3
  A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
4
4
 
@@ -398,6 +398,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
398
398
  *UserApi* | [**deleteUserAvatar**](docs/UserApi.md#deleteuseravatar) | **DELETE** /users/{userId}/avatar | Remove the current user\'s profile photo
399
399
  *UserApi* | [**getAuthCheck**](docs/UserApi.md#getauthcheck) | **GET** /auth/check | Check if a user is logged in
400
400
  *UserApi* | [**getCurrentUserPermissions**](docs/UserApi.md#getcurrentuserpermissions) | **GET** /users/current/permissions | Get the current user\'s permissions
401
+ *UserApi* | [**getSignupSlugAvailability**](docs/UserApi.md#getsignupslugavailability) | **GET** /auth/signup/slug-availability | Check whether a learner subdomain is available
401
402
  *UserApi* | [**getUser**](docs/UserApi.md#getuser) | **GET** /users/{userId} | Get a user by id
402
403
  *UserApi* | [**getUserCourses**](docs/UserApi.md#getusercourses) | **GET** /users/{userId}/courses | Get enrolled courses for a user
403
404
  *UserApi* | [**getUserEnrollments**](docs/UserApi.md#getuserenrollments) | **GET** /users/{userId}/enrollments | Get user enrollments
@@ -570,6 +571,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
570
571
  - [GetResourceVersionUpload](docs/GetResourceVersionUpload.md)
571
572
  - [GetRichTextAssetUpload](docs/GetRichTextAssetUpload.md)
572
573
  - [GetRole](docs/GetRole.md)
574
+ - [GetSignupSlugAvailability](docs/GetSignupSlugAvailability.md)
573
575
  - [GetSupportTicket](docs/GetSupportTicket.md)
574
576
  - [GetSupportTicketAttachment](docs/GetSupportTicketAttachment.md)
575
577
  - [GetSupportTicketComment](docs/GetSupportTicketComment.md)
@@ -799,7 +801,7 @@ and is automatically generated by the
799
801
  [OpenAPI Generator](https://openapi-generator.tech) project:
800
802
 
801
803
  - API version: `1.0.0`
802
- - Package version: `1.128.0`
804
+ - Package version: `1.129.0`
803
805
  - Generator version: `7.22.0`
804
806
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
805
807
 
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import { type GetCourseEnrollmentList } from '../models/GetCourseEnrollmentList';
14
+ import { type GetSignupSlugAvailability } from '../models/GetSignupSlugAvailability';
14
15
  import { type GetUser } from '../models/GetUser';
15
16
  import { type GetUserAvatarUpload } from '../models/GetUserAvatarUpload';
16
17
  import { type GetUserCourseList } from '../models/GetUserCourseList';
@@ -24,6 +25,9 @@ import { type PutUser } from '../models/PutUser';
24
25
  export interface DeleteUserAvatarRequest {
25
26
  userId: string;
26
27
  }
28
+ export interface GetSignupSlugAvailabilityRequest {
29
+ slug: string;
30
+ }
27
31
  export interface GetUserRequest {
28
32
  userId: string;
29
33
  }
@@ -109,6 +113,18 @@ export declare class UserApi extends runtime.BaseAPI {
109
113
  * Get the current user\'s permissions
110
114
  */
111
115
  getCurrentUserPermissions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<string>>;
116
+ /**
117
+ * Creates request options for getSignupSlugAvailability without sending the request
118
+ */
119
+ getSignupSlugAvailabilityRequestOpts(requestParameters: GetSignupSlugAvailabilityRequest): Promise<runtime.RequestOpts>;
120
+ /**
121
+ * Check whether a learner subdomain is available
122
+ */
123
+ getSignupSlugAvailabilityRaw(requestParameters: GetSignupSlugAvailabilityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSignupSlugAvailability>>;
124
+ /**
125
+ * Check whether a learner subdomain is available
126
+ */
127
+ getSignupSlugAvailability(requestParameters: GetSignupSlugAvailabilityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSignupSlugAvailability>;
112
128
  /**
113
129
  * Creates request options for getUser without sending the request
114
130
  */
@@ -25,6 +25,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.GetUserEnrollmentsTypeEnum = exports.GetUserCoursesOrderDirectionEnum = exports.GetUserCoursesOrderByEnum = exports.UserApi = void 0;
26
26
  const runtime = require("../runtime");
27
27
  const GetCourseEnrollmentList_1 = require("../models/GetCourseEnrollmentList");
28
+ const GetSignupSlugAvailability_1 = require("../models/GetSignupSlugAvailability");
28
29
  const GetUser_1 = require("../models/GetUser");
29
30
  const GetUserAvatarUpload_1 = require("../models/GetUserAvatarUpload");
30
31
  const GetUserCourseList_1 = require("../models/GetUserCourseList");
@@ -148,6 +149,47 @@ class UserApi extends runtime.BaseAPI {
148
149
  return yield response.value();
149
150
  });
150
151
  }
152
+ /**
153
+ * Creates request options for getSignupSlugAvailability without sending the request
154
+ */
155
+ getSignupSlugAvailabilityRequestOpts(requestParameters) {
156
+ return __awaiter(this, void 0, void 0, function* () {
157
+ if (requestParameters['slug'] == null) {
158
+ throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling getSignupSlugAvailability().');
159
+ }
160
+ const queryParameters = {};
161
+ if (requestParameters['slug'] != null) {
162
+ queryParameters['slug'] = requestParameters['slug'];
163
+ }
164
+ const headerParameters = {};
165
+ let urlPath = `/auth/signup/slug-availability`;
166
+ return {
167
+ path: urlPath,
168
+ method: 'GET',
169
+ headers: headerParameters,
170
+ query: queryParameters,
171
+ };
172
+ });
173
+ }
174
+ /**
175
+ * Check whether a learner subdomain is available
176
+ */
177
+ getSignupSlugAvailabilityRaw(requestParameters, initOverrides) {
178
+ return __awaiter(this, void 0, void 0, function* () {
179
+ const requestOptions = yield this.getSignupSlugAvailabilityRequestOpts(requestParameters);
180
+ const response = yield this.request(requestOptions, initOverrides);
181
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, GetSignupSlugAvailability_1.GetSignupSlugAvailabilityFromJSON)(jsonValue));
182
+ });
183
+ }
184
+ /**
185
+ * Check whether a learner subdomain is available
186
+ */
187
+ getSignupSlugAvailability(requestParameters, initOverrides) {
188
+ return __awaiter(this, void 0, void 0, function* () {
189
+ const response = yield this.getSignupSlugAvailabilityRaw(requestParameters, initOverrides);
190
+ return yield response.value();
191
+ });
192
+ }
151
193
  /**
152
194
  * Creates request options for getUser without sending the request
153
195
  */
@@ -11,6 +11,7 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import { type GetCourseEnrollmentList } from '../models/GetCourseEnrollmentList';
14
+ import { type GetSignupSlugAvailability } from '../models/GetSignupSlugAvailability';
14
15
  import { type GetUser } from '../models/GetUser';
15
16
  import { type GetUserAvatarUpload } from '../models/GetUserAvatarUpload';
16
17
  import { type GetUserCourseList } from '../models/GetUserCourseList';
@@ -24,6 +25,9 @@ import { type PutUser } from '../models/PutUser';
24
25
  export interface DeleteUserAvatarRequest {
25
26
  userId: string;
26
27
  }
28
+ export interface GetSignupSlugAvailabilityRequest {
29
+ slug: string;
30
+ }
27
31
  export interface GetUserRequest {
28
32
  userId: string;
29
33
  }
@@ -109,6 +113,18 @@ export declare class UserApi extends runtime.BaseAPI {
109
113
  * Get the current user\'s permissions
110
114
  */
111
115
  getCurrentUserPermissions(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Array<string>>;
116
+ /**
117
+ * Creates request options for getSignupSlugAvailability without sending the request
118
+ */
119
+ getSignupSlugAvailabilityRequestOpts(requestParameters: GetSignupSlugAvailabilityRequest): Promise<runtime.RequestOpts>;
120
+ /**
121
+ * Check whether a learner subdomain is available
122
+ */
123
+ getSignupSlugAvailabilityRaw(requestParameters: GetSignupSlugAvailabilityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetSignupSlugAvailability>>;
124
+ /**
125
+ * Check whether a learner subdomain is available
126
+ */
127
+ getSignupSlugAvailability(requestParameters: GetSignupSlugAvailabilityRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetSignupSlugAvailability>;
112
128
  /**
113
129
  * Creates request options for getUser without sending the request
114
130
  */
@@ -22,6 +22,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
22
22
  };
23
23
  import * as runtime from '../runtime';
24
24
  import { GetCourseEnrollmentListFromJSON, } from '../models/GetCourseEnrollmentList';
25
+ import { GetSignupSlugAvailabilityFromJSON, } from '../models/GetSignupSlugAvailability';
25
26
  import { GetUserFromJSON, } from '../models/GetUser';
26
27
  import { GetUserAvatarUploadFromJSON, } from '../models/GetUserAvatarUpload';
27
28
  import { GetUserCourseListFromJSON, } from '../models/GetUserCourseList';
@@ -145,6 +146,47 @@ export class UserApi extends runtime.BaseAPI {
145
146
  return yield response.value();
146
147
  });
147
148
  }
149
+ /**
150
+ * Creates request options for getSignupSlugAvailability without sending the request
151
+ */
152
+ getSignupSlugAvailabilityRequestOpts(requestParameters) {
153
+ return __awaiter(this, void 0, void 0, function* () {
154
+ if (requestParameters['slug'] == null) {
155
+ throw new runtime.RequiredError('slug', 'Required parameter "slug" was null or undefined when calling getSignupSlugAvailability().');
156
+ }
157
+ const queryParameters = {};
158
+ if (requestParameters['slug'] != null) {
159
+ queryParameters['slug'] = requestParameters['slug'];
160
+ }
161
+ const headerParameters = {};
162
+ let urlPath = `/auth/signup/slug-availability`;
163
+ return {
164
+ path: urlPath,
165
+ method: 'GET',
166
+ headers: headerParameters,
167
+ query: queryParameters,
168
+ };
169
+ });
170
+ }
171
+ /**
172
+ * Check whether a learner subdomain is available
173
+ */
174
+ getSignupSlugAvailabilityRaw(requestParameters, initOverrides) {
175
+ return __awaiter(this, void 0, void 0, function* () {
176
+ const requestOptions = yield this.getSignupSlugAvailabilityRequestOpts(requestParameters);
177
+ const response = yield this.request(requestOptions, initOverrides);
178
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetSignupSlugAvailabilityFromJSON(jsonValue));
179
+ });
180
+ }
181
+ /**
182
+ * Check whether a learner subdomain is available
183
+ */
184
+ getSignupSlugAvailability(requestParameters, initOverrides) {
185
+ return __awaiter(this, void 0, void 0, function* () {
186
+ const response = yield this.getSignupSlugAvailabilityRaw(requestParameters, initOverrides);
187
+ return yield response.value();
188
+ });
189
+ }
148
190
  /**
149
191
  * Creates request options for getUser without sending the request
150
192
  */
@@ -0,0 +1,38 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface GetSignupSlugAvailability
16
+ */
17
+ export interface GetSignupSlugAvailability {
18
+ /**
19
+ * Normalized subdomain checked.
20
+ * @type {string}
21
+ * @memberof GetSignupSlugAvailability
22
+ */
23
+ slug: string;
24
+ /**
25
+ * Whether the subdomain is currently unused. This check does not reserve it.
26
+ * @type {boolean}
27
+ * @memberof GetSignupSlugAvailability
28
+ */
29
+ available: boolean;
30
+ }
31
+ /**
32
+ * Check if a given object implements the GetSignupSlugAvailability interface.
33
+ */
34
+ export declare function instanceOfGetSignupSlugAvailability(value: object): value is GetSignupSlugAvailability;
35
+ export declare function GetSignupSlugAvailabilityFromJSON(json: any): GetSignupSlugAvailability;
36
+ export declare function GetSignupSlugAvailabilityFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSignupSlugAvailability;
37
+ export declare function GetSignupSlugAvailabilityToJSON(json: any): GetSignupSlugAvailability;
38
+ export declare function GetSignupSlugAvailabilityToJSONTyped(value?: GetSignupSlugAvailability | null, ignoreDiscriminator?: boolean): any;
@@ -0,0 +1,47 @@
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
+ * Check if a given object implements the GetSignupSlugAvailability interface.
16
+ */
17
+ export function instanceOfGetSignupSlugAvailability(value) {
18
+ if (!('slug' in value) || value['slug'] === undefined)
19
+ return false;
20
+ if (!('available' in value) || value['available'] === undefined)
21
+ return false;
22
+ return true;
23
+ }
24
+ export function GetSignupSlugAvailabilityFromJSON(json) {
25
+ return GetSignupSlugAvailabilityFromJSONTyped(json, false);
26
+ }
27
+ export function GetSignupSlugAvailabilityFromJSONTyped(json, ignoreDiscriminator) {
28
+ if (json == null) {
29
+ return json;
30
+ }
31
+ return {
32
+ 'slug': json['slug'],
33
+ 'available': json['available'],
34
+ };
35
+ }
36
+ export function GetSignupSlugAvailabilityToJSON(json) {
37
+ return GetSignupSlugAvailabilityToJSONTyped(json, false);
38
+ }
39
+ export function GetSignupSlugAvailabilityToJSONTyped(value, ignoreDiscriminator = false) {
40
+ if (value == null) {
41
+ return value;
42
+ }
43
+ return {
44
+ 'slug': value['slug'],
45
+ 'available': value['available'],
46
+ };
47
+ }
@@ -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}
@@ -44,6 +44,7 @@ export function PostSignupRequestFromJSONTyped(json, ignoreDiscriminator) {
44
44
  'email': json['email'],
45
45
  'password': json['password'],
46
46
  'organization': json['organization'],
47
+ 'slug': json['slug'] == null ? undefined : json['slug'],
47
48
  'jobRole': json['job_role'],
48
49
  'learnerCount': json['learner_count'],
49
50
  };
@@ -61,6 +62,7 @@ export function PostSignupRequestToJSONTyped(value, ignoreDiscriminator = false)
61
62
  'email': value['email'],
62
63
  'password': value['password'],
63
64
  'organization': value['organization'],
65
+ 'slug': value['slug'],
64
66
  'job_role': value['jobRole'],
65
67
  'learner_count': value['learnerCount'],
66
68
  };
@@ -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';
@@ -157,6 +157,7 @@ export * from './GetResourceUsageCoursesInner';
157
157
  export * from './GetResourceVersionUpload';
158
158
  export * from './GetRichTextAssetUpload';
159
159
  export * from './GetRole';
160
+ export * from './GetSignupSlugAvailability';
160
161
  export * from './GetSupportTicket';
161
162
  export * from './GetSupportTicketAttachment';
162
163
  export * from './GetSupportTicketComment';
@@ -0,0 +1,38 @@
1
+ /**
2
+ * LMS API
3
+ * LMS API
4
+ *
5
+ * The version of the OpenAPI document: 1.0.0
6
+ *
7
+ *
8
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
9
+ * https://openapi-generator.tech
10
+ * Do not edit the class manually.
11
+ */
12
+ /**
13
+ *
14
+ * @export
15
+ * @interface GetSignupSlugAvailability
16
+ */
17
+ export interface GetSignupSlugAvailability {
18
+ /**
19
+ * Normalized subdomain checked.
20
+ * @type {string}
21
+ * @memberof GetSignupSlugAvailability
22
+ */
23
+ slug: string;
24
+ /**
25
+ * Whether the subdomain is currently unused. This check does not reserve it.
26
+ * @type {boolean}
27
+ * @memberof GetSignupSlugAvailability
28
+ */
29
+ available: boolean;
30
+ }
31
+ /**
32
+ * Check if a given object implements the GetSignupSlugAvailability interface.
33
+ */
34
+ export declare function instanceOfGetSignupSlugAvailability(value: object): value is GetSignupSlugAvailability;
35
+ export declare function GetSignupSlugAvailabilityFromJSON(json: any): GetSignupSlugAvailability;
36
+ export declare function GetSignupSlugAvailabilityFromJSONTyped(json: any, ignoreDiscriminator: boolean): GetSignupSlugAvailability;
37
+ export declare function GetSignupSlugAvailabilityToJSON(json: any): GetSignupSlugAvailability;
38
+ export declare function GetSignupSlugAvailabilityToJSONTyped(value?: GetSignupSlugAvailability | null, ignoreDiscriminator?: boolean): any;
@@ -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.instanceOfGetSignupSlugAvailability = instanceOfGetSignupSlugAvailability;
17
+ exports.GetSignupSlugAvailabilityFromJSON = GetSignupSlugAvailabilityFromJSON;
18
+ exports.GetSignupSlugAvailabilityFromJSONTyped = GetSignupSlugAvailabilityFromJSONTyped;
19
+ exports.GetSignupSlugAvailabilityToJSON = GetSignupSlugAvailabilityToJSON;
20
+ exports.GetSignupSlugAvailabilityToJSONTyped = GetSignupSlugAvailabilityToJSONTyped;
21
+ /**
22
+ * Check if a given object implements the GetSignupSlugAvailability interface.
23
+ */
24
+ function instanceOfGetSignupSlugAvailability(value) {
25
+ if (!('slug' in value) || value['slug'] === undefined)
26
+ return false;
27
+ if (!('available' in value) || value['available'] === undefined)
28
+ return false;
29
+ return true;
30
+ }
31
+ function GetSignupSlugAvailabilityFromJSON(json) {
32
+ return GetSignupSlugAvailabilityFromJSONTyped(json, false);
33
+ }
34
+ function GetSignupSlugAvailabilityFromJSONTyped(json, ignoreDiscriminator) {
35
+ if (json == null) {
36
+ return json;
37
+ }
38
+ return {
39
+ 'slug': json['slug'],
40
+ 'available': json['available'],
41
+ };
42
+ }
43
+ function GetSignupSlugAvailabilityToJSON(json) {
44
+ return GetSignupSlugAvailabilityToJSONTyped(json, false);
45
+ }
46
+ function GetSignupSlugAvailabilityToJSONTyped(value, ignoreDiscriminator = false) {
47
+ if (value == null) {
48
+ return value;
49
+ }
50
+ return {
51
+ 'slug': value['slug'],
52
+ 'available': value['available'],
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
  };
@@ -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';
@@ -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);
@@ -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
+
@@ -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\&#39;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\&#39;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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.128.0",
3
+ "version": "1.129.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -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
  */
@@ -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
+
@@ -49,6 +49,12 @@ export interface PostSignupRequest {
49
49
  * @memberof PostSignupRequest
50
50
  */
51
51
  organization: string;
52
+ /**
53
+ * 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.
54
+ * @type {string}
55
+ * @memberof PostSignupRequest
56
+ */
57
+ slug?: string;
52
58
  /**
53
59
  * Signup/onboarding role supplied by the user; not an LMS RBAC role.
54
60
  * @type {string}
@@ -92,6 +98,7 @@ export function PostSignupRequestFromJSONTyped(json: any, ignoreDiscriminator: b
92
98
  'email': json['email'],
93
99
  'password': json['password'],
94
100
  'organization': json['organization'],
101
+ 'slug': json['slug'] == null ? undefined : json['slug'],
95
102
  'jobRole': json['job_role'],
96
103
  'learnerCount': json['learner_count'],
97
104
  };
@@ -113,6 +120,7 @@ export function PostSignupRequestToJSONTyped(value?: PostSignupRequest | null, i
113
120
  'email': value['email'],
114
121
  'password': value['password'],
115
122
  'organization': value['organization'],
123
+ 'slug': value['slug'],
116
124
  'job_role': value['jobRole'],
117
125
  'learner_count': value['learnerCount'],
118
126
  };
@@ -157,6 +157,7 @@ export * from './GetResourceUsageCoursesInner';
157
157
  export * from './GetResourceVersionUpload';
158
158
  export * from './GetRichTextAssetUpload';
159
159
  export * from './GetRole';
160
+ export * from './GetSignupSlugAvailability';
160
161
  export * from './GetSupportTicket';
161
162
  export * from './GetSupportTicketAttachment';
162
163
  export * from './GetSupportTicketComment';