mezon-js 2.7.57 → 2.7.60

Sign up to get free protection for your applications and to get access to all the features.
package/api.gen.ts CHANGED
@@ -178,6 +178,10 @@ export interface ApiChangeChannelPrivateRequest {
178
178
  channel_id?: string;
179
179
  //
180
180
  channel_private?: number;
181
+ //
182
+ role_ids?: Array<string>;
183
+ //The users to add.
184
+ user_ids?: Array<string>;
181
185
  }
182
186
 
183
187
  /** */
@@ -298,14 +302,22 @@ export interface ApiChannelMessage {
298
302
 
299
303
  /** */
300
304
  export interface ApiChannelMessageHeader {
305
+ //
306
+ attachment?: string;
307
+ //
308
+ content?: string;
301
309
  //
302
310
  id?: string;
303
311
  //
312
+ mention?: string;
313
+ //
314
+ reaction?: string;
315
+ //
316
+ referece?: string;
317
+ //
318
+ sender_id?: string;
319
+ //
304
320
  timestamp?: string;
305
- // sender id
306
- sender_id: string;
307
- // content
308
- content: string;
309
321
  }
310
322
 
311
323
  /** A list of channel messages, usually a result of a list operation. */
@@ -1571,7 +1583,6 @@ export class MezonApi {
1571
1583
  authenticateEmail(basicAuthUsername: string,
1572
1584
  basicAuthPassword: string,
1573
1585
  account:ApiAccountEmail,
1574
- create?:boolean,
1575
1586
  username?:string,
1576
1587
  options: any = {}): Promise<ApiSession> {
1577
1588
 
@@ -1580,7 +1591,6 @@ export class MezonApi {
1580
1591
  }
1581
1592
  const urlPath = "/v2/account/authenticate/email";
1582
1593
  const queryParams = new Map<string, any>();
1583
- queryParams.set("create", create);
1584
1594
  queryParams.set("username", username);
1585
1595
 
1586
1596
  let bodyJson : string = "";
package/client.ts CHANGED
@@ -573,14 +573,14 @@ export class Client {
573
573
  }
574
574
 
575
575
  /** Authenticate a user with an email+password against the server. */
576
- authenticateEmail(email: string, password: string, create?: boolean, username?: string, vars?: Record<string,string>): Promise<Session> {
576
+ authenticateEmail(email: string, password: string, username?: string, vars?: Record<string,string>): Promise<Session> {
577
577
  const request = {
578
578
  "email": email,
579
579
  "password": password,
580
580
  "vars": vars
581
581
  };
582
582
 
583
- return this.apiClient.authenticateEmail(this.serverkey, "", request, create, username).then((apiSession : ApiSession) => {
583
+ return this.apiClient.authenticateEmail(this.serverkey, "", request, username).then((apiSession : ApiSession) => {
584
584
  return new Session(apiSession.token || "", apiSession.refresh_token || "", apiSession.created || false);
585
585
  });
586
586
  }
package/dist/api.gen.d.ts CHANGED
@@ -103,6 +103,8 @@ export interface ApiCategoryDescList {
103
103
  export interface ApiChangeChannelPrivateRequest {
104
104
  channel_id?: string;
105
105
  channel_private?: number;
106
+ role_ids?: Array<string>;
107
+ user_ids?: Array<string>;
106
108
  }
107
109
  /** */
108
110
  export interface ApiChannelAttachment {
@@ -169,10 +171,14 @@ export interface ApiChannelMessage {
169
171
  }
170
172
  /** */
171
173
  export interface ApiChannelMessageHeader {
174
+ attachment?: string;
175
+ content?: string;
172
176
  id?: string;
177
+ mention?: string;
178
+ reaction?: string;
179
+ referece?: string;
180
+ sender_id?: string;
173
181
  timestamp?: string;
174
- sender_id: string;
175
- content: string;
176
182
  }
177
183
  /** A list of channel messages, usually a result of a list operation. */
178
184
  export interface ApiChannelMessageList {
@@ -779,7 +785,7 @@ export declare class MezonApi {
779
785
  /** Authenticate a user with a device id against the server. */
780
786
  authenticateDevice(basicAuthUsername: string, basicAuthPassword: string, account: ApiAccountDevice, create?: boolean, username?: string, options?: any): Promise<ApiSession>;
781
787
  /** Authenticate a user with an email+password against the server. */
782
- authenticateEmail(basicAuthUsername: string, basicAuthPassword: string, account: ApiAccountEmail, create?: boolean, username?: string, options?: any): Promise<ApiSession>;
788
+ authenticateEmail(basicAuthUsername: string, basicAuthPassword: string, account: ApiAccountEmail, username?: string, options?: any): Promise<ApiSession>;
783
789
  /** Authenticate a user with a Facebook OAuth token against the server. */
784
790
  authenticateFacebook(basicAuthUsername: string, basicAuthPassword: string, account: ApiAccountFacebook, create?: boolean, username?: string, sync?: boolean, options?: any): Promise<ApiSession>;
785
791
  /** Authenticate a user with a Facebook Instant Game token against the server. */
package/dist/client.d.ts CHANGED
@@ -371,7 +371,7 @@ export declare class Client {
371
371
  /** Authenticate a user with a device id against the server. */
372
372
  authenticateDevice(id: string, create?: boolean, username?: string, vars?: Record<string, string>): Promise<Session>;
373
373
  /** Authenticate a user with an email+password against the server. */
374
- authenticateEmail(email: string, password: string, create?: boolean, username?: string, vars?: Record<string, string>): Promise<Session>;
374
+ authenticateEmail(email: string, password: string, username?: string, vars?: Record<string, string>): Promise<Session>;
375
375
  /** Authenticate a user with a Facebook Instant Game token against the server. */
376
376
  authenticateFacebookInstantGame(signedPlayerInfo: string, create?: boolean, username?: string, vars?: Record<string, string>, options?: any): Promise<Session>;
377
377
  /** Authenticate a user with a Facebook OAuth token against the server. */
@@ -852,13 +852,12 @@ var MezonApi = class {
852
852
  ]);
853
853
  }
854
854
  /** Authenticate a user with an email+password against the server. */
855
- authenticateEmail(basicAuthUsername, basicAuthPassword, account, create, username, options = {}) {
855
+ authenticateEmail(basicAuthUsername, basicAuthPassword, account, username, options = {}) {
856
856
  if (account === null || account === void 0) {
857
857
  throw new Error("'account' is a required parameter but is null or undefined.");
858
858
  }
859
859
  const urlPath = "/v2/account/authenticate/email";
860
860
  const queryParams = /* @__PURE__ */ new Map();
861
- queryParams.set("create", create);
862
861
  queryParams.set("username", username);
863
862
  let bodyJson = "";
864
863
  bodyJson = JSON.stringify(account || {});
@@ -4771,13 +4770,13 @@ var Client = class {
4771
4770
  });
4772
4771
  }
4773
4772
  /** Authenticate a user with an email+password against the server. */
4774
- authenticateEmail(email, password, create, username, vars) {
4773
+ authenticateEmail(email, password, username, vars) {
4775
4774
  const request = {
4776
4775
  "email": email,
4777
4776
  "password": password,
4778
4777
  "vars": vars
4779
4778
  };
4780
- return this.apiClient.authenticateEmail(this.serverkey, "", request, create, username).then((apiSession) => {
4779
+ return this.apiClient.authenticateEmail(this.serverkey, "", request, username).then((apiSession) => {
4781
4780
  return new Session(apiSession.token || "", apiSession.refresh_token || "", apiSession.created || false);
4782
4781
  });
4783
4782
  }
@@ -823,13 +823,12 @@ var MezonApi = class {
823
823
  ]);
824
824
  }
825
825
  /** Authenticate a user with an email+password against the server. */
826
- authenticateEmail(basicAuthUsername, basicAuthPassword, account, create, username, options = {}) {
826
+ authenticateEmail(basicAuthUsername, basicAuthPassword, account, username, options = {}) {
827
827
  if (account === null || account === void 0) {
828
828
  throw new Error("'account' is a required parameter but is null or undefined.");
829
829
  }
830
830
  const urlPath = "/v2/account/authenticate/email";
831
831
  const queryParams = /* @__PURE__ */ new Map();
832
- queryParams.set("create", create);
833
832
  queryParams.set("username", username);
834
833
  let bodyJson = "";
835
834
  bodyJson = JSON.stringify(account || {});
@@ -4742,13 +4741,13 @@ var Client = class {
4742
4741
  });
4743
4742
  }
4744
4743
  /** Authenticate a user with an email+password against the server. */
4745
- authenticateEmail(email, password, create, username, vars) {
4744
+ authenticateEmail(email, password, username, vars) {
4746
4745
  const request = {
4747
4746
  "email": email,
4748
4747
  "password": password,
4749
4748
  "vars": vars
4750
4749
  };
4751
- return this.apiClient.authenticateEmail(this.serverkey, "", request, create, username).then((apiSession) => {
4750
+ return this.apiClient.authenticateEmail(this.serverkey, "", request, username).then((apiSession) => {
4752
4751
  return new Session(apiSession.token || "", apiSession.refresh_token || "", apiSession.created || false);
4753
4752
  });
4754
4753
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mezon-js",
3
- "version": "2.7.57",
3
+ "version": "2.7.60",
4
4
  "scripts": {
5
5
  "build": "npx tsc && npx rollup -c --bundleConfigAsCjs && node build.mjs"
6
6
  },