easywork-common-lib 1.0.1344 → 1.0.1350

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 (41) hide show
  1. package/dist/common/enums/drive.enum.d.ts +2 -1
  2. package/dist/common/enums/drive.enum.js +1 -0
  3. package/dist/common/enums/drive.enum.js.map +1 -1
  4. package/dist/entities/sales/agent-comment.entity.d.ts +2 -0
  5. package/dist/entities/sales/agent-comment.entity.js +1 -0
  6. package/dist/entities/sales/agent-comment.entity.js.map +1 -1
  7. package/dist/entities/tools/calendar/event.entity.d.ts +9 -0
  8. package/dist/entities/tools/calendar/event.entity.js +33 -1
  9. package/dist/entities/tools/calendar/event.entity.js.map +1 -1
  10. package/dist/grpc/drive/drive.proto +339 -339
  11. package/dist/grpc/drive/leads.proto +114 -114
  12. package/dist/modules/authorization/authorization.module.d.ts +2 -2
  13. package/dist/modules/authorization/services/resource-access-filter.service.js +21 -21
  14. package/package.json +55 -55
  15. package/dist/entities/subscriptions/payment-history.entity.d.ts +0 -24
  16. package/dist/entities/subscriptions/payment-history.entity.js +0 -124
  17. package/dist/entities/subscriptions/payment-history.entity.js.map +0 -1
  18. package/dist/entities/thirdparty/wati/index.d.ts +0 -7
  19. package/dist/entities/thirdparty/wati/index.js +0 -24
  20. package/dist/entities/thirdparty/wati/index.js.map +0 -1
  21. package/dist/entities/thirdparty/wati/wati-chat.entity.d.ts +0 -27
  22. package/dist/entities/thirdparty/wati/wati-chat.entity.js +0 -207
  23. package/dist/entities/thirdparty/wati/wati-chat.entity.js.map +0 -1
  24. package/dist/entities/thirdparty/wati/wati-configuration.entity.d.ts +0 -22
  25. package/dist/entities/thirdparty/wati/wati-configuration.entity.js +0 -149
  26. package/dist/entities/thirdparty/wati/wati-configuration.entity.js.map +0 -1
  27. package/dist/entities/thirdparty/wati/wati-events.entity.d.ts +0 -9
  28. package/dist/entities/thirdparty/wati/wati-events.entity.js +0 -63
  29. package/dist/entities/thirdparty/wati/wati-events.entity.js.map +0 -1
  30. package/dist/entities/thirdparty/wati/wati-message.entity.d.ts +0 -30
  31. package/dist/entities/thirdparty/wati/wati-message.entity.js +0 -280
  32. package/dist/entities/thirdparty/wati/wati-message.entity.js.map +0 -1
  33. package/dist/entities/thirdparty/wati/wati-user-access-log.entity.d.ts +0 -71
  34. package/dist/entities/thirdparty/wati/wati-user-access-log.entity.js +0 -216
  35. package/dist/entities/thirdparty/wati/wati-user-access-log.entity.js.map +0 -1
  36. package/dist/entities/thirdparty/wati/wati-user-access.entity.d.ts +0 -31
  37. package/dist/entities/thirdparty/wati/wati-user-access.entity.js +0 -193
  38. package/dist/entities/thirdparty/wati/wati-user-access.entity.js.map +0 -1
  39. package/dist/entities/thirdparty/wati/wati.enum.d.ts +0 -69
  40. package/dist/entities/thirdparty/wati/wati.enum.js +0 -83
  41. package/dist/entities/thirdparty/wati/wati.enum.js.map +0 -1
@@ -1,114 +1,114 @@
1
- syntax = "proto3";
2
-
3
- package leads;
4
-
5
- // Definición del mensaje principal para crear un Lead
6
- message CreateLeadRequest {
7
- // Representa la foto del lead
8
- bytes photo = 1;
9
-
10
- // Especifica el tipo de persona para el lead
11
- PersonType typePerson = 2;
12
-
13
- // Nombre del lead
14
- string name = 3;
15
-
16
- // Apellido del lead
17
- string lastName = 4;
18
-
19
- // Nombre completo del lead
20
- string fullName = 5;
21
-
22
- // Segundo nombre del lead
23
- string secondName = 6;
24
-
25
- // RFC del lead
26
- string rfc = 7;
27
-
28
- // Dirección del lead
29
- string address = 8;
30
-
31
- // Cargo del lead
32
- string cargo = 9;
33
-
34
- // Fecha de nacimiento del lead
35
- string birthdate = 10;
36
-
37
- // Género del lead
38
- string gender = 11;
39
-
40
- // CURP del lead
41
- string curp = 12;
42
-
43
- // CUA del lead
44
- string cua = 13;
45
-
46
- // Puesto del lead
47
- string post = 14;
48
-
49
- // Observaciones sobre el lead
50
- string observations = 15;
51
-
52
- // ¿El lead es exportado?
53
- bool export = 16;
54
-
55
- // Descripción de la fuente del lead
56
- string sourceDescription = 17;
57
-
58
- // Compañía del lead
59
- string company = 18;
60
-
61
- // ID Tipo de Cliente
62
- string typeId = 19;
63
-
64
- // ID Origen del lead
65
- string sourceId = 20;
66
-
67
- // Números de teléfono asociados con el lead
68
- repeated PhoneDto phones = 21;
69
-
70
- // Emails asociados con el lead
71
- repeated EmailDto emails = 22;
72
-
73
- // Códigos de aseguradora asociados con el lead
74
- repeated CodigoDto codigos = 23;
75
-
76
- // ID del usuario asignado al lead
77
- string assignedById = 24;
78
-
79
- // ID del usuario observador
80
- string observerId = 25;
81
-
82
- // Monto de la cotización
83
- double quoteAmount = 26;
84
-
85
- // ID de la moneda de la cotización
86
- string quoteCurrencyId = 27;
87
-
88
- // IDs de los archivos
89
- repeated string filesIds = 28;
90
- }
91
-
92
- // Definición del enum PersonType
93
- enum PersonType {
94
- FISICA = 0;
95
- MORAL = 1;
96
- }
97
-
98
- // Definición de PhoneDto
99
- message PhoneDto {
100
- string number = 1;
101
- string relation = 2;
102
- }
103
-
104
- // Definición de EmailDto
105
- message EmailDto {
106
- string email = 1;
107
- string relation = 2;
108
- }
109
-
110
- // Definición de CodigoDto
111
- message CodigoDto {
112
- string codigo = 1;
113
- string insuranceId = 2;
114
- }
1
+ syntax = "proto3";
2
+
3
+ package leads;
4
+
5
+ // Definición del mensaje principal para crear un Lead
6
+ message CreateLeadRequest {
7
+ // Representa la foto del lead
8
+ bytes photo = 1;
9
+
10
+ // Especifica el tipo de persona para el lead
11
+ PersonType typePerson = 2;
12
+
13
+ // Nombre del lead
14
+ string name = 3;
15
+
16
+ // Apellido del lead
17
+ string lastName = 4;
18
+
19
+ // Nombre completo del lead
20
+ string fullName = 5;
21
+
22
+ // Segundo nombre del lead
23
+ string secondName = 6;
24
+
25
+ // RFC del lead
26
+ string rfc = 7;
27
+
28
+ // Dirección del lead
29
+ string address = 8;
30
+
31
+ // Cargo del lead
32
+ string cargo = 9;
33
+
34
+ // Fecha de nacimiento del lead
35
+ string birthdate = 10;
36
+
37
+ // Género del lead
38
+ string gender = 11;
39
+
40
+ // CURP del lead
41
+ string curp = 12;
42
+
43
+ // CUA del lead
44
+ string cua = 13;
45
+
46
+ // Puesto del lead
47
+ string post = 14;
48
+
49
+ // Observaciones sobre el lead
50
+ string observations = 15;
51
+
52
+ // ¿El lead es exportado?
53
+ bool export = 16;
54
+
55
+ // Descripción de la fuente del lead
56
+ string sourceDescription = 17;
57
+
58
+ // Compañía del lead
59
+ string company = 18;
60
+
61
+ // ID Tipo de Cliente
62
+ string typeId = 19;
63
+
64
+ // ID Origen del lead
65
+ string sourceId = 20;
66
+
67
+ // Números de teléfono asociados con el lead
68
+ repeated PhoneDto phones = 21;
69
+
70
+ // Emails asociados con el lead
71
+ repeated EmailDto emails = 22;
72
+
73
+ // Códigos de aseguradora asociados con el lead
74
+ repeated CodigoDto codigos = 23;
75
+
76
+ // ID del usuario asignado al lead
77
+ string assignedById = 24;
78
+
79
+ // ID del usuario observador
80
+ string observerId = 25;
81
+
82
+ // Monto de la cotización
83
+ double quoteAmount = 26;
84
+
85
+ // ID de la moneda de la cotización
86
+ string quoteCurrencyId = 27;
87
+
88
+ // IDs de los archivos
89
+ repeated string filesIds = 28;
90
+ }
91
+
92
+ // Definición del enum PersonType
93
+ enum PersonType {
94
+ FISICA = 0;
95
+ MORAL = 1;
96
+ }
97
+
98
+ // Definición de PhoneDto
99
+ message PhoneDto {
100
+ string number = 1;
101
+ string relation = 2;
102
+ }
103
+
104
+ // Definición de EmailDto
105
+ message EmailDto {
106
+ string email = 1;
107
+ string relation = 2;
108
+ }
109
+
110
+ // Definición de CodigoDto
111
+ message CodigoDto {
112
+ string codigo = 1;
113
+ string insuranceId = 2;
114
+ }
@@ -19,8 +19,8 @@ export declare class AuthorizationModule {
19
19
  }): {
20
20
  module: typeof AuthorizationModule;
21
21
  imports: import("@nestjs/common").DynamicModule[];
22
- providers: (typeof ResourceAccessFilterService | typeof ResourceAuthorizationService | typeof DynamicFilterService | typeof PermissionEvaluatorService | typeof PermissionCacheService | typeof AuthorizationService | typeof ResourceAuthorizationFactory | typeof ContactAuthorizationService | typeof LeadAuthorizationService | typeof PolicyAuthorizationService | typeof TaskAuthorizationService)[];
23
- exports: (typeof ResourceAccessFilterService | typeof ResourceAuthorizationService | typeof DynamicFilterService | typeof PermissionEvaluatorService | typeof PermissionCacheService | typeof AuthorizationService | typeof ResourceAuthorizationFactory | typeof ContactAuthorizationService | typeof LeadAuthorizationService | typeof PolicyAuthorizationService | typeof TaskAuthorizationService)[];
22
+ providers: (typeof TaskAuthorizationService | typeof PolicyAuthorizationService | typeof LeadAuthorizationService | typeof ContactAuthorizationService | typeof ResourceAuthorizationFactory | typeof PermissionEvaluatorService | typeof ResourceAuthorizationService | typeof ResourceAccessFilterService | typeof DynamicFilterService | typeof PermissionCacheService | typeof AuthorizationService)[];
23
+ exports: (typeof TaskAuthorizationService | typeof PolicyAuthorizationService | typeof LeadAuthorizationService | typeof ContactAuthorizationService | typeof ResourceAuthorizationFactory | typeof PermissionEvaluatorService | typeof ResourceAuthorizationService | typeof ResourceAccessFilterService | typeof DynamicFilterService | typeof PermissionCacheService | typeof AuthorizationService)[];
24
24
  global: boolean;
25
25
  };
26
26
  }
@@ -70,9 +70,9 @@ let ResourceAccessFilterService = class ResourceAccessFilterService {
70
70
  const containsValue = value.contains;
71
71
  containsValue.forEach((item, itemIndex) => {
72
72
  const itemParamName = `${paramName}_contains_${itemIndex}`;
73
- const relationCondition = `EXISTS (
74
- SELECT 1 FROM ${tableName} tr
75
- WHERE tr."taskId" = task.id AND tr."userId" = :${itemParamName}
73
+ const relationCondition = `EXISTS (
74
+ SELECT 1 FROM ${tableName} tr
75
+ WHERE tr."taskId" = task.id AND tr."userId" = :${itemParamName}
76
76
  )`;
77
77
  subConditions.push(relationCondition);
78
78
  parameters[itemParamName] = this.extractUserId(item);
@@ -161,9 +161,9 @@ let ResourceAccessFilterService = class ResourceAccessFilterService {
161
161
  const cleanItem = this.extractUserId(item);
162
162
  if (cleanItem) {
163
163
  const paramName = `${baseParamName}_contains_${index}`;
164
- queryBuilder.andWhere(`EXISTS (
165
- SELECT 1 FROM ${tableName} tr
166
- WHERE tr."taskId" = task.id AND tr."userId" = :${paramName}
164
+ queryBuilder.andWhere(`EXISTS (
165
+ SELECT 1 FROM ${tableName} tr
166
+ WHERE tr."taskId" = task.id AND tr."userId" = :${paramName}
167
167
  )`, {
168
168
  [paramName]: cleanItem,
169
169
  });
@@ -234,9 +234,9 @@ let ResourceAccessFilterService = class ResourceAccessFilterService {
234
234
  const cleanItem = this.extractUserId(item);
235
235
  if (cleanItem) {
236
236
  const itemParamName = `${paramName}_contains_${index}`;
237
- conditions.push(`EXISTS (
238
- SELECT 1 FROM ${tableName} tr
239
- WHERE tr."taskId" = task.id AND tr."userId" = :${itemParamName}
237
+ conditions.push(`EXISTS (
238
+ SELECT 1 FROM ${tableName} tr
239
+ WHERE tr."taskId" = task.id AND tr."userId" = :${itemParamName}
240
240
  )`);
241
241
  parameters[itemParamName] = cleanItem;
242
242
  }
@@ -312,9 +312,9 @@ let ResourceAccessFilterService = class ResourceAccessFilterService {
312
312
  const cleanItem = this.extractUserId(item);
313
313
  if (cleanItem) {
314
314
  const paramName = `${field}_contains_${index}`;
315
- queryBuilder.andWhere(`EXISTS (
316
- SELECT 1 FROM ${tableName} tr
317
- WHERE tr."taskId" = task.id AND tr."userId" = :${paramName}
315
+ queryBuilder.andWhere(`EXISTS (
316
+ SELECT 1 FROM ${tableName} tr
317
+ WHERE tr."taskId" = task.id AND tr."userId" = :${paramName}
318
318
  )`, {
319
319
  [paramName]: cleanItem,
320
320
  });
@@ -337,9 +337,9 @@ let ResourceAccessFilterService = class ResourceAccessFilterService {
337
337
  return "1 = 0";
338
338
  }
339
339
  queryBuilder.setParameter(paramName, cleanCondition);
340
- return `EXISTS (
341
- SELECT 1 FROM ${tableName} tr
342
- WHERE tr."taskId" = task.id AND tr."userId" IN (:...${paramName})
340
+ return `EXISTS (
341
+ SELECT 1 FROM ${tableName} tr
342
+ WHERE tr."taskId" = task.id AND tr."userId" IN (:...${paramName})
343
343
  )`;
344
344
  }
345
345
  else if (typeof condition === "object" &&
@@ -352,9 +352,9 @@ let ResourceAccessFilterService = class ResourceAccessFilterService {
352
352
  return "1 = 0";
353
353
  }
354
354
  queryBuilder.setParameter(paramName, cleanCondition);
355
- return `EXISTS (
356
- SELECT 1 FROM ${tableName} tr
357
- WHERE tr."taskId" = task.id AND tr."userId" IN (:...${paramName})
355
+ return `EXISTS (
356
+ SELECT 1 FROM ${tableName} tr
357
+ WHERE tr."taskId" = task.id AND tr."userId" IN (:...${paramName})
358
358
  )`;
359
359
  }
360
360
  else {
@@ -363,9 +363,9 @@ let ResourceAccessFilterService = class ResourceAccessFilterService {
363
363
  return "1 = 0";
364
364
  }
365
365
  queryBuilder.setParameter(paramName, cleanCondition);
366
- return `EXISTS (
367
- SELECT 1 FROM ${tableName} tr
368
- WHERE tr."taskId" = task.id AND tr."userId" = :${paramName}
366
+ return `EXISTS (
367
+ SELECT 1 FROM ${tableName} tr
368
+ WHERE tr."taskId" = task.id AND tr."userId" = :${paramName}
369
369
  )`;
370
370
  }
371
371
  }
package/package.json CHANGED
@@ -1,55 +1,55 @@
1
- {
2
- "name": "easywork-common-lib",
3
- "version": "1.0.1344",
4
- "description": "Librería común de Easywork",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "files": [
8
- "dist/**/*",
9
- "README.md",
10
- "LICENSE"
11
- ],
12
- "scripts": {
13
- "build": "tsc && cpx-fixed src/**/*.proto dist/",
14
- "bump": "sh ./scripts/bump.sh",
15
- "bump-win": "cross-env ./scripts/bump.sh"
16
- },
17
- "repository": {
18
- "type": "git",
19
- "url": "git+https://github.com/blindariesgos/easywork-common-lib.git"
20
- },
21
- "keywords": [
22
- "nodejs"
23
- ],
24
- "author": "Rosmer Campos",
25
- "license": "MIT",
26
- "bugs": {
27
- "url": "https://github.com/blindariesgos/easywork-common-lib/issues"
28
- },
29
- "homepage": "https://github.com/blindariesgos/easywork-common-lib#readme",
30
- "dependencies": {
31
- "@golevelup/nestjs-rabbitmq": "^5.7.0",
32
- "@nestjs/cache-manager": "^3.0.1",
33
- "@nestjs/common": "^10.4.19",
34
- "@nestjs/swagger": "^7.4.2",
35
- "@nestjs/typeorm": "^10.0.2",
36
- "cache-manager": "^7.0.1",
37
- "class-transformer": "^0.5.1",
38
- "class-validator": "^0.14.2",
39
- "googleapis": "^144.0.0",
40
- "nanoid": "^3.3.11",
41
- "nestjs-rabbitmq": "link:@types/@golevelup/nestjs-rabbitmq",
42
- "rxjs": "^7.8.2",
43
- "sharp": "^0.33.5",
44
- "typeorm": "^0.3.25"
45
- },
46
- "devDependencies": {
47
- "@rubiin/tsconfig": "^1.2.1",
48
- "@types/node": "^20.19.4",
49
- "cpx-fixed": "^1.6.0",
50
- "ts-loader": "^9.5.2",
51
- "ts-node": "^10.9.2",
52
- "typescript": "^5.9.3"
53
- },
54
- "packageManager": "pnpm@9.12.2+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228"
55
- }
1
+ {
2
+ "name": "easywork-common-lib",
3
+ "version": "1.0.1350",
4
+ "description": "Librería común de Easywork",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "files": [
8
+ "dist/**/*",
9
+ "README.md",
10
+ "LICENSE"
11
+ ],
12
+ "scripts": {
13
+ "build": "tsc && cpx-fixed src/**/*.proto dist/",
14
+ "bump": "sh ./scripts/bump.sh",
15
+ "bump-win": "cross-env ./scripts/bump.sh"
16
+ },
17
+ "repository": {
18
+ "type": "git",
19
+ "url": "git+https://github.com/blindariesgos/easywork-common-lib.git"
20
+ },
21
+ "keywords": [
22
+ "nodejs"
23
+ ],
24
+ "author": "Rosmer Campos",
25
+ "license": "MIT",
26
+ "bugs": {
27
+ "url": "https://github.com/blindariesgos/easywork-common-lib/issues"
28
+ },
29
+ "homepage": "https://github.com/blindariesgos/easywork-common-lib#readme",
30
+ "dependencies": {
31
+ "@golevelup/nestjs-rabbitmq": "^5.7.0",
32
+ "@nestjs/cache-manager": "^3.0.1",
33
+ "@nestjs/common": "^10.4.19",
34
+ "@nestjs/swagger": "^7.4.2",
35
+ "@nestjs/typeorm": "^10.0.2",
36
+ "cache-manager": "^7.0.1",
37
+ "class-transformer": "^0.5.1",
38
+ "class-validator": "^0.14.2",
39
+ "googleapis": "^144.0.0",
40
+ "nanoid": "^3.3.11",
41
+ "nestjs-rabbitmq": "link:@types/@golevelup/nestjs-rabbitmq",
42
+ "rxjs": "^7.8.2",
43
+ "sharp": "^0.33.5",
44
+ "typeorm": "^0.3.25"
45
+ },
46
+ "devDependencies": {
47
+ "@rubiin/tsconfig": "^1.2.1",
48
+ "@types/node": "^20.19.4",
49
+ "cpx-fixed": "^1.6.0",
50
+ "ts-loader": "^9.5.2",
51
+ "ts-node": "^10.9.2",
52
+ "typescript": "^5.9.3"
53
+ },
54
+ "packageManager": "pnpm@9.12.2+sha512.22721b3a11f81661ae1ec68ce1a7b879425a1ca5b991c975b074ac220b187ce56c708fe5db69f4c962c989452eee76c82877f4ee80f474cebd61ee13461b6228"
55
+ }
@@ -1,24 +0,0 @@
1
- import { BaseEntityOnlyEssential } from '../../common/database/base.entity';
2
- import { Subscription } from './subscription.entity';
3
- import { Group } from '../group.entity';
4
- export declare enum PaymentStatus {
5
- SUCCEEDED = "succeeded",
6
- FAILED = "failed",
7
- PENDING = "pending",
8
- REFUNDED = "refunded",
9
- DISPUTED = "disputed"
10
- }
11
- export declare class PaymentHistory extends BaseEntityOnlyEssential {
12
- subscriptionId: number | null;
13
- subscription: Subscription | null;
14
- workspaceId: number;
15
- group: Group;
16
- amount: number;
17
- currency: string;
18
- paymentStatus: PaymentStatus;
19
- transactionDate: Date;
20
- paymentGatewayTransactionId: string | null;
21
- paymentMethodInfo: Record<string, any> | null;
22
- invoiceUrl: string | null;
23
- notes: string | null;
24
- }
@@ -1,124 +0,0 @@
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.PaymentHistory = exports.PaymentStatus = void 0;
13
- const typeorm_1 = require("typeorm");
14
- const swagger_1 = require("@nestjs/swagger");
15
- const base_entity_1 = require("../../common/database/base.entity");
16
- const subscription_entity_1 = require("./subscription.entity");
17
- const group_entity_1 = require("../group.entity");
18
- var PaymentStatus;
19
- (function (PaymentStatus) {
20
- PaymentStatus["SUCCEEDED"] = "succeeded";
21
- PaymentStatus["FAILED"] = "failed";
22
- PaymentStatus["PENDING"] = "pending";
23
- PaymentStatus["REFUNDED"] = "refunded";
24
- PaymentStatus["DISPUTED"] = "disputed";
25
- })(PaymentStatus || (exports.PaymentStatus = PaymentStatus = {}));
26
- let PaymentHistory = class PaymentHistory extends base_entity_1.BaseEntityOnlyEssential {
27
- subscriptionId;
28
- subscription;
29
- workspaceId;
30
- group;
31
- amount;
32
- currency;
33
- paymentStatus;
34
- transactionDate;
35
- paymentGatewayTransactionId;
36
- paymentMethodInfo;
37
- invoiceUrl;
38
- notes;
39
- };
40
- exports.PaymentHistory = PaymentHistory;
41
- __decorate([
42
- (0, typeorm_1.Column)({ type: 'int', nullable: true }),
43
- (0, swagger_1.ApiProperty)({
44
- description: 'ID of the associated workspace subscription (nullable for one-time payments)',
45
- example: 10,
46
- nullable: true,
47
- }),
48
- __metadata("design:type", Number)
49
- ], PaymentHistory.prototype, "subscriptionId", void 0);
50
- __decorate([
51
- (0, typeorm_1.ManyToOne)(() => subscription_entity_1.Subscription, subscription => subscription.paymentHistory, { onDelete: 'SET NULL' }),
52
- (0, typeorm_1.JoinColumn)({ name: 'subscription_id' }),
53
- __metadata("design:type", subscription_entity_1.Subscription)
54
- ], PaymentHistory.prototype, "subscription", void 0);
55
- __decorate([
56
- (0, typeorm_1.Column)({ type: 'int', nullable: false }),
57
- (0, swagger_1.ApiProperty)({ description: 'ID of the workspace associated with the payment', example: 101 }),
58
- __metadata("design:type", Number)
59
- ], PaymentHistory.prototype, "workspaceId", void 0);
60
- __decorate([
61
- (0, typeorm_1.ManyToOne)(() => group_entity_1.Group, group => group.paymentHistory, { onDelete: 'CASCADE' }),
62
- (0, typeorm_1.JoinColumn)({ name: 'group_id' }),
63
- __metadata("design:type", group_entity_1.Group)
64
- ], PaymentHistory.prototype, "group", void 0);
65
- __decorate([
66
- (0, typeorm_1.Column)({ type: 'decimal', precision: 10, scale: 2, nullable: false }),
67
- (0, swagger_1.ApiProperty)({ description: 'Amount of the payment', example: 9.99 }),
68
- __metadata("design:type", Number)
69
- ], PaymentHistory.prototype, "amount", void 0);
70
- __decorate([
71
- (0, typeorm_1.Column)({ type: 'varchar', length: 3, nullable: false }),
72
- (0, swagger_1.ApiProperty)({ description: 'Currency code (e.g., "USD", "EUR")', example: 'USD' }),
73
- __metadata("design:type", String)
74
- ], PaymentHistory.prototype, "currency", void 0);
75
- __decorate([
76
- (0, typeorm_1.Column)({ type: 'enum', enum: PaymentStatus, nullable: false }),
77
- (0, swagger_1.ApiProperty)({ description: 'Status of the payment', enum: PaymentStatus, example: PaymentStatus.SUCCEEDED }),
78
- __metadata("design:type", String)
79
- ], PaymentHistory.prototype, "paymentStatus", void 0);
80
- __decorate([
81
- (0, typeorm_1.CreateDateColumn)({ type: 'timestamptz', default: () => 'CURRENT_TIMESTAMP' }),
82
- (0, swagger_1.ApiProperty)({ description: 'Date and time of the transaction', example: '2024-06-05T11:00:00Z' }),
83
- __metadata("design:type", Date)
84
- ], PaymentHistory.prototype, "transactionDate", void 0);
85
- __decorate([
86
- (0, typeorm_1.Column)({ type: 'varchar', length: 255, unique: true, nullable: true }),
87
- (0, swagger_1.ApiProperty)({
88
- description: 'Transaction ID from the payment processor (e.g., Stripe, PayPal)',
89
- example: 'txn_abc123xyz',
90
- nullable: true,
91
- }),
92
- __metadata("design:type", String)
93
- ], PaymentHistory.prototype, "paymentGatewayTransactionId", void 0);
94
- __decorate([
95
- (0, typeorm_1.Column)({ type: 'json', nullable: true }),
96
- (0, swagger_1.ApiProperty)({
97
- description: 'JSON containing payment method details (e.g., card type, last 4 digits)',
98
- example: { cardType: 'Visa', last4: '4242' },
99
- nullable: true,
100
- }),
101
- __metadata("design:type", Object)
102
- ], PaymentHistory.prototype, "paymentMethodInfo", void 0);
103
- __decorate([
104
- (0, typeorm_1.Column)({ type: 'varchar', length: 512, nullable: true }),
105
- (0, swagger_1.ApiProperty)({
106
- description: 'URL to the invoice PDF or page',
107
- example: 'https://example.com/invoices/12345',
108
- nullable: true,
109
- }),
110
- __metadata("design:type", String)
111
- ], PaymentHistory.prototype, "invoiceUrl", void 0);
112
- __decorate([
113
- (0, typeorm_1.Column)({ type: 'text', nullable: true }),
114
- (0, swagger_1.ApiProperty)({
115
- description: 'Internal notes about the payment',
116
- example: 'Refund initiated due to double charge.',
117
- nullable: true,
118
- }),
119
- __metadata("design:type", String)
120
- ], PaymentHistory.prototype, "notes", void 0);
121
- exports.PaymentHistory = PaymentHistory = __decorate([
122
- (0, typeorm_1.Entity)('payment_history')
123
- ], PaymentHistory);
124
- //# sourceMappingURL=payment-history.entity.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"payment-history.entity.js","sourceRoot":"","sources":["../../../src/entities/subscriptions/payment-history.entity.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,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AAM,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACtE,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,kEAAkE;QAC/E,OAAO,EAAE,eAAe;QACxB,QAAQ,EAAE,IAAI;KACf,CAAC;;mEACyC;AAQ3C;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,yEAAyE;QACtF,OAAO,EAAE,EAAE,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE;QAC5C,QAAQ,EAAE,IAAI;KACf,CAAC;;yDAC4C;AAQ9C;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxD,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,gCAAgC;QAC7C,OAAO,EAAE,oCAAoC;QAC7C,QAAQ,EAAE,IAAI;KACf,CAAC;;kDACwB;AAQ1B;IANC,IAAA,gBAAM,EAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACxC,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,kCAAkC;QAC/C,OAAO,EAAE,wCAAwC;QACjD,QAAQ,EAAE,IAAI;KACf,CAAC;;6CACmB;yBAnEV,cAAc;IAD1B,IAAA,gBAAM,EAAC,iBAAiB,CAAC;GACb,cAAc,CAoE1B"}
@@ -1,7 +0,0 @@
1
- export * from "./wati-chat.entity";
2
- export * from "./wati-configuration.entity";
3
- export * from "./wati-events.entity";
4
- export * from "./wati-message.entity";
5
- export * from "./wati-user-access.entity";
6
- export * from "./wati-user-access-log.entity";
7
- export * from "./wati.enum";
@@ -1,24 +0,0 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
- for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
- };
16
- Object.defineProperty(exports, "__esModule", { value: true });
17
- __exportStar(require("./wati-chat.entity"), exports);
18
- __exportStar(require("./wati-configuration.entity"), exports);
19
- __exportStar(require("./wati-events.entity"), exports);
20
- __exportStar(require("./wati-message.entity"), exports);
21
- __exportStar(require("./wati-user-access.entity"), exports);
22
- __exportStar(require("./wati-user-access-log.entity"), exports);
23
- __exportStar(require("./wati.enum"), exports);
24
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/entities/thirdparty/wati/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,qDAAmC;AACnC,8DAA4C;AAC5C,uDAAqC;AACrC,wDAAsC;AACtC,4DAA0C;AAC1C,gEAA8C;AAC9C,8CAA4B"}