mezon-js 2.7.57 → 2.7.59
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 +4 -2
- package/client.ts +2 -2
- package/dist/api.gen.d.ts +3 -1
- package/dist/client.d.ts +1 -1
- package/dist/mezon-js.cjs.js +3 -4
- package/dist/mezon-js.esm.mjs +3 -4
- package/package.json +1 -1
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
|
/** */
|
|
@@ -1571,7 +1575,6 @@ export class MezonApi {
|
|
|
1571
1575
|
authenticateEmail(basicAuthUsername: string,
|
|
1572
1576
|
basicAuthPassword: string,
|
|
1573
1577
|
account:ApiAccountEmail,
|
|
1574
|
-
create?:boolean,
|
|
1575
1578
|
username?:string,
|
|
1576
1579
|
options: any = {}): Promise<ApiSession> {
|
|
1577
1580
|
|
|
@@ -1580,7 +1583,6 @@ export class MezonApi {
|
|
|
1580
1583
|
}
|
|
1581
1584
|
const urlPath = "/v2/account/authenticate/email";
|
|
1582
1585
|
const queryParams = new Map<string, any>();
|
|
1583
|
-
queryParams.set("create", create);
|
|
1584
1586
|
queryParams.set("username", username);
|
|
1585
1587
|
|
|
1586
1588
|
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,
|
|
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,
|
|
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 {
|
|
@@ -779,7 +781,7 @@ export declare class MezonApi {
|
|
|
779
781
|
/** Authenticate a user with a device id against the server. */
|
|
780
782
|
authenticateDevice(basicAuthUsername: string, basicAuthPassword: string, account: ApiAccountDevice, create?: boolean, username?: string, options?: any): Promise<ApiSession>;
|
|
781
783
|
/** Authenticate a user with an email+password against the server. */
|
|
782
|
-
authenticateEmail(basicAuthUsername: string, basicAuthPassword: string, account: ApiAccountEmail,
|
|
784
|
+
authenticateEmail(basicAuthUsername: string, basicAuthPassword: string, account: ApiAccountEmail, username?: string, options?: any): Promise<ApiSession>;
|
|
783
785
|
/** Authenticate a user with a Facebook OAuth token against the server. */
|
|
784
786
|
authenticateFacebook(basicAuthUsername: string, basicAuthPassword: string, account: ApiAccountFacebook, create?: boolean, username?: string, sync?: boolean, options?: any): Promise<ApiSession>;
|
|
785
787
|
/** 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,
|
|
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. */
|
package/dist/mezon-js.cjs.js
CHANGED
|
@@ -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,
|
|
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,
|
|
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,
|
|
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
|
}
|
package/dist/mezon-js.esm.mjs
CHANGED
|
@@ -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,
|
|
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,
|
|
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,
|
|
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
|
}
|