mezon-js 2.11.32 → 2.11.34
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 +62 -6
- package/client.ts +1 -1
- package/dist/api.gen.d.ts +17 -4
- package/dist/client.d.ts +1 -1
- package/dist/mezon-js.cjs.js +28 -0
- package/dist/mezon-js.esm.mjs +28 -0
- package/dist/socket.d.ts +2 -2
- package/package.json +1 -1
- package/socket.ts +2 -2
package/api.gen.ts
CHANGED
@@ -98,16 +98,22 @@ export interface MezonUpdateCategoryBody {
|
|
98
98
|
|
99
99
|
/** */
|
100
100
|
export interface ApiAddAppRequest {
|
101
|
+
//
|
102
|
+
about_me?: string;
|
103
|
+
//
|
104
|
+
app_logo?: string;
|
105
|
+
//App url.
|
106
|
+
app_url?: string;
|
101
107
|
//The appname.
|
102
108
|
appname?: string;
|
103
109
|
//Creator of the app.
|
104
110
|
creator_id?: string;
|
111
|
+
//Is shadow.
|
112
|
+
is_shadow?: boolean;
|
105
113
|
//Role of this app.
|
106
|
-
role?:
|
114
|
+
role?: number;
|
107
115
|
//The password.
|
108
116
|
token?: string;
|
109
|
-
//Is shadow.
|
110
|
-
is_shadow?: boolean;
|
111
117
|
}
|
112
118
|
|
113
119
|
/**
|
@@ -483,6 +489,8 @@ export interface ApiApp {
|
|
483
489
|
//
|
484
490
|
about?: string;
|
485
491
|
//
|
492
|
+
app_url?: string;
|
493
|
+
//
|
486
494
|
applogo?: string;
|
487
495
|
//
|
488
496
|
appname?: string;
|
@@ -721,6 +729,20 @@ export interface ApiChannelDescList {
|
|
721
729
|
prev_cursor?: string;
|
722
730
|
}
|
723
731
|
|
732
|
+
/** */
|
733
|
+
export interface ApiAddChannelAppRequest {
|
734
|
+
//App url.
|
735
|
+
app_url?: string;
|
736
|
+
//The appname.
|
737
|
+
appname?: string;
|
738
|
+
//Creator of the app.
|
739
|
+
creator_id?: string;
|
740
|
+
//Role of this app.
|
741
|
+
role?: number;
|
742
|
+
//The password.
|
743
|
+
token?: string;
|
744
|
+
}
|
745
|
+
|
724
746
|
/** */
|
725
747
|
export interface ApiChannelDescription {
|
726
748
|
//
|
@@ -728,8 +750,6 @@ export interface ApiChannelDescription {
|
|
728
750
|
//
|
729
751
|
age_restricted?: number;
|
730
752
|
//
|
731
|
-
app_url?: string;
|
732
|
-
//
|
733
753
|
category_id?: string;
|
734
754
|
//
|
735
755
|
category_name?: string;
|
@@ -1112,7 +1132,7 @@ export interface ApiCreateCategoryDescRequest {
|
|
1112
1132
|
/** Create a channel within clan. */
|
1113
1133
|
export interface ApiCreateChannelDescRequest {
|
1114
1134
|
//
|
1115
|
-
|
1135
|
+
app_id?: string;
|
1116
1136
|
//
|
1117
1137
|
category_id?: string;
|
1118
1138
|
//The channel this message belongs to.
|
@@ -11593,4 +11613,40 @@ export class MezonApi {
|
|
11593
11613
|
),
|
11594
11614
|
]);
|
11595
11615
|
}
|
11616
|
+
|
11617
|
+
/** List channels detail */
|
11618
|
+
listChannelDetail(bearerToken: string,
|
11619
|
+
channelId:string,
|
11620
|
+
options: any = {}): Promise<ApiChannelDescription> {
|
11621
|
+
|
11622
|
+
if (channelId === null || channelId === undefined) {
|
11623
|
+
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
11624
|
+
}
|
11625
|
+
const urlPath = "/v2/channeldesc/{channelId}"
|
11626
|
+
.replace("{channelId}", encodeURIComponent(String(channelId)));
|
11627
|
+
const queryParams = new Map<string, any>();
|
11628
|
+
|
11629
|
+
let bodyJson : string = "";
|
11630
|
+
|
11631
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
11632
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
11633
|
+
if (bearerToken) {
|
11634
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
11635
|
+
}
|
11636
|
+
|
11637
|
+
return Promise.race([
|
11638
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
11639
|
+
if (response.status == 204) {
|
11640
|
+
return response;
|
11641
|
+
} else if (response.status >= 200 && response.status < 300) {
|
11642
|
+
return response.json();
|
11643
|
+
} else {
|
11644
|
+
throw response;
|
11645
|
+
}
|
11646
|
+
}),
|
11647
|
+
new Promise((_, reject) =>
|
11648
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
11649
|
+
),
|
11650
|
+
]);
|
11651
|
+
}
|
11596
11652
|
}
|
package/client.ts
CHANGED
package/dist/api.gen.d.ts
CHANGED
@@ -55,11 +55,14 @@ export interface MezonUpdateCategoryBody {
|
|
55
55
|
}
|
56
56
|
/** */
|
57
57
|
export interface ApiAddAppRequest {
|
58
|
+
about_me?: string;
|
59
|
+
app_logo?: string;
|
60
|
+
app_url?: string;
|
58
61
|
appname?: string;
|
59
62
|
creator_id?: string;
|
60
|
-
role?: ApiAppRole;
|
61
|
-
token?: string;
|
62
63
|
is_shadow?: boolean;
|
64
|
+
role?: number;
|
65
|
+
token?: string;
|
63
66
|
}
|
64
67
|
/**
|
65
68
|
* - USER_ROLE_ADMIN: All access
|
@@ -282,6 +285,7 @@ export interface ApiAllUserClans {
|
|
282
285
|
/** App information. */
|
283
286
|
export interface ApiApp {
|
284
287
|
about?: string;
|
288
|
+
app_url?: string;
|
285
289
|
applogo?: string;
|
286
290
|
appname?: string;
|
287
291
|
creator_id?: string;
|
@@ -420,10 +424,17 @@ export interface ApiChannelDescList {
|
|
420
424
|
prev_cursor?: string;
|
421
425
|
}
|
422
426
|
/** */
|
427
|
+
export interface ApiAddChannelAppRequest {
|
428
|
+
app_url?: string;
|
429
|
+
appname?: string;
|
430
|
+
creator_id?: string;
|
431
|
+
role?: number;
|
432
|
+
token?: string;
|
433
|
+
}
|
434
|
+
/** */
|
423
435
|
export interface ApiChannelDescription {
|
424
436
|
active?: number;
|
425
437
|
age_restricted?: number;
|
426
|
-
app_url?: string;
|
427
438
|
category_id?: string;
|
428
439
|
category_name?: string;
|
429
440
|
channel_avatar?: Array<string>;
|
@@ -635,7 +646,7 @@ export interface ApiCreateCategoryDescRequest {
|
|
635
646
|
}
|
636
647
|
/** Create a channel within clan. */
|
637
648
|
export interface ApiCreateChannelDescRequest {
|
638
|
-
|
649
|
+
app_id?: string;
|
639
650
|
category_id?: string;
|
640
651
|
channel_id?: string;
|
641
652
|
channel_label?: string;
|
@@ -2245,4 +2256,6 @@ export declare class MezonApi {
|
|
2245
2256
|
createExternalMezonMeet(bearerToken: string, options?: any): Promise<ApiGenerateMezonMeetResponse>;
|
2246
2257
|
/** handler external mezon meet */
|
2247
2258
|
generateMeetTokenExternal(bearerToken: string, token: string, displayName?: string, isGuest?: boolean, options?: any): Promise<ApiGenerateMeetTokenExternalResponse>;
|
2259
|
+
/** List channels detail */
|
2260
|
+
listChannelDetail(bearerToken: string, channelId: string, options?: any): Promise<ApiChannelDescription>;
|
2248
2261
|
}
|
package/dist/client.d.ts
CHANGED
@@ -257,7 +257,7 @@ export interface ApiUpdateChannelDescRequest {
|
|
257
257
|
/** The category of channel */
|
258
258
|
category_id: string | undefined;
|
259
259
|
/** The app url of channel */
|
260
|
-
|
260
|
+
app_id: string | undefined;
|
261
261
|
e2ee?: number;
|
262
262
|
topic?: string;
|
263
263
|
age_restricted?: number;
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -7308,6 +7308,34 @@ var MezonApi = class {
|
|
7308
7308
|
)
|
7309
7309
|
]);
|
7310
7310
|
}
|
7311
|
+
/** List channels detail */
|
7312
|
+
listChannelDetail(bearerToken, channelId, options = {}) {
|
7313
|
+
if (channelId === null || channelId === void 0) {
|
7314
|
+
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
7315
|
+
}
|
7316
|
+
const urlPath = "/v2/channeldesc/{channelId}".replace("{channelId}", encodeURIComponent(String(channelId)));
|
7317
|
+
const queryParams = /* @__PURE__ */ new Map();
|
7318
|
+
let bodyJson = "";
|
7319
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
7320
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
7321
|
+
if (bearerToken) {
|
7322
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
7323
|
+
}
|
7324
|
+
return Promise.race([
|
7325
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
7326
|
+
if (response.status == 204) {
|
7327
|
+
return response;
|
7328
|
+
} else if (response.status >= 200 && response.status < 300) {
|
7329
|
+
return response.json();
|
7330
|
+
} else {
|
7331
|
+
throw response;
|
7332
|
+
}
|
7333
|
+
}),
|
7334
|
+
new Promise(
|
7335
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
7336
|
+
)
|
7337
|
+
]);
|
7338
|
+
}
|
7311
7339
|
};
|
7312
7340
|
|
7313
7341
|
// session.ts
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -7274,6 +7274,34 @@ var MezonApi = class {
|
|
7274
7274
|
)
|
7275
7275
|
]);
|
7276
7276
|
}
|
7277
|
+
/** List channels detail */
|
7278
|
+
listChannelDetail(bearerToken, channelId, options = {}) {
|
7279
|
+
if (channelId === null || channelId === void 0) {
|
7280
|
+
throw new Error("'channelId' is a required parameter but is null or undefined.");
|
7281
|
+
}
|
7282
|
+
const urlPath = "/v2/channeldesc/{channelId}".replace("{channelId}", encodeURIComponent(String(channelId)));
|
7283
|
+
const queryParams = /* @__PURE__ */ new Map();
|
7284
|
+
let bodyJson = "";
|
7285
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
7286
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
7287
|
+
if (bearerToken) {
|
7288
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
7289
|
+
}
|
7290
|
+
return Promise.race([
|
7291
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
7292
|
+
if (response.status == 204) {
|
7293
|
+
return response;
|
7294
|
+
} else if (response.status >= 200 && response.status < 300) {
|
7295
|
+
return response.json();
|
7296
|
+
} else {
|
7297
|
+
throw response;
|
7298
|
+
}
|
7299
|
+
}),
|
7300
|
+
new Promise(
|
7301
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
7302
|
+
)
|
7303
|
+
]);
|
7304
|
+
}
|
7277
7305
|
};
|
7278
7306
|
|
7279
7307
|
// session.ts
|
package/dist/socket.d.ts
CHANGED
@@ -331,7 +331,7 @@ export interface ChannelUpdatedEvent {
|
|
331
331
|
meeting_code: string;
|
332
332
|
channel_private: number;
|
333
333
|
is_error: boolean;
|
334
|
-
|
334
|
+
app_id: string;
|
335
335
|
e2ee: number;
|
336
336
|
topic: string;
|
337
337
|
age_restricted: number;
|
@@ -351,7 +351,7 @@ export interface ChannelCreatedEvent {
|
|
351
351
|
channel_private: number;
|
352
352
|
channel_type: number;
|
353
353
|
status: number;
|
354
|
-
|
354
|
+
app_id: string;
|
355
355
|
clan_name: string;
|
356
356
|
}
|
357
357
|
export interface CategoryEvent {
|
package/package.json
CHANGED
package/socket.ts
CHANGED
@@ -487,7 +487,7 @@ export interface ChannelUpdatedEvent {
|
|
487
487
|
// is error
|
488
488
|
is_error: boolean;
|
489
489
|
// app url
|
490
|
-
|
490
|
+
app_id: string;
|
491
491
|
// e2ee
|
492
492
|
e2ee: number;
|
493
493
|
//
|
@@ -525,7 +525,7 @@ export interface ChannelCreatedEvent {
|
|
525
525
|
// status
|
526
526
|
status: number;
|
527
527
|
// app url
|
528
|
-
|
528
|
+
app_id: string;
|
529
529
|
// clan_name
|
530
530
|
clan_name: string;
|
531
531
|
}
|