easywork-common-lib 1.0.411 → 1.0.412
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/.gitattributes +2 -2
- package/.github/workflows/npm-publish.yml +33 -33
- package/.vscode/settings.json +12 -12
- package/dist/common/enums/sales.enum.d.ts +5 -5
- package/dist/common/enums/sales.enum.js +5 -5
- package/dist/common/enums/sales.enum.js.map +1 -1
- package/dist/entities/imap-folder.entity.d.ts +7 -0
- package/dist/entities/imap-folder.entity.js +41 -0
- package/dist/entities/imap-folder.entity.js.map +1 -0
- package/dist/entities/oauth.entity.d.ts +16 -0
- package/dist/entities/oauth.entity.js +83 -0
- package/dist/entities/oauth.entity.js.map +1 -0
- package/dist/grpc/drive/drive.proto +73 -73
- package/justfile +8 -8
- package/package.json +6 -6
- package/scripts/bump.sh +5 -5
- package/test.bat +15 -15
- package/tsconfig.build.json +4 -4
- package/tsconfig.json +25 -25
- package/tsconfig.tsbuildinfo +1 -1
package/.gitattributes
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
# Auto detect text files and perform LF normalization
|
|
2
|
-
* text=auto
|
|
1
|
+
# Auto detect text files and perform LF normalization
|
|
2
|
+
* text=auto
|
|
@@ -1,33 +1,33 @@
|
|
|
1
|
-
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
-
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
-
|
|
4
|
-
name: Node.js Package
|
|
5
|
-
|
|
6
|
-
on:
|
|
7
|
-
release:
|
|
8
|
-
types: [created]
|
|
9
|
-
|
|
10
|
-
jobs:
|
|
11
|
-
build:
|
|
12
|
-
runs-on: ubuntu-latest
|
|
13
|
-
steps:
|
|
14
|
-
- uses: actions/checkout@v4
|
|
15
|
-
- uses: actions/setup-node@v4
|
|
16
|
-
with:
|
|
17
|
-
node-version: 20
|
|
18
|
-
- run: npm ci
|
|
19
|
-
- run: npm test
|
|
20
|
-
|
|
21
|
-
publish-npm:
|
|
22
|
-
needs: build
|
|
23
|
-
runs-on: ubuntu-latest
|
|
24
|
-
steps:
|
|
25
|
-
- uses: actions/checkout@v4
|
|
26
|
-
- uses: actions/setup-node@v4
|
|
27
|
-
with:
|
|
28
|
-
node-version: 20
|
|
29
|
-
registry-url: https://registry.npmjs.org/
|
|
30
|
-
- run: npm ci
|
|
31
|
-
- run: npm publish
|
|
32
|
-
env:
|
|
33
|
-
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
|
1
|
+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
|
|
2
|
+
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
|
|
3
|
+
|
|
4
|
+
name: Node.js Package
|
|
5
|
+
|
|
6
|
+
on:
|
|
7
|
+
release:
|
|
8
|
+
types: [created]
|
|
9
|
+
|
|
10
|
+
jobs:
|
|
11
|
+
build:
|
|
12
|
+
runs-on: ubuntu-latest
|
|
13
|
+
steps:
|
|
14
|
+
- uses: actions/checkout@v4
|
|
15
|
+
- uses: actions/setup-node@v4
|
|
16
|
+
with:
|
|
17
|
+
node-version: 20
|
|
18
|
+
- run: npm ci
|
|
19
|
+
- run: npm test
|
|
20
|
+
|
|
21
|
+
publish-npm:
|
|
22
|
+
needs: build
|
|
23
|
+
runs-on: ubuntu-latest
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v4
|
|
26
|
+
- uses: actions/setup-node@v4
|
|
27
|
+
with:
|
|
28
|
+
node-version: 20
|
|
29
|
+
registry-url: https://registry.npmjs.org/
|
|
30
|
+
- run: npm ci
|
|
31
|
+
- run: npm publish
|
|
32
|
+
env:
|
|
33
|
+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
|
package/.vscode/settings.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
{
|
|
2
|
-
"autoBarrel.language.defaultLanguage": "TypeScript",
|
|
3
|
-
"autoBarrel.files.disableRecursiveBarrelling": false,
|
|
4
|
-
"autoBarrel.files.includeExtensionOnExport": ["ts", "tsx", "vue"],
|
|
5
|
-
"autoBarrel.files.ignoreFilePathPatternOnExport": ["**/*.spec.*", "**/*.test.*"],
|
|
6
|
-
"autoBarrel.files.keepExtensionOnExport": false,
|
|
7
|
-
"autoBarrel.files.detectExportsInFiles": false,
|
|
8
|
-
"autoBarrel.files.exportDefaultFilename": "filename",
|
|
9
|
-
"autoBarrel.formatting.excludeSemiColonAtEndOfLine": false,
|
|
10
|
-
"autoBarrel.formatting.useSingleQuotes": true,
|
|
11
|
-
"autoBarrel.formatting.endOfLine": "lf",
|
|
12
|
-
"autoBarrel.formatting.insertFinalNewline": true,
|
|
1
|
+
{
|
|
2
|
+
"autoBarrel.language.defaultLanguage": "TypeScript",
|
|
3
|
+
"autoBarrel.files.disableRecursiveBarrelling": false,
|
|
4
|
+
"autoBarrel.files.includeExtensionOnExport": ["ts", "tsx", "vue"],
|
|
5
|
+
"autoBarrel.files.ignoreFilePathPatternOnExport": ["**/*.spec.*", "**/*.test.*"],
|
|
6
|
+
"autoBarrel.files.keepExtensionOnExport": false,
|
|
7
|
+
"autoBarrel.files.detectExportsInFiles": false,
|
|
8
|
+
"autoBarrel.files.exportDefaultFilename": "filename",
|
|
9
|
+
"autoBarrel.formatting.excludeSemiColonAtEndOfLine": false,
|
|
10
|
+
"autoBarrel.formatting.useSingleQuotes": true,
|
|
11
|
+
"autoBarrel.formatting.endOfLine": "lf",
|
|
12
|
+
"autoBarrel.formatting.insertFinalNewline": true,
|
|
13
13
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export declare enum StatusSiniestro {
|
|
2
|
-
LIQUIDADO = "
|
|
2
|
+
LIQUIDADO = "pagado",
|
|
3
3
|
VIGENTE = "vigente",
|
|
4
|
-
ANULADO = "
|
|
4
|
+
ANULADO = "cancelado",
|
|
5
5
|
VENCIDO = "vencido"
|
|
6
6
|
}
|
|
7
7
|
export declare enum PolizaStatus {
|
|
@@ -12,9 +12,9 @@ export declare enum PolizaStatus {
|
|
|
12
12
|
}
|
|
13
13
|
export declare enum ReceiptStatus {
|
|
14
14
|
VIGENTE = "vigente",
|
|
15
|
-
ANULADO = "
|
|
15
|
+
ANULADO = "cancelado",
|
|
16
16
|
VENCIDO = "vencido",
|
|
17
|
-
APLICADO = "
|
|
17
|
+
APLICADO = "pagado"
|
|
18
18
|
}
|
|
19
19
|
export declare enum ReceiptMethodPayment {
|
|
20
20
|
EFECTIVO = "efectivo",
|
|
@@ -31,7 +31,7 @@ export declare enum PolizaDiasPlazoPago {
|
|
|
31
31
|
}
|
|
32
32
|
export declare enum ReceiptStageStatus {
|
|
33
33
|
VIGENTE = "vigente",
|
|
34
|
-
ANULADO = "
|
|
34
|
+
ANULADO = "cancelado",
|
|
35
35
|
VENCIDO = "vencido",
|
|
36
36
|
PAGADO = "pagado"
|
|
37
37
|
}
|
|
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.CommentType = exports.ReceiptStageStatus = exports.PolizaDiasPlazoPago = exports.PersonType = exports.ReceiptMethodPayment = exports.ReceiptStatus = exports.PolizaStatus = exports.StatusSiniestro = void 0;
|
|
4
4
|
var StatusSiniestro;
|
|
5
5
|
(function (StatusSiniestro) {
|
|
6
|
-
StatusSiniestro["LIQUIDADO"] = "
|
|
6
|
+
StatusSiniestro["LIQUIDADO"] = "pagado";
|
|
7
7
|
StatusSiniestro["VIGENTE"] = "vigente";
|
|
8
|
-
StatusSiniestro["ANULADO"] = "
|
|
8
|
+
StatusSiniestro["ANULADO"] = "cancelado";
|
|
9
9
|
StatusSiniestro["VENCIDO"] = "vencido";
|
|
10
10
|
})(StatusSiniestro || (exports.StatusSiniestro = StatusSiniestro = {}));
|
|
11
11
|
var PolizaStatus;
|
|
@@ -18,9 +18,9 @@ var PolizaStatus;
|
|
|
18
18
|
var ReceiptStatus;
|
|
19
19
|
(function (ReceiptStatus) {
|
|
20
20
|
ReceiptStatus["VIGENTE"] = "vigente";
|
|
21
|
-
ReceiptStatus["ANULADO"] = "
|
|
21
|
+
ReceiptStatus["ANULADO"] = "cancelado";
|
|
22
22
|
ReceiptStatus["VENCIDO"] = "vencido";
|
|
23
|
-
ReceiptStatus["APLICADO"] = "
|
|
23
|
+
ReceiptStatus["APLICADO"] = "pagado";
|
|
24
24
|
})(ReceiptStatus || (exports.ReceiptStatus = ReceiptStatus = {}));
|
|
25
25
|
var ReceiptMethodPayment;
|
|
26
26
|
(function (ReceiptMethodPayment) {
|
|
@@ -41,7 +41,7 @@ var PolizaDiasPlazoPago;
|
|
|
41
41
|
var ReceiptStageStatus;
|
|
42
42
|
(function (ReceiptStageStatus) {
|
|
43
43
|
ReceiptStageStatus["VIGENTE"] = "vigente";
|
|
44
|
-
ReceiptStageStatus["ANULADO"] = "
|
|
44
|
+
ReceiptStageStatus["ANULADO"] = "cancelado";
|
|
45
45
|
ReceiptStageStatus["VENCIDO"] = "vencido";
|
|
46
46
|
ReceiptStageStatus["PAGADO"] = "pagado";
|
|
47
47
|
})(ReceiptStageStatus || (exports.ReceiptStageStatus = ReceiptStageStatus = {}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sales.enum.js","sourceRoot":"","sources":["../../../src/common/enums/sales.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,
|
|
1
|
+
{"version":3,"file":"sales.enum.js","sourceRoot":"","sources":["../../../src/common/enums/sales.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,eAKX;AALD,WAAY,eAAe;IACvB,uCAAoB,CAAA;IACpB,sCAAmB,CAAA;IACnB,wCAAqB,CAAA;IACrB,sCAAmB,CAAA;AACvB,CAAC,EALW,eAAe,+BAAf,eAAe,QAK1B;AAED,IAAY,YAKX;AALD,WAAY,YAAY;IACpB,iCAAiB,CAAA;IACjB,qCAAqB,CAAA;IACrB,uCAAuB,CAAA;IACvB,wCAAwB,CAAA;AAC5B,CAAC,EALW,YAAY,4BAAZ,YAAY,QAKvB;AAED,IAAY,aAKX;AALD,WAAY,aAAa;IACrB,oCAAmB,CAAA;IACnB,sCAAqB,CAAA;IACrB,oCAAmB,CAAA;IACnB,oCAAmB,CAAA;AACvB,CAAC,EALW,aAAa,6BAAb,aAAa,QAKxB;AAED,IAAY,oBAIX;AAJD,WAAY,oBAAoB;IAC5B,6CAAqB,CAAA;IACrB,2DAAmC,CAAA;IACnC,yDAAiC,CAAA;AACrC,CAAC,EAJW,oBAAoB,oCAApB,oBAAoB,QAI/B;AAED,IAAY,UAGX;AAHD,WAAY,UAAU;IAClB,+BAAiB,CAAA;IACjB,6BAAe,CAAA;AACnB,CAAC,EAHW,UAAU,0BAAV,UAAU,QAGrB;AAED,IAAY,mBAGX;AAHD,WAAY,mBAAmB;IAC3B,mCAAY,CAAA;IACZ,mCAAY,CAAA;AAChB,CAAC,EAHW,mBAAmB,mCAAnB,mBAAmB,QAG9B;AAED,IAAY,kBAKX;AALD,WAAY,kBAAkB;IAC1B,yCAAmB,CAAA;IACnB,2CAAqB,CAAA;IACrB,yCAAmB,CAAA;IACnB,uCAAiB,CAAA;AACrB,CAAC,EALW,kBAAkB,kCAAlB,kBAAkB,QAK7B;AAED,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,4BAAa,CAAA;IACb,gCAAiB,CAAA;AACrB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.ImapFolder = void 0;
|
|
13
|
+
const database_1 = require("../common/database");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
let ImapFolder = class ImapFolder extends database_1.BaseEntity {
|
|
16
|
+
imapFolderId;
|
|
17
|
+
mailboxName;
|
|
18
|
+
userId;
|
|
19
|
+
type;
|
|
20
|
+
};
|
|
21
|
+
exports.ImapFolder = ImapFolder;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, typeorm_1.Column)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], ImapFolder.prototype, "imapFolderId", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, typeorm_1.Column)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], ImapFolder.prototype, "mailboxName", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, typeorm_1.Column)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], ImapFolder.prototype, "userId", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, typeorm_1.Column)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], ImapFolder.prototype, "type", void 0);
|
|
38
|
+
exports.ImapFolder = ImapFolder = __decorate([
|
|
39
|
+
(0, typeorm_1.Entity)()
|
|
40
|
+
], ImapFolder);
|
|
41
|
+
//# sourceMappingURL=imap-folder.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"imap-folder.entity.js","sourceRoot":"","sources":["../../src/entities/imap-folder.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qCAAyC;AAGlC,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,qBAAU;IAEtC,YAAY,CAAS;IAGrB,WAAW,CAAS;IAGpB,MAAM,CAAS;IAGf,IAAI,CAAS;CAChB,CAAA;AAZY,gCAAU;AAEnB;IADC,IAAA,gBAAM,GAAE;;gDACY;AAGrB;IADC,IAAA,gBAAM,GAAE;;+CACW;AAGpB;IADC,IAAA,gBAAM,GAAE;;0CACM;AAGf;IADC,IAAA,gBAAM,GAAE;;wCACI;qBAXJ,UAAU;IADtB,IAAA,gBAAM,GAAE;GACI,UAAU,CAYtB"}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { BaseEntity } from "../common/database";
|
|
2
|
+
import { EmailThirdparty } from "./thirdparty/email.entity";
|
|
3
|
+
export declare class Oauth extends BaseEntity {
|
|
4
|
+
service: number;
|
|
5
|
+
refresh_token: string;
|
|
6
|
+
access_token: string;
|
|
7
|
+
expires_in: number;
|
|
8
|
+
userId: string;
|
|
9
|
+
usergoogle_id: string;
|
|
10
|
+
family_name: string;
|
|
11
|
+
given_name: string;
|
|
12
|
+
email: string;
|
|
13
|
+
picture: string;
|
|
14
|
+
id_token: string;
|
|
15
|
+
emails: EmailThirdparty[];
|
|
16
|
+
}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
|
|
3
|
+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
|
|
4
|
+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
|
|
5
|
+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
|
|
6
|
+
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
7
|
+
};
|
|
8
|
+
var __metadata = (this && this.__metadata) || function (k, v) {
|
|
9
|
+
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
|
|
10
|
+
};
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Oauth = void 0;
|
|
13
|
+
const database_1 = require("../common/database");
|
|
14
|
+
const typeorm_1 = require("typeorm");
|
|
15
|
+
const email_entity_1 = require("./thirdparty/email.entity");
|
|
16
|
+
let Oauth = class Oauth extends database_1.BaseEntity {
|
|
17
|
+
service;
|
|
18
|
+
refresh_token;
|
|
19
|
+
access_token;
|
|
20
|
+
expires_in;
|
|
21
|
+
userId;
|
|
22
|
+
usergoogle_id;
|
|
23
|
+
family_name;
|
|
24
|
+
given_name;
|
|
25
|
+
email;
|
|
26
|
+
picture;
|
|
27
|
+
id_token;
|
|
28
|
+
emails;
|
|
29
|
+
};
|
|
30
|
+
exports.Oauth = Oauth;
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, typeorm_1.Column)("int"),
|
|
33
|
+
__metadata("design:type", Number)
|
|
34
|
+
], Oauth.prototype, "service", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, typeorm_1.Column)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], Oauth.prototype, "refresh_token", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, typeorm_1.Column)(),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], Oauth.prototype, "access_token", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, typeorm_1.Column)("int"),
|
|
45
|
+
__metadata("design:type", Number)
|
|
46
|
+
], Oauth.prototype, "expires_in", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, typeorm_1.Column)(),
|
|
49
|
+
__metadata("design:type", String)
|
|
50
|
+
], Oauth.prototype, "userId", void 0);
|
|
51
|
+
__decorate([
|
|
52
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], Oauth.prototype, "usergoogle_id", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
57
|
+
__metadata("design:type", String)
|
|
58
|
+
], Oauth.prototype, "family_name", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
61
|
+
__metadata("design:type", String)
|
|
62
|
+
], Oauth.prototype, "given_name", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
65
|
+
__metadata("design:type", String)
|
|
66
|
+
], Oauth.prototype, "email", void 0);
|
|
67
|
+
__decorate([
|
|
68
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
69
|
+
__metadata("design:type", String)
|
|
70
|
+
], Oauth.prototype, "picture", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, typeorm_1.Column)({ nullable: true }),
|
|
73
|
+
__metadata("design:type", String)
|
|
74
|
+
], Oauth.prototype, "id_token", void 0);
|
|
75
|
+
__decorate([
|
|
76
|
+
(0, typeorm_1.OneToMany)(() => email_entity_1.EmailThirdparty, email => email.id),
|
|
77
|
+
__metadata("design:type", Array)
|
|
78
|
+
], Oauth.prototype, "emails", void 0);
|
|
79
|
+
exports.Oauth = Oauth = __decorate([
|
|
80
|
+
(0, typeorm_1.Entity)(),
|
|
81
|
+
(0, typeorm_1.Index)(["email"], { unique: true })
|
|
82
|
+
], Oauth);
|
|
83
|
+
//# sourceMappingURL=oauth.entity.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"oauth.entity.js","sourceRoot":"","sources":["../../src/entities/oauth.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,iDAAgD;AAChD,qCAA2D;AAC3D,4DAA2D;AAIpD,IAAM,KAAK,GAAX,MAAM,KAAM,SAAQ,qBAAU;IAEnC,OAAO,CAAS;IAGhB,aAAa,CAAS;IAGtB,YAAY,CAAS;IAGrB,UAAU,CAAS;IAGnB,MAAM,CAAS;IAGf,aAAa,CAAS;IAGtB,WAAW,CAAS;IAGpB,UAAU,CAAS;IAGnB,KAAK,CAAS;IAGd,OAAO,CAAS;IAGhB,QAAQ,CAAS;IAGjB,MAAM,CAAoB;CAC3B,CAAA;AApCY,sBAAK;AAEhB;IADC,IAAA,gBAAM,EAAC,KAAK,CAAC;;sCACE;AAGhB;IADC,IAAA,gBAAM,GAAE;;4CACa;AAGtB;IADC,IAAA,gBAAM,GAAE;;2CACY;AAGrB;IADC,IAAA,gBAAM,EAAC,KAAK,CAAC;;yCACK;AAGnB;IADC,IAAA,gBAAM,GAAE;;qCACM;AAGf;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;4CACL;AAGtB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;0CACP;AAGpB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;yCACR;AAGnB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;oCACb;AAGd;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;sCACX;AAGhB;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;uCACV;AAGjB;IADC,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,8BAAe,EAAE,KAAK,CAAC,EAAE,CAAC,KAAK,CAAC,EAAE,CAAC;;qCAC1B;gBAnCf,KAAK;IAFjB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,CAAC,OAAO,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GACtB,KAAK,CAoCjB"}
|
|
@@ -1,74 +1,74 @@
|
|
|
1
|
-
// drive/proto/drive.proto
|
|
2
|
-
syntax = "proto3";
|
|
3
|
-
|
|
4
|
-
package drive;
|
|
5
|
-
|
|
6
|
-
message OwnerEntity {
|
|
7
|
-
string ownerId = 1;
|
|
8
|
-
string entityType = 2;
|
|
9
|
-
string relation = 3;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
// Define los mensajes para las operaciones de carpetas
|
|
13
|
-
message CreateFolderRequest {
|
|
14
|
-
string name = 1;
|
|
15
|
-
string parentId = 2; // Opcional, puede ser nulo si es una carpeta raíz
|
|
16
|
-
repeated OwnerEntity ownersData = 3;
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
// Create Bulk Folder
|
|
20
|
-
message CreateFolderBulkRequest {
|
|
21
|
-
repeated string foldersName = 1;
|
|
22
|
-
string parentId = 2; // Opcional, puede ser nulo si es una carpeta raíz
|
|
23
|
-
repeated OwnerEntity ownersData = 3;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
message FolderResponse {
|
|
27
|
-
string id = 1;
|
|
28
|
-
string name = 2;
|
|
29
|
-
string parentId = 3; // Opcional, puede ser nulo si es una carpeta raíz
|
|
30
|
-
string createdAt = 4;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
message CreateFolderBulkResponse {
|
|
35
|
-
bool success = 1;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
message CreateFileRequest {
|
|
39
|
-
string name = 1; // Nombre del archivo
|
|
40
|
-
string folderId = 2; // UUID del folder, opcional
|
|
41
|
-
int64 size = 3; // Tamaño del archivo, opcional
|
|
42
|
-
string mimeType = 4; // Tipo MIME del archivo, opcional
|
|
43
|
-
string s3Key = 5; // Clave S3, opcional
|
|
44
|
-
bool isDefault = 6; // Si es el archivo por defecto, opcional
|
|
45
|
-
repeated OwnerEntity ownersData = 7;
|
|
46
|
-
bytes filecontent = 8; // Contenido del archivo en bytes
|
|
47
|
-
string encoding = 9; // Codificación del archivo
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
message AttachFileRequest {
|
|
51
|
-
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
message CreateFilesRequest {
|
|
55
|
-
repeated CreateFileRequest files = 1; // Archivos
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
message CreateFilesResponse {
|
|
59
|
-
repeated string filesIds = 1;
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
message CreateFileResponse {
|
|
63
|
-
string message = 1;
|
|
64
|
-
bool success = 2;
|
|
65
|
-
string url = 3; // URL del archivo almacenado
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
// Define el servicio que será implementado
|
|
69
|
-
service DriveService {
|
|
70
|
-
rpc CreateFolder(CreateFolderRequest) returns (FolderResponse);
|
|
71
|
-
rpc CreateFile(CreateFileRequest) returns (CreateFileResponse);
|
|
72
|
-
rpc CreateFiles(CreateFilesRequest) returns (CreateFilesResponse);
|
|
73
|
-
rpc CreateFolders(CreateFolderBulkRequest) returns (CreateFolderBulkResponse);
|
|
1
|
+
// drive/proto/drive.proto
|
|
2
|
+
syntax = "proto3";
|
|
3
|
+
|
|
4
|
+
package drive;
|
|
5
|
+
|
|
6
|
+
message OwnerEntity {
|
|
7
|
+
string ownerId = 1;
|
|
8
|
+
string entityType = 2;
|
|
9
|
+
string relation = 3;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
// Define los mensajes para las operaciones de carpetas
|
|
13
|
+
message CreateFolderRequest {
|
|
14
|
+
string name = 1;
|
|
15
|
+
string parentId = 2; // Opcional, puede ser nulo si es una carpeta raíz
|
|
16
|
+
repeated OwnerEntity ownersData = 3;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Create Bulk Folder
|
|
20
|
+
message CreateFolderBulkRequest {
|
|
21
|
+
repeated string foldersName = 1;
|
|
22
|
+
string parentId = 2; // Opcional, puede ser nulo si es una carpeta raíz
|
|
23
|
+
repeated OwnerEntity ownersData = 3;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
message FolderResponse {
|
|
27
|
+
string id = 1;
|
|
28
|
+
string name = 2;
|
|
29
|
+
string parentId = 3; // Opcional, puede ser nulo si es una carpeta raíz
|
|
30
|
+
string createdAt = 4;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
message CreateFolderBulkResponse {
|
|
35
|
+
bool success = 1;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
message CreateFileRequest {
|
|
39
|
+
string name = 1; // Nombre del archivo
|
|
40
|
+
string folderId = 2; // UUID del folder, opcional
|
|
41
|
+
int64 size = 3; // Tamaño del archivo, opcional
|
|
42
|
+
string mimeType = 4; // Tipo MIME del archivo, opcional
|
|
43
|
+
string s3Key = 5; // Clave S3, opcional
|
|
44
|
+
bool isDefault = 6; // Si es el archivo por defecto, opcional
|
|
45
|
+
repeated OwnerEntity ownersData = 7;
|
|
46
|
+
bytes filecontent = 8; // Contenido del archivo en bytes
|
|
47
|
+
string encoding = 9; // Codificación del archivo
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
message AttachFileRequest {
|
|
51
|
+
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
message CreateFilesRequest {
|
|
55
|
+
repeated CreateFileRequest files = 1; // Archivos
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
message CreateFilesResponse {
|
|
59
|
+
repeated string filesIds = 1;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
message CreateFileResponse {
|
|
63
|
+
string message = 1;
|
|
64
|
+
bool success = 2;
|
|
65
|
+
string url = 3; // URL del archivo almacenado
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// Define el servicio que será implementado
|
|
69
|
+
service DriveService {
|
|
70
|
+
rpc CreateFolder(CreateFolderRequest) returns (FolderResponse);
|
|
71
|
+
rpc CreateFile(CreateFileRequest) returns (CreateFileResponse);
|
|
72
|
+
rpc CreateFiles(CreateFilesRequest) returns (CreateFilesResponse);
|
|
73
|
+
rpc CreateFolders(CreateFolderBulkRequest) returns (CreateFolderBulkResponse);
|
|
74
74
|
}
|
package/justfile
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
# prints all available commands
|
|
3
|
-
default:
|
|
4
|
-
just --list
|
|
5
|
-
|
|
6
|
-
# Upgrade and publish
|
|
7
|
-
bump:
|
|
8
|
-
pnpm bump
|
|
1
|
+
|
|
2
|
+
# prints all available commands
|
|
3
|
+
default:
|
|
4
|
+
just --list
|
|
5
|
+
|
|
6
|
+
# Upgrade and publish
|
|
7
|
+
bump:
|
|
8
|
+
pnpm bump
|
package/package.json
CHANGED
|
@@ -1,12 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "easywork-common-lib",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.412",
|
|
4
4
|
"description": "Librería común de Easywork",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
|
-
"scripts": {
|
|
7
|
-
"build": "tsc && cpx-fixed src/**/*.proto dist/",
|
|
8
|
-
"bump": "./scripts/bump.sh"
|
|
9
|
-
},
|
|
10
6
|
"repository": {
|
|
11
7
|
"type": "git",
|
|
12
8
|
"url": "git+https://github.com/criptopreto/easywork-common-lib.git"
|
|
@@ -38,5 +34,9 @@
|
|
|
38
34
|
"cpx-fixed": "^1.6.0",
|
|
39
35
|
"ts-loader": "^9.5.1",
|
|
40
36
|
"typescript": "^5.4.5"
|
|
37
|
+
},
|
|
38
|
+
"scripts": {
|
|
39
|
+
"build": "tsc && cpx-fixed src/**/*.proto dist/",
|
|
40
|
+
"bump": "./scripts/bump.sh"
|
|
41
41
|
}
|
|
42
|
-
}
|
|
42
|
+
}
|
package/scripts/bump.sh
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
git add .
|
|
2
|
-
git commit -m "bump version"
|
|
3
|
-
pnpm version patch
|
|
4
|
-
pnpm build
|
|
5
|
-
pnpm publish
|
|
1
|
+
git add .
|
|
2
|
+
git commit -m "bump version"
|
|
3
|
+
pnpm version patch
|
|
4
|
+
pnpm build
|
|
5
|
+
pnpm publish
|
|
6
6
|
git push
|
package/test.bat
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
@echo off
|
|
2
|
-
setlocal enabledelayedexpansion
|
|
3
|
-
|
|
4
|
-
rem Define the root directory
|
|
5
|
-
set "root=C:\Users\ROSME\Documents\GitHub\easywork-common-lib"
|
|
6
|
-
|
|
7
|
-
rem Iterate through all directories and subdirectories
|
|
8
|
-
for /f "delims=" %%d in ('dir "%root%" /ad /b /s') do (
|
|
9
|
-
rem Check if the directory name contains node_modules
|
|
10
|
-
echo %%d | findstr /i /c:"\node_modules" >nul
|
|
11
|
-
echo %%d | findstr /i /c:"\.git" >nul
|
|
12
|
-
if errorlevel 1 (
|
|
13
|
-
rem If not, list the directory contents
|
|
14
|
-
dir "%%d"
|
|
15
|
-
)
|
|
1
|
+
@echo off
|
|
2
|
+
setlocal enabledelayedexpansion
|
|
3
|
+
|
|
4
|
+
rem Define the root directory
|
|
5
|
+
set "root=C:\Users\ROSME\Documents\GitHub\easywork-common-lib"
|
|
6
|
+
|
|
7
|
+
rem Iterate through all directories and subdirectories
|
|
8
|
+
for /f "delims=" %%d in ('dir "%root%" /ad /b /s') do (
|
|
9
|
+
rem Check if the directory name contains node_modules
|
|
10
|
+
echo %%d | findstr /i /c:"\node_modules" >nul
|
|
11
|
+
echo %%d | findstr /i /c:"\.git" >nul
|
|
12
|
+
if errorlevel 1 (
|
|
13
|
+
rem If not, list the directory contents
|
|
14
|
+
dir "%%d"
|
|
15
|
+
)
|
|
16
16
|
)
|
package/tsconfig.build.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "./tsconfig.json",
|
|
3
|
-
"exclude": ["node_modules", "test", "dist", "**/*spec.ts", "eslint.config.js"]
|
|
4
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"exclude": ["node_modules", "test", "dist", "**/*spec.ts", "eslint.config.js"]
|
|
4
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
{
|
|
2
|
-
"extends": "@rubiin/tsconfig",
|
|
3
|
-
"compilerOptions": {
|
|
4
|
-
"module": "commonjs",
|
|
5
|
-
"declaration": true,
|
|
6
|
-
"removeComments": true,
|
|
7
|
-
"emitDecoratorMetadata": true,
|
|
8
|
-
"experimentalDecorators": true,
|
|
9
|
-
"allowSyntheticDefaultImports": true,
|
|
10
|
-
"target": "ES2022",
|
|
11
|
-
"sourceMap": true,
|
|
12
|
-
"outDir": "./dist",
|
|
13
|
-
"rootDir": "./src",
|
|
14
|
-
"baseUrl": "./src",
|
|
15
|
-
"incremental": true,
|
|
16
|
-
"strict": true,
|
|
17
|
-
"skipLibCheck": true,
|
|
18
|
-
"strictNullChecks": false,
|
|
19
|
-
"noImplicitAny": false,
|
|
20
|
-
"strictBindCallApply": false,
|
|
21
|
-
"forceConsistentCasingInFileNames": true,
|
|
22
|
-
"noFallthroughCasesInSwitch": false
|
|
23
|
-
},
|
|
24
|
-
"include": ["test/**/*", "src/**/*", "eslint.config.js"],
|
|
25
|
-
"typeRoots": ["./src/common/@types/typings"]
|
|
1
|
+
{
|
|
2
|
+
"extends": "@rubiin/tsconfig",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"module": "commonjs",
|
|
5
|
+
"declaration": true,
|
|
6
|
+
"removeComments": true,
|
|
7
|
+
"emitDecoratorMetadata": true,
|
|
8
|
+
"experimentalDecorators": true,
|
|
9
|
+
"allowSyntheticDefaultImports": true,
|
|
10
|
+
"target": "ES2022",
|
|
11
|
+
"sourceMap": true,
|
|
12
|
+
"outDir": "./dist",
|
|
13
|
+
"rootDir": "./src",
|
|
14
|
+
"baseUrl": "./src",
|
|
15
|
+
"incremental": true,
|
|
16
|
+
"strict": true,
|
|
17
|
+
"skipLibCheck": true,
|
|
18
|
+
"strictNullChecks": false,
|
|
19
|
+
"noImplicitAny": false,
|
|
20
|
+
"strictBindCallApply": false,
|
|
21
|
+
"forceConsistentCasingInFileNames": true,
|
|
22
|
+
"noFallthroughCasesInSwitch": false
|
|
23
|
+
},
|
|
24
|
+
"include": ["test/**/*", "src/**/*", "eslint.config.js"],
|
|
25
|
+
"typeRoots": ["./src/common/@types/typings"]
|
|
26
26
|
}
|