mezon-js 2.10.46 → 2.10.47

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 CHANGED
@@ -10313,45 +10313,46 @@ export class MezonApi {
10313
10313
  ]);
10314
10314
  }
10315
10315
 
10316
- /** create onboarding. */
10317
- createOnboarding(
10318
- bearerToken: string,
10319
- body: ApiCreateOnboardingRequest,
10320
- options: any = {}
10321
- ): Promise<any> {
10322
- if (body === null || body === undefined) {
10316
+ /** create onboarding. */
10317
+ createOnboarding(
10318
+ bearerToken: string,
10319
+ body: ApiCreateOnboardingRequest,
10320
+ options: any = {}
10321
+ ): Promise<ApiListOnboardingResponse> {
10322
+
10323
+ if (body === null || body === undefined) {
10323
10324
  throw new Error(
10324
10325
  "'body' is a required parameter but is null or undefined."
10325
10326
  );
10326
- }
10327
- const urlPath = "/v2/onboarding";
10328
- const queryParams = new Map<string, any>();
10327
+ }
10328
+ const urlPath = "/v2/onboarding";
10329
+ const queryParams = new Map<string, any>();
10329
10330
 
10330
10331
  let bodyJson: string = "";
10331
- bodyJson = JSON.stringify(body || {});
10332
+ bodyJson = JSON.stringify(body || {});
10332
10333
 
10333
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10334
- const fetchOptions = buildFetchOptions("POST", options, bodyJson);
10335
- if (bearerToken) {
10334
+ const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
10335
+ const fetchOptions = buildFetchOptions("POST", options, bodyJson);
10336
+ if (bearerToken) {
10336
10337
  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
10338
  }
10354
10339
 
10340
+ return Promise.race([
10341
+ fetch(fullUrl, fetchOptions).then((response) => {
10342
+ if (response.status == 204) {
10343
+ return response;
10344
+ } else if (response.status >= 200 && response.status < 300) {
10345
+ return response.json();
10346
+ } else {
10347
+ throw response;
10348
+ }
10349
+ }),
10350
+ new Promise((_, reject) =>
10351
+ setTimeout(reject, this.timeoutMs, "Request timed out.")
10352
+ ),
10353
+ ]);
10354
+ }
10355
+
10355
10356
  /** delete onboarding. */
10356
10357
  deleteOnboarding(
10357
10358
  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<any> {
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: any) => {
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<any>;
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<any>;
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>;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.10.46",
4
+ "version": "2.10.47",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"