@wrcb/cb-common 1.0.600 → 1.0.602

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.
@@ -14,19 +14,19 @@ const tenant_1 = require("../types/tenant");
14
14
  const userCategory_1 = require("../types/userCategory");
15
15
  function signUpReturnCookie(id, overrides) {
16
16
  // Build a JWT payload
17
- const payload = Object.assign({ id: id !== null && id !== void 0 ? id : new mongoose_1.default.Types.ObjectId().toHexString(), tenant: tenant_1.Tenant.PrivateShow, 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, isPhoneNumberVerified: false, isWhatsappVerified: false, isPersonalDataProvided: false, isAddressDataProvided: false, isBusinessDataProvided: false, category: userCategory_1.UserCategory.Male, tags: [], profilePhoto: 'https://criptobet.com/logo.jpg' }, overrides // sobrescreve os valores padrão
17
+ const payload = Object.assign({ id: id !== null && id !== void 0 ? id : new mongoose_1.default.Types.ObjectId().toHexString(), tenant: tenant_1.Tenant.PrivateShow, 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, isPhoneNumberVerified: false, isWhatsappVerified: false, isPersonalDataProvided: false, isAddressDataProvided: false, isBusinessDataProvided: false, category: userCategory_1.UserCategory.Male, myAffiliateCode: '123456', affiliateCode: '654321', affiliateId: new mongoose_1.default.Types.ObjectId().toHexString(), tags: [], profilePhoto: 'https://criptobet.com/logo.jpg' }, overrides // sobrescreve os valores padrão
18
18
  );
19
19
  return buildCookie(payload);
20
20
  }
21
21
  function signUpReturnCookieAdmin(id, overrides) {
22
22
  // Build a JWT payload
23
- const payload = Object.assign({ id: id !== null && id !== void 0 ? id : new mongoose_1.default.Types.ObjectId().toHexString(), tenant: tenant_1.Tenant.PrivateShow, 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, isPhoneNumberVerified: false, isWhatsappVerified: false, isPersonalDataProvided: false, isAddressDataProvided: false, isBusinessDataProvided: false, category: userCategory_1.UserCategory.Male, tags: [], profilePhoto: 'https://criptobet.com/logo.jpg' }, overrides // sobrescreve os valores padrão
23
+ const payload = Object.assign({ id: id !== null && id !== void 0 ? id : new mongoose_1.default.Types.ObjectId().toHexString(), tenant: tenant_1.Tenant.PrivateShow, 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, isPhoneNumberVerified: false, isWhatsappVerified: false, isPersonalDataProvided: false, isAddressDataProvided: false, isBusinessDataProvided: false, category: userCategory_1.UserCategory.Male, tags: [], myAffiliateCode: '123456', affiliateCode: '654321', affiliateId: new mongoose_1.default.Types.ObjectId().toHexString(), profilePhoto: 'https://criptobet.com/logo.jpg' }, overrides // sobrescreve os valores padrão
24
24
  );
25
25
  return buildCookie(payload);
26
26
  }
27
27
  function signUpReturnCookieSeller(id, overrides) {
28
28
  // Build a JWT payload
29
- const payload = Object.assign({ id: id !== null && id !== void 0 ? id : new mongoose_1.default.Types.ObjectId().toHexString(), tenant: tenant_1.Tenant.PrivateShow, email: 'test@test.com', nickName: 'apelido', role: userRole_1.UserRole.Seller, isKycDone: true, language: country_1.Language.Português, country: country_1.Country.Brasil, isEmailVerified: false, isPhoneNumberVerified: false, isWhatsappVerified: false, isPersonalDataProvided: false, isAddressDataProvided: false, isBusinessDataProvided: false, category: userCategory_1.UserCategory.Male, tags: [], profilePhoto: 'https://criptobet.com/logo.jpg' }, overrides // sobrescreve os valores padrão
29
+ const payload = Object.assign({ id: id !== null && id !== void 0 ? id : new mongoose_1.default.Types.ObjectId().toHexString(), tenant: tenant_1.Tenant.PrivateShow, email: 'test@test.com', nickName: 'apelido', role: userRole_1.UserRole.Seller, isKycDone: true, language: country_1.Language.Português, country: country_1.Country.Brasil, isEmailVerified: false, isPhoneNumberVerified: false, isWhatsappVerified: false, isPersonalDataProvided: false, isAddressDataProvided: false, isBusinessDataProvided: false, category: userCategory_1.UserCategory.Male, tags: [], myAffiliateCode: '123456', affiliateCode: '654321', affiliateId: new mongoose_1.default.Types.ObjectId().toHexString(), profilePhoto: 'https://criptobet.com/logo.jpg' }, overrides // sobrescreve os valores padrão
30
30
  );
31
31
  return buildCookie(payload);
32
32
  }
@@ -2,6 +2,7 @@ export declare enum TransactionOperation {
2
2
  Charge = "Charge",
3
3
  Refund = "Refund",
4
4
  WaitingDeposit = "WaitingDeposit",
5
+ Commission = "Commission",
5
6
  Deposit = "Deposit",
6
7
  Bonus = "Bonus",
7
8
  Withdraw = "Withdraw",
@@ -6,6 +6,7 @@ var TransactionOperation;
6
6
  TransactionOperation["Charge"] = "Charge";
7
7
  TransactionOperation["Refund"] = "Refund";
8
8
  TransactionOperation["WaitingDeposit"] = "WaitingDeposit";
9
+ TransactionOperation["Commission"] = "Commission";
9
10
  TransactionOperation["Deposit"] = "Deposit";
10
11
  TransactionOperation["Bonus"] = "Bonus";
11
12
  TransactionOperation["Withdraw"] = "Withdraw";
@@ -19,5 +19,8 @@ export interface UserPayload {
19
19
  profilePhoto: string;
20
20
  country: Country;
21
21
  role: string;
22
+ myAffiliateCode: string;
23
+ affiliateCode?: string;
24
+ affiliateId?: string;
22
25
  tags: UserTags[];
23
26
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.600",
3
+ "version": "1.0.602",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",