easywork-common-lib 1.0.324 → 1.0.326

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.
Files changed (49) hide show
  1. package/.gitattributes +2 -2
  2. package/.github/workflows/npm-publish.yml +33 -33
  3. package/.vscode/settings.json +12 -12
  4. package/dist/common/enums/tools.enum.d.ts +2 -1
  5. package/dist/common/enums/tools.enum.js +1 -0
  6. package/dist/common/enums/tools.enum.js.map +1 -1
  7. package/dist/entities/helpers/sales/contact/contact_sources.entity.d.ts +5 -0
  8. package/dist/entities/helpers/sales/contact/contact_sources.entity.js +36 -0
  9. package/dist/entities/helpers/sales/contact/contact_sources.entity.js.map +1 -0
  10. package/dist/entities/helpers/sales/contact/contact_types.entity.d.ts +5 -0
  11. package/dist/entities/helpers/sales/contact/contact_types.entity.js +36 -0
  12. package/dist/entities/helpers/sales/contact/contact_types.entity.js.map +1 -0
  13. package/dist/entities/helpers/sales/poliza/h_poliza_company.entity.d.ts +5 -0
  14. package/dist/entities/helpers/sales/poliza/h_poliza_company.entity.js +30 -0
  15. package/dist/entities/helpers/sales/poliza/h_poliza_company.entity.js.map +1 -0
  16. package/dist/entities/imap-folder.entity.d.ts +7 -0
  17. package/dist/entities/imap-folder.entity.js +41 -0
  18. package/dist/entities/imap-folder.entity.js.map +1 -0
  19. package/dist/entities/oauth.entity.d.ts +16 -0
  20. package/dist/entities/oauth.entity.js +83 -0
  21. package/dist/entities/oauth.entity.js.map +1 -0
  22. package/dist/grpc/drive/drive.proto +73 -73
  23. package/dist/modules/notifier/notifier.module.d.ts +4 -0
  24. package/dist/modules/notifier/notifier.module.js +52 -0
  25. package/dist/modules/notifier/notifier.module.js.map +1 -0
  26. package/dist/modules/notifier/notifier.service.d.ts +19 -0
  27. package/dist/modules/notifier/notifier.service.js +231 -0
  28. package/dist/modules/notifier/notifier.service.js.map +1 -0
  29. package/dist/modules/notifier/scheduler.service.d.ts +9 -0
  30. package/dist/modules/notifier/scheduler.service.js +40 -0
  31. package/dist/modules/notifier/scheduler.service.js.map +1 -0
  32. package/dist/modules/queue/subservices/calendar.service.d.ts +2 -0
  33. package/dist/modules/queue/subservices/calendar.service.js +17 -0
  34. package/dist/modules/queue/subservices/calendar.service.js.map +1 -0
  35. package/dist/modules/queue/subservices/contact.service.d.ts +7 -0
  36. package/dist/modules/queue/subservices/contact.service.js +49 -0
  37. package/dist/modules/queue/subservices/contact.service.js.map +1 -0
  38. package/dist/modules/queue/subservices/index.d.ts +3 -0
  39. package/dist/modules/queue/subservices/index.js +20 -0
  40. package/dist/modules/queue/subservices/index.js.map +1 -0
  41. package/dist/modules/queue/subservices/task.service.d.ts +12 -0
  42. package/dist/modules/queue/subservices/task.service.js +173 -0
  43. package/dist/modules/queue/subservices/task.service.js.map +1 -0
  44. package/package.json +42 -42
  45. package/scripts/bump.sh +5 -5
  46. package/test.bat +15 -15
  47. package/tsconfig.build.json +4 -4
  48. package/tsconfig.json +26 -26
  49. 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}}
@@ -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
  }
@@ -6,7 +6,8 @@ export declare enum TaskStatus {
6
6
  }
7
7
  export declare enum TaskCRMType {
8
8
  CONTACT = "contact",
9
- POLIZA = "poliza"
9
+ POLIZA = "poliza",
10
+ LEAD = "lead"
10
11
  }
11
12
  export declare enum EventRepeatMode {
12
13
  NONE = "none",
@@ -12,6 +12,7 @@ var TaskCRMType;
12
12
  (function (TaskCRMType) {
13
13
  TaskCRMType["CONTACT"] = "contact";
14
14
  TaskCRMType["POLIZA"] = "poliza";
15
+ TaskCRMType["LEAD"] = "lead";
15
16
  })(TaskCRMType || (exports.TaskCRMType = TaskCRMType = {}));
16
17
  var EventRepeatMode;
17
18
  (function (EventRepeatMode) {
@@ -1 +1 @@
1
- {"version":3,"file":"tools.enum.js","sourceRoot":"","sources":["../../../src/common/enums/tools.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAKX;AALD,WAAY,UAAU;IAClB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,qCAAuB,CAAA;IACvB,+CAAiC,CAAA;AACrC,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB;AAED,IAAY,WAGX;AAHD,WAAY,WAAW;IACnB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;AACrB,CAAC,EAHW,WAAW,2BAAX,WAAW,QAGtB;AAED,IAAY,eAMX;AAND,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,kCAAe,CAAA;AACnB,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B"}
1
+ {"version":3,"file":"tools.enum.js","sourceRoot":"","sources":["../../../src/common/enums/tools.enum.ts"],"names":[],"mappings":";;;AAAA,IAAY,UAKX;AALD,WAAY,UAAU;IAClB,iCAAmB,CAAA;IACnB,iCAAmB,CAAA;IACnB,qCAAuB,CAAA;IACvB,+CAAiC,CAAA;AACrC,CAAC,EALW,UAAU,0BAAV,UAAU,QAKrB;AAED,IAAY,WAIX;AAJD,WAAY,WAAW;IACnB,kCAAmB,CAAA;IACnB,gCAAiB,CAAA;IACjB,4BAAa,CAAA;AACjB,CAAC,EAJW,WAAW,2BAAX,WAAW,QAItB;AAED,IAAY,eAMX;AAND,WAAY,eAAe;IACvB,gCAAa,CAAA;IACb,oCAAiB,CAAA;IACjB,sCAAmB,CAAA;IACnB,sCAAmB,CAAA;IACnB,kCAAe,CAAA;AACnB,CAAC,EANW,eAAe,+BAAf,eAAe,QAM1B"}
@@ -0,0 +1,5 @@
1
+ import { BaseEntity } from "../../../../common/database";
2
+ export declare class ContactSource extends BaseEntity {
3
+ name: string;
4
+ isDefault: boolean;
5
+ }
@@ -0,0 +1,36 @@
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.ContactSource = void 0;
13
+ const database_1 = require("../../../../common/database");
14
+ const class_validator_1 = require("class-validator");
15
+ const typeorm_1 = require("typeorm");
16
+ const swagger_1 = require("@nestjs/swagger");
17
+ let ContactSource = class ContactSource extends database_1.BaseEntity {
18
+ name;
19
+ isDefault;
20
+ };
21
+ exports.ContactSource = ContactSource;
22
+ __decorate([
23
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Name of the contact source', minLength: 3 }),
24
+ (0, class_validator_1.MinLength)(3),
25
+ (0, typeorm_1.Column)({ unique: true }),
26
+ __metadata("design:type", String)
27
+ ], ContactSource.prototype, "name", void 0);
28
+ __decorate([
29
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is this the default contact source?', default: false }),
30
+ (0, typeorm_1.Column)({ default: false }),
31
+ __metadata("design:type", Boolean)
32
+ ], ContactSource.prototype, "isDefault", void 0);
33
+ exports.ContactSource = ContactSource = __decorate([
34
+ (0, typeorm_1.Entity)()
35
+ ], ContactSource);
36
+ //# sourceMappingURL=contact_sources.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact_sources.entity.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/contact/contact_sources.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0DAAyD;AACzD,qDAA4C;AAC5C,qCAAyC;AACzC,6CAA8C;AAGvC,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,qBAAU;IAI3C,IAAI,CAAS;IAIb,SAAS,CAAU;CACpB,CAAA;AATY,sCAAa;AAIxB;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,4BAA4B,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACtF,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;2CACZ;AAIb;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,qCAAqC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAClG,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;gDACR;wBARR,aAAa;IADzB,IAAA,gBAAM,GAAE;GACI,aAAa,CASzB"}
@@ -0,0 +1,5 @@
1
+ import { BaseEntity } from "../../../../common/database";
2
+ export declare class ContactType extends BaseEntity {
3
+ name: string;
4
+ isDefault: boolean;
5
+ }
@@ -0,0 +1,36 @@
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.ContactType = void 0;
13
+ const database_1 = require("../../../../common/database");
14
+ const class_validator_1 = require("class-validator");
15
+ const typeorm_1 = require("typeorm");
16
+ const swagger_1 = require("@nestjs/swagger");
17
+ let ContactType = class ContactType extends database_1.BaseEntity {
18
+ name;
19
+ isDefault;
20
+ };
21
+ exports.ContactType = ContactType;
22
+ __decorate([
23
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Name of the contact type', minLength: 3 }),
24
+ (0, class_validator_1.MinLength)(3),
25
+ (0, typeorm_1.Column)({ unique: true }),
26
+ __metadata("design:type", String)
27
+ ], ContactType.prototype, "name", void 0);
28
+ __decorate([
29
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is this the default contact type?', default: false }),
30
+ (0, typeorm_1.Column)({ default: false }),
31
+ __metadata("design:type", Boolean)
32
+ ], ContactType.prototype, "isDefault", void 0);
33
+ exports.ContactType = ContactType = __decorate([
34
+ (0, typeorm_1.Entity)()
35
+ ], ContactType);
36
+ //# sourceMappingURL=contact_types.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"contact_types.entity.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/contact/contact_types.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,0DAAyD;AACzD,qDAA4C;AAC5C,qCAAyC;AACzC,6CAA8C;AAGvC,IAAM,WAAW,GAAjB,MAAM,WAAY,SAAQ,qBAAU;IAIzC,IAAI,CAAS;IAIb,SAAS,CAAU;CACpB,CAAA;AATY,kCAAW;AAItB;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,0BAA0B,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IACpF,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;yCACZ;AAIb;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,mCAAmC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAChG,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;8CACR;sBARR,WAAW;IADvB,IAAA,gBAAM,GAAE;GACI,WAAW,CASvB"}
@@ -0,0 +1,5 @@
1
+ import { BaseEntity } from "typeorm";
2
+ export declare class PolizaCompany extends BaseEntity {
3
+ id?: string;
4
+ name: string;
5
+ }
@@ -0,0 +1,30 @@
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.PolizaCompany = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ let PolizaCompany = class PolizaCompany extends typeorm_1.BaseEntity {
15
+ id;
16
+ name;
17
+ };
18
+ exports.PolizaCompany = PolizaCompany;
19
+ __decorate([
20
+ (0, typeorm_1.PrimaryGeneratedColumn)("uuid"),
21
+ __metadata("design:type", String)
22
+ ], PolizaCompany.prototype, "id", void 0);
23
+ __decorate([
24
+ (0, typeorm_1.Column)({ unique: true }),
25
+ __metadata("design:type", String)
26
+ ], PolizaCompany.prototype, "name", void 0);
27
+ exports.PolizaCompany = PolizaCompany = __decorate([
28
+ (0, typeorm_1.Entity)()
29
+ ], PolizaCompany);
30
+ //# sourceMappingURL=h_poliza_company.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"h_poliza_company.entity.js","sourceRoot":"","sources":["../../../../../src/entities/helpers/sales/poliza/h_poliza_company.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAA8E;AAGvE,IAAM,aAAa,GAAnB,MAAM,aAAc,SAAQ,oBAAU;IAEzC,EAAE,CAAU;IAGZ,IAAI,CAAS;CAChB,CAAA;AANY,sCAAa;AAEtB;IADC,IAAA,gCAAsB,EAAC,MAAM,CAAC;;yCACnB;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;2CACZ;wBALJ,aAAa;IADzB,IAAA,gBAAM,GAAE;GACI,aAAa,CAMzB"}
@@ -0,0 +1,7 @@
1
+ import { BaseEntity } from "../common/database";
2
+ export declare class ImapFolder extends BaseEntity {
3
+ imapFolderId: string;
4
+ mailboxName: string;
5
+ userId: string;
6
+ type: string;
7
+ }
@@ -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
  }
@@ -0,0 +1,4 @@
1
+ import { DynamicModule } from '@nestjs/common';
2
+ export declare class EasyNotifierModule {
3
+ static register(exchangeName: string, routingKey: string, rabbitMQUri: string): DynamicModule;
4
+ }
@@ -0,0 +1,52 @@
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 EasyNotifierModule_1;
9
+ Object.defineProperty(exports, "__esModule", { value: true });
10
+ exports.EasyNotifierModule = void 0;
11
+ const common_1 = require("@nestjs/common");
12
+ const notifier_service_1 = require("./notifier.service");
13
+ const nestjs_rabbitmq_1 = require("@golevelup/nestjs-rabbitmq");
14
+ const scheduler_service_1 = require("./scheduler.service");
15
+ let EasyNotifierModule = EasyNotifierModule_1 = class EasyNotifierModule {
16
+ static register(exchangeName, routingKey, rabbitMQUri) {
17
+ console.log(`EasyNotifierModule.register: exchangeName=${exchangeName}, routingKey=${routingKey}, rabbitMQUri=${rabbitMQUri}`);
18
+ return {
19
+ module: EasyNotifierModule_1,
20
+ imports: [
21
+ nestjs_rabbitmq_1.RabbitMQModule.forRoot(nestjs_rabbitmq_1.RabbitMQModule, {
22
+ exchanges: [
23
+ {
24
+ name: exchangeName,
25
+ type: 'topic',
26
+ },
27
+ ],
28
+ uri: rabbitMQUri,
29
+ }),
30
+ ],
31
+ providers: [
32
+ {
33
+ provide: 'EXCHANGE_NAME',
34
+ useValue: exchangeName,
35
+ },
36
+ {
37
+ provide: 'ROUTING_KEY',
38
+ useValue: routingKey,
39
+ },
40
+ notifier_service_1.EasyNotifierService,
41
+ scheduler_service_1.EasySchedulerService,
42
+ ],
43
+ exports: [notifier_service_1.EasyNotifierService, scheduler_service_1.EasySchedulerService],
44
+ };
45
+ }
46
+ };
47
+ exports.EasyNotifierModule = EasyNotifierModule;
48
+ exports.EasyNotifierModule = EasyNotifierModule = EasyNotifierModule_1 = __decorate([
49
+ (0, common_1.Global)(),
50
+ (0, common_1.Module)({})
51
+ ], EasyNotifierModule);
52
+ //# sourceMappingURL=notifier.module.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"notifier.module.js","sourceRoot":"","sources":["../../../src/modules/notifier/notifier.module.ts"],"names":[],"mappings":";;;;;;;;;;AAAA,2CAA+D;AAC/D,yDAAyD;AACzD,gEAA4D;AAC5D,2DAA2D;AAIpD,IAAM,kBAAkB,0BAAxB,MAAM,kBAAkB;IAC3B,MAAM,CAAC,QAAQ,CAAC,YAAoB,EAAE,UAAkB,EAAE,WAAmB;QAEzE,OAAO,CAAC,GAAG,CAAC,6CAA6C,YAAY,gBAAgB,UAAU,iBAAiB,WAAW,EAAE,CAAC,CAAC;QAC/H,OAAO;YACH,MAAM,EAAE,oBAAkB;YAC1B,OAAO,EAAE;gBACL,gCAAc,CAAC,OAAO,CAAC,gCAAc,EAAE;oBACnC,SAAS,EAAE;wBACP;4BACI,IAAI,EAAE,YAAY;4BAClB,IAAI,EAAE,OAAO;yBAChB;qBACJ;oBACD,GAAG,EAAE,WAAW;iBACnB,CAAC;aACL;YACD,SAAS,EAAE;gBACP;oBACI,OAAO,EAAE,eAAe;oBACxB,QAAQ,EAAE,YAAY;iBACzB;gBACD;oBACI,OAAO,EAAE,aAAa;oBACtB,QAAQ,EAAE,UAAU;iBACvB;gBACD,sCAAmB;gBACnB,wCAAoB;aACvB;YACD,OAAO,EAAE,CAAC,sCAAmB,EAAE,wCAAoB,CAAC;SACvD,CAAC;IACN,CAAC;CACJ,CAAA;AAhCY,gDAAkB;6BAAlB,kBAAkB;IAF9B,IAAA,eAAM,GAAE;IACR,IAAA,eAAM,EAAC,EAAE,CAAC;GACE,kBAAkB,CAgC9B"}