mezon-js 2.9.55 → 2.9.57
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 +5 -34
- package/client.ts +13 -23
- package/dist/api.gen.d.ts +2 -3
- package/dist/client.d.ts +3 -4
- package/dist/mezon-js.cjs.js +13 -40
- package/dist/mezon-js.esm.mjs +13 -40
- package/package.json +1 -1
package/api.gen.ts
CHANGED
|
@@ -81,10 +81,12 @@ export interface ApiAddAppRequest {
|
|
|
81
81
|
appname?: string;
|
|
82
82
|
//Creator of the app.
|
|
83
83
|
creator_id?: string;
|
|
84
|
-
//
|
|
84
|
+
//Role of this app.
|
|
85
85
|
role?: ApiAppRole;
|
|
86
86
|
//The password.
|
|
87
87
|
token?: string;
|
|
88
|
+
//Is shadow.
|
|
89
|
+
is_shadow?: boolean;
|
|
88
90
|
}
|
|
89
91
|
|
|
90
92
|
/**
|
|
@@ -2879,39 +2881,6 @@ export class MezonApi {
|
|
|
2879
2881
|
]);
|
|
2880
2882
|
}
|
|
2881
2883
|
|
|
2882
|
-
/** */
|
|
2883
|
-
getInfoLoginRequest(bearerToken: string,
|
|
2884
|
-
loginId?:string,
|
|
2885
|
-
options: any = {}): Promise<ApiLoginIDResponse> {
|
|
2886
|
-
|
|
2887
|
-
const urlPath = "/v2/account/authenticate/getinfologin";
|
|
2888
|
-
const queryParams = new Map<string, any>();
|
|
2889
|
-
queryParams.set("login_id", loginId);
|
|
2890
|
-
|
|
2891
|
-
let bodyJson : string = "";
|
|
2892
|
-
|
|
2893
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
|
2894
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
|
2895
|
-
if (bearerToken) {
|
|
2896
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
|
2897
|
-
}
|
|
2898
|
-
|
|
2899
|
-
return Promise.race([
|
|
2900
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
|
2901
|
-
if (response.status == 204) {
|
|
2902
|
-
return response;
|
|
2903
|
-
} else if (response.status >= 200 && response.status < 300) {
|
|
2904
|
-
return response.json();
|
|
2905
|
-
} else {
|
|
2906
|
-
throw response;
|
|
2907
|
-
}
|
|
2908
|
-
}),
|
|
2909
|
-
new Promise((_, reject) =>
|
|
2910
|
-
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
|
2911
|
-
),
|
|
2912
|
-
]);
|
|
2913
|
-
}
|
|
2914
|
-
|
|
2915
2884
|
/** Authenticate a user with Google against the server. */
|
|
2916
2885
|
authenticateGoogle(
|
|
2917
2886
|
basicAuthUsername: string,
|
|
@@ -4935,6 +4904,7 @@ export class MezonApi {
|
|
|
4935
4904
|
type?:number,
|
|
4936
4905
|
limit?:number,
|
|
4937
4906
|
page?:number,
|
|
4907
|
+
channelLabel?:string,
|
|
4938
4908
|
options: any = {}): Promise<ApiChannelSettingListResponse> {
|
|
4939
4909
|
|
|
4940
4910
|
if (clanId === null || clanId === undefined) {
|
|
@@ -4951,6 +4921,7 @@ export class MezonApi {
|
|
|
4951
4921
|
queryParams.set("type", type);
|
|
4952
4922
|
queryParams.set("limit", limit);
|
|
4953
4923
|
queryParams.set("page", page);
|
|
4924
|
+
queryParams.set("channel_label", channelLabel);
|
|
4954
4925
|
|
|
4955
4926
|
let bodyJson : string = "";
|
|
4956
4927
|
|
package/client.ts
CHANGED
|
@@ -3997,7 +3997,8 @@ export class Client {
|
|
|
3997
3997
|
status?: number,
|
|
3998
3998
|
type?: number,
|
|
3999
3999
|
limit?: number,
|
|
4000
|
-
page?: number
|
|
4000
|
+
page?: number,
|
|
4001
|
+
channel_label?: string
|
|
4001
4002
|
): Promise<ApiChannelSettingListResponse> {
|
|
4002
4003
|
if (
|
|
4003
4004
|
this.autoRefreshSession &&
|
|
@@ -4018,7 +4019,8 @@ export class Client {
|
|
|
4018
4019
|
status,
|
|
4019
4020
|
type,
|
|
4020
4021
|
limit,
|
|
4021
|
-
page
|
|
4022
|
+
page,
|
|
4023
|
+
channel_label
|
|
4022
4024
|
)
|
|
4023
4025
|
.then((response: any) => {
|
|
4024
4026
|
return Promise.resolve(response);
|
|
@@ -4229,14 +4231,21 @@ export class Client {
|
|
|
4229
4231
|
return response
|
|
4230
4232
|
}
|
|
4231
4233
|
|
|
4232
|
-
async checkLoginRequest(requet: ApiConfirmLoginRequest): Promise<
|
|
4234
|
+
async checkLoginRequest(requet: ApiConfirmLoginRequest): Promise<Session | null> {
|
|
4233
4235
|
const apiSession = await this.apiClient.checkLoginRequest(
|
|
4234
4236
|
this.serverkey,
|
|
4235
4237
|
"",
|
|
4236
4238
|
requet
|
|
4237
4239
|
);
|
|
4240
|
+
if (!apiSession?.token) {
|
|
4241
|
+
return null
|
|
4242
|
+
}
|
|
4243
|
+
return new Session(
|
|
4244
|
+
apiSession.token || "",
|
|
4245
|
+
apiSession.refresh_token || "",
|
|
4246
|
+
apiSession.created || false
|
|
4247
|
+
);
|
|
4238
4248
|
|
|
4239
|
-
return apiSession
|
|
4240
4249
|
}
|
|
4241
4250
|
|
|
4242
4251
|
async confirmLogin(
|
|
@@ -4257,23 +4266,4 @@ export class Client {
|
|
|
4257
4266
|
return response;
|
|
4258
4267
|
});
|
|
4259
4268
|
}
|
|
4260
|
-
|
|
4261
|
-
async getInfoLoginRequest(
|
|
4262
|
-
session: Session,
|
|
4263
|
-
loginId: string
|
|
4264
|
-
): Promise<any> {
|
|
4265
|
-
if (
|
|
4266
|
-
this.autoRefreshSession &&
|
|
4267
|
-
session.refresh_token &&
|
|
4268
|
-
session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
|
|
4269
|
-
) {
|
|
4270
|
-
await this.sessionRefresh(session);
|
|
4271
|
-
}
|
|
4272
|
-
|
|
4273
|
-
return this.apiClient
|
|
4274
|
-
.getInfoLoginRequest(session.token, loginId)
|
|
4275
|
-
.then((response: any) => {
|
|
4276
|
-
return response;
|
|
4277
|
-
});
|
|
4278
|
-
}
|
|
4279
4269
|
}
|
package/dist/api.gen.d.ts
CHANGED
|
@@ -47,6 +47,7 @@ export interface ApiAddAppRequest {
|
|
|
47
47
|
creator_id?: string;
|
|
48
48
|
role?: ApiAppRole;
|
|
49
49
|
token?: string;
|
|
50
|
+
is_shadow?: boolean;
|
|
50
51
|
}
|
|
51
52
|
/**
|
|
52
53
|
* - USER_ROLE_ADMIN: All access
|
|
@@ -1383,8 +1384,6 @@ export declare class MezonApi {
|
|
|
1383
1384
|
authenticateFacebookInstantGame(basicAuthUsername: string, basicAuthPassword: string, account: ApiAccountFacebookInstantGame, create?: boolean, username?: string, options?: any): Promise<ApiSession>;
|
|
1384
1385
|
/** Authenticate a user with Apple's GameCenter against the server. */
|
|
1385
1386
|
authenticateGameCenter(basicAuthUsername: string, basicAuthPassword: string, account: ApiAccountGameCenter, create?: boolean, username?: string, options?: any): Promise<ApiSession>;
|
|
1386
|
-
/** */
|
|
1387
|
-
getInfoLoginRequest(bearerToken: string, loginId?: string, options?: any): Promise<ApiLoginIDResponse>;
|
|
1388
1387
|
/** Authenticate a user with Google against the server. */
|
|
1389
1388
|
authenticateGoogle(basicAuthUsername: string, basicAuthPassword: string, account: ApiAccountGoogle, create?: boolean, username?: string, options?: any): Promise<ApiSession>;
|
|
1390
1389
|
/** Authenticate a user with Steam against the server. */
|
|
@@ -1486,7 +1485,7 @@ export declare class MezonApi {
|
|
|
1486
1485
|
/** Update fields in a given channel. */
|
|
1487
1486
|
updateChannelDesc(bearerToken: string, channelId: string, body: {}, options?: any): Promise<any>;
|
|
1488
1487
|
/** List channel setting */
|
|
1489
|
-
listChannelSetting(bearerToken: string, clanId: string, parentId?: string, categoryId?: string, privateChannel?: number, active?: number, status?: number, type?: number, limit?: number, page?: number, options?: any): Promise<ApiChannelSettingListResponse>;
|
|
1488
|
+
listChannelSetting(bearerToken: string, clanId: string, parentId?: string, categoryId?: string, privateChannel?: number, active?: number, status?: number, type?: number, limit?: number, page?: number, channelLabel?: string, options?: any): Promise<ApiChannelSettingListResponse>;
|
|
1490
1489
|
/** List all users that are part of a channel. */
|
|
1491
1490
|
listChannelVoiceUsers(bearerToken: string, clanId?: string, channelId?: string, channelType?: number, limit?: number, state?: number, cursor?: string, options?: any): Promise<ApiVoiceChannelUserList>;
|
|
1492
1491
|
/** List clans */
|
package/dist/client.d.ts
CHANGED
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
* See the License for the specific language governing permissions and
|
|
14
14
|
* limitations under the License.
|
|
15
15
|
*/
|
|
16
|
-
import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiUpdateAccountRequest,
|
|
16
|
+
import { ApiAccount, ApiAccountCustom, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiUpdateAccountRequest, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, ApiUpdateEventRequest, ApiLinkInviteUser, ApiInviteUserRes, ApiUploadAttachmentRequest, ApiUploadAttachment, ApiMessageReaction, ApiMessageMention, ApiMessageAttachment, ApiMessageRef, ApiChannelMessageHeader, ApiVoiceChannelUserList, ApiChannelAttachmentList, ApiCreateEventRequest, ApiEventManagement, ApiEventList, ApiDeleteEventRequest, ApiSetDefaultNotificationRequest, ApiSetNotificationRequest, ApiSetMuteNotificationRequest, ApiSearchMessageRequest, ApiSearchMessageResponse, ApiPinMessageRequest, ApiPinMessagesList, ApiDeleteChannelDescRequest, ApiChangeChannelPrivateRequest, ApiClanEmojiCreateRequest, MezonUpdateClanEmojiByIdBody, ApiWebhookCreateRequest, ApiWebhookListResponse, MezonUpdateWebhookByIdBody, ApiWebhookGenerateResponse, ApiCheckDuplicateClanNameResponse, ApiClanStickerAddRequest, MezonUpdateClanStickerByIdBody, MezonChangeChannelCategoryBody, ApiUpdateRoleChannelRequest, ApiAddAppRequest, ApiAppList, ApiApp, MezonUpdateAppBody, ApiSystemMessagesList, ApiSystemMessage, ApiSystemMessageRequest, MezonUpdateSystemMessageBody, ApiUpdateCategoryOrderRequest, ApiGiveCoffeeEvent, ApiListStreamingChannelsResponse, ApiStreamingChannelUserList, ApiRegisterStreamingChannelRequest, ApiRoleList, ApiListChannelAppsResponse, ApiNotificationChannelCategorySettingList, ApiNotificationUserChannel, ApiNotificationSetting, ApiNotifiReactMessage, ApiHashtagDmList, ApiEmojiListedResponse, ApiStickerListedResponse, ApiAllUsersAddChannelResponse, ApiRoleListEventResponse, ApiAllUserClans, ApiUserPermissionInChannelListResponse, ApiPermissionRoleChannelListEventResponse, ApiMarkAsReadRequest, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity } from "./api.gen";
|
|
17
17
|
import { Session } from "./session";
|
|
18
18
|
import { Socket } from "./socket";
|
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
|
@@ -583,7 +583,7 @@ export declare class Client {
|
|
|
583
583
|
/** List Threads. */
|
|
584
584
|
listThreadDescs(session: Session, channelId: string, limit?: number, state?: number, clanId?: string, threadId?: string): Promise<ApiChannelDescList>;
|
|
585
585
|
leaveThread(session: Session, channelId: string): Promise<any>;
|
|
586
|
-
getChannelSettingInClan(session: Session, clanId: string, parentId?: string, categoryId?: string, privateChannel?: number, active?: number, status?: number, type?: number, limit?: number, page?: number): Promise<ApiChannelSettingListResponse>;
|
|
586
|
+
getChannelSettingInClan(session: Session, clanId: string, parentId?: string, categoryId?: string, privateChannel?: number, active?: number, status?: number, type?: number, limit?: number, page?: number, channel_label?: string): Promise<ApiChannelSettingListResponse>;
|
|
587
587
|
getChannelCanvasList(session: Session, channelId: string, clanId?: string, limit?: number, page?: number): Promise<any>;
|
|
588
588
|
getChannelCanvasDetail(session: Session, id: string, clanId?: string, channelId?: string): Promise<any>;
|
|
589
589
|
editChannelCanvases(session: Session, request: ApiEditChannelCanvasRequest): Promise<any>;
|
|
@@ -595,7 +595,6 @@ export declare class Client {
|
|
|
595
595
|
listActivity(session: Session): Promise<ApiListUserActivity>;
|
|
596
596
|
createActiviy(session: Session, request: ApiCreateActivityRequest): Promise<ApiUserActivity>;
|
|
597
597
|
createQRLogin(requet: ApiLoginRequest): Promise<ApiLoginIDResponse>;
|
|
598
|
-
checkLoginRequest(requet: ApiConfirmLoginRequest): Promise<
|
|
598
|
+
checkLoginRequest(requet: ApiConfirmLoginRequest): Promise<Session | null>;
|
|
599
599
|
confirmLogin(session: Session, body: ApiConfirmLoginRequest): Promise<any>;
|
|
600
|
-
getInfoLoginRequest(session: Session, loginId: string): Promise<any>;
|
|
601
600
|
}
|
package/dist/mezon-js.cjs.js
CHANGED
|
@@ -1111,32 +1111,6 @@ var MezonApi = class {
|
|
|
1111
1111
|
)
|
|
1112
1112
|
]);
|
|
1113
1113
|
}
|
|
1114
|
-
/** */
|
|
1115
|
-
getInfoLoginRequest(bearerToken, loginId, options = {}) {
|
|
1116
|
-
const urlPath = "/v2/account/authenticate/getinfologin";
|
|
1117
|
-
const queryParams = /* @__PURE__ */ new Map();
|
|
1118
|
-
queryParams.set("login_id", loginId);
|
|
1119
|
-
let bodyJson = "";
|
|
1120
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
|
1121
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
|
1122
|
-
if (bearerToken) {
|
|
1123
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
|
1124
|
-
}
|
|
1125
|
-
return Promise.race([
|
|
1126
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
|
1127
|
-
if (response.status == 204) {
|
|
1128
|
-
return response;
|
|
1129
|
-
} else if (response.status >= 200 && response.status < 300) {
|
|
1130
|
-
return response.json();
|
|
1131
|
-
} else {
|
|
1132
|
-
throw response;
|
|
1133
|
-
}
|
|
1134
|
-
}),
|
|
1135
|
-
new Promise(
|
|
1136
|
-
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
|
1137
|
-
)
|
|
1138
|
-
]);
|
|
1139
|
-
}
|
|
1140
1114
|
/** Authenticate a user with Google against the server. */
|
|
1141
1115
|
authenticateGoogle(basicAuthUsername, basicAuthPassword, account, create, username, options = {}) {
|
|
1142
1116
|
if (account === null || account === void 0) {
|
|
@@ -2720,7 +2694,7 @@ var MezonApi = class {
|
|
|
2720
2694
|
]);
|
|
2721
2695
|
}
|
|
2722
2696
|
/** List channel setting */
|
|
2723
|
-
listChannelSetting(bearerToken, clanId, parentId, categoryId, privateChannel, active, status, type, limit, page, options = {}) {
|
|
2697
|
+
listChannelSetting(bearerToken, clanId, parentId, categoryId, privateChannel, active, status, type, limit, page, channelLabel, options = {}) {
|
|
2724
2698
|
if (clanId === null || clanId === void 0) {
|
|
2725
2699
|
throw new Error("'clanId' is a required parameter but is null or undefined.");
|
|
2726
2700
|
}
|
|
@@ -2734,6 +2708,7 @@ var MezonApi = class {
|
|
|
2734
2708
|
queryParams.set("type", type);
|
|
2735
2709
|
queryParams.set("limit", limit);
|
|
2736
2710
|
queryParams.set("page", page);
|
|
2711
|
+
queryParams.set("channel_label", channelLabel);
|
|
2737
2712
|
let bodyJson = "";
|
|
2738
2713
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
|
2739
2714
|
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
|
@@ -8954,7 +8929,7 @@ var Client = class {
|
|
|
8954
8929
|
});
|
|
8955
8930
|
});
|
|
8956
8931
|
}
|
|
8957
|
-
getChannelSettingInClan(session, clanId, parentId, categoryId, privateChannel, active, status, type, limit, page) {
|
|
8932
|
+
getChannelSettingInClan(session, clanId, parentId, categoryId, privateChannel, active, status, type, limit, page, channel_label) {
|
|
8958
8933
|
return __async(this, null, function* () {
|
|
8959
8934
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
8960
8935
|
yield this.sessionRefresh(session);
|
|
@@ -8969,7 +8944,8 @@ var Client = class {
|
|
|
8969
8944
|
status,
|
|
8970
8945
|
type,
|
|
8971
8946
|
limit,
|
|
8972
|
-
page
|
|
8947
|
+
page,
|
|
8948
|
+
channel_label
|
|
8973
8949
|
).then((response) => {
|
|
8974
8950
|
return Promise.resolve(response);
|
|
8975
8951
|
});
|
|
@@ -9100,7 +9076,14 @@ var Client = class {
|
|
|
9100
9076
|
"",
|
|
9101
9077
|
requet
|
|
9102
9078
|
);
|
|
9103
|
-
|
|
9079
|
+
if (!(apiSession == null ? void 0 : apiSession.token)) {
|
|
9080
|
+
return null;
|
|
9081
|
+
}
|
|
9082
|
+
return new Session(
|
|
9083
|
+
apiSession.token || "",
|
|
9084
|
+
apiSession.refresh_token || "",
|
|
9085
|
+
apiSession.created || false
|
|
9086
|
+
);
|
|
9104
9087
|
});
|
|
9105
9088
|
}
|
|
9106
9089
|
confirmLogin(session, body) {
|
|
@@ -9113,14 +9096,4 @@ var Client = class {
|
|
|
9113
9096
|
});
|
|
9114
9097
|
});
|
|
9115
9098
|
}
|
|
9116
|
-
getInfoLoginRequest(session, loginId) {
|
|
9117
|
-
return __async(this, null, function* () {
|
|
9118
|
-
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
9119
|
-
yield this.sessionRefresh(session);
|
|
9120
|
-
}
|
|
9121
|
-
return this.apiClient.getInfoLoginRequest(session.token, loginId).then((response) => {
|
|
9122
|
-
return response;
|
|
9123
|
-
});
|
|
9124
|
-
});
|
|
9125
|
-
}
|
|
9126
9099
|
};
|
package/dist/mezon-js.esm.mjs
CHANGED
|
@@ -1082,32 +1082,6 @@ var MezonApi = class {
|
|
|
1082
1082
|
)
|
|
1083
1083
|
]);
|
|
1084
1084
|
}
|
|
1085
|
-
/** */
|
|
1086
|
-
getInfoLoginRequest(bearerToken, loginId, options = {}) {
|
|
1087
|
-
const urlPath = "/v2/account/authenticate/getinfologin";
|
|
1088
|
-
const queryParams = /* @__PURE__ */ new Map();
|
|
1089
|
-
queryParams.set("login_id", loginId);
|
|
1090
|
-
let bodyJson = "";
|
|
1091
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
|
1092
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
|
1093
|
-
if (bearerToken) {
|
|
1094
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
|
1095
|
-
}
|
|
1096
|
-
return Promise.race([
|
|
1097
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
|
1098
|
-
if (response.status == 204) {
|
|
1099
|
-
return response;
|
|
1100
|
-
} else if (response.status >= 200 && response.status < 300) {
|
|
1101
|
-
return response.json();
|
|
1102
|
-
} else {
|
|
1103
|
-
throw response;
|
|
1104
|
-
}
|
|
1105
|
-
}),
|
|
1106
|
-
new Promise(
|
|
1107
|
-
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
|
1108
|
-
)
|
|
1109
|
-
]);
|
|
1110
|
-
}
|
|
1111
1085
|
/** Authenticate a user with Google against the server. */
|
|
1112
1086
|
authenticateGoogle(basicAuthUsername, basicAuthPassword, account, create, username, options = {}) {
|
|
1113
1087
|
if (account === null || account === void 0) {
|
|
@@ -2691,7 +2665,7 @@ var MezonApi = class {
|
|
|
2691
2665
|
]);
|
|
2692
2666
|
}
|
|
2693
2667
|
/** List channel setting */
|
|
2694
|
-
listChannelSetting(bearerToken, clanId, parentId, categoryId, privateChannel, active, status, type, limit, page, options = {}) {
|
|
2668
|
+
listChannelSetting(bearerToken, clanId, parentId, categoryId, privateChannel, active, status, type, limit, page, channelLabel, options = {}) {
|
|
2695
2669
|
if (clanId === null || clanId === void 0) {
|
|
2696
2670
|
throw new Error("'clanId' is a required parameter but is null or undefined.");
|
|
2697
2671
|
}
|
|
@@ -2705,6 +2679,7 @@ var MezonApi = class {
|
|
|
2705
2679
|
queryParams.set("type", type);
|
|
2706
2680
|
queryParams.set("limit", limit);
|
|
2707
2681
|
queryParams.set("page", page);
|
|
2682
|
+
queryParams.set("channel_label", channelLabel);
|
|
2708
2683
|
let bodyJson = "";
|
|
2709
2684
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
|
2710
2685
|
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
|
@@ -8925,7 +8900,7 @@ var Client = class {
|
|
|
8925
8900
|
});
|
|
8926
8901
|
});
|
|
8927
8902
|
}
|
|
8928
|
-
getChannelSettingInClan(session, clanId, parentId, categoryId, privateChannel, active, status, type, limit, page) {
|
|
8903
|
+
getChannelSettingInClan(session, clanId, parentId, categoryId, privateChannel, active, status, type, limit, page, channel_label) {
|
|
8929
8904
|
return __async(this, null, function* () {
|
|
8930
8905
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
8931
8906
|
yield this.sessionRefresh(session);
|
|
@@ -8940,7 +8915,8 @@ var Client = class {
|
|
|
8940
8915
|
status,
|
|
8941
8916
|
type,
|
|
8942
8917
|
limit,
|
|
8943
|
-
page
|
|
8918
|
+
page,
|
|
8919
|
+
channel_label
|
|
8944
8920
|
).then((response) => {
|
|
8945
8921
|
return Promise.resolve(response);
|
|
8946
8922
|
});
|
|
@@ -9071,7 +9047,14 @@ var Client = class {
|
|
|
9071
9047
|
"",
|
|
9072
9048
|
requet
|
|
9073
9049
|
);
|
|
9074
|
-
|
|
9050
|
+
if (!(apiSession == null ? void 0 : apiSession.token)) {
|
|
9051
|
+
return null;
|
|
9052
|
+
}
|
|
9053
|
+
return new Session(
|
|
9054
|
+
apiSession.token || "",
|
|
9055
|
+
apiSession.refresh_token || "",
|
|
9056
|
+
apiSession.created || false
|
|
9057
|
+
);
|
|
9075
9058
|
});
|
|
9076
9059
|
}
|
|
9077
9060
|
confirmLogin(session, body) {
|
|
@@ -9084,16 +9067,6 @@ var Client = class {
|
|
|
9084
9067
|
});
|
|
9085
9068
|
});
|
|
9086
9069
|
}
|
|
9087
|
-
getInfoLoginRequest(session, loginId) {
|
|
9088
|
-
return __async(this, null, function* () {
|
|
9089
|
-
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
9090
|
-
yield this.sessionRefresh(session);
|
|
9091
|
-
}
|
|
9092
|
-
return this.apiClient.getInfoLoginRequest(session.token, loginId).then((response) => {
|
|
9093
|
-
return response;
|
|
9094
|
-
});
|
|
9095
|
-
});
|
|
9096
|
-
}
|
|
9097
9070
|
};
|
|
9098
9071
|
export {
|
|
9099
9072
|
ChannelStreamMode,
|