@fiado/type-kit 3.122.0 → 3.123.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.
@@ -0,0 +1,30 @@
1
+ /**
2
+ * Request del endpoint `POST /wallet-funding/publish` del processor.
3
+ *
4
+ * Publica el evento de FiadoTx (tupla EQ_CASH_SA / CASH_IN del wallet-funding
5
+ * cash-in) al SQS `TRANSACTION_QUEUE` para que `transaction-business` lo
6
+ * consuma y persista en `FiadoTx_GT`.
7
+ *
8
+ * Best-effort: el caller (equality-connector post-settlement, o el cron de
9
+ * gap-reconciliation del mismo connector) debe tratar el error como
10
+ * recuperable — el reconciler T+0 rescata gaps que queden.
11
+ *
12
+ * Ver spec 15 §6.2 (processor mantiene ownership del SQS publish) + §5.1
13
+ * (reconciler en el connector).
14
+ */
15
+ export declare class PublishFiadoTxRequest {
16
+ /** Identificador idempotente del evento. Sugerido: `${providerName}:${providerTxId}`. */
17
+ idempotencyKey: string;
18
+ /**
19
+ * Spec completo de la tupla FiadoTx a persistir. Shape generado por el
20
+ * processor en `walletFundingValidate()` (campo `fiadoTxSpec` de la response).
21
+ * El caller lo recibe del processor y lo reenvía sin modificar.
22
+ *
23
+ * Es `unknown` aquí (no tipado fuerte) porque el shape interno del processor
24
+ * puede cambiar sin breaking change para los callers — el processor es dueño
25
+ * del shape y de su serialización al SQS.
26
+ */
27
+ fiadoTxSpec: Record<string, unknown>;
28
+ /** Contexto opcional para logs/auditoría (ej. "post-settlement" | "reconciler-gap"). */
29
+ origin?: string;
30
+ }
@@ -0,0 +1,45 @@
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.PublishFiadoTxRequest = void 0;
13
+ const class_validator_1 = require("class-validator");
14
+ /**
15
+ * Request del endpoint `POST /wallet-funding/publish` del processor.
16
+ *
17
+ * Publica el evento de FiadoTx (tupla EQ_CASH_SA / CASH_IN del wallet-funding
18
+ * cash-in) al SQS `TRANSACTION_QUEUE` para que `transaction-business` lo
19
+ * consuma y persista en `FiadoTx_GT`.
20
+ *
21
+ * Best-effort: el caller (equality-connector post-settlement, o el cron de
22
+ * gap-reconciliation del mismo connector) debe tratar el error como
23
+ * recuperable — el reconciler T+0 rescata gaps que queden.
24
+ *
25
+ * Ver spec 15 §6.2 (processor mantiene ownership del SQS publish) + §5.1
26
+ * (reconciler en el connector).
27
+ */
28
+ class PublishFiadoTxRequest {
29
+ }
30
+ exports.PublishFiadoTxRequest = PublishFiadoTxRequest;
31
+ __decorate([
32
+ (0, class_validator_1.IsString)(),
33
+ (0, class_validator_1.MaxLength)(128),
34
+ __metadata("design:type", String)
35
+ ], PublishFiadoTxRequest.prototype, "idempotencyKey", void 0);
36
+ __decorate([
37
+ (0, class_validator_1.IsObject)(),
38
+ __metadata("design:type", Object)
39
+ ], PublishFiadoTxRequest.prototype, "fiadoTxSpec", void 0);
40
+ __decorate([
41
+ (0, class_validator_1.IsOptional)(),
42
+ (0, class_validator_1.IsString)(),
43
+ (0, class_validator_1.MaxLength)(64),
44
+ __metadata("design:type", String)
45
+ ], PublishFiadoTxRequest.prototype, "origin", void 0);
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Response del endpoint `POST /wallet-funding/publish` del processor.
3
+ *
4
+ * Best-effort: status="FAILED" indica que el publish al SQS no se ejecutó
5
+ * (sqs.sendMessage falló). El caller debe loggear y continuar — el
6
+ * reconciler T+0 del connector eventualmente recuperará el gap.
7
+ *
8
+ * Ver spec 15 §6.2.
9
+ */
10
+ export interface PublishFiadoTxResponse {
11
+ status: "OK" | "FAILED";
12
+ /** Mensaje breve para logs. Vacío en happy path. */
13
+ message?: string;
14
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -39,6 +39,8 @@ export * from './dtos/ProviderProcessServicePaymentTransactionRequest';
39
39
  export * from './dtos/ProviderProcessServicePaymentTransactionResponse';
40
40
  export * from './dtos/AuthorizeRenewalPreAuthRequest';
41
41
  export * from './dtos/AuthorizeRenewalPreAuthResponse';
42
+ export * from './dtos/PublishFiadoTxRequest';
43
+ export * from './dtos/PublishFiadoTxResponse';
42
44
  export * from './enums/TransactionProcessorCodesEnum';
43
45
  export * from './enums/AsyncTxStatusEnum';
44
46
  export * from './enums/AppEnum';
@@ -55,6 +55,8 @@ __exportStar(require("./dtos/ProviderProcessServicePaymentTransactionRequest"),
55
55
  __exportStar(require("./dtos/ProviderProcessServicePaymentTransactionResponse"), exports);
56
56
  __exportStar(require("./dtos/AuthorizeRenewalPreAuthRequest"), exports);
57
57
  __exportStar(require("./dtos/AuthorizeRenewalPreAuthResponse"), exports);
58
+ __exportStar(require("./dtos/PublishFiadoTxRequest"), exports);
59
+ __exportStar(require("./dtos/PublishFiadoTxResponse"), exports);
58
60
  __exportStar(require("./enums/TransactionProcessorCodesEnum"), exports);
59
61
  __exportStar(require("./enums/AsyncTxStatusEnum"), exports);
60
62
  __exportStar(require("./enums/AppEnum"), exports);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fiado/type-kit",
3
- "version": "3.122.0",
3
+ "version": "3.123.0",
4
4
  "description": "",
5
5
  "main": "bin/index.js",
6
6
  "types": "bin/index.d.ts",
@@ -0,0 +1,34 @@
1
+ import { IsObject, IsOptional, IsString, MaxLength } from "class-validator";
2
+
3
+ /**
4
+ * Request del endpoint `POST /wallet-funding/publish` del processor.
5
+ *
6
+ * Publica el evento de FiadoTx (tupla EQ_CASH_SA / CASH_IN del wallet-funding
7
+ * cash-in) al SQS `TRANSACTION_QUEUE` para que `transaction-business` lo
8
+ * consuma y persista en `FiadoTx_GT`.
9
+ *
10
+ * Best-effort: el caller (equality-connector post-settlement, o el cron de
11
+ * gap-reconciliation del mismo connector) debe tratar el error como
12
+ * recuperable — el reconciler T+0 rescata gaps que queden.
13
+ *
14
+ * Ver spec 15 §6.2 (processor mantiene ownership del SQS publish) + §5.1
15
+ * (reconciler en el connector).
16
+ */
17
+ export class PublishFiadoTxRequest {
18
+ /** Identificador idempotente del evento. Sugerido: `${providerName}:${providerTxId}`. */
19
+ @IsString() @MaxLength(128) idempotencyKey!: string;
20
+
21
+ /**
22
+ * Spec completo de la tupla FiadoTx a persistir. Shape generado por el
23
+ * processor en `walletFundingValidate()` (campo `fiadoTxSpec` de la response).
24
+ * El caller lo recibe del processor y lo reenvía sin modificar.
25
+ *
26
+ * Es `unknown` aquí (no tipado fuerte) porque el shape interno del processor
27
+ * puede cambiar sin breaking change para los callers — el processor es dueño
28
+ * del shape y de su serialización al SQS.
29
+ */
30
+ @IsObject() fiadoTxSpec!: Record<string, unknown>;
31
+
32
+ /** Contexto opcional para logs/auditoría (ej. "post-settlement" | "reconciler-gap"). */
33
+ @IsOptional() @IsString() @MaxLength(64) origin?: string;
34
+ }
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Response del endpoint `POST /wallet-funding/publish` del processor.
3
+ *
4
+ * Best-effort: status="FAILED" indica que el publish al SQS no se ejecutó
5
+ * (sqs.sendMessage falló). El caller debe loggear y continuar — el
6
+ * reconciler T+0 del connector eventualmente recuperará el gap.
7
+ *
8
+ * Ver spec 15 §6.2.
9
+ */
10
+ export interface PublishFiadoTxResponse {
11
+ status: "OK" | "FAILED";
12
+ /** Mensaje breve para logs. Vacío en happy path. */
13
+ message?: string;
14
+ }
@@ -39,6 +39,8 @@ export * from './dtos/ProviderProcessServicePaymentTransactionRequest';
39
39
  export * from './dtos/ProviderProcessServicePaymentTransactionResponse';
40
40
  export * from './dtos/AuthorizeRenewalPreAuthRequest';
41
41
  export * from './dtos/AuthorizeRenewalPreAuthResponse';
42
+ export * from './dtos/PublishFiadoTxRequest';
43
+ export * from './dtos/PublishFiadoTxResponse';
42
44
 
43
45
  export * from './enums/TransactionProcessorCodesEnum';
44
46
  export * from './enums/AsyncTxStatusEnum';