easywork-common-lib 1.0.379 → 1.0.380

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 (231) hide show
  1. package/dist/common/database/base.entity.d.ts +27 -0
  2. package/dist/common/index.d.ts +7 -0
  3. package/dist/common/index.js +24 -0
  4. package/dist/common/index.js.map +1 -0
  5. package/dist/entities/app_config/app-config.entity.d.ts +5 -0
  6. package/dist/entities/app_config/app-config.entity.js +33 -0
  7. package/dist/entities/app_config/app-config.entity.js.map +1 -0
  8. package/dist/entities/currency.entity.d.ts +6 -0
  9. package/dist/entities/currency.entity.js +43 -0
  10. package/dist/entities/currency.entity.js.map +1 -0
  11. package/dist/entities/drive/attached_object.entity.d.ts +17 -0
  12. package/dist/entities/drive/attached_object.entity.js +125 -0
  13. package/dist/entities/drive/attached_object.entity.js.map +1 -0
  14. package/dist/entities/drive/file.entity.d.ts +14 -0
  15. package/dist/entities/drive/file.entity.js +88 -0
  16. package/dist/entities/drive/file.entity.js.map +1 -0
  17. package/dist/entities/drive/folder.entity.d.ts +14 -0
  18. package/dist/entities/drive/folder.entity.js +108 -0
  19. package/dist/entities/drive/folder.entity.js.map +1 -0
  20. package/dist/entities/drive/index.d.ts +3 -0
  21. package/dist/entities/drive/index.js +20 -0
  22. package/dist/entities/drive/index.js.map +1 -0
  23. package/dist/entities/easyapp/filter-view.entity.d.ts +7 -0
  24. package/dist/entities/easyapp/filter-view.entity.js +41 -0
  25. package/dist/entities/easyapp/filter-view.entity.js.map +1 -0
  26. package/dist/entities/email.entity.d.ts +5 -0
  27. package/dist/entities/email.entity.js +36 -0
  28. package/dist/entities/email.entity.js.map +1 -0
  29. package/dist/entities/group.entity.d.ts +5 -0
  30. package/dist/entities/group.entity.js +33 -0
  31. package/dist/entities/group.entity.js.map +1 -0
  32. package/dist/entities/helpers/entity_file.entity.d.ts +10 -0
  33. package/dist/entities/helpers/entity_file.entity.js +61 -0
  34. package/dist/entities/helpers/entity_file.entity.js.map +1 -0
  35. package/dist/entities/helpers/entity_folder.entity.d.ts +10 -0
  36. package/dist/entities/helpers/entity_folder.entity.js +61 -0
  37. package/dist/entities/helpers/entity_folder.entity.js.map +1 -0
  38. package/dist/entities/helpers/index.d.ts +4 -0
  39. package/dist/entities/helpers/sales/common/client_sources.entity.d.ts +5 -0
  40. package/dist/entities/helpers/sales/common/client_sources.entity.js +36 -0
  41. package/dist/entities/helpers/sales/common/client_sources.entity.js.map +1 -0
  42. package/dist/entities/helpers/sales/common/client_types.entity.d.ts +5 -0
  43. package/dist/entities/helpers/sales/common/client_types.entity.js +36 -0
  44. package/dist/entities/helpers/sales/common/client_types.entity.js.map +1 -0
  45. package/dist/entities/helpers/sales/contact/contact_email.entity.d.ts +11 -0
  46. package/dist/entities/helpers/sales/contact/contact_email.entity.js +68 -0
  47. package/dist/entities/helpers/sales/contact/contact_email.entity.js.map +1 -0
  48. package/dist/entities/helpers/sales/contact/contact_insurance.entity.d.ts +11 -0
  49. package/dist/entities/helpers/sales/contact/contact_insurance.entity.js +68 -0
  50. package/dist/entities/helpers/sales/contact/contact_insurance.entity.js.map +1 -0
  51. package/dist/entities/helpers/sales/contact/contact_phone.entity.d.ts +11 -0
  52. package/dist/entities/helpers/sales/contact/contact_phone.entity.js +68 -0
  53. package/dist/entities/helpers/sales/contact/contact_phone.entity.js.map +1 -0
  54. package/dist/entities/helpers/sales/contact/index.d.ts +5 -0
  55. package/dist/entities/helpers/sales/contact/index.js +22 -0
  56. package/dist/entities/helpers/sales/contact/index.js.map +1 -0
  57. package/dist/entities/helpers/sales/index.d.ts +6 -0
  58. package/dist/entities/helpers/sales/lead/h_lead_source.entity.d.ts +4 -0
  59. package/dist/entities/helpers/sales/lead/h_lead_source.entity.js +30 -0
  60. package/dist/entities/helpers/sales/lead/h_lead_source.entity.js.map +1 -0
  61. package/dist/entities/helpers/sales/lead/h_lead_stage.entity.d.ts +5 -0
  62. package/dist/entities/helpers/sales/lead/h_lead_stage.entity.js +36 -0
  63. package/dist/entities/helpers/sales/lead/h_lead_stage.entity.js.map +1 -0
  64. package/dist/entities/helpers/sales/lead/h_lead_types.entity.d.ts +4 -0
  65. package/dist/entities/helpers/sales/lead/h_lead_types.entity.js +30 -0
  66. package/dist/entities/helpers/sales/lead/h_lead_types.entity.js.map +1 -0
  67. package/dist/entities/helpers/sales/lead/index.d.ts +6 -0
  68. package/dist/entities/helpers/sales/lead/index.js +23 -0
  69. package/dist/entities/helpers/sales/lead/index.js.map +1 -0
  70. package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.d.ts +4 -0
  71. package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.js +28 -0
  72. package/dist/entities/helpers/sales/lead/lead_cancel_reazon.entity.js.map +1 -0
  73. package/dist/entities/helpers/sales/lead/lead_email.entity.d.ts +11 -0
  74. package/dist/entities/helpers/sales/lead/lead_email.entity.js +66 -0
  75. package/dist/entities/helpers/sales/lead/lead_email.entity.js.map +1 -0
  76. package/dist/entities/helpers/sales/lead/lead_phone.entity.d.ts +11 -0
  77. package/dist/entities/helpers/sales/lead/lead_phone.entity.js +66 -0
  78. package/dist/entities/helpers/sales/lead/lead_phone.entity.js.map +1 -0
  79. package/dist/entities/helpers/sales/poliza/index.d.ts +9 -0
  80. package/dist/entities/helpers/sales/poliza/poliza_beneficiary.entity.d.ts +12 -0
  81. package/dist/entities/helpers/sales/poliza/poliza_beneficiary.entity.js +73 -0
  82. package/dist/entities/helpers/sales/poliza/poliza_beneficiary.entity.js.map +1 -0
  83. package/dist/entities/helpers/sales/poliza/poliza_file.entity.d.ts +11 -0
  84. package/dist/entities/helpers/sales/poliza/poliza_file.entity.js +68 -0
  85. package/dist/entities/helpers/sales/poliza/poliza_file.entity.js.map +1 -0
  86. package/dist/entities/helpers/tools/index.d.ts +1 -0
  87. package/dist/entities/helpers/tools/index.js +18 -0
  88. package/dist/entities/helpers/tools/index.js.map +1 -0
  89. package/dist/entities/helpers/tools/task_crm.entity.d.ts +17 -0
  90. package/dist/entities/helpers/tools/task_crm.entity.js +121 -0
  91. package/dist/entities/helpers/tools/task_crm.entity.js.map +1 -0
  92. package/dist/entities/imap-config.entity.d.ts +11 -0
  93. package/dist/entities/imap-config.entity.js +61 -0
  94. package/dist/entities/imap-config.entity.js.map +1 -0
  95. package/dist/entities/index.d.ts +26 -0
  96. package/dist/entities/index.js +43 -0
  97. package/dist/entities/index.js.map +1 -0
  98. package/dist/entities/menu-permissions.entity.d.ts +7 -0
  99. package/dist/entities/menu-permissions.entity.js +42 -0
  100. package/dist/entities/menu-permissions.entity.js.map +1 -0
  101. package/dist/entities/notifications/index.d.ts +2 -0
  102. package/dist/entities/notifications/index.js +19 -0
  103. package/dist/entities/notifications/index.js.map +1 -0
  104. package/dist/entities/notifications/notification.entity.d.ts +15 -0
  105. package/dist/entities/notifications/notification.entity.js +119 -0
  106. package/dist/entities/notifications/notification.entity.js.map +1 -0
  107. package/dist/entities/notifications/push-token.entity.d.ts +7 -0
  108. package/dist/entities/notifications/push-token.entity.js +45 -0
  109. package/dist/entities/notifications/push-token.entity.js.map +1 -0
  110. package/dist/entities/otp-log.entity.d.ts +8 -0
  111. package/dist/entities/otp-log.entity.js +49 -0
  112. package/dist/entities/otp-log.entity.js.map +1 -0
  113. package/dist/entities/permission.entity.d.ts +7 -0
  114. package/dist/entities/permission.entity.js +46 -0
  115. package/dist/entities/permission.entity.js.map +1 -0
  116. package/dist/entities/phone.entity.d.ts +5 -0
  117. package/dist/entities/phone.entity.js +36 -0
  118. package/dist/entities/phone.entity.js.map +1 -0
  119. package/dist/entities/profile.entity.d.ts +9 -0
  120. package/dist/entities/protocol.entity.d.ts +8 -0
  121. package/dist/entities/protocol.entity.js +46 -0
  122. package/dist/entities/protocol.entity.js.map +1 -0
  123. package/dist/entities/refresh-token.entity.d.ts +8 -0
  124. package/dist/entities/refresh-token.entity.js +46 -0
  125. package/dist/entities/refresh-token.entity.js.map +1 -0
  126. package/dist/entities/role.entity.d.ts +5 -0
  127. package/dist/entities/role.entity.js +36 -0
  128. package/dist/entities/role.entity.js.map +1 -0
  129. package/dist/entities/sales/agente-intermediario.entity.d.ts +5 -0
  130. package/dist/entities/sales/agente-intermediario.entity.js +34 -0
  131. package/dist/entities/sales/agente-intermediario.entity.js.map +1 -0
  132. package/dist/entities/sales/beneficiarios/person.entity.d.ts +10 -0
  133. package/dist/entities/sales/beneficiarios/person.entity.js +64 -0
  134. package/dist/entities/sales/beneficiarios/person.entity.js.map +1 -0
  135. package/dist/entities/sales/beneficiarios/vehicle.entity.d.ts +13 -0
  136. package/dist/entities/sales/beneficiarios/vehicle.entity.js +83 -0
  137. package/dist/entities/sales/beneficiarios/vehicle.entity.js.map +1 -0
  138. package/dist/entities/sales/contact-comment.entity.d.ts +7 -0
  139. package/dist/entities/sales/contact-comment.entity.js +46 -0
  140. package/dist/entities/sales/contact-comment.entity.js.map +1 -0
  141. package/dist/entities/sales/contact.entity.d.ts +44 -0
  142. package/dist/entities/sales/contact.entity.js +267 -0
  143. package/dist/entities/sales/contact.entity.js.map +1 -0
  144. package/dist/entities/sales/index.d.ts +13 -0
  145. package/dist/entities/sales/index.js +30 -0
  146. package/dist/entities/sales/index.js.map +1 -0
  147. package/dist/entities/sales/lead-comment.entity.d.ts +7 -0
  148. package/dist/entities/sales/lead-comment.entity.js +46 -0
  149. package/dist/entities/sales/lead-comment.entity.js.map +1 -0
  150. package/dist/entities/sales/lead.entity.d.ts +43 -0
  151. package/dist/entities/sales/lead.entity.js +291 -0
  152. package/dist/entities/sales/lead.entity.js.map +1 -0
  153. package/dist/entities/sales/poliza-comment.entity.d.ts +7 -0
  154. package/dist/entities/sales/poliza-comment.entity.js +46 -0
  155. package/dist/entities/sales/poliza-comment.entity.js.map +1 -0
  156. package/dist/entities/sales/poliza.entity.d.ts +105 -0
  157. package/dist/entities/sales/poliza.entity.js +723 -0
  158. package/dist/entities/sales/poliza.entity.js.map +1 -0
  159. package/dist/entities/sales/poliza_siniestro.entity.d.ts +12 -0
  160. package/dist/entities/sales/poliza_siniestro.entity.js +72 -0
  161. package/dist/entities/sales/poliza_siniestro.entity.js.map +1 -0
  162. package/dist/entities/sales/receipt-sub-agente.entity.d.ts +5 -0
  163. package/dist/entities/sales/receipt-sub-agente.entity.js +35 -0
  164. package/dist/entities/sales/receipt-sub-agente.entity.js.map +1 -0
  165. package/dist/entities/sales/receipt.entity.d.ts +27 -0
  166. package/dist/entities/sales/receipt.entity.js +172 -0
  167. package/dist/entities/sales/receipt.entity.js.map +1 -0
  168. package/dist/entities/tag.entity.d.ts +8 -0
  169. package/dist/entities/tag.entity.js +53 -0
  170. package/dist/entities/tag.entity.js.map +1 -0
  171. package/dist/entities/thirdparty/email-config.entity.d.ts +14 -0
  172. package/dist/entities/thirdparty/email-config.entity.js +76 -0
  173. package/dist/entities/thirdparty/email-config.entity.js.map +1 -0
  174. package/dist/entities/thirdparty/email.entity.d.ts +17 -0
  175. package/dist/entities/thirdparty/email.entity.js +79 -0
  176. package/dist/entities/thirdparty/email.entity.js.map +1 -0
  177. package/dist/entities/thirdparty/oauth.entity.d.ts +17 -0
  178. package/dist/entities/thirdparty/oauth.entity.js +88 -0
  179. package/dist/entities/thirdparty/oauth.entity.js.map +1 -0
  180. package/dist/entities/thirdparty/service.entity.d.ts +6 -0
  181. package/dist/entities/thirdparty/service.entity.js +32 -0
  182. package/dist/entities/thirdparty/service.entity.js.map +1 -0
  183. package/dist/entities/thirdparty/user-email-relation.entity.d.ts +7 -0
  184. package/dist/entities/thirdparty/user-email-relation.entity.js +35 -0
  185. package/dist/entities/thirdparty/user-email-relation.entity.js.map +1 -0
  186. package/dist/entities/tools/calendar/event.entity.d.ts +17 -0
  187. package/dist/entities/tools/calendar/event.entity.js +110 -0
  188. package/dist/entities/tools/calendar/event.entity.js.map +1 -0
  189. package/dist/entities/tools/calendar/index.d.ts +1 -0
  190. package/dist/entities/tools/calendar/index.js +18 -0
  191. package/dist/entities/tools/calendar/index.js.map +1 -0
  192. package/dist/entities/tools/index.d.ts +4 -0
  193. package/dist/entities/tools/index.js +21 -0
  194. package/dist/entities/tools/index.js.map +1 -0
  195. package/dist/entities/tools/task-comment.entity.d.ts +9 -0
  196. package/dist/entities/tools/task-comment.entity.js +57 -0
  197. package/dist/entities/tools/task-comment.entity.js.map +1 -0
  198. package/dist/entities/tools/task.entity.d.ts +34 -0
  199. package/dist/entities/tools/task.entity.js +221 -0
  200. package/dist/entities/tools/task.entity.js.map +1 -0
  201. package/dist/entities/user.entity.d.ts +28 -0
  202. package/dist/entities/user.entity.js +160 -0
  203. package/dist/entities/user.entity.js.map +1 -0
  204. package/dist/grpc/drive/drive.proto +74 -0
  205. package/dist/index.d.ts +3 -0
  206. package/dist/index.js +20 -0
  207. package/dist/index.js.map +1 -0
  208. package/dist/modules/index.d.ts +3 -0
  209. package/dist/modules/index.js +20 -0
  210. package/dist/modules/index.js.map +1 -0
  211. package/dist/modules/queue/notifier.service.d.ts +15 -0
  212. package/dist/modules/queue/notifier.service.js +70 -0
  213. package/dist/modules/queue/notifier.service.js.map +1 -0
  214. package/dist/modules/queue/notifiers/contact.notifier.d.ts +7 -0
  215. package/dist/modules/queue/notifiers/contact.notifier.js +49 -0
  216. package/dist/modules/queue/notifiers/contact.notifier.js.map +1 -0
  217. package/dist/modules/queue/notifiers/index.d.ts +4 -0
  218. package/dist/modules/queue/notifiers/index.js +21 -0
  219. package/dist/modules/queue/notifiers/index.js.map +1 -0
  220. package/dist/modules/queue/notifiers/lead.notifier.d.ts +7 -0
  221. package/dist/modules/queue/notifiers/lead.notifier.js +49 -0
  222. package/dist/modules/queue/notifiers/lead.notifier.js.map +1 -0
  223. package/dist/modules/queue/notifiers/task.notifier.d.ts +15 -0
  224. package/dist/modules/queue/notifiers/task.notifier.js +130 -0
  225. package/dist/modules/queue/notifiers/task.notifier.js.map +1 -0
  226. package/dist/modules/queue/queue.module.d.ts +4 -0
  227. package/dist/modules/queue/queue.module.js +55 -0
  228. package/dist/modules/queue/queue.module.js.map +1 -0
  229. package/dist/modules/queue/scheduler.service.d.ts +9 -0
  230. package/package.json +1 -1
  231. package/tsconfig.tsbuildinfo +1 -1
@@ -0,0 +1,27 @@
1
+ import { User } from "../../entities/user.entity";
2
+ import { BaseEntity as EntityBase } from "typeorm";
3
+ export declare class BaseEntity extends EntityBase {
4
+ id?: string;
5
+ isActive?: boolean;
6
+ isDeleted?: boolean;
7
+ createdAt?: Date;
8
+ updatedAt?: Date;
9
+ deletedAt?: Date;
10
+ }
11
+ export declare class BaseEntitySimple extends EntityBase {
12
+ id?: string;
13
+ createdAt?: Date;
14
+ updatedAt?: Date;
15
+ deletedAt?: Date;
16
+ }
17
+ export declare class BaseEntityWithUser extends EntityBase {
18
+ id?: string;
19
+ number: number;
20
+ isActive?: boolean;
21
+ isDeleted?: boolean;
22
+ createdAt?: Date;
23
+ updatedAt?: Date;
24
+ deletedAt?: Date;
25
+ createdBy?: User;
26
+ modifiedBy?: User;
27
+ }
@@ -0,0 +1,7 @@
1
+ export * from './@types';
2
+ export * from './constants';
3
+ export * from './dtos';
4
+ export * from './enums';
5
+ export * from './helpers';
6
+ export * from './interceptors';
7
+ export * from './functions';
@@ -0,0 +1,24 @@
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("./@types"), exports);
18
+ __exportStar(require("./constants"), exports);
19
+ __exportStar(require("./dtos"), exports);
20
+ __exportStar(require("./enums"), exports);
21
+ __exportStar(require("./helpers"), exports);
22
+ __exportStar(require("./interceptors"), exports);
23
+ __exportStar(require("./functions"), exports);
24
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/common/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,2CAAyB;AACzB,8CAA4B;AAC5B,yCAAuB;AACvB,0CAAwB;AACxB,4CAA0B;AAC1B,iDAA+B;AAC/B,8CAA4B"}
@@ -0,0 +1,5 @@
1
+ import { BaseEntity } from "../../common/database/base.entity";
2
+ export declare class AppConfig extends BaseEntity {
3
+ key: string;
4
+ value: string;
5
+ }
@@ -0,0 +1,33 @@
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.AppConfig = void 0;
13
+ const base_entity_1 = require("../../common/database/base.entity");
14
+ const class_validator_1 = require("class-validator");
15
+ const typeorm_1 = require("typeorm");
16
+ let AppConfig = class AppConfig extends base_entity_1.BaseEntity {
17
+ key;
18
+ value;
19
+ };
20
+ exports.AppConfig = AppConfig;
21
+ __decorate([
22
+ (0, class_validator_1.MinLength)(3),
23
+ (0, typeorm_1.Column)({ unique: true }),
24
+ __metadata("design:type", String)
25
+ ], AppConfig.prototype, "key", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)({ nullable: true }),
28
+ __metadata("design:type", String)
29
+ ], AppConfig.prototype, "value", void 0);
30
+ exports.AppConfig = AppConfig = __decorate([
31
+ (0, typeorm_1.Entity)()
32
+ ], AppConfig);
33
+ //# sourceMappingURL=app-config.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"app-config.entity.js","sourceRoot":"","sources":["../../../src/entities/app_config/app-config.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAA+D;AAC/D,qDAA4C;AAC5C,qCAAyC;AAGlC,IAAM,SAAS,GAAf,MAAM,SAAU,SAAQ,wBAAU;IAGvC,GAAG,CAAS;IAGZ,KAAK,CAAS;CACf,CAAA;AAPY,8BAAS;AAGpB;IAFC,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;sCACb;AAGZ;IADC,IAAA,gBAAM,EAAC,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;;wCACb;oBANH,SAAS;IADrB,IAAA,gBAAM,GAAE;GACI,SAAS,CAOrB"}
@@ -0,0 +1,6 @@
1
+ import { BaseEntity } from "../common/database/base.entity";
2
+ export declare class Currency extends BaseEntity {
3
+ name: string;
4
+ symbol: string;
5
+ isDefault: boolean;
6
+ }
@@ -0,0 +1,43 @@
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.Currency = void 0;
13
+ const swagger_1 = require("@nestjs/swagger");
14
+ const base_entity_1 = require("../common/database/base.entity");
15
+ const class_validator_1 = require("class-validator");
16
+ const typeorm_1 = require("typeorm");
17
+ let Currency = class Currency extends base_entity_1.BaseEntity {
18
+ name;
19
+ symbol;
20
+ isDefault;
21
+ };
22
+ exports.Currency = Currency;
23
+ __decorate([
24
+ (0, swagger_1.ApiProperty)({ type: String, description: 'name of the currency', minLength: 1, example: 'Dólar' }),
25
+ (0, class_validator_1.MinLength)(1),
26
+ (0, typeorm_1.Column)({ unique: true }),
27
+ __metadata("design:type", String)
28
+ ], Currency.prototype, "name", void 0);
29
+ __decorate([
30
+ (0, swagger_1.ApiProperty)({ type: String, description: 'symbol of the currency', minLength: 1, example: 'USD' }),
31
+ (0, class_validator_1.MinLength)(1),
32
+ (0, typeorm_1.Column)({ unique: true }),
33
+ __metadata("design:type", String)
34
+ ], Currency.prototype, "symbol", void 0);
35
+ __decorate([
36
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: '¿Is this the default currency?' }),
37
+ (0, typeorm_1.Column)({ default: false }),
38
+ __metadata("design:type", Boolean)
39
+ ], Currency.prototype, "isDefault", void 0);
40
+ exports.Currency = Currency = __decorate([
41
+ (0, typeorm_1.Entity)()
42
+ ], Currency);
43
+ //# sourceMappingURL=currency.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"currency.entity.js","sourceRoot":"","sources":["../../src/entities/currency.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAC9C,gEAA4D;AAC5D,qDAA4C;AAC5C,qCAAyC;AAGlC,IAAM,QAAQ,GAAd,MAAM,QAAS,SAAQ,wBAAU;IAIpC,IAAI,CAAS;IAKb,MAAM,CAAS;IAIf,SAAS,CAAU;CACtB,CAAA;AAdY,4BAAQ;AAIjB;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,sBAAsB,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,OAAO,EAAE,CAAC;IAClG,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;sCACZ;AAKb;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,wBAAwB,EAAE,SAAS,EAAE,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IAClG,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,EAAC,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;;wCACV;AAIf;IAFC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,gCAAgC,EAAE,CAAC;IAC7E,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;2CACR;mBAbV,QAAQ;IADpB,IAAA,gBAAM,GAAE;GACI,QAAQ,CAcpB"}
@@ -0,0 +1,17 @@
1
+ import { BaseEntityWithUser } from "../../common/database/base.entity";
2
+ import { EntityFile } from "../helpers/entity_file.entity";
3
+ import { AttachEntityType, AttachModule } from "../../common";
4
+ export declare class AttachedObject extends BaseEntityWithUser {
5
+ name: string;
6
+ url: string;
7
+ size: number;
8
+ mimeType: string;
9
+ s3Key: string;
10
+ isDefault: boolean;
11
+ module: AttachModule;
12
+ entityType: AttachEntityType;
13
+ entityId: string;
14
+ isTemporary: boolean;
15
+ metadata: Record<string, any>;
16
+ owners?: EntityFile[];
17
+ }
@@ -0,0 +1,125 @@
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.AttachedObject = void 0;
13
+ const base_entity_1 = require("../../common/database/base.entity");
14
+ const class_validator_1 = require("class-validator");
15
+ const typeorm_1 = require("typeorm");
16
+ const entity_file_entity_1 = require("../helpers/entity_file.entity");
17
+ const swagger_1 = require("@nestjs/swagger");
18
+ const common_1 = require("../../common");
19
+ let AttachedObject = class AttachedObject extends base_entity_1.BaseEntityWithUser {
20
+ name;
21
+ url;
22
+ size;
23
+ mimeType;
24
+ s3Key;
25
+ isDefault;
26
+ module;
27
+ entityType;
28
+ entityId;
29
+ isTemporary;
30
+ metadata;
31
+ owners;
32
+ };
33
+ exports.AttachedObject = AttachedObject;
34
+ __decorate([
35
+ (0, swagger_1.ApiProperty)({ type: String, description: 'File name', minLength: 1 }),
36
+ (0, class_validator_1.MinLength)(1),
37
+ (0, typeorm_1.Column)(),
38
+ __metadata("design:type", String)
39
+ ], AttachedObject.prototype, "name", void 0);
40
+ __decorate([
41
+ (0, swagger_1.ApiProperty)({ type: String, description: 'URL of the file', required: false }),
42
+ (0, typeorm_1.Column)({ nullable: true }),
43
+ __metadata("design:type", String)
44
+ ], AttachedObject.prototype, "url", void 0);
45
+ __decorate([
46
+ (0, swagger_1.ApiProperty)({ type: 'bigint', description: 'Size of the file in bytes', required: false }),
47
+ (0, typeorm_1.Column)({ nullable: true, type: "bigint" }),
48
+ __metadata("design:type", Number)
49
+ ], AttachedObject.prototype, "size", void 0);
50
+ __decorate([
51
+ (0, swagger_1.ApiProperty)({ type: String, description: 'MIME type of the file', required: false }),
52
+ (0, typeorm_1.Column)({ nullable: true }),
53
+ __metadata("design:type", String)
54
+ ], AttachedObject.prototype, "mimeType", void 0);
55
+ __decorate([
56
+ (0, swagger_1.ApiProperty)({ type: String, description: 'S3 key of the file', required: false }),
57
+ (0, typeorm_1.Column)({ nullable: true }),
58
+ __metadata("design:type", String)
59
+ ], AttachedObject.prototype, "s3Key", void 0);
60
+ __decorate([
61
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is this the default file?', default: false }),
62
+ (0, typeorm_1.Column)({ default: false }),
63
+ __metadata("design:type", Boolean)
64
+ ], AttachedObject.prototype, "isDefault", void 0);
65
+ __decorate([
66
+ (0, swagger_1.ApiProperty)({
67
+ enum: common_1.AttachModule,
68
+ description: 'Module that the file is attached to',
69
+ }),
70
+ (0, typeorm_1.Column)({
71
+ type: "enum",
72
+ enum: common_1.AttachModule,
73
+ nullable: true,
74
+ }),
75
+ __metadata("design:type", String)
76
+ ], AttachedObject.prototype, "module", void 0);
77
+ __decorate([
78
+ (0, swagger_1.ApiProperty)({
79
+ enum: common_1.AttachEntityType,
80
+ description: 'Type of entity that the file is attached to',
81
+ nullable: true,
82
+ }),
83
+ (0, typeorm_1.Column)({
84
+ type: "enum",
85
+ enum: common_1.AttachEntityType,
86
+ nullable: true,
87
+ }),
88
+ __metadata("design:type", String)
89
+ ], AttachedObject.prototype, "entityType", void 0);
90
+ __decorate([
91
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Entity identifier with attachment', required: false }),
92
+ (0, typeorm_1.Column)({ nullable: true }),
93
+ __metadata("design:type", String)
94
+ ], AttachedObject.prototype, "entityId", void 0);
95
+ __decorate([
96
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is this a temporary file?', default: false }),
97
+ (0, typeorm_1.Column)({ default: false }),
98
+ __metadata("design:type", Boolean)
99
+ ], AttachedObject.prototype, "isTemporary", void 0);
100
+ __decorate([
101
+ (0, swagger_1.ApiProperty)({
102
+ type: Object,
103
+ description: 'Additional metadata for the file',
104
+ required: false
105
+ }),
106
+ (0, typeorm_1.Column)({
107
+ type: "simple-json",
108
+ nullable: true
109
+ }),
110
+ __metadata("design:type", Object)
111
+ ], AttachedObject.prototype, "metadata", void 0);
112
+ __decorate([
113
+ (0, swagger_1.ApiProperty)({ type: () => [entity_file_entity_1.EntityFile], description: 'Entities that own the file' }),
114
+ (0, typeorm_1.OneToMany)(() => entity_file_entity_1.EntityFile, (entityFile) => entityFile.file, {
115
+ onDelete: "CASCADE",
116
+ onUpdate: "CASCADE",
117
+ eager: true,
118
+ }),
119
+ __metadata("design:type", Array)
120
+ ], AttachedObject.prototype, "owners", void 0);
121
+ exports.AttachedObject = AttachedObject = __decorate([
122
+ (0, typeorm_1.Entity)(),
123
+ (0, typeorm_1.Index)(["name", "module", "entityType", "entityId"], { unique: true })
124
+ ], AttachedObject);
125
+ //# sourceMappingURL=attached_object.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attached_object.entity.js","sourceRoot":"","sources":["../../../src/entities/drive/attached_object.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAuE;AACvE,qDAA4C;AAC5C,qCAA2D;AAC3D,sEAA2D;AAC3D,6CAA8C;AAC9C,yCAA8D;AAIvD,IAAM,cAAc,GAApB,MAAM,cAAe,SAAQ,gCAAkB;IAIpD,IAAI,CAAS;IAIb,GAAG,CAAS;IAIZ,IAAI,CAAS;IAIb,QAAQ,CAAS;IAIjB,KAAK,CAAS;IAId,SAAS,CAAU;IAWnB,MAAM,CAAe;IAYrB,UAAU,CAAmB;IAI7B,QAAQ,CAAS;IAIjB,WAAW,CAAU;IAWrB,QAAQ,CAAsB;IAQ9B,MAAM,CAAgB;CACvB,CAAA;AA3EY,wCAAc;AAIzB;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE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AI;KACZ,CAAC;;8CACoB;yBA1EX,cAAc;IAF1B,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,CAAC,MAAM,EAAE,QAAQ,EAAE,YAAY,EAAE,UAAU,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GACzD,cAAc,CA2E1B"}
@@ -0,0 +1,14 @@
1
+ import { BaseEntityWithUser } from "../../common/database/base.entity";
2
+ import { Folder } from "./folder.entity";
3
+ import { EntityFile } from "../helpers/entity_file.entity";
4
+ export declare class File extends BaseEntityWithUser {
5
+ name: string;
6
+ folder: Folder;
7
+ url: string;
8
+ size: number;
9
+ mimeType: string;
10
+ s3Key: string;
11
+ isDefault: boolean;
12
+ isTemporary: boolean;
13
+ owners?: EntityFile[];
14
+ }
@@ -0,0 +1,88 @@
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.File = void 0;
13
+ const base_entity_1 = require("../../common/database/base.entity");
14
+ const class_validator_1 = require("class-validator");
15
+ const typeorm_1 = require("typeorm");
16
+ const folder_entity_1 = require("./folder.entity");
17
+ const entity_file_entity_1 = require("../helpers/entity_file.entity");
18
+ const swagger_1 = require("@nestjs/swagger");
19
+ let File = class File extends base_entity_1.BaseEntityWithUser {
20
+ name;
21
+ folder;
22
+ url;
23
+ size;
24
+ mimeType;
25
+ s3Key;
26
+ isDefault;
27
+ isTemporary;
28
+ owners;
29
+ };
30
+ exports.File = File;
31
+ __decorate([
32
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Name of the file', minLength: 1 }),
33
+ (0, class_validator_1.MinLength)(1),
34
+ (0, typeorm_1.Column)(),
35
+ __metadata("design:type", String)
36
+ ], File.prototype, "name", void 0);
37
+ __decorate([
38
+ (0, swagger_1.ApiProperty)({ type: () => folder_entity_1.Folder, description: 'Folder associated with the file' }),
39
+ (0, typeorm_1.ManyToOne)(() => folder_entity_1.Folder, (folder) => folder.files, {
40
+ onDelete: "CASCADE",
41
+ onUpdate: "CASCADE",
42
+ eager: true
43
+ }),
44
+ __metadata("design:type", folder_entity_1.Folder)
45
+ ], File.prototype, "folder", void 0);
46
+ __decorate([
47
+ (0, swagger_1.ApiProperty)({ type: String, description: 'URL of the file', required: false }),
48
+ (0, typeorm_1.Column)({ nullable: true }),
49
+ __metadata("design:type", String)
50
+ ], File.prototype, "url", void 0);
51
+ __decorate([
52
+ (0, swagger_1.ApiProperty)({ type: 'bigint', description: 'Size of the file in bytes', required: false }),
53
+ (0, typeorm_1.Column)({ nullable: true, type: "bigint" }),
54
+ __metadata("design:type", Number)
55
+ ], File.prototype, "size", void 0);
56
+ __decorate([
57
+ (0, swagger_1.ApiProperty)({ type: String, description: 'MIME type of the file', required: false }),
58
+ (0, typeorm_1.Column)({ nullable: true }),
59
+ __metadata("design:type", String)
60
+ ], File.prototype, "mimeType", void 0);
61
+ __decorate([
62
+ (0, swagger_1.ApiProperty)({ type: String, description: 'S3 key of the file', required: false }),
63
+ (0, typeorm_1.Column)({ nullable: true }),
64
+ __metadata("design:type", String)
65
+ ], File.prototype, "s3Key", void 0);
66
+ __decorate([
67
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is this the default file?', default: false }),
68
+ (0, typeorm_1.Column)({ default: false }),
69
+ __metadata("design:type", Boolean)
70
+ ], File.prototype, "isDefault", void 0);
71
+ __decorate([
72
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is this a temporary file?', default: false }),
73
+ (0, typeorm_1.Column)({ default: false }),
74
+ __metadata("design:type", Boolean)
75
+ ], File.prototype, "isTemporary", void 0);
76
+ __decorate([
77
+ (0, swagger_1.ApiProperty)({ type: () => [entity_file_entity_1.EntityFile], description: 'Entities that own the file' }),
78
+ (0, typeorm_1.OneToMany)(() => entity_file_entity_1.EntityFile, (entityFile) => entityFile.file, {
79
+ onDelete: "CASCADE",
80
+ onUpdate: "CASCADE",
81
+ eager: true,
82
+ }),
83
+ __metadata("design:type", Array)
84
+ ], File.prototype, "owners", void 0);
85
+ exports.File = File = __decorate([
86
+ (0, typeorm_1.Entity)()
87
+ ], File);
88
+ //# sourceMappingURL=file.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"file.entity.js","sourceRoot":"","sources":["../../../src/entities/drive/file.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,mEAAuE;AACvE,qDAA4C;AAC5C,qCAA+D;AAC/D,mDAAyC;AACzC,sEAA2D;AAC3D,6CAA8C;AAGvC,IAAM,IAAI,GAAV,MAAM,IAAK,SAAQ,gCAAkB;IAI1C,IAAI,CAAS;IAQb,MAAM,CAAS;IAIf,GAAG,CAAS;IAIZ,IAAI,CAAS;IAIb,QAAQ,CAAS;IAIjB,KAAK,CAAS;IAId,SAAS,CAAU;IAInB,WAAW,CAAU;IAQrB,MAAM,CAAgB;CACvB,CAAA;AA7CY,oBAAI;AAIf;IAHC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,EAAE,SAAS,EAAE,CAAC,EAAE,CAAC;IAC5E,IAAA,2BAAS,EAAC,CAAC,CAAC;IACZ,IAAA,gBAAM,GAAE;;kCACI;AAQb;IANC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,sBAAM,EAAE,WAAW,EAAE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qBAAW,EAAC,EAAE,IAAI,EAAE,OAAO,EAAE,WAAW,EAAE,2BAA2B,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;IACxF,IAAA,gBAAM,EAAC,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;;yCACN;AAQrB;IANC,IAAA,qBAAW,EAAC,EAAE,IAAI,EAAE,GAAG,EAAE,CAAC,CAAC,+BAAU,CAAC,EAAE,WAAW,EAAE,4BAA4B,EAAE,CAAC;IACpF,IAAA,mBAAS,EAAC,GAAG,EAAE,CAAC,+BAAU,EAAE,CAAC,UAAU,EAAE,EAAE,CAAC,UAAU,CAAC,IAAI,EAAE;QAC5D,QAAQ,EAAE,SAAS;QACnB,QAAQ,EAAE,SAAS;QACnB,KAAK,EAAE,IAAI;KACZ,CAAC;;oCACoB;eA5CX,IAAI;IADhB,IAAA,gBAAM,GAAE;GACI,IAAI,CA6ChB"}
@@ -0,0 +1,14 @@
1
+ import { BaseEntityWithUser } from "../../common/database/base.entity";
2
+ import { File } from "./file.entity";
3
+ import { EntityFolder } from "../helpers/entity_folder.entity";
4
+ export declare class Folder extends BaseEntityWithUser {
5
+ name: string;
6
+ hidden?: boolean;
7
+ parent: Folder;
8
+ uid: string;
9
+ files?: File[];
10
+ folders?: Folder[];
11
+ owners?: EntityFolder[];
12
+ metadata: Record<string, any>;
13
+ generateUid(): void;
14
+ }
@@ -0,0 +1,108 @@
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.Folder = void 0;
13
+ const base_entity_1 = require("../../common/database/base.entity");
14
+ const class_validator_1 = require("class-validator");
15
+ const typeorm_1 = require("typeorm");
16
+ const file_entity_1 = require("./file.entity");
17
+ const entity_folder_entity_1 = require("../helpers/entity_folder.entity");
18
+ const swagger_1 = require("@nestjs/swagger");
19
+ const nanoid_1 = require("nanoid");
20
+ let Folder = class Folder extends base_entity_1.BaseEntityWithUser {
21
+ name;
22
+ hidden;
23
+ parent;
24
+ uid;
25
+ files;
26
+ folders;
27
+ owners;
28
+ metadata;
29
+ generateUid() {
30
+ if (!this.uid) {
31
+ this.uid = (0, nanoid_1.nanoid)(13);
32
+ }
33
+ }
34
+ };
35
+ exports.Folder = Folder;
36
+ __decorate([
37
+ (0, swagger_1.ApiProperty)({ type: String, description: 'Name of the folder', minLength: 1 }),
38
+ (0, class_validator_1.MinLength)(1),
39
+ (0, typeorm_1.Column)(),
40
+ __metadata("design:type", String)
41
+ ], Folder.prototype, "name", void 0);
42
+ __decorate([
43
+ (0, swagger_1.ApiProperty)({ type: Boolean, description: 'Is the folder hidden?', default: false }),
44
+ (0, typeorm_1.Column)({ default: false }),
45
+ __metadata("design:type", Boolean)
46
+ ], Folder.prototype, "hidden", void 0);
47
+ __decorate([
48
+ (0, swagger_1.ApiProperty)({ type: () => Folder, description: 'Parent folder', required: false }),
49
+ (0, typeorm_1.ManyToOne)(() => Folder, {
50
+ onDelete: "CASCADE",
51
+ onUpdate: "CASCADE",
52
+ }),
53
+ __metadata("design:type", Folder)
54
+ ], Folder.prototype, "parent", void 0);
55
+ __decorate([
56
+ (0, swagger_1.ApiProperty)({ type: String, description: 'UID', minLength: 13 }),
57
+ (0, typeorm_1.Column)({ length: 13, unique: true }),
58
+ __metadata("design:type", String)
59
+ ], Folder.prototype, "uid", void 0);
60
+ __decorate([
61
+ (0, swagger_1.ApiProperty)({ type: () => [file_entity_1.File], description: 'Files in the folder' }),
62
+ (0, typeorm_1.OneToMany)(() => file_entity_1.File, (file) => file.folder, {
63
+ onDelete: "CASCADE",
64
+ onUpdate: "CASCADE",
65
+ }),
66
+ __metadata("design:type", Array)
67
+ ], Folder.prototype, "files", void 0);
68
+ __decorate([
69
+ (0, swagger_1.ApiProperty)({ type: () => [Folder], description: 'Subfolders in the folder' }),
70
+ (0, typeorm_1.OneToMany)(() => Folder, (folder) => folder.parent, {
71
+ onDelete: "CASCADE",
72
+ onUpdate: "CASCADE",
73
+ }),
74
+ __metadata("design:type", Array)
75
+ ], Folder.prototype, "folders", void 0);
76
+ __decorate([
77
+ (0, swagger_1.ApiProperty)({ type: () => [entity_folder_entity_1.EntityFolder], description: 'Entities that own the folder' }),
78
+ (0, typeorm_1.OneToMany)(() => entity_folder_entity_1.EntityFolder, (entityFolder) => entityFolder.folder, {
79
+ onDelete: "CASCADE",
80
+ onUpdate: "CASCADE",
81
+ eager: true,
82
+ }),
83
+ __metadata("design:type", Array)
84
+ ], Folder.prototype, "owners", void 0);
85
+ __decorate([
86
+ (0, swagger_1.ApiProperty)({
87
+ type: Object,
88
+ description: 'Additional metadata for the file',
89
+ required: false
90
+ }),
91
+ (0, typeorm_1.Column)({
92
+ type: "json",
93
+ nullable: true
94
+ }),
95
+ __metadata("design:type", Object)
96
+ ], Folder.prototype, "metadata", void 0);
97
+ __decorate([
98
+ (0, typeorm_1.BeforeInsert)(),
99
+ __metadata("design:type", Function),
100
+ __metadata("design:paramtypes", []),
101
+ __metadata("design:returntype", void 0)
102
+ ], Folder.prototype, "generateUid", null);
103
+ exports.Folder = Folder = __decorate([
104
+ (0, typeorm_1.Entity)(),
105
+ (0, typeorm_1.Index)(["uid"], { unique: true }),
106
+ (0, typeorm_1.Index)(["name", "parent"], { unique: true })
107
+ ], Folder);
108
+ //# sourceMappingURL=folder.entity.js.map
@@ -0,0 +1 @@
1
+ {"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Q,EAAE,KAAK;KAChB,CAAC;IACD,IAAA,gBAAM,EAAC;QACN,IAAI,EAAE,MAAM;QACZ,QAAQ,EAAE,IAAI;KACf,CAAC;;wCAC4B;AAG9B;IADC,IAAA,sBAAY,GAAE;;;;yCAKd;iBA5DU,MAAM;IAHlB,IAAA,gBAAM,GAAE;IACR,IAAA,eAAK,EAAC,CAAC,KAAK,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;IAChC,IAAA,eAAK,EAAC,CAAC,MAAM,EAAE,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,IAAI,EAAE,CAAC;GAC/B,MAAM,CA6DlB"}
@@ -0,0 +1,3 @@
1
+ export * from "./file.entity";
2
+ export * from "./folder.entity";
3
+ export * from "./attached_object.entity";
@@ -0,0 +1,20 @@
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("./file.entity"), exports);
18
+ __exportStar(require("./folder.entity"), exports);
19
+ __exportStar(require("./attached_object.entity"), exports);
20
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/entities/drive/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,gDAA6B;AAC7B,kDAA+B;AAC/B,2DAAwC"}
@@ -0,0 +1,7 @@
1
+ import { BaseEntity } from "../../common/database/base.entity";
2
+ export declare class FilterView extends BaseEntity {
3
+ view: string;
4
+ name: string;
5
+ userId: string;
6
+ jsonData: 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.FilterView = void 0;
13
+ const typeorm_1 = require("typeorm");
14
+ const base_entity_1 = require("../../common/database/base.entity");
15
+ let FilterView = class FilterView extends base_entity_1.BaseEntity {
16
+ view;
17
+ name;
18
+ userId;
19
+ jsonData;
20
+ };
21
+ exports.FilterView = FilterView;
22
+ __decorate([
23
+ (0, typeorm_1.Column)(),
24
+ __metadata("design:type", String)
25
+ ], FilterView.prototype, "view", void 0);
26
+ __decorate([
27
+ (0, typeorm_1.Column)(),
28
+ __metadata("design:type", String)
29
+ ], FilterView.prototype, "name", void 0);
30
+ __decorate([
31
+ (0, typeorm_1.Column)(),
32
+ __metadata("design:type", String)
33
+ ], FilterView.prototype, "userId", void 0);
34
+ __decorate([
35
+ (0, typeorm_1.Column)(),
36
+ __metadata("design:type", String)
37
+ ], FilterView.prototype, "jsonData", void 0);
38
+ exports.FilterView = FilterView = __decorate([
39
+ (0, typeorm_1.Entity)()
40
+ ], FilterView);
41
+ //# sourceMappingURL=filter-view.entity.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"filter-view.entity.js","sourceRoot":"","sources":["../../../src/entities/easyapp/filter-view.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qCAAyC;AACzC,mEAA+D;AAGxD,IAAM,UAAU,GAAhB,MAAM,UAAW,SAAQ,wBAAU;IAExC,IAAI,CAAS;IAGb,IAAI,CAAS;IAGb,MAAM,CAAS;IAGf,QAAQ,CAAS;CAClB,CAAA;AAZY,gCAAU;AAErB;IADC,IAAA,gBAAM,GAAE;;wCACI;AAGb;IADC,IAAA,gBAAM,GAAE;;wCACI;AAGb;IADC,IAAA,gBAAM,GAAE;;0CACM;AAGf;IADC,IAAA,gBAAM,GAAE;;4CACQ;qBAXN,UAAU;IADtB,IAAA,gBAAM,GAAE;GACI,UAAU,CAYtB"}