@wrcb/cb-common 1.0.64 → 1.0.66

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.
@@ -1,4 +1,9 @@
1
1
  export declare enum OddConfiguration {
2
- Automatic = "Autom\u00E1tico",
2
+ Automatic05 = "Autom\u00E1tico 05",
3
+ Automatic06 = "Autom\u00E1tico 06",
4
+ Automatic07 = "Autom\u00E1tico 07",
5
+ Automatic08 = "Autom\u00E1tico 08",
6
+ Automatic09 = "Autom\u00E1tico 09",
7
+ Automatic10 = "Autom\u00E1tico 10",
3
8
  Manual = "Manual"
4
9
  }
@@ -3,6 +3,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.OddConfiguration = void 0;
4
4
  var OddConfiguration;
5
5
  (function (OddConfiguration) {
6
- OddConfiguration["Automatic"] = "Autom\u00E1tico";
6
+ OddConfiguration["Automatic05"] = "Autom\u00E1tico 05";
7
+ OddConfiguration["Automatic06"] = "Autom\u00E1tico 06";
8
+ OddConfiguration["Automatic07"] = "Autom\u00E1tico 07";
9
+ OddConfiguration["Automatic08"] = "Autom\u00E1tico 08";
10
+ OddConfiguration["Automatic09"] = "Autom\u00E1tico 09";
11
+ OddConfiguration["Automatic10"] = "Autom\u00E1tico 10";
7
12
  OddConfiguration["Manual"] = "Manual";
8
13
  })(OddConfiguration || (exports.OddConfiguration = OddConfiguration = {}));
package/build/index.d.ts CHANGED
@@ -1,3 +1,4 @@
1
+ export * from './test/authHelper';
1
2
  export * from './types';
2
3
  export * from './errors/badRequestError';
3
4
  export * from './errors/customError';
package/build/index.js CHANGED
@@ -14,6 +14,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./test/authHelper"), exports);
17
18
  __exportStar(require("./types"), exports);
18
19
  __exportStar(require("./errors/badRequestError"), exports);
19
20
  __exportStar(require("./errors/customError"), exports);
@@ -1,7 +1,2 @@
1
- import { Express } from 'express';
2
1
  export declare function signUpReturnCookie(id?: string): string[];
3
2
  export declare function signUpReturnCookieAdmin(id?: string): string[];
4
- export declare function signUp(app: Express): Promise<{
5
- cookie: string[] | undefined;
6
- userData: any;
7
- }>;
@@ -1,24 +1,12 @@
1
1
  "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
2
  var __importDefault = (this && this.__importDefault) || function (mod) {
12
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
13
4
  };
14
5
  Object.defineProperty(exports, "__esModule", { value: true });
15
6
  exports.signUpReturnCookie = signUpReturnCookie;
16
7
  exports.signUpReturnCookieAdmin = signUpReturnCookieAdmin;
17
- exports.signUp = signUp;
18
- const supertest_1 = __importDefault(require("supertest"));
19
8
  const mongoose_1 = __importDefault(require("mongoose"));
20
9
  const jsonwebtoken_1 = __importDefault(require("jsonwebtoken"));
21
- const country_1 = require("../events/types/country");
22
10
  const userRole_1 = require("../events/types/userRole");
23
11
  function signUpReturnCookie(id) {
24
12
  // Build a JWT payload
@@ -59,22 +47,3 @@ function signUpReturnCookieAdmin(id) {
59
47
  // return a string that the cookie wieht the encoded data
60
48
  return [`session=${base64}`];
61
49
  }
62
- function signUp(app) {
63
- return __awaiter(this, void 0, void 0, function* () {
64
- const response = yield (0, supertest_1.default)(app)
65
- .post('/api/auth/signup')
66
- .send({
67
- email: 'test@test.com.br',
68
- nickName: 'ap',
69
- country: country_1.Country.Brazil,
70
- cpf: '05854744600',
71
- phoneNumber: '(37)988083717',
72
- password: 'password',
73
- passwordConfirmation: 'password',
74
- })
75
- .expect(201);
76
- const cookie = response.get('Set-Cookie');
77
- const userData = response.body;
78
- return { cookie, userData };
79
- });
80
- }
package/package.json CHANGED
@@ -1,22 +1,12 @@
1
1
  {
2
2
  "name": "@wrcb/cb-common",
3
- "version": "1.0.64",
3
+ "version": "1.0.66",
4
4
  "description": "Common resources between services",
5
5
  "main": "./build/index.js",
6
6
  "types": "./build/index.d.ts",
7
7
  "files": [
8
8
  "build/**/*"
9
9
  ],
10
- "exports": {
11
- ".": {
12
- "import": "./build/index.js",
13
- "require": "./build/index.js"
14
- },
15
- "./test": {
16
- "import": "./build/test.js",
17
- "require": "./build/test.js"
18
- }
19
- },
20
10
  "scripts": {
21
11
  "clean": "rimraf ./build",
22
12
  "build": "npm run clean && tsc",
@@ -38,7 +28,6 @@
38
28
  "express-validator": "^7.1.0",
39
29
  "jsonwebtoken": "^9.0.2",
40
30
  "mongoose": "^8.6.3",
41
- "node-nats-streaming": "^0.3.2",
42
- "supertest": "^7.0.0"
31
+ "node-nats-streaming": "^0.3.2"
43
32
  }
44
33
  }
package/build/test.d.ts DELETED
@@ -1 +0,0 @@
1
- export * from './test/authHelper';
package/build/test.js DELETED
@@ -1,17 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./test/authHelper"), exports);