mezon-js 2.12.69 → 2.12.70
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 +0 -105
- package/client.ts +0 -42
- package/dist/api.gen.d.ts +0 -13
- package/dist/client.d.ts +1 -5
- package/dist/mezon-js.cjs.js +0 -94
- package/dist/mezon-js.esm.mjs +0 -94
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -954,22 +954,6 @@ export interface ApiClanDescList {
|
|
954
954
|
clandesc?: Array<ApiClanDesc>;
|
955
955
|
}
|
956
956
|
|
957
|
-
/** */
|
958
|
-
export interface ApiClanDescProfile {
|
959
|
-
//
|
960
|
-
avatar_url?: string;
|
961
|
-
//
|
962
|
-
clan_id?: string;
|
963
|
-
//
|
964
|
-
creator_id?: string;
|
965
|
-
//
|
966
|
-
nick_name?: string;
|
967
|
-
//
|
968
|
-
profile_banner?: string;
|
969
|
-
//
|
970
|
-
profile_theme?: string;
|
971
|
-
}
|
972
|
-
|
973
957
|
/** */
|
974
958
|
export interface ApiClanEmoji {
|
975
959
|
//
|
@@ -5590,95 +5574,6 @@ export class MezonApi {
|
|
5590
5574
|
]);
|
5591
5575
|
}
|
5592
5576
|
|
5593
|
-
/** Get a clan desc profile */
|
5594
|
-
getClanDescProfile(
|
5595
|
-
bearerToken: string,
|
5596
|
-
clanId: string,
|
5597
|
-
options: any = {}
|
5598
|
-
): Promise<ApiClanDescProfile> {
|
5599
|
-
if (clanId === null || clanId === undefined) {
|
5600
|
-
throw new Error(
|
5601
|
-
"'clanId' is a required parameter but is null or undefined."
|
5602
|
-
);
|
5603
|
-
}
|
5604
|
-
const urlPath = "/v2/clandescprofile/{clanId}".replace(
|
5605
|
-
"{clanId}",
|
5606
|
-
encodeURIComponent(String(clanId))
|
5607
|
-
);
|
5608
|
-
const queryParams = new Map<string, any>();
|
5609
|
-
|
5610
|
-
let bodyJson: string = "";
|
5611
|
-
|
5612
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
5613
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
5614
|
-
if (bearerToken) {
|
5615
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
5616
|
-
}
|
5617
|
-
|
5618
|
-
return Promise.race([
|
5619
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
5620
|
-
if (response.status == 204) {
|
5621
|
-
return response;
|
5622
|
-
} else if (response.status >= 200 && response.status < 300) {
|
5623
|
-
return response.json();
|
5624
|
-
} else {
|
5625
|
-
throw response;
|
5626
|
-
}
|
5627
|
-
}),
|
5628
|
-
new Promise((_, reject) =>
|
5629
|
-
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
5630
|
-
),
|
5631
|
-
]);
|
5632
|
-
}
|
5633
|
-
|
5634
|
-
/** Update fields in a given clan profile. */
|
5635
|
-
updateClanDescProfile(
|
5636
|
-
bearerToken: string,
|
5637
|
-
clanId: string,
|
5638
|
-
body: {},
|
5639
|
-
options: any = {}
|
5640
|
-
): Promise<any> {
|
5641
|
-
if (clanId === null || clanId === undefined) {
|
5642
|
-
throw new Error(
|
5643
|
-
"'clanId' is a required parameter but is null or undefined."
|
5644
|
-
);
|
5645
|
-
}
|
5646
|
-
if (body === null || body === undefined) {
|
5647
|
-
throw new Error(
|
5648
|
-
"'body' is a required parameter but is null or undefined."
|
5649
|
-
);
|
5650
|
-
}
|
5651
|
-
const urlPath = "/v2/clandescprofile/{clanId}".replace(
|
5652
|
-
"{clanId}",
|
5653
|
-
encodeURIComponent(String(clanId))
|
5654
|
-
);
|
5655
|
-
const queryParams = new Map<string, any>();
|
5656
|
-
|
5657
|
-
let bodyJson: string = "";
|
5658
|
-
bodyJson = JSON.stringify(body || {});
|
5659
|
-
|
5660
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
5661
|
-
const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
|
5662
|
-
if (bearerToken) {
|
5663
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
5664
|
-
}
|
5665
|
-
|
5666
|
-
return Promise.race([
|
5667
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
5668
|
-
if (response.status == 204) {
|
5669
|
-
return response;
|
5670
|
-
} else if (response.status >= 200 && response.status < 300) {
|
5671
|
-
return response.json();
|
5672
|
-
} else {
|
5673
|
-
throw response;
|
5674
|
-
}
|
5675
|
-
}),
|
5676
|
-
new Promise((_, reject) =>
|
5677
|
-
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
5678
|
-
),
|
5679
|
-
]);
|
5680
|
-
}
|
5681
|
-
|
5682
5577
|
/** */
|
5683
5578
|
createCategoryDesc(
|
5684
5579
|
bearerToken: string,
|
package/client.ts
CHANGED
@@ -43,7 +43,6 @@ import {
|
|
43
43
|
ApiUsers,
|
44
44
|
MezonApi,
|
45
45
|
ApiSession,
|
46
|
-
ApiClanDescProfile,
|
47
46
|
ApiClanProfile,
|
48
47
|
ApiChannelUserList,
|
49
48
|
ApiClanUserList,
|
@@ -1744,26 +1743,6 @@ export class Client {
|
|
1744
1743
|
});
|
1745
1744
|
}
|
1746
1745
|
|
1747
|
-
/** Get a clan desc profile */
|
1748
|
-
async getClanDescProfile(
|
1749
|
-
session: Session,
|
1750
|
-
clanId: string
|
1751
|
-
): Promise<ApiClanDescProfile> {
|
1752
|
-
if (
|
1753
|
-
this.autoRefreshSession &&
|
1754
|
-
session.refresh_token &&
|
1755
|
-
session.isexpired(Date.now() / 1000)
|
1756
|
-
) {
|
1757
|
-
await this.sessionRefresh(session);
|
1758
|
-
}
|
1759
|
-
|
1760
|
-
return this.apiClient
|
1761
|
-
.getClanDescProfile(session.token, clanId)
|
1762
|
-
.then((response: ApiClanDescProfile) => {
|
1763
|
-
return Promise.resolve(response);
|
1764
|
-
});
|
1765
|
-
}
|
1766
|
-
|
1767
1746
|
async getUserProfileOnClan(
|
1768
1747
|
session: Session,
|
1769
1748
|
clanId: string
|
@@ -2231,27 +2210,6 @@ export class Client {
|
|
2231
2210
|
});
|
2232
2211
|
}
|
2233
2212
|
|
2234
|
-
/** Update fields in a given clan profile. */
|
2235
|
-
async updateClanDescProfile(
|
2236
|
-
session: Session,
|
2237
|
-
clanId: string,
|
2238
|
-
request: ApiUpdateClanDescProfileRequest
|
2239
|
-
): Promise<boolean> {
|
2240
|
-
if (
|
2241
|
-
this.autoRefreshSession &&
|
2242
|
-
session.refresh_token &&
|
2243
|
-
session.isexpired(Date.now() / 1000)
|
2244
|
-
) {
|
2245
|
-
await this.sessionRefresh(session);
|
2246
|
-
}
|
2247
|
-
|
2248
|
-
return this.apiClient
|
2249
|
-
.updateClanDescProfile(session.token, clanId, request)
|
2250
|
-
.then((response: any) => {
|
2251
|
-
return response !== undefined;
|
2252
|
-
});
|
2253
|
-
}
|
2254
|
-
|
2255
2213
|
async updateUserProfileByClan(
|
2256
2214
|
session: Session,
|
2257
2215
|
clanId: string,
|
package/dist/api.gen.d.ts
CHANGED
@@ -541,15 +541,6 @@ export interface ApiClanDescList {
|
|
541
541
|
clandesc?: Array<ApiClanDesc>;
|
542
542
|
}
|
543
543
|
/** */
|
544
|
-
export interface ApiClanDescProfile {
|
545
|
-
avatar_url?: string;
|
546
|
-
clan_id?: string;
|
547
|
-
creator_id?: string;
|
548
|
-
nick_name?: string;
|
549
|
-
profile_banner?: string;
|
550
|
-
profile_theme?: string;
|
551
|
-
}
|
552
|
-
/** */
|
553
544
|
export interface ApiClanEmoji {
|
554
545
|
category?: string;
|
555
546
|
clan_id?: string;
|
@@ -2025,10 +2016,6 @@ export declare class MezonApi {
|
|
2025
2016
|
listClanUsers(bearerToken: string, clanId: string, options?: any): Promise<ApiClanUserList>;
|
2026
2017
|
/** check duplicate clan name */
|
2027
2018
|
checkDuplicateClanName(bearerToken: string, clanName: string, options?: any): Promise<ApiCheckDuplicateClanNameResponse>;
|
2028
|
-
/** Get a clan desc profile */
|
2029
|
-
getClanDescProfile(bearerToken: string, clanId: string, options?: any): Promise<ApiClanDescProfile>;
|
2030
|
-
/** Update fields in a given clan profile. */
|
2031
|
-
updateClanDescProfile(bearerToken: string, clanId: string, body: {}, options?: any): Promise<any>;
|
2032
2019
|
/** */
|
2033
2020
|
createCategoryDesc(bearerToken: string, body: ApiCreateCategoryDescRequest, options?: any): Promise<ApiCategoryDesc>;
|
2034
2021
|
/** */
|
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, ApiAccountEmail, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession,
|
16
|
+
import { ApiAccount, ApiAccountMezon, ApiAccountEmail, ApiChannelDescList, ApiChannelDescription, ApiCreateChannelDescRequest, ApiDeleteRoleRequest, ApiClanDescList, ApiCreateClanDescRequest, ApiClanDesc, ApiCategoryDesc, ApiCategoryDescList, ApiPermissionList, ApiRoleUserList, ApiRole, ApiCreateRoleRequest, ApiAddRoleChannelDescRequest, ApiCreateCategoryDescRequest, ApiUpdateCategoryDescRequest, ApiEvent, ApiNotificationList, ApiUpdateAccountRequest, ApiSession, 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, 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, ApiEmojiRecentList, ApiUserEventRequest, ApiUpdateRoleOrderRequest, ApiGenerateMezonMeetResponse, ApiGenerateMeetTokenExternalResponse, ApiUpdateClanOrderRequest, ApiMessage2InboxRequest, ApiListClanDiscover, ApiClanDiscoverRequest, ApiQuickMenuAccessList, ApiQuickMenuAccessRequest, ApiUnlockedItemRequest, ApiForSaleItemList, ApiUnlockedItemResponse, ApiIsFollowerResponse, ApiIsFollowerRequest, ApiTransferOwnershipRequest } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { Socket } from "./socket";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -427,8 +427,6 @@ export declare class Client {
|
|
427
427
|
/** List user roles */
|
428
428
|
listRoleUsers(session: Session, roleId: string, limit?: number, cursor?: string): Promise<ApiRoleUserList>;
|
429
429
|
registFCMDeviceToken(session: Session, tokenId: string, deviceId: string, platform: string, voipToken?: string): Promise<ApiRegistFcmDeviceTokenResponse>;
|
430
|
-
/** Get a clan desc profile */
|
431
|
-
getClanDescProfile(session: Session, clanId: string): Promise<ApiClanDescProfile>;
|
432
430
|
getUserProfileOnClan(session: Session, clanId: string): Promise<ApiClanProfile>;
|
433
431
|
closeDirectMess(session: Session, request: ApiDeleteChannelDescRequest): Promise<boolean>;
|
434
432
|
openDirectMess(session: Session, request: ApiDeleteChannelDescRequest): Promise<boolean>;
|
@@ -460,8 +458,6 @@ export declare class Client {
|
|
460
458
|
updateClanDesc(session: Session, clanId: string, request: MezonUpdateClanDescBody): Promise<boolean>;
|
461
459
|
/** Update fields in a given category. */
|
462
460
|
updateCategory(session: Session, clanId: string, request: ApiUpdateCategoryDescRequest): Promise<boolean>;
|
463
|
-
/** Update fields in a given clan profile. */
|
464
|
-
updateClanDescProfile(session: Session, clanId: string, request: ApiUpdateClanDescProfileRequest): Promise<boolean>;
|
465
461
|
updateUserProfileByClan(session: Session, clanId: string, request: ApiUpdateClanProfileRequest): Promise<boolean>;
|
466
462
|
/** Update fields in a given role. */
|
467
463
|
updateRole(session: Session, roleId: string, request: ApiUpdateRoleRequest): Promise<boolean>;
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -2492,78 +2492,6 @@ var MezonApi = class {
|
|
2492
2492
|
)
|
2493
2493
|
]);
|
2494
2494
|
}
|
2495
|
-
/** Get a clan desc profile */
|
2496
|
-
getClanDescProfile(bearerToken, clanId, options = {}) {
|
2497
|
-
if (clanId === null || clanId === void 0) {
|
2498
|
-
throw new Error(
|
2499
|
-
"'clanId' is a required parameter but is null or undefined."
|
2500
|
-
);
|
2501
|
-
}
|
2502
|
-
const urlPath = "/v2/clandescprofile/{clanId}".replace(
|
2503
|
-
"{clanId}",
|
2504
|
-
encodeURIComponent(String(clanId))
|
2505
|
-
);
|
2506
|
-
const queryParams = /* @__PURE__ */ new Map();
|
2507
|
-
let bodyJson = "";
|
2508
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
2509
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
2510
|
-
if (bearerToken) {
|
2511
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
2512
|
-
}
|
2513
|
-
return Promise.race([
|
2514
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
2515
|
-
if (response.status == 204) {
|
2516
|
-
return response;
|
2517
|
-
} else if (response.status >= 200 && response.status < 300) {
|
2518
|
-
return response.json();
|
2519
|
-
} else {
|
2520
|
-
throw response;
|
2521
|
-
}
|
2522
|
-
}),
|
2523
|
-
new Promise(
|
2524
|
-
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
2525
|
-
)
|
2526
|
-
]);
|
2527
|
-
}
|
2528
|
-
/** Update fields in a given clan profile. */
|
2529
|
-
updateClanDescProfile(bearerToken, clanId, body, options = {}) {
|
2530
|
-
if (clanId === null || clanId === void 0) {
|
2531
|
-
throw new Error(
|
2532
|
-
"'clanId' is a required parameter but is null or undefined."
|
2533
|
-
);
|
2534
|
-
}
|
2535
|
-
if (body === null || body === void 0) {
|
2536
|
-
throw new Error(
|
2537
|
-
"'body' is a required parameter but is null or undefined."
|
2538
|
-
);
|
2539
|
-
}
|
2540
|
-
const urlPath = "/v2/clandescprofile/{clanId}".replace(
|
2541
|
-
"{clanId}",
|
2542
|
-
encodeURIComponent(String(clanId))
|
2543
|
-
);
|
2544
|
-
const queryParams = /* @__PURE__ */ new Map();
|
2545
|
-
let bodyJson = "";
|
2546
|
-
bodyJson = JSON.stringify(body || {});
|
2547
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
2548
|
-
const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
|
2549
|
-
if (bearerToken) {
|
2550
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
2551
|
-
}
|
2552
|
-
return Promise.race([
|
2553
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
2554
|
-
if (response.status == 204) {
|
2555
|
-
return response;
|
2556
|
-
} else if (response.status >= 200 && response.status < 300) {
|
2557
|
-
return response.json();
|
2558
|
-
} else {
|
2559
|
-
throw response;
|
2560
|
-
}
|
2561
|
-
}),
|
2562
|
-
new Promise(
|
2563
|
-
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
2564
|
-
)
|
2565
|
-
]);
|
2566
|
-
}
|
2567
2495
|
/** */
|
2568
2496
|
createCategoryDesc(bearerToken, body, options = {}) {
|
2569
2497
|
if (body === null || body === void 0) {
|
@@ -8968,17 +8896,6 @@ var Client = class {
|
|
8968
8896
|
});
|
8969
8897
|
});
|
8970
8898
|
}
|
8971
|
-
/** Get a clan desc profile */
|
8972
|
-
getClanDescProfile(session, clanId) {
|
8973
|
-
return __async(this, null, function* () {
|
8974
|
-
if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
|
8975
|
-
yield this.sessionRefresh(session);
|
8976
|
-
}
|
8977
|
-
return this.apiClient.getClanDescProfile(session.token, clanId).then((response) => {
|
8978
|
-
return Promise.resolve(response);
|
8979
|
-
});
|
8980
|
-
});
|
8981
|
-
}
|
8982
8899
|
getUserProfileOnClan(session, clanId) {
|
8983
8900
|
return __async(this, null, function* () {
|
8984
8901
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
|
@@ -9272,17 +9189,6 @@ var Client = class {
|
|
9272
9189
|
});
|
9273
9190
|
});
|
9274
9191
|
}
|
9275
|
-
/** Update fields in a given clan profile. */
|
9276
|
-
updateClanDescProfile(session, clanId, request) {
|
9277
|
-
return __async(this, null, function* () {
|
9278
|
-
if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
|
9279
|
-
yield this.sessionRefresh(session);
|
9280
|
-
}
|
9281
|
-
return this.apiClient.updateClanDescProfile(session.token, clanId, request).then((response) => {
|
9282
|
-
return response !== void 0;
|
9283
|
-
});
|
9284
|
-
});
|
9285
|
-
}
|
9286
9192
|
updateUserProfileByClan(session, clanId, request) {
|
9287
9193
|
return __async(this, null, function* () {
|
9288
9194
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -2458,78 +2458,6 @@ var MezonApi = class {
|
|
2458
2458
|
)
|
2459
2459
|
]);
|
2460
2460
|
}
|
2461
|
-
/** Get a clan desc profile */
|
2462
|
-
getClanDescProfile(bearerToken, clanId, options = {}) {
|
2463
|
-
if (clanId === null || clanId === void 0) {
|
2464
|
-
throw new Error(
|
2465
|
-
"'clanId' is a required parameter but is null or undefined."
|
2466
|
-
);
|
2467
|
-
}
|
2468
|
-
const urlPath = "/v2/clandescprofile/{clanId}".replace(
|
2469
|
-
"{clanId}",
|
2470
|
-
encodeURIComponent(String(clanId))
|
2471
|
-
);
|
2472
|
-
const queryParams = /* @__PURE__ */ new Map();
|
2473
|
-
let bodyJson = "";
|
2474
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
2475
|
-
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
2476
|
-
if (bearerToken) {
|
2477
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
2478
|
-
}
|
2479
|
-
return Promise.race([
|
2480
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
2481
|
-
if (response.status == 204) {
|
2482
|
-
return response;
|
2483
|
-
} else if (response.status >= 200 && response.status < 300) {
|
2484
|
-
return response.json();
|
2485
|
-
} else {
|
2486
|
-
throw response;
|
2487
|
-
}
|
2488
|
-
}),
|
2489
|
-
new Promise(
|
2490
|
-
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
2491
|
-
)
|
2492
|
-
]);
|
2493
|
-
}
|
2494
|
-
/** Update fields in a given clan profile. */
|
2495
|
-
updateClanDescProfile(bearerToken, clanId, body, options = {}) {
|
2496
|
-
if (clanId === null || clanId === void 0) {
|
2497
|
-
throw new Error(
|
2498
|
-
"'clanId' is a required parameter but is null or undefined."
|
2499
|
-
);
|
2500
|
-
}
|
2501
|
-
if (body === null || body === void 0) {
|
2502
|
-
throw new Error(
|
2503
|
-
"'body' is a required parameter but is null or undefined."
|
2504
|
-
);
|
2505
|
-
}
|
2506
|
-
const urlPath = "/v2/clandescprofile/{clanId}".replace(
|
2507
|
-
"{clanId}",
|
2508
|
-
encodeURIComponent(String(clanId))
|
2509
|
-
);
|
2510
|
-
const queryParams = /* @__PURE__ */ new Map();
|
2511
|
-
let bodyJson = "";
|
2512
|
-
bodyJson = JSON.stringify(body || {});
|
2513
|
-
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
2514
|
-
const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
|
2515
|
-
if (bearerToken) {
|
2516
|
-
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
2517
|
-
}
|
2518
|
-
return Promise.race([
|
2519
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
2520
|
-
if (response.status == 204) {
|
2521
|
-
return response;
|
2522
|
-
} else if (response.status >= 200 && response.status < 300) {
|
2523
|
-
return response.json();
|
2524
|
-
} else {
|
2525
|
-
throw response;
|
2526
|
-
}
|
2527
|
-
}),
|
2528
|
-
new Promise(
|
2529
|
-
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
2530
|
-
)
|
2531
|
-
]);
|
2532
|
-
}
|
2533
2461
|
/** */
|
2534
2462
|
createCategoryDesc(bearerToken, body, options = {}) {
|
2535
2463
|
if (body === null || body === void 0) {
|
@@ -8934,17 +8862,6 @@ var Client = class {
|
|
8934
8862
|
});
|
8935
8863
|
});
|
8936
8864
|
}
|
8937
|
-
/** Get a clan desc profile */
|
8938
|
-
getClanDescProfile(session, clanId) {
|
8939
|
-
return __async(this, null, function* () {
|
8940
|
-
if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
|
8941
|
-
yield this.sessionRefresh(session);
|
8942
|
-
}
|
8943
|
-
return this.apiClient.getClanDescProfile(session.token, clanId).then((response) => {
|
8944
|
-
return Promise.resolve(response);
|
8945
|
-
});
|
8946
|
-
});
|
8947
|
-
}
|
8948
8865
|
getUserProfileOnClan(session, clanId) {
|
8949
8866
|
return __async(this, null, function* () {
|
8950
8867
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
|
@@ -9238,17 +9155,6 @@ var Client = class {
|
|
9238
9155
|
});
|
9239
9156
|
});
|
9240
9157
|
}
|
9241
|
-
/** Update fields in a given clan profile. */
|
9242
|
-
updateClanDescProfile(session, clanId, request) {
|
9243
|
-
return __async(this, null, function* () {
|
9244
|
-
if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
|
9245
|
-
yield this.sessionRefresh(session);
|
9246
|
-
}
|
9247
|
-
return this.apiClient.updateClanDescProfile(session.token, clanId, request).then((response) => {
|
9248
|
-
return response !== void 0;
|
9249
|
-
});
|
9250
|
-
});
|
9251
|
-
}
|
9252
9158
|
updateUserProfileByClan(session, clanId, request) {
|
9253
9159
|
return __async(this, null, function* () {
|
9254
9160
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
|