@explorins/pers-shared 2.1.86 → 2.1.87
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/dist/cjs/shared-lib/dto/pagination/pagination.response.dto.d.ts +12 -2
- package/dist/cjs/shared-lib/dto/pagination/pagination.response.dto.d.ts.map +1 -1
- package/dist/cjs/shared-lib/dto/pagination/pagination.response.dto.js +16 -3
- package/dist/cjs/shared-lib/dto/pagination/pagination.response.dto.js.map +1 -1
- package/dist/cjs/shared-lib/dto/transaction/transaction.dto.d.ts +5 -0
- package/dist/cjs/shared-lib/dto/transaction/transaction.dto.d.ts.map +1 -1
- package/dist/cjs/shared-lib/dto/transaction/transaction.dto.js +43 -0
- package/dist/cjs/shared-lib/dto/transaction/transaction.dto.js.map +1 -1
- package/dist/cjs/shared-lib/types/index.d.ts +1 -0
- package/dist/cjs/shared-lib/types/index.d.ts.map +1 -1
- package/dist/cjs/shared-lib/types/index.js +1 -0
- package/dist/cjs/shared-lib/types/index.js.map +1 -1
- package/dist/cjs/shared-lib/types/transaction-include-relation.type.d.ts +29 -0
- package/dist/cjs/shared-lib/types/transaction-include-relation.type.d.ts.map +1 -0
- package/dist/cjs/shared-lib/types/transaction-include-relation.type.js +19 -0
- package/dist/cjs/shared-lib/types/transaction-include-relation.type.js.map +1 -0
- package/dist/esm/shared-lib/dto/pagination/pagination.response.dto.d.ts +12 -2
- package/dist/esm/shared-lib/dto/pagination/pagination.response.dto.d.ts.map +1 -1
- package/dist/esm/shared-lib/dto/pagination/pagination.response.dto.js +15 -3
- package/dist/esm/shared-lib/dto/pagination/pagination.response.dto.js.map +1 -1
- package/dist/esm/shared-lib/dto/transaction/transaction.dto.d.ts +5 -0
- package/dist/esm/shared-lib/dto/transaction/transaction.dto.d.ts.map +1 -1
- package/dist/esm/shared-lib/dto/transaction/transaction.dto.js +41 -1
- package/dist/esm/shared-lib/dto/transaction/transaction.dto.js.map +1 -1
- package/dist/esm/shared-lib/types/index.d.ts +1 -0
- package/dist/esm/shared-lib/types/index.d.ts.map +1 -1
- package/dist/esm/shared-lib/types/index.js +1 -0
- package/dist/esm/shared-lib/types/index.js.map +1 -1
- package/dist/esm/shared-lib/types/transaction-include-relation.type.d.ts +29 -0
- package/dist/esm/shared-lib/types/transaction-include-relation.type.d.ts.map +1 -0
- package/dist/esm/shared-lib/types/transaction-include-relation.type.js +15 -0
- package/dist/esm/shared-lib/types/transaction-include-relation.type.js.map +1 -0
- package/package.json +1 -1
|
@@ -5,11 +5,21 @@ import { type PaginatedResponse, type PaginationMetadata } from "../../interface
|
|
|
5
5
|
export declare class PaginatedResponseDTO<T> implements PaginatedResponse<T> {
|
|
6
6
|
readonly data: ReadonlyArray<T>;
|
|
7
7
|
readonly pagination: PaginationMetadata;
|
|
8
|
-
|
|
8
|
+
readonly metadata?: {
|
|
9
|
+
includes?: string[];
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
constructor(data: T[], page: number | null, limit: number | null, total: number, metadata?: {
|
|
13
|
+
includes?: string[];
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
});
|
|
9
16
|
/**
|
|
10
17
|
* ✅ FACTORY: Create paginated response from service layer
|
|
11
18
|
*/
|
|
12
|
-
static create<T>(data: T[], page: number, limit: number, total: number
|
|
19
|
+
static create<T>(data: T[], page: number, limit: number, total: number, metadata?: {
|
|
20
|
+
includes?: string[];
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}): PaginatedResponseDTO<T>;
|
|
13
23
|
/**
|
|
14
24
|
* ✅ FACTORY: Create empty paginated response
|
|
15
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.response.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/pagination/pagination.response.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAG7G;;GAEG;AACH,qBAA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,CAAC,CAAC;IAI1B;;OAEG;IACH,MAAM,CAAC,KAAK,CAAC,CAAC,EAAE,IAAI,GAAE,MAAU,EAAE,KAAK,GAAE,MAAW,GAAG,oBAAoB,CAAC,CAAC,CAAC;CAG/E"}
|
|
@@ -17,7 +17,8 @@ const swagger_1 = require("@nestjs/swagger");
|
|
|
17
17
|
class PaginatedResponseDTO {
|
|
18
18
|
data;
|
|
19
19
|
pagination;
|
|
20
|
-
|
|
20
|
+
metadata;
|
|
21
|
+
constructor(data, page, limit, total, metadata) {
|
|
21
22
|
this.data = Object.freeze([...data]);
|
|
22
23
|
this.pagination = Object.freeze({
|
|
23
24
|
page,
|
|
@@ -27,12 +28,13 @@ class PaginatedResponseDTO {
|
|
|
27
28
|
hasNext: (page || 1) * (limit || 1) < total,
|
|
28
29
|
hasPrev: (page || 1) > 1
|
|
29
30
|
});
|
|
31
|
+
this.metadata = metadata ? Object.freeze(metadata) : undefined;
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
34
|
* ✅ FACTORY: Create paginated response from service layer
|
|
33
35
|
*/
|
|
34
|
-
static create(data, page, limit, total) {
|
|
35
|
-
return new PaginatedResponseDTO(data, page, limit, total);
|
|
36
|
+
static create(data, page, limit, total, metadata) {
|
|
37
|
+
return new PaginatedResponseDTO(data, page, limit, total, metadata);
|
|
36
38
|
}
|
|
37
39
|
/**
|
|
38
40
|
* ✅ FACTORY: Create empty paginated response
|
|
@@ -63,4 +65,15 @@ __decorate([
|
|
|
63
65
|
}),
|
|
64
66
|
__metadata("design:type", Object)
|
|
65
67
|
], PaginatedResponseDTO.prototype, "pagination", void 0);
|
|
68
|
+
__decorate([
|
|
69
|
+
(0, swagger_1.ApiProperty)({
|
|
70
|
+
description: 'Additional metadata (e.g., enriched relations)',
|
|
71
|
+
required: false,
|
|
72
|
+
nullable: true,
|
|
73
|
+
example: {
|
|
74
|
+
includes: ['sender', 'recipient']
|
|
75
|
+
}
|
|
76
|
+
}),
|
|
77
|
+
__metadata("design:type", Object)
|
|
78
|
+
], PaginatedResponseDTO.prototype, "metadata", void 0);
|
|
66
79
|
//# sourceMappingURL=pagination.response.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.response.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/pagination/pagination.response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAI9C;;GAEG;AACH,MAAa,oBAAoB;IAKtB,IAAI,CAAmB;IAavB,UAAU,CAAqB;
|
|
1
|
+
{"version":3,"file":"pagination.response.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/pagination/pagination.response.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA8C;AAI9C;;GAEG;AACH,MAAa,oBAAoB;IAKtB,IAAI,CAAmB;IAavB,UAAU,CAAqB;IAU/B,QAAQ,CAGf;IAEF,YACE,IAAS,EACT,IAAmB,EACnB,KAAoB,EACpB,KAAa,EACb,QAAsD;QAEtD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;YAC9B,IAAI;YACJ,KAAK;YACL,KAAK;YACL,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;YACtC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,KAAK;YAC3C,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC;SACzB,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAM,CACX,IAAS,EACT,IAAY,EACZ,KAAa,EACb,KAAa,EACb,QAAsD;QAEtD,OAAO,IAAI,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAK,CAAI,OAAe,CAAC,EAAE,QAAgB,EAAE;QAClD,OAAO,IAAI,oBAAoB,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACtD,CAAC;CACF;AAvED,oDAuEC;AAlEU;IAJR,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,qBAAqB;QAClC,IAAI,EAAE,OAAO;KACd,CAAC;;kDAC8B;AAavB;IAXR,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,qBAAqB;QAClC,OAAO,EAAE;YACP,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,CAAC;YACR,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,KAAK;SACf;KACF,CAAC;;wDACsC;AAU/B;IARR,IAAA,qBAAW,EAAC;QACX,WAAW,EAAE,gDAAgD;QAC7D,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE;YACP,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC;SAClC;KACF,CAAC;;sDAIA"}
|
|
@@ -4,6 +4,8 @@ import { TransactionTriggerProcessType } from "../../enum/transaction-trigger-pr
|
|
|
4
4
|
import type { NativeTokenType } from "../../types/native-token.type";
|
|
5
5
|
import { AccountOwnerType } from "../../enum";
|
|
6
6
|
import { TransactionCompleteFields } from "../../interfaces/transaction.interface";
|
|
7
|
+
import { UserDTO } from "../user.dto";
|
|
8
|
+
import { BusinessDTO } from "../business/business.dto";
|
|
7
9
|
export declare class TransactionDTO implements TransactionCompleteFields {
|
|
8
10
|
amount: number | null;
|
|
9
11
|
id: string;
|
|
@@ -29,5 +31,8 @@ export declare class TransactionDTO implements TransactionCompleteFields {
|
|
|
29
31
|
engagedBusinessId: string | null;
|
|
30
32
|
authorizedSubmitterId: string | null;
|
|
31
33
|
authorizedSubmitterType: AccountOwnerType | null;
|
|
34
|
+
sender?: UserDTO | BusinessDTO;
|
|
35
|
+
recipient?: UserDTO | BusinessDTO;
|
|
36
|
+
engagedBusiness?: BusinessDTO;
|
|
32
37
|
}
|
|
33
38
|
//# sourceMappingURL=transaction.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/transaction/transaction.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"transaction.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/transaction/transaction.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,qBAAa,cAAe,YAAW,yBAAyB;IAG5D,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|
15
15
|
const transaction_status_enum_1 = require("../../enum/transaction-status.enum");
|
|
16
16
|
const transaction_trigger_process_type_enum_1 = require("../../enum/transaction-trigger-process-type.enum");
|
|
17
17
|
const enum_1 = require("../../enum");
|
|
18
|
+
const user_dto_1 = require("../user.dto");
|
|
19
|
+
const business_dto_1 = require("../business/business.dto");
|
|
18
20
|
class TransactionDTO {
|
|
19
21
|
amount = null;
|
|
20
22
|
id = '';
|
|
@@ -40,6 +42,14 @@ class TransactionDTO {
|
|
|
40
42
|
engagedBusinessId = null;
|
|
41
43
|
authorizedSubmitterId = null;
|
|
42
44
|
authorizedSubmitterType = null;
|
|
45
|
+
// =====================================
|
|
46
|
+
// OPTIONAL ENRICHMENT FIELDS
|
|
47
|
+
// =====================================
|
|
48
|
+
// Only populated when include query param is specified
|
|
49
|
+
// e.g., GET /transactions?include=sender,recipient,business
|
|
50
|
+
sender;
|
|
51
|
+
recipient;
|
|
52
|
+
engagedBusiness;
|
|
43
53
|
}
|
|
44
54
|
exports.TransactionDTO = TransactionDTO;
|
|
45
55
|
__decorate([
|
|
@@ -181,4 +191,37 @@ __decorate([
|
|
|
181
191
|
}),
|
|
182
192
|
__metadata("design:type", Object)
|
|
183
193
|
], TransactionDTO.prototype, "authorizedSubmitterType", void 0);
|
|
194
|
+
__decorate([
|
|
195
|
+
(0, swagger_1.ApiProperty)({
|
|
196
|
+
description: 'Enriched sender entity (User or Business). Only populated when include=sender is specified. Type is determined by senderOwnerType field.',
|
|
197
|
+
required: false,
|
|
198
|
+
nullable: true,
|
|
199
|
+
oneOf: [
|
|
200
|
+
{ $ref: (0, swagger_1.getSchemaPath)(user_dto_1.UserDTO) },
|
|
201
|
+
{ $ref: (0, swagger_1.getSchemaPath)(business_dto_1.BusinessDTO) }
|
|
202
|
+
]
|
|
203
|
+
}),
|
|
204
|
+
__metadata("design:type", Object)
|
|
205
|
+
], TransactionDTO.prototype, "sender", void 0);
|
|
206
|
+
__decorate([
|
|
207
|
+
(0, swagger_1.ApiProperty)({
|
|
208
|
+
description: 'Enriched recipient entity (User or Business). Only populated when include=recipient is specified. Type is determined by recipientOwnerType field.',
|
|
209
|
+
required: false,
|
|
210
|
+
nullable: true,
|
|
211
|
+
oneOf: [
|
|
212
|
+
{ $ref: (0, swagger_1.getSchemaPath)(user_dto_1.UserDTO) },
|
|
213
|
+
{ $ref: (0, swagger_1.getSchemaPath)(business_dto_1.BusinessDTO) }
|
|
214
|
+
]
|
|
215
|
+
}),
|
|
216
|
+
__metadata("design:type", Object)
|
|
217
|
+
], TransactionDTO.prototype, "recipient", void 0);
|
|
218
|
+
__decorate([
|
|
219
|
+
(0, swagger_1.ApiProperty)({
|
|
220
|
+
description: 'Enriched engaged business entity. Only populated when include=business is specified.',
|
|
221
|
+
required: false,
|
|
222
|
+
nullable: true,
|
|
223
|
+
type: () => business_dto_1.BusinessDTO
|
|
224
|
+
}),
|
|
225
|
+
__metadata("design:type", business_dto_1.BusinessDTO)
|
|
226
|
+
], TransactionDTO.prototype, "engagedBusiness", void 0);
|
|
184
227
|
//# sourceMappingURL=transaction.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/transaction/transaction.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,
|
|
1
|
+
{"version":3,"file":"transaction.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/transaction/transaction.dto.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,6CAA4D;AAC5D,4EAAuE;AACvE,gFAAuE;AACvE,4GAAiG;AAEjG,qCAA8C;AAE9C,0CAAsC;AACtC,2DAAuD;AAEvD,MAAa,cAAc;IAGvB,MAAM,GAAkB,IAAI,CAAA;IAG5B,EAAE,GAAW,EAAE,CAAA;IAGf,YAAY,GAAW,EAAE,CAAA;IAMzB,eAAe,GAAkB,IAAI,CAAA;IAKrC,SAAS,GAA2B,IAAI,CAAA;IAGxC,aAAa,GAAW,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E,IAAI;QACd,IAAI,EAAE,GAAG,EAAE,CAAC,0BAAW;KAC1B,CAAC;8BACgB,0BAAW;uDAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/types/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/types/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC"}
|
|
@@ -24,4 +24,5 @@ __exportStar(require("./domains"), exports);
|
|
|
24
24
|
__exportStar(require("./query-specification.types"), exports);
|
|
25
25
|
__exportStar(require("./transaction-filters.type"), exports);
|
|
26
26
|
__exportStar(require("./includable-relation.type"), exports);
|
|
27
|
+
__exportStar(require("./transaction-include-relation.type"), exports);
|
|
27
28
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared-lib/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAmD;AACnD,mDAAiC;AACjC,gEAA8C;AAC9C,sDAAoC;AACpC,mDAAiC;AACjC,0DAAwC;AACxC,4CAA0B;AAC1B,8DAA4C;AAC5C,6DAA2C;AAC3C,6DAA2C"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared-lib/types/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,mDAAmD;AACnD,mDAAiC;AACjC,gEAA8C;AAC9C,sDAAoC;AACpC,mDAAiC;AACjC,0DAAwC;AACxC,4CAA0B;AAC1B,8DAA4C;AAC5C,6DAA2C;AAC3C,6DAA2C;AAC3C,sEAAoD"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TRANSACTION INCLUDE RELATION TYPE
|
|
3
|
+
*
|
|
4
|
+
* Type-safe relations for optional enrichment in transaction queries.
|
|
5
|
+
* Prevents typos and provides IDE autocomplete.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```
|
|
9
|
+
* GET /transactions?include=sender,recipient,business
|
|
10
|
+
*
|
|
11
|
+
* include: ['sender', 'recipient'] // ✅ Type-safe
|
|
12
|
+
* include: ['snder'] // ❌ Compile error
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* Relations:
|
|
16
|
+
* - sender: Enriches transaction sender (polymorphic: UserDTO | BusinessDTO)
|
|
17
|
+
* - recipient: Enriches transaction recipient (polymorphic: UserDTO | BusinessDTO)
|
|
18
|
+
* - business: Enriches engaged business (BusinessDTO)
|
|
19
|
+
*/
|
|
20
|
+
export type TransactionIncludeRelation = 'sender' | 'recipient' | 'business';
|
|
21
|
+
/**
|
|
22
|
+
* Valid transaction relations for runtime validation
|
|
23
|
+
*/
|
|
24
|
+
export declare const VALID_TRANSACTION_RELATIONS: readonly TransactionIncludeRelation[];
|
|
25
|
+
/**
|
|
26
|
+
* Type guard to validate relation strings at runtime
|
|
27
|
+
*/
|
|
28
|
+
export declare function isValidTransactionRelation(value: string): value is TransactionIncludeRelation;
|
|
29
|
+
//# sourceMappingURL=transaction-include-relation.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-include-relation.type.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/types/transaction-include-relation.type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,SAAS,0BAA0B,EAInE,CAAC;AAEX;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,0BAA0B,CAE7F"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.VALID_TRANSACTION_RELATIONS = void 0;
|
|
4
|
+
exports.isValidTransactionRelation = isValidTransactionRelation;
|
|
5
|
+
/**
|
|
6
|
+
* Valid transaction relations for runtime validation
|
|
7
|
+
*/
|
|
8
|
+
exports.VALID_TRANSACTION_RELATIONS = [
|
|
9
|
+
'sender',
|
|
10
|
+
'recipient',
|
|
11
|
+
'business'
|
|
12
|
+
];
|
|
13
|
+
/**
|
|
14
|
+
* Type guard to validate relation strings at runtime
|
|
15
|
+
*/
|
|
16
|
+
function isValidTransactionRelation(value) {
|
|
17
|
+
return exports.VALID_TRANSACTION_RELATIONS.includes(value);
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=transaction-include-relation.type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-include-relation.type.js","sourceRoot":"","sources":["../../../../src/shared-lib/types/transaction-include-relation.type.ts"],"names":[],"mappings":";;;AAiCA,gEAEC;AAdD;;GAEG;AACU,QAAA,2BAA2B,GAA0C;IAChF,QAAQ;IACR,WAAW;IACX,UAAU;CACF,CAAC;AAEX;;GAEG;AACH,SAAgB,0BAA0B,CAAC,KAAa;IACtD,OAAO,mCAA2B,CAAC,QAAQ,CAAC,KAAmC,CAAC,CAAC;AACnF,CAAC"}
|
|
@@ -5,11 +5,21 @@ import { type PaginatedResponse, type PaginationMetadata } from "../../interface
|
|
|
5
5
|
export declare class PaginatedResponseDTO<T> implements PaginatedResponse<T> {
|
|
6
6
|
readonly data: ReadonlyArray<T>;
|
|
7
7
|
readonly pagination: PaginationMetadata;
|
|
8
|
-
|
|
8
|
+
readonly metadata?: {
|
|
9
|
+
includes?: string[];
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
};
|
|
12
|
+
constructor(data: T[], page: number | null, limit: number | null, total: number, metadata?: {
|
|
13
|
+
includes?: string[];
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
});
|
|
9
16
|
/**
|
|
10
17
|
* ✅ FACTORY: Create paginated response from service layer
|
|
11
18
|
*/
|
|
12
|
-
static create<T>(data: T[], page: number, limit: number, total: number
|
|
19
|
+
static create<T>(data: T[], page: number, limit: number, total: number, metadata?: {
|
|
20
|
+
includes?: string[];
|
|
21
|
+
[key: string]: any;
|
|
22
|
+
}): PaginatedResponseDTO<T>;
|
|
13
23
|
/**
|
|
14
24
|
* ✅ FACTORY: Create empty paginated response
|
|
15
25
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.response.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/pagination/pagination.response.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,iBAAiB,EAAE,KAAK,kBAAkB,EAAE,MAAM,4CAA4C,CAAC;AAG7G;;GAEG;AACH,qBAAa,oBAAoB,CAAC,CAAC,CAAE,YAAW,iBAAiB,CAAC,CAAC,CAAC;IAKlE,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC,CAAC,CAAC,CAAC;IAahC,QAAQ,CAAC,UAAU,EAAE,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"pagination.response.dto.d.ts","sourceRoot":"","sources":["../../../../../src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
|
|
12
12
|
data;
|
|
13
13
|
pagination;
|
|
14
|
-
|
|
14
|
+
metadata;
|
|
15
|
+
constructor(data, page, limit, total, metadata) {
|
|
15
16
|
this.data = Object.freeze([...data]);
|
|
16
17
|
this.pagination = Object.freeze({
|
|
17
18
|
page,
|
|
@@ -21,12 +22,13 @@ export class PaginatedResponseDTO {
|
|
|
21
22
|
hasNext: (page || 1) * (limit || 1) < total,
|
|
22
23
|
hasPrev: (page || 1) > 1
|
|
23
24
|
});
|
|
25
|
+
this.metadata = metadata ? Object.freeze(metadata) : undefined;
|
|
24
26
|
}
|
|
25
27
|
/**
|
|
26
28
|
* ✅ FACTORY: Create paginated response from service layer
|
|
27
29
|
*/
|
|
28
|
-
static create(data, page, limit, total) {
|
|
29
|
-
return new PaginatedResponseDTO(data, page, limit, total);
|
|
30
|
+
static create(data, page, limit, total, metadata) {
|
|
31
|
+
return new PaginatedResponseDTO(data, page, limit, total, metadata);
|
|
30
32
|
}
|
|
31
33
|
/**
|
|
32
34
|
* ✅ FACTORY: Create empty paginated response
|
|
@@ -54,4 +56,14 @@ __decorate([
|
|
|
54
56
|
}
|
|
55
57
|
})
|
|
56
58
|
], PaginatedResponseDTO.prototype, "pagination", void 0);
|
|
59
|
+
__decorate([
|
|
60
|
+
ApiProperty({
|
|
61
|
+
description: 'Additional metadata (e.g., enriched relations)',
|
|
62
|
+
required: false,
|
|
63
|
+
nullable: true,
|
|
64
|
+
example: {
|
|
65
|
+
includes: ['sender', 'recipient']
|
|
66
|
+
}
|
|
67
|
+
})
|
|
68
|
+
], PaginatedResponseDTO.prototype, "metadata", void 0);
|
|
57
69
|
//# sourceMappingURL=pagination.response.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pagination.response.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/pagination/pagination.response.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9C;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAKtB,IAAI,CAAmB;IAavB,UAAU,CAAqB;
|
|
1
|
+
{"version":3,"file":"pagination.response.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/pagination/pagination.response.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAI9C;;GAEG;AACH,MAAM,OAAO,oBAAoB;IAKtB,IAAI,CAAmB;IAavB,UAAU,CAAqB;IAU/B,QAAQ,CAGf;IAEF,YACE,IAAS,EACT,IAAmB,EACnB,KAAoB,EACpB,KAAa,EACb,QAAsD;QAEtD,IAAI,CAAC,IAAI,GAAG,MAAM,CAAC,MAAM,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC,CAAC;QACrC,IAAI,CAAC,UAAU,GAAG,MAAM,CAAC,MAAM,CAAC;YAC9B,IAAI;YACJ,KAAK;YACL,KAAK;YACL,KAAK,EAAE,IAAI,CAAC,IAAI,CAAC,KAAK,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC;YACtC,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC,KAAK,IAAI,CAAC,CAAC,GAAG,KAAK;YAC3C,OAAO,EAAE,CAAC,IAAI,IAAI,CAAC,CAAC,GAAG,CAAC;SACzB,CAAC,CAAC;QACH,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC;IACjE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,MAAM,CACX,IAAS,EACT,IAAY,EACZ,KAAa,EACb,KAAa,EACb,QAAsD;QAEtD,OAAO,IAAI,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;IACtE,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,KAAK,CAAI,OAAe,CAAC,EAAE,QAAgB,EAAE;QAClD,OAAO,IAAI,oBAAoB,CAAC,EAAE,EAAE,IAAI,EAAE,KAAK,EAAE,CAAC,CAAC,CAAC;IACtD,CAAC;CACF;AAlEU;IAJR,WAAW,CAAC;QACX,WAAW,EAAE,qBAAqB;QAClC,IAAI,EAAE,OAAO;KACd,CAAC;kDAC8B;AAavB;IAXR,WAAW,CAAC;QACX,WAAW,EAAE,qBAAqB;QAClC,OAAO,EAAE;YACP,IAAI,EAAE,CAAC;YACP,KAAK,EAAE,EAAE;YACT,KAAK,EAAE,GAAG;YACV,KAAK,EAAE,CAAC;YACR,OAAO,EAAE,IAAI;YACb,OAAO,EAAE,KAAK;SACf;KACF,CAAC;wDACsC;AAU/B;IARR,WAAW,CAAC;QACX,WAAW,EAAE,gDAAgD;QAC7D,QAAQ,EAAE,KAAK;QACf,QAAQ,EAAE,IAAI;QACd,OAAO,EAAE;YACP,QAAQ,EAAE,CAAC,QAAQ,EAAE,WAAW,CAAC;SAClC;KACF,CAAC;sDAIA"}
|
|
@@ -4,6 +4,8 @@ import { TransactionTriggerProcessType } from "../../enum/transaction-trigger-pr
|
|
|
4
4
|
import type { NativeTokenType } from "../../types/native-token.type";
|
|
5
5
|
import { AccountOwnerType } from "../../enum";
|
|
6
6
|
import { TransactionCompleteFields } from "../../interfaces/transaction.interface";
|
|
7
|
+
import { UserDTO } from "../user.dto";
|
|
8
|
+
import { BusinessDTO } from "../business/business.dto";
|
|
7
9
|
export declare class TransactionDTO implements TransactionCompleteFields {
|
|
8
10
|
amount: number | null;
|
|
9
11
|
id: string;
|
|
@@ -29,5 +31,8 @@ export declare class TransactionDTO implements TransactionCompleteFields {
|
|
|
29
31
|
engagedBusinessId: string | null;
|
|
30
32
|
authorizedSubmitterId: string | null;
|
|
31
33
|
authorizedSubmitterType: AccountOwnerType | null;
|
|
34
|
+
sender?: UserDTO | BusinessDTO;
|
|
35
|
+
recipient?: UserDTO | BusinessDTO;
|
|
36
|
+
engagedBusiness?: BusinessDTO;
|
|
32
37
|
}
|
|
33
38
|
//# sourceMappingURL=transaction.dto.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/transaction/transaction.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;
|
|
1
|
+
{"version":3,"file":"transaction.dto.d.ts","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/transaction/transaction.dto.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AACjG,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAC9C,OAAO,EAAE,yBAAyB,EAAE,MAAM,wCAAwC,CAAC;AACnF,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,qBAAa,cAAe,YAAW,yBAAyB;IAG5D,MAAM,EAAE,MAAM,GAAG,IAAI,CAAO;IAG5B,EAAE,EAAE,MAAM,CAAK;IAGf,YAAY,EAAE,MAAM,CAAK;IAMzB,eAAe,EAAE,MAAM,GAAG,IAAI,CAAO;IAKrC,SAAS,EAAE,eAAe,GAAG,IAAI,CAAO;IAGxC,aAAa,EAAE,MAAM,CAAK;IAG1B,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAO;IAGtC,eAAe,EAAE,MAAM,GAAG,IAAI,CAAO;IAMrC,IAAI,EAAE,mBAAmB,GAAG,IAAI,CAAO;IAMvC,kBAAkB,EAAE,6BAA6B,GAAG,IAAI,CAAO;IAK/D,gBAAgB,EAAE,MAAM,GAAG,IAAI,CAAO;IAMtC,MAAM,EAAE,iBAAiB,CAA+B;IAGxD,SAAS,EAAE,IAAI,GAAG,IAAI,CAAO;IAG7B,SAAS,CAAC,EAAE,IAAI,GAAG,IAAI,CAAO;IAG9B,QAAQ,EAAE,MAAM,CAAK;IAGrB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAO;IAM7B,QAAQ,EAAE,MAAM,GAAG,IAAI,CAAQ;IAO/B,eAAe,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAMhD,WAAW,EAAE,MAAM,GAAG,IAAI,CAAQ;IAOlC,kBAAkB,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAMnD,OAAO,EAAE,MAAM,GAAG,IAAI,CAAQ;IAM9B,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAMxC,qBAAqB,EAAE,MAAM,GAAG,IAAI,CAAQ;IAO5C,uBAAuB,EAAE,gBAAgB,GAAG,IAAI,CAAQ;IAiBxD,MAAM,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAW/B,SAAS,CAAC,EAAE,OAAO,GAAG,WAAW,CAAC;IAQlC,eAAe,CAAC,EAAE,WAAW,CAAC;CACjC"}
|
|
@@ -4,11 +4,13 @@ var __decorate = (this && this.__decorate) || function (decorators, target, key,
|
|
|
4
4
|
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;
|
|
5
5
|
return c > 3 && r && Object.defineProperty(target, key, r), r;
|
|
6
6
|
};
|
|
7
|
-
import { ApiProperty } from "@nestjs/swagger";
|
|
7
|
+
import { ApiProperty, getSchemaPath } from "@nestjs/swagger";
|
|
8
8
|
import { Web3TransactionType } from "../../enum/transaction-type.enum.js";
|
|
9
9
|
import { TransactionStatus } from "../../enum/transaction-status.enum.js";
|
|
10
10
|
import { TransactionTriggerProcessType } from "../../enum/transaction-trigger-process-type.enum.js";
|
|
11
11
|
import { AccountOwnerType } from "../../enum/index.js";
|
|
12
|
+
import { UserDTO } from "../user.dto.js";
|
|
13
|
+
import { BusinessDTO } from "../business/business.dto.js";
|
|
12
14
|
export class TransactionDTO {
|
|
13
15
|
amount = null;
|
|
14
16
|
id = '';
|
|
@@ -34,6 +36,14 @@ export class TransactionDTO {
|
|
|
34
36
|
engagedBusinessId = null;
|
|
35
37
|
authorizedSubmitterId = null;
|
|
36
38
|
authorizedSubmitterType = null;
|
|
39
|
+
// =====================================
|
|
40
|
+
// OPTIONAL ENRICHMENT FIELDS
|
|
41
|
+
// =====================================
|
|
42
|
+
// Only populated when include query param is specified
|
|
43
|
+
// e.g., GET /transactions?include=sender,recipient,business
|
|
44
|
+
sender;
|
|
45
|
+
recipient;
|
|
46
|
+
engagedBusiness;
|
|
37
47
|
}
|
|
38
48
|
__decorate([
|
|
39
49
|
ApiProperty({ description: 'Transaction amount' })
|
|
@@ -150,4 +160,34 @@ __decorate([
|
|
|
150
160
|
enum: AccountOwnerType
|
|
151
161
|
})
|
|
152
162
|
], TransactionDTO.prototype, "authorizedSubmitterType", void 0);
|
|
163
|
+
__decorate([
|
|
164
|
+
ApiProperty({
|
|
165
|
+
description: 'Enriched sender entity (User or Business). Only populated when include=sender is specified. Type is determined by senderOwnerType field.',
|
|
166
|
+
required: false,
|
|
167
|
+
nullable: true,
|
|
168
|
+
oneOf: [
|
|
169
|
+
{ $ref: getSchemaPath(UserDTO) },
|
|
170
|
+
{ $ref: getSchemaPath(BusinessDTO) }
|
|
171
|
+
]
|
|
172
|
+
})
|
|
173
|
+
], TransactionDTO.prototype, "sender", void 0);
|
|
174
|
+
__decorate([
|
|
175
|
+
ApiProperty({
|
|
176
|
+
description: 'Enriched recipient entity (User or Business). Only populated when include=recipient is specified. Type is determined by recipientOwnerType field.',
|
|
177
|
+
required: false,
|
|
178
|
+
nullable: true,
|
|
179
|
+
oneOf: [
|
|
180
|
+
{ $ref: getSchemaPath(UserDTO) },
|
|
181
|
+
{ $ref: getSchemaPath(BusinessDTO) }
|
|
182
|
+
]
|
|
183
|
+
})
|
|
184
|
+
], TransactionDTO.prototype, "recipient", void 0);
|
|
185
|
+
__decorate([
|
|
186
|
+
ApiProperty({
|
|
187
|
+
description: 'Enriched engaged business entity. Only populated when include=business is specified.',
|
|
188
|
+
required: false,
|
|
189
|
+
nullable: true,
|
|
190
|
+
type: () => BusinessDTO
|
|
191
|
+
})
|
|
192
|
+
], TransactionDTO.prototype, "engagedBusiness", void 0);
|
|
153
193
|
//# sourceMappingURL=transaction.dto.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transaction.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/transaction/transaction.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"transaction.dto.js","sourceRoot":"","sources":["../../../../../src/shared-lib/dto/transaction/transaction.dto.ts"],"names":[],"mappings":";;;;;;AAAA,OAAO,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC5D,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,iBAAiB,EAAE,MAAM,oCAAoC,CAAC;AACvE,OAAO,EAAE,6BAA6B,EAAE,MAAM,kDAAkD,CAAC;AAEjG,OAAO,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE9C,OAAO,EAAE,OAAO,EAAE,MAAM,aAAa,CAAC;AACtC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAEvD,MAAM,OAAO,cAAc;IAGvB,MAAM,GAAkB,IAAI,CAAA;IAG5B,EAAE,GA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../../src/shared-lib/types/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/types/index.ts"],"names":[],"mappings":"AACA,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC"}
|
|
@@ -8,4 +8,5 @@ export * from './domains.js';
|
|
|
8
8
|
export * from './query-specification.types.js';
|
|
9
9
|
export * from './transaction-filters.type.js';
|
|
10
10
|
export * from './includable-relation.type.js';
|
|
11
|
+
export * from './transaction-include-relation.type.js';
|
|
11
12
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared-lib/types/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../src/shared-lib/types/index.ts"],"names":[],"mappings":"AAAA,mDAAmD;AACnD,cAAc,kBAAkB,CAAC;AACjC,cAAc,+BAA+B,CAAC;AAC9C,cAAc,qBAAqB,CAAC;AACpC,cAAc,kBAAkB,CAAC;AACjC,cAAc,yBAAyB,CAAC;AACxC,cAAc,WAAW,CAAC;AAC1B,cAAc,6BAA6B,CAAC;AAC5C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,4BAA4B,CAAC;AAC3C,cAAc,qCAAqC,CAAC"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* TRANSACTION INCLUDE RELATION TYPE
|
|
3
|
+
*
|
|
4
|
+
* Type-safe relations for optional enrichment in transaction queries.
|
|
5
|
+
* Prevents typos and provides IDE autocomplete.
|
|
6
|
+
*
|
|
7
|
+
* Usage:
|
|
8
|
+
* ```
|
|
9
|
+
* GET /transactions?include=sender,recipient,business
|
|
10
|
+
*
|
|
11
|
+
* include: ['sender', 'recipient'] // ✅ Type-safe
|
|
12
|
+
* include: ['snder'] // ❌ Compile error
|
|
13
|
+
* ```
|
|
14
|
+
*
|
|
15
|
+
* Relations:
|
|
16
|
+
* - sender: Enriches transaction sender (polymorphic: UserDTO | BusinessDTO)
|
|
17
|
+
* - recipient: Enriches transaction recipient (polymorphic: UserDTO | BusinessDTO)
|
|
18
|
+
* - business: Enriches engaged business (BusinessDTO)
|
|
19
|
+
*/
|
|
20
|
+
export type TransactionIncludeRelation = 'sender' | 'recipient' | 'business';
|
|
21
|
+
/**
|
|
22
|
+
* Valid transaction relations for runtime validation
|
|
23
|
+
*/
|
|
24
|
+
export declare const VALID_TRANSACTION_RELATIONS: readonly TransactionIncludeRelation[];
|
|
25
|
+
/**
|
|
26
|
+
* Type guard to validate relation strings at runtime
|
|
27
|
+
*/
|
|
28
|
+
export declare function isValidTransactionRelation(value: string): value is TransactionIncludeRelation;
|
|
29
|
+
//# sourceMappingURL=transaction-include-relation.type.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-include-relation.type.d.ts","sourceRoot":"","sources":["../../../../src/shared-lib/types/transaction-include-relation.type.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,0BAA0B,GAAG,QAAQ,GAAG,WAAW,GAAG,UAAU,CAAC;AAE7E;;GAEG;AACH,eAAO,MAAM,2BAA2B,EAAE,SAAS,0BAA0B,EAInE,CAAC;AAEX;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,0BAA0B,CAE7F"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Valid transaction relations for runtime validation
|
|
3
|
+
*/
|
|
4
|
+
export const VALID_TRANSACTION_RELATIONS = [
|
|
5
|
+
'sender',
|
|
6
|
+
'recipient',
|
|
7
|
+
'business'
|
|
8
|
+
];
|
|
9
|
+
/**
|
|
10
|
+
* Type guard to validate relation strings at runtime
|
|
11
|
+
*/
|
|
12
|
+
export function isValidTransactionRelation(value) {
|
|
13
|
+
return VALID_TRANSACTION_RELATIONS.includes(value);
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=transaction-include-relation.type.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transaction-include-relation.type.js","sourceRoot":"","sources":["../../../../src/shared-lib/types/transaction-include-relation.type.ts"],"names":[],"mappings":"AAqBA;;GAEG;AACH,MAAM,CAAC,MAAM,2BAA2B,GAA0C;IAChF,QAAQ;IACR,WAAW;IACX,UAAU;CACF,CAAC;AAEX;;GAEG;AACH,MAAM,UAAU,0BAA0B,CAAC,KAAa;IACtD,OAAO,2BAA2B,CAAC,QAAQ,CAAC,KAAmC,CAAC,CAAC;AACnF,CAAC"}
|