@wrcb/cb-common 1.0.307 → 1.0.310

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.
@@ -9,15 +9,16 @@ const mongoose_1 = __importDefault(require("mongoose"));
9
9
  const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
10
10
  const userRole_1 = require("../types/userRole");
11
11
  const country_1 = require("../types/country");
12
+ const tenant_1 = require("src/types/tenant");
12
13
  function signUpReturnCookie(id, overrides) {
13
14
  // Build a JWT payload
14
- const payload = Object.assign({ id: id !== null && id !== void 0 ? id : new mongoose_1.default.Types.ObjectId().toHexString(), email: 'test@test.com', nickName: 'apelido', role: userRole_1.UserRole.Consumer, language: country_1.Language.Português, country: country_1.Country.Brasil, isKycDone: true, isEmailVerified: false, isWhatsappVerified: false, isPersonalDataProvided: false, isAddressDataProvided: false }, overrides // sobrescreve os valores padrão
15
+ const payload = Object.assign({ id: id !== null && id !== void 0 ? id : new mongoose_1.default.Types.ObjectId().toHexString(), tenant: tenant_1.Tenant.PoliticaBet, email: 'test@test.com', nickName: 'apelido', role: userRole_1.UserRole.Consumer, language: country_1.Language.Português, country: country_1.Country.Brasil, isKycDone: true, isEmailVerified: false, isWhatsappVerified: false, isPersonalDataProvided: false, isAddressDataProvided: false }, overrides // sobrescreve os valores padrão
15
16
  );
16
17
  return buildCookie(payload);
17
18
  }
18
19
  function signUpReturnCookieAdmin(id, overrides) {
19
20
  // Build a JWT payload
20
- const payload = Object.assign({ id: id !== null && id !== void 0 ? id : new mongoose_1.default.Types.ObjectId().toHexString(), email: 'test@test.com', nickName: 'apelido', role: userRole_1.UserRole.Admin, isKycDone: true, language: country_1.Language.Português, country: country_1.Country.Brasil, isEmailVerified: false, isWhatsappVerified: false, isPersonalDataProvided: false, isAddressDataProvided: false }, overrides // sobrescreve os valores padrão
21
+ const payload = Object.assign({ id: id !== null && id !== void 0 ? id : new mongoose_1.default.Types.ObjectId().toHexString(), tenant: tenant_1.Tenant.PoliticaBet, email: 'test@test.com', nickName: 'apelido', role: userRole_1.UserRole.Admin, isKycDone: true, language: country_1.Language.Português, country: country_1.Country.Brasil, isEmailVerified: false, isWhatsappVerified: false, isPersonalDataProvided: false, isAddressDataProvided: false }, overrides // sobrescreve os valores padrão
21
22
  );
22
23
  return buildCookie(payload);
23
24
  }
@@ -1,6 +1,8 @@
1
1
  import { Country, Language } from './country';
2
+ import { Tenant } from './tenant';
2
3
  export interface UserPayload {
3
4
  id: string;
5
+ tenant: Tenant;
4
6
  email: string;
5
7
  nickName: string;
6
8
  isKycDone: boolean;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.307",
3
+ "version": "1.0.310",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",