@cobre-npm/library-portal-core 0.20.0 → 0.22.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/README.md +339 -0
- package/dist/accounts/index.d.ts +9 -0
- package/dist/accounts/index.d.ts.map +1 -0
- package/dist/accounts/index.js +23 -0
- package/dist/accounts/index.js.map +1 -0
- package/dist/accounts/interfaces/mappers.interface.d.ts +20 -0
- package/dist/accounts/interfaces/mappers.interface.d.ts.map +1 -0
- package/dist/accounts/interfaces/mappers.interface.js +3 -0
- package/dist/accounts/interfaces/mappers.interface.js.map +1 -0
- package/dist/accounts/interfaces/params.interface.d.ts +24 -0
- package/dist/accounts/interfaces/params.interface.d.ts.map +1 -0
- package/dist/accounts/interfaces/params.interface.js +3 -0
- package/dist/accounts/interfaces/params.interface.js.map +1 -0
- package/dist/accounts/interfaces/request.interface.d.ts +29 -0
- package/dist/accounts/interfaces/request.interface.d.ts.map +1 -0
- package/dist/accounts/interfaces/request.interface.js +3 -0
- package/dist/accounts/interfaces/request.interface.js.map +1 -0
- package/dist/accounts/interfaces/response.interface.d.ts +53 -0
- package/dist/accounts/interfaces/response.interface.d.ts.map +1 -0
- package/dist/accounts/interfaces/response.interface.js +3 -0
- package/dist/accounts/interfaces/response.interface.js.map +1 -0
- package/dist/accounts/providers/catalog.d.ts +29 -0
- package/dist/accounts/providers/catalog.d.ts.map +1 -0
- package/dist/accounts/providers/catalog.js +14 -0
- package/dist/accounts/providers/catalog.js.map +1 -0
- package/dist/accounts/providers/utils/account-provider.utils.d.ts +3 -0
- package/dist/accounts/providers/utils/account-provider.utils.d.ts.map +1 -0
- package/dist/accounts/providers/utils/account-provider.utils.js +7 -0
- package/dist/accounts/providers/utils/account-provider.utils.js.map +1 -0
- package/dist/accounts/types/catalog.d.ts +30 -0
- package/dist/accounts/types/catalog.d.ts.map +1 -0
- package/dist/accounts/types/catalog.js +12 -0
- package/dist/accounts/types/catalog.js.map +1 -0
- package/dist/accounts/types/locales/en.json +11 -0
- package/dist/accounts/types/locales/es-mex.json +11 -0
- package/dist/accounts/types/utils/account-type.utils.d.ts +11 -0
- package/dist/accounts/types/utils/account-type.utils.d.ts.map +1 -0
- package/dist/accounts/types/utils/account-type.utils.js +24 -0
- package/dist/accounts/types/utils/account-type.utils.js.map +1 -0
- package/dist/constants/accountProviders/account-providers.constants.d.ts +2 -0
- package/dist/constants/accountProviders/account-providers.constants.d.ts.map +1 -1
- package/dist/constants/accountProviders/account-providers.constants.js +1 -0
- package/dist/constants/accountProviders/account-providers.constants.js.map +1 -1
- package/dist/constants/accountTypes/account-types.constants.d.ts +3 -0
- package/dist/constants/accountTypes/account-types.constants.d.ts.map +1 -1
- package/dist/constants/accountTypes/account-types.constants.js +2 -0
- package/dist/constants/accountTypes/account-types.constants.js.map +1 -1
- package/dist/constants/accountTypes/account-types.filters.d.ts +1 -0
- package/dist/constants/accountTypes/account-types.filters.d.ts.map +1 -1
- package/dist/constants/accountTypes/account-types.filters.js +1 -0
- package/dist/constants/accountTypes/account-types.filters.js.map +1 -1
- package/dist/constants/accountTypes/account-types.labels.d.ts +2 -0
- package/dist/constants/accountTypes/account-types.labels.d.ts.map +1 -1
- package/dist/constants/accountTypes/account-types.labels.js +2 -0
- package/dist/constants/accountTypes/account-types.labels.js.map +1 -1
- package/dist/constants/counterpartyTypes/counterparty-types.constants.d.ts +4 -0
- package/dist/constants/counterpartyTypes/counterparty-types.constants.d.ts.map +1 -1
- package/dist/constants/counterpartyTypes/counterparty-types.constants.js +2 -0
- package/dist/constants/counterpartyTypes/counterparty-types.constants.js.map +1 -1
- package/dist/constants/counterpartyTypes/counterparty-types.filters.d.ts +1 -0
- package/dist/constants/counterpartyTypes/counterparty-types.filters.d.ts.map +1 -1
- package/dist/constants/counterpartyTypes/counterparty-types.filters.js +1 -0
- package/dist/constants/counterpartyTypes/counterparty-types.filters.js.map +1 -1
- package/dist/constants/counterpartyTypes/counterparty-types.labels.d.ts +2 -0
- package/dist/constants/counterpartyTypes/counterparty-types.labels.d.ts.map +1 -1
- package/dist/constants/counterpartyTypes/counterparty-types.labels.js +2 -0
- package/dist/constants/counterpartyTypes/counterparty-types.labels.js.map +1 -1
- package/dist/constants/countries/countries.constants.d.ts +2 -0
- package/dist/constants/countries/countries.constants.d.ts.map +1 -1
- package/dist/constants/countries/countries.constants.js +1 -0
- package/dist/constants/countries/countries.constants.js.map +1 -1
- package/dist/constants/countries/countries.data.d.ts +2 -0
- package/dist/constants/countries/countries.data.d.ts.map +1 -1
- package/dist/constants/countries/countries.data.js +1 -0
- package/dist/constants/countries/countries.data.js.map +1 -1
- package/dist/constants/countries/countries.labels.d.ts +3 -0
- package/dist/constants/countries/countries.labels.d.ts.map +1 -1
- package/dist/constants/countries/countries.labels.js +2 -0
- package/dist/constants/countries/countries.labels.js.map +1 -1
- package/dist/constants/countriesISO/countries-iso.constants.d.ts +2 -0
- package/dist/constants/countriesISO/countries-iso.constants.d.ts.map +1 -1
- package/dist/constants/countriesISO/countries-iso.constants.js +1 -0
- package/dist/constants/countriesISO/countries-iso.constants.js.map +1 -1
- package/dist/constants/countriesISO/countries-iso.data.d.ts +2 -0
- package/dist/constants/countriesISO/countries-iso.data.d.ts.map +1 -1
- package/dist/constants/countriesISO/countries-iso.data.js +1 -0
- package/dist/constants/countriesISO/countries-iso.data.js.map +1 -1
- package/dist/constants/countriesISO/countries-iso.filters.d.ts +3 -0
- package/dist/constants/countriesISO/countries-iso.filters.d.ts.map +1 -1
- package/dist/constants/countriesISO/countries-iso.filters.js +3 -0
- package/dist/constants/countriesISO/countries-iso.filters.js.map +1 -1
- package/dist/constants/countriesISO/countries-iso.labels.d.ts +5 -0
- package/dist/constants/countriesISO/countries-iso.labels.d.ts.map +1 -1
- package/dist/constants/countriesISO/countries-iso.labels.js +3 -0
- package/dist/constants/countriesISO/countries-iso.labels.js.map +1 -1
- package/dist/constants/currencies/currencies.constants.d.ts +2 -0
- package/dist/constants/currencies/currencies.constants.d.ts.map +1 -1
- package/dist/constants/currencies/currencies.constants.js +1 -0
- package/dist/constants/currencies/currencies.constants.js.map +1 -1
- package/dist/constants/currencies/currencies.data.d.ts +3 -0
- package/dist/constants/currencies/currencies.data.d.ts.map +1 -1
- package/dist/constants/currencies/currencies.data.js +1 -0
- package/dist/constants/currencies/currencies.data.js.map +1 -1
- package/dist/constants/currencies/currencies.filters.d.ts +6 -0
- package/dist/constants/currencies/currencies.filters.d.ts.map +1 -1
- package/dist/constants/currencies/currencies.filters.js +6 -0
- package/dist/constants/currencies/currencies.filters.js.map +1 -1
- package/dist/constants/currencies/currencies.labels.d.ts +1 -0
- package/dist/constants/currencies/currencies.labels.d.ts.map +1 -1
- package/dist/constants/currencies/currencies.labels.js +1 -0
- package/dist/constants/currencies/currencies.labels.js.map +1 -1
- package/dist/constants/documentTypes/document-types.constants.d.ts +6 -0
- package/dist/constants/documentTypes/document-types.constants.d.ts.map +1 -1
- package/dist/constants/documentTypes/document-types.constants.js +3 -0
- package/dist/constants/documentTypes/document-types.constants.js.map +1 -1
- package/dist/constants/documentTypes/document-types.data.d.ts +4 -0
- package/dist/constants/documentTypes/document-types.data.d.ts.map +1 -1
- package/dist/constants/documentTypes/document-types.data.js +1 -0
- package/dist/constants/documentTypes/document-types.data.js.map +1 -1
- package/dist/constants/documentTypes/document-types.filters.d.ts +6 -0
- package/dist/constants/documentTypes/document-types.filters.d.ts.map +1 -1
- package/dist/constants/documentTypes/document-types.filters.js +5 -0
- package/dist/constants/documentTypes/document-types.filters.js.map +1 -1
- package/dist/constants/documentTypes/document-types.labels.d.ts +5 -0
- package/dist/constants/documentTypes/document-types.labels.d.ts.map +1 -1
- package/dist/constants/documentTypes/document-types.labels.js +2 -0
- package/dist/constants/documentTypes/document-types.labels.js.map +1 -1
- package/dist/constants/documentTypes/document-types.validations.d.ts +2 -0
- package/dist/constants/documentTypes/document-types.validations.d.ts.map +1 -1
- package/dist/constants/documentTypes/document-types.validations.js +1 -0
- package/dist/constants/documentTypes/document-types.validations.js.map +1 -1
- package/dist/constants/lang.d.ts +2 -0
- package/dist/constants/lang.d.ts.map +1 -1
- package/dist/constants/lang.js +2 -0
- package/dist/constants/lang.js.map +1 -1
- package/dist/constants/mmTypes/mm-types.constants.d.ts +2 -0
- package/dist/constants/mmTypes/mm-types.constants.d.ts.map +1 -1
- package/dist/constants/mmTypes/mm-types.constants.js +1 -0
- package/dist/constants/mmTypes/mm-types.constants.js.map +1 -1
- package/dist/constants/mmTypes/mm-types.labels.d.ts +2 -0
- package/dist/constants/mmTypes/mm-types.labels.d.ts.map +1 -1
- package/dist/constants/mmTypes/mm-types.labels.js +2 -0
- package/dist/constants/mmTypes/mm-types.labels.js.map +1 -1
- package/dist/constants/movementStatus/movement-status.constants.d.ts +2 -0
- package/dist/constants/movementStatus/movement-status.constants.d.ts.map +1 -1
- package/dist/constants/movementStatus/movement-status.constants.js +1 -0
- package/dist/constants/movementStatus/movement-status.constants.js.map +1 -1
- package/dist/counterparties/index.d.ts +7 -0
- package/dist/counterparties/index.d.ts.map +1 -0
- package/dist/counterparties/index.js +22 -0
- package/dist/counterparties/index.js.map +1 -0
- package/dist/counterparties/interfaces/mappers.interface.d.ts +19 -0
- package/dist/counterparties/interfaces/mappers.interface.d.ts.map +1 -0
- package/dist/counterparties/interfaces/mappers.interface.js +3 -0
- package/dist/counterparties/interfaces/mappers.interface.js.map +1 -0
- package/dist/counterparties/interfaces/params.interface.d.ts +11 -0
- package/dist/counterparties/interfaces/params.interface.d.ts.map +1 -0
- package/dist/counterparties/interfaces/params.interface.js +3 -0
- package/dist/counterparties/interfaces/params.interface.js.map +1 -0
- package/dist/counterparties/interfaces/request.interface.d.ts +35 -0
- package/dist/counterparties/interfaces/request.interface.d.ts.map +1 -0
- package/dist/counterparties/interfaces/request.interface.js +3 -0
- package/dist/counterparties/interfaces/request.interface.js.map +1 -0
- package/dist/counterparties/interfaces/response.interface.d.ts +92 -0
- package/dist/counterparties/interfaces/response.interface.d.ts.map +1 -0
- package/dist/counterparties/interfaces/response.interface.js +11 -0
- package/dist/counterparties/interfaces/response.interface.js.map +1 -0
- package/dist/counterparties/types/catalog.d.ts +83 -0
- package/dist/counterparties/types/catalog.d.ts.map +1 -0
- package/dist/counterparties/types/catalog.js +25 -0
- package/dist/counterparties/types/catalog.js.map +1 -0
- package/dist/counterparties/types/locales/en.json +23 -0
- package/dist/counterparties/types/locales/es-mex.json +23 -0
- package/dist/counterparties/types/utils/counterparty-type.utils.d.ts +7 -0
- package/dist/counterparties/types/utils/counterparty-type.utils.d.ts.map +1 -0
- package/dist/counterparties/types/utils/counterparty-type.utils.js +20 -0
- package/dist/counterparties/types/utils/counterparty-type.utils.js.map +1 -0
- package/dist/countries/base/catalog.d.ts +26 -0
- package/dist/countries/base/catalog.d.ts.map +1 -0
- package/dist/countries/base/catalog.js +13 -0
- package/dist/countries/base/catalog.js.map +1 -0
- package/dist/countries/base/locales/en.json +11 -0
- package/dist/countries/base/locales/es-mex.json +11 -0
- package/dist/countries/base/utils/country.utils.d.ts +7 -0
- package/dist/countries/base/utils/country.utils.d.ts.map +1 -0
- package/dist/countries/base/utils/country.utils.js +20 -0
- package/dist/countries/base/utils/country.utils.js.map +1 -0
- package/dist/countries/index.d.ts +5 -0
- package/dist/countries/index.d.ts.map +1 -0
- package/dist/countries/index.js +19 -0
- package/dist/countries/index.js.map +1 -0
- package/dist/countries/iso/catalog.d.ts +1250 -0
- package/dist/countries/iso/catalog.d.ts.map +1 -0
- package/dist/countries/iso/catalog.js +255 -0
- package/dist/countries/iso/catalog.js.map +1 -0
- package/dist/countries/iso/locales/en.json +253 -0
- package/dist/countries/iso/locales/es-mex.json +253 -0
- package/dist/countries/iso/utils/country-iso.utils.d.ts +16 -0
- package/dist/countries/iso/utils/country-iso.utils.d.ts.map +1 -0
- package/dist/countries/iso/utils/country-iso.utils.js +34 -0
- package/dist/countries/iso/utils/country-iso.utils.js.map +1 -0
- package/dist/currencies/catalog.d.ts.map +1 -1
- package/dist/currencies/catalog.js +7 -8
- package/dist/currencies/catalog.js.map +1 -1
- package/dist/currencies/index.d.ts +1 -1
- package/dist/currencies/index.d.ts.map +1 -1
- package/dist/currencies/index.js +0 -1
- package/dist/currencies/index.js.map +1 -1
- package/dist/currencies/utils/currency.utils.d.ts +2 -3
- package/dist/currencies/utils/currency.utils.d.ts.map +1 -1
- package/dist/currencies/utils/currency.utils.js +5 -4
- package/dist/currencies/utils/currency.utils.js.map +1 -1
- package/dist/documentTypes/catalog.d.ts +129 -0
- package/dist/documentTypes/catalog.d.ts.map +1 -0
- package/dist/documentTypes/catalog.js +58 -0
- package/dist/documentTypes/catalog.js.map +1 -0
- package/dist/documentTypes/index.d.ts +3 -0
- package/dist/documentTypes/index.d.ts.map +1 -0
- package/dist/documentTypes/index.js +18 -0
- package/dist/documentTypes/index.js.map +1 -0
- package/dist/documentTypes/locales/en.json +18 -0
- package/dist/documentTypes/locales/es-mex.json +18 -0
- package/dist/documentTypes/utils/document-type.utils.d.ts +20 -0
- package/dist/documentTypes/utils/document-type.utils.d.ts.map +1 -0
- package/dist/documentTypes/utils/document-type.utils.js +37 -0
- package/dist/documentTypes/utils/document-type.utils.js.map +1 -0
- package/dist/interfaces/accounts/mappers.interface.d.ts +2 -0
- package/dist/interfaces/accounts/mappers.interface.d.ts.map +1 -1
- package/dist/interfaces/accounts/params.interface.d.ts +1 -0
- package/dist/interfaces/accounts/params.interface.d.ts.map +1 -1
- package/dist/interfaces/accounts/request.interface.d.ts +2 -0
- package/dist/interfaces/accounts/request.interface.d.ts.map +1 -1
- package/dist/interfaces/accounts/response.interface.d.ts +8 -0
- package/dist/interfaces/accounts/response.interface.d.ts.map +1 -1
- package/dist/interfaces/counterparties/mappers.interface.d.ts +2 -0
- package/dist/interfaces/counterparties/mappers.interface.d.ts.map +1 -1
- package/dist/interfaces/counterparties/params.interface.d.ts +1 -0
- package/dist/interfaces/counterparties/params.interface.d.ts.map +1 -1
- package/dist/interfaces/counterparties/request.interface.d.ts +2 -0
- package/dist/interfaces/counterparties/request.interface.d.ts.map +1 -1
- package/dist/interfaces/counterparties/response.interface.d.ts +7 -0
- package/dist/interfaces/counterparties/response.interface.d.ts.map +1 -1
- package/dist/interfaces/counterparties/response.interface.js +1 -0
- package/dist/interfaces/counterparties/response.interface.js.map +1 -1
- package/dist/interfaces/search/aggregations.interface.d.ts +6 -0
- package/dist/interfaces/search/aggregations.interface.d.ts.map +1 -1
- package/dist/interfaces/search/filters.interface.d.ts +5 -0
- package/dist/interfaces/search/filters.interface.d.ts.map +1 -1
- package/dist/interfaces/search/request.interface.d.ts +3 -0
- package/dist/interfaces/search/request.interface.d.ts.map +1 -1
- package/dist/interfaces/search/response.interface.d.ts +10 -0
- package/dist/interfaces/search/response.interface.d.ts.map +1 -1
- package/dist/interfaces/transactions/response.interface.d.ts +4 -0
- package/dist/interfaces/transactions/response.interface.d.ts.map +1 -1
- package/dist/lang/index.d.ts +5 -0
- package/dist/lang/index.d.ts.map +1 -0
- package/dist/lang/index.js +7 -0
- package/dist/lang/index.js.map +1 -0
- package/dist/movements/index.d.ts +5 -0
- package/dist/movements/index.d.ts.map +1 -0
- package/dist/movements/index.js +19 -0
- package/dist/movements/index.js.map +1 -0
- package/dist/movements/status/catalog.d.ts +38 -0
- package/dist/movements/status/catalog.d.ts.map +1 -0
- package/dist/movements/status/catalog.js +17 -0
- package/dist/movements/status/catalog.js.map +1 -0
- package/dist/movements/status/utils/movement-status.utils.d.ts +3 -0
- package/dist/movements/status/utils/movement-status.utils.d.ts.map +1 -0
- package/dist/movements/status/utils/movement-status.utils.js +7 -0
- package/dist/movements/status/utils/movement-status.utils.js.map +1 -0
- package/dist/movements/types/catalog.d.ts +74 -0
- package/dist/movements/types/catalog.d.ts.map +1 -0
- package/dist/movements/types/catalog.js +29 -0
- package/dist/movements/types/catalog.js.map +1 -0
- package/dist/movements/types/locales/en.json +27 -0
- package/dist/movements/types/locales/es-mex.json +27 -0
- package/dist/movements/types/utils/movement-type.utils.d.ts +7 -0
- package/dist/movements/types/utils/movement-type.utils.d.ts.map +1 -0
- package/dist/movements/types/utils/movement-type.utils.js +20 -0
- package/dist/movements/types/utils/movement-type.utils.js.map +1 -0
- package/dist/search/index.d.ts +5 -0
- package/dist/search/index.d.ts.map +1 -0
- package/dist/search/index.js +21 -0
- package/dist/search/index.js.map +1 -0
- package/dist/search/interfaces/aggregations.interface.d.ts +31 -0
- package/dist/search/interfaces/aggregations.interface.d.ts.map +1 -0
- package/dist/search/interfaces/aggregations.interface.js +3 -0
- package/dist/search/interfaces/aggregations.interface.js.map +1 -0
- package/dist/search/interfaces/filters.interface.d.ts +14 -0
- package/dist/search/interfaces/filters.interface.d.ts.map +1 -0
- package/dist/search/interfaces/filters.interface.js +3 -0
- package/dist/search/interfaces/filters.interface.js.map +1 -0
- package/dist/search/interfaces/request.interface.d.ts +15 -0
- package/dist/search/interfaces/request.interface.d.ts.map +1 -0
- package/dist/search/interfaces/request.interface.js +3 -0
- package/dist/search/interfaces/request.interface.js.map +1 -0
- package/dist/search/interfaces/response.interface.d.ts +48 -0
- package/dist/search/interfaces/response.interface.d.ts.map +1 -0
- package/dist/search/interfaces/response.interface.js +3 -0
- package/dist/search/interfaces/response.interface.js.map +1 -0
- package/dist/transactions/index.d.ts +2 -0
- package/dist/transactions/index.d.ts.map +1 -0
- package/dist/transactions/index.js +18 -0
- package/dist/transactions/index.js.map +1 -0
- package/dist/transactions/interfaces/response.interface.d.ts +49 -0
- package/dist/transactions/interfaces/response.interface.d.ts.map +1 -0
- package/dist/transactions/interfaces/response.interface.js +3 -0
- package/dist/transactions/interfaces/response.interface.js.map +1 -0
- package/package.json +33 -1
package/README.md
ADDED
|
@@ -0,0 +1,339 @@
|
|
|
1
|
+
# @cobre-npm/library-portal-core
|
|
2
|
+
|
|
3
|
+
Shared catalogs, configuration and interfaces for Cobre's Portal MFEs (Vue 3 + TS).
|
|
4
|
+
It is a **static data** library (no app runtime): account types, counterparties, countries, currencies,
|
|
5
|
+
movement types, document types, etc., together with their translated labels.
|
|
6
|
+
|
|
7
|
+
- No runtime dependencies (only `devDependencies`).
|
|
8
|
+
- Published compiled to `dist/` (CommonJS + `.d.ts`).
|
|
9
|
+
- Managed with **pnpm**; built with plain `tsc`.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Table of contents
|
|
14
|
+
|
|
15
|
+
- [Install & import (subpaths)](#install--import-subpaths)
|
|
16
|
+
- [Architecture: screaming architecture](#architecture-screaming-architecture)
|
|
17
|
+
- [The consumption model (the "shape A")](#the-consumption-model-the-shape-a)
|
|
18
|
+
- [Domains and their API](#domains-and-their-api)
|
|
19
|
+
- [i18n / languages](#i18n--languages)
|
|
20
|
+
- [Legacy code (`.`) and its deprecation](#legacy-code--and-its-deprecation)
|
|
21
|
+
- [Development](#development)
|
|
22
|
+
|
|
23
|
+
---
|
|
24
|
+
|
|
25
|
+
## Install & import (subpaths)
|
|
26
|
+
|
|
27
|
+
Each domain is exposed as its own **package subpath**. Always import from the domain's subpath,
|
|
28
|
+
not from the root:
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
import { getAccountTypes } from "@cobre-npm/library-portal-core/accounts"
|
|
32
|
+
import { getCurrencies } from "@cobre-npm/library-portal-core/currencies"
|
|
33
|
+
import { getCountries } from "@cobre-npm/library-portal-core/countries"
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
| Subpath | Contents |
|
|
37
|
+
|---|---|
|
|
38
|
+
| `@cobre-npm/library-portal-core/accounts` | Account providers and types + `Account` interfaces |
|
|
39
|
+
| `@cobre-npm/library-portal-core/counterparties` | Counterparty types + `Counterparty` interfaces |
|
|
40
|
+
| `@cobre-npm/library-portal-core/countries` | Countries (base) and ISO countries (dialing codes, etc.) |
|
|
41
|
+
| `@cobre-npm/library-portal-core/movements` | Movement types and statuses |
|
|
42
|
+
| `@cobre-npm/library-portal-core/documentTypes` | Document types (definition + per-country applicability) |
|
|
43
|
+
| `@cobre-npm/library-portal-core/currencies` | Currencies |
|
|
44
|
+
| `@cobre-npm/library-portal-core/transactions` | Transaction interfaces |
|
|
45
|
+
| `@cobre-npm/library-portal-core/search` | Search / aggregation interfaces |
|
|
46
|
+
| `@cobre-npm/library-portal-core/lang` | Supported locales (`Locale`, defaults) |
|
|
47
|
+
| `@cobre-npm/library-portal-core` (root) | ⚠️ **Legacy / deprecated** — see [below](#legacy-code--and-its-deprecation) |
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Architecture: screaming architecture
|
|
52
|
+
|
|
53
|
+
Each domain is a **self-contained folder** whose name screams the domain (not the file type). The reference
|
|
54
|
+
pattern is a folder with:
|
|
55
|
+
|
|
56
|
+
```
|
|
57
|
+
src/<domain>/
|
|
58
|
+
catalog.ts # source of truth: object keyed by code + derived types
|
|
59
|
+
utils/<x>.utils.ts # the domain's public API (functions)
|
|
60
|
+
locales/{en,es-mex}.json # translations (only when the label is i18n)
|
|
61
|
+
index.ts # barrel: exposes ONLY the public API
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
When a domain groups several catalogs, each one lives in its **subfolder** (e.g. `accounts/providers/` and
|
|
65
|
+
`accounts/types/`), and the entity interfaces in `<domain>/interfaces/`.
|
|
66
|
+
|
|
67
|
+
### The source of truth: `catalog.ts`
|
|
68
|
+
|
|
69
|
+
The catalog is an **`as const` object keyed by code** (not an array), and the types are **derived** from it:
|
|
70
|
+
|
|
71
|
+
```ts
|
|
72
|
+
// countries/base/catalog.ts
|
|
73
|
+
export const COUNTRIES = {
|
|
74
|
+
col: { code: "col" },
|
|
75
|
+
mex: { code: "mex" },
|
|
76
|
+
// ...
|
|
77
|
+
} as const
|
|
78
|
+
|
|
79
|
+
export type Country = keyof typeof COUNTRIES // "col" | "mex" | ...
|
|
80
|
+
export type CountryRecord = (typeof COUNTRIES)[Country]
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Keying by code gives direct `CATALOG[code]` access without `.find()`, and the types never drift from the data.
|
|
84
|
+
|
|
85
|
+
---
|
|
86
|
+
|
|
87
|
+
## The consumption model (the "shape A")
|
|
88
|
+
|
|
89
|
+
The mental rule is: **the library behaves like an API that returns the source of truth ready to consume.**
|
|
90
|
+
|
|
91
|
+
Each domain exposes **one `getX()` function** that returns the **localized catalog**: the same object keyed by
|
|
92
|
+
code, but with the `label` already included. The raw (untranslated) catalog is an **internal** detail and is not
|
|
93
|
+
exported — just like an API doesn't expose its untranslated table.
|
|
94
|
+
|
|
95
|
+
```ts
|
|
96
|
+
import { getAccountTypes } from "@cobre-npm/library-portal-core/accounts"
|
|
97
|
+
|
|
98
|
+
const types = getAccountTypes("es-mex")
|
|
99
|
+
// ^ { ch: { code: "ch", geo: ["col"], label: "Ahorros" }, cc: {...}, ... }
|
|
100
|
+
|
|
101
|
+
types.ch.label // "Ahorros" → direct access by code
|
|
102
|
+
types.ch.geo // ["col"] → all metadata comes included
|
|
103
|
+
Object.values(types) // [ {...}, {...} ] → the list, when you need it
|
|
104
|
+
```
|
|
105
|
+
|
|
106
|
+
Every use case comes out of this, without the consumer having to walk internal structures:
|
|
107
|
+
|
|
108
|
+
| I need… | How |
|
|
109
|
+
|---|---|
|
|
110
|
+
| The label of a code | `getX(lang)[code].label` |
|
|
111
|
+
| The full list (dropdown, table) | `Object.values(getX(lang))` |
|
|
112
|
+
| Filter by some property | `Object.values(getX(lang)).filter(x => …)` |
|
|
113
|
+
|
|
114
|
+
> **The library delivers the data; the consumer decides how to filter it.** There are no `getXByGeo`-style helpers:
|
|
115
|
+
> since each record already carries its metadata (`geo`, `type`, etc.), filtering is a trivial `.filter()` on the
|
|
116
|
+
> consumer side.
|
|
117
|
+
|
|
118
|
+
### Two classes of domain
|
|
119
|
+
|
|
120
|
+
| Class | When | Signature | Examples |
|
|
121
|
+
|---|---|---|---|
|
|
122
|
+
| **With i18n** | the label depends on the language | `getX(lang)` | accountTypes, counterpartyTypes, movementTypes, countries, countriesISO, documentTypes |
|
|
123
|
+
| **Without i18n** | the label is fixed (or there is none) | `getX()` | currencies (inline label), accountProviders, movementStatus |
|
|
124
|
+
|
|
125
|
+
`currencies`/`providers`/`status` **don't take `lang`** because there's no translation — the signature is honest.
|
|
126
|
+
|
|
127
|
+
### Type convention
|
|
128
|
+
|
|
129
|
+
- **`XOption`** = the catalog record **+ `label`** (what `getX(lang)` returns in i18n domains). This is the type
|
|
130
|
+
consumers use to type results.
|
|
131
|
+
- **`XRecord`** = the raw record. In non-i18n domains (currencies/providers/status) it is the result type
|
|
132
|
+
(the label is already inline); in i18n domains it is **internal** (only input to `XOption`) and is not exported.
|
|
133
|
+
- **`X`** (e.g. `AccountType`, `Currency`) = the union of codes. Always public (for typing variables/params).
|
|
134
|
+
|
|
135
|
+
---
|
|
136
|
+
|
|
137
|
+
## Domains and their API
|
|
138
|
+
|
|
139
|
+
### `accounts`
|
|
140
|
+
|
|
141
|
+
```ts
|
|
142
|
+
import {
|
|
143
|
+
getAccountTypes, getAccountProviders,
|
|
144
|
+
type AccountType, type AccountTypeOption,
|
|
145
|
+
type AccountProvider, type AccountProviderRecord,
|
|
146
|
+
type Account, type AccountResponsePaginated, /* ... interfaces */
|
|
147
|
+
} from "@cobre-npm/library-portal-core/accounts"
|
|
148
|
+
|
|
149
|
+
getAccountTypes("en") // Record<AccountType, AccountTypeOption> → { ch: { code, geo, label }, ... }
|
|
150
|
+
getAccountProviders() // Record<AccountProvider, AccountProviderRecord> (no i18n)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
- **types** (i18n): `getAccountTypes(lang)`; each record carries `code`, `geo` (`Country[]`) and `label`.
|
|
154
|
+
- **providers** (no i18n): `getAccountProviders()`.
|
|
155
|
+
- **interfaces**: `Account`, `AccountResponsePaginated`, `AccountMetadata`, `AccountConnectivity`,
|
|
156
|
+
`ParamsGetAccounts`, `CreateAccountRequest`, `UpdateAccountRequest`, `AccountDropdownMapper`, …
|
|
157
|
+
|
|
158
|
+
### `counterparties`
|
|
159
|
+
|
|
160
|
+
```ts
|
|
161
|
+
import {
|
|
162
|
+
getCounterpartyTypes,
|
|
163
|
+
type CounterpartyType, type CounterpartyTypeOption,
|
|
164
|
+
type Counterparty, CounterpartyVerificationStatus, /* ... */
|
|
165
|
+
} from "@cobre-npm/library-portal-core/counterparties"
|
|
166
|
+
|
|
167
|
+
getCounterpartyTypes("es-mex") // Record<CounterpartyType, CounterpartyTypeOption> ({ code, geo, label })
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
- **types** (i18n): `getCounterpartyTypes(lang)`.
|
|
171
|
+
- **interfaces**: `Counterparty`, `CounterpartyMetadata`, `CounterpartyBankDetails`,
|
|
172
|
+
`CounterpartyPaymentInformation`, `CounterpartyVerificationStatus` (enum), `ParamsGetCounterparties`,
|
|
173
|
+
`CreateCounterpartyRequest`, …
|
|
174
|
+
|
|
175
|
+
### `countries`
|
|
176
|
+
|
|
177
|
+
Groups two catalogs:
|
|
178
|
+
|
|
179
|
+
```ts
|
|
180
|
+
import {
|
|
181
|
+
getCountries, type Country, type CountryOption,
|
|
182
|
+
getCountriesISO, getIndicativesWithCodes, hasCountryISOFlag,
|
|
183
|
+
type CountryISO, type CountryISOOption, type IndicativeWithCode,
|
|
184
|
+
} from "@cobre-npm/library-portal-core/countries"
|
|
185
|
+
|
|
186
|
+
getCountries("en").col.label // "Colombia"
|
|
187
|
+
getCountriesISO("en").col // { code:"col", isoCode:"COL", indicative:"+57", label:"Colombia" }
|
|
188
|
+
getIndicativesWithCodes("en") // view-model for a phone dialing-code selector
|
|
189
|
+
hasCountryISOFlag("col") // true — whether a flag asset is available
|
|
190
|
+
```
|
|
191
|
+
|
|
192
|
+
- **base** (i18n): business countries (`col`, `mex`, `usa`, `global`, …).
|
|
193
|
+
- **iso** (i18n): full ISO catalog (~249 countries) with `isoCode` and `indicative`.
|
|
194
|
+
|
|
195
|
+
### `movements`
|
|
196
|
+
|
|
197
|
+
```ts
|
|
198
|
+
import {
|
|
199
|
+
getMovementTypes, type MovementType, type MovementTypeOption,
|
|
200
|
+
getMovementStatuses, type MovementStatus, type MovementStatusRecord,
|
|
201
|
+
} from "@cobre-npm/library-portal-core/movements"
|
|
202
|
+
|
|
203
|
+
getMovementTypes("en").ach.label // "ACH"
|
|
204
|
+
getMovementStatuses().completed // { code: "completed" } (no i18n)
|
|
205
|
+
```
|
|
206
|
+
|
|
207
|
+
- **types** (i18n): movement types (ACH, SPEI, R2P, …).
|
|
208
|
+
- **status** (no i18n): movement statuses (`initiated`, `processing`, `completed`, …).
|
|
209
|
+
|
|
210
|
+
### `documentTypes` — two views
|
|
211
|
+
|
|
212
|
+
It's the only domain with a **many-to-many** relationship (one document type applies in several countries with
|
|
213
|
+
different usage), so it exposes **two projections** of the same source:
|
|
214
|
+
|
|
215
|
+
```ts
|
|
216
|
+
import {
|
|
217
|
+
getDocumentTypes, getDocumentTypesByGeo,
|
|
218
|
+
type DocumentType, type DocumentTypeUsage, type DocumentTypeGeo, type DocumentTypeValidationType,
|
|
219
|
+
type DocumentTypeOption, type DocumentTypeGeoOption,
|
|
220
|
+
} from "@cobre-npm/library-portal-core/documentTypes"
|
|
221
|
+
|
|
222
|
+
// 1) By code (definition): unique list, validation, label
|
|
223
|
+
const docs = getDocumentTypes("en") // Record<DocumentType, DocumentTypeOption>
|
|
224
|
+
Object.values(docs) // unique list of documents
|
|
225
|
+
docs.nit.minLength // validation by code
|
|
226
|
+
docs.nit.label // "NIT"
|
|
227
|
+
|
|
228
|
+
// 2) Flattened by country (applicability): per-geo/usage dropdowns
|
|
229
|
+
getDocumentTypesByGeo("en") // DocumentTypeGeoOption[] → { code, ...validations, label, geo, usage }
|
|
230
|
+
.filter(d => d.geo === "col" && d.usage.includes("business"))
|
|
231
|
+
```
|
|
232
|
+
|
|
233
|
+
Why two: the **by-code** view covers "unique list / validation / label" (each code once); the
|
|
234
|
+
**flattened-by-country** view covers the onboarding dropdown ("which documents does Colombia require"), where a
|
|
235
|
+
code repeats per country. No single shape covers both cases well.
|
|
236
|
+
|
|
237
|
+
### `currencies`
|
|
238
|
+
|
|
239
|
+
```ts
|
|
240
|
+
import { getCurrencies, type Currency, type CurrencyType, type CurrencyRecord }
|
|
241
|
+
from "@cobre-npm/library-portal-core/currencies"
|
|
242
|
+
|
|
243
|
+
getCurrencies().cop // { code:"cop", label:"COP", isoCode:"COP", geo:"col", flagAsset:"col", minAmount:1, type:"fiat" }
|
|
244
|
+
Object.values(getCurrencies()).filter(c => c.type === "fiat") // the consumer filters
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
No `lang`: the `label` is fixed (a display code, the same in any language).
|
|
248
|
+
|
|
249
|
+
### `transactions` / `search`
|
|
250
|
+
|
|
251
|
+
Interfaces only (pure types):
|
|
252
|
+
|
|
253
|
+
```ts
|
|
254
|
+
import type { Transaction, EnrichedTransaction } from "@cobre-npm/library-portal-core/transactions"
|
|
255
|
+
import type { SearchRequest, SearchResponse, SearchFilter } from "@cobre-npm/library-portal-core/search"
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
---
|
|
259
|
+
|
|
260
|
+
## i18n / languages
|
|
261
|
+
|
|
262
|
+
Translations live in `locales/{en,es-mex}.json` files inside each domain (never inline in code, except
|
|
263
|
+
`currencies`, whose label is not translatable). The supported locales are typed:
|
|
264
|
+
|
|
265
|
+
```ts
|
|
266
|
+
import { type Locale, LOCALES, DEFAULT_ES_LOCALE, DEFAULT_EN_LOCALE }
|
|
267
|
+
from "@cobre-npm/library-portal-core/lang"
|
|
268
|
+
|
|
269
|
+
// LOCALES → ["en", "es-mex"]
|
|
270
|
+
// type Locale → "en" | "es-mex"
|
|
271
|
+
// DEFAULT_ES_LOCALE → "es-mex"
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
The `getX(lang)` functions take `lang: Locale` (strongly typed): passing an unsupported language is a compile-time
|
|
275
|
+
error, not a silent fallback.
|
|
276
|
+
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
## Legacy code (`.`) and its deprecation
|
|
280
|
+
|
|
281
|
+
The package root (`@cobre-npm/library-portal-core`, resolving to `src/constants/*`, `src/interfaces/*` and
|
|
282
|
+
`src/utils/amount.utils`) is the **previous version** of these catalogs. **All of its contents are marked
|
|
283
|
+
`@deprecated`**, pointing to their new domain:
|
|
284
|
+
|
|
285
|
+
```ts
|
|
286
|
+
/** @deprecated Use the `accounts` domain instead: `@cobre-npm/library-portal-core/accounts`. */
|
|
287
|
+
export const AccountProviders = { /* ... */ }
|
|
288
|
+
```
|
|
289
|
+
|
|
290
|
+
### Why it was deprecated (not removed)
|
|
291
|
+
|
|
292
|
+
This migration to screaming architecture was done in a **strictly additive** way: the new domains were created
|
|
293
|
+
**without touching** the old code, so that **nothing the root currently exports stops working**. The deprecation:
|
|
294
|
+
|
|
295
|
+
- **Breaks no one.** `@deprecated` is just a hint (the IDE strikes it through and suggests the replacement); current
|
|
296
|
+
consumers keep compiling and running the same.
|
|
297
|
+
- **Sets the direction.** It signals that the source of truth moved to the new domains and that the old one will be
|
|
298
|
+
retired.
|
|
299
|
+
- **Allows gradual migration.** Moving each MFE (portal, portal-widgets, portal-checkout, core-portal-bff) to the
|
|
300
|
+
new API is a separate, incremental task; meanwhile, both versions coexist without conflict.
|
|
301
|
+
|
|
302
|
+
### Key differences of the new model vs the old one
|
|
303
|
+
|
|
304
|
+
- The catalog moved from an **array** (or name→code map) to an **object keyed by code** with derived types.
|
|
305
|
+
- The label is **always** delivered inside the list (`getX(lang)` returns records + label); there is no more
|
|
306
|
+
`getXLabel` in i18n domains (the lookup is `getX(lang)[code].label`).
|
|
307
|
+
- Filter helpers were removed (`getXByGeo`, etc.): the consumer filters with `.filter()` over the list, which
|
|
308
|
+
already carries all the metadata.
|
|
309
|
+
- Each domain's public API was reduced to the essentials: **the code type + `getX()` + the result type**. The raw
|
|
310
|
+
catalogs and intermediate types were made **internal**.
|
|
311
|
+
|
|
312
|
+
> **Out of scope for this migration:** `utils/amount.utils` (the `formatAmount` formatter) has no new replacement and
|
|
313
|
+
> is kept as-is at the root, not deprecated.
|
|
314
|
+
|
|
315
|
+
---
|
|
316
|
+
|
|
317
|
+
## Development
|
|
318
|
+
|
|
319
|
+
Requires **pnpm**.
|
|
320
|
+
|
|
321
|
+
```bash
|
|
322
|
+
pnpm install
|
|
323
|
+
pnpm test # vitest (tests colocated as *.test.ts next to the code)
|
|
324
|
+
pnpm exec tsc --noEmit # type-check
|
|
325
|
+
pnpm lint # eslint --fix
|
|
326
|
+
pnpm build # tsc → dist/
|
|
327
|
+
```
|
|
328
|
+
|
|
329
|
+
`publish:prod` runs lint → type-check → build → publish.
|
|
330
|
+
|
|
331
|
+
### Conventions
|
|
332
|
+
|
|
333
|
+
- **Strict TypeScript** (`strict` + `noUncheckedIndexedAccess`), CommonJS, relative and extensionless imports.
|
|
334
|
+
- **Style (ESLint, no Prettier):** 2 spaces, double quotes, no semicolons; comments with `//`
|
|
335
|
+
(multi-line block `/** */` only when documenting API); blank line before `return`/`function`.
|
|
336
|
+
- **Colocated tests** (`*.test.ts`), Vitest, `describe`/`it`.
|
|
337
|
+
- **A new domain** = self-contained folder (`catalog.ts` + `utils/` + `locales/` + `index.ts`) + an `exports` entry
|
|
338
|
+
in `package.json` pointing to `dist/<domain>/index.js`. The `index.ts` exposes **only** the public API (code type
|
|
339
|
+
+ `getX()` + result type); the raw catalog stays internal.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
export type { AccountProvider, AccountProviderRecord } from "./providers/catalog";
|
|
2
|
+
export * from "./providers/utils/account-provider.utils";
|
|
3
|
+
export type { AccountType } from "./types/catalog";
|
|
4
|
+
export * from "./types/utils/account-type.utils";
|
|
5
|
+
export * from "./interfaces/response.interface";
|
|
6
|
+
export * from "./interfaces/params.interface";
|
|
7
|
+
export * from "./interfaces/request.interface";
|
|
8
|
+
export * from "./interfaces/mappers.interface";
|
|
9
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/accounts/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,qBAAqB,CAAA;AACjF,cAAc,0CAA0C,CAAA;AAExD,YAAY,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAA;AAClD,cAAc,kCAAkC,CAAA;AAEhD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,gCAAgC,CAAA"}
|
|
@@ -0,0 +1,23 @@
|
|
|
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("./providers/utils/account-provider.utils"), exports);
|
|
18
|
+
__exportStar(require("./types/utils/account-type.utils"), exports);
|
|
19
|
+
__exportStar(require("./interfaces/response.interface"), exports);
|
|
20
|
+
__exportStar(require("./interfaces/params.interface"), exports);
|
|
21
|
+
__exportStar(require("./interfaces/request.interface"), exports);
|
|
22
|
+
__exportStar(require("./interfaces/mappers.interface"), exports);
|
|
23
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/accounts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,2EAAwD;AAGxD,mEAAgD;AAEhD,kEAA+C;AAC/C,gEAA6C;AAC7C,iEAA8C;AAC9C,iEAA8C"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Currency } from "../../currencies/catalog";
|
|
2
|
+
import type { Account } from "./response.interface";
|
|
3
|
+
export interface AccountDropdownMapper extends Account {
|
|
4
|
+
id: string;
|
|
5
|
+
title: string;
|
|
6
|
+
subtitle: string;
|
|
7
|
+
badgeText: string;
|
|
8
|
+
currency: Currency | undefined;
|
|
9
|
+
selectedOption: string;
|
|
10
|
+
logo: string;
|
|
11
|
+
isDisabled?: boolean;
|
|
12
|
+
tooltipText?: string;
|
|
13
|
+
currencyLabel?: string;
|
|
14
|
+
}
|
|
15
|
+
export interface AccountDisplayInfoMapper extends Account {
|
|
16
|
+
accountName: string;
|
|
17
|
+
accountNumber: string;
|
|
18
|
+
logo: string;
|
|
19
|
+
}
|
|
20
|
+
//# sourceMappingURL=mappers.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mappers.interface.d.ts","sourceRoot":"","sources":["../../../src/accounts/interfaces/mappers.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,sBAAsB,CAAA;AAEnD,MAAM,WAAW,qBAAsB,SAAQ,OAAO;IACpD,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,QAAQ,EAAE,QAAQ,GAAG,SAAS,CAAA;IAC9B,cAAc,EAAE,MAAM,CAAA;IACtB,IAAI,EAAE,MAAM,CAAA;IACZ,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED,MAAM,WAAW,wBAAyB,SAAQ,OAAO;IACvD,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"mappers.interface.js","sourceRoot":"","sources":["../../../src/accounts/interfaces/mappers.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import type { AccountProvider } from "../providers/catalog";
|
|
2
|
+
export interface ParamsGetAccounts {
|
|
3
|
+
account_number?: string;
|
|
4
|
+
account_type?: string[];
|
|
5
|
+
alias?: string;
|
|
6
|
+
balance?: boolean;
|
|
7
|
+
balance_gte?: number;
|
|
8
|
+
balance_lte?: number;
|
|
9
|
+
currency?: string[];
|
|
10
|
+
geo?: string[];
|
|
11
|
+
has_primary_account?: boolean;
|
|
12
|
+
obtained_balance_at?: string;
|
|
13
|
+
obtained_balance_at_gte?: string;
|
|
14
|
+
obtained_balance_at_lte?: string;
|
|
15
|
+
page_number?: number;
|
|
16
|
+
provider_id?: AccountProvider[] | AccountProvider;
|
|
17
|
+
sensitive_data?: boolean;
|
|
18
|
+
status?: string;
|
|
19
|
+
updated_at?: string;
|
|
20
|
+
updated_gte?: string;
|
|
21
|
+
updated_lte?: string;
|
|
22
|
+
page_size?: number;
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=params.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params.interface.d.ts","sourceRoot":"","sources":["../../../src/accounts/interfaces/params.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAE3D,MAAM,WAAW,iBAAiB;IAChC,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;IACvB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,QAAQ,CAAC,EAAE,MAAM,EAAE,CAAA;IACnB,GAAG,CAAC,EAAE,MAAM,EAAE,CAAA;IACd,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,uBAAuB,CAAC,EAAE,MAAM,CAAA;IAChC,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,eAAe,EAAE,GAAG,eAAe,CAAA;IACjD,cAAc,CAAC,EAAE,OAAO,CAAA;IACxB,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"params.interface.js","sourceRoot":"","sources":["../../../src/accounts/interfaces/params.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import type { Currency } from "../../currencies/catalog";
|
|
2
|
+
import type { AccountType } from "../types/catalog";
|
|
3
|
+
export interface CreateAccountRequest {
|
|
4
|
+
alias: string;
|
|
5
|
+
tags?: string[];
|
|
6
|
+
currency?: string;
|
|
7
|
+
provider_id: string;
|
|
8
|
+
account_number?: string;
|
|
9
|
+
account_type?: AccountType;
|
|
10
|
+
subclient_id?: string;
|
|
11
|
+
metadata: CreateAccountMetadata;
|
|
12
|
+
action: "connect" | "create";
|
|
13
|
+
}
|
|
14
|
+
export interface UpdateAccountRequest {
|
|
15
|
+
alias?: string;
|
|
16
|
+
tags?: string[];
|
|
17
|
+
account_type?: AccountType;
|
|
18
|
+
}
|
|
19
|
+
interface CreateAccountMetadata {
|
|
20
|
+
account_number?: string;
|
|
21
|
+
account_holder_id_type?: string;
|
|
22
|
+
account_holder_id_number?: string;
|
|
23
|
+
primary_account?: string;
|
|
24
|
+
currency?: Currency;
|
|
25
|
+
chain?: string;
|
|
26
|
+
contract_number?: string;
|
|
27
|
+
}
|
|
28
|
+
export {};
|
|
29
|
+
//# sourceMappingURL=request.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.interface.d.ts","sourceRoot":"","sources":["../../../src/accounts/interfaces/request.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,QAAQ,CAAC,EAAG,MAAM,CAAA;IAClB,WAAW,EAAE,MAAM,CAAA;IACnB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,YAAY,CAAC,EAAE,WAAW,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,QAAQ,EAAE,qBAAqB,CAAA;IAC/B,MAAM,EAAE,SAAS,GAAG,QAAQ,CAAA;CAC7B;AAED,MAAM,WAAW,oBAAoB;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,YAAY,CAAC,EAAE,WAAW,CAAA;CAC3B;AAED,UAAU,qBAAqB;IAC7B,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"request.interface.js","sourceRoot":"","sources":["../../../src/accounts/interfaces/request.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import type { AccountProvider } from "../providers/catalog";
|
|
2
|
+
import type { Country } from "../../countries/base/catalog";
|
|
3
|
+
import type { Currency } from "../../currencies/catalog";
|
|
4
|
+
import type { AccountType } from "../types/catalog";
|
|
5
|
+
export interface AccountResponsePaginated<T = Account> {
|
|
6
|
+
total_items: number;
|
|
7
|
+
total_pages: number;
|
|
8
|
+
is_last_page: boolean;
|
|
9
|
+
page_items: number;
|
|
10
|
+
contents: T[];
|
|
11
|
+
}
|
|
12
|
+
export interface Account {
|
|
13
|
+
id: string;
|
|
14
|
+
logo?: string;
|
|
15
|
+
provider_id?: AccountProvider;
|
|
16
|
+
provider_name: string;
|
|
17
|
+
connectivity?: AccountConnectivity;
|
|
18
|
+
connectivity_status?: AccountConnectivityStatus;
|
|
19
|
+
connectivity_description?: string;
|
|
20
|
+
alias?: string;
|
|
21
|
+
metadata?: AccountMetadata;
|
|
22
|
+
account_number?: string | null;
|
|
23
|
+
account_type?: AccountType | null;
|
|
24
|
+
obtained_balance?: number | null;
|
|
25
|
+
obtained_balance_at?: string;
|
|
26
|
+
geo?: Country;
|
|
27
|
+
currency?: Currency;
|
|
28
|
+
created_at?: string;
|
|
29
|
+
updated_at?: string;
|
|
30
|
+
tags?: string[];
|
|
31
|
+
title?: string;
|
|
32
|
+
subclient_id?: string;
|
|
33
|
+
}
|
|
34
|
+
export interface LinkedWallet {
|
|
35
|
+
chain: string;
|
|
36
|
+
address: string;
|
|
37
|
+
available_tokens: string[];
|
|
38
|
+
}
|
|
39
|
+
export interface AccountMetadata {
|
|
40
|
+
available_services?: string[];
|
|
41
|
+
primary_account?: string;
|
|
42
|
+
cobre_tag?: string;
|
|
43
|
+
linked_wallets?: LinkedWallet[];
|
|
44
|
+
chain?: string;
|
|
45
|
+
token?: Currency;
|
|
46
|
+
token_symbol?: string;
|
|
47
|
+
}
|
|
48
|
+
export type AccountConnectivityStatus = "creating" | "connected" | "connecting" | "disconnected" | "failed" | "closed";
|
|
49
|
+
export interface AccountConnectivity {
|
|
50
|
+
status?: AccountConnectivityStatus;
|
|
51
|
+
description: string;
|
|
52
|
+
}
|
|
53
|
+
//# sourceMappingURL=response.interface.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.interface.d.ts","sourceRoot":"","sources":["../../../src/accounts/interfaces/response.interface.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AAC3D,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,8BAA8B,CAAA;AAC3D,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,0BAA0B,CAAA;AACxD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAA;AAEnD,MAAM,WAAW,wBAAwB,CAAC,CAAC,GAAG,OAAO;IACnD,WAAW,EAAE,MAAM,CAAA;IACnB,WAAW,EAAE,MAAM,CAAA;IACnB,YAAY,EAAE,OAAO,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,QAAQ,EAAE,CAAC,EAAE,CAAA;CACd;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,WAAW,CAAC,EAAE,eAAe,CAAA;IAC7B,aAAa,EAAE,MAAM,CAAA;IACrB,YAAY,CAAC,EAAE,mBAAmB,CAAA;IAClC,mBAAmB,CAAC,EAAE,yBAAyB,CAAA;IAC/C,wBAAwB,CAAC,EAAE,MAAM,CAAA;IACjC,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,eAAe,CAAA;IAC1B,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC9B,YAAY,CAAC,EAAE,WAAW,GAAG,IAAI,CAAA;IACjC,gBAAgB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAChC,mBAAmB,CAAC,EAAE,MAAM,CAAA;IAC5B,GAAG,CAAC,EAAE,OAAO,CAAA;IACb,QAAQ,CAAC,EAAE,QAAQ,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,IAAI,CAAC,EAAE,MAAM,EAAE,CAAA;IACf,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,MAAM,CAAA;IACf,gBAAgB,EAAE,MAAM,EAAE,CAAA;CAC3B;AAED,MAAM,WAAW,eAAe;IAC9B,kBAAkB,CAAC,EAAE,MAAM,EAAE,CAAA;IAC7B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,cAAc,CAAC,EAAE,YAAY,EAAE,CAAA;IAC/B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,KAAK,CAAC,EAAE,QAAQ,CAAA;IAChB,YAAY,CAAC,EAAE,MAAM,CAAA;CACtB;AAED,MAAM,MAAM,yBAAyB,GAAG,UAAU,GAAG,WAAW,GAAG,YAAY,GAAG,cAAc,GAAG,QAAQ,GAAG,QAAQ,CAAA;AAEtH,MAAM,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,yBAAyB,CAAA;IAClC,WAAW,EAAE,MAAM,CAAA;CACpB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"response.interface.js","sourceRoot":"","sources":["../../../src/accounts/interfaces/response.interface.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export declare const ACCOUNT_PROVIDERS: {
|
|
2
|
+
readonly pr_col_cobre: {
|
|
3
|
+
readonly code: "pr_col_cobre";
|
|
4
|
+
};
|
|
5
|
+
readonly pr_mex_cobre: {
|
|
6
|
+
readonly code: "pr_mex_cobre";
|
|
7
|
+
};
|
|
8
|
+
readonly pr_mex_cobre2: {
|
|
9
|
+
readonly code: "pr_mex_cobre2";
|
|
10
|
+
};
|
|
11
|
+
readonly pr_mex_cobre3: {
|
|
12
|
+
readonly code: "pr_mex_cobre3";
|
|
13
|
+
};
|
|
14
|
+
readonly pr_global_cobre: {
|
|
15
|
+
readonly code: "pr_global_cobre";
|
|
16
|
+
};
|
|
17
|
+
readonly pr_stable_omnibus_cobre: {
|
|
18
|
+
readonly code: "pr_stable_omnibus_cobre";
|
|
19
|
+
};
|
|
20
|
+
readonly pr_stable_prime_cobre: {
|
|
21
|
+
readonly code: "pr_stable_prime_cobre";
|
|
22
|
+
};
|
|
23
|
+
readonly pr_usa_cobre: {
|
|
24
|
+
readonly code: "pr_usa_cobre";
|
|
25
|
+
};
|
|
26
|
+
};
|
|
27
|
+
export type AccountProvider = keyof typeof ACCOUNT_PROVIDERS;
|
|
28
|
+
export type AccountProviderRecord = (typeof ACCOUNT_PROVIDERS)[AccountProvider];
|
|
29
|
+
//# sourceMappingURL=catalog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/accounts/providers/catalog.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;CASpB,CAAA;AAEV,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAC5D,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,eAAe,CAAC,CAAA"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.ACCOUNT_PROVIDERS = void 0;
|
|
4
|
+
exports.ACCOUNT_PROVIDERS = {
|
|
5
|
+
pr_col_cobre: { code: "pr_col_cobre" },
|
|
6
|
+
pr_mex_cobre: { code: "pr_mex_cobre" },
|
|
7
|
+
pr_mex_cobre2: { code: "pr_mex_cobre2" },
|
|
8
|
+
pr_mex_cobre3: { code: "pr_mex_cobre3" },
|
|
9
|
+
pr_global_cobre: { code: "pr_global_cobre" },
|
|
10
|
+
pr_stable_omnibus_cobre: { code: "pr_stable_omnibus_cobre" },
|
|
11
|
+
pr_stable_prime_cobre: { code: "pr_stable_prime_cobre" },
|
|
12
|
+
pr_usa_cobre: { code: "pr_usa_cobre" },
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=catalog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../src/accounts/providers/catalog.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAC/B,YAAY,EAAa,EAAE,IAAI,EAAE,cAAc,EAAE;IACjD,YAAY,EAAa,EAAE,IAAI,EAAE,cAAc,EAAE;IACjD,aAAa,EAAY,EAAE,IAAI,EAAE,eAAe,EAAE;IAClD,aAAa,EAAY,EAAE,IAAI,EAAE,eAAe,EAAE;IAClD,eAAe,EAAU,EAAE,IAAI,EAAE,iBAAiB,EAAE;IACpD,uBAAuB,EAAE,EAAE,IAAI,EAAE,yBAAyB,EAAE;IAC5D,qBAAqB,EAAI,EAAE,IAAI,EAAE,uBAAuB,EAAE;IAC1D,YAAY,EAAa,EAAE,IAAI,EAAE,cAAc,EAAE;CACzC,CAAA"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-provider.utils.d.ts","sourceRoot":"","sources":["../../../../src/accounts/providers/utils/account-provider.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,YAAY,CAAA;AAExE,eAAO,MAAM,mBAAmB,QAAO,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAAsB,CAAA"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.getAccountProviders = void 0;
|
|
4
|
+
const catalog_1 = require("../catalog");
|
|
5
|
+
const getAccountProviders = () => catalog_1.ACCOUNT_PROVIDERS;
|
|
6
|
+
exports.getAccountProviders = getAccountProviders;
|
|
7
|
+
//# sourceMappingURL=account-provider.utils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account-provider.utils.js","sourceRoot":"","sources":["../../../../src/accounts/providers/utils/account-provider.utils.ts"],"names":[],"mappings":";;;AAAA,wCAA8C;AAGvC,MAAM,mBAAmB,GAAG,GAAmD,EAAE,CAAC,2BAAiB,CAAA;AAA7F,QAAA,mBAAmB,uBAA0E"}
|