@cobre-npm/library-portal-core 0.32.0 → 0.34.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
@@ -126,8 +126,10 @@ returns the list already narrowed, with a safe default.
126
126
  `currencies` is the first: see [`currencies`](#currencies) for the query rules, which every later `queryX()`
127
127
  will follow. `transactions/types` is the second, and the first **i18n** one: `lang` travels **inside** the
128
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
- wayand it stays fine for one-off predicates even where `queryX()` exists.
129
+ [`transactions`](#transactions) for what that changes. `documentTypes` is the third, and the first
130
+ **many-to-many** one see [`documentTypes`](#documenttypes--three-views) for how the query applies to a
131
+ catalog flattened by geo. Until a domain has one, `.filter()` is still the way — and it stays fine for
132
+ one-off predicates even where `queryX()` exists.
131
133
 
132
134
  ### Two classes of domain
133
135
 
@@ -214,11 +216,18 @@ import {
214
216
  getMovementStatuses, type MovementStatus, type MovementStatusRecord,
215
217
  } from "@cobre-npm/library-portal-core/movements"
216
218
 
217
- getMovementTypes("en").ach.label // "ACH"
218
- getMovementStatuses().completed // { code: "completed" } (no i18n)
219
+ getMovementTypes("en").ach.label // "ACH"
220
+ getMovementTypes("en").on_ramp.groupLabel // "Stablecoin"
221
+ getMovementTypes("en").on_ramp.label // "On Ramp" (individual label, unchanged)
222
+ getMovementStatuses().completed // { code: "completed" } (no i18n)
219
223
  ```
220
224
 
221
- - **types** (i18n): movement types (ACH, SPEI, R2P, …).
225
+ - **types** (i18n): movement types (ACH, SPEI, R2P, …). `on_ramp`/`off_ramp`/`stable_payout`/`global`
226
+ additionally carry `groupLabel: "Stablecoin"` — a display grouping for views that need to show them
227
+ under one label. `getMovementTypes()` keeps returning each rail's own individual `label` unchanged; a
228
+ consumer that wants the grouped label picks `groupLabel ?? label`. There's no separate `getXLabel`
229
+ for this — the value already comes back inside `getMovementTypes()`, same as everything else in this
230
+ catalog.
222
231
  - **status** (no i18n): movement statuses (`initiated`, `processing`, `completed`, …).
223
232
 
224
233
  ### `subclients`
@@ -236,16 +245,16 @@ getSubclientStatuses("en").approved // { code: "approved", label: "Enabled"
236
245
  `failed`).
237
246
  - **interfaces**: `Subclient`, `SubclientPerson` (shape shared by `ubos` and `legal_representatives`).
238
247
 
239
- ### `documentTypes` — two views
248
+ ### `documentTypes` — three views
240
249
 
241
250
  It's the only domain with a **many-to-many** relationship (one document type applies in several countries with
242
- different usage), so it exposes **two projections** of the same source:
251
+ different usage), so it exposes **three** ways to read the same source:
243
252
 
244
253
  ```ts
245
254
  import {
246
- getDocumentTypes, getDocumentTypesByGeo,
255
+ getDocumentTypes, getDocumentTypesByGeo, queryDocumentTypes,
247
256
  type DocumentType, type DocumentTypeUsage, type DocumentTypeGeo, type DocumentTypeValidationType,
248
- type DocumentTypeOption, type DocumentTypeGeoOption,
257
+ type DocumentTypeOption, type DocumentTypeGeoOption, type DocumentTypeQuery,
249
258
  } from "@cobre-npm/library-portal-core/documentTypes"
250
259
 
251
260
  // 1) By code (definition): unique list, validation, label
@@ -254,14 +263,38 @@ Object.values(docs) // unique list of documents
254
263
  docs.nit.minLength // validation by code
255
264
  docs.nit.label // "NIT"
256
265
 
257
- // 2) Flattened by country (applicability): per-geo/usage dropdowns
266
+ // 2) Flattened by country (applicability): per-geo/usage dropdowns, unfiltered
258
267
  getDocumentTypesByGeo("en") // DocumentTypeGeoOption[] → { code, ...validations, label, geo, usage }
259
- .filter(d => d.geo === "col" && d.usage.includes("business"))
268
+
269
+ // 3) Flattened by country, narrowed by query (i18n queryX()): the picker/table case
270
+ queryDocumentTypes({ lang: "en", geo: "col", usage: "business" }) // only col's business-usage documents
260
271
  ```
261
272
 
262
- Why two: the **by-code** view covers "unique list / validation / label" (each code once); the
263
- **flattened-by-country** view covers the onboarding dropdown ("which documents does Colombia require"), where a
264
- code repeats per country. No single shape covers both cases well.
273
+ Why three: the **by-code** view covers "unique list / validation / label" (each code once); the
274
+ **flattened-by-country** view covers the full onboarding dropdown ("which documents does Colombia require"),
275
+ where a code repeats per country; **`queryDocumentTypes`** is that same flattened view pre-narrowed — the
276
+ third domain, after `currencies` and `transactions/types`, to get an i18n `queryX()`. `lang` goes **inside**
277
+ the query object, same rule as `transactions`, and there is no default field (unlike `currencies`' `scope`):
278
+ `queryDocumentTypes({ lang: "en" })` returns everything, localized.
279
+
280
+ As with every `queryX()`, **a key that is present always filters** — it's the *absence* of the key that
281
+ doesn't. So `queryDocumentTypes({ lang, geo: "col" })` narrows to Colombia, but
282
+ `queryDocumentTypes({ lang, geo: undefined })` returns `[]`, not "no geo filter". An optional UI filter has to
283
+ be spread in conditionally:
284
+
285
+ ```ts
286
+ queryDocumentTypes({ lang, ...(geo.value ? { geo: geo.value } : {}) })
287
+ ```
288
+
289
+ `getDocumentTypesByGeo("en").filter(d => d.geo === "col" && d.usage.includes("business"))` still works — it's
290
+ just what `queryDocumentTypes({ lang: "en", geo: "col", usage: "business" })` now does for you.
291
+
292
+ The per-geo applicability lives **inside** `DOCUMENT_TYPES[code].geo` (a `Partial<Record<DocumentTypeGeo,
293
+ DocumentTypeUsage[]>>`), not in a separate catalog — one source, and the same code can carry different usage
294
+ per geo (`nit` is business-only in `col` but business-or-individual in `usa`). `queryDocumentTypes` filters
295
+ the geo-flattened, unlabeled rows first and only attaches `label` to what matched, so `DocumentTypeQuery`
296
+ never accepts `label` as a filter — unlike the other two `XQuery` types, this is enforced at the type level,
297
+ not just by convention.
265
298
 
266
299
  ### `currencies`
267
300
 
@@ -1,153 +1,173 @@
1
+ export type DocumentTypeUsage = "individual" | "business";
2
+ export type DocumentTypeGeo = "col" | "mex" | "usa" | "generic" | "chn" | "eur";
1
3
  export declare const DOCUMENT_TYPES: {
2
4
  readonly cc: {
3
5
  readonly code: "cc";
4
6
  readonly minLength: 6;
5
7
  readonly maxLength: 10;
6
8
  readonly type: "numeric";
9
+ readonly geo: {
10
+ readonly col: readonly ["individual"];
11
+ readonly usa: readonly ["individual"];
12
+ readonly generic: readonly ["individual"];
13
+ };
7
14
  };
8
15
  readonly ce: {
9
16
  readonly code: "ce";
10
17
  readonly minLength: 6;
11
18
  readonly maxLength: 10;
12
19
  readonly type: "numeric";
20
+ readonly geo: {
21
+ readonly col: readonly ["individual"];
22
+ readonly usa: readonly ["individual"];
23
+ readonly generic: readonly ["individual"];
24
+ };
13
25
  };
14
26
  readonly pa: {
15
27
  readonly code: "pa";
16
28
  readonly minLength: 5;
17
29
  readonly maxLength: 15;
18
30
  readonly type: "alphanumeric";
31
+ readonly geo: {
32
+ readonly col: readonly ["individual"];
33
+ readonly usa: readonly ["individual"];
34
+ readonly generic: readonly ["individual"];
35
+ };
19
36
  };
20
37
  readonly nit: {
21
38
  readonly code: "nit";
22
39
  readonly minLength: 9;
23
40
  readonly maxLength: 10;
24
41
  readonly type: "numeric";
42
+ readonly geo: {
43
+ readonly col: readonly ["business"];
44
+ readonly usa: readonly ["business", "individual"];
45
+ readonly generic: readonly ["business"];
46
+ readonly chn: readonly ["business"];
47
+ readonly eur: readonly ["business"];
48
+ };
25
49
  };
26
50
  readonly ti: {
27
51
  readonly code: "ti";
28
52
  readonly minLength: 8;
29
53
  readonly maxLength: 11;
30
54
  readonly type: "numeric";
55
+ readonly geo: {
56
+ readonly col: readonly ["individual"];
57
+ };
31
58
  };
32
59
  readonly ppt: {
33
60
  readonly code: "ppt";
34
61
  readonly minLength: 7;
35
62
  readonly maxLength: 9;
36
63
  readonly type: "numeric";
64
+ readonly geo: {
65
+ readonly col: readonly ["individual"];
66
+ };
37
67
  };
38
68
  readonly curp: {
39
69
  readonly code: "curp";
40
70
  readonly minLength: 18;
41
71
  readonly maxLength: 18;
42
72
  readonly type: "alphanumeric";
73
+ readonly geo: {
74
+ readonly mex: readonly ["individual"];
75
+ readonly usa: readonly ["individual"];
76
+ };
43
77
  };
44
78
  readonly rfc: {
45
79
  readonly code: "rfc";
46
80
  readonly minLength: 12;
47
81
  readonly maxLength: 13;
48
82
  readonly type: "alphanumeric";
83
+ readonly geo: {
84
+ readonly mex: readonly ["individual", "business"];
85
+ readonly usa: readonly ["individual", "business"];
86
+ };
49
87
  };
50
88
  readonly tin: {
51
89
  readonly code: "tin";
52
90
  readonly minLength: 9;
53
91
  readonly maxLength: 9;
54
92
  readonly type: "numeric";
93
+ readonly geo: {
94
+ readonly usa: readonly [];
95
+ };
55
96
  };
56
97
  readonly ein: {
57
98
  readonly code: "ein";
58
99
  readonly minLength: 9;
59
100
  readonly maxLength: 9;
60
101
  readonly type: "numeric";
102
+ readonly geo: {
103
+ readonly usa: readonly ["business", "individual"];
104
+ };
61
105
  };
62
106
  readonly cpf: {
63
107
  readonly code: "cpf";
64
108
  readonly minLength: 11;
65
109
  readonly maxLength: 11;
66
110
  readonly type: "numeric";
111
+ readonly geo: {
112
+ readonly usa: readonly ["individual"];
113
+ };
67
114
  };
68
115
  readonly cnpj: {
69
116
  readonly code: "cnpj";
70
117
  readonly minLength: 14;
71
118
  readonly maxLength: 14;
72
119
  readonly type: "numeric";
120
+ readonly geo: {
121
+ readonly usa: readonly ["individual"];
122
+ };
73
123
  };
74
124
  readonly cuit: {
75
125
  readonly code: "cuit";
76
126
  readonly minLength: 11;
77
127
  readonly maxLength: 11;
78
128
  readonly type: "numeric";
129
+ readonly geo: {
130
+ readonly usa: readonly ["individual"];
131
+ };
79
132
  };
80
133
  readonly cuil: {
81
134
  readonly code: "cuil";
82
135
  readonly minLength: 11;
83
136
  readonly maxLength: 11;
84
137
  readonly type: "numeric";
138
+ readonly geo: {
139
+ readonly usa: readonly ["individual"];
140
+ };
85
141
  };
86
142
  readonly te: {
87
143
  readonly code: "te";
88
144
  readonly minLength: 6;
89
145
  readonly maxLength: 10;
90
146
  readonly type: "numeric";
147
+ readonly geo: {
148
+ readonly generic: readonly ["individual"];
149
+ };
91
150
  };
92
151
  readonly uscc: {
93
152
  readonly code: "uscc";
94
153
  readonly minLength: 9;
95
154
  readonly maxLength: 10;
96
155
  readonly type: "numeric";
156
+ readonly geo: {
157
+ readonly generic: readonly ["business"];
158
+ };
97
159
  };
98
160
  readonly vat: {
99
161
  readonly code: "vat";
100
162
  readonly minLength: 9;
101
163
  readonly maxLength: 10;
102
164
  readonly type: "numeric";
165
+ readonly geo: {
166
+ readonly generic: readonly ["business"];
167
+ };
103
168
  };
104
169
  };
105
170
  export type DocumentType = keyof typeof DOCUMENT_TYPES;
106
171
  export type DocumentTypeRecord = (typeof DOCUMENT_TYPES)[DocumentType];
107
172
  export type DocumentTypeValidationType = DocumentTypeRecord["type"];
108
- export type DocumentTypeUsage = "individual" | "business";
109
- export declare const DOCUMENT_TYPES_BY_GEO: {
110
- readonly col: {
111
- readonly cc: ["individual"];
112
- readonly ce: ["individual"];
113
- readonly pa: ["individual"];
114
- readonly nit: ["business"];
115
- readonly ti: ["individual"];
116
- readonly ppt: ["individual"];
117
- };
118
- readonly mex: {
119
- readonly curp: ["individual"];
120
- readonly rfc: ["individual", "business"];
121
- };
122
- readonly usa: {
123
- readonly tin: [];
124
- readonly nit: ["business", "individual"];
125
- readonly ein: ["business", "individual"];
126
- readonly cc: ["individual"];
127
- readonly ce: ["individual"];
128
- readonly pa: ["individual"];
129
- readonly cpf: ["individual"];
130
- readonly cnpj: ["individual"];
131
- readonly rfc: ["individual"];
132
- readonly curp: ["individual"];
133
- readonly cuit: ["individual"];
134
- readonly cuil: ["individual"];
135
- };
136
- readonly generic: {
137
- readonly nit: ["business"];
138
- readonly pa: ["individual"];
139
- readonly cc: ["individual"];
140
- readonly ce: ["individual"];
141
- readonly te: ["individual"];
142
- readonly uscc: ["business"];
143
- readonly vat: ["business"];
144
- };
145
- readonly chn: {
146
- readonly nit: ["business"];
147
- };
148
- readonly eur: {
149
- readonly nit: ["business"];
150
- };
151
- };
152
- export type DocumentTypeGeo = keyof typeof DOCUMENT_TYPES_BY_GEO;
153
173
  //# sourceMappingURL=catalog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/documentTypes/catalog.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkBjB,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,cAAc,CAAA;AACtD,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,YAAY,CAAC,CAAA;AACtE,MAAM,MAAM,0BAA0B,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAA;AAEnE,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,UAAU,CAAA;AAGzD,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA0CqD,CAAA;AAEvF,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,qBAAqB,CAAA"}
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/documentTypes/catalog.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,iBAAiB,GAAG,YAAY,GAAG,UAAU,CAAA;AAGzD,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,SAAS,GAAG,KAAK,GAAG,KAAK,CAAA;AAE/E,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBzB,CAAA;AAEF,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,cAAc,CAAA;AACtD,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,YAAY,CAAC,CAAA;AACtE,MAAM,MAAM,0BAA0B,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAA"}
@@ -1,67 +1,23 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.DOCUMENT_TYPES_BY_GEO = exports.DOCUMENT_TYPES = void 0;
3
+ exports.DOCUMENT_TYPES = void 0;
4
4
  exports.DOCUMENT_TYPES = {
5
- cc: { code: "cc", minLength: 6, maxLength: 10, type: "numeric" },
6
- ce: { code: "ce", minLength: 6, maxLength: 10, type: "numeric" },
7
- pa: { code: "pa", minLength: 5, maxLength: 15, type: "alphanumeric" },
8
- nit: { code: "nit", minLength: 9, maxLength: 10, type: "numeric" },
9
- ti: { code: "ti", minLength: 8, maxLength: 11, type: "numeric" },
10
- ppt: { code: "ppt", minLength: 7, maxLength: 9, type: "numeric" },
11
- curp: { code: "curp", minLength: 18, maxLength: 18, type: "alphanumeric" },
12
- rfc: { code: "rfc", minLength: 12, maxLength: 13, type: "alphanumeric" },
13
- tin: { code: "tin", minLength: 9, maxLength: 9, type: "numeric" },
14
- ein: { code: "ein", minLength: 9, maxLength: 9, type: "numeric" },
15
- cpf: { code: "cpf", minLength: 11, maxLength: 11, type: "numeric" },
16
- cnpj: { code: "cnpj", minLength: 14, maxLength: 14, type: "numeric" },
17
- cuit: { code: "cuit", minLength: 11, maxLength: 11, type: "numeric" },
18
- cuil: { code: "cuil", minLength: 11, maxLength: 11, type: "numeric" },
19
- te: { code: "te", minLength: 6, maxLength: 10, type: "numeric" },
20
- uscc: { code: "uscc", minLength: 9, maxLength: 10, type: "numeric" },
21
- vat: { code: "vat", minLength: 9, maxLength: 10, type: "numeric" },
22
- };
23
- // Which document types apply per geo, and under which usage(s).
24
- exports.DOCUMENT_TYPES_BY_GEO = {
25
- col: {
26
- cc: ["individual"],
27
- ce: ["individual"],
28
- pa: ["individual"],
29
- nit: ["business"],
30
- ti: ["individual"],
31
- ppt: ["individual"],
32
- },
33
- mex: {
34
- curp: ["individual"],
35
- rfc: ["individual", "business"],
36
- },
37
- usa: {
38
- tin: [],
39
- nit: ["business", "individual"],
40
- ein: ["business", "individual"],
41
- cc: ["individual"],
42
- ce: ["individual"],
43
- pa: ["individual"],
44
- cpf: ["individual"],
45
- cnpj: ["individual"],
46
- rfc: ["individual"],
47
- curp: ["individual"],
48
- cuit: ["individual"],
49
- cuil: ["individual"],
50
- },
51
- generic: {
52
- nit: ["business"],
53
- pa: ["individual"],
54
- cc: ["individual"],
55
- ce: ["individual"],
56
- te: ["individual"],
57
- uscc: ["business"],
58
- vat: ["business"],
59
- },
60
- chn: {
61
- nit: ["business"],
62
- },
63
- eur: {
64
- nit: ["business"],
65
- },
5
+ cc: { code: "cc", minLength: 6, maxLength: 10, type: "numeric", geo: { col: ["individual"], usa: ["individual"], generic: ["individual"] } },
6
+ ce: { code: "ce", minLength: 6, maxLength: 10, type: "numeric", geo: { col: ["individual"], usa: ["individual"], generic: ["individual"] } },
7
+ pa: { code: "pa", minLength: 5, maxLength: 15, type: "alphanumeric", geo: { col: ["individual"], usa: ["individual"], generic: ["individual"] } },
8
+ nit: { code: "nit", minLength: 9, maxLength: 10, type: "numeric", geo: { col: ["business"], usa: ["business", "individual"], generic: ["business"], chn: ["business"], eur: ["business"] } },
9
+ ti: { code: "ti", minLength: 8, maxLength: 11, type: "numeric", geo: { col: ["individual"] } },
10
+ ppt: { code: "ppt", minLength: 7, maxLength: 9, type: "numeric", geo: { col: ["individual"] } },
11
+ curp: { code: "curp", minLength: 18, maxLength: 18, type: "alphanumeric", geo: { mex: ["individual"], usa: ["individual"] } },
12
+ rfc: { code: "rfc", minLength: 12, maxLength: 13, type: "alphanumeric", geo: { mex: ["individual", "business"], usa: ["individual", "business"] } },
13
+ tin: { code: "tin", minLength: 9, maxLength: 9, type: "numeric", geo: { usa: [] } },
14
+ ein: { code: "ein", minLength: 9, maxLength: 9, type: "numeric", geo: { usa: ["business", "individual"] } },
15
+ cpf: { code: "cpf", minLength: 11, maxLength: 11, type: "numeric", geo: { usa: ["individual"] } },
16
+ cnpj: { code: "cnpj", minLength: 14, maxLength: 14, type: "numeric", geo: { usa: ["individual"] } },
17
+ cuit: { code: "cuit", minLength: 11, maxLength: 11, type: "numeric", geo: { usa: ["individual"] } },
18
+ cuil: { code: "cuil", minLength: 11, maxLength: 11, type: "numeric", geo: { usa: ["individual"] } },
19
+ te: { code: "te", minLength: 6, maxLength: 10, type: "numeric", geo: { generic: ["individual"] } },
20
+ uscc: { code: "uscc", minLength: 9, maxLength: 10, type: "numeric", geo: { generic: ["business"] } },
21
+ vat: { code: "vat", minLength: 9, maxLength: 10, type: "numeric", geo: { generic: ["business"] } },
66
22
  };
67
23
  //# sourceMappingURL=catalog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../src/documentTypes/catalog.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;IAC5B,EAAE,EAAI,EAAE,IAAI,EAAE,IAAI,EAAI,SAAS,EAAE,CAAC,EAAG,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACrE,EAAE,EAAI,EAAE,IAAI,EAAE,IAAI,EAAI,SAAS,EAAE,CAAC,EAAG,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACrE,EAAE,EAAI,EAAE,IAAI,EAAE,IAAI,EAAI,SAAS,EAAE,CAAC,EAAG,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE;IAC1E,GAAG,EAAG,EAAE,IAAI,EAAE,KAAK,EAAG,SAAS,EAAE,CAAC,EAAG,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACrE,EAAE,EAAI,EAAE,IAAI,EAAE,IAAI,EAAI,SAAS,EAAE,CAAC,EAAG,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE;IACrE,GAAG,EAAG,EAAE,IAAI,EAAE,KAAK,EAAG,SAAS,EAAE,CAAC,EAAG,SA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AS,EAAE,CAAC,EAAG,SAAS,EAAE,EAAE,EAAE,IAAI,EAAE,SAAS,EAAO,GAAG,EAAE,EAAE,OAAO,EAAE,CAAC,UAAU,CAAC,EAAE,EAAE;CAO1G,CAAA"}
@@ -1,20 +1,32 @@
1
1
  import type { DocumentType, DocumentTypeGeo, DocumentTypeRecord, DocumentTypeUsage } from "../catalog";
2
2
  import type { Locale } from "../../lang";
3
- export type DocumentTypeOption = DocumentTypeRecord & {
3
+ import type { CatalogQuery } from "../../utils/catalog-query.utils";
4
+ type DocumentTypeValidation = Omit<DocumentTypeRecord, "geo">;
5
+ export type DocumentTypeOption = DocumentTypeValidation & {
4
6
  label: string;
5
7
  };
6
- export type DocumentTypeGeoOption = DocumentTypeOption & {
8
+ type DocumentTypeGeoRecord = DocumentTypeValidation & {
7
9
  geo: DocumentTypeGeo;
8
10
  usage: readonly DocumentTypeUsage[];
9
11
  };
12
+ export type DocumentTypeGeoOption = DocumentTypeGeoRecord & {
13
+ label: string;
14
+ };
10
15
  /**
11
16
  * Documents indexed by code (definition + label). For the unique list (Object.values),
12
17
  * validation ([code].minLength / maxLength / type) and label ([code].label).
13
18
  */
14
19
  export declare const getDocumentTypes: (lang: Locale) => Record<DocumentType, DocumentTypeOption>;
20
+ /** i18n domain: `lang` is required, inside the query object — see matchesQuery for the matching rules. */
21
+ export type DocumentTypeQuery = CatalogQuery<DocumentTypeGeoRecord> & {
22
+ lang: Locale;
23
+ };
24
+ /** The catalog flattened by geo, narrowed by the query, each record enriched with its label for `query.lang`. */
25
+ export declare const queryDocumentTypes: (query: DocumentTypeQuery) => DocumentTypeGeoOption[];
15
26
  /**
16
27
  * Documents flattened by geo (definition + geo + usage + label). For per-country dropdowns;
17
28
  * a shared code repeats once per geo, so the consumer filters by geo/usage as needed.
18
29
  */
19
30
  export declare const getDocumentTypesByGeo: (lang: Locale) => DocumentTypeGeoOption[];
31
+ export {};
20
32
  //# sourceMappingURL=document-type.utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"document-type.utils.d.ts","sourceRoot":"","sources":["../../../src/documentTypes/utils/document-type.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAGtG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAIxC,MAAM,MAAM,kBAAkB,GAAG,kBAAkB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvE,MAAM,MAAM,qBAAqB,GAAG,kBAAkB,GAAG;IACvD,GAAG,EAAE,eAAe,CAAA;IACpB,KAAK,EAAE,SAAS,iBAAiB,EAAE,CAAA;CACpC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,MAAM,CAAC,YAAY,EAAE,kBAAkB,CAStF,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,KAAG,qBAAqB,EASzE,CAAA"}
1
+ {"version":3,"file":"document-type.utils.d.ts","sourceRoot":"","sources":["../../../src/documentTypes/utils/document-type.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,eAAe,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,YAAY,CAAA;AAGtG,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,YAAY,CAAA;AAExC,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAA;AAKnE,KAAK,sBAAsB,GAAG,IAAI,CAAC,kBAAkB,EAAE,KAAK,CAAC,CAAA;AAE7D,MAAM,MAAM,kBAAkB,GAAG,sBAAsB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAG3E,KAAK,qBAAqB,GAAG,sBAAsB,GAAG;IACpD,GAAG,EAAE,eAAe,CAAA;IACpB,KAAK,EAAE,SAAS,iBAAiB,EAAE,CAAA;CACpC,CAAA;AAED,MAAM,MAAM,qBAAqB,GAAG,qBAAqB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE7E;;;GAGG;AACH,eAAO,MAAM,gBAAgB,GAAI,MAAM,MAAM,KAAG,MAAM,CAAC,YAAY,EAAE,kBAAkB,CAStF,CAAA;AAUD,0GAA0G;AAC1G,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC,qBAAqB,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEtF,iHAAiH;AACjH,eAAO,MAAM,kBAAkB,GAAI,OAAO,iBAAiB,KAAG,qBAAqB,EAOlF,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,MAAM,MAAM,KAAG,qBAAqB,EAAkC,CAAA"}
@@ -3,10 +3,11 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
3
3
  return (mod && mod.__esModule) ? mod : { "default": mod };
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
- exports.getDocumentTypesByGeo = exports.getDocumentTypes = void 0;
6
+ exports.getDocumentTypesByGeo = exports.queryDocumentTypes = exports.getDocumentTypes = void 0;
7
7
  const catalog_1 = require("../catalog");
8
8
  const en_json_1 = __importDefault(require("../locales/en.json"));
9
9
  const es_mex_json_1 = __importDefault(require("../locales/es-mex.json"));
10
+ const catalog_query_utils_1 = require("../../utils/catalog-query.utils");
10
11
  const locales = { en: en_json_1.default, "es-mex": es_mex_json_1.default };
11
12
  /**
12
13
  * Documents indexed by code (definition + label). For the unique list (Object.values),
@@ -15,23 +16,30 @@ const locales = { en: en_json_1.default, "es-mex": es_mex_json_1.default };
15
16
  const getDocumentTypes = (lang) => {
16
17
  const locale = locales[lang];
17
18
  const result = {};
18
- for (const record of Object.values(catalog_1.DOCUMENT_TYPES)) {
19
- result[record.code] = { ...record, label: locale.documentTypes[record.code] };
19
+ for (const { code, minLength, maxLength, type } of Object.values(catalog_1.DOCUMENT_TYPES)) {
20
+ result[code] = { code, minLength, maxLength, type, label: locale.documentTypes[code] };
20
21
  }
21
22
  return result;
22
23
  };
23
24
  exports.getDocumentTypes = getDocumentTypes;
25
+ /** DOCUMENT_TYPES flattened by geo, one row per (code, geo) pair — no label, so it is what gets filtered. */
26
+ const flattenByGeo = () => Object.values(catalog_1.DOCUMENT_TYPES).flatMap(({ geo, ...record }) => {
27
+ const entries = Object.entries(geo);
28
+ return entries.map(([geoCode, usage]) => ({ ...record, geo: geoCode, usage }));
29
+ });
30
+ /** The catalog flattened by geo, narrowed by the query, each record enriched with its label for `query.lang`. */
31
+ const queryDocumentTypes = (query) => {
32
+ const { lang, ...filters } = query;
33
+ const docs = (0, exports.getDocumentTypes)(lang);
34
+ return flattenByGeo()
35
+ .filter(record => (0, catalog_query_utils_1.matchesQuery)(record, filters))
36
+ .map(record => ({ ...record, label: docs[record.code].label }));
37
+ };
38
+ exports.queryDocumentTypes = queryDocumentTypes;
24
39
  /**
25
40
  * Documents flattened by geo (definition + geo + usage + label). For per-country dropdowns;
26
41
  * a shared code repeats once per geo, so the consumer filters by geo/usage as needed.
27
42
  */
28
- const getDocumentTypesByGeo = (lang) => {
29
- const docs = (0, exports.getDocumentTypes)(lang);
30
- const geos = Object.keys(catalog_1.DOCUMENT_TYPES_BY_GEO);
31
- return geos.flatMap((geo) => {
32
- const entries = Object.entries(catalog_1.DOCUMENT_TYPES_BY_GEO[geo]);
33
- return entries.map(([code, usage]) => ({ ...docs[code], geo, usage }));
34
- });
35
- };
43
+ const getDocumentTypesByGeo = (lang) => (0, exports.queryDocumentTypes)({ lang });
36
44
  exports.getDocumentTypesByGeo = getDocumentTypesByGeo;
37
45
  //# sourceMappingURL=document-type.utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"document-type.utils.js","sourceRoot":"","sources":["../../../src/documentTypes/utils/document-type.utils.ts"],"names":[],"mappings":";;;;;;AAAA,wCAAkE;AAElE,iEAAyC;AACzC,yEAAgD;AAGhD,MAAM,OA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K,CAAA;IAClC,MAAM,IAAI,GAAG,IAAA,wBAAgB,EAAC,IAAI,CAAC,CAAA;IAEnC,OAAO,YAAY,EAAE;SAClB,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,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC,CAAC,CAAA;AACnE,CAAC,CAAA;AAPY,QAAA,kBAAkB,sBAO9B;AAED;;;GAGG;AACI,MAAM,qBAAqB,GAAG,CAAC,IAAY,EAA2B,EAAE,CAAC,IAAA,0BAAkB,EAAC,EAAE,IAAI,EAAE,CAAC,CAAA;AAA/F,QAAA,qBAAqB,yBAA0E"}
@@ -1,3 +1,4 @@
1
+ export type MovementTypeGroupLabel = "Stablecoin";
1
2
  export declare const MOVEMENT_TYPES: {
2
3
  readonly ach: {
3
4
  readonly code: "ach";
@@ -40,15 +41,18 @@ export declare const MOVEMENT_TYPES: {
40
41
  };
41
42
  readonly global: {
42
43
  readonly code: "global";
44
+ readonly groupLabel: "Stablecoin";
43
45
  };
44
46
  readonly r2p_spei: {
45
47
  readonly code: "r2p_spei";
46
48
  };
47
49
  readonly on_ramp: {
48
50
  readonly code: "on_ramp";
51
+ readonly groupLabel: "Stablecoin";
49
52
  };
50
53
  readonly off_ramp: {
51
54
  readonly code: "off_ramp";
55
+ readonly groupLabel: "Stablecoin";
52
56
  };
53
57
  readonly fedwire: {
54
58
  readonly code: "fedwire";
@@ -61,6 +65,7 @@ export declare const MOVEMENT_TYPES: {
61
65
  };
62
66
  readonly stable_payout: {
63
67
  readonly code: "stable_payout";
68
+ readonly groupLabel: "Stablecoin";
64
69
  };
65
70
  readonly breb: {
66
71
  readonly code: "breb";
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/movements/types/catalog.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwBjB,CAAA;AAEV,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,cAAc,CAAA;AACtD,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,YAAY,CAAC,CAAA"}
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/movements/types/catalog.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,sBAAsB,GAAG,YAAY,CAAA;AAEjD,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAwB+D,CAAA;AAE1F,MAAM,MAAM,YAAY,GAAG,MAAM,OAAO,cAAc,CAAA;AACtD,MAAM,MAAM,kBAAkB,GAAG,CAAC,OAAO,cAAc,CAAC,CAAC,YAAY,CAAC,CAAA"}
@@ -15,14 +15,14 @@ exports.MOVEMENT_TYPES = {
15
15
  r2p_breb: { code: "r2p_breb" },
16
16
  r2p_top_up_pse: { code: "r2p_top_up_pse" },
17
17
  r2p_top_up_bancolombia: { code: "r2p_top_up_bancolombia" },
18
- global: { code: "global" },
18
+ global: { code: "global", groupLabel: "Stablecoin" },
19
19
  r2p_spei: { code: "r2p_spei" },
20
- on_ramp: { code: "on_ramp" },
21
- off_ramp: { code: "off_ramp" },
20
+ on_ramp: { code: "on_ramp", groupLabel: "Stablecoin" },
21
+ off_ramp: { code: "off_ramp", groupLabel: "Stablecoin" },
22
22
  fedwire: { code: "fedwire" },
23
23
  global_pay_to_usa: { code: "global_pay_to_usa" },
24
24
  usa_pay_to_global: { code: "usa_pay_to_global" },
25
- stable_payout: { code: "stable_payout" },
25
+ stable_payout: { code: "stable_payout", groupLabel: "Stablecoin" },
26
26
  breb: { code: "breb" },
27
27
  global_pay_to_generic: { code: "global_pay_to_generic" },
28
28
  };
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../src/movements/types/catalog.ts"],"names":[],"mappings":";;;AAAa,QAAA,cAAc,GAAG;IAC5B,GAAG,EAAqB,EAAE,IAAI,EAAE,KAAK,EAAE;IACvC,QAAQ,EAAgB,EAAE,IAAI,EAAE,UAAU,EAAE;IAC5C,IAAI,EAAoB,EAAE,IAAI,EAAE,MAAM,EAAE;IACxC,SAAS,EAAe,EAAE,IAAI,EAAE,WAAW,EAAE;IAC7C,WAAW,EAAa,EAAE,IAAI,EAAE,aAAa,EAAE;IAC/C,GAAG,EAAqB,EAAE,IAAI,EAAE,KAAK,EAAE;IACvC,eAAe,EAAS,EAAE,IAAI,EAAE,iBAAiB,EAAE;IACnD,SAAS,EAAe,EAAE,IAAI,EAAE,WAAW,EAAE;IAC7C,OAAO,EAAiB,EAAE,IAAI,EAAE,SAAS,EAAE;IAC3C,YAAY,EAAY,EAAE,IAAI,EAAE,cAAc,EAAE;IAChD,QAAQ,EAAgB,EAAE,IAAI,EAAE,UAAU,EAAE;IAC5C,cAAc,EAAU,EAAE,IAAI,EAAE,gBAAgB,EAAE;IAClD,sBAAsB,EAAE,EAAE,IAAI,EAAE,wBAAwB,EAAE;IAC1D,MAAM,EAAkB,EAAE,IAAI,EAAE,QAAQ,EAAE;IAC1C,QAAQ,EAAgB,EAAE,IAAI,EAAE,UAAU,EAAE;IAC5C,OAAO,EAAiB,EAAE,IAAI,EAAE,SAAS,EAAE;IAC3C,QAAQ,EAAgB,EAAE,IAAI,EAAE,UAAU,EAAE;IAC5C,OAAO,EAAiB,EAAE,IAAI,EAAE,SAAS,EAAE;IAC3C,iBAAiB,EAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE;IACrD,iBAAiB,EAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE;IACrD,aAAa,EAAW,EAAE,IAAI,EAAE,eA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,IAAI,EAAE,mBAAmB,EAAE;IACrD,iBAAiB,EAAO,EAAE,IAAI,EAAE,mBAAmB,EAAE;IACrD,aAAa,EAAW,EAAE,IAAI,EAAE,eAAe,EAAE,UAAU,EAAE,YAAY,EAAE;IAC3E,IAAI,EAAoB,EAAE,IAAI,EAAE,MAAM,EAAE;IACxC,qBAAqB,EAAG,EAAE,IAAI,EAAE,uBAAuB,EAAE;CAC+B,CAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cobre-npm/library-portal-core",
3
- "version": "0.32.0",
3
+ "version": "0.34.0",
4
4
  "description": "Shared configurations and resources for Portal MFEs",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",