@cobre-npm/library-portal-core 0.60.0 → 0.61.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
CHANGED
|
@@ -387,6 +387,17 @@ the geo-flattened, unlabeled rows first and only attaches `label` to what matche
|
|
|
387
387
|
never accepts `label` as a filter — unlike the other two `XQuery` types, this is enforced at the type level,
|
|
388
388
|
not just by convention.
|
|
389
389
|
|
|
390
|
+
Usages and validation types are exposed as **types only**, no runtime constant: write the literal and the
|
|
391
|
+
union checks it (autocomplete included, a typo doesn't compile). That replaces the deprecated root's
|
|
392
|
+
`DocumentTypeUsages.Business` / `DocumentTypeValidationTypes.Numeric`:
|
|
393
|
+
|
|
394
|
+
```ts
|
|
395
|
+
import type { DocumentTypeUsage, DocumentTypeValidationType } from "@cobre-npm/library-portal-core/documentTypes"
|
|
396
|
+
|
|
397
|
+
queryDocumentTypes({ lang, usage: "business" })
|
|
398
|
+
if (record.type === "numeric") { … }
|
|
399
|
+
```
|
|
400
|
+
|
|
390
401
|
### `currencies`
|
|
391
402
|
|
|
392
403
|
```ts
|
|
@@ -696,15 +707,18 @@ import {
|
|
|
696
707
|
type FinancialInstitutionOption, type FinancialInstitutionQuery,
|
|
697
708
|
} from "@cobre-npm/library-portal-core/financialInstitutions"
|
|
698
709
|
|
|
699
|
-
getFinancialInstitutions("en").pr_col_1007 // { code: "pr_col_1007", geo: "col", label: "Bancolombia" }
|
|
710
|
+
getFinancialInstitutions("en").pr_col_1007 // { code: "pr_col_1007", rawCode: "1007", geo: "col", label: "Bancolombia" }
|
|
700
711
|
queryFinancialInstitutions({ lang: "en", geo: "col" }) // FinancialInstitutionOption[] → every COL institution
|
|
701
712
|
```
|
|
702
713
|
|
|
703
|
-
- **institutions** (i18n): `getFinancialInstitutions(lang)`; each record carries `code`, `geo`
|
|
704
|
-
(`"col" | "mex"`) and `label`.
|
|
705
|
-
|
|
714
|
+
- **institutions** (i18n): `getFinancialInstitutions(lang)`; each record carries `code`, `rawCode`, `geo`
|
|
715
|
+
(`"col" | "mex"`) and `label`. The catalog is **keyed by `code`** (`pr_col_1007`, `pr_mex_40072`): that is
|
|
716
|
+
the `FinancialInstitution` union, the key into the locale files and the value the APIs and logos use.
|
|
717
|
+
`rawCode` is the bare bank code (`"1007"`), unique only within a `geo`; `code` is always
|
|
718
|
+
`pr_<geo>_<rawCode>` (a test enforces it). One entry per financial institution, so there is no
|
|
719
|
+
repeat-by-geo the way `accounts/types` needs one.
|
|
706
720
|
- `queryFinancialInstitutions({ lang, ... })` returns the same catalog as a **list**, narrowed by
|
|
707
|
-
`code`/`geo` — same matching rules as [`queryAccountStatuses`](#accounts): `lang` is required (i18n
|
|
721
|
+
`code`/`rawCode`/`geo` — same matching rules as [`queryAccountStatuses`](#accounts): `lang` is required (i18n
|
|
708
722
|
domain, no default) and lives inside the query object, and **a key that is present always filters** —
|
|
709
723
|
`queryFinancialInstitutions({ lang: "en" })` returns everything, `queryFinancialInstitutions({ lang:
|
|
710
724
|
"en", geo: "col" })` returns only Colombia's institutions.
|