@fiado/type-kit 3.264.0 → 3.266.0
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/collection/dtos/AuthorizeCollectionMovementRequest.d.ts +13 -0
- package/bin/collection/dtos/AuthorizeCollectionMovementRequest.js +57 -0
- package/bin/collection/dtos/AuthorizeCollectionMovementResponse.d.ts +7 -0
- package/bin/collection/dtos/AuthorizeCollectionMovementResponse.js +35 -0
- package/bin/collection/dtos/CollectRequest.d.ts +8 -0
- package/bin/collection/dtos/CollectRequest.js +40 -0
- package/bin/collection/dtos/CollectResponse.d.ts +7 -0
- package/bin/collection/dtos/CollectResponse.js +33 -0
- package/bin/collection/dtos/CollectionResultEvent.d.ts +12 -0
- package/bin/collection/dtos/CollectionResultEvent.js +50 -0
- package/bin/collection/dtos/PendingChargeDto.d.ts +19 -0
- package/bin/collection/dtos/PendingChargeDto.js +87 -0
- package/bin/collection/dtos/RegisterCollectibleRequest.d.ts +7 -0
- package/bin/collection/dtos/RegisterCollectibleRequest.js +36 -0
- package/bin/collection/enums/CollectionResultStatus.d.ts +5 -0
- package/bin/collection/enums/CollectionResultStatus.js +9 -0
- package/bin/collection/enums/CollectionState.d.ts +8 -0
- package/bin/collection/enums/CollectionState.js +12 -0
- package/bin/collection/enums/MechanismType.d.ts +5 -0
- package/bin/collection/enums/MechanismType.js +9 -0
- package/bin/collection/enums/SagaStep.d.ts +7 -0
- package/bin/collection/enums/SagaStep.js +11 -0
- package/bin/collection/index.d.ts +11 -0
- package/bin/collection/index.js +29 -0
- package/bin/index.d.ts +1 -0
- package/bin/index.js +6 -1
- package/bin/retailWizard/dtos/RetailCustomerListItem.d.ts +36 -0
- package/bin/retailWizard/dtos/RetailCustomerListItem.js +2 -0
- package/bin/retailWizard/dtos/responses/BackofficeCustomerPurchasesResponse.d.ts +20 -0
- package/bin/retailWizard/dtos/responses/BackofficeCustomerPurchasesResponse.js +2 -0
- package/bin/retailWizard/dtos/responses/BackofficeCustomersResponse.d.ts +14 -0
- package/bin/retailWizard/dtos/responses/BackofficeCustomersResponse.js +2 -0
- package/bin/retailWizard/dtos/responses/BackofficeSellerKpisResponse.d.ts +27 -0
- package/bin/retailWizard/dtos/responses/BackofficeSellerKpisResponse.js +2 -0
- package/bin/retailWizard/dtos/responses/BackofficeStoreKpisResponse.d.ts +29 -0
- package/bin/retailWizard/dtos/responses/BackofficeStoreKpisResponse.js +2 -0
- package/bin/retailWizard/index.d.ts +5 -0
- package/bin/retailWizard/index.js +6 -0
- package/package.json +1 -1
- package/src/collection/dtos/AuthorizeCollectionMovementRequest.ts +15 -0
- package/src/collection/dtos/AuthorizeCollectionMovementResponse.ts +9 -0
- package/src/collection/dtos/CollectRequest.ts +10 -0
- package/src/collection/dtos/CollectResponse.ts +9 -0
- package/src/collection/dtos/CollectionResultEvent.ts +14 -0
- package/src/collection/dtos/PendingChargeDto.ts +21 -0
- package/src/collection/dtos/RegisterCollectibleRequest.ts +9 -0
- package/src/collection/enums/CollectionResultStatus.ts +5 -0
- package/src/collection/enums/CollectionState.ts +8 -0
- package/src/collection/enums/MechanismType.ts +5 -0
- package/src/collection/enums/SagaStep.ts +7 -0
- package/src/collection/index.ts +14 -0
- package/src/index.ts +5 -0
- package/src/retailWizard/dtos/RetailCustomerListItem.ts +36 -0
- package/src/retailWizard/dtos/responses/BackofficeCustomerPurchasesResponse.ts +21 -0
- package/src/retailWizard/dtos/responses/BackofficeCustomersResponse.ts +15 -0
- package/src/retailWizard/dtos/responses/BackofficeSellerKpisResponse.ts +28 -0
- package/src/retailWizard/dtos/responses/BackofficeStoreKpisResponse.ts +30 -0
- package/src/retailWizard/index.ts +6 -0
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { MechanismType } from '../enums/MechanismType';
|
|
2
|
+
import { CurrencyId } from '../../currency/enums/CurrencyId';
|
|
3
|
+
export declare class AuthorizeCollectionMovementRequest {
|
|
4
|
+
executionId: string;
|
|
5
|
+
directoryId: string;
|
|
6
|
+
provider: string;
|
|
7
|
+
mechanism: MechanismType;
|
|
8
|
+
amount: number;
|
|
9
|
+
currencyId: CurrencyId;
|
|
10
|
+
intentId?: string;
|
|
11
|
+
chargeId?: string;
|
|
12
|
+
holdTxId?: string;
|
|
13
|
+
}
|
|
@@ -0,0 +1,57 @@
|
|
|
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.AuthorizeCollectionMovementRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const MechanismType_1 = require("../enums/MechanismType");
|
|
15
|
+
const CurrencyId_1 = require("../../currency/enums/CurrencyId");
|
|
16
|
+
class AuthorizeCollectionMovementRequest {
|
|
17
|
+
}
|
|
18
|
+
exports.AuthorizeCollectionMovementRequest = AuthorizeCollectionMovementRequest;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], AuthorizeCollectionMovementRequest.prototype, "executionId", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], AuthorizeCollectionMovementRequest.prototype, "directoryId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], AuthorizeCollectionMovementRequest.prototype, "provider", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsEnum)(MechanismType_1.MechanismType),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], AuthorizeCollectionMovementRequest.prototype, "mechanism", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsInt)(),
|
|
37
|
+
__metadata("design:type", Number)
|
|
38
|
+
], AuthorizeCollectionMovementRequest.prototype, "amount", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsEnum)(CurrencyId_1.CurrencyId),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], AuthorizeCollectionMovementRequest.prototype, "currencyId", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsOptional)(),
|
|
45
|
+
(0, class_validator_1.IsString)(),
|
|
46
|
+
__metadata("design:type", String)
|
|
47
|
+
], AuthorizeCollectionMovementRequest.prototype, "intentId", void 0);
|
|
48
|
+
__decorate([
|
|
49
|
+
(0, class_validator_1.IsOptional)(),
|
|
50
|
+
(0, class_validator_1.IsString)(),
|
|
51
|
+
__metadata("design:type", String)
|
|
52
|
+
], AuthorizeCollectionMovementRequest.prototype, "chargeId", void 0);
|
|
53
|
+
__decorate([
|
|
54
|
+
(0, class_validator_1.IsOptional)(),
|
|
55
|
+
(0, class_validator_1.IsString)(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], AuthorizeCollectionMovementRequest.prototype, "holdTxId", void 0);
|
|
@@ -0,0 +1,35 @@
|
|
|
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.AuthorizeCollectionMovementResponse = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const CollectionResultStatus_1 = require("../enums/CollectionResultStatus");
|
|
15
|
+
class AuthorizeCollectionMovementResponse {
|
|
16
|
+
}
|
|
17
|
+
exports.AuthorizeCollectionMovementResponse = AuthorizeCollectionMovementResponse;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsEnum)(CollectionResultStatus_1.CollectionResultStatus),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], AuthorizeCollectionMovementResponse.prototype, "status", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsInt)(),
|
|
24
|
+
__metadata("design:type", Number)
|
|
25
|
+
], AuthorizeCollectionMovementResponse.prototype, "amount", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsOptional)(),
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], AuthorizeCollectionMovementResponse.prototype, "holdTxId", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsOptional)(),
|
|
33
|
+
(0, class_validator_1.IsString)(),
|
|
34
|
+
__metadata("design:type", String)
|
|
35
|
+
], AuthorizeCollectionMovementResponse.prototype, "transactionId", void 0);
|
|
@@ -0,0 +1,40 @@
|
|
|
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.CollectRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class CollectRequest {
|
|
15
|
+
}
|
|
16
|
+
exports.CollectRequest = CollectRequest;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], CollectRequest.prototype, "ownerRef", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], CollectRequest.prototype, "tenantId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], CollectRequest.prototype, "domain", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], CollectRequest.prototype, "productId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], CollectRequest.prototype, "chargeId", void 0);
|
|
37
|
+
__decorate([
|
|
38
|
+
(0, class_validator_1.IsInt)(),
|
|
39
|
+
__metadata("design:type", Number)
|
|
40
|
+
], CollectRequest.prototype, "amount", void 0);
|
|
@@ -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.CollectResponse = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const CollectionResultStatus_1 = require("../enums/CollectionResultStatus");
|
|
15
|
+
class CollectResponse {
|
|
16
|
+
}
|
|
17
|
+
exports.CollectResponse = CollectResponse;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsString)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], CollectResponse.prototype, "intentId", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsEnum)(CollectionResultStatus_1.CollectionResultStatus),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], CollectResponse.prototype, "status", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsInt)(),
|
|
28
|
+
__metadata("design:type", Number)
|
|
29
|
+
], CollectResponse.prototype, "amountReserved", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsInt)(),
|
|
32
|
+
__metadata("design:type", Number)
|
|
33
|
+
], CollectResponse.prototype, "amountCollected", void 0);
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { CollectionResultStatus } from '../enums/CollectionResultStatus';
|
|
2
|
+
import { MechanismType } from '../enums/MechanismType';
|
|
3
|
+
export declare class CollectionResultEvent {
|
|
4
|
+
attemptId: string;
|
|
5
|
+
intentId: string;
|
|
6
|
+
domain: string;
|
|
7
|
+
tenantId: string;
|
|
8
|
+
chargeId: string;
|
|
9
|
+
status: CollectionResultStatus;
|
|
10
|
+
mechanism: MechanismType;
|
|
11
|
+
amount: number;
|
|
12
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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.CollectionResultEvent = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const CollectionResultStatus_1 = require("../enums/CollectionResultStatus");
|
|
15
|
+
const MechanismType_1 = require("../enums/MechanismType");
|
|
16
|
+
class CollectionResultEvent {
|
|
17
|
+
}
|
|
18
|
+
exports.CollectionResultEvent = CollectionResultEvent;
|
|
19
|
+
__decorate([
|
|
20
|
+
(0, class_validator_1.IsString)(),
|
|
21
|
+
__metadata("design:type", String)
|
|
22
|
+
], CollectionResultEvent.prototype, "attemptId", void 0);
|
|
23
|
+
__decorate([
|
|
24
|
+
(0, class_validator_1.IsString)(),
|
|
25
|
+
__metadata("design:type", String)
|
|
26
|
+
], CollectionResultEvent.prototype, "intentId", void 0);
|
|
27
|
+
__decorate([
|
|
28
|
+
(0, class_validator_1.IsString)(),
|
|
29
|
+
__metadata("design:type", String)
|
|
30
|
+
], CollectionResultEvent.prototype, "domain", void 0);
|
|
31
|
+
__decorate([
|
|
32
|
+
(0, class_validator_1.IsString)(),
|
|
33
|
+
__metadata("design:type", String)
|
|
34
|
+
], CollectionResultEvent.prototype, "tenantId", void 0);
|
|
35
|
+
__decorate([
|
|
36
|
+
(0, class_validator_1.IsString)(),
|
|
37
|
+
__metadata("design:type", String)
|
|
38
|
+
], CollectionResultEvent.prototype, "chargeId", void 0);
|
|
39
|
+
__decorate([
|
|
40
|
+
(0, class_validator_1.IsEnum)(CollectionResultStatus_1.CollectionResultStatus),
|
|
41
|
+
__metadata("design:type", String)
|
|
42
|
+
], CollectionResultEvent.prototype, "status", void 0);
|
|
43
|
+
__decorate([
|
|
44
|
+
(0, class_validator_1.IsEnum)(MechanismType_1.MechanismType),
|
|
45
|
+
__metadata("design:type", String)
|
|
46
|
+
], CollectionResultEvent.prototype, "mechanism", void 0);
|
|
47
|
+
__decorate([
|
|
48
|
+
(0, class_validator_1.IsInt)(),
|
|
49
|
+
__metadata("design:type", Number)
|
|
50
|
+
], CollectionResultEvent.prototype, "amount", void 0);
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { CurrencyId } from '../../currency/enums/CurrencyId';
|
|
2
|
+
export declare class PendingChargeDto {
|
|
3
|
+
chargeId: string;
|
|
4
|
+
ownerRef: string;
|
|
5
|
+
tenantId: string;
|
|
6
|
+
domain: string;
|
|
7
|
+
parentDebtId: string;
|
|
8
|
+
installmentNumber: number;
|
|
9
|
+
amount: number;
|
|
10
|
+
currency: CurrencyId;
|
|
11
|
+
dueDate: string;
|
|
12
|
+
status: string;
|
|
13
|
+
principalAmount?: number;
|
|
14
|
+
interestAmount?: number;
|
|
15
|
+
taxAmount?: number;
|
|
16
|
+
outstandingBalance?: number;
|
|
17
|
+
amountCollected?: number;
|
|
18
|
+
metadata?: Record<string, unknown>;
|
|
19
|
+
}
|
|
@@ -0,0 +1,87 @@
|
|
|
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.PendingChargeDto = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const CurrencyId_1 = require("../../currency/enums/CurrencyId");
|
|
15
|
+
class PendingChargeDto {
|
|
16
|
+
}
|
|
17
|
+
exports.PendingChargeDto = PendingChargeDto;
|
|
18
|
+
__decorate([
|
|
19
|
+
(0, class_validator_1.IsString)(),
|
|
20
|
+
__metadata("design:type", String)
|
|
21
|
+
], PendingChargeDto.prototype, "chargeId", void 0);
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsString)(),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], PendingChargeDto.prototype, "ownerRef", void 0);
|
|
26
|
+
__decorate([
|
|
27
|
+
(0, class_validator_1.IsString)(),
|
|
28
|
+
__metadata("design:type", String)
|
|
29
|
+
], PendingChargeDto.prototype, "tenantId", void 0);
|
|
30
|
+
__decorate([
|
|
31
|
+
(0, class_validator_1.IsString)(),
|
|
32
|
+
__metadata("design:type", String)
|
|
33
|
+
], PendingChargeDto.prototype, "domain", void 0);
|
|
34
|
+
__decorate([
|
|
35
|
+
(0, class_validator_1.IsString)(),
|
|
36
|
+
__metadata("design:type", String)
|
|
37
|
+
], PendingChargeDto.prototype, "parentDebtId", void 0);
|
|
38
|
+
__decorate([
|
|
39
|
+
(0, class_validator_1.IsInt)(),
|
|
40
|
+
__metadata("design:type", Number)
|
|
41
|
+
], PendingChargeDto.prototype, "installmentNumber", void 0);
|
|
42
|
+
__decorate([
|
|
43
|
+
(0, class_validator_1.IsInt)(),
|
|
44
|
+
__metadata("design:type", Number)
|
|
45
|
+
], PendingChargeDto.prototype, "amount", void 0);
|
|
46
|
+
__decorate([
|
|
47
|
+
(0, class_validator_1.IsEnum)(CurrencyId_1.CurrencyId),
|
|
48
|
+
__metadata("design:type", String)
|
|
49
|
+
], PendingChargeDto.prototype, "currency", void 0);
|
|
50
|
+
__decorate([
|
|
51
|
+
(0, class_validator_1.IsString)(),
|
|
52
|
+
__metadata("design:type", String)
|
|
53
|
+
], PendingChargeDto.prototype, "dueDate", void 0);
|
|
54
|
+
__decorate([
|
|
55
|
+
(0, class_validator_1.IsString)(),
|
|
56
|
+
__metadata("design:type", String)
|
|
57
|
+
], PendingChargeDto.prototype, "status", void 0);
|
|
58
|
+
__decorate([
|
|
59
|
+
(0, class_validator_1.IsOptional)(),
|
|
60
|
+
(0, class_validator_1.IsInt)(),
|
|
61
|
+
__metadata("design:type", Number)
|
|
62
|
+
], PendingChargeDto.prototype, "principalAmount", void 0);
|
|
63
|
+
__decorate([
|
|
64
|
+
(0, class_validator_1.IsOptional)(),
|
|
65
|
+
(0, class_validator_1.IsInt)(),
|
|
66
|
+
__metadata("design:type", Number)
|
|
67
|
+
], PendingChargeDto.prototype, "interestAmount", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, class_validator_1.IsOptional)(),
|
|
70
|
+
(0, class_validator_1.IsInt)(),
|
|
71
|
+
__metadata("design:type", Number)
|
|
72
|
+
], PendingChargeDto.prototype, "taxAmount", void 0);
|
|
73
|
+
__decorate([
|
|
74
|
+
(0, class_validator_1.IsOptional)(),
|
|
75
|
+
(0, class_validator_1.IsInt)(),
|
|
76
|
+
__metadata("design:type", Number)
|
|
77
|
+
], PendingChargeDto.prototype, "outstandingBalance", void 0);
|
|
78
|
+
__decorate([
|
|
79
|
+
(0, class_validator_1.IsOptional)(),
|
|
80
|
+
(0, class_validator_1.IsInt)(),
|
|
81
|
+
__metadata("design:type", Number)
|
|
82
|
+
], PendingChargeDto.prototype, "amountCollected", void 0);
|
|
83
|
+
__decorate([
|
|
84
|
+
(0, class_validator_1.IsOptional)(),
|
|
85
|
+
(0, class_validator_1.IsObject)(),
|
|
86
|
+
__metadata("design:type", Object)
|
|
87
|
+
], PendingChargeDto.prototype, "metadata", void 0);
|
|
@@ -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.RegisterCollectibleRequest = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
class RegisterCollectibleRequest {
|
|
15
|
+
}
|
|
16
|
+
exports.RegisterCollectibleRequest = RegisterCollectibleRequest;
|
|
17
|
+
__decorate([
|
|
18
|
+
(0, class_validator_1.IsString)(),
|
|
19
|
+
__metadata("design:type", String)
|
|
20
|
+
], RegisterCollectibleRequest.prototype, "ownerRef", void 0);
|
|
21
|
+
__decorate([
|
|
22
|
+
(0, class_validator_1.IsString)(),
|
|
23
|
+
__metadata("design:type", String)
|
|
24
|
+
], RegisterCollectibleRequest.prototype, "tenantId", void 0);
|
|
25
|
+
__decorate([
|
|
26
|
+
(0, class_validator_1.IsString)(),
|
|
27
|
+
__metadata("design:type", String)
|
|
28
|
+
], RegisterCollectibleRequest.prototype, "domain", void 0);
|
|
29
|
+
__decorate([
|
|
30
|
+
(0, class_validator_1.IsString)(),
|
|
31
|
+
__metadata("design:type", String)
|
|
32
|
+
], RegisterCollectibleRequest.prototype, "productId", void 0);
|
|
33
|
+
__decorate([
|
|
34
|
+
(0, class_validator_1.IsString)(),
|
|
35
|
+
__metadata("design:type", String)
|
|
36
|
+
], RegisterCollectibleRequest.prototype, "chargeId", void 0);
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollectionResultStatus = void 0;
|
|
4
|
+
var CollectionResultStatus;
|
|
5
|
+
(function (CollectionResultStatus) {
|
|
6
|
+
CollectionResultStatus["FULL"] = "FULL";
|
|
7
|
+
CollectionResultStatus["PARTIAL"] = "PARTIAL";
|
|
8
|
+
CollectionResultStatus["NONE"] = "NONE";
|
|
9
|
+
})(CollectionResultStatus || (exports.CollectionResultStatus = CollectionResultStatus = {}));
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.CollectionState = void 0;
|
|
4
|
+
var CollectionState;
|
|
5
|
+
(function (CollectionState) {
|
|
6
|
+
CollectionState["PENDING"] = "PENDING";
|
|
7
|
+
CollectionState["ATTEMPT"] = "ATTEMPT";
|
|
8
|
+
CollectionState["RESERVED"] = "RESERVED";
|
|
9
|
+
CollectionState["COLLECTED"] = "COLLECTED";
|
|
10
|
+
CollectionState["AWAITING_FUNDS"] = "AWAITING_FUNDS";
|
|
11
|
+
CollectionState["CANCELLED"] = "CANCELLED";
|
|
12
|
+
})(CollectionState || (exports.CollectionState = CollectionState = {}));
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.MechanismType = void 0;
|
|
4
|
+
var MechanismType;
|
|
5
|
+
(function (MechanismType) {
|
|
6
|
+
MechanismType["USD_PREAUTH"] = "USD_PREAUTH";
|
|
7
|
+
MechanismType["USD_DIRECT"] = "USD_DIRECT";
|
|
8
|
+
MechanismType["MXN_DIRECT"] = "MXN_DIRECT";
|
|
9
|
+
})(MechanismType || (exports.MechanismType = MechanismType = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.SagaStep = void 0;
|
|
4
|
+
var SagaStep;
|
|
5
|
+
(function (SagaStep) {
|
|
6
|
+
SagaStep["RESOLVE"] = "RESOLVE";
|
|
7
|
+
SagaStep["PICK_SOURCE"] = "PICK_SOURCE";
|
|
8
|
+
SagaStep["EXECUTE"] = "EXECUTE";
|
|
9
|
+
SagaStep["PERSIST"] = "PERSIST";
|
|
10
|
+
SagaStep["DISPATCH"] = "DISPATCH";
|
|
11
|
+
})(SagaStep || (exports.SagaStep = SagaStep = {}));
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export * from './enums/MechanismType';
|
|
2
|
+
export * from './enums/CollectionState';
|
|
3
|
+
export * from './enums/SagaStep';
|
|
4
|
+
export * from './enums/CollectionResultStatus';
|
|
5
|
+
export * from './dtos/PendingChargeDto';
|
|
6
|
+
export * from './dtos/CollectRequest';
|
|
7
|
+
export * from './dtos/CollectResponse';
|
|
8
|
+
export * from './dtos/RegisterCollectibleRequest';
|
|
9
|
+
export * from './dtos/CollectionResultEvent';
|
|
10
|
+
export * from './dtos/AuthorizeCollectionMovementRequest';
|
|
11
|
+
export * from './dtos/AuthorizeCollectionMovementResponse';
|
|
@@ -0,0 +1,29 @@
|
|
|
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
|
+
// Enums
|
|
18
|
+
__exportStar(require("./enums/MechanismType"), exports);
|
|
19
|
+
__exportStar(require("./enums/CollectionState"), exports);
|
|
20
|
+
__exportStar(require("./enums/SagaStep"), exports);
|
|
21
|
+
__exportStar(require("./enums/CollectionResultStatus"), exports);
|
|
22
|
+
// DTOs
|
|
23
|
+
__exportStar(require("./dtos/PendingChargeDto"), exports);
|
|
24
|
+
__exportStar(require("./dtos/CollectRequest"), exports);
|
|
25
|
+
__exportStar(require("./dtos/CollectResponse"), exports);
|
|
26
|
+
__exportStar(require("./dtos/RegisterCollectibleRequest"), exports);
|
|
27
|
+
__exportStar(require("./dtos/CollectionResultEvent"), exports);
|
|
28
|
+
__exportStar(require("./dtos/AuthorizeCollectionMovementRequest"), exports);
|
|
29
|
+
__exportStar(require("./dtos/AuthorizeCollectionMovementResponse"), exports);
|
package/bin/index.d.ts
CHANGED
package/bin/index.js
CHANGED
|
@@ -38,7 +38,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
39
|
exports.IssuanceBusiness = exports.Blacklist = exports.CentralPayments = exports.Helpdesk = exports.FiadoApiResponse = exports.Auth = exports.LegalDocumentsBusiness = exports.Role = exports.STPAccount = exports.RiskProfile = exports.FraudPreventionEngine = exports.BBVARst = exports.Stp = exports.BenefitCenter = exports.BankAccount = exports.P2pContact = exports.CreditContract = exports.Contract = exports.ProductCatalog = exports.ContactInfo = exports.TransactionAnalytics = exports.Transaction = exports.TransactionProcessor = exports.GenericMessage = exports.EventBridgeMessage = exports.SessionActivity = exports.NotificationMessages = exports.ServicePayment = exports.Header = exports.Identity = exports.UserTags = exports.Group = exports.File = exports.ExchangeRate = exports.Directory = exports.Currency = exports.Country = exports.Card = exports.Authentication = exports.AppContent = exports.App = exports.Offices = exports.Places = exports.Address = exports.Beneficiary = exports.Activity = exports.Biometrics = exports.MetamapConnector = exports.Account = exports.Crypto = void 0;
|
|
40
40
|
exports.LoanOfferings = exports.Shortlink = exports.LoanConfig = exports.RetailWizard = exports.RetailCustomer = exports.RetailCards = exports.RetailCatalog = exports.RetailOrg = exports.EmailVerification = exports.NetworkConnector = exports.Modelias = exports.TotpSecurity = exports.Passport = exports.WalletFunding = exports.Remittance = exports.PlatformRbac = exports.CognitoBackofficeConnector = exports.TwilioConnector = exports.MessagesConnector = exports.Mdm = exports.MilestoneBusiness = exports.CirculoCredito = exports.CreditStatements = exports.Sentry = exports.AiEngine = exports.Funnel = exports.TeamsConnector = exports.PlatformErrorEvents = exports.CustomerFile = exports.CreditBackoffice = exports.CreditDashboard = exports.CreditEngine = exports.Credit = exports.ComissionBusiness = exports.ReferralBusiness = exports.ZendeskMessaging = exports.NotificationWS = exports.Event = exports.PayrollBusiness = exports.Cnbv = exports.DirectorySetting = exports.InvoiceCollector = exports.Collector = exports.Pricelist = exports.Company = exports.Services = exports.AccountIssuanceBusiness = exports.AppSelectionData = exports.Device = exports.Observations = void 0;
|
|
41
|
-
exports.Shipping = exports.PhoneSales = exports.Onboarding = exports.Kyc = exports.LoanScoring = exports.LoanCredit = exports.LoanCollectorAssignment = void 0;
|
|
41
|
+
exports.Collection = exports.Shipping = exports.PhoneSales = exports.Onboarding = exports.Kyc = exports.LoanScoring = exports.LoanCredit = exports.LoanCollectorAssignment = void 0;
|
|
42
42
|
exports.Crypto = __importStar(require("./crypto"));
|
|
43
43
|
exports.Account = __importStar(require("./account"));
|
|
44
44
|
exports.MetamapConnector = __importStar(require("./metamapConnector"));
|
|
@@ -194,3 +194,8 @@ exports.PhoneSales = __importStar(require("./phoneSales"));
|
|
|
194
194
|
// (tarjetas, teléfonos, …). ExternalShippingStatus se reexporta acá desde `card/` sin moverlo,
|
|
195
195
|
// para no romper a los consumidores actuales del namespace Card.
|
|
196
196
|
exports.Shipping = __importStar(require("./shipping"));
|
|
197
|
+
// Collection: contrato del motor de cobro central (collection-engine-business) — dominio
|
|
198
|
+
// agnóstico de proveedores/cuentas. PendingChargeDto es la deuda genérica; CollectRequest/
|
|
199
|
+
// CollectResponse el contrato dominio↔motor; AuthorizeCollectionMovementRequest/Response el
|
|
200
|
+
// contrato motor↔processor. Ver spec 2026-07-29-motor-cobro-central-design.
|
|
201
|
+
exports.Collection = __importStar(require("./collection"));
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Una fila de la lista **Clientes VL** del Portal Admin VentasLuga (A1).
|
|
3
|
+
* SureKeep Fase 3 — pista Retail.
|
|
4
|
+
*
|
|
5
|
+
* Sale del ítem de estadísticas de por vida (`RETAILER#<retailerId>` / `CUSTSTATS#<customerId>`
|
|
6
|
+
* dentro de `RetailSale_GT`), no de barrer ventas: por eso los totales son **de por vida** y no del
|
|
7
|
+
* periodo filtrado. Ver D19 / DEC-040.
|
|
8
|
+
*
|
|
9
|
+
* ⚠️ `customerName` y `customerPhone` son PII. Nunca loguear. La lectura queda registrada en
|
|
10
|
+
* `PiiAccessLog` igual que el listado de ventas.
|
|
11
|
+
*/
|
|
12
|
+
export interface RetailCustomerListItem {
|
|
13
|
+
retailCustomerId: string;
|
|
14
|
+
/** Congelado en la venta. `null` si nunca se pudo resolver. */
|
|
15
|
+
customerName: string | null;
|
|
16
|
+
customerPhone: string | null;
|
|
17
|
+
/** Compras DE POR VIDA. Puede venir negativo si hubo cancelaciones antes del backfill. */
|
|
18
|
+
salesCount: number;
|
|
19
|
+
/** Gastado DE POR VIDA, en centavos. Mide volumen COLOCADO (precio del equipo), no lo cobrado. */
|
|
20
|
+
totalSpentCents: number;
|
|
21
|
+
/** ISO-8601 de la primera compra. `null` mientras el backfill no lo haya sembrado. */
|
|
22
|
+
firstSaleAt: string | null;
|
|
23
|
+
/** ISO-8601 de la última compra. Es el campo por el que filtra la pantalla. */
|
|
24
|
+
lastSaleAt: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Tienda y vendedor de la ÚLTIMA compra.
|
|
27
|
+
*
|
|
28
|
+
* ⚠️ El mockup los llama «tienda favorita» y «vendedor recurrente», que serían la MODA. Acá es el
|
|
29
|
+
* ÚLTIMO: la moda exigiría un contador por (cliente × tienda), que multiplica el ítem por cada
|
|
30
|
+
* tienda donde el cliente compró. Se sirve el último y se declara. Ver `TD-F3-WIZ-MODA`.
|
|
31
|
+
*/
|
|
32
|
+
lastStoreId: string | null;
|
|
33
|
+
lastStoreName: string | null;
|
|
34
|
+
lastSellerId: string | null;
|
|
35
|
+
lastSellerName: string | null;
|
|
36
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Sale } from '../Sale';
|
|
2
|
+
/**
|
|
3
|
+
* GET /backoffice/customers/{id}/purchases — el historial de compras de un cliente (A2).
|
|
4
|
+
* SureKeep Fase 3 — pista Retail.
|
|
5
|
+
*
|
|
6
|
+
* Lee `RetailSale_GT` por `customerId-soldAt-index`, así que viene ordenado por fecha y pagina por
|
|
7
|
+
* cursor: un cliente puede tener muchas compras y la ficha las muestra de a poco.
|
|
8
|
+
*
|
|
9
|
+
* `compras30` / `compras90` se cuentan sobre la MISMA lectura cuando la ventana entra en la página;
|
|
10
|
+
* son los contadores que la pantalla muestra como sublínea del total de por vida.
|
|
11
|
+
*/
|
|
12
|
+
export interface BackofficeCustomerPurchasesResponse {
|
|
13
|
+
items: Sale[];
|
|
14
|
+
count: number;
|
|
15
|
+
nextToken?: string;
|
|
16
|
+
/** Compras en los últimos 30 días. */
|
|
17
|
+
last30Count: number;
|
|
18
|
+
/** Compras en los últimos 90 días — el que define el segmento `inactivo` (=== 0). */
|
|
19
|
+
last90Count: number;
|
|
20
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { RetailCustomerListItem } from '../RetailCustomerListItem';
|
|
2
|
+
/**
|
|
3
|
+
* GET /backoffice/customers — la lista de Clientes VL (A1). SureKeep Fase 3 — pista Retail.
|
|
4
|
+
*
|
|
5
|
+
* NO pagina por cursor: una Query trae todos los clientes de la cadena (una fila por CLIENTE, ~200 B,
|
|
6
|
+
* no una por venta) y la pantalla ordena y filtra sobre el conjunto. `truncated` avisa cuando la
|
|
7
|
+
* cadena excede el tope de lectura — un listado recortado servido en silencio se lee como completo.
|
|
8
|
+
*/
|
|
9
|
+
export interface BackofficeCustomersResponse {
|
|
10
|
+
items: RetailCustomerListItem[];
|
|
11
|
+
count: number;
|
|
12
|
+
/** `true` si se alcanzó el tope de lectura y la lista NO está completa. */
|
|
13
|
+
truncated: boolean;
|
|
14
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** KPIs de un vendedor en la ventana consultada. */
|
|
2
|
+
export interface SellerKpiRow {
|
|
3
|
+
sellerRetailUserId: string;
|
|
4
|
+
/** Congelado en la venta; `null` si nunca se resolvió. */
|
|
5
|
+
sellerName: string | null;
|
|
6
|
+
storeId: string | null;
|
|
7
|
+
storeName: string | null;
|
|
8
|
+
salesCount: number;
|
|
9
|
+
/** Volumen COLOCADO (precio del equipo), no lo cobrado en caja. */
|
|
10
|
+
placedCents: number;
|
|
11
|
+
averageTicketCents: number;
|
|
12
|
+
lastSaleAt: string | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* GET /backoffice/sellers/kpis — la pantalla Vendedores del Admin VL (A4).
|
|
16
|
+
* SureKeep Fase 3 — pista Retail.
|
|
17
|
+
*
|
|
18
|
+
* Mismo criterio que A3: el eje es la venta, así que solo aparecen los vendedores que vendieron en
|
|
19
|
+
* la ventana. El roster completo vive en `retail-org-business`.
|
|
20
|
+
*/
|
|
21
|
+
export interface BackofficeSellerKpisResponse {
|
|
22
|
+
items: SellerKpiRow[];
|
|
23
|
+
count: number;
|
|
24
|
+
from: string;
|
|
25
|
+
to: string | null;
|
|
26
|
+
truncated: boolean;
|
|
27
|
+
}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/** KPIs de una tienda en la ventana consultada. */
|
|
2
|
+
export interface StoreKpiRow {
|
|
3
|
+
storeId: string;
|
|
4
|
+
/** Congelado en la venta; `null` si nunca se resolvió. */
|
|
5
|
+
storeName: string | null;
|
|
6
|
+
zoneName: string | null;
|
|
7
|
+
salesCount: number;
|
|
8
|
+
/** Volumen COLOCADO (precio del equipo), no lo cobrado en caja. */
|
|
9
|
+
placedCents: number;
|
|
10
|
+
averageTicketCents: number;
|
|
11
|
+
/** ISO-8601 de la venta más reciente de la tienda en la ventana. `null` si no vendió. */
|
|
12
|
+
lastSaleAt: string | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* GET /backoffice/stores/kpis — la pantalla Tiendas del Admin VL (A3).
|
|
16
|
+
* SureKeep Fase 3 — pista Retail.
|
|
17
|
+
*
|
|
18
|
+
* El eje es la VENTA: solo aparecen las tiendas que vendieron en la ventana. El roster completo
|
|
19
|
+
* (incluidas las que no vendieron) lo tiene `retail-org-business`; la pantalla los cruza.
|
|
20
|
+
*/
|
|
21
|
+
export interface BackofficeStoreKpisResponse {
|
|
22
|
+
items: StoreKpiRow[];
|
|
23
|
+
count: number;
|
|
24
|
+
/** ISO-8601 de la ventana efectivamente agregada. */
|
|
25
|
+
from: string;
|
|
26
|
+
to: string | null;
|
|
27
|
+
/** `true` si se alcanzó el tope de agregación y los números están TRUNCADOS. */
|
|
28
|
+
truncated: boolean;
|
|
29
|
+
}
|
|
@@ -90,6 +90,11 @@ export * from './dtos/requests/BackofficeCancelSaleRequest';
|
|
|
90
90
|
export * from './dtos/responses/BackofficeSalesStatsResponse';
|
|
91
91
|
export * from './dtos/responses/BackofficeSalesKpisResponse';
|
|
92
92
|
export * from './dtos/responses/BackofficeReportsResponse';
|
|
93
|
+
export * from './dtos/RetailCustomerListItem';
|
|
94
|
+
export * from './dtos/responses/BackofficeCustomersResponse';
|
|
95
|
+
export * from './dtos/responses/BackofficeCustomerPurchasesResponse';
|
|
96
|
+
export * from './dtos/responses/BackofficeStoreKpisResponse';
|
|
97
|
+
export * from './dtos/responses/BackofficeSellerKpisResponse';
|
|
93
98
|
export * from './events/SaleCompletedV1';
|
|
94
99
|
export * from './events/SaleCancelledV1';
|
|
95
100
|
export * from './events/SaleCompletedV2';
|
|
@@ -118,6 +118,12 @@ __exportStar(require("./dtos/requests/BackofficeCancelSaleRequest"), exports);
|
|
|
118
118
|
__exportStar(require("./dtos/responses/BackofficeSalesStatsResponse"), exports);
|
|
119
119
|
__exportStar(require("./dtos/responses/BackofficeSalesKpisResponse"), exports);
|
|
120
120
|
__exportStar(require("./dtos/responses/BackofficeReportsResponse"), exports);
|
|
121
|
+
// A1-A4 · agregados del portal (D17)
|
|
122
|
+
__exportStar(require("./dtos/RetailCustomerListItem"), exports);
|
|
123
|
+
__exportStar(require("./dtos/responses/BackofficeCustomersResponse"), exports);
|
|
124
|
+
__exportStar(require("./dtos/responses/BackofficeCustomerPurchasesResponse"), exports);
|
|
125
|
+
__exportStar(require("./dtos/responses/BackofficeStoreKpisResponse"), exports);
|
|
126
|
+
__exportStar(require("./dtos/responses/BackofficeSellerKpisResponse"), exports);
|
|
121
127
|
// Contratos de eventos (PascalCase + sufijo V1)
|
|
122
128
|
__exportStar(require("./events/SaleCompletedV1"), exports);
|
|
123
129
|
__exportStar(require("./events/SaleCancelledV1"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { IsString, IsInt, IsEnum, IsOptional } from 'class-validator';
|
|
2
|
+
import { MechanismType } from '../enums/MechanismType';
|
|
3
|
+
import { CurrencyId } from '../../currency/enums/CurrencyId';
|
|
4
|
+
|
|
5
|
+
export class AuthorizeCollectionMovementRequest {
|
|
6
|
+
@IsString() executionId!: string; // idempotencia (@IdempotencyController)
|
|
7
|
+
@IsString() directoryId!: string;
|
|
8
|
+
@IsString() provider!: string; // lo pone el motor desde la config
|
|
9
|
+
@IsEnum(MechanismType) mechanism!: MechanismType;
|
|
10
|
+
@IsInt() amount!: number; // ya convertido por el motor (FX previo)
|
|
11
|
+
@IsEnum(CurrencyId) currencyId!: CurrencyId;
|
|
12
|
+
@IsOptional() @IsString() intentId?: string;
|
|
13
|
+
@IsOptional() @IsString() chargeId?: string;
|
|
14
|
+
@IsOptional() @IsString() holdTxId?: string;
|
|
15
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IsString, IsInt, IsEnum, IsOptional } from 'class-validator';
|
|
2
|
+
import { CollectionResultStatus } from '../enums/CollectionResultStatus';
|
|
3
|
+
|
|
4
|
+
export class AuthorizeCollectionMovementResponse {
|
|
5
|
+
@IsEnum(CollectionResultStatus) status!: CollectionResultStatus;
|
|
6
|
+
@IsInt() amount!: number; // reservado o cobrado
|
|
7
|
+
@IsOptional() @IsString() holdTxId?: string;
|
|
8
|
+
@IsOptional() @IsString() transactionId?: string;
|
|
9
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IsString, IsInt } from 'class-validator';
|
|
2
|
+
|
|
3
|
+
export class CollectRequest {
|
|
4
|
+
@IsString() ownerRef!: string;
|
|
5
|
+
@IsString() tenantId!: string;
|
|
6
|
+
@IsString() domain!: string;
|
|
7
|
+
@IsString() productId!: string;
|
|
8
|
+
@IsString() chargeId!: string;
|
|
9
|
+
@IsInt() amount!: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { IsString, IsInt, IsEnum } from 'class-validator';
|
|
2
|
+
import { CollectionResultStatus } from '../enums/CollectionResultStatus';
|
|
3
|
+
|
|
4
|
+
export class CollectResponse {
|
|
5
|
+
@IsString() intentId!: string;
|
|
6
|
+
@IsEnum(CollectionResultStatus) status!: CollectionResultStatus;
|
|
7
|
+
@IsInt() amountReserved!: number;
|
|
8
|
+
@IsInt() amountCollected!: number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { IsString, IsInt, IsEnum } from 'class-validator';
|
|
2
|
+
import { CollectionResultStatus } from '../enums/CollectionResultStatus';
|
|
3
|
+
import { MechanismType } from '../enums/MechanismType';
|
|
4
|
+
|
|
5
|
+
export class CollectionResultEvent {
|
|
6
|
+
@IsString() attemptId!: string; // dedupe en el consumidor
|
|
7
|
+
@IsString() intentId!: string;
|
|
8
|
+
@IsString() domain!: string; // routing (filter policy)
|
|
9
|
+
@IsString() tenantId!: string;
|
|
10
|
+
@IsString() chargeId!: string;
|
|
11
|
+
@IsEnum(CollectionResultStatus) status!: CollectionResultStatus;
|
|
12
|
+
@IsEnum(MechanismType) mechanism!: MechanismType;
|
|
13
|
+
@IsInt() amount!: number; // reservado o cobrado según mecanismo
|
|
14
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { IsString, IsInt, IsOptional, IsEnum, IsObject } from 'class-validator';
|
|
2
|
+
import { CurrencyId } from '../../currency/enums/CurrencyId';
|
|
3
|
+
|
|
4
|
+
export class PendingChargeDto {
|
|
5
|
+
@IsString() chargeId!: string; // record_id / INSTALLMENT#n
|
|
6
|
+
@IsString() ownerRef!: string; // directoryId
|
|
7
|
+
@IsString() tenantId!: string; // FIADO | surekeep
|
|
8
|
+
@IsString() domain!: string; // une-credit | surekeep-retail
|
|
9
|
+
@IsString() parentDebtId!: string; // credit_id / CREDIT#id
|
|
10
|
+
@IsInt() installmentNumber!: number; // coupon_number / installment_number
|
|
11
|
+
@IsInt() amount!: number; // centavos
|
|
12
|
+
@IsEnum(CurrencyId) currency!: CurrencyId;
|
|
13
|
+
@IsString() dueDate!: string; // ISO date
|
|
14
|
+
@IsString() status!: string; // estado del cargo en el dominio (normalizado por el motor)
|
|
15
|
+
@IsOptional() @IsInt() principalAmount?: number;
|
|
16
|
+
@IsOptional() @IsInt() interestAmount?: number;
|
|
17
|
+
@IsOptional() @IsInt() taxAmount?: number;
|
|
18
|
+
@IsOptional() @IsInt() outstandingBalance?: number;
|
|
19
|
+
@IsOptional() @IsInt() amountCollected?: number;
|
|
20
|
+
@IsOptional() @IsObject() metadata?: Record<string, unknown>; // por-dominio (fiado_/loanco_interest, imei…)
|
|
21
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
// Enums
|
|
2
|
+
export * from './enums/MechanismType';
|
|
3
|
+
export * from './enums/CollectionState';
|
|
4
|
+
export * from './enums/SagaStep';
|
|
5
|
+
export * from './enums/CollectionResultStatus';
|
|
6
|
+
|
|
7
|
+
// DTOs
|
|
8
|
+
export * from './dtos/PendingChargeDto';
|
|
9
|
+
export * from './dtos/CollectRequest';
|
|
10
|
+
export * from './dtos/CollectResponse';
|
|
11
|
+
export * from './dtos/RegisterCollectibleRequest';
|
|
12
|
+
export * from './dtos/CollectionResultEvent';
|
|
13
|
+
export * from './dtos/AuthorizeCollectionMovementRequest';
|
|
14
|
+
export * from './dtos/AuthorizeCollectionMovementResponse';
|
package/src/index.ts
CHANGED
|
@@ -153,3 +153,8 @@ export * as PhoneSales from './phoneSales';
|
|
|
153
153
|
// (tarjetas, teléfonos, …). ExternalShippingStatus se reexporta acá desde `card/` sin moverlo,
|
|
154
154
|
// para no romper a los consumidores actuales del namespace Card.
|
|
155
155
|
export * as Shipping from './shipping';
|
|
156
|
+
// Collection: contrato del motor de cobro central (collection-engine-business) — dominio
|
|
157
|
+
// agnóstico de proveedores/cuentas. PendingChargeDto es la deuda genérica; CollectRequest/
|
|
158
|
+
// CollectResponse el contrato dominio↔motor; AuthorizeCollectionMovementRequest/Response el
|
|
159
|
+
// contrato motor↔processor. Ver spec 2026-07-29-motor-cobro-central-design.
|
|
160
|
+
export * as Collection from './collection';
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Una fila de la lista **Clientes VL** del Portal Admin VentasLuga (A1).
|
|
3
|
+
* SureKeep Fase 3 — pista Retail.
|
|
4
|
+
*
|
|
5
|
+
* Sale del ítem de estadísticas de por vida (`RETAILER#<retailerId>` / `CUSTSTATS#<customerId>`
|
|
6
|
+
* dentro de `RetailSale_GT`), no de barrer ventas: por eso los totales son **de por vida** y no del
|
|
7
|
+
* periodo filtrado. Ver D19 / DEC-040.
|
|
8
|
+
*
|
|
9
|
+
* ⚠️ `customerName` y `customerPhone` son PII. Nunca loguear. La lectura queda registrada en
|
|
10
|
+
* `PiiAccessLog` igual que el listado de ventas.
|
|
11
|
+
*/
|
|
12
|
+
export interface RetailCustomerListItem {
|
|
13
|
+
retailCustomerId: string;
|
|
14
|
+
/** Congelado en la venta. `null` si nunca se pudo resolver. */
|
|
15
|
+
customerName: string | null;
|
|
16
|
+
customerPhone: string | null;
|
|
17
|
+
/** Compras DE POR VIDA. Puede venir negativo si hubo cancelaciones antes del backfill. */
|
|
18
|
+
salesCount: number;
|
|
19
|
+
/** Gastado DE POR VIDA, en centavos. Mide volumen COLOCADO (precio del equipo), no lo cobrado. */
|
|
20
|
+
totalSpentCents: number;
|
|
21
|
+
/** ISO-8601 de la primera compra. `null` mientras el backfill no lo haya sembrado. */
|
|
22
|
+
firstSaleAt: string | null;
|
|
23
|
+
/** ISO-8601 de la última compra. Es el campo por el que filtra la pantalla. */
|
|
24
|
+
lastSaleAt: string | null;
|
|
25
|
+
/**
|
|
26
|
+
* Tienda y vendedor de la ÚLTIMA compra.
|
|
27
|
+
*
|
|
28
|
+
* ⚠️ El mockup los llama «tienda favorita» y «vendedor recurrente», que serían la MODA. Acá es el
|
|
29
|
+
* ÚLTIMO: la moda exigiría un contador por (cliente × tienda), que multiplica el ítem por cada
|
|
30
|
+
* tienda donde el cliente compró. Se sirve el último y se declara. Ver `TD-F3-WIZ-MODA`.
|
|
31
|
+
*/
|
|
32
|
+
lastStoreId: string | null;
|
|
33
|
+
lastStoreName: string | null;
|
|
34
|
+
lastSellerId: string | null;
|
|
35
|
+
lastSellerName: string | null;
|
|
36
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { Sale } from '../Sale';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* GET /backoffice/customers/{id}/purchases — el historial de compras de un cliente (A2).
|
|
5
|
+
* SureKeep Fase 3 — pista Retail.
|
|
6
|
+
*
|
|
7
|
+
* Lee `RetailSale_GT` por `customerId-soldAt-index`, así que viene ordenado por fecha y pagina por
|
|
8
|
+
* cursor: un cliente puede tener muchas compras y la ficha las muestra de a poco.
|
|
9
|
+
*
|
|
10
|
+
* `compras30` / `compras90` se cuentan sobre la MISMA lectura cuando la ventana entra en la página;
|
|
11
|
+
* son los contadores que la pantalla muestra como sublínea del total de por vida.
|
|
12
|
+
*/
|
|
13
|
+
export interface BackofficeCustomerPurchasesResponse {
|
|
14
|
+
items: Sale[];
|
|
15
|
+
count: number;
|
|
16
|
+
nextToken?: string;
|
|
17
|
+
/** Compras en los últimos 30 días. */
|
|
18
|
+
last30Count: number;
|
|
19
|
+
/** Compras en los últimos 90 días — el que define el segmento `inactivo` (=== 0). */
|
|
20
|
+
last90Count: number;
|
|
21
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { RetailCustomerListItem } from '../RetailCustomerListItem';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* GET /backoffice/customers — la lista de Clientes VL (A1). SureKeep Fase 3 — pista Retail.
|
|
5
|
+
*
|
|
6
|
+
* NO pagina por cursor: una Query trae todos los clientes de la cadena (una fila por CLIENTE, ~200 B,
|
|
7
|
+
* no una por venta) y la pantalla ordena y filtra sobre el conjunto. `truncated` avisa cuando la
|
|
8
|
+
* cadena excede el tope de lectura — un listado recortado servido en silencio se lee como completo.
|
|
9
|
+
*/
|
|
10
|
+
export interface BackofficeCustomersResponse {
|
|
11
|
+
items: RetailCustomerListItem[];
|
|
12
|
+
count: number;
|
|
13
|
+
/** `true` si se alcanzó el tope de lectura y la lista NO está completa. */
|
|
14
|
+
truncated: boolean;
|
|
15
|
+
}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
/** KPIs de un vendedor en la ventana consultada. */
|
|
2
|
+
export interface SellerKpiRow {
|
|
3
|
+
sellerRetailUserId: string;
|
|
4
|
+
/** Congelado en la venta; `null` si nunca se resolvió. */
|
|
5
|
+
sellerName: string | null;
|
|
6
|
+
storeId: string | null;
|
|
7
|
+
storeName: string | null;
|
|
8
|
+
salesCount: number;
|
|
9
|
+
/** Volumen COLOCADO (precio del equipo), no lo cobrado en caja. */
|
|
10
|
+
placedCents: number;
|
|
11
|
+
averageTicketCents: number;
|
|
12
|
+
lastSaleAt: string | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* GET /backoffice/sellers/kpis — la pantalla Vendedores del Admin VL (A4).
|
|
17
|
+
* SureKeep Fase 3 — pista Retail.
|
|
18
|
+
*
|
|
19
|
+
* Mismo criterio que A3: el eje es la venta, así que solo aparecen los vendedores que vendieron en
|
|
20
|
+
* la ventana. El roster completo vive en `retail-org-business`.
|
|
21
|
+
*/
|
|
22
|
+
export interface BackofficeSellerKpisResponse {
|
|
23
|
+
items: SellerKpiRow[];
|
|
24
|
+
count: number;
|
|
25
|
+
from: string;
|
|
26
|
+
to: string | null;
|
|
27
|
+
truncated: boolean;
|
|
28
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/** KPIs de una tienda en la ventana consultada. */
|
|
2
|
+
export interface StoreKpiRow {
|
|
3
|
+
storeId: string;
|
|
4
|
+
/** Congelado en la venta; `null` si nunca se resolvió. */
|
|
5
|
+
storeName: string | null;
|
|
6
|
+
zoneName: string | null;
|
|
7
|
+
salesCount: number;
|
|
8
|
+
/** Volumen COLOCADO (precio del equipo), no lo cobrado en caja. */
|
|
9
|
+
placedCents: number;
|
|
10
|
+
averageTicketCents: number;
|
|
11
|
+
/** ISO-8601 de la venta más reciente de la tienda en la ventana. `null` si no vendió. */
|
|
12
|
+
lastSaleAt: string | null;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* GET /backoffice/stores/kpis — la pantalla Tiendas del Admin VL (A3).
|
|
17
|
+
* SureKeep Fase 3 — pista Retail.
|
|
18
|
+
*
|
|
19
|
+
* El eje es la VENTA: solo aparecen las tiendas que vendieron en la ventana. El roster completo
|
|
20
|
+
* (incluidas las que no vendieron) lo tiene `retail-org-business`; la pantalla los cruza.
|
|
21
|
+
*/
|
|
22
|
+
export interface BackofficeStoreKpisResponse {
|
|
23
|
+
items: StoreKpiRow[];
|
|
24
|
+
count: number;
|
|
25
|
+
/** ISO-8601 de la ventana efectivamente agregada. */
|
|
26
|
+
from: string;
|
|
27
|
+
to: string | null;
|
|
28
|
+
/** `true` si se alcanzó el tope de agregación y los números están TRUNCADOS. */
|
|
29
|
+
truncated: boolean;
|
|
30
|
+
}
|
|
@@ -112,6 +112,12 @@ export * from './dtos/requests/BackofficeCancelSaleRequest';
|
|
|
112
112
|
export * from './dtos/responses/BackofficeSalesStatsResponse';
|
|
113
113
|
export * from './dtos/responses/BackofficeSalesKpisResponse';
|
|
114
114
|
export * from './dtos/responses/BackofficeReportsResponse';
|
|
115
|
+
// A1-A4 · agregados del portal (D17)
|
|
116
|
+
export * from './dtos/RetailCustomerListItem';
|
|
117
|
+
export * from './dtos/responses/BackofficeCustomersResponse';
|
|
118
|
+
export * from './dtos/responses/BackofficeCustomerPurchasesResponse';
|
|
119
|
+
export * from './dtos/responses/BackofficeStoreKpisResponse';
|
|
120
|
+
export * from './dtos/responses/BackofficeSellerKpisResponse';
|
|
115
121
|
|
|
116
122
|
// Contratos de eventos (PascalCase + sufijo V1)
|
|
117
123
|
export * from './events/SaleCompletedV1';
|