mezon-js 2.12.5 → 2.12.6

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
@@ -3340,6 +3340,7 @@ export class MezonApi {
3340
3340
  /** */
3341
3341
  confirmLogin(
3342
3342
  bearerToken: string,
3343
+ basePath: string,
3343
3344
  body: ApiConfirmLoginRequest,
3344
3345
  options: any = {}
3345
3346
  ): Promise<any> {
@@ -3354,7 +3355,7 @@ export class MezonApi {
3354
3355
  let bodyJson: string = "";
3355
3356
  bodyJson = JSON.stringify(body || {});
3356
3357
 
3357
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
3358
+ const fullUrl = this.buildFullUrl(basePath, urlPath, queryParams);
3358
3359
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
3359
3360
  if (bearerToken) {
3360
3361
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
package/client.ts CHANGED
@@ -3953,6 +3953,7 @@ export class Client {
3953
3953
 
3954
3954
  async confirmLogin(
3955
3955
  session: Session,
3956
+ basePath: string,
3956
3957
  body: ApiConfirmLoginRequest
3957
3958
  ): Promise<any> {
3958
3959
  if (
@@ -3964,7 +3965,7 @@ export class Client {
3964
3965
  }
3965
3966
 
3966
3967
  return this.apiClient
3967
- .confirmLogin(session.token, body)
3968
+ .confirmLogin(session.token, basePath, body)
3968
3969
  .then((response: any) => {
3969
3970
  return response;
3970
3971
  });
package/dist/api.gen.d.ts CHANGED
@@ -1824,7 +1824,7 @@ export declare class MezonApi {
1824
1824
  /** */
1825
1825
  checkLoginRequest(basicAuthUsername: string, basicAuthPassword: string, body: ApiConfirmLoginRequest, options?: any): Promise<ApiSession>;
1826
1826
  /** */
1827
- confirmLogin(bearerToken: string, body: ApiConfirmLoginRequest, options?: any): Promise<any>;
1827
+ confirmLogin(bearerToken: string, basePath: string, body: ApiConfirmLoginRequest, options?: any): Promise<any>;
1828
1828
  /** */
1829
1829
  createQRLogin(basicAuthUsername: string, basicAuthPassword: string, body: ApiLoginRequest, options?: any): Promise<ApiLoginIDResponse>;
1830
1830
  /** Authenticate a user with an email+password against the server. */
package/dist/client.d.ts CHANGED
@@ -576,7 +576,7 @@ export declare class Client {
576
576
  createActiviy(session: Session, request: ApiCreateActivityRequest): Promise<ApiUserActivity>;
577
577
  createQRLogin(requet: ApiLoginRequest): Promise<ApiLoginIDResponse>;
578
578
  checkLoginRequest(requet: ApiConfirmLoginRequest): Promise<Session | null>;
579
- confirmLogin(session: Session, body: ApiConfirmLoginRequest): Promise<any>;
579
+ confirmLogin(session: Session, basePath: string, body: ApiConfirmLoginRequest): Promise<any>;
580
580
  getChanEncryptionMethod(session: Session, channelId: string): Promise<ApiChanEncryptionMethod>;
581
581
  setChanEncryptionMethod(session: Session, channelId: string, method: string): Promise<any>;
582
582
  getPubKeys(session: Session, userIds: Array<string>): Promise<ApiGetPubKeysResponse>;
@@ -874,7 +874,7 @@ var MezonApi = class {
874
874
  ]);
875
875
  }
876
876
  /** */
877
- confirmLogin(bearerToken, body, options = {}) {
877
+ confirmLogin(bearerToken, basePath, body, options = {}) {
878
878
  if (body === null || body === void 0) {
879
879
  throw new Error(
880
880
  "'body' is a required parameter but is null or undefined."
@@ -884,7 +884,7 @@ var MezonApi = class {
884
884
  const queryParams = /* @__PURE__ */ new Map();
885
885
  let bodyJson = "";
886
886
  bodyJson = JSON.stringify(body || {});
887
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
887
+ const fullUrl = this.buildFullUrl(basePath, urlPath, queryParams);
888
888
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
889
889
  if (bearerToken) {
890
890
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
@@ -9881,12 +9881,12 @@ var Client = class {
9881
9881
  );
9882
9882
  });
9883
9883
  }
9884
- confirmLogin(session, body) {
9884
+ confirmLogin(session, basePath, body) {
9885
9885
  return __async(this, null, function* () {
9886
9886
  if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
9887
9887
  yield this.sessionRefresh(session);
9888
9888
  }
9889
- return this.apiClient.confirmLogin(session.token, body).then((response) => {
9889
+ return this.apiClient.confirmLogin(session.token, basePath, body).then((response) => {
9890
9890
  return response;
9891
9891
  });
9892
9892
  });
@@ -840,7 +840,7 @@ var MezonApi = class {
840
840
  ]);
841
841
  }
842
842
  /** */
843
- confirmLogin(bearerToken, body, options = {}) {
843
+ confirmLogin(bearerToken, basePath, body, options = {}) {
844
844
  if (body === null || body === void 0) {
845
845
  throw new Error(
846
846
  "'body' is a required parameter but is null or undefined."
@@ -850,7 +850,7 @@ var MezonApi = class {
850
850
  const queryParams = /* @__PURE__ */ new Map();
851
851
  let bodyJson = "";
852
852
  bodyJson = JSON.stringify(body || {});
853
- const fullUrl = this.buildFullUrl(this.basePath, urlPath, queryParams);
853
+ const fullUrl = this.buildFullUrl(basePath, urlPath, queryParams);
854
854
  const fetchOptions = buildFetchOptions("POST", options, bodyJson);
855
855
  if (bearerToken) {
856
856
  fetchOptions.headers["Authorization"] = "Bearer " + bearerToken;
@@ -9847,12 +9847,12 @@ var Client = class {
9847
9847
  );
9848
9848
  });
9849
9849
  }
9850
- confirmLogin(session, body) {
9850
+ confirmLogin(session, basePath, body) {
9851
9851
  return __async(this, null, function* () {
9852
9852
  if (this.autoRefreshSession && session.refresh_token && session.isexpired(Date.now() / 1e3)) {
9853
9853
  yield this.sessionRefresh(session);
9854
9854
  }
9855
- return this.apiClient.confirmLogin(session.token, body).then((response) => {
9855
+ return this.apiClient.confirmLogin(session.token, basePath, body).then((response) => {
9856
9856
  return response;
9857
9857
  });
9858
9858
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "mezon-js",
3
3
 
4
- "version": "2.12.5",
4
+ "version": "2.12.6",
5
5
 
6
6
  "scripts": {
7
7
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"