mezon-js 2.9.66 → 2.9.68
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 +296 -39
- package/client.ts +109 -3
- package/dist/api.gen.d.ts +48 -4
- package/dist/client.d.ts +8 -3
- package/dist/mezon-js.cjs.js +207 -8
- package/dist/mezon-js.esm.mjs +207 -8
- package/package.json +1 -1
package/api.gen.ts
CHANGED
|
@@ -65,10 +65,6 @@ export interface MezonChangeChannelCategoryBody {
|
|
|
65
65
|
channel_id?: string;
|
|
66
66
|
}
|
|
67
67
|
|
|
68
|
-
/** */
|
|
69
|
-
export interface MezonDeleteWebhookByIdBody {
|
|
70
|
-
}
|
|
71
|
-
|
|
72
68
|
/** */
|
|
73
69
|
export interface MezonSetChanEncryptionMethodBody {
|
|
74
70
|
//
|
|
@@ -76,7 +72,12 @@ export interface MezonSetChanEncryptionMethodBody {
|
|
|
76
72
|
}
|
|
77
73
|
|
|
78
74
|
/** */
|
|
79
|
-
export interface MezonDeleteWebhookByIdBody {
|
|
75
|
+
export interface MezonDeleteWebhookByIdBody {
|
|
76
|
+
//
|
|
77
|
+
channel_id?: string;
|
|
78
|
+
//
|
|
79
|
+
clan_id?: string;
|
|
80
|
+
}
|
|
80
81
|
|
|
81
82
|
/** Update app information. */
|
|
82
83
|
export interface MezonUpdateAppBody {
|
|
@@ -273,6 +274,10 @@ export interface MezonUpdateWebhookByIdBody {
|
|
|
273
274
|
//
|
|
274
275
|
channel_id?: string;
|
|
275
276
|
//
|
|
277
|
+
channel_id_update?: string;
|
|
278
|
+
//
|
|
279
|
+
clan_id?: string;
|
|
280
|
+
//
|
|
276
281
|
webhook_name?: string;
|
|
277
282
|
}
|
|
278
283
|
|
|
@@ -2368,6 +2373,8 @@ export interface ApiWebhookCreateRequest {
|
|
|
2368
2373
|
//
|
|
2369
2374
|
channel_id?: string;
|
|
2370
2375
|
//
|
|
2376
|
+
clan_id?: string;
|
|
2377
|
+
//
|
|
2371
2378
|
webhook_name?: string;
|
|
2372
2379
|
}
|
|
2373
2380
|
|
|
@@ -2437,6 +2444,63 @@ export interface RpcStatus {
|
|
|
2437
2444
|
message?: string;
|
|
2438
2445
|
}
|
|
2439
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
|
+
|
|
2440
2504
|
export class MezonApi {
|
|
2441
2505
|
constructor(
|
|
2442
2506
|
readonly serverKey: string,
|
|
@@ -9365,45 +9429,46 @@ pushPubKey(bearerToken: string,
|
|
|
9365
9429
|
}
|
|
9366
9430
|
|
|
9367
9431
|
/** disabled webhook */
|
|
9368
|
-
deleteWebhookById(
|
|
9369
|
-
|
|
9370
|
-
|
|
9371
|
-
options: any = {}
|
|
9372
|
-
|
|
9373
|
-
|
|
9374
|
-
|
|
9375
|
-
|
|
9376
|
-
|
|
9377
|
-
|
|
9378
|
-
|
|
9379
|
-
|
|
9380
|
-
|
|
9381
|
-
|
|
9432
|
+
deleteWebhookById(bearerToken: string,
|
|
9433
|
+
id:string,
|
|
9434
|
+
body:MezonDeleteWebhookByIdBody,
|
|
9435
|
+
options: any = {}): Promise<any> {
|
|
9436
|
+
|
|
9437
|
+
if (id === null || id === undefined) {
|
|
9438
|
+
throw new Error("'id' is a required parameter but is null or undefined.");
|
|
9439
|
+
}
|
|
9440
|
+
if (body === null || body === undefined) {
|
|
9441
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
|
9442
|
+
}
|
|
9443
|
+
const urlPath = "/v2/webhooks/{id}"
|
|
9444
|
+
.replace("{id}", encodeURIComponent(String(id)));
|
|
9445
|
+
const queryParams = new Map<string, any>();
|
|
9382
9446
|
|
|
9383
|
-
|
|
9447
|
+
let bodyJson : string = "";
|
|
9448
|
+
bodyJson = JSON.stringify(body || {});
|
|
9384
9449
|
|
|
9385
|
-
|
|
9386
|
-
|
|
9387
|
-
|
|
9450
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
|
9451
|
+
const fetchOptions = buildFetchOptions("PATCH", options, bodyJson);
|
|
9452
|
+
if (bearerToken) {
|
|
9388
9453
|
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
|
9389
|
-
}
|
|
9390
|
-
|
|
9391
|
-
return Promise.race([
|
|
9392
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
|
9393
|
-
if (response.status == 204) {
|
|
9394
|
-
return response;
|
|
9395
|
-
} else if (response.status >= 200 && response.status < 300) {
|
|
9396
|
-
return response.json();
|
|
9397
|
-
} else {
|
|
9398
|
-
throw response;
|
|
9399
|
-
}
|
|
9400
|
-
}),
|
|
9401
|
-
new Promise((_, reject) =>
|
|
9402
|
-
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
|
9403
|
-
),
|
|
9404
|
-
]);
|
|
9405
9454
|
}
|
|
9406
9455
|
|
|
9456
|
+
return Promise.race([
|
|
9457
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
|
9458
|
+
if (response.status == 204) {
|
|
9459
|
+
return response;
|
|
9460
|
+
} else if (response.status >= 200 && response.status < 300) {
|
|
9461
|
+
return response.json();
|
|
9462
|
+
} else {
|
|
9463
|
+
throw response;
|
|
9464
|
+
}
|
|
9465
|
+
}),
|
|
9466
|
+
new Promise((_, reject) =>
|
|
9467
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
|
9468
|
+
),
|
|
9469
|
+
]);
|
|
9470
|
+
}
|
|
9471
|
+
|
|
9407
9472
|
buildFullUrl(
|
|
9408
9473
|
basePath: string,
|
|
9409
9474
|
fragment: string,
|
|
@@ -9590,4 +9655,196 @@ pushPubKey(bearerToken: string,
|
|
|
9590
9655
|
),
|
|
9591
9656
|
]);
|
|
9592
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
|
+
}
|
|
9593
9850
|
}
|
package/client.ts
CHANGED
|
@@ -138,7 +138,12 @@ import {
|
|
|
138
138
|
ApiGetKeyServerResp,
|
|
139
139
|
MezonapiListAuditLog,
|
|
140
140
|
ApiTokenSentEvent,
|
|
141
|
+
MezonDeleteWebhookByIdBody,
|
|
141
142
|
ApiWithdrawTokenRequest,
|
|
143
|
+
ApiListOnboardingResponse,
|
|
144
|
+
ApiCreateOnboardingRequest,
|
|
145
|
+
MezonUpdateOnboardingBody,
|
|
146
|
+
ApiOnboardingItem,
|
|
142
147
|
} from "./api.gen";
|
|
143
148
|
|
|
144
149
|
import { Session } from "./session";
|
|
@@ -3181,7 +3186,7 @@ export class Client {
|
|
|
3181
3186
|
}
|
|
3182
3187
|
|
|
3183
3188
|
//**disabled webhook by id */
|
|
3184
|
-
async deleteWebhookById(session: Session, id: string) {
|
|
3189
|
+
async deleteWebhookById(session: Session, id: string, request: MezonDeleteWebhookByIdBody) {
|
|
3185
3190
|
if (
|
|
3186
3191
|
this.autoRefreshSession &&
|
|
3187
3192
|
session.refresh_token &&
|
|
@@ -3191,7 +3196,7 @@ export class Client {
|
|
|
3191
3196
|
}
|
|
3192
3197
|
|
|
3193
3198
|
return this.apiClient
|
|
3194
|
-
.deleteWebhookById(session.token, id)
|
|
3199
|
+
.deleteWebhookById(session.token, id, request)
|
|
3195
3200
|
.then((response: any) => {
|
|
3196
3201
|
return response !== undefined;
|
|
3197
3202
|
});
|
|
@@ -3518,7 +3523,7 @@ export class Client {
|
|
|
3518
3523
|
});
|
|
3519
3524
|
}
|
|
3520
3525
|
|
|
3521
|
-
async
|
|
3526
|
+
async sendToken(session: Session, request: ApiTokenSentEvent) {
|
|
3522
3527
|
if (
|
|
3523
3528
|
this.autoRefreshSession &&
|
|
3524
3529
|
session.refresh_token &&
|
|
@@ -4416,4 +4421,105 @@ export class Client {
|
|
|
4416
4421
|
return response;
|
|
4417
4422
|
});
|
|
4418
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
|
+
}
|
|
4419
4525
|
}
|
package/dist/api.gen.d.ts
CHANGED
|
@@ -35,14 +35,13 @@ export interface MezonChangeChannelCategoryBody {
|
|
|
35
35
|
channel_id?: string;
|
|
36
36
|
}
|
|
37
37
|
/** */
|
|
38
|
-
export interface MezonDeleteWebhookByIdBody {
|
|
39
|
-
}
|
|
40
|
-
/** */
|
|
41
38
|
export interface MezonSetChanEncryptionMethodBody {
|
|
42
39
|
method?: string;
|
|
43
40
|
}
|
|
44
41
|
/** */
|
|
45
42
|
export interface MezonDeleteWebhookByIdBody {
|
|
43
|
+
channel_id?: string;
|
|
44
|
+
clan_id?: string;
|
|
46
45
|
}
|
|
47
46
|
/** Update app information. */
|
|
48
47
|
export interface MezonUpdateAppBody {
|
|
@@ -160,6 +159,8 @@ export interface MezonUpdateUserProfileByClanBody {
|
|
|
160
159
|
export interface MezonUpdateWebhookByIdBody {
|
|
161
160
|
avatar?: string;
|
|
162
161
|
channel_id?: string;
|
|
162
|
+
channel_id_update?: string;
|
|
163
|
+
clan_id?: string;
|
|
163
164
|
webhook_name?: string;
|
|
164
165
|
}
|
|
165
166
|
/** A single user-role pair. */
|
|
@@ -1378,6 +1379,7 @@ export interface ApiWebhook {
|
|
|
1378
1379
|
export interface ApiWebhookCreateRequest {
|
|
1379
1380
|
avatar?: string;
|
|
1380
1381
|
channel_id?: string;
|
|
1382
|
+
clan_id?: string;
|
|
1381
1383
|
webhook_name?: string;
|
|
1382
1384
|
}
|
|
1383
1385
|
/** */
|
|
@@ -1420,6 +1422,38 @@ export interface RpcStatus {
|
|
|
1420
1422
|
details?: Array<ProtobufAny>;
|
|
1421
1423
|
message?: string;
|
|
1422
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
|
+
}
|
|
1423
1457
|
export declare class MezonApi {
|
|
1424
1458
|
readonly serverKey: string;
|
|
1425
1459
|
readonly basePath: string;
|
|
@@ -1774,7 +1808,7 @@ export declare class MezonApi {
|
|
|
1774
1808
|
/** list webhook belong to the channel */
|
|
1775
1809
|
listWebhookByChannelId(bearerToken: string, channelId: string, clanId?: string, options?: any): Promise<ApiWebhookListResponse>;
|
|
1776
1810
|
/** disabled webhook */
|
|
1777
|
-
deleteWebhookById(bearerToken: string, id: string, options?: any): Promise<any>;
|
|
1811
|
+
deleteWebhookById(bearerToken: string, id: string, body: MezonDeleteWebhookByIdBody, options?: any): Promise<any>;
|
|
1778
1812
|
buildFullUrl(basePath: string, fragment: string, queryParams: Map<string, any>): string;
|
|
1779
1813
|
/** Channel canvas editor */
|
|
1780
1814
|
editChannelCanvases(bearerToken: string, body: ApiEditChannelCanvasRequest, options?: any): Promise<ApiEditChannelCanvasResponse>;
|
|
@@ -1784,4 +1818,14 @@ export declare class MezonApi {
|
|
|
1784
1818
|
getChannelCanvasDetail(bearerToken: string, id: string, clanId?: string, channelId?: string, options?: any): Promise<ApiChannelCanvasDetailResponse>;
|
|
1785
1819
|
/** */
|
|
1786
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>;
|
|
1787
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, 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";
|
|
@@ -539,7 +539,7 @@ export declare class Client {
|
|
|
539
539
|
generateWebhookLink(session: Session, request: ApiWebhookCreateRequest): Promise<ApiWebhookGenerateResponse>;
|
|
540
540
|
listWebhookByChannelId(session: Session, channel_id: string, clan_id: string): Promise<ApiWebhookListResponse>;
|
|
541
541
|
updateWebhookById(session: Session, id: string, request: MezonUpdateWebhookByIdBody): Promise<boolean>;
|
|
542
|
-
deleteWebhookById(session: Session, id: string): Promise<boolean>;
|
|
542
|
+
deleteWebhookById(session: Session, id: string, request: MezonDeleteWebhookByIdBody): Promise<boolean>;
|
|
543
543
|
checkDuplicateClanName(session: Session, clan_name: string): Promise<ApiCheckDuplicateClanNameResponse>;
|
|
544
544
|
addClanSticker(session: Session, request: ApiClanStickerAddRequest): Promise<boolean>;
|
|
545
545
|
deleteClanStickerById(session: Session, id: string, clan_id: string): Promise<boolean>;
|
|
@@ -559,7 +559,7 @@ export declare class Client {
|
|
|
559
559
|
updateCategoryOrder(session: Session, request: ApiUpdateCategoryOrderRequest): Promise<any>;
|
|
560
560
|
deleteCategoryOrder(session: Session, clanId: string): Promise<any>;
|
|
561
561
|
givecoffee(session: Session, request: ApiGiveCoffeeEvent): Promise<boolean>;
|
|
562
|
-
|
|
562
|
+
sendToken(session: Session, request: ApiTokenSentEvent): Promise<ApiTokenSentEvent>;
|
|
563
563
|
withdrawToken(session: Session, request: ApiWithdrawTokenRequest): Promise<ApiTokenSentEvent>;
|
|
564
564
|
listStreamingChannels(session: Session, clanId: string): Promise<ApiListStreamingChannelsResponse>;
|
|
565
565
|
/** List a channel's users. */
|
|
@@ -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
|
@@ -6107,16 +6107,17 @@ var MezonApi = class {
|
|
|
6107
6107
|
]);
|
|
6108
6108
|
}
|
|
6109
6109
|
/** disabled webhook */
|
|
6110
|
-
deleteWebhookById(bearerToken, id, options = {}) {
|
|
6110
|
+
deleteWebhookById(bearerToken, id, body, options = {}) {
|
|
6111
6111
|
if (id === null || id === void 0) {
|
|
6112
6112
|
throw new Error("'id' is a required parameter but is null or undefined.");
|
|
6113
6113
|
}
|
|
6114
|
-
|
|
6115
|
-
"
|
|
6116
|
-
|
|
6117
|
-
);
|
|
6114
|
+
if (body === null || body === void 0) {
|
|
6115
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
|
6116
|
+
}
|
|
6117
|
+
const urlPath = "/v2/webhooks/{id}".replace("{id}", encodeURIComponent(String(id)));
|
|
6118
6118
|
const queryParams = /* @__PURE__ */ new Map();
|
|
6119
6119
|
let bodyJson = "";
|
|
6120
|
+
bodyJson = JSON.stringify(body || {});
|
|
6120
6121
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
|
6121
6122
|
const fetchOptions = buildFetchOptions("PATCH", options, bodyJson);
|
|
6122
6123
|
if (bearerToken) {
|
|
@@ -6280,6 +6281,154 @@ var MezonApi = class {
|
|
|
6280
6281
|
)
|
|
6281
6282
|
]);
|
|
6282
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
|
+
}
|
|
6283
6432
|
};
|
|
6284
6433
|
|
|
6285
6434
|
// session.ts
|
|
@@ -8721,12 +8870,12 @@ var Client = class {
|
|
|
8721
8870
|
});
|
|
8722
8871
|
}
|
|
8723
8872
|
//**disabled webhook by id */
|
|
8724
|
-
deleteWebhookById(session, id) {
|
|
8873
|
+
deleteWebhookById(session, id, request) {
|
|
8725
8874
|
return __async(this, null, function* () {
|
|
8726
8875
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
8727
8876
|
yield this.sessionRefresh(session);
|
|
8728
8877
|
}
|
|
8729
|
-
return this.apiClient.deleteWebhookById(session.token, id).then((response) => {
|
|
8878
|
+
return this.apiClient.deleteWebhookById(session.token, id, request).then((response) => {
|
|
8730
8879
|
return response !== void 0;
|
|
8731
8880
|
});
|
|
8732
8881
|
});
|
|
@@ -8917,7 +9066,7 @@ var Client = class {
|
|
|
8917
9066
|
});
|
|
8918
9067
|
});
|
|
8919
9068
|
}
|
|
8920
|
-
|
|
9069
|
+
sendToken(session, request) {
|
|
8921
9070
|
return __async(this, null, function* () {
|
|
8922
9071
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
8923
9072
|
yield this.sessionRefresh(session);
|
|
@@ -9436,4 +9585,54 @@ var Client = class {
|
|
|
9436
9585
|
});
|
|
9437
9586
|
});
|
|
9438
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
|
+
}
|
|
9439
9638
|
};
|
package/dist/mezon-js.esm.mjs
CHANGED
|
@@ -6078,16 +6078,17 @@ var MezonApi = class {
|
|
|
6078
6078
|
]);
|
|
6079
6079
|
}
|
|
6080
6080
|
/** disabled webhook */
|
|
6081
|
-
deleteWebhookById(bearerToken, id, options = {}) {
|
|
6081
|
+
deleteWebhookById(bearerToken, id, body, options = {}) {
|
|
6082
6082
|
if (id === null || id === void 0) {
|
|
6083
6083
|
throw new Error("'id' is a required parameter but is null or undefined.");
|
|
6084
6084
|
}
|
|
6085
|
-
|
|
6086
|
-
"
|
|
6087
|
-
|
|
6088
|
-
);
|
|
6085
|
+
if (body === null || body === void 0) {
|
|
6086
|
+
throw new Error("'body' is a required parameter but is null or undefined.");
|
|
6087
|
+
}
|
|
6088
|
+
const urlPath = "/v2/webhooks/{id}".replace("{id}", encodeURIComponent(String(id)));
|
|
6089
6089
|
const queryParams = /* @__PURE__ */ new Map();
|
|
6090
6090
|
let bodyJson = "";
|
|
6091
|
+
bodyJson = JSON.stringify(body || {});
|
|
6091
6092
|
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
|
6092
6093
|
const fetchOptions = buildFetchOptions("PATCH", options, bodyJson);
|
|
6093
6094
|
if (bearerToken) {
|
|
@@ -6251,6 +6252,154 @@ var MezonApi = class {
|
|
|
6251
6252
|
)
|
|
6252
6253
|
]);
|
|
6253
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
|
+
}
|
|
6254
6403
|
};
|
|
6255
6404
|
|
|
6256
6405
|
// session.ts
|
|
@@ -8692,12 +8841,12 @@ var Client = class {
|
|
|
8692
8841
|
});
|
|
8693
8842
|
}
|
|
8694
8843
|
//**disabled webhook by id */
|
|
8695
|
-
deleteWebhookById(session, id) {
|
|
8844
|
+
deleteWebhookById(session, id, request) {
|
|
8696
8845
|
return __async(this, null, function* () {
|
|
8697
8846
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
8698
8847
|
yield this.sessionRefresh(session);
|
|
8699
8848
|
}
|
|
8700
|
-
return this.apiClient.deleteWebhookById(session.token, id).then((response) => {
|
|
8849
|
+
return this.apiClient.deleteWebhookById(session.token, id, request).then((response) => {
|
|
8701
8850
|
return response !== void 0;
|
|
8702
8851
|
});
|
|
8703
8852
|
});
|
|
@@ -8888,7 +9037,7 @@ var Client = class {
|
|
|
8888
9037
|
});
|
|
8889
9038
|
});
|
|
8890
9039
|
}
|
|
8891
|
-
|
|
9040
|
+
sendToken(session, request) {
|
|
8892
9041
|
return __async(this, null, function* () {
|
|
8893
9042
|
if (this.autoRefreshSession && session.refresh_token && session.isexpired((Date.now() + this.expiredTimespanMs) / 1e3)) {
|
|
8894
9043
|
yield this.sessionRefresh(session);
|
|
@@ -9407,6 +9556,56 @@ var Client = class {
|
|
|
9407
9556
|
});
|
|
9408
9557
|
});
|
|
9409
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
|
+
}
|
|
9410
9609
|
};
|
|
9411
9610
|
export {
|
|
9412
9611
|
ChannelStreamMode,
|