mezon-js 2.9.67 → 2.9.68
Sign up to get free protection for your applications and to get access to all the features.
- package/api.gen.ts +249 -0
- package/client.ts +105 -0
- package/dist/api.gen.d.ts +42 -0
- package/dist/client.d.ts +6 -1
- package/dist/mezon-js.cjs.js +198 -0
- package/dist/mezon-js.esm.mjs +198 -0
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -2444,6 +2444,63 @@ export interface RpcStatus {
|
|
2444
2444
|
message?: string;
|
2445
2445
|
}
|
2446
2446
|
|
2447
|
+
export interface ApiListOnboardingResponse {
|
2448
|
+
//
|
2449
|
+
list_onboarding?: Array<ApiOnboardingItem>;
|
2450
|
+
}
|
2451
|
+
|
2452
|
+
/** */
|
2453
|
+
export interface MezonUpdateOnboardingBody {
|
2454
|
+
//
|
2455
|
+
answers?: string;
|
2456
|
+
//
|
2457
|
+
channel_id?: string;
|
2458
|
+
//
|
2459
|
+
clan_id?: string;
|
2460
|
+
//
|
2461
|
+
content?: string;
|
2462
|
+
//
|
2463
|
+
task_type?: number;
|
2464
|
+
//
|
2465
|
+
title?: string;
|
2466
|
+
}
|
2467
|
+
|
2468
|
+
/** */
|
2469
|
+
export interface ApiCreateOnboardingRequest {
|
2470
|
+
//
|
2471
|
+
clan_id?: string;
|
2472
|
+
//
|
2473
|
+
content?: string;
|
2474
|
+
//
|
2475
|
+
guide_type?: number;
|
2476
|
+
//
|
2477
|
+
title?: string;
|
2478
|
+
}
|
2479
|
+
|
2480
|
+
/** */
|
2481
|
+
export interface ApiOnboardingItem {
|
2482
|
+
//
|
2483
|
+
answers?: string;
|
2484
|
+
//
|
2485
|
+
channel_id?: string;
|
2486
|
+
//
|
2487
|
+
clan_id?: string;
|
2488
|
+
//
|
2489
|
+
content?: string;
|
2490
|
+
//The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was created.
|
2491
|
+
create_time?: string;
|
2492
|
+
//
|
2493
|
+
guide_type?: number;
|
2494
|
+
//
|
2495
|
+
id?: string;
|
2496
|
+
//
|
2497
|
+
task_type?: number;
|
2498
|
+
//
|
2499
|
+
title?: string;
|
2500
|
+
//The UNIX time (for gRPC clients) or ISO string (for REST clients) when the message was last updated.
|
2501
|
+
update_time?: string;
|
2502
|
+
}
|
2503
|
+
|
2447
2504
|
export class MezonApi {
|
2448
2505
|
constructor(
|
2449
2506
|
readonly serverKey: string,
|
@@ -9598,4 +9655,196 @@ pushPubKey(bearerToken: string,
|
|
9598
9655
|
),
|
9599
9656
|
]);
|
9600
9657
|
}
|
9658
|
+
|
9659
|
+
/** list onboarding. */
|
9660
|
+
listOnboarding(bearerToken: string,
|
9661
|
+
clanId?:string,
|
9662
|
+
guideType?:number,
|
9663
|
+
limit?:number,
|
9664
|
+
page?:number,
|
9665
|
+
options: any = {}): Promise<ApiListOnboardingResponse> {
|
9666
|
+
|
9667
|
+
const urlPath = "/v2/onboarding";
|
9668
|
+
const queryParams = new Map<string, any>();
|
9669
|
+
queryParams.set("clan_id", clanId);
|
9670
|
+
queryParams.set("guide_type", guideType);
|
9671
|
+
queryParams.set("limit", limit);
|
9672
|
+
queryParams.set("page", page);
|
9673
|
+
|
9674
|
+
let bodyJson : string = "";
|
9675
|
+
|
9676
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
9677
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
9678
|
+
if (bearerToken) {
|
9679
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
9680
|
+
}
|
9681
|
+
|
9682
|
+
return Promise.race([
|
9683
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
9684
|
+
if (response.status == 204) {
|
9685
|
+
return response;
|
9686
|
+
} else if (response.status >= 200 && response.status < 300) {
|
9687
|
+
return response.json();
|
9688
|
+
} else {
|
9689
|
+
throw response;
|
9690
|
+
}
|
9691
|
+
}),
|
9692
|
+
new Promise((_, reject) =>
|
9693
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
9694
|
+
),
|
9695
|
+
]);
|
9696
|
+
}
|
9697
|
+
|
9698
|
+
/** create onboarding. */
|
9699
|
+
createOnboarding(bearerToken: string,
|
9700
|
+
body:ApiCreateOnboardingRequest,
|
9701
|
+
options: any = {}): Promise<any> {
|
9702
|
+
|
9703
|
+
if (body === null || body === undefined) {
|
9704
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
9705
|
+
}
|
9706
|
+
const urlPath = "/v2/onboarding";
|
9707
|
+
const queryParams = new Map<string, any>();
|
9708
|
+
|
9709
|
+
let bodyJson : string = "";
|
9710
|
+
bodyJson = JSON.stringify(body || {});
|
9711
|
+
|
9712
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
9713
|
+
const fetchOptions = buildFetchOptions("POST", options, bodyJson);
|
9714
|
+
if (bearerToken) {
|
9715
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
9716
|
+
}
|
9717
|
+
|
9718
|
+
return Promise.race([
|
9719
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
9720
|
+
if (response.status == 204) {
|
9721
|
+
return response;
|
9722
|
+
} else if (response.status >= 200 && response.status < 300) {
|
9723
|
+
return response.json();
|
9724
|
+
} else {
|
9725
|
+
throw response;
|
9726
|
+
}
|
9727
|
+
}),
|
9728
|
+
new Promise((_, reject) =>
|
9729
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
9730
|
+
),
|
9731
|
+
]);
|
9732
|
+
}
|
9733
|
+
|
9734
|
+
/** delete onboarding. */
|
9735
|
+
deleteOnboarding(bearerToken: string,
|
9736
|
+
id:string,
|
9737
|
+
clanId?:string,
|
9738
|
+
options: any = {}): Promise<any> {
|
9739
|
+
|
9740
|
+
if (id === null || id === undefined) {
|
9741
|
+
throw new Error("'id' is a required parameter but is null or undefined.");
|
9742
|
+
}
|
9743
|
+
const urlPath = "/v2/onboarding/{id}"
|
9744
|
+
.replace("{id}", encodeURIComponent(String(id)));
|
9745
|
+
const queryParams = new Map<string, any>();
|
9746
|
+
queryParams.set("clan_id", clanId);
|
9747
|
+
|
9748
|
+
let bodyJson : string = "";
|
9749
|
+
|
9750
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
9751
|
+
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
9752
|
+
if (bearerToken) {
|
9753
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
9754
|
+
}
|
9755
|
+
|
9756
|
+
return Promise.race([
|
9757
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
9758
|
+
if (response.status == 204) {
|
9759
|
+
return response;
|
9760
|
+
} else if (response.status >= 200 && response.status < 300) {
|
9761
|
+
return response.json();
|
9762
|
+
} else {
|
9763
|
+
throw response;
|
9764
|
+
}
|
9765
|
+
}),
|
9766
|
+
new Promise((_, reject) =>
|
9767
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
9768
|
+
),
|
9769
|
+
]);
|
9770
|
+
}
|
9771
|
+
|
9772
|
+
/** get detailed onboarding information. */
|
9773
|
+
getOnboardingDetail(bearerToken: string,
|
9774
|
+
id:string,
|
9775
|
+
clanId?:string,
|
9776
|
+
options: any = {}): Promise<ApiOnboardingItem> {
|
9777
|
+
|
9778
|
+
if (id === null || id === undefined) {
|
9779
|
+
throw new Error("'id' is a required parameter but is null or undefined.");
|
9780
|
+
}
|
9781
|
+
const urlPath = "/v2/onboarding/{id}"
|
9782
|
+
.replace("{id}", encodeURIComponent(String(id)));
|
9783
|
+
const queryParams = new Map<string, any>();
|
9784
|
+
queryParams.set("clan_id", clanId);
|
9785
|
+
|
9786
|
+
let bodyJson : string = "";
|
9787
|
+
|
9788
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
9789
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
9790
|
+
if (bearerToken) {
|
9791
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
9792
|
+
}
|
9793
|
+
|
9794
|
+
return Promise.race([
|
9795
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
9796
|
+
if (response.status == 204) {
|
9797
|
+
return response;
|
9798
|
+
} else if (response.status >= 200 && response.status < 300) {
|
9799
|
+
return response.json();
|
9800
|
+
} else {
|
9801
|
+
throw response;
|
9802
|
+
}
|
9803
|
+
}),
|
9804
|
+
new Promise((_, reject) =>
|
9805
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
9806
|
+
),
|
9807
|
+
]);
|
9808
|
+
}
|
9809
|
+
|
9810
|
+
/** update onboarding. */
|
9811
|
+
updateOnboarding(bearerToken: string,
|
9812
|
+
id:string,
|
9813
|
+
body:MezonUpdateOnboardingBody,
|
9814
|
+
options: any = {}): Promise<any> {
|
9815
|
+
|
9816
|
+
if (id === null || id === undefined) {
|
9817
|
+
throw new Error("'id' is a required parameter but is null or undefined.");
|
9818
|
+
}
|
9819
|
+
if (body === null || body === undefined) {
|
9820
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
9821
|
+
}
|
9822
|
+
const urlPath = "/v2/onboarding/{id}"
|
9823
|
+
.replace("{id}", encodeURIComponent(String(id)));
|
9824
|
+
const queryParams = new Map<string, any>();
|
9825
|
+
|
9826
|
+
let bodyJson : string = "";
|
9827
|
+
bodyJson = JSON.stringify(body || {});
|
9828
|
+
|
9829
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
9830
|
+
const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
|
9831
|
+
if (bearerToken) {
|
9832
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
9833
|
+
}
|
9834
|
+
|
9835
|
+
return Promise.race([
|
9836
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
9837
|
+
if (response.status == 204) {
|
9838
|
+
return response;
|
9839
|
+
} else if (response.status >= 200 && response.status < 300) {
|
9840
|
+
return response.json();
|
9841
|
+
} else {
|
9842
|
+
throw response;
|
9843
|
+
}
|
9844
|
+
}),
|
9845
|
+
new Promise((_, reject) =>
|
9846
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
9847
|
+
),
|
9848
|
+
]);
|
9849
|
+
}
|
9601
9850
|
}
|
package/client.ts
CHANGED
@@ -140,6 +140,10 @@ import {
|
|
140
140
|
ApiTokenSentEvent,
|
141
141
|
MezonDeleteWebhookByIdBody,
|
142
142
|
ApiWithdrawTokenRequest,
|
143
|
+
ApiListOnboardingResponse,
|
144
|
+
ApiCreateOnboardingRequest,
|
145
|
+
MezonUpdateOnboardingBody,
|
146
|
+
ApiOnboardingItem,
|
143
147
|
} from "./api.gen";
|
144
148
|
|
145
149
|
import { Session } from "./session";
|
@@ -4417,4 +4421,105 @@ export class Client {
|
|
4417
4421
|
return response;
|
4418
4422
|
});
|
4419
4423
|
}
|
4424
|
+
|
4425
|
+
async listOnboarding(
|
4426
|
+
session: Session,
|
4427
|
+
clanId?:string,
|
4428
|
+
guideType?:number,
|
4429
|
+
limit?:number,
|
4430
|
+
page?:number,
|
4431
|
+
) : Promise<ApiListOnboardingResponse> {
|
4432
|
+
if (
|
4433
|
+
this.autoRefreshSession &&
|
4434
|
+
session.refresh_token &&
|
4435
|
+
session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
|
4436
|
+
) {
|
4437
|
+
await this.sessionRefresh(session);
|
4438
|
+
}
|
4439
|
+
|
4440
|
+
return this.apiClient
|
4441
|
+
.listOnboarding(session.token, clanId, guideType, limit, page)
|
4442
|
+
.then((response: ApiListOnboardingResponse) => {
|
4443
|
+
return response;
|
4444
|
+
});
|
4445
|
+
}
|
4446
|
+
|
4447
|
+
async getOnboardingDetail(
|
4448
|
+
session: Session,
|
4449
|
+
id: string,
|
4450
|
+
clanId?: string,
|
4451
|
+
): Promise<ApiOnboardingItem> {
|
4452
|
+
if (
|
4453
|
+
this.autoRefreshSession &&
|
4454
|
+
session.refresh_token &&
|
4455
|
+
session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
|
4456
|
+
) {
|
4457
|
+
await this.sessionRefresh(session);
|
4458
|
+
}
|
4459
|
+
|
4460
|
+
return this.apiClient
|
4461
|
+
.getOnboardingDetail(session.token, id, clanId)
|
4462
|
+
.then((response: ApiOnboardingItem) => {
|
4463
|
+
return Promise.resolve(response);
|
4464
|
+
});
|
4465
|
+
}
|
4466
|
+
|
4467
|
+
async createOnboarding(
|
4468
|
+
session: Session,
|
4469
|
+
request: ApiCreateOnboardingRequest
|
4470
|
+
): Promise<any> {
|
4471
|
+
if (
|
4472
|
+
this.autoRefreshSession &&
|
4473
|
+
session.refresh_token &&
|
4474
|
+
session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
|
4475
|
+
) {
|
4476
|
+
await this.sessionRefresh(session);
|
4477
|
+
}
|
4478
|
+
|
4479
|
+
return this.apiClient
|
4480
|
+
.createOnboarding(session.token, request)
|
4481
|
+
.then((response: any) => {
|
4482
|
+
return response;
|
4483
|
+
});
|
4484
|
+
}
|
4485
|
+
|
4486
|
+
async updateOnboarding(
|
4487
|
+
session: Session,
|
4488
|
+
id: string,
|
4489
|
+
request: MezonUpdateOnboardingBody
|
4490
|
+
) {
|
4491
|
+
if (
|
4492
|
+
this.autoRefreshSession &&
|
4493
|
+
session.refresh_token &&
|
4494
|
+
session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
|
4495
|
+
) {
|
4496
|
+
await this.sessionRefresh(session);
|
4497
|
+
}
|
4498
|
+
|
4499
|
+
return this.apiClient
|
4500
|
+
.updateOnboarding(session.token, id, request)
|
4501
|
+
.then((response: any) => {
|
4502
|
+
return response !== undefined;
|
4503
|
+
});
|
4504
|
+
}
|
4505
|
+
|
4506
|
+
async deleteOnboarding(
|
4507
|
+
session: Session,
|
4508
|
+
id:string,
|
4509
|
+
clanId?:string,
|
4510
|
+
): Promise<any> {
|
4511
|
+
if (
|
4512
|
+
this.autoRefreshSession &&
|
4513
|
+
session.refresh_token &&
|
4514
|
+
session.isexpired((Date.now() + this.expiredTimespanMs) / 1000)
|
4515
|
+
) {
|
4516
|
+
await this.sessionRefresh(session);
|
4517
|
+
}
|
4518
|
+
|
4519
|
+
return this.apiClient
|
4520
|
+
.deleteOnboarding(session.token, id, clanId)
|
4521
|
+
.then((response: any) => {
|
4522
|
+
return response !== undefined;
|
4523
|
+
});
|
4524
|
+
}
|
4420
4525
|
}
|
package/dist/api.gen.d.ts
CHANGED
@@ -1422,6 +1422,38 @@ export interface RpcStatus {
|
|
1422
1422
|
details?: Array<ProtobufAny>;
|
1423
1423
|
message?: string;
|
1424
1424
|
}
|
1425
|
+
export interface ApiListOnboardingResponse {
|
1426
|
+
list_onboarding?: Array<ApiOnboardingItem>;
|
1427
|
+
}
|
1428
|
+
/** */
|
1429
|
+
export interface MezonUpdateOnboardingBody {
|
1430
|
+
answers?: string;
|
1431
|
+
channel_id?: string;
|
1432
|
+
clan_id?: string;
|
1433
|
+
content?: string;
|
1434
|
+
task_type?: number;
|
1435
|
+
title?: string;
|
1436
|
+
}
|
1437
|
+
/** */
|
1438
|
+
export interface ApiCreateOnboardingRequest {
|
1439
|
+
clan_id?: string;
|
1440
|
+
content?: string;
|
1441
|
+
guide_type?: number;
|
1442
|
+
title?: string;
|
1443
|
+
}
|
1444
|
+
/** */
|
1445
|
+
export interface ApiOnboardingItem {
|
1446
|
+
answers?: string;
|
1447
|
+
channel_id?: string;
|
1448
|
+
clan_id?: string;
|
1449
|
+
content?: string;
|
1450
|
+
create_time?: string;
|
1451
|
+
guide_type?: number;
|
1452
|
+
id?: string;
|
1453
|
+
task_type?: number;
|
1454
|
+
title?: string;
|
1455
|
+
update_time?: string;
|
1456
|
+
}
|
1425
1457
|
export declare class MezonApi {
|
1426
1458
|
readonly serverKey: string;
|
1427
1459
|
readonly basePath: string;
|
@@ -1786,4 +1818,14 @@ export declare class MezonApi {
|
|
1786
1818
|
getChannelCanvasDetail(bearerToken: string, id: string, clanId?: string, channelId?: string, options?: any): Promise<ApiChannelCanvasDetailResponse>;
|
1787
1819
|
/** */
|
1788
1820
|
deleteChannelCanvas(bearerToken: string, canvasId: string, clanId?: string, channelId?: string, options?: any): Promise<any>;
|
1821
|
+
/** list onboarding. */
|
1822
|
+
listOnboarding(bearerToken: string, clanId?: string, guideType?: number, limit?: number, page?: number, options?: any): Promise<ApiListOnboardingResponse>;
|
1823
|
+
/** create onboarding. */
|
1824
|
+
createOnboarding(bearerToken: string, body: ApiCreateOnboardingRequest, options?: any): Promise<any>;
|
1825
|
+
/** delete onboarding. */
|
1826
|
+
deleteOnboarding(bearerToken: string, id: string, clanId?: string, options?: any): Promise<any>;
|
1827
|
+
/** get detailed onboarding information. */
|
1828
|
+
getOnboardingDetail(bearerToken: string, id: string, clanId?: string, options?: any): Promise<ApiOnboardingItem>;
|
1829
|
+
/** update onboarding. */
|
1830
|
+
updateOnboarding(bearerToken: string, id: string, body: MezonUpdateOnboardingBody, options?: any): Promise<any>;
|
1789
1831
|
}
|
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, 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, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiWithdrawTokenRequest } from "./api.gen";
|
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, ApiChanEncryptionMethod, ApiGetPubKeysResponse, ApiPubKey, ApiGetKeyServerResp, MezonapiListAuditLog, ApiTokenSentEvent, MezonDeleteWebhookByIdBody, ApiWithdrawTokenRequest, ApiListOnboardingResponse, ApiCreateOnboardingRequest, MezonUpdateOnboardingBody, ApiOnboardingItem } from "./api.gen";
|
17
17
|
import { Session } from "./session";
|
18
18
|
import { Socket } from "./socket";
|
19
19
|
import { WebSocketAdapter } from "./web_socket_adapter";
|
@@ -605,4 +605,9 @@ export declare class Client {
|
|
605
605
|
pushPubKey(session: Session, PK: ApiPubKey): Promise<ApiGetPubKeysResponse>;
|
606
606
|
getKeyServer(session: Session): Promise<ApiGetKeyServerResp>;
|
607
607
|
listAuditLog(session: Session, actionLog?: string, userId?: string, clanId?: string, page?: number, pageSize?: number): Promise<MezonapiListAuditLog>;
|
608
|
+
listOnboarding(session: Session, clanId?: string, guideType?: number, limit?: number, page?: number): Promise<ApiListOnboardingResponse>;
|
609
|
+
getOnboardingDetail(session: Session, id: string, clanId?: string): Promise<ApiOnboardingItem>;
|
610
|
+
createOnboarding(session: Session, request: ApiCreateOnboardingRequest): Promise<any>;
|
611
|
+
updateOnboarding(session: Session, id: string, request: MezonUpdateOnboardingBody): Promise<boolean>;
|
612
|
+
deleteOnboarding(session: Session, id: string, clanId?: string): Promise<any>;
|
608
613
|
}
|
package/dist/mezon-js.cjs.js
CHANGED
@@ -6281,6 +6281,154 @@ var MezonApi = class {
|
|
6281
6281
|
)
|
6282
6282
|
]);
|
6283
6283
|
}
|
6284
|
+
/** list onboarding. */
|
6285
|
+
listOnboarding(bearerToken, clanId, guideType, limit, page, options = {}) {
|
6286
|
+
const urlPath = "/v2/onboarding";
|
6287
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6288
|
+
queryParams.set("clan_id", clanId);
|
6289
|
+
queryParams.set("guide_type", guideType);
|
6290
|
+
queryParams.set("limit", limit);
|
6291
|
+
queryParams.set("page", page);
|
6292
|
+
let bodyJson = "";
|
6293
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6294
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
6295
|
+
if (bearerToken) {
|
6296
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6297
|
+
}
|
6298
|
+
return Promise.race([
|
6299
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6300
|
+
if (response.status == 204) {
|
6301
|
+
return response;
|
6302
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6303
|
+
return response.json();
|
6304
|
+
} else {
|
6305
|
+
throw response;
|
6306
|
+
}
|
6307
|
+
}),
|
6308
|
+
new Promise(
|
6309
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6310
|
+
)
|
6311
|
+
]);
|
6312
|
+
}
|
6313
|
+
/** create onboarding. */
|
6314
|
+
createOnboarding(bearerToken, body, options = {}) {
|
6315
|
+
if (body === null || body === void 0) {
|
6316
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
6317
|
+
}
|
6318
|
+
const urlPath = "/v2/onboarding";
|
6319
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6320
|
+
let bodyJson = "";
|
6321
|
+
bodyJson = JSON.stringify(body || {});
|
6322
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6323
|
+
const fetchOptions = buildFetchOptions("POST", options, bodyJson);
|
6324
|
+
if (bearerToken) {
|
6325
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6326
|
+
}
|
6327
|
+
return Promise.race([
|
6328
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6329
|
+
if (response.status == 204) {
|
6330
|
+
return response;
|
6331
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6332
|
+
return response.json();
|
6333
|
+
} else {
|
6334
|
+
throw response;
|
6335
|
+
}
|
6336
|
+
}),
|
6337
|
+
new Promise(
|
6338
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6339
|
+
)
|
6340
|
+
]);
|
6341
|
+
}
|
6342
|
+
/** delete onboarding. */
|
6343
|
+
deleteOnboarding(bearerToken, id, clanId, options = {}) {
|
6344
|
+
if (id === null || id === void 0) {
|
6345
|
+
throw new Error("'id' is a required parameter but is null or undefined.");
|
6346
|
+
}
|
6347
|
+
const urlPath = "/v2/onboarding/{id}".replace("{id}", encodeURIComponent(String(id)));
|
6348
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6349
|
+
queryParams.set("clan_id", clanId);
|
6350
|
+
let bodyJson = "";
|
6351
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6352
|
+
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
6353
|
+
if (bearerToken) {
|
6354
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6355
|
+
}
|
6356
|
+
return Promise.race([
|
6357
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6358
|
+
if (response.status == 204) {
|
6359
|
+
return response;
|
6360
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6361
|
+
return response.json();
|
6362
|
+
} else {
|
6363
|
+
throw response;
|
6364
|
+
}
|
6365
|
+
}),
|
6366
|
+
new Promise(
|
6367
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6368
|
+
)
|
6369
|
+
]);
|
6370
|
+
}
|
6371
|
+
/** get detailed onboarding information. */
|
6372
|
+
getOnboardingDetail(bearerToken, id, clanId, options = {}) {
|
6373
|
+
if (id === null || id === void 0) {
|
6374
|
+
throw new Error("'id' is a required parameter but is null or undefined.");
|
6375
|
+
}
|
6376
|
+
const urlPath = "/v2/onboarding/{id}".replace("{id}", encodeURIComponent(String(id)));
|
6377
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6378
|
+
queryParams.set("clan_id", clanId);
|
6379
|
+
let bodyJson = "";
|
6380
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6381
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
6382
|
+
if (bearerToken) {
|
6383
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6384
|
+
}
|
6385
|
+
return Promise.race([
|
6386
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6387
|
+
if (response.status == 204) {
|
6388
|
+
return response;
|
6389
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6390
|
+
return response.json();
|
6391
|
+
} else {
|
6392
|
+
throw response;
|
6393
|
+
}
|
6394
|
+
}),
|
6395
|
+
new Promise(
|
6396
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6397
|
+
)
|
6398
|
+
]);
|
6399
|
+
}
|
6400
|
+
/** update onboarding. */
|
6401
|
+
updateOnboarding(bearerToken, id, body, options = {}) {
|
6402
|
+
if (id === null || id === void 0) {
|
6403
|
+
throw new Error("'id' is a required parameter but is null or undefined.");
|
6404
|
+
}
|
6405
|
+
if (body === null || body === void 0) {
|
6406
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
6407
|
+
}
|
6408
|
+
const urlPath = "/v2/onboarding/{id}".replace("{id}", encodeURIComponent(String(id)));
|
6409
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6410
|
+
let bodyJson = "";
|
6411
|
+
bodyJson = JSON.stringify(body || {});
|
6412
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6413
|
+
const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
|
6414
|
+
if (bearerToken) {
|
6415
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6416
|
+
}
|
6417
|
+
return Promise.race([
|
6418
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6419
|
+
if (response.status == 204) {
|
6420
|
+
return response;
|
6421
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6422
|
+
return response.json();
|
6423
|
+
} else {
|
6424
|
+
throw response;
|
6425
|
+
}
|
6426
|
+
}),
|
6427
|
+
new Promise(
|
6428
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6429
|
+
)
|
6430
|
+
]);
|
6431
|
+
}
|
6284
6432
|
};
|
6285
6433
|
|
6286
6434
|
// session.ts
|
@@ -9437,4 +9585,54 @@ var Client = class {
|
|
9437
9585
|
});
|
9438
9586
|
});
|
9439
9587
|
}
|
9588
|
+
listOnboarding(session, clanId, guideType, limit, page) {
|
9589
|
+
return __async(this, null, function* () {
|
9590
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9591
|
+
yield this.sessionRefresh(session);
|
9592
|
+
}
|
9593
|
+
return this.apiClient.listOnboarding(session.token, clanId, guideType, limit, page).then((response) => {
|
9594
|
+
return response;
|
9595
|
+
});
|
9596
|
+
});
|
9597
|
+
}
|
9598
|
+
getOnboardingDetail(session, id, clanId) {
|
9599
|
+
return __async(this, null, function* () {
|
9600
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9601
|
+
yield this.sessionRefresh(session);
|
9602
|
+
}
|
9603
|
+
return this.apiClient.getOnboardingDetail(session.token, id, clanId).then((response) => {
|
9604
|
+
return Promise.resolve(response);
|
9605
|
+
});
|
9606
|
+
});
|
9607
|
+
}
|
9608
|
+
createOnboarding(session, request) {
|
9609
|
+
return __async(this, null, function* () {
|
9610
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9611
|
+
yield this.sessionRefresh(session);
|
9612
|
+
}
|
9613
|
+
return this.apiClient.createOnboarding(session.token, request).then((response) => {
|
9614
|
+
return response;
|
9615
|
+
});
|
9616
|
+
});
|
9617
|
+
}
|
9618
|
+
updateOnboarding(session, id, request) {
|
9619
|
+
return __async(this, null, function* () {
|
9620
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9621
|
+
yield this.sessionRefresh(session);
|
9622
|
+
}
|
9623
|
+
return this.apiClient.updateOnboarding(session.token, id, request).then((response) => {
|
9624
|
+
return response !== void 0;
|
9625
|
+
});
|
9626
|
+
});
|
9627
|
+
}
|
9628
|
+
deleteOnboarding(session, id, clanId) {
|
9629
|
+
return __async(this, null, function* () {
|
9630
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9631
|
+
yield this.sessionRefresh(session);
|
9632
|
+
}
|
9633
|
+
return this.apiClient.deleteOnboarding(session.token, id, clanId).then((response) => {
|
9634
|
+
return response !== void 0;
|
9635
|
+
});
|
9636
|
+
});
|
9637
|
+
}
|
9440
9638
|
};
|
package/dist/mezon-js.esm.mjs
CHANGED
@@ -6252,6 +6252,154 @@ var MezonApi = class {
|
|
6252
6252
|
)
|
6253
6253
|
]);
|
6254
6254
|
}
|
6255
|
+
/** list onboarding. */
|
6256
|
+
listOnboarding(bearerToken, clanId, guideType, limit, page, options = {}) {
|
6257
|
+
const urlPath = "/v2/onboarding";
|
6258
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6259
|
+
queryParams.set("clan_id", clanId);
|
6260
|
+
queryParams.set("guide_type", guideType);
|
6261
|
+
queryParams.set("limit", limit);
|
6262
|
+
queryParams.set("page", page);
|
6263
|
+
let bodyJson = "";
|
6264
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6265
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
6266
|
+
if (bearerToken) {
|
6267
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6268
|
+
}
|
6269
|
+
return Promise.race([
|
6270
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6271
|
+
if (response.status == 204) {
|
6272
|
+
return response;
|
6273
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6274
|
+
return response.json();
|
6275
|
+
} else {
|
6276
|
+
throw response;
|
6277
|
+
}
|
6278
|
+
}),
|
6279
|
+
new Promise(
|
6280
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6281
|
+
)
|
6282
|
+
]);
|
6283
|
+
}
|
6284
|
+
/** create onboarding. */
|
6285
|
+
createOnboarding(bearerToken, body, options = {}) {
|
6286
|
+
if (body === null || body === void 0) {
|
6287
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
6288
|
+
}
|
6289
|
+
const urlPath = "/v2/onboarding";
|
6290
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6291
|
+
let bodyJson = "";
|
6292
|
+
bodyJson = JSON.stringify(body || {});
|
6293
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6294
|
+
const fetchOptions = buildFetchOptions("POST", options, bodyJson);
|
6295
|
+
if (bearerToken) {
|
6296
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6297
|
+
}
|
6298
|
+
return Promise.race([
|
6299
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6300
|
+
if (response.status == 204) {
|
6301
|
+
return response;
|
6302
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6303
|
+
return response.json();
|
6304
|
+
} else {
|
6305
|
+
throw response;
|
6306
|
+
}
|
6307
|
+
}),
|
6308
|
+
new Promise(
|
6309
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6310
|
+
)
|
6311
|
+
]);
|
6312
|
+
}
|
6313
|
+
/** delete onboarding. */
|
6314
|
+
deleteOnboarding(bearerToken, id, clanId, options = {}) {
|
6315
|
+
if (id === null || id === void 0) {
|
6316
|
+
throw new Error("'id' is a required parameter but is null or undefined.");
|
6317
|
+
}
|
6318
|
+
const urlPath = "/v2/onboarding/{id}".replace("{id}", encodeURIComponent(String(id)));
|
6319
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6320
|
+
queryParams.set("clan_id", clanId);
|
6321
|
+
let bodyJson = "";
|
6322
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6323
|
+
const fetchOptions = buildFetchOptions("DELETE", options, bodyJson);
|
6324
|
+
if (bearerToken) {
|
6325
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6326
|
+
}
|
6327
|
+
return Promise.race([
|
6328
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6329
|
+
if (response.status == 204) {
|
6330
|
+
return response;
|
6331
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6332
|
+
return response.json();
|
6333
|
+
} else {
|
6334
|
+
throw response;
|
6335
|
+
}
|
6336
|
+
}),
|
6337
|
+
new Promise(
|
6338
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6339
|
+
)
|
6340
|
+
]);
|
6341
|
+
}
|
6342
|
+
/** get detailed onboarding information. */
|
6343
|
+
getOnboardingDetail(bearerToken, id, clanId, options = {}) {
|
6344
|
+
if (id === null || id === void 0) {
|
6345
|
+
throw new Error("'id' is a required parameter but is null or undefined.");
|
6346
|
+
}
|
6347
|
+
const urlPath = "/v2/onboarding/{id}".replace("{id}", encodeURIComponent(String(id)));
|
6348
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6349
|
+
queryParams.set("clan_id", clanId);
|
6350
|
+
let bodyJson = "";
|
6351
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6352
|
+
const fetchOptions = buildFetchOptions("GET", options, bodyJson);
|
6353
|
+
if (bearerToken) {
|
6354
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6355
|
+
}
|
6356
|
+
return Promise.race([
|
6357
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6358
|
+
if (response.status == 204) {
|
6359
|
+
return response;
|
6360
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6361
|
+
return response.json();
|
6362
|
+
} else {
|
6363
|
+
throw response;
|
6364
|
+
}
|
6365
|
+
}),
|
6366
|
+
new Promise(
|
6367
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6368
|
+
)
|
6369
|
+
]);
|
6370
|
+
}
|
6371
|
+
/** update onboarding. */
|
6372
|
+
updateOnboarding(bearerToken, id, body, options = {}) {
|
6373
|
+
if (id === null || id === void 0) {
|
6374
|
+
throw new Error("'id' is a required parameter but is null or undefined.");
|
6375
|
+
}
|
6376
|
+
if (body === null || body === void 0) {
|
6377
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
6378
|
+
}
|
6379
|
+
const urlPath = "/v2/onboarding/{id}".replace("{id}", encodeURIComponent(String(id)));
|
6380
|
+
const queryParams = /* @__PURE__ */ new Map();
|
6381
|
+
let bodyJson = "";
|
6382
|
+
bodyJson = JSON.stringify(body || {});
|
6383
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
6384
|
+
const fetchOptions = buildFetchOptions("PUT", options, bodyJson);
|
6385
|
+
if (bearerToken) {
|
6386
|
+
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
6387
|
+
}
|
6388
|
+
return Promise.race([
|
6389
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
6390
|
+
if (response.status == 204) {
|
6391
|
+
return response;
|
6392
|
+
} else if (response.status >= 200 && response.status < 300) {
|
6393
|
+
return response.json();
|
6394
|
+
} else {
|
6395
|
+
throw response;
|
6396
|
+
}
|
6397
|
+
}),
|
6398
|
+
new Promise(
|
6399
|
+
(_, reject) => setTimeout(reject, this.timeoutMs, "Request timed out.")
|
6400
|
+
)
|
6401
|
+
]);
|
6402
|
+
}
|
6255
6403
|
};
|
6256
6404
|
|
6257
6405
|
// session.ts
|
@@ -9408,6 +9556,56 @@ var Client = class {
|
|
9408
9556
|
});
|
9409
9557
|
});
|
9410
9558
|
}
|
9559
|
+
listOnboarding(session, clanId, guideType, limit, page) {
|
9560
|
+
return __async(this, null, function* () {
|
9561
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9562
|
+
yield this.sessionRefresh(session);
|
9563
|
+
}
|
9564
|
+
return this.apiClient.listOnboarding(session.token, clanId, guideType, limit, page).then((response) => {
|
9565
|
+
return response;
|
9566
|
+
});
|
9567
|
+
});
|
9568
|
+
}
|
9569
|
+
getOnboardingDetail(session, id, clanId) {
|
9570
|
+
return __async(this, null, function* () {
|
9571
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9572
|
+
yield this.sessionRefresh(session);
|
9573
|
+
}
|
9574
|
+
return this.apiClient.getOnboardingDetail(session.token, id, clanId).then((response) => {
|
9575
|
+
return Promise.resolve(response);
|
9576
|
+
});
|
9577
|
+
});
|
9578
|
+
}
|
9579
|
+
createOnboarding(session, request) {
|
9580
|
+
return __async(this, null, function* () {
|
9581
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9582
|
+
yield this.sessionRefresh(session);
|
9583
|
+
}
|
9584
|
+
return this.apiClient.createOnboarding(session.token, request).then((response) => {
|
9585
|
+
return response;
|
9586
|
+
});
|
9587
|
+
});
|
9588
|
+
}
|
9589
|
+
updateOnboarding(session, id, request) {
|
9590
|
+
return __async(this, null, function* () {
|
9591
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9592
|
+
yield this.sessionRefresh(session);
|
9593
|
+
}
|
9594
|
+
return this.apiClient.updateOnboarding(session.token, id, request).then((response) => {
|
9595
|
+
return response !== void 0;
|
9596
|
+
});
|
9597
|
+
});
|
9598
|
+
}
|
9599
|
+
deleteOnboarding(session, id, clanId) {
|
9600
|
+
return __async(this, null, function* () {
|
9601
|
+
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
9602
|
+
yield this.sessionRefresh(session);
|
9603
|
+
}
|
9604
|
+
return this.apiClient.deleteOnboarding(session.token, id, clanId).then((response) => {
|
9605
|
+
return response !== void 0;
|
9606
|
+
});
|
9607
|
+
});
|
9608
|
+
}
|
9411
9609
|
};
|
9412
9610
|
export {
|
9413
9611
|
ChannelStreamMode,
|