@fiado/type-kit 3.365.0 → 3.367.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/DeregisterChargeResponse.d.ts +8 -0
- package/bin/collection/dtos/DeregisterChargeResponse.js +25 -0
- package/bin/collection/enums/DeregisterChargeStatus.d.ts +6 -0
- package/bin/collection/enums/DeregisterChargeStatus.js +10 -0
- package/bin/collection/index.d.ts +2 -0
- package/bin/collection/index.js +2 -0
- package/bin/retailWizard/dtos/WizardSessionLookupEntry.d.ts +27 -0
- package/bin/retailWizard/dtos/WizardSessionLookupEntry.js +2 -0
- package/bin/retailWizard/dtos/responses/WizardSessionLookupResponse.d.ts +9 -0
- package/bin/retailWizard/dtos/responses/WizardSessionLookupResponse.js +2 -0
- package/bin/retailWizard/enums/WizardSessionLookupStatusEnum.d.ts +14 -0
- package/bin/retailWizard/enums/WizardSessionLookupStatusEnum.js +18 -0
- package/bin/retailWizard/index.d.ts +3 -0
- package/bin/retailWizard/index.js +4 -0
- package/package.json +1 -1
- package/src/collection/dtos/DeregisterChargeResponse.ts +10 -0
- package/src/collection/enums/DeregisterChargeStatus.ts +6 -0
- package/src/collection/index.ts +2 -0
- package/src/retailWizard/dtos/WizardSessionLookupEntry.ts +28 -0
- package/src/retailWizard/dtos/responses/WizardSessionLookupResponse.ts +10 -0
- package/src/retailWizard/enums/WizardSessionLookupStatusEnum.ts +14 -0
- package/src/retailWizard/index.ts +5 -0
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { DeregisterChargeStatus } from '../enums/DeregisterChargeStatus';
|
|
2
|
+
/**
|
|
3
|
+
* Resultado de dar de baja un cargo en el motor de cobro. Un cargo inexistente no viaja en este
|
|
4
|
+
* DTO: el motor responde 404.
|
|
5
|
+
*/
|
|
6
|
+
export declare class DeregisterChargeResponse {
|
|
7
|
+
status: DeregisterChargeStatus;
|
|
8
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
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.DeregisterChargeResponse = void 0;
|
|
13
|
+
const class_validator_1 = require("class-validator");
|
|
14
|
+
const DeregisterChargeStatus_1 = require("../enums/DeregisterChargeStatus");
|
|
15
|
+
/**
|
|
16
|
+
* Resultado de dar de baja un cargo en el motor de cobro. Un cargo inexistente no viaja en este
|
|
17
|
+
* DTO: el motor responde 404.
|
|
18
|
+
*/
|
|
19
|
+
class DeregisterChargeResponse {
|
|
20
|
+
}
|
|
21
|
+
exports.DeregisterChargeResponse = DeregisterChargeResponse;
|
|
22
|
+
__decorate([
|
|
23
|
+
(0, class_validator_1.IsEnum)(DeregisterChargeStatus_1.DeregisterChargeStatus),
|
|
24
|
+
__metadata("design:type", String)
|
|
25
|
+
], DeregisterChargeResponse.prototype, "status", void 0);
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export declare enum DeregisterChargeStatus {
|
|
2
|
+
/** El cobro estaba vivo y se detuvo: el intent pasó a CANCELLED y no se reintenta más. */
|
|
3
|
+
CANCELLED = "CANCELLED",
|
|
4
|
+
/** El intent ya había terminado (cobrado o cancelado antes). Dar de baja dos veces es un no-op. */
|
|
5
|
+
ALREADY_TERMINAL = "ALREADY_TERMINAL"
|
|
6
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.DeregisterChargeStatus = void 0;
|
|
4
|
+
var DeregisterChargeStatus;
|
|
5
|
+
(function (DeregisterChargeStatus) {
|
|
6
|
+
/** El cobro estaba vivo y se detuvo: el intent pasó a CANCELLED y no se reintenta más. */
|
|
7
|
+
DeregisterChargeStatus["CANCELLED"] = "CANCELLED";
|
|
8
|
+
/** El intent ya había terminado (cobrado o cancelado antes). Dar de baja dos veces es un no-op. */
|
|
9
|
+
DeregisterChargeStatus["ALREADY_TERMINAL"] = "ALREADY_TERMINAL";
|
|
10
|
+
})(DeregisterChargeStatus || (exports.DeregisterChargeStatus = DeregisterChargeStatus = {}));
|
|
@@ -2,6 +2,7 @@ export * from './enums/MechanismType';
|
|
|
2
2
|
export * from './enums/CollectionState';
|
|
3
3
|
export * from './enums/SagaStep';
|
|
4
4
|
export * from './enums/CollectionResultStatus';
|
|
5
|
+
export * from './enums/DeregisterChargeStatus';
|
|
5
6
|
export * from './dtos/PendingChargeDto';
|
|
6
7
|
export * from './dtos/CollectRequest';
|
|
7
8
|
export * from './dtos/CollectResponse';
|
|
@@ -14,6 +15,7 @@ export * from './dtos/CollectionSourceDto';
|
|
|
14
15
|
export * from './dtos/CollectionProductConfigDto';
|
|
15
16
|
export * from './dtos/UpsertProductConfigRequest';
|
|
16
17
|
export * from './dtos/ApplyCollectionResultRequest';
|
|
18
|
+
export * from './dtos/DeregisterChargeResponse';
|
|
17
19
|
export * from './dtos/CollectionIntentSummaryDto';
|
|
18
20
|
export * from './dtos/CollectionAttemptDto';
|
|
19
21
|
export * from './dtos/CollectionOutboxEventDto';
|
package/bin/collection/index.js
CHANGED
|
@@ -19,6 +19,7 @@ __exportStar(require("./enums/MechanismType"), exports);
|
|
|
19
19
|
__exportStar(require("./enums/CollectionState"), exports);
|
|
20
20
|
__exportStar(require("./enums/SagaStep"), exports);
|
|
21
21
|
__exportStar(require("./enums/CollectionResultStatus"), exports);
|
|
22
|
+
__exportStar(require("./enums/DeregisterChargeStatus"), exports);
|
|
22
23
|
// DTOs
|
|
23
24
|
__exportStar(require("./dtos/PendingChargeDto"), exports);
|
|
24
25
|
__exportStar(require("./dtos/CollectRequest"), exports);
|
|
@@ -32,6 +33,7 @@ __exportStar(require("./dtos/CollectionSourceDto"), exports);
|
|
|
32
33
|
__exportStar(require("./dtos/CollectionProductConfigDto"), exports);
|
|
33
34
|
__exportStar(require("./dtos/UpsertProductConfigRequest"), exports);
|
|
34
35
|
__exportStar(require("./dtos/ApplyCollectionResultRequest"), exports);
|
|
36
|
+
__exportStar(require("./dtos/DeregisterChargeResponse"), exports);
|
|
35
37
|
// DTOs — backoffice de monitoreo
|
|
36
38
|
__exportStar(require("./dtos/CollectionIntentSummaryDto"), exports);
|
|
37
39
|
__exportStar(require("./dtos/CollectionAttemptDto"), exports);
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { WizardSessionLookupStatusEnum } from '../enums/WizardSessionLookupStatusEnum';
|
|
2
|
+
import type { WizardStateEnum } from '../enums/WizardStateEnum';
|
|
3
|
+
import type { WizardStepEnum } from '../enums/WizardStepEnum';
|
|
4
|
+
/**
|
|
5
|
+
* Una entrada del lote de sesiones del wizard: traduce un `wizardSessionId` a la tienda, el cliente
|
|
6
|
+
* y el equipo de esa venta. Campo AUSENTE = «no lo se»; presente en `null` = dato afirmado como nulo.
|
|
7
|
+
*/
|
|
8
|
+
export interface WizardSessionLookupEntry {
|
|
9
|
+
wizardSessionId: string;
|
|
10
|
+
status: WizardSessionLookupStatusEnum;
|
|
11
|
+
/** Todos los campos de abajo viajan SOLO con `status: OK`. */
|
|
12
|
+
retailerId?: string;
|
|
13
|
+
storeId?: string;
|
|
14
|
+
/** `null` mientras el KYC no haya dado de alta al cliente. */
|
|
15
|
+
retailCustomerId?: string | null;
|
|
16
|
+
state?: WizardStateEnum;
|
|
17
|
+
currentStep?: WizardStepEnum;
|
|
18
|
+
/** SKU del equipo reservado; `null` si la venta no llego al paso del producto. */
|
|
19
|
+
sku?: string | null;
|
|
20
|
+
/** Ficha comercial CONGELADA al reservar. `null` si no hay equipo reservado. */
|
|
21
|
+
productBrand?: string | null;
|
|
22
|
+
productModel?: string | null;
|
|
23
|
+
productCapacity?: string | null;
|
|
24
|
+
/** La venta que cerro esta sesion; `null` si todavia no cerro. */
|
|
25
|
+
saleId?: string | null;
|
|
26
|
+
folio?: string | null;
|
|
27
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import type { WizardSessionLookupEntry } from '../WizardSessionLookupEntry';
|
|
2
|
+
/**
|
|
3
|
+
* `GET /private/wizard-sessions/batch` — una entrada por cada id pedido, en el MISMO orden.
|
|
4
|
+
* `unavailableCount` hace ruidoso el resultado parcial: sin el, el caller no sabe que le falto algo.
|
|
5
|
+
*/
|
|
6
|
+
export interface WizardSessionLookupResponse {
|
|
7
|
+
items: WizardSessionLookupEntry[];
|
|
8
|
+
unavailableCount: number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Como se resolvio cada id pedido a `GET /private/wizard-sessions/batch`. Hay una entrada por id.
|
|
3
|
+
* `NOT_FOUND` y `UNAVAILABLE` NO son lo mismo: colapsarlos afirma «no tiene» cuando fue «no se leyo».
|
|
4
|
+
*/
|
|
5
|
+
export declare enum WizardSessionLookupStatusEnum {
|
|
6
|
+
/** La sesion existe y se leyo completa. */
|
|
7
|
+
OK = "OK",
|
|
8
|
+
/** No existe esa sesion en el silo. Es un dato POSITIVO, no una ausencia. */
|
|
9
|
+
NOT_FOUND = "NOT_FOUND",
|
|
10
|
+
/** No se pudo leer esa sesion. El caller reintenta SOLO ese id. */
|
|
11
|
+
UNAVAILABLE = "UNAVAILABLE",
|
|
12
|
+
/** Ese id no tiene forma de id. Reintentarlo nunca va a servir: el caller lo mando mal. */
|
|
13
|
+
INVALID_ID = "INVALID_ID"
|
|
14
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.WizardSessionLookupStatusEnum = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* Como se resolvio cada id pedido a `GET /private/wizard-sessions/batch`. Hay una entrada por id.
|
|
6
|
+
* `NOT_FOUND` y `UNAVAILABLE` NO son lo mismo: colapsarlos afirma «no tiene» cuando fue «no se leyo».
|
|
7
|
+
*/
|
|
8
|
+
var WizardSessionLookupStatusEnum;
|
|
9
|
+
(function (WizardSessionLookupStatusEnum) {
|
|
10
|
+
/** La sesion existe y se leyo completa. */
|
|
11
|
+
WizardSessionLookupStatusEnum["OK"] = "OK";
|
|
12
|
+
/** No existe esa sesion en el silo. Es un dato POSITIVO, no una ausencia. */
|
|
13
|
+
WizardSessionLookupStatusEnum["NOT_FOUND"] = "NOT_FOUND";
|
|
14
|
+
/** No se pudo leer esa sesion. El caller reintenta SOLO ese id. */
|
|
15
|
+
WizardSessionLookupStatusEnum["UNAVAILABLE"] = "UNAVAILABLE";
|
|
16
|
+
/** Ese id no tiene forma de id. Reintentarlo nunca va a servir: el caller lo mando mal. */
|
|
17
|
+
WizardSessionLookupStatusEnum["INVALID_ID"] = "INVALID_ID";
|
|
18
|
+
})(WizardSessionLookupStatusEnum || (exports.WizardSessionLookupStatusEnum = WizardSessionLookupStatusEnum = {}));
|
|
@@ -121,3 +121,6 @@ export * from './events/SaleCancelledV1';
|
|
|
121
121
|
export * from './events/SaleCompletedV2';
|
|
122
122
|
export * from './events/SaleCancelledV2';
|
|
123
123
|
export * from './events/SessionExpiredV1';
|
|
124
|
+
export * from './enums/WizardSessionLookupStatusEnum';
|
|
125
|
+
export * from './dtos/WizardSessionLookupEntry';
|
|
126
|
+
export * from './dtos/responses/WizardSessionLookupResponse';
|
|
@@ -152,3 +152,7 @@ __exportStar(require("./events/SaleCancelledV1"), exports);
|
|
|
152
152
|
__exportStar(require("./events/SaleCompletedV2"), exports);
|
|
153
153
|
__exportStar(require("./events/SaleCancelledV2"), exports);
|
|
154
154
|
__exportStar(require("./events/SessionExpiredV1"), exports);
|
|
155
|
+
// Lookup privado por lote (GET /private/wizard-sessions/batch)
|
|
156
|
+
__exportStar(require("./enums/WizardSessionLookupStatusEnum"), exports);
|
|
157
|
+
__exportStar(require("./dtos/WizardSessionLookupEntry"), exports);
|
|
158
|
+
__exportStar(require("./dtos/responses/WizardSessionLookupResponse"), exports);
|
package/package.json
CHANGED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { IsEnum } from 'class-validator';
|
|
2
|
+
import { DeregisterChargeStatus } from '../enums/DeregisterChargeStatus';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Resultado de dar de baja un cargo en el motor de cobro. Un cargo inexistente no viaja en este
|
|
6
|
+
* DTO: el motor responde 404.
|
|
7
|
+
*/
|
|
8
|
+
export class DeregisterChargeResponse {
|
|
9
|
+
@IsEnum(DeregisterChargeStatus) status!: DeregisterChargeStatus;
|
|
10
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
export enum DeregisterChargeStatus {
|
|
2
|
+
/** El cobro estaba vivo y se detuvo: el intent pasó a CANCELLED y no se reintenta más. */
|
|
3
|
+
CANCELLED = 'CANCELLED',
|
|
4
|
+
/** El intent ya había terminado (cobrado o cancelado antes). Dar de baja dos veces es un no-op. */
|
|
5
|
+
ALREADY_TERMINAL = 'ALREADY_TERMINAL',
|
|
6
|
+
}
|
package/src/collection/index.ts
CHANGED
|
@@ -3,6 +3,7 @@ export * from './enums/MechanismType';
|
|
|
3
3
|
export * from './enums/CollectionState';
|
|
4
4
|
export * from './enums/SagaStep';
|
|
5
5
|
export * from './enums/CollectionResultStatus';
|
|
6
|
+
export * from './enums/DeregisterChargeStatus';
|
|
6
7
|
|
|
7
8
|
// DTOs
|
|
8
9
|
export * from './dtos/PendingChargeDto';
|
|
@@ -17,6 +18,7 @@ export * from './dtos/CollectionSourceDto';
|
|
|
17
18
|
export * from './dtos/CollectionProductConfigDto';
|
|
18
19
|
export * from './dtos/UpsertProductConfigRequest';
|
|
19
20
|
export * from './dtos/ApplyCollectionResultRequest';
|
|
21
|
+
export * from './dtos/DeregisterChargeResponse';
|
|
20
22
|
|
|
21
23
|
// DTOs — backoffice de monitoreo
|
|
22
24
|
export * from './dtos/CollectionIntentSummaryDto';
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import type { WizardSessionLookupStatusEnum } from '../enums/WizardSessionLookupStatusEnum';
|
|
2
|
+
import type { WizardStateEnum } from '../enums/WizardStateEnum';
|
|
3
|
+
import type { WizardStepEnum } from '../enums/WizardStepEnum';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Una entrada del lote de sesiones del wizard: traduce un `wizardSessionId` a la tienda, el cliente
|
|
7
|
+
* y el equipo de esa venta. Campo AUSENTE = «no lo se»; presente en `null` = dato afirmado como nulo.
|
|
8
|
+
*/
|
|
9
|
+
export interface WizardSessionLookupEntry {
|
|
10
|
+
wizardSessionId: string;
|
|
11
|
+
status: WizardSessionLookupStatusEnum;
|
|
12
|
+
/** Todos los campos de abajo viajan SOLO con `status: OK`. */
|
|
13
|
+
retailerId?: string;
|
|
14
|
+
storeId?: string;
|
|
15
|
+
/** `null` mientras el KYC no haya dado de alta al cliente. */
|
|
16
|
+
retailCustomerId?: string | null;
|
|
17
|
+
state?: WizardStateEnum;
|
|
18
|
+
currentStep?: WizardStepEnum;
|
|
19
|
+
/** SKU del equipo reservado; `null` si la venta no llego al paso del producto. */
|
|
20
|
+
sku?: string | null;
|
|
21
|
+
/** Ficha comercial CONGELADA al reservar. `null` si no hay equipo reservado. */
|
|
22
|
+
productBrand?: string | null;
|
|
23
|
+
productModel?: string | null;
|
|
24
|
+
productCapacity?: string | null;
|
|
25
|
+
/** La venta que cerro esta sesion; `null` si todavia no cerro. */
|
|
26
|
+
saleId?: string | null;
|
|
27
|
+
folio?: string | null;
|
|
28
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { WizardSessionLookupEntry } from '../WizardSessionLookupEntry';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* `GET /private/wizard-sessions/batch` — una entrada por cada id pedido, en el MISMO orden.
|
|
5
|
+
* `unavailableCount` hace ruidoso el resultado parcial: sin el, el caller no sabe que le falto algo.
|
|
6
|
+
*/
|
|
7
|
+
export interface WizardSessionLookupResponse {
|
|
8
|
+
items: WizardSessionLookupEntry[];
|
|
9
|
+
unavailableCount: number;
|
|
10
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Como se resolvio cada id pedido a `GET /private/wizard-sessions/batch`. Hay una entrada por id.
|
|
3
|
+
* `NOT_FOUND` y `UNAVAILABLE` NO son lo mismo: colapsarlos afirma «no tiene» cuando fue «no se leyo».
|
|
4
|
+
*/
|
|
5
|
+
export enum WizardSessionLookupStatusEnum {
|
|
6
|
+
/** La sesion existe y se leyo completa. */
|
|
7
|
+
OK = 'OK',
|
|
8
|
+
/** No existe esa sesion en el silo. Es un dato POSITIVO, no una ausencia. */
|
|
9
|
+
NOT_FOUND = 'NOT_FOUND',
|
|
10
|
+
/** No se pudo leer esa sesion. El caller reintenta SOLO ese id. */
|
|
11
|
+
UNAVAILABLE = 'UNAVAILABLE',
|
|
12
|
+
/** Ese id no tiene forma de id. Reintentarlo nunca va a servir: el caller lo mando mal. */
|
|
13
|
+
INVALID_ID = 'INVALID_ID',
|
|
14
|
+
}
|
|
@@ -148,3 +148,8 @@ export * from './events/SaleCancelledV1';
|
|
|
148
148
|
export * from './events/SaleCompletedV2';
|
|
149
149
|
export * from './events/SaleCancelledV2';
|
|
150
150
|
export * from './events/SessionExpiredV1';
|
|
151
|
+
|
|
152
|
+
// Lookup privado por lote (GET /private/wizard-sessions/batch)
|
|
153
|
+
export * from './enums/WizardSessionLookupStatusEnum';
|
|
154
|
+
export * from './dtos/WizardSessionLookupEntry';
|
|
155
|
+
export * from './dtos/responses/WizardSessionLookupResponse';
|