@ikxvxn/databi-sharedtypes 0.0.42 → 0.0.43
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/dist/auth.d.ts +17 -0
- package/dist/auth.js +2 -2
- package/dist/company.d.ts +7 -0
- package/dist/company.js +6 -0
- package/package.json +2 -2
package/dist/auth.d.ts
CHANGED
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import type { CompanyType } from './company';
|
|
1
2
|
/**
|
|
2
3
|
* Contratos compartidos de autenticación.
|
|
3
4
|
* Usados tanto por el servidor (Express) como por el cliente (Next.js).
|
|
@@ -41,3 +42,19 @@ export interface LoginResponse {
|
|
|
41
42
|
ok: boolean;
|
|
42
43
|
session: AuthSession;
|
|
43
44
|
}
|
|
45
|
+
export interface RegisterPayload {
|
|
46
|
+
companyName: string;
|
|
47
|
+
companyType: CompanyType;
|
|
48
|
+
phone: string;
|
|
49
|
+
idNumber: string;
|
|
50
|
+
economicActivity: string;
|
|
51
|
+
provinceId: number;
|
|
52
|
+
cantonId: number;
|
|
53
|
+
districtId: number;
|
|
54
|
+
email: string;
|
|
55
|
+
password: string;
|
|
56
|
+
}
|
|
57
|
+
export interface RegisterResponse {
|
|
58
|
+
ok: boolean;
|
|
59
|
+
session: AuthSession;
|
|
60
|
+
}
|
package/dist/auth.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AuthProviderEnum = void 0;
|
|
2
4
|
/**
|
|
3
5
|
* Contratos compartidos de autenticación.
|
|
4
6
|
* Usados tanto por el servidor (Express) como por el cliente (Next.js).
|
|
5
7
|
* NO duplicar estos tipos en ninguno de los dos proyectos.
|
|
6
8
|
*/
|
|
7
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
8
|
-
exports.AuthProviderEnum = void 0;
|
|
9
9
|
// ─── Proveedor de autenticación ─────────────────────────────────────────────
|
|
10
10
|
var AuthProviderEnum;
|
|
11
11
|
(function (AuthProviderEnum) {
|
package/dist/company.d.ts
CHANGED
|
@@ -1,4 +1,9 @@
|
|
|
1
1
|
import { Types, Document } from 'mongoose';
|
|
2
|
+
export declare enum CompanyTypeEnum {
|
|
3
|
+
juridica = "juridica",
|
|
4
|
+
fisica = "fisica"
|
|
5
|
+
}
|
|
6
|
+
export type CompanyType = keyof typeof CompanyTypeEnum;
|
|
2
7
|
export interface IPermission {
|
|
3
8
|
name: string;
|
|
4
9
|
}
|
|
@@ -23,6 +28,8 @@ export interface IBusiness {
|
|
|
23
28
|
export interface ICompany extends Document {
|
|
24
29
|
_id: Types.ObjectId;
|
|
25
30
|
name: string;
|
|
31
|
+
companyType: CompanyType;
|
|
32
|
+
economicActivity: string;
|
|
26
33
|
businesses: IBusiness[];
|
|
27
34
|
externalDbs: Types.ObjectId[];
|
|
28
35
|
createdAt: Date;
|
package/dist/company.js
CHANGED
|
@@ -1,2 +1,8 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CompanyTypeEnum = void 0;
|
|
4
|
+
var CompanyTypeEnum;
|
|
5
|
+
(function (CompanyTypeEnum) {
|
|
6
|
+
CompanyTypeEnum["juridica"] = "juridica";
|
|
7
|
+
CompanyTypeEnum["fisica"] = "fisica";
|
|
8
|
+
})(CompanyTypeEnum || (exports.CompanyTypeEnum = CompanyTypeEnum = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ikxvxn/databi-sharedtypes",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"types": "dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
],
|
|
9
9
|
"scripts": {
|
|
10
10
|
"build": "tsc -p tsconfig.json",
|
|
11
|
-
"release": "npm install && npm run build && npm version patch && npm publish"
|
|
11
|
+
"release": "npm install && npm run build && npm version patch && npm publish --access public"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
14
|
"@types/mongoose": "^5.11.96",
|