@fiado/type-kit 1.9.69 → 1.9.71
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/collector/dtos/CollectionOrderBusiness.d.ts +32 -0
- package/bin/collector/dtos/CollectionOrderBusiness.js +140 -0
- package/bin/collector/dtos/CollectionOrderExecution.d.ts +18 -0
- package/bin/collector/dtos/CollectionOrderExecution.js +2 -0
- package/bin/collector/index.d.ts +1 -1
- package/bin/collector/index.js +1 -1
- package/package.json +1 -1
- package/src/collector/dtos/CollectionOrderBusiness.ts +114 -0
- package/src/collector/dtos/{OrdersCollector.ts → CollectionOrderExecution.ts} +1 -1
- package/src/collector/index.ts +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { Company } from '../../company';
|
|
2
|
+
import { Provider } from '../../provider';
|
|
3
|
+
export declare class CollectionOrderBusiness {
|
|
4
|
+
id: string;
|
|
5
|
+
directoryId: string;
|
|
6
|
+
peopleId: string;
|
|
7
|
+
tenantId: string;
|
|
8
|
+
scheduleCollectionDate: number;
|
|
9
|
+
status?: string;
|
|
10
|
+
amount?: number;
|
|
11
|
+
description?: string;
|
|
12
|
+
paymentMethod?: string;
|
|
13
|
+
paymentDate?: number;
|
|
14
|
+
discountAmount?: number;
|
|
15
|
+
originalAmount?: number;
|
|
16
|
+
amountAfterDiscount?: number;
|
|
17
|
+
taxAmount?: number;
|
|
18
|
+
notes?: string;
|
|
19
|
+
location?: {
|
|
20
|
+
latitude?: string;
|
|
21
|
+
longitude?: string;
|
|
22
|
+
};
|
|
23
|
+
company?: Company;
|
|
24
|
+
totalToCollect?: number;
|
|
25
|
+
provider?: Provider;
|
|
26
|
+
totalCollected?: number;
|
|
27
|
+
currencyId?: string;
|
|
28
|
+
metadata?: Record<string, any>;
|
|
29
|
+
type?: string;
|
|
30
|
+
createdAt?: Date;
|
|
31
|
+
updatedAt?: Date;
|
|
32
|
+
}
|
|
@@ -0,0 +1,140 @@
|
|
|
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.CollectionOrderBusiness = void 0;
|
|
13
|
+
const CollectorOrderStatus_1 = require("../enums/CollectorOrderStatus");
|
|
14
|
+
const company_1 = require("../../company");
|
|
15
|
+
const provider_1 = require("../../provider");
|
|
16
|
+
const class_validator_1 = require("class-validator");
|
|
17
|
+
class CollectionOrderBusiness {
|
|
18
|
+
}
|
|
19
|
+
exports.CollectionOrderBusiness = CollectionOrderBusiness;
|
|
20
|
+
__decorate([
|
|
21
|
+
(0, class_validator_1.IsUUID)(),
|
|
22
|
+
__metadata("design:type", String)
|
|
23
|
+
], CollectionOrderBusiness.prototype, "id", void 0);
|
|
24
|
+
__decorate([
|
|
25
|
+
(0, class_validator_1.IsString)(),
|
|
26
|
+
__metadata("design:type", String)
|
|
27
|
+
], CollectionOrderBusiness.prototype, "directoryId", void 0);
|
|
28
|
+
__decorate([
|
|
29
|
+
(0, class_validator_1.IsString)(),
|
|
30
|
+
__metadata("design:type", String)
|
|
31
|
+
], CollectionOrderBusiness.prototype, "peopleId", void 0);
|
|
32
|
+
__decorate([
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], CollectionOrderBusiness.prototype, "tenantId", void 0);
|
|
36
|
+
__decorate([
|
|
37
|
+
(0, class_validator_1.IsNumber)(),
|
|
38
|
+
__metadata("design:type", Number)
|
|
39
|
+
], CollectionOrderBusiness.prototype, "scheduleCollectionDate", void 0);
|
|
40
|
+
__decorate([
|
|
41
|
+
(0, class_validator_1.IsEnum)(CollectorOrderStatus_1.CollectorOrderStatus),
|
|
42
|
+
(0, class_validator_1.IsOptional)(),
|
|
43
|
+
__metadata("design:type", String)
|
|
44
|
+
], CollectionOrderBusiness.prototype, "status", void 0);
|
|
45
|
+
__decorate([
|
|
46
|
+
(0, class_validator_1.IsNumber)(),
|
|
47
|
+
(0, class_validator_1.IsOptional)(),
|
|
48
|
+
__metadata("design:type", Number)
|
|
49
|
+
], CollectionOrderBusiness.prototype, "amount", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
(0, class_validator_1.IsOptional)(),
|
|
53
|
+
__metadata("design:type", String)
|
|
54
|
+
], CollectionOrderBusiness.prototype, "description", void 0);
|
|
55
|
+
__decorate([
|
|
56
|
+
(0, class_validator_1.IsString)(),
|
|
57
|
+
(0, class_validator_1.IsEnum)(['CASH', 'CARD', 'TRANSFER', 'OTHER']),
|
|
58
|
+
(0, class_validator_1.IsOptional)(),
|
|
59
|
+
__metadata("design:type", String)
|
|
60
|
+
], CollectionOrderBusiness.prototype, "paymentMethod", void 0);
|
|
61
|
+
__decorate([
|
|
62
|
+
(0, class_validator_1.IsNumber)(),
|
|
63
|
+
(0, class_validator_1.IsOptional)(),
|
|
64
|
+
__metadata("design:type", Number)
|
|
65
|
+
], CollectionOrderBusiness.prototype, "paymentDate", void 0);
|
|
66
|
+
__decorate([
|
|
67
|
+
(0, class_validator_1.IsNumber)(),
|
|
68
|
+
(0, class_validator_1.IsOptional)(),
|
|
69
|
+
__metadata("design:type", Number)
|
|
70
|
+
], CollectionOrderBusiness.prototype, "discountAmount", void 0);
|
|
71
|
+
__decorate([
|
|
72
|
+
(0, class_validator_1.IsNumber)(),
|
|
73
|
+
(0, class_validator_1.IsOptional)(),
|
|
74
|
+
__metadata("design:type", Number)
|
|
75
|
+
], CollectionOrderBusiness.prototype, "originalAmount", void 0);
|
|
76
|
+
__decorate([
|
|
77
|
+
(0, class_validator_1.IsNumber)(),
|
|
78
|
+
(0, class_validator_1.IsOptional)(),
|
|
79
|
+
__metadata("design:type", Number)
|
|
80
|
+
], CollectionOrderBusiness.prototype, "amountAfterDiscount", void 0);
|
|
81
|
+
__decorate([
|
|
82
|
+
(0, class_validator_1.IsNumber)(),
|
|
83
|
+
(0, class_validator_1.IsOptional)(),
|
|
84
|
+
__metadata("design:type", Number)
|
|
85
|
+
], CollectionOrderBusiness.prototype, "taxAmount", void 0);
|
|
86
|
+
__decorate([
|
|
87
|
+
(0, class_validator_1.IsString)(),
|
|
88
|
+
(0, class_validator_1.IsOptional)(),
|
|
89
|
+
__metadata("design:type", String)
|
|
90
|
+
], CollectionOrderBusiness.prototype, "notes", void 0);
|
|
91
|
+
__decorate([
|
|
92
|
+
(0, class_validator_1.IsObject)(),
|
|
93
|
+
(0, class_validator_1.IsOptional)(),
|
|
94
|
+
__metadata("design:type", Object)
|
|
95
|
+
], CollectionOrderBusiness.prototype, "location", void 0);
|
|
96
|
+
__decorate([
|
|
97
|
+
(0, class_validator_1.IsString)(),
|
|
98
|
+
(0, class_validator_1.IsOptional)(),
|
|
99
|
+
__metadata("design:type", String)
|
|
100
|
+
], CollectionOrderBusiness.prototype, "company", void 0);
|
|
101
|
+
__decorate([
|
|
102
|
+
(0, class_validator_1.IsNumber)(),
|
|
103
|
+
(0, class_validator_1.IsOptional)(),
|
|
104
|
+
__metadata("design:type", Number)
|
|
105
|
+
], CollectionOrderBusiness.prototype, "totalToCollect", void 0);
|
|
106
|
+
__decorate([
|
|
107
|
+
(0, class_validator_1.IsString)(),
|
|
108
|
+
(0, class_validator_1.IsOptional)(),
|
|
109
|
+
__metadata("design:type", String)
|
|
110
|
+
], CollectionOrderBusiness.prototype, "provider", void 0);
|
|
111
|
+
__decorate([
|
|
112
|
+
(0, class_validator_1.IsNumber)(),
|
|
113
|
+
(0, class_validator_1.IsOptional)(),
|
|
114
|
+
__metadata("design:type", Number)
|
|
115
|
+
], CollectionOrderBusiness.prototype, "totalCollected", void 0);
|
|
116
|
+
__decorate([
|
|
117
|
+
(0, class_validator_1.IsString)(),
|
|
118
|
+
(0, class_validator_1.IsOptional)(),
|
|
119
|
+
__metadata("design:type", String)
|
|
120
|
+
], CollectionOrderBusiness.prototype, "currencyId", void 0);
|
|
121
|
+
__decorate([
|
|
122
|
+
(0, class_validator_1.IsObject)(),
|
|
123
|
+
(0, class_validator_1.IsOptional)(),
|
|
124
|
+
__metadata("design:type", Object)
|
|
125
|
+
], CollectionOrderBusiness.prototype, "metadata", void 0);
|
|
126
|
+
__decorate([
|
|
127
|
+
(0, class_validator_1.IsString)(),
|
|
128
|
+
(0, class_validator_1.IsOptional)(),
|
|
129
|
+
__metadata("design:type", String)
|
|
130
|
+
], CollectionOrderBusiness.prototype, "type", void 0);
|
|
131
|
+
__decorate([
|
|
132
|
+
(0, class_validator_1.IsDate)(),
|
|
133
|
+
(0, class_validator_1.IsOptional)(),
|
|
134
|
+
__metadata("design:type", Date)
|
|
135
|
+
], CollectionOrderBusiness.prototype, "createdAt", void 0);
|
|
136
|
+
__decorate([
|
|
137
|
+
(0, class_validator_1.IsDate)(),
|
|
138
|
+
(0, class_validator_1.IsOptional)(),
|
|
139
|
+
__metadata("design:type", Date)
|
|
140
|
+
], CollectionOrderBusiness.prototype, "updatedAt", void 0);
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { CollectionOrderExecutionStatus } from "../enums/CollectionOrderExecutionStatus";
|
|
2
|
+
export interface CollectionOrderExecution {
|
|
3
|
+
id: string;
|
|
4
|
+
executionId: string;
|
|
5
|
+
createdAt: number;
|
|
6
|
+
updatedAt: number;
|
|
7
|
+
status: CollectionOrderExecutionStatus;
|
|
8
|
+
startedAt: number;
|
|
9
|
+
finishedAt?: number;
|
|
10
|
+
totalOrders?: number;
|
|
11
|
+
batchesSent?: number;
|
|
12
|
+
ordersCompleted?: number;
|
|
13
|
+
ordersPartial?: number;
|
|
14
|
+
ordersDue?: number;
|
|
15
|
+
ordersError?: number;
|
|
16
|
+
notes?: string;
|
|
17
|
+
executedBy?: string;
|
|
18
|
+
}
|
package/bin/collector/index.d.ts
CHANGED
|
@@ -6,4 +6,4 @@ export * from './dtos/CreateCollectionOrderRequest';
|
|
|
6
6
|
export * from './dtos/CollectorTransactionResponse';
|
|
7
7
|
export * from './dtos/CreditContractResponse';
|
|
8
8
|
export * from './dtos/CollectorTransactionUpdateRequest';
|
|
9
|
-
export * from './dtos/
|
|
9
|
+
export * from './dtos/CollectionOrderExecution';
|
package/bin/collector/index.js
CHANGED
|
@@ -22,4 +22,4 @@ __exportStar(require("./dtos/CreateCollectionOrderRequest"), exports);
|
|
|
22
22
|
__exportStar(require("./dtos/CollectorTransactionResponse"), exports);
|
|
23
23
|
__exportStar(require("./dtos/CreditContractResponse"), exports);
|
|
24
24
|
__exportStar(require("./dtos/CollectorTransactionUpdateRequest"), exports);
|
|
25
|
-
__exportStar(require("./dtos/
|
|
25
|
+
__exportStar(require("./dtos/CollectionOrderExecution"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,114 @@
|
|
|
1
|
+
import { CollectorOrderStatus } from '../enums/CollectorOrderStatus';
|
|
2
|
+
import { Company } from '../../company';
|
|
3
|
+
import { Provider } from '../../provider';
|
|
4
|
+
import {
|
|
5
|
+
IsDate,
|
|
6
|
+
IsEnum,
|
|
7
|
+
IsNumber,
|
|
8
|
+
IsObject,
|
|
9
|
+
IsOptional,
|
|
10
|
+
IsString,
|
|
11
|
+
IsUUID,
|
|
12
|
+
} from 'class-validator';
|
|
13
|
+
|
|
14
|
+
export class CollectionOrderBusiness {
|
|
15
|
+
|
|
16
|
+
@IsUUID()
|
|
17
|
+
id!: string;
|
|
18
|
+
|
|
19
|
+
@IsString()
|
|
20
|
+
directoryId!: string;
|
|
21
|
+
|
|
22
|
+
@IsString()
|
|
23
|
+
peopleId!: string;
|
|
24
|
+
|
|
25
|
+
@IsString()
|
|
26
|
+
tenantId!: string;
|
|
27
|
+
|
|
28
|
+
@IsNumber()
|
|
29
|
+
scheduleCollectionDate!: number;
|
|
30
|
+
|
|
31
|
+
@IsEnum(CollectorOrderStatus)
|
|
32
|
+
@IsOptional()
|
|
33
|
+
status?: string;
|
|
34
|
+
|
|
35
|
+
@IsNumber()
|
|
36
|
+
@IsOptional()
|
|
37
|
+
amount?: number;
|
|
38
|
+
|
|
39
|
+
@IsString()
|
|
40
|
+
@IsOptional()
|
|
41
|
+
description?: string;
|
|
42
|
+
|
|
43
|
+
@IsString()
|
|
44
|
+
@IsEnum(['CASH', 'CARD', 'TRANSFER', 'OTHER'])
|
|
45
|
+
@IsOptional()
|
|
46
|
+
paymentMethod?: string;
|
|
47
|
+
|
|
48
|
+
@IsNumber()
|
|
49
|
+
@IsOptional()
|
|
50
|
+
paymentDate?: number;
|
|
51
|
+
|
|
52
|
+
@IsNumber()
|
|
53
|
+
@IsOptional()
|
|
54
|
+
discountAmount?: number;
|
|
55
|
+
|
|
56
|
+
@IsNumber()
|
|
57
|
+
@IsOptional()
|
|
58
|
+
originalAmount?: number;
|
|
59
|
+
|
|
60
|
+
@IsNumber()
|
|
61
|
+
@IsOptional()
|
|
62
|
+
amountAfterDiscount?: number;
|
|
63
|
+
|
|
64
|
+
@IsNumber()
|
|
65
|
+
@IsOptional()
|
|
66
|
+
taxAmount?: number;
|
|
67
|
+
|
|
68
|
+
@IsString()
|
|
69
|
+
@IsOptional()
|
|
70
|
+
notes?: string;
|
|
71
|
+
|
|
72
|
+
@IsObject()
|
|
73
|
+
@IsOptional()
|
|
74
|
+
location?: {
|
|
75
|
+
latitude?: string;
|
|
76
|
+
longitude?: string;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
@IsString()
|
|
80
|
+
@IsOptional()
|
|
81
|
+
company?: Company;
|
|
82
|
+
|
|
83
|
+
@IsNumber()
|
|
84
|
+
@IsOptional()
|
|
85
|
+
totalToCollect?: number;
|
|
86
|
+
|
|
87
|
+
@IsString()
|
|
88
|
+
@IsOptional()
|
|
89
|
+
provider?: Provider;
|
|
90
|
+
|
|
91
|
+
@IsNumber()
|
|
92
|
+
@IsOptional()
|
|
93
|
+
totalCollected?: number;
|
|
94
|
+
|
|
95
|
+
@IsString()
|
|
96
|
+
@IsOptional()
|
|
97
|
+
currencyId?: string;
|
|
98
|
+
|
|
99
|
+
@IsObject()
|
|
100
|
+
@IsOptional()
|
|
101
|
+
metadata?: Record<string, any>;
|
|
102
|
+
|
|
103
|
+
@IsString()
|
|
104
|
+
@IsOptional()
|
|
105
|
+
type?: string;
|
|
106
|
+
|
|
107
|
+
@IsDate()
|
|
108
|
+
@IsOptional()
|
|
109
|
+
createdAt?: Date;
|
|
110
|
+
|
|
111
|
+
@IsDate()
|
|
112
|
+
@IsOptional()
|
|
113
|
+
updatedAt?: Date;
|
|
114
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { CollectionOrderExecutionStatus } from "../enums/CollectionOrderExecutionStatus";
|
|
2
2
|
|
|
3
|
-
export interface
|
|
3
|
+
export interface CollectionOrderExecution {
|
|
4
4
|
id: string; // Clave primaria para DynamoDB
|
|
5
5
|
executionId: string; // Mantenemos por compatibilidad
|
|
6
6
|
createdAt: number; // Fecha de creación
|
package/src/collector/index.ts
CHANGED
|
@@ -8,4 +8,4 @@ export * from './dtos/CreateCollectionOrderRequest';
|
|
|
8
8
|
export * from './dtos/CollectorTransactionResponse';
|
|
9
9
|
export * from './dtos/CreditContractResponse';
|
|
10
10
|
export * from './dtos/CollectorTransactionUpdateRequest';
|
|
11
|
-
export * from './dtos/
|
|
11
|
+
export * from './dtos/CollectionOrderExecution';
|