@cobre-npm/library-portal-core 0.28.0 → 0.30.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.
Files changed (34) hide show
  1. package/README.md +43 -6
  2. package/dist/subclients/index.d.ts +4 -0
  3. package/dist/subclients/index.d.ts.map +1 -0
  4. package/dist/subclients/index.js +19 -0
  5. package/dist/subclients/index.js.map +1 -0
  6. package/dist/subclients/interfaces/response.interface.d.ts +41 -0
  7. package/dist/subclients/interfaces/response.interface.d.ts.map +1 -0
  8. package/dist/subclients/interfaces/response.interface.js +3 -0
  9. package/dist/subclients/interfaces/response.interface.js.map +1 -0
  10. package/dist/subclients/status/catalog.d.ts +17 -0
  11. package/dist/subclients/status/catalog.d.ts.map +1 -0
  12. package/dist/subclients/status/catalog.js +10 -0
  13. package/dist/subclients/status/catalog.js.map +1 -0
  14. package/dist/subclients/status/locales/en.json +8 -0
  15. package/dist/subclients/status/locales/es-mex.json +8 -0
  16. package/dist/subclients/status/utils/subclient-status.utils.d.ts +7 -0
  17. package/dist/subclients/status/utils/subclient-status.utils.d.ts.map +1 -0
  18. package/dist/subclients/status/utils/subclient-status.utils.js +20 -0
  19. package/dist/subclients/status/utils/subclient-status.utils.js.map +1 -0
  20. package/dist/transactions/index.d.ts +2 -0
  21. package/dist/transactions/index.d.ts.map +1 -1
  22. package/dist/transactions/index.js +1 -0
  23. package/dist/transactions/index.js.map +1 -1
  24. package/dist/transactions/types/catalog.d.ts +181 -0
  25. package/dist/transactions/types/catalog.d.ts.map +1 -0
  26. package/dist/transactions/types/catalog.js +182 -0
  27. package/dist/transactions/types/catalog.js.map +1 -0
  28. package/dist/transactions/types/locales/en.json +48 -0
  29. package/dist/transactions/types/locales/es-mex.json +48 -0
  30. package/dist/transactions/types/utils/transaction-type.utils.d.ts +18 -0
  31. package/dist/transactions/types/utils/transaction-type.utils.d.ts.map +1 -0
  32. package/dist/transactions/types/utils/transaction-type.utils.js +33 -0
  33. package/dist/transactions/types/utils/transaction-type.utils.js.map +1 -0
  34. package/package.json +5 -1
package/README.md CHANGED
@@ -39,9 +39,10 @@ import { getCountries } from "@cobre-npm/library-portal-core/countries"
39
39
  | `@cobre-npm/library-portal-core/counterparties` | Counterparty types + `Counterparty` interfaces |
40
40
  | `@cobre-npm/library-portal-core/countries` | Countries (base) and ISO countries (dialing codes, etc.) |
41
41
  | `@cobre-npm/library-portal-core/movements` | Movement types and statuses |
42
+ | `@cobre-npm/library-portal-core/subclients` | Subclient statuses + `Subclient`/`SubclientPerson` interfaces |
42
43
  | `@cobre-npm/library-portal-core/documentTypes` | Document types (definition + per-country applicability) |
43
44
  | `@cobre-npm/library-portal-core/currencies` | Currencies |
44
- | `@cobre-npm/library-portal-core/transactions` | Transaction interfaces |
45
+ | `@cobre-npm/library-portal-core/transactions` | Transaction types + interfaces |
45
46
  | `@cobre-npm/library-portal-core/canonicalTransactions` | Canonical transaction/money-movement detail interfaces |
46
47
  | `@cobre-npm/library-portal-core/search` | Search / aggregation interfaces |
47
48
  | `@cobre-npm/library-portal-core/trustedSessions` | Trusted session (OTP elevation window) interfaces |
@@ -123,14 +124,16 @@ Every use case comes out of this, without the consumer having to walk internal s
123
124
  returns the list already narrowed, with a safe default.
124
125
 
125
126
  `currencies` is the first: see [`currencies`](#currencies) for the query rules, which every later `queryX()`
126
- will follow. Until a domain has one, `.filter()` is still the way and it stays fine for one-off
127
- predicates even where `queryX()` exists.
127
+ will follow. `transactions/types` is the second, and the first **i18n** one: `lang` travels **inside** the
128
+ query object (required there, no default) rather than as a positional argument — see
129
+ [`transactions`](#transactions) for what that changes. Until a domain has one, `.filter()` is still the
130
+ way — and it stays fine for one-off predicates even where `queryX()` exists.
128
131
 
129
132
  ### Two classes of domain
130
133
 
131
134
  | Class | When | Signature | Examples |
132
135
  |---|---|---|---|
133
- | **With i18n** | the label depends on the language | `getX(lang)` | accountTypes, counterpartyTypes, movementTypes, countries, countriesISO, documentTypes |
136
+ | **With i18n** | the label depends on the language | `getX(lang)` | accountTypes, counterpartyTypes, movementTypes, transactionTypes, countries, countriesISO, documentTypes |
134
137
  | **Without i18n** | the label is fixed (or there is none) | `getX()` | currencies (inline label), accountProviders, movementStatus |
135
138
 
136
139
  `currencies`/`providers`/`status` **don't take `lang`** because there's no translation — the signature is honest.
@@ -218,6 +221,21 @@ getMovementStatuses().completed // { code: "completed" } (no i18n)
218
221
  - **types** (i18n): movement types (ACH, SPEI, R2P, …).
219
222
  - **status** (no i18n): movement statuses (`initiated`, `processing`, `completed`, …).
220
223
 
224
+ ### `subclients`
225
+
226
+ ```ts
227
+ import {
228
+ getSubclientStatuses, type SubclientStatus, type SubclientStatusOption,
229
+ type Subclient, type SubclientPerson,
230
+ } from "@cobre-npm/library-portal-core/subclients"
231
+
232
+ getSubclientStatuses("en").approved // { code: "approved", label: "Enabled" }
233
+ ```
234
+
235
+ - **status** (i18n): `getSubclientStatuses(lang)`; subclient statuses (`processing`, `approved`, `rejected`,
236
+ `failed`).
237
+ - **interfaces**: `Subclient`, `SubclientPerson` (shape shared by `ubos` and `legal_representatives`).
238
+
221
239
  ### `documentTypes` — two views
222
240
 
223
241
  It's the only domain with a **many-to-many** relationship (one document type applies in several countries with
@@ -298,12 +316,31 @@ Watch out for two consequences of rule 3:
298
316
  And two on rule 1: `{ minAmount: 1 }` is equality, not `>=`, which is rarely what you want; and
299
317
  `flagAsset`/`label` are presentation details that make poor business criteria.
300
318
 
301
- ### `transactions` / `search` / `trustedSessions`
319
+ ### `transactions`
320
+
321
+ ```ts
322
+ import {
323
+ getTransactionTypes, queryTransactionTypes, type TransactionType, type TransactionTypeQuery,
324
+ type Transaction, type EnrichedTransaction, /* ...interfaces */
325
+ } from "@cobre-npm/library-portal-core/transactions"
326
+
327
+ getTransactionTypes("en").spei_debit.label // "Debit via SPEI"
328
+ queryTransactionTypes({ lang: "en", code: "spei_debit" }) // [ { code: "spei_debit", label: "Debit via SPEI" } ]
329
+ ```
330
+
331
+ - **types** (i18n): `getTransactionTypes(lang)`; each record carries `code`, `creditDebitType`
332
+ (`"credit" | "debit"` — the same `CreditDebitType` used by the `Transaction` interface) and `label`.
333
+ - **types query** (i18n `queryX()`): `queryTransactionTypes({ lang, ...filters })` — `lang` is **required inside
334
+ the query object**, not a separate argument, so the result is already localized. There is no default field
335
+ (unlike `currencies`' `scope`): every transaction type comes back when only `lang` is given.
336
+ `queryTransactionTypes({ lang: "en", creditDebitType: "credit" })` narrows to only the credits.
337
+ - **interfaces**: `Transaction`, `EnrichedTransaction`, `TransactionMetadata`, `CreditDebitType`.
338
+
339
+ ### `search` / `trustedSessions`
302
340
 
303
341
  Interfaces only (pure types):
304
342
 
305
343
  ```ts
306
- import type { Transaction, EnrichedTransaction } from "@cobre-npm/library-portal-core/transactions"
307
344
  import type { SearchRequest, SearchResponse, SearchFilter } from "@cobre-npm/library-portal-core/search"
308
345
  import type { TrustedSessionStatus } from "@cobre-npm/library-portal-core/trustedSessions"
309
346
  ```
@@ -0,0 +1,4 @@
1
+ export type { SubclientStatus } from "./status/catalog";
2
+ export * from "./status/utils/subclient-status.utils";
3
+ export * from "./interfaces/response.interface";
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/subclients/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,kBAAkB,CAAA;AAEvD,cAAc,uCAAuC,CAAA;AAErD,cAAc,iCAAiC,CAAA"}
@@ -0,0 +1,19 @@
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
+ __exportStar(require("./status/utils/subclient-status.utils"), exports);
18
+ __exportStar(require("./interfaces/response.interface"), exports);
19
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/subclients/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAEA,wEAAqD;AAErD,kEAA+C"}
@@ -0,0 +1,41 @@
1
+ import type { SubclientStatus } from "../status/catalog";
2
+ import type { DocumentType } from "../../documentTypes/catalog";
3
+ import type { Country } from "../../countries/base/catalog";
4
+ export interface Subclient {
5
+ id: string;
6
+ object: "subclient";
7
+ status: {
8
+ state: SubclientStatus;
9
+ };
10
+ legal_name: string;
11
+ short_name: string;
12
+ id_type: DocumentType;
13
+ id_number: string;
14
+ email: string;
15
+ phone: string;
16
+ website: string;
17
+ industry: string;
18
+ date_of_incorporation: string;
19
+ country_of_incorporation: Country;
20
+ address: {
21
+ street: string;
22
+ city: string;
23
+ state: string;
24
+ postal_code: string;
25
+ country: Country;
26
+ };
27
+ ubos: SubclientPerson[];
28
+ legal_representatives: SubclientPerson[];
29
+ client_metadata: Record<string, unknown>;
30
+ created_at: string;
31
+ updated_at: string;
32
+ }
33
+ export interface SubclientPerson {
34
+ first_name: string;
35
+ last_name: string;
36
+ id_type: DocumentType;
37
+ id_number: string;
38
+ nationalities: Country[];
39
+ date_of_birth: string;
40
+ }
41
+ //# sourceMappingURL=response.interface.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.interface.d.ts","sourceRoot":"","sources":["../../../src/subclients/interfaces/response.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AACxD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,6BAA6B,CAAA;AAC/D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAE3D,MAAM,WAAW,SAAS;IACxB,EAAE,EAAE,MAAM,CAAA;IACV,MAAM,EAAE,WAAW,CAAA;IACnB,MAAM,EAAE;QACN,KAAK,EAAE,eAAe,CAAA;KACvB,CAAA;IACD,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,OAAO,EAAE,YAAY,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,qBAAqB,EAAE,MAAM,CAAA;IAC7B,wBAAwB,EAAE,OAAO,CAAA;IACjC,OAAO,EAAE;QACP,MAAM,EAAE,MAAM,CAAA;QACd,IAAI,EAAE,MAAM,CAAA;QACZ,KAAK,EAAE,MAAM,CAAA;QACb,WAAW,EAAE,MAAM,CAAA;QACnB,OAAO,EAAE,OAAO,CAAA;KACjB,CAAA;IACD,IAAI,EAAE,eAAe,EAAE,CAAA;IACvB,qBAAqB,EAAE,eAAe,EAAE,CAAA;IACxC,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACxC,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,eAAe;IAC9B,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,OAAO,EAAE,YAAY,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,OAAO,EAAE,CAAA;IACxB,aAAa,EAAE,MAAM,CAAA;CACtB"}
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=response.interface.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"response.interface.js","sourceRoot":"","sources":["../../../src/subclients/interfaces/response.interface.ts"],"names":[],"mappings":""}
@@ -0,0 +1,17 @@
1
+ export declare const SUBCLIENT_STATUSES: {
2
+ readonly processing: {
3
+ readonly code: "processing";
4
+ };
5
+ readonly approved: {
6
+ readonly code: "approved";
7
+ };
8
+ readonly rejected: {
9
+ readonly code: "rejected";
10
+ };
11
+ readonly failed: {
12
+ readonly code: "failed";
13
+ };
14
+ };
15
+ export type SubclientStatus = keyof typeof SUBCLIENT_STATUSES;
16
+ export type SubclientStatusRecord = (typeof SUBCLIENT_STATUSES)[SubclientStatus];
17
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/subclients/status/catalog.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;CAKrB,CAAA;AAEV,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,kBAAkB,CAAA;AAC7D,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,eAAe,CAAC,CAAA"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.SUBCLIENT_STATUSES = void 0;
4
+ exports.SUBCLIENT_STATUSES = {
5
+ processing: { code: "processing" },
6
+ approved: { code: "approved" },
7
+ rejected: { code: "rejected" },
8
+ failed: { code: "failed" }
9
+ };
10
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../src/subclients/status/catalog.ts"],"names":[],"mappings":";;;AAAa,QAAA,kBAAkB,GAAG;IAChC,UAAU,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE;IAClC,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;IAC9B,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE;IAC9B,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE;CAClB,CAAA"}
@@ -0,0 +1,8 @@
1
+ {
2
+ "subclientStatuses": {
3
+ "approved": "Enabled",
4
+ "processing": "Processing",
5
+ "rejected": "Rejected",
6
+ "failed": "Failed"
7
+ }
8
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "subclientStatuses": {
3
+ "approved": "Habilitado",
4
+ "processing": "Procesando",
5
+ "rejected": "Rechazado",
6
+ "failed": "Fallido"
7
+ }
8
+ }
@@ -0,0 +1,7 @@
1
+ import type { SubclientStatus, SubclientStatusRecord } from "../catalog";
2
+ import type { Locale } from "../../../lang";
3
+ export type SubclientStatusOption = SubclientStatusRecord & {
4
+ label: string;
5
+ };
6
+ export declare const getSubclientStatuses: (lang: Locale) => Record<SubclientStatus, SubclientStatusOption>;
7
+ //# sourceMappingURL=subclient-status.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subclient-status.utils.d.ts","sourceRoot":"","sources":["../../../../src/subclients/status/utils/subclient-status.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAGxE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAI3C,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7E,eAAO,MAAM,oBAAoB,GAAI,MAAM,MAAM,KAAG,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAShG,CAAA"}
@@ -0,0 +1,20 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.getSubclientStatuses = void 0;
7
+ const catalog_1 = require("../catalog");
8
+ const en_json_1 = __importDefault(require("../locales/en.json"));
9
+ const es_mex_json_1 = __importDefault(require("../locales/es-mex.json"));
10
+ const locales = { en: en_json_1.default, "es-mex": es_mex_json_1.default };
11
+ const getSubclientStatuses = (lang) => {
12
+ const locale = locales[lang];
13
+ const result = {};
14
+ for (const record of Object.values(catalog_1.SUBCLIENT_STATUSES)) {
15
+ result[record.code] = { ...record, label: locale.subclientStatuses[record.code] };
16
+ }
17
+ return result;
18
+ };
19
+ exports.getSubclientStatuses = getSubclientStatuses;
20
+ //# sourceMappingURL=subclient-status.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"subclient-status.utils.js","sourceRoot":"","sources":["../../../../src/subclients/status/utils/subclient-status.utils.ts"],"names":[],"mappings":";;;;;;AAAA,wCAA+C;AAE/C,iEAAyC;AACzC,yEAAgD;AAGhD,MAAM,OAAO,GAAuC,EAAE,EAAE,EAAE,iBAAQ,EAAE,QAAQ,EAAE,qBAAW,EAAE,CAAA;AAIpF,MAAM,oBAAoB,GAAG,CAAC,IAAY,EAAkD,EAAE;IACnG,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,MAAM,MAAM,GAAG,EAAoD,CAAA;IAEnE,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,4BAAkB,CAAC,EAAE,CAAC;QACvD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,iBAAiB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAA;IACnF,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AATY,QAAA,oBAAoB,wBAShC"}
@@ -1,2 +1,4 @@
1
+ export type { TransactionType } from "./types/catalog";
2
+ export * from "./types/utils/transaction-type.utils";
1
3
  export * from "./interfaces/response.interface";
2
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transactions/index.ts"],"names":[],"mappings":"AAAA,cAAc,iCAAiC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/transactions/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,MAAM,iBAAiB,CAAA;AACtD,cAAc,sCAAsC,CAAA;AAEpD,cAAc,iCAAiC,CAAA"}
@@ -14,5 +14,6 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
14
14
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
15
15
  };
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
+ __exportStar(require("./types/utils/transaction-type.utils"), exports);
17
18
  __exportStar(require("./interfaces/response.interface"), exports);
18
19
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transactions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,kEAA+C"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/transactions/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,uEAAoD;AAEpD,kEAA+C"}
@@ -0,0 +1,181 @@
1
+ export declare const TRANSACTION_TYPES: {
2
+ readonly spei_debit: {
3
+ readonly creditDebitType: "debit";
4
+ readonly code: "spei_debit";
5
+ };
6
+ readonly spei_credit: {
7
+ readonly creditDebitType: "credit";
8
+ readonly code: "spei_credit";
9
+ };
10
+ readonly spei_return: {
11
+ readonly creditDebitType: "credit";
12
+ readonly code: "spei_return";
13
+ };
14
+ readonly spei_rejected: {
15
+ readonly creditDebitType: "credit";
16
+ readonly code: "spei_rejected";
17
+ };
18
+ readonly internal_spei_debit: {
19
+ readonly creditDebitType: "debit";
20
+ readonly code: "internal_spei_debit";
21
+ };
22
+ readonly internal_spei_credit: {
23
+ readonly creditDebitType: "credit";
24
+ readonly code: "internal_spei_credit";
25
+ };
26
+ readonly adjustment_credit: {
27
+ readonly creditDebitType: "credit";
28
+ readonly code: "adjustment_credit";
29
+ };
30
+ readonly adjustment_debit: {
31
+ readonly creditDebitType: "debit";
32
+ readonly code: "adjustment_debit";
33
+ };
34
+ readonly mex_debit: {
35
+ readonly creditDebitType: "debit";
36
+ readonly code: "mex_debit";
37
+ };
38
+ readonly mex_credit: {
39
+ readonly creditDebitType: "credit";
40
+ readonly code: "mex_credit";
41
+ };
42
+ readonly col_debit: {
43
+ readonly creditDebitType: "debit";
44
+ readonly code: "col_debit";
45
+ };
46
+ readonly col_credit: {
47
+ readonly creditDebitType: "credit";
48
+ readonly code: "col_credit";
49
+ };
50
+ readonly misc_debit: {
51
+ readonly creditDebitType: "debit";
52
+ readonly code: "misc_debit";
53
+ };
54
+ readonly misc_credit: {
55
+ readonly creditDebitType: "credit";
56
+ readonly code: "misc_credit";
57
+ };
58
+ readonly internal_credit: {
59
+ readonly creditDebitType: "credit";
60
+ readonly code: "internal_credit";
61
+ };
62
+ readonly internal_debit: {
63
+ readonly creditDebitType: "debit";
64
+ readonly code: "internal_debit";
65
+ };
66
+ readonly r2p_credit: {
67
+ readonly creditDebitType: "credit";
68
+ readonly code: "r2p_credit";
69
+ };
70
+ readonly cbmm_debit: {
71
+ readonly creditDebitType: "debit";
72
+ readonly code: "cbmm_debit";
73
+ };
74
+ readonly cbmm_credit: {
75
+ readonly creditDebitType: "credit";
76
+ readonly code: "cbmm_credit";
77
+ };
78
+ readonly dd_credit: {
79
+ readonly creditDebitType: "credit";
80
+ readonly code: "dd_credit";
81
+ };
82
+ readonly col_cb_credit: {
83
+ readonly creditDebitType: "credit";
84
+ readonly code: "col_cb_credit";
85
+ };
86
+ readonly col_cb_debit: {
87
+ readonly creditDebitType: "debit";
88
+ readonly code: "col_cb_debit";
89
+ };
90
+ readonly breb_credit: {
91
+ readonly creditDebitType: "credit";
92
+ readonly code: "breb_credit";
93
+ };
94
+ readonly breb_debit: {
95
+ readonly creditDebitType: "debit";
96
+ readonly code: "breb_debit";
97
+ };
98
+ readonly r2p_breb_credit: {
99
+ readonly creditDebitType: "credit";
100
+ readonly code: "r2p_breb_credit";
101
+ };
102
+ readonly breb_rejected: {
103
+ readonly creditDebitType: "credit";
104
+ readonly code: "breb_rejected";
105
+ };
106
+ readonly col_top_up_credit: {
107
+ readonly creditDebitType: "credit";
108
+ readonly code: "col_top_up_credit";
109
+ };
110
+ readonly global_debit: {
111
+ readonly creditDebitType: "debit";
112
+ readonly code: "global_debit";
113
+ };
114
+ readonly global_credit: {
115
+ readonly creditDebitType: "credit";
116
+ readonly code: "global_credit";
117
+ };
118
+ readonly r2p_spei_credit: {
119
+ readonly creditDebitType: "credit";
120
+ readonly code: "r2p_spei_credit";
121
+ };
122
+ readonly transfer_credit: {
123
+ readonly creditDebitType: "credit";
124
+ readonly code: "transfer_credit";
125
+ };
126
+ readonly fedwire_debit: {
127
+ readonly creditDebitType: "debit";
128
+ readonly code: "fedwire_debit";
129
+ };
130
+ readonly fedwire_credit: {
131
+ readonly creditDebitType: "credit";
132
+ readonly code: "fedwire_credit";
133
+ };
134
+ readonly reward_credit: {
135
+ readonly creditDebitType: "credit";
136
+ readonly code: "reward_credit";
137
+ };
138
+ readonly global_pay_to_usa_debit: {
139
+ readonly creditDebitType: "debit";
140
+ readonly code: "global_pay_to_usa_debit";
141
+ };
142
+ readonly global_pay_to_usa_credit: {
143
+ readonly creditDebitType: "credit";
144
+ readonly code: "global_pay_to_usa_credit";
145
+ };
146
+ readonly usa_pay_to_global_debit: {
147
+ readonly creditDebitType: "debit";
148
+ readonly code: "usa_pay_to_global_debit";
149
+ };
150
+ readonly usa_pay_to_global_credit: {
151
+ readonly creditDebitType: "credit";
152
+ readonly code: "usa_pay_to_global_credit";
153
+ };
154
+ readonly onramp_credit: {
155
+ readonly creditDebitType: "credit";
156
+ readonly code: "onramp_credit";
157
+ };
158
+ readonly offramp_debit: {
159
+ readonly creditDebitType: "debit";
160
+ readonly code: "offramp_debit";
161
+ };
162
+ readonly stable_payout_debit: {
163
+ readonly creditDebitType: "debit";
164
+ readonly code: "stable_payout_debit";
165
+ };
166
+ readonly stable_payout_credit: {
167
+ readonly creditDebitType: "credit";
168
+ readonly code: "stable_payout_credit";
169
+ };
170
+ readonly global_pay_to_generic_debit: {
171
+ readonly creditDebitType: "debit";
172
+ readonly code: "global_pay_to_generic_debit";
173
+ };
174
+ readonly global_pay_to_generic_credit: {
175
+ readonly creditDebitType: "credit";
176
+ readonly code: "global_pay_to_generic_credit";
177
+ };
178
+ };
179
+ export type TransactionType = keyof typeof TRANSACTION_TYPES;
180
+ export type TransactionTypeRecord = (typeof TRANSACTION_TYPES)[TransactionType];
181
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/transactions/types/catalog.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAiLyD,CAAA;AAEvF,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAC5D,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,eAAe,CAAC,CAAA"}
@@ -0,0 +1,182 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.TRANSACTION_TYPES = void 0;
4
+ exports.TRANSACTION_TYPES = {
5
+ spei_debit: {
6
+ creditDebitType: "debit",
7
+ code: "spei_debit",
8
+ },
9
+ spei_credit: {
10
+ creditDebitType: "credit",
11
+ code: "spei_credit",
12
+ },
13
+ spei_return: {
14
+ creditDebitType: "credit",
15
+ code: "spei_return",
16
+ },
17
+ spei_rejected: {
18
+ creditDebitType: "credit",
19
+ code: "spei_rejected",
20
+ },
21
+ internal_spei_debit: {
22
+ creditDebitType: "debit",
23
+ code: "internal_spei_debit",
24
+ },
25
+ internal_spei_credit: {
26
+ creditDebitType: "credit",
27
+ code: "internal_spei_credit",
28
+ },
29
+ adjustment_credit: {
30
+ creditDebitType: "credit",
31
+ code: "adjustment_credit",
32
+ },
33
+ adjustment_debit: {
34
+ creditDebitType: "debit",
35
+ code: "adjustment_debit",
36
+ },
37
+ mex_debit: {
38
+ creditDebitType: "debit",
39
+ code: "mex_debit",
40
+ },
41
+ mex_credit: {
42
+ creditDebitType: "credit",
43
+ code: "mex_credit",
44
+ },
45
+ col_debit: {
46
+ creditDebitType: "debit",
47
+ code: "col_debit",
48
+ },
49
+ col_credit: {
50
+ creditDebitType: "credit",
51
+ code: "col_credit",
52
+ },
53
+ misc_debit: {
54
+ creditDebitType: "debit",
55
+ code: "misc_debit",
56
+ },
57
+ misc_credit: {
58
+ creditDebitType: "credit",
59
+ code: "misc_credit",
60
+ },
61
+ internal_credit: {
62
+ creditDebitType: "credit",
63
+ code: "internal_credit",
64
+ },
65
+ internal_debit: {
66
+ creditDebitType: "debit",
67
+ code: "internal_debit",
68
+ },
69
+ r2p_credit: {
70
+ creditDebitType: "credit",
71
+ code: "r2p_credit",
72
+ },
73
+ cbmm_debit: {
74
+ creditDebitType: "debit",
75
+ code: "cbmm_debit",
76
+ },
77
+ cbmm_credit: {
78
+ creditDebitType: "credit",
79
+ code: "cbmm_credit",
80
+ },
81
+ dd_credit: {
82
+ creditDebitType: "credit",
83
+ code: "dd_credit",
84
+ },
85
+ col_cb_credit: {
86
+ creditDebitType: "credit",
87
+ code: "col_cb_credit",
88
+ },
89
+ col_cb_debit: {
90
+ creditDebitType: "debit",
91
+ code: "col_cb_debit",
92
+ },
93
+ breb_credit: {
94
+ creditDebitType: "credit",
95
+ code: "breb_credit",
96
+ },
97
+ breb_debit: {
98
+ creditDebitType: "debit",
99
+ code: "breb_debit",
100
+ },
101
+ r2p_breb_credit: {
102
+ creditDebitType: "credit",
103
+ code: "r2p_breb_credit",
104
+ },
105
+ breb_rejected: {
106
+ creditDebitType: "credit",
107
+ code: "breb_rejected",
108
+ },
109
+ col_top_up_credit: {
110
+ creditDebitType: "credit",
111
+ code: "col_top_up_credit",
112
+ },
113
+ global_debit: {
114
+ creditDebitType: "debit",
115
+ code: "global_debit",
116
+ },
117
+ global_credit: {
118
+ creditDebitType: "credit",
119
+ code: "global_credit",
120
+ },
121
+ r2p_spei_credit: {
122
+ creditDebitType: "credit",
123
+ code: "r2p_spei_credit",
124
+ },
125
+ transfer_credit: {
126
+ creditDebitType: "credit",
127
+ code: "transfer_credit",
128
+ },
129
+ fedwire_debit: {
130
+ creditDebitType: "debit",
131
+ code: "fedwire_debit",
132
+ },
133
+ fedwire_credit: {
134
+ creditDebitType: "credit",
135
+ code: "fedwire_credit",
136
+ },
137
+ reward_credit: {
138
+ creditDebitType: "credit",
139
+ code: "reward_credit",
140
+ },
141
+ global_pay_to_usa_debit: {
142
+ creditDebitType: "debit",
143
+ code: "global_pay_to_usa_debit",
144
+ },
145
+ global_pay_to_usa_credit: {
146
+ creditDebitType: "credit",
147
+ code: "global_pay_to_usa_credit",
148
+ },
149
+ usa_pay_to_global_debit: {
150
+ creditDebitType: "debit",
151
+ code: "usa_pay_to_global_debit",
152
+ },
153
+ usa_pay_to_global_credit: {
154
+ creditDebitType: "credit",
155
+ code: "usa_pay_to_global_credit",
156
+ },
157
+ onramp_credit: {
158
+ creditDebitType: "credit",
159
+ code: "onramp_credit",
160
+ },
161
+ offramp_debit: {
162
+ creditDebitType: "debit",
163
+ code: "offramp_debit",
164
+ },
165
+ stable_payout_debit: {
166
+ creditDebitType: "debit",
167
+ code: "stable_payout_debit",
168
+ },
169
+ stable_payout_credit: {
170
+ creditDebitType: "credit",
171
+ code: "stable_payout_credit",
172
+ },
173
+ global_pay_to_generic_debit: {
174
+ creditDebitType: "debit",
175
+ code: "global_pay_to_generic_debit",
176
+ },
177
+ global_pay_to_generic_credit: {
178
+ creditDebitType: "credit",
179
+ code: "global_pay_to_generic_credit",
180
+ },
181
+ };
182
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../src/transactions/types/catalog.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,48 @@
1
+ {
2
+ "transactionTypes": {
3
+ "spei_debit": "Debit via SPEI",
4
+ "spei_credit": "Credit via SPEI",
5
+ "spei_return": "Refund via SPEI",
6
+ "spei_rejected": "SPEI Rejected",
7
+ "internal_spei_debit": "Internal debit through SPEI",
8
+ "internal_spei_credit": "Internal credit through SPEI",
9
+ "adjustment_credit": "Credit adjustment",
10
+ "adjustment_debit": "Debit adjustment",
11
+ "mex_debit": "Debit in Mexico",
12
+ "mex_credit": "Credit in Mexico",
13
+ "col_debit": "Debit in Colombia",
14
+ "col_credit": "Credit in Colombia",
15
+ "misc_debit": "Debit",
16
+ "misc_credit": "Credit",
17
+ "internal_credit": "Internal credit",
18
+ "internal_debit": "Internal debit",
19
+ "r2p_credit": "R2P Credit",
20
+ "cbmm_debit": "Debit Cross Border",
21
+ "cbmm_credit": "Credit Cross Border",
22
+ "dd_credit": "Direct Debit Credit",
23
+ "col_cb_credit": "Cobre Balance Credit in Colombia",
24
+ "col_cb_debit": "Cobre Balance Debit in Colombia",
25
+ "breb_credit": "Credit by Bre-B",
26
+ "breb_debit": "Debit by Bre-B",
27
+ "r2p_breb_credit": "R2P Credit by Bre-B",
28
+ "breb_rejected": "Bre-B Rejected",
29
+ "col_top_up_credit": "Cobre Balance Top-up in Colombia",
30
+ "global_debit": "Global Debit",
31
+ "global_credit": "Global Credit",
32
+ "r2p_spei_credit": "R2P Credit SPEI",
33
+ "transfer_credit": "Transfer Credit",
34
+ "fedwire_debit": "Fedwire Debit",
35
+ "fedwire_credit": "Fedwire Credit",
36
+ "reward_credit": "Rewards credit",
37
+ "global_pay_to_usa_debit": "Global account debit",
38
+ "global_pay_to_usa_credit": "FBO account credit",
39
+ "usa_pay_to_global_debit": "FBO account debit",
40
+ "usa_pay_to_global_credit": "Global account credit",
41
+ "onramp_credit": "Onramp Credit",
42
+ "offramp_debit": "Offramp Debit",
43
+ "stable_payout_debit": "Debit Stable Payout",
44
+ "stable_payout_credit": "Stable Payout Credit",
45
+ "global_pay_to_generic_debit": "Global Debit to International Counterparty",
46
+ "global_pay_to_generic_credit": "Global Credit to International Counterparty"
47
+ }
48
+ }
@@ -0,0 +1,48 @@
1
+ {
2
+ "transactionTypes": {
3
+ "spei_debit": "Débito a través de SPEI",
4
+ "spei_credit": "Crédito a través de SPEI",
5
+ "spei_return": "Reembolso a través de SPEI",
6
+ "spei_rejected": "Retorno de SPEI",
7
+ "internal_spei_debit": "Débito interno a través de SPEI",
8
+ "internal_spei_credit": "Crédito interno a través de SPEI",
9
+ "adjustment_credit": "Ajuste de crédito",
10
+ "adjustment_debit": "Ajuste de débito",
11
+ "mex_debit": "Débito en México",
12
+ "mex_credit": "Crédito en México",
13
+ "col_debit": "Débito en Colombia",
14
+ "col_credit": "Crédito en Colombia",
15
+ "misc_debit": "Débito",
16
+ "misc_credit": "Crédito",
17
+ "internal_credit": "Crédito Interno",
18
+ "internal_debit": "Débito Interno",
19
+ "r2p_credit": "Crédito por recaudo",
20
+ "cbmm_debit": "Débito Internacional",
21
+ "cbmm_credit": "Crédito Internacional",
22
+ "dd_credit": "Crédito Débito a cuenta",
23
+ "col_cb_credit": "Crédito Cobre Balance",
24
+ "col_cb_debit": "Débito Cobre Balance",
25
+ "breb_credit": "Crédito a través de Bre-B",
26
+ "breb_debit": "Débito a través de Bre-B",
27
+ "r2p_breb_credit": "Crédito por recaudo Bre-B",
28
+ "breb_rejected": "Retorno de Bre-B",
29
+ "col_top_up_credit": "Recarga Cobre Balance",
30
+ "global_debit": "Débito Global",
31
+ "global_credit": "Crédito Global",
32
+ "r2p_spei_credit": "Crédito por recaudo SPEI",
33
+ "transfer_credit": "Crédito de transferencia",
34
+ "fedwire_debit": "Débito Fedwire",
35
+ "fedwire_credit": "Crédito Fedwire",
36
+ "reward_credit": "Crédito por recompensa",
37
+ "global_pay_to_usa_debit": "Débito cuenta global",
38
+ "global_pay_to_usa_credit": "Crédito cuenta FBO",
39
+ "usa_pay_to_global_debit": "Débito cuenta FBO",
40
+ "usa_pay_to_global_credit": "Crédito cuenta global",
41
+ "onramp_credit": "Crédito onramp",
42
+ "offramp_debit": "Débito offramp",
43
+ "stable_payout_debit": "Débito Stable Payout",
44
+ "stable_payout_credit": "Crédito Stable Payout",
45
+ "global_pay_to_generic_debit": "Débito Global a contraparte internacional",
46
+ "global_pay_to_generic_credit": "Retorno global de contraparte internacional"
47
+ }
48
+ }
@@ -0,0 +1,18 @@
1
+ import type { TransactionType, TransactionTypeRecord } from "../catalog";
2
+ import type { Locale } from "../../../lang";
3
+ import type { CatalogQuery } from "../../../utils/catalog-query.utils";
4
+ export type TransactionTypeOption = TransactionTypeRecord & {
5
+ label: string;
6
+ };
7
+ /**
8
+ * The catalog indexed by code (same shape as TRANSACTION_TYPES), each record enriched
9
+ * with its label for the given language. Access by code directly, or Object.values for a list.
10
+ */
11
+ export declare const getTransactionTypes: (lang: Locale) => Record<TransactionType, TransactionTypeOption>;
12
+ /** i18n domain: `lang` is required, inside the query object — see matchesQuery for the matching rules. */
13
+ export type TransactionTypeQuery = CatalogQuery<TransactionTypeRecord> & {
14
+ lang: Locale;
15
+ };
16
+ /** The catalog as a list narrowed by the query, each record enriched with its label for `query.lang`. */
17
+ export declare const queryTransactionTypes: (query: TransactionTypeQuery) => TransactionTypeOption[];
18
+ //# sourceMappingURL=transaction-type.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction-type.utils.d.ts","sourceRoot":"","sources":["../../../../src/transactions/types/utils/transaction-type.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAGxE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AAItE,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7E;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,KAAG,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAS/F,CAAA;AAED,0GAA0G;AAC1G,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC,qBAAqB,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEzF,yGAAyG;AACzG,eAAO,MAAM,qBAAqB,GAAI,OAAO,oBAAoB,KAAG,qBAAqB,EAMxF,CAAA"}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.queryTransactionTypes = exports.getTransactionTypes = void 0;
7
+ const catalog_1 = require("../catalog");
8
+ const en_json_1 = __importDefault(require("../locales/en.json"));
9
+ const es_mex_json_1 = __importDefault(require("../locales/es-mex.json"));
10
+ const catalog_query_utils_1 = require("../../../utils/catalog-query.utils");
11
+ const locales = { en: en_json_1.default, "es-mex": es_mex_json_1.default };
12
+ /**
13
+ * The catalog indexed by code (same shape as TRANSACTION_TYPES), each record enriched
14
+ * with its label for the given language. Access by code directly, or Object.values for a list.
15
+ */
16
+ const getTransactionTypes = (lang) => {
17
+ const locale = locales[lang];
18
+ const result = {};
19
+ for (const record of Object.values(catalog_1.TRANSACTION_TYPES)) {
20
+ result[record.code] = { ...record, label: locale.transactionTypes[record.code] };
21
+ }
22
+ return result;
23
+ };
24
+ exports.getTransactionTypes = getTransactionTypes;
25
+ /** The catalog as a list narrowed by the query, each record enriched with its label for `query.lang`. */
26
+ const queryTransactionTypes = (query) => {
27
+ const { lang, ...filters } = query;
28
+ return Object.values(catalog_1.TRANSACTION_TYPES)
29
+ .filter(record => (0, catalog_query_utils_1.matchesQuery)(record, filters))
30
+ .map(record => ({ ...record, label: locales[lang].transactionTypes[record.code] }));
31
+ };
32
+ exports.queryTransactionTypes = queryTransactionTypes;
33
+ //# sourceMappingURL=transaction-type.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"transaction-type.utils.js","sourceRoot":"","sources":["../../../../src/transactions/types/utils/transaction-type.utils.ts"],"names":[],"mappings":";;;;;;AAAA,wCAA8C;AAE9C,iEAAyC;AACzC,yEAAgD;AAEhD,4EAAiE;AAGjE,MAAM,OAAO,GAAuC,EAAE,EAAE,EAAE,iBAAQ,EAAE,QAAQ,EAAE,qBAAW,EAAE,CAAA;AAI3F;;;GAGG;AACI,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAkD,EAAE;IAClG,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,MAAM,MAAM,GAAG,EAAoD,CAAA;IAEnE,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,2BAAiB,CAAC,EAAE,CAAC;QACtD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAA;IAClF,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AATY,QAAA,mBAAmB,uBAS/B;AAKD,yGAAyG;AAClG,MAAM,qBAAqB,GAAG,CAAC,KAA2B,EAA2B,EAAE;IAC5F,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,GAAG,KAAK,CAAA;IAElC,OAAO,MAAM,CAAC,MAAM,CAAC,2BAAiB,CAAC;SACpC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAA,kCAAY,EAAC,MAAM,EAAE,OAAO,CAAC,CAAC;SAC/C,GAAG,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC,gBAAgB,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAA;AACvF,CAAC,CAAA;AANY,QAAA,qBAAqB,yBAMjC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobre-npm/library-portal-core",
3
- "version": "0.28.0",
3
+ "version": "0.30.0",
4
4
  "description": "Shared configurations and resources for Portal MFEs",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -29,6 +29,10 @@
29
29
  "types": "./dist/movements/index.d.ts",
30
30
  "default": "./dist/movements/index.js"
31
31
  },
32
+ "./subclients": {
33
+ "types": "./dist/subclients/index.d.ts",
34
+ "default": "./dist/subclients/index.js"
35
+ },
32
36
  "./documentTypes": {
33
37
  "types": "./dist/documentTypes/index.d.ts",
34
38
  "default": "./dist/documentTypes/index.js"