mezon-js 2.10.51 → 2.10.53

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/api.gen.ts CHANGED
@@ -222,6 +222,10 @@ export interface MezonUpdateEventBody {
222
222
  start_time?: string;
223
223
  //
224
224
  title?: string;
225
+ //
226
+ channel_id_old?: string;
227
+ //
228
+ repeat_type?: number;
225
229
  }
226
230
 
227
231
  /** Update fields in a given role. */
@@ -264,7 +268,7 @@ export interface MezonUpdateSystemMessageBody {
264
268
  boost_message?: string;
265
269
  //
266
270
  channel_id?: string;
267
- //
271
+ //
268
272
  hide_audit_log?: string;
269
273
  //
270
274
  setup_tips?: string;
@@ -325,6 +329,8 @@ export interface ApiAccount {
325
329
  //The email address of the user.
326
330
  email?: string;
327
331
  //
332
+ encrypt_private_key?: string;
333
+ //
328
334
  logo?: string;
329
335
  //
330
336
  splash_screen?: string;
@@ -1138,7 +1144,13 @@ export interface ApiCreateEventRequest {
1138
1144
  //
1139
1145
  channel_id?: string;
1140
1146
  //
1141
- action?: number;
1147
+ action?: number;
1148
+ //
1149
+ event_status?: number;
1150
+ //
1151
+ repeat_type?: number;
1152
+ //
1153
+ creator_id?: number;
1142
1154
  }
1143
1155
 
1144
1156
  /** Create a event within clan. */
@@ -1318,6 +1330,8 @@ export interface ApiEventManagement {
1318
1330
  channel_id?: string;
1319
1331
  //
1320
1332
  event_status?: number;
1333
+ //
1334
+ repeat_type?: number;
1321
1335
  }
1322
1336
 
1323
1337
  /** */
@@ -2240,7 +2254,7 @@ export interface ApiSystemMessage {
2240
2254
  channel_id?: string;
2241
2255
  //
2242
2256
  clan_id?: string;
2243
- //
2257
+ //
2244
2258
  hide_audit_log?: string;
2245
2259
  //
2246
2260
  id?: string;
@@ -2260,7 +2274,7 @@ export interface ApiSystemMessageRequest {
2260
2274
  channel_id?: string;
2261
2275
  //
2262
2276
  clan_id?: string;
2263
- //
2277
+ //
2264
2278
  hide_audit_log?: string;
2265
2279
  //
2266
2280
  setup_tips?: string;
@@ -2300,14 +2314,14 @@ export interface ApiUpdateAccountRequest {
2300
2314
  dob?: string;
2301
2315
  //The display name of the user.
2302
2316
  display_name?: string;
2317
+ //
2318
+ encrypt_private_key?: string;
2303
2319
  //The language expected to be a tag which follows the BCP-47 spec.
2304
2320
  lang_tag?: string;
2305
2321
  //The location set by the user.
2306
2322
  location?: string;
2307
2323
  //
2308
2324
  logo?: string;
2309
- //
2310
- public_key?: string;
2311
2325
  //
2312
2326
  splash_screen?: string;
2313
2327
  //The timezone set by the user.
@@ -9235,7 +9249,8 @@ export class MezonApi {
9235
9249
  }
9236
9250
 
9237
9251
  /** List Sd Topic */
9238
- listSdTopic(bearerToken: string,
9252
+ listSdTopic(
9253
+ bearerToken: string,
9239
9254
  clanId?: string,
9240
9255
  limit?: number,
9241
9256
  options: any = {}
@@ -10319,45 +10334,44 @@ export class MezonApi {
10319
10334
  ]);
10320
10335
  }
10321
10336
 
10322
- /** create onboarding. */
10323
- createOnboarding(
10324
- bearerToken: string,
10325
- body: ApiCreateOnboardingRequest,
10326
- options: any = {}
10327
- ): Promise<ApiListOnboardingResponse> {
10328
-
10329
- if (body === null || body === undefined) {
10337
+ /** create onboarding. */
10338
+ createOnboarding(
10339
+ bearerToken: string,
10340
+ body: ApiCreateOnboardingRequest,
10341
+ options: any = {}
10342
+ ): Promise<ApiListOnboardingResponse> {
10343
+ if (body === null || body === undefined) {
10330
10344
  throw new Error(
10331
10345
  "'body' is a required parameter but is null or undefined."
10332
10346
  );
10333
- }
10334
- const urlPath = "/v2/onboarding";
10335
- const queryParams = new Map<string, any>();
10347
+ }
10348
+ const urlPath = "/v2/onboarding";
10349
+ const queryParams = new Map<string, any>();
10336
10350
 
10337
10351
  let bodyJson: string = "";
10338
- bodyJson = JSON.stringify(body || {});
10352
+ bodyJson = JSON.stringify(body || {});
10339
10353
 
10340
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10341
- const fetchOptions = buildFetchOptions("POST", options, bodyJson);
10342
- if (bearerToken) {
10354
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10355
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
10356
+ if (bearerToken) {
10343
10357
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
10344
- }
10358
+ }
10345
10359
 
10346
- return Promise.race([
10347
- fetch(fullUrl, fetchOptions).then((response) => {
10348
- if (response.status == 204) {
10349
- return response;
10350
- } else if (response.status >= 200 && response.status < 300) {
10351
- return response.json();
10352
- } else {
10353
- throw response;
10354
- }
10355
- }),
10356
- new Promise((_, reject) =>
10357
- setTimeout(reject, this.timeoutMs, "Request timed out.")
10358
- ),
10359
- ]);
10360
- }
10360
+ return Promise.race([
10361
+ fetch(fullUrl, fetchOptions).then((response) => {
10362
+ if (response.status == 204) {
10363
+ return response;
10364
+ } else if (response.status >= 200 && response.status < 300) {
10365
+ return response.json();
10366
+ } else {
10367
+ throw response;
10368
+ }
10369
+ }),
10370
+ new Promise((_, reject) =>
10371
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
10372
+ ),
10373
+ ]);
10374
+ }
10361
10375
 
10362
10376
  /** delete onboarding. */
10363
10377
  deleteOnboarding(
package/client.ts CHANGED
@@ -168,7 +168,7 @@ import { WebSocketAdapter, WebSocketAdapterText } from "./web_socket_adapter";
168
168
  const DEFAULT_HOST = "127.0.0.1";
169
169
  const DEFAULT_PORT = "7350";
170
170
  const DEFAULT_SERVER_KEY = "defaultkey";
171
- const DEFAULT_TIMEOUT_MS = 7000;
171
+ const DEFAULT_TIMEOUT_MS = 10000;
172
172
  const DEFAULT_EXPIRED_TIMESPAN_MS = 5 * 60 * 1000;
173
173
 
174
174
  export enum ChannelType {
package/dist/api.gen.d.ts CHANGED
@@ -129,6 +129,8 @@ export interface MezonUpdateEventBody {
129
129
  logo?: string;
130
130
  start_time?: string;
131
131
  title?: string;
132
+ channel_id_old?: string;
133
+ repeat_type?: number;
132
134
  }
133
135
  /** Update fields in a given role. */
134
136
  export interface MezonUpdateRoleBody {
@@ -187,6 +189,7 @@ export interface ApiAccount {
187
189
  devices?: Array<ApiAccountDevice>;
188
190
  disable_time?: string;
189
191
  email?: string;
192
+ encrypt_private_key?: string;
190
193
  logo?: string;
191
194
  splash_screen?: string;
192
195
  user?: ApiUser;
@@ -652,6 +655,9 @@ export interface ApiCreateEventRequest {
652
655
  title?: string;
653
656
  channel_id?: string;
654
657
  action?: number;
658
+ event_status?: number;
659
+ repeat_type?: number;
660
+ creator_id?: number;
655
661
  }
656
662
  /** Create a event within clan. */
657
663
  export interface ApiUpdateEventRequest {
@@ -755,6 +761,7 @@ export interface ApiEventManagement {
755
761
  create_time?: string;
756
762
  channel_id?: string;
757
763
  event_status?: number;
764
+ repeat_type?: number;
758
765
  }
759
766
  /** */
760
767
  export interface ApiListFavoriteChannelResponse {
@@ -1334,10 +1341,10 @@ export interface ApiUpdateAccountRequest {
1334
1341
  avatar_url?: string;
1335
1342
  dob?: string;
1336
1343
  display_name?: string;
1344
+ encrypt_private_key?: string;
1337
1345
  lang_tag?: string;
1338
1346
  location?: string;
1339
1347
  logo?: string;
1340
- public_key?: string;
1341
1348
  splash_screen?: string;
1342
1349
  timezone?: string;
1343
1350
  username?: string;
@@ -8049,7 +8049,7 @@ var DefaultSocket = _DefaultSocket;
8049
8049
  var DEFAULT_HOST = "127.0.0.1";
8050
8050
  var DEFAULT_PORT = "7350";
8051
8051
  var DEFAULT_SERVER_KEY = "defaultkey";
8052
- var DEFAULT_TIMEOUT_MS = 7e3;
8052
+ var DEFAULT_TIMEOUT_MS = 1e4;
8053
8053
  var DEFAULT_EXPIRED_TIMESPAN_MS = 5 * 60 * 1e3;
8054
8054
  var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
8055
8055
  ChannelType2[ChannelType2["CHANNEL_TYPE_TEXT"] = 1] = "CHANNEL_TYPE_TEXT";
@@ -8015,7 +8015,7 @@ var DefaultSocket = _DefaultSocket;
8015
8015
  var DEFAULT_HOST = "127.0.0.1";
8016
8016
  var DEFAULT_PORT = "7350";
8017
8017
  var DEFAULT_SERVER_KEY = "defaultkey";
8018
- var DEFAULT_TIMEOUT_MS = 7e3;
8018
+ var DEFAULT_TIMEOUT_MS = 1e4;
8019
8019
  var DEFAULT_EXPIRED_TIMESPAN_MS = 5 * 60 * 1e3;
8020
8020
  var ChannelType = /* @__PURE__ */ ((ChannelType2) => {
8021
8021
  ChannelType2[ChannelType2["CHANNEL_TYPE_TEXT"] = 1] = "CHANNEL_TYPE_TEXT";
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.10.51",
4
+ "version": "2.10.53",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"