mezon-js 2.10.46 → 2.10.48
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 +35 -30
- package/client.ts +2 -2
- package/dist/api.gen.d.ts +1 -1
- package/dist/client.d.ts +1 -1
- package/package.json +1 -1
package/api.gen.ts
CHANGED
@@ -619,6 +619,10 @@ export interface ApiChannelAttachment {
|
|
619
619
|
url?: string;
|
620
620
|
//message id.
|
621
621
|
message_id?: string;
|
622
|
+
//message id.
|
623
|
+
width?: number;
|
624
|
+
//message id.
|
625
|
+
hight?: number;
|
622
626
|
}
|
623
627
|
|
624
628
|
/** */
|
@@ -10313,45 +10317,46 @@ export class MezonApi {
|
|
10313
10317
|
]);
|
10314
10318
|
}
|
10315
10319
|
|
10316
|
-
|
10317
|
-
|
10318
|
-
|
10319
|
-
|
10320
|
-
|
10321
|
-
|
10322
|
-
|
10320
|
+
/** create onboarding. */
|
10321
|
+
createOnboarding(
|
10322
|
+
bearerToken: string,
|
10323
|
+
body: ApiCreateOnboardingRequest,
|
10324
|
+
options: any = {}
|
10325
|
+
): Promise<ApiListOnboardingResponse> {
|
10326
|
+
|
10327
|
+
if (body === null || body === undefined) {
|
10323
10328
|
throw new Error(
|
10324
10329
|
"'body' is a required parameter but is null or undefined."
|
10325
10330
|
);
|
10326
|
-
|
10327
|
-
|
10328
|
-
|
10331
|
+
}
|
10332
|
+
const urlPath = "/v2/onboarding";
|
10333
|
+
const queryParams = new Map<string, any>();
|
10329
10334
|
|
10330
10335
|
let bodyJson: string = "";
|
10331
|
-
|
10336
|
+
bodyJson = JSON.stringify(body || {});
|
10332
10337
|
|
10333
|
-
|
10334
|
-
|
10335
|
-
|
10338
|
+
const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
|
10339
|
+
const fetchOptions = buildFetchOptions("POST", options, bodyJson);
|
10340
|
+
if (bearerToken) {
|
10336
10341
|
fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
|
10337
|
-
}
|
10338
|
-
|
10339
|
-
return Promise.race([
|
10340
|
-
fetch(fullUrl, fetchOptions).then((response) => {
|
10341
|
-
if (response.status == 204) {
|
10342
|
-
return response;
|
10343
|
-
} else if (response.status >= 200 && response.status < 300) {
|
10344
|
-
return response.json();
|
10345
|
-
} else {
|
10346
|
-
throw response;
|
10347
|
-
}
|
10348
|
-
}),
|
10349
|
-
new Promise((_, reject) =>
|
10350
|
-
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
10351
|
-
),
|
10352
|
-
]);
|
10353
10342
|
}
|
10354
10343
|
|
10344
|
+
return Promise.race([
|
10345
|
+
fetch(fullUrl, fetchOptions).then((response) => {
|
10346
|
+
if (response.status == 204) {
|
10347
|
+
return response;
|
10348
|
+
} else if (response.status >= 200 && response.status < 300) {
|
10349
|
+
return response.json();
|
10350
|
+
} else {
|
10351
|
+
throw response;
|
10352
|
+
}
|
10353
|
+
}),
|
10354
|
+
new Promise((_, reject) =>
|
10355
|
+
setTimeout(reject, this.timeoutMs, "Request timed out.")
|
10356
|
+
),
|
10357
|
+
]);
|
10358
|
+
}
|
10359
|
+
|
10355
10360
|
/** delete onboarding. */
|
10356
10361
|
deleteOnboarding(
|
10357
10362
|
bearerToken: string,
|
package/client.ts
CHANGED
@@ -4532,7 +4532,7 @@ export class Client {
|
|
4532
4532
|
async createOnboarding(
|
4533
4533
|
session: Session,
|
4534
4534
|
request: ApiCreateOnboardingRequest
|
4535
|
-
): Promise<
|
4535
|
+
): Promise<ApiListOnboardingResponse> {
|
4536
4536
|
if (
|
4537
4537
|
this.autoRefreshSession &&
|
4538
4538
|
session.refresh_token &&
|
@@ -4543,7 +4543,7 @@ export class Client {
|
|
4543
4543
|
|
4544
4544
|
return this.apiClient
|
4545
4545
|
.createOnboarding(session.token, request)
|
4546
|
-
.then((response:
|
4546
|
+
.then((response: ApiListOnboardingResponse) => {
|
4547
4547
|
return response;
|
4548
4548
|
});
|
4549
4549
|
}
|
package/dist/api.gen.d.ts
CHANGED
@@ -1996,7 +1996,7 @@ export declare class MezonApi {
|
|
1996
1996
|
/** list onboarding. */
|
1997
1997
|
listOnboarding(bearerToken: string, clanId?: string, guideType?: number, limit?: number, page?: number, options?: any): Promise<ApiListOnboardingResponse>;
|
1998
1998
|
/** create onboarding. */
|
1999
|
-
createOnboarding(bearerToken: string, body: ApiCreateOnboardingRequest, options?: any): Promise<
|
1999
|
+
createOnboarding(bearerToken: string, body: ApiCreateOnboardingRequest, options?: any): Promise<ApiListOnboardingResponse>;
|
2000
2000
|
/** delete onboarding. */
|
2001
2001
|
deleteOnboarding(bearerToken: string, id: string, clanId?: string, options?: any): Promise<any>;
|
2002
2002
|
/** get detailed onboarding information. */
|
package/dist/client.d.ts
CHANGED
@@ -618,7 +618,7 @@ export declare class Client {
|
|
618
618
|
listAuditLog(session: Session, actionLog?: string, userId?: string, clanId?: string, date_log?: string): Promise<MezonapiListAuditLog>;
|
619
619
|
listOnboarding(session: Session, clanId?: string, guideType?: number, limit?: number, page?: number): Promise<ApiListOnboardingResponse>;
|
620
620
|
getOnboardingDetail(session: Session, id: string, clanId?: string): Promise<ApiOnboardingItem>;
|
621
|
-
createOnboarding(session: Session, request: ApiCreateOnboardingRequest): Promise<
|
621
|
+
createOnboarding(session: Session, request: ApiCreateOnboardingRequest): Promise<ApiListOnboardingResponse>;
|
622
622
|
updateOnboarding(session: Session, id: string, request: MezonUpdateOnboardingBody): Promise<boolean>;
|
623
623
|
deleteOnboarding(session: Session, id: string, clanId?: string): Promise<any>;
|
624
624
|
generateClanWebhook(session: Session, request: ApiGenerateClanWebhookRequest): Promise<ApiGenerateClanWebhookResponse>;
|