@easyedu/js-lsm-api 1.81.0 → 1.82.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/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @easyedu/js-lsm-api@1.81.0
1
+ # @easyedu/js-lsm-api@1.82.0
2
2
 
3
3
  A TypeScript SDK client for the sbzw93t49b.execute-api.us-east-2.amazonaws.com API.
4
4
 
@@ -220,6 +220,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
220
220
  *RichTextApi* | [**getRichTextAsset**](docs/RichTextApi.md#getrichtextasset) | **GET** /rich-text/assets/{assetId} | Redirect to a signed rich text asset URL
221
221
  *RichTextApi* | [**postRichTextAssetComplete**](docs/RichTextApi.md#postrichtextassetcomplete) | **POST** /rich-text/assets/{assetId}/complete | Complete a pending rich text asset upload
222
222
  *RichTextApi* | [**postRichTextAssetUpload**](docs/RichTextApi.md#postrichtextassetupload) | **POST** /rich-text/assets/uploads | Create a pending rich text asset upload
223
+ *RichTextApi* | [**putRichTextAssetFile**](docs/RichTextApi.md#putrichtextassetfile) | **PUT** /rich-text/assets/{assetId}/file | Upload a pending rich text asset file through the API
223
224
  *RoleApi* | [**assignUserRole**](docs/RoleApi.md#assignuserrole) | **POST** /roles/users/{userId}/portals/{portalId}/roles/{roleId} | Assign a role to a user for a portal
224
225
  *RoleApi* | [**createRole**](docs/RoleApi.md#createrole) | **POST** /roles | Create a custom role scoped to the current portal
225
226
  *RoleApi* | [**deleteRole**](docs/RoleApi.md#deleterole) | **DELETE** /roles/{roleId} | Deactivate a custom role
@@ -570,7 +571,7 @@ and is automatically generated by the
570
571
  [OpenAPI Generator](https://openapi-generator.tech) project:
571
572
 
572
573
  - API version: `1.0.0`
573
- - Package version: `1.81.0`
574
+ - Package version: `1.82.0`
574
575
  - Generator version: `7.22.0`
575
576
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
576
577
 
@@ -24,6 +24,10 @@ export interface PostRichTextAssetCompleteRequest {
24
24
  export interface PostRichTextAssetUploadRequest {
25
25
  postRichTextAssetUpload: PostRichTextAssetUpload;
26
26
  }
27
+ export interface PutRichTextAssetFileRequest {
28
+ assetId: string;
29
+ body: Blob;
30
+ }
27
31
  /**
28
32
  *
29
33
  */
@@ -64,4 +68,16 @@ export declare class RichTextApi extends runtime.BaseAPI {
64
68
  * Create a pending rich text asset upload
65
69
  */
66
70
  postRichTextAssetUpload(requestParameters: PostRichTextAssetUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetRichTextAssetUpload>;
71
+ /**
72
+ * Creates request options for putRichTextAssetFile without sending the request
73
+ */
74
+ putRichTextAssetFileRequestOpts(requestParameters: PutRichTextAssetFileRequest): Promise<runtime.RequestOpts>;
75
+ /**
76
+ * Upload a pending rich text asset file through the API
77
+ */
78
+ putRichTextAssetFileRaw(requestParameters: PutRichTextAssetFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
79
+ /**
80
+ * Upload a pending rich text asset file through the API
81
+ */
82
+ putRichTextAssetFile(requestParameters: PutRichTextAssetFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
67
83
  }
@@ -154,5 +154,48 @@ class RichTextApi extends runtime.BaseAPI {
154
154
  return yield response.value();
155
155
  });
156
156
  }
157
+ /**
158
+ * Creates request options for putRichTextAssetFile without sending the request
159
+ */
160
+ putRichTextAssetFileRequestOpts(requestParameters) {
161
+ return __awaiter(this, void 0, void 0, function* () {
162
+ if (requestParameters['assetId'] == null) {
163
+ throw new runtime.RequiredError('assetId', 'Required parameter "assetId" was null or undefined when calling putRichTextAssetFile().');
164
+ }
165
+ if (requestParameters['body'] == null) {
166
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling putRichTextAssetFile().');
167
+ }
168
+ const queryParameters = {};
169
+ const headerParameters = {};
170
+ headerParameters['Content-Type'] = 'image/png';
171
+ let urlPath = `/rich-text/assets/{assetId}/file`;
172
+ urlPath = urlPath.replace('{assetId}', encodeURIComponent(String(requestParameters['assetId'])));
173
+ return {
174
+ path: urlPath,
175
+ method: 'PUT',
176
+ headers: headerParameters,
177
+ query: queryParameters,
178
+ body: requestParameters['body'],
179
+ };
180
+ });
181
+ }
182
+ /**
183
+ * Upload a pending rich text asset file through the API
184
+ */
185
+ putRichTextAssetFileRaw(requestParameters, initOverrides) {
186
+ return __awaiter(this, void 0, void 0, function* () {
187
+ const requestOptions = yield this.putRichTextAssetFileRequestOpts(requestParameters);
188
+ const response = yield this.request(requestOptions, initOverrides);
189
+ return new runtime.VoidApiResponse(response);
190
+ });
191
+ }
192
+ /**
193
+ * Upload a pending rich text asset file through the API
194
+ */
195
+ putRichTextAssetFile(requestParameters, initOverrides) {
196
+ return __awaiter(this, void 0, void 0, function* () {
197
+ yield this.putRichTextAssetFileRaw(requestParameters, initOverrides);
198
+ });
199
+ }
157
200
  }
158
201
  exports.RichTextApi = RichTextApi;
@@ -24,6 +24,10 @@ export interface PostRichTextAssetCompleteRequest {
24
24
  export interface PostRichTextAssetUploadRequest {
25
25
  postRichTextAssetUpload: PostRichTextAssetUpload;
26
26
  }
27
+ export interface PutRichTextAssetFileRequest {
28
+ assetId: string;
29
+ body: Blob;
30
+ }
27
31
  /**
28
32
  *
29
33
  */
@@ -64,4 +68,16 @@ export declare class RichTextApi extends runtime.BaseAPI {
64
68
  * Create a pending rich text asset upload
65
69
  */
66
70
  postRichTextAssetUpload(requestParameters: PostRichTextAssetUploadRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetRichTextAssetUpload>;
71
+ /**
72
+ * Creates request options for putRichTextAssetFile without sending the request
73
+ */
74
+ putRichTextAssetFileRequestOpts(requestParameters: PutRichTextAssetFileRequest): Promise<runtime.RequestOpts>;
75
+ /**
76
+ * Upload a pending rich text asset file through the API
77
+ */
78
+ putRichTextAssetFileRaw(requestParameters: PutRichTextAssetFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>>;
79
+ /**
80
+ * Upload a pending rich text asset file through the API
81
+ */
82
+ putRichTextAssetFile(requestParameters: PutRichTextAssetFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void>;
67
83
  }
@@ -151,4 +151,47 @@ export class RichTextApi extends runtime.BaseAPI {
151
151
  return yield response.value();
152
152
  });
153
153
  }
154
+ /**
155
+ * Creates request options for putRichTextAssetFile without sending the request
156
+ */
157
+ putRichTextAssetFileRequestOpts(requestParameters) {
158
+ return __awaiter(this, void 0, void 0, function* () {
159
+ if (requestParameters['assetId'] == null) {
160
+ throw new runtime.RequiredError('assetId', 'Required parameter "assetId" was null or undefined when calling putRichTextAssetFile().');
161
+ }
162
+ if (requestParameters['body'] == null) {
163
+ throw new runtime.RequiredError('body', 'Required parameter "body" was null or undefined when calling putRichTextAssetFile().');
164
+ }
165
+ const queryParameters = {};
166
+ const headerParameters = {};
167
+ headerParameters['Content-Type'] = 'image/png';
168
+ let urlPath = `/rich-text/assets/{assetId}/file`;
169
+ urlPath = urlPath.replace('{assetId}', encodeURIComponent(String(requestParameters['assetId'])));
170
+ return {
171
+ path: urlPath,
172
+ method: 'PUT',
173
+ headers: headerParameters,
174
+ query: queryParameters,
175
+ body: requestParameters['body'],
176
+ };
177
+ });
178
+ }
179
+ /**
180
+ * Upload a pending rich text asset file through the API
181
+ */
182
+ putRichTextAssetFileRaw(requestParameters, initOverrides) {
183
+ return __awaiter(this, void 0, void 0, function* () {
184
+ const requestOptions = yield this.putRichTextAssetFileRequestOpts(requestParameters);
185
+ const response = yield this.request(requestOptions, initOverrides);
186
+ return new runtime.VoidApiResponse(response);
187
+ });
188
+ }
189
+ /**
190
+ * Upload a pending rich text asset file through the API
191
+ */
192
+ putRichTextAssetFile(requestParameters, initOverrides) {
193
+ return __awaiter(this, void 0, void 0, function* () {
194
+ yield this.putRichTextAssetFileRaw(requestParameters, initOverrides);
195
+ });
196
+ }
154
197
  }
@@ -7,6 +7,7 @@ All URIs are relative to *https://sbzw93t49b.execute-api.us-east-2.amazonaws.com
7
7
  | [**getRichTextAsset**](RichTextApi.md#getrichtextasset) | **GET** /rich-text/assets/{assetId} | Redirect to a signed rich text asset URL |
8
8
  | [**postRichTextAssetComplete**](RichTextApi.md#postrichtextassetcomplete) | **POST** /rich-text/assets/{assetId}/complete | Complete a pending rich text asset upload |
9
9
  | [**postRichTextAssetUpload**](RichTextApi.md#postrichtextassetupload) | **POST** /rich-text/assets/uploads | Create a pending rich text asset upload |
10
+ | [**putRichTextAssetFile**](RichTextApi.md#putrichtextassetfile) | **PUT** /rich-text/assets/{assetId}/file | Upload a pending rich text asset file through the API |
10
11
 
11
12
 
12
13
 
@@ -210,3 +211,75 @@ No authorization required
210
211
 
211
212
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
212
213
 
214
+
215
+ ## putRichTextAssetFile
216
+
217
+ > putRichTextAssetFile(assetId, body)
218
+
219
+ Upload a pending rich text asset file through the API
220
+
221
+ ### Example
222
+
223
+ ```ts
224
+ import {
225
+ Configuration,
226
+ RichTextApi,
227
+ } from '@easyedu/js-lsm-api';
228
+ import type { PutRichTextAssetFileRequest } from '@easyedu/js-lsm-api';
229
+
230
+ async function example() {
231
+ console.log("🚀 Testing @easyedu/js-lsm-api SDK...");
232
+ const api = new RichTextApi();
233
+
234
+ const body = {
235
+ // string
236
+ assetId: assetId_example,
237
+ // Blob
238
+ body: BINARY_DATA_HERE,
239
+ } satisfies PutRichTextAssetFileRequest;
240
+
241
+ try {
242
+ const data = await api.putRichTextAssetFile(body);
243
+ console.log(data);
244
+ } catch (error) {
245
+ console.error(error);
246
+ }
247
+ }
248
+
249
+ // Run the test
250
+ example().catch(console.error);
251
+ ```
252
+
253
+ ### Parameters
254
+
255
+
256
+ | Name | Type | Description | Notes |
257
+ |------------- | ------------- | ------------- | -------------|
258
+ | **assetId** | `string` | | [Defaults to `undefined`] |
259
+ | **body** | `Blob` | | |
260
+
261
+ ### Return type
262
+
263
+ `void` (Empty response body)
264
+
265
+ ### Authorization
266
+
267
+ No authorization required
268
+
269
+ ### HTTP request headers
270
+
271
+ - **Content-Type**: `image/png`, `image/jpeg`, `image/webp`, `image/gif`, `application/octet-stream`
272
+ - **Accept**: Not defined
273
+
274
+
275
+ ### HTTP response details
276
+ | Status code | Description | Response headers |
277
+ |-------------|-------------|------------------|
278
+ | **204** | rich text asset file uploaded | - |
279
+ | **400** | invalid upload | - |
280
+ | **403** | forbidden | - |
281
+ | **404** | rich text asset not found | - |
282
+ | **413** | file too large | - |
283
+
284
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
285
+
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@easyedu/js-lsm-api",
3
- "version": "1.81.0",
3
+ "version": "1.82.0",
4
4
  "description": "OpenAPI client for @easyedu/js-lsm-api",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
@@ -47,6 +47,11 @@ export interface PostRichTextAssetUploadRequest {
47
47
  postRichTextAssetUpload: PostRichTextAssetUpload;
48
48
  }
49
49
 
50
+ export interface PutRichTextAssetFileRequest {
51
+ assetId: string;
52
+ body: Blob;
53
+ }
54
+
50
55
  /**
51
56
  *
52
57
  */
@@ -198,4 +203,58 @@ export class RichTextApi extends runtime.BaseAPI {
198
203
  return await response.value();
199
204
  }
200
205
 
206
+ /**
207
+ * Creates request options for putRichTextAssetFile without sending the request
208
+ */
209
+ async putRichTextAssetFileRequestOpts(requestParameters: PutRichTextAssetFileRequest): Promise<runtime.RequestOpts> {
210
+ if (requestParameters['assetId'] == null) {
211
+ throw new runtime.RequiredError(
212
+ 'assetId',
213
+ 'Required parameter "assetId" was null or undefined when calling putRichTextAssetFile().'
214
+ );
215
+ }
216
+
217
+ if (requestParameters['body'] == null) {
218
+ throw new runtime.RequiredError(
219
+ 'body',
220
+ 'Required parameter "body" was null or undefined when calling putRichTextAssetFile().'
221
+ );
222
+ }
223
+
224
+ const queryParameters: any = {};
225
+
226
+ const headerParameters: runtime.HTTPHeaders = {};
227
+
228
+ headerParameters['Content-Type'] = 'image/png';
229
+
230
+
231
+ let urlPath = `/rich-text/assets/{assetId}/file`;
232
+ urlPath = urlPath.replace('{assetId}', encodeURIComponent(String(requestParameters['assetId'])));
233
+
234
+ return {
235
+ path: urlPath,
236
+ method: 'PUT',
237
+ headers: headerParameters,
238
+ query: queryParameters,
239
+ body: requestParameters['body'] as any,
240
+ };
241
+ }
242
+
243
+ /**
244
+ * Upload a pending rich text asset file through the API
245
+ */
246
+ async putRichTextAssetFileRaw(requestParameters: PutRichTextAssetFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<void>> {
247
+ const requestOptions = await this.putRichTextAssetFileRequestOpts(requestParameters);
248
+ const response = await this.request(requestOptions, initOverrides);
249
+
250
+ return new runtime.VoidApiResponse(response);
251
+ }
252
+
253
+ /**
254
+ * Upload a pending rich text asset file through the API
255
+ */
256
+ async putRichTextAssetFile(requestParameters: PutRichTextAssetFileRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<void> {
257
+ await this.putRichTextAssetFileRaw(requestParameters, initOverrides);
258
+ }
259
+
201
260
  }