mezon-js 2.11.37 → 2.11.39
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 -15
- package/client.ts +23 -2
- package/dist/api.gen.d.ts +13 -1
- package/dist/client.d.ts +4 -2
- package/dist/mezon-js.cjs.js +43 -8
- package/dist/mezon-js.esm.mjs +43 -8
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -78,6 +78,8 @@ export interface MezonDeleteWebhookByIdBody {
|
|
78
78
|
export interface MezonUpdateAppBody {
|
79
79
|
//about the app.
|
80
80
|
about?: string;
|
81
|
+
//App url.
|
82
|
+
app_url?: string;
|
81
83
|
//Avatar URL.
|
82
84
|
applogo?: string;
|
83
85
|
//Username.
|
@@ -324,6 +326,20 @@ export interface RoleUserListRoleUser {
|
|
324
326
|
username?: string;
|
325
327
|
}
|
326
328
|
|
329
|
+
/** */
|
330
|
+
export interface UpdateClanOrderRequestClanOrder {
|
331
|
+
//
|
332
|
+
clan_id?: string;
|
333
|
+
//
|
334
|
+
order?: number;
|
335
|
+
}
|
336
|
+
|
337
|
+
/** */
|
338
|
+
export interface ApiUpdateClanOrderRequest {
|
339
|
+
//
|
340
|
+
clans_order?: Array<UpdateClanOrderRequestClanOrder>;
|
341
|
+
}
|
342
|
+
|
327
343
|
/** A user with additional account details. Always the current user. */
|
328
344
|
export interface ApiAccount {
|
329
345
|
//The custom id in the user's account.
|
@@ -4894,33 +4910,28 @@ export class MezonApi {
|
|
4894
4910
|
}
|
4895
4911
|
|
4896
4912
|
/** Update one or more fields on a app. */
|
4897
|
-
|
4898
|
-
|
4899
|
-
|
4900
|
-
|
4901
|
-
|
4902
|
-
): Promise<any> {
|
4913
|
+
updateApp(bearerToken: string,
|
4914
|
+
id:string,
|
4915
|
+
body:MezonUpdateAppBody,
|
4916
|
+
options: any = {}): Promise<ApiApp> {
|
4917
|
+
|
4903
4918
|
if (id === null || id === undefined) {
|
4904
4919
|
throw new Error("'id' is a required parameter but is null or undefined.");
|
4905
4920
|
}
|
4906
4921
|
if (body === null || body === undefined) {
|
4907
|
-
throw new Error(
|
4908
|
-
"'body' is a required parameter but is null or undefined."
|
4909
|
-
);
|
4922
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
4910
4923
|
}
|
4911
|
-
const urlPath = "/v2/apps/app/{id}"
|
4912
|
-
|
4913
|
-
encodeURIComponent(String(id))
|
4914
|
-
);
|
4924
|
+
const urlPath = "/v2/apps/app/{id}"
|
4925
|
+
.replace("{id}", encodeURIComponent(String(id)));
|
4915
4926
|
const queryParams = new Map<string, any>();
|
4916
4927
|
|
4917
|
-
let bodyJson: string = "";
|
4928
|
+
let bodyJson : string = "";
|
4918
4929
|
bodyJson = JSON.stringify(body || {});
|
4919
4930
|
|
4920
4931
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
4921
4932
|
const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
|
4922
4933
|
if (bearerToken) {
|
4923
|
-
|
4934
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
4924
4935
|
}
|
4925
4936
|
|
4926
4937
|
return Promise.race([
|
@@ -11649,4 +11660,40 @@ export class MezonApi {
|
|
11649
11660
|
),
|
11650
11661
|
]);
|
11651
11662
|
}
|
11663
|
+
|
11664
|
+
/** */
|
11665
|
+
updateClanOrder(bearerToken: string,
|
11666
|
+
body:ApiUpdateClanOrderRequest,
|
11667
|
+
options: any = {}): Promise<any> {
|
11668
|
+
|
11669
|
+
if (body === null || body === undefined) {
|
11670
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
11671
|
+
}
|
11672
|
+
const urlPath = "/v2/updateclanorder";
|
11673
|
+
const queryParams = new Map<string, any>();
|
11674
|
+
|
11675
|
+
let bodyJson : string = "";
|
11676
|
+
bodyJson = JSON.stringify(body || {});
|
11677
|
+
|
11678
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
11679
|
+
const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
|
11680
|
+
if (bearerToken) {
|
11681
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
11682
|
+
}
|
11683
|
+
|
11684
|
+
return Promise.race([
|
11685
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
11686
|
+
if (response.status == 204) {
|
11687
|
+
return response;
|
11688
|
+
} else if (response.status >= 200 && response.status < 300) {
|
11689
|
+
return response.json();
|
11690
|
+
} else {
|
11691
|
+
throw response;
|
11692
|
+
}
|
11693
|
+
}),
|
11694
|
+
new Promise((_, reject) =>
|
11695
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
11696
|
+
),
|
11697
|
+
]);
|
11698
|
+
}
|
11652
11699
|
}
|
package/client.ts
CHANGED
@@ -169,6 +169,7 @@ import {
|
|
169
169
|
ApiUpdateRoleOrderRequest,
|
170
170
|
ApiGenerateMezonMeetResponse,
|
171
171
|
ApiGenerateMeetTokenExternalResponse,
|
172
|
+
ApiUpdateClanOrderRequest,
|
172
173
|
} from "./api.gen";
|
173
174
|
|
174
175
|
import { Session } from "./session";
|
@@ -2809,7 +2810,7 @@ export class Client {
|
|
2809
2810
|
session: Session,
|
2810
2811
|
roleId: string,
|
2811
2812
|
request: MezonUpdateAppBody
|
2812
|
-
): Promise<
|
2813
|
+
): Promise<ApiApp> {
|
2813
2814
|
if (
|
2814
2815
|
this.autoRefreshSession &&
|
2815
2816
|
session.refresh_token &&
|
@@ -2821,7 +2822,7 @@ export class Client {
|
|
2821
2822
|
return this.apiClient
|
2822
2823
|
.updateApp(session.token, roleId, request)
|
2823
2824
|
.then((response: any) => {
|
2824
|
-
return response
|
2825
|
+
return Promise.resolve(response);
|
2825
2826
|
});
|
2826
2827
|
}
|
2827
2828
|
|
@@ -5211,4 +5212,24 @@ export class Client {
|
|
5211
5212
|
return Promise.resolve(response);
|
5212
5213
|
});
|
5213
5214
|
}
|
5215
|
+
|
5216
|
+
/** Update clan order to view. */
|
5217
|
+
async updateClanOrder(
|
5218
|
+
session: Session,
|
5219
|
+
request: ApiUpdateClanOrderRequest
|
5220
|
+
): Promise<boolean> {
|
5221
|
+
if (
|
5222
|
+
this.autoRefreshSession &&
|
5223
|
+
session.refresh_token &&
|
5224
|
+
session.isexpired(Date.now() / 1000)
|
5225
|
+
) {
|
5226
|
+
await this.sessionRefresh(session);
|
5227
|
+
}
|
5228
|
+
|
5229
|
+
return this.apiClient
|
5230
|
+
.updateClanOrder(session.token, request)
|
5231
|
+
.then((response: any) => {
|
5232
|
+
return response !== undefined;
|
5233
|
+
});
|
5234
|
+
}
|
5214
5235
|
}
|
package/dist/api.gen.d.ts
CHANGED
@@ -43,6 +43,7 @@ export interface MezonDeleteWebhookByIdBody {
|
|
43
43
|
/** Update app information. */
|
44
44
|
export interface MezonUpdateAppBody {
|
45
45
|
about?: string;
|
46
|
+
app_url?: string;
|
46
47
|
applogo?: string;
|
47
48
|
appname?: string;
|
48
49
|
metadata?: string;
|
@@ -185,6 +186,15 @@ export interface RoleUserListRoleUser {
|
|
185
186
|
online?: boolean;
|
186
187
|
username?: string;
|
187
188
|
}
|
189
|
+
/** */
|
190
|
+
export interface UpdateClanOrderRequestClanOrder {
|
191
|
+
clan_id?: string;
|
192
|
+
order?: number;
|
193
|
+
}
|
194
|
+
/** */
|
195
|
+
export interface ApiUpdateClanOrderRequest {
|
196
|
+
clans_order?: Array<UpdateClanOrderRequestClanOrder>;
|
197
|
+
}
|
188
198
|
/** A user with additional account details. Always the current user. */
|
189
199
|
export interface ApiAccount {
|
190
200
|
custom_id?: string;
|
@@ -1922,7 +1932,7 @@ export declare class MezonApi {
|
|
1922
1932
|
/** Get detailed app information. */
|
1923
1933
|
getApp(bearerToken: string, id: string, options?: any): Promise<ApiApp>;
|
1924
1934
|
/** Update one or more fields on a app. */
|
1925
|
-
updateApp(bearerToken: string, id: string, body: MezonUpdateAppBody, options?: any): Promise<
|
1935
|
+
updateApp(bearerToken: string, id: string, body: MezonUpdateAppBody, options?: any): Promise<ApiApp>;
|
1926
1936
|
/** Ban a app. */
|
1927
1937
|
banApp(bearerToken: string, id: string, options?: any): Promise<any>;
|
1928
1938
|
/** Unban an app. */
|
@@ -2258,4 +2268,6 @@ export declare class MezonApi {
|
|
2258
2268
|
generateMeetTokenExternal(bearerToken: string, token: string, displayName?: string, isGuest?: boolean, options?: any): Promise<ApiGenerateMeetTokenExternalResponse>;
|
2259
2269
|
/** List channels detail */
|
2260
2270
|
listChannelDetail(bearerToken: string, channelId: string, options?: any): Promise<ApiChannelDescription>;
|
2271
|
+
/** */
|
2272
|
+
updateClanOrder(bearerToken: string, body: ApiUpdateClanOrderRequest, options?: any): Promise<any>;
|
2261
2273
|
}
|
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, ApiAccountMezon, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, 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, ApiChannelCanvasListResponse, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiWithdrawTokenRequest, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, ApiTransactionDetail, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, MezonapiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse } from "./api.gen";
|
16
|
+
import { ApiAccount, ApiAccountMezon, ApiAccountDevice, ApiAccountEmail, ApiAccountFacebook, ApiAccountFacebookInstantGame, ApiAccountGoogle, ApiAccountGameCenter, ApiAccountSteam, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, ApiAccountApple, ApiLinkSteamRequest, ApiClanDescProfile, ApiClanProfile, ApiChannelUserList, ApiClanUserList, ApiLinkInviteUserRequest, 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, ApiChannelCanvasListResponse, ApiEditChannelCanvasRequest, ApiChannelSettingListResponse, ApiAddFavoriteChannelResponse, ApiRegistFcmDeviceTokenResponse, ApiListUserActivity, ApiCreateActivityRequest, ApiLoginIDResponse, ApiLoginRequest, ApiConfirmLoginRequest, ApiUserActivity, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiWithdrawTokenRequest, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem, ApiGenerateClanWebhookRequest, ApiGenerateClanWebhookResponse, ApiListClanWebhookResponse, MezonUpdateClanWebhookByIdBody, MezonUpdateClanDescBody, ApiUserStatusUpdate, ApiUserStatus, ApiListOnboardingStepResponse, MezonUpdateOnboardingStepByClanIdBody, ApiWalletLedgerList, ApiSdTopicList, ApiSdTopicRequest, ApiSdTopic, MezonUpdateEventBody, ApiTransactionDetail, MezonapiCreateRoomChannelApps, ApiGenerateMeetTokenRequest, ApiGenerateMeetTokenResponse, ApiMezonOauthClientList, ApiMezonOauthClient, ApiCreateHashChannelAppsResponse, MezonapiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { Socket } from "./socket";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -519,7 +519,7 @@ export declare class Client {
|
|
519
519
|
/** Update fields in a given event. */
|
520
520
|
updateEvent(session: Session, roleId: string, request: MezonUpdateEventBody): Promise<boolean>;
|
521
521
|
/** Update fields in a given event. */
|
522
|
-
updateApp(session: Session, roleId: string, request: MezonUpdateAppBody): Promise<
|
522
|
+
updateApp(session: Session, roleId: string, request: MezonUpdateAppBody): Promise<ApiApp>;
|
523
523
|
/** Update fields in a given clan profile. */
|
524
524
|
createLinkInviteUser(session: Session, request: ApiLinkInviteUserRequest): Promise<ApiLinkInviteUser>;
|
525
525
|
/** Get link invite user */
|
@@ -661,4 +661,6 @@ export declare class Client {
|
|
661
661
|
deleteAccount(session: Session): Promise<any>;
|
662
662
|
createExternalMezonMeet(session: Session): Promise<ApiGenerateMezonMeetResponse>;
|
663
663
|
generateMeetTokenExternal(token: string, displayName?: string, isGuest?: boolean): Promise<ApiGenerateMeetTokenExternalResponse>;
|
664
|
+
/** Update clan order to view. */
|
665
|
+
updateClanOrder(session: Session, request: ApiUpdateClanOrderRequest): Promise<boolean>;
|
664
666
|
}
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -2062,14 +2062,9 @@ var MezonApi = class {
|
|
2062
2062
|
throw new Error("'id' is a required parameter but is null or undefined.");
|
2063
2063
|
}
|
2064
2064
|
if (body === null || body === void 0) {
|
2065
|
-
throw new Error(
|
2066
|
-
"'body' is a required parameter but is null or undefined."
|
2067
|
-
);
|
2065
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
2068
2066
|
}
|
2069
|
-
const urlPath = "/v2/apps/app/{id}".replace(
|
2070
|
-
"{id}",
|
2071
|
-
encodeURIComponent(String(id))
|
2072
|
-
);
|
2067
|
+
const urlPath = "/v2/apps/app/{id}".replace("{id}", encodeURIComponent(String(id)));
|
2073
2068
|
const queryParams = /* @__PURE__ */ new Map();
|
2074
2069
|
let bodyJson = "";
|
2075
2070
|
bodyJson = JSON.stringify(body || {});
|
@@ -7336,6 +7331,35 @@ var MezonApi = class {
|
|
7336
7331
|
)
|
7337
7332
|
]);
|
7338
7333
|
}
|
7334
|
+
/** */
|
7335
|
+
updateClanOrder(bearerToken, body, options = {}) {
|
7336
|
+
if (body === null || body === void 0) {
|
7337
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
7338
|
+
}
|
7339
|
+
const urlPath = "/v2/updateclanorder";
|
7340
|
+
const queryParams = /* @__PURE__ */ new Map();
|
7341
|
+
let bodyJson = "";
|
7342
|
+
bodyJson = JSON.stringify(body || {});
|
7343
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
7344
|
+
const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
|
7345
|
+
if (bearerToken) {
|
7346
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
7347
|
+
}
|
7348
|
+
return Promise.race([
|
7349
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
7350
|
+
if (response.status == 204) {
|
7351
|
+
return response;
|
7352
|
+
} else if (response.status >= 200 && response.status < 300) {
|
7353
|
+
return response.json();
|
7354
|
+
} else {
|
7355
|
+
throw response;
|
7356
|
+
}
|
7357
|
+
}),
|
7358
|
+
new Promise(
|
7359
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
7360
|
+
)
|
7361
|
+
]);
|
7362
|
+
}
|
7339
7363
|
};
|
7340
7364
|
|
7341
7365
|
// session.ts
|
@@ -9953,7 +9977,7 @@ var Client = class {
|
|
9953
9977
|
yield this.sessionRefresh(session);
|
9954
9978
|
}
|
9955
9979
|
return this.apiClient.updateApp(session.token, roleId, request).then((response) => {
|
9956
|
-
return response
|
9980
|
+
return Promise.resolve(response);
|
9957
9981
|
});
|
9958
9982
|
});
|
9959
9983
|
}
|
@@ -11294,4 +11318,15 @@ var Client = class {
|
|
11294
11318
|
});
|
11295
11319
|
});
|
11296
11320
|
}
|
11321
|
+
/** Update clan order to view. */
|
11322
|
+
updateClanOrder(session, request) {
|
11323
|
+
return __async(this, null, function* () {
|
11324
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
|
11325
|
+
yield this.sessionRefresh(session);
|
11326
|
+
}
|
11327
|
+
return this.apiClient.updateClanOrder(session.token, request).then((response) => {
|
11328
|
+
return response !== void 0;
|
11329
|
+
});
|
11330
|
+
});
|
11331
|
+
}
|
11297
11332
|
};
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -2028,14 +2028,9 @@ var MezonApi = class {
|
|
2028
2028
|
throw new Error("'id' is a required parameter but is null or undefined.");
|
2029
2029
|
}
|
2030
2030
|
if (body === null || body === void 0) {
|
2031
|
-
throw new Error(
|
2032
|
-
"'body' is a required parameter but is null or undefined."
|
2033
|
-
);
|
2031
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
2034
2032
|
}
|
2035
|
-
const urlPath = "/v2/apps/app/{id}".replace(
|
2036
|
-
"{id}",
|
2037
|
-
encodeURIComponent(String(id))
|
2038
|
-
);
|
2033
|
+
const urlPath = "/v2/apps/app/{id}".replace("{id}", encodeURIComponent(String(id)));
|
2039
2034
|
const queryParams = /* @__PURE__ */ new Map();
|
2040
2035
|
let bodyJson = "";
|
2041
2036
|
bodyJson = JSON.stringify(body || {});
|
@@ -7302,6 +7297,35 @@ var MezonApi = class {
|
|
7302
7297
|
)
|
7303
7298
|
]);
|
7304
7299
|
}
|
7300
|
+
/** */
|
7301
|
+
updateClanOrder(bearerToken, body, options = {}) {
|
7302
|
+
if (body === null || body === void 0) {
|
7303
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
7304
|
+
}
|
7305
|
+
const urlPath = "/v2/updateclanorder";
|
7306
|
+
const queryParams = /* @__PURE__ */ new Map();
|
7307
|
+
let bodyJson = "";
|
7308
|
+
bodyJson = JSON.stringify(body || {});
|
7309
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
7310
|
+
const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
|
7311
|
+
if (bearerToken) {
|
7312
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
7313
|
+
}
|
7314
|
+
return Promise.race([
|
7315
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
7316
|
+
if (response.status == 204) {
|
7317
|
+
return response;
|
7318
|
+
} else if (response.status >= 200 && response.status < 300) {
|
7319
|
+
return response.json();
|
7320
|
+
} else {
|
7321
|
+
throw response;
|
7322
|
+
}
|
7323
|
+
}),
|
7324
|
+
new Promise(
|
7325
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
7326
|
+
)
|
7327
|
+
]);
|
7328
|
+
}
|
7305
7329
|
};
|
7306
7330
|
|
7307
7331
|
// session.ts
|
@@ -9919,7 +9943,7 @@ var Client = class {
|
|
9919
9943
|
yield this.sessionRefresh(session);
|
9920
9944
|
}
|
9921
9945
|
return this.apiClient.updateApp(session.token, roleId, request).then((response) => {
|
9922
|
-
return response
|
9946
|
+
return Promise.resolve(response);
|
9923
9947
|
});
|
9924
9948
|
});
|
9925
9949
|
}
|
@@ -11260,6 +11284,17 @@ var Client = class {
|
|
11260
11284
|
});
|
11261
11285
|
});
|
11262
11286
|
}
|
11287
|
+
/** Update clan order to view. */
|
11288
|
+
updateClanOrder(session, request) {
|
11289
|
+
return __async(this, null, function* () {
|
11290
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
|
11291
|
+
yield this.sessionRefresh(session);
|
11292
|
+
}
|
11293
|
+
return this.apiClient.updateClanOrder(session.token, request).then((response) => {
|
11294
|
+
return response !== void 0;
|
11295
|
+
});
|
11296
|
+
});
|
11297
|
+
}
|
11263
11298
|
};
|
11264
11299
|
export {
|
11265
11300
|
ChannelStreamMode,
|