@cobre-npm/library-portal-core 0.36.0 → 0.38.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 (30) hide show
  1. package/README.md +31 -10
  2. package/dist/accounts/index.d.ts +2 -0
  3. package/dist/accounts/index.d.ts.map +1 -1
  4. package/dist/accounts/index.js +1 -0
  5. package/dist/accounts/index.js.map +1 -1
  6. package/dist/accounts/interfaces/response.interface.d.ts +3 -3
  7. package/dist/accounts/interfaces/response.interface.d.ts.map +1 -1
  8. package/dist/accounts/status/catalog.d.ts +29 -0
  9. package/dist/accounts/status/catalog.d.ts.map +1 -0
  10. package/dist/accounts/status/catalog.js +12 -0
  11. package/dist/accounts/status/catalog.js.map +1 -0
  12. package/dist/accounts/status/locales/en.json +10 -0
  13. package/dist/accounts/status/locales/es-mex.json +10 -0
  14. package/dist/accounts/status/utils/account-status.utils.d.ts +14 -0
  15. package/dist/accounts/status/utils/account-status.utils.d.ts.map +1 -0
  16. package/dist/accounts/status/utils/account-status.utils.js +28 -0
  17. package/dist/accounts/status/utils/account-status.utils.js.map +1 -0
  18. package/dist/movements/index.d.ts +1 -1
  19. package/dist/movements/index.d.ts.map +1 -1
  20. package/dist/movements/status/catalog.d.ts +24 -1
  21. package/dist/movements/status/catalog.d.ts.map +1 -1
  22. package/dist/movements/status/catalog.js +11 -11
  23. package/dist/movements/status/catalog.js.map +1 -1
  24. package/dist/movements/status/locales/en.json +15 -0
  25. package/dist/movements/status/locales/es-mex.json +15 -0
  26. package/dist/movements/status/utils/movement-status.utils.d.ts +15 -1
  27. package/dist/movements/status/utils/movement-status.utils.d.ts.map +1 -1
  28. package/dist/movements/status/utils/movement-status.utils.js +27 -2
  29. package/dist/movements/status/utils/movement-status.utils.js.map +1 -1
  30. package/package.json +1 -1
package/README.md CHANGED
@@ -35,7 +35,7 @@ import { getCountries } from "@cobre-npm/library-portal-core/countries"
35
35
 
36
36
  | Subpath | Contents |
37
37
  |---|---|
38
- | `@cobre-npm/library-portal-core/accounts` | Account providers and types + `Account` interfaces |
38
+ | `@cobre-npm/library-portal-core/accounts` | Account providers, types and statuses + `Account` interfaces |
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 |
@@ -136,15 +136,15 @@ one-off predicates even where `queryX()` exists.
136
136
  | Class | When | Signature | Examples |
137
137
  |---|---|---|---|
138
138
  | **With i18n** | the label depends on the language | `getX(lang)` | accountTypes, counterpartyTypes, movementTypes, transactionTypes, countries, countriesISO, documentTypes |
139
- | **Without i18n** | the label is fixed (or there is none) | `getX()` | currencies (inline label), accountProviders, movementStatus |
139
+ | **Without i18n** | the label is fixed (or there is none) | `getX()` | currencies (inline label), accountProviders |
140
140
 
141
- `currencies`/`providers`/`status` **don't take `lang`** because there's no translation — the signature is honest.
141
+ `currencies`/`providers` **don't take `lang`** because there's no translation — the signature is honest.
142
142
 
143
143
  ### Type convention
144
144
 
145
145
  - **`XOption`** = the catalog record **+ `label`** (what `getX(lang)` returns in i18n domains). This is the type
146
146
  consumers use to type results.
147
- - **`XRecord`** = the raw record. In non-i18n domains (currencies/providers/status) it is the result type
147
+ - **`XRecord`** = the raw record. In non-i18n domains (currencies/providers) it is the result type
148
148
  (the label is already inline); in i18n domains it is **internal** (only input to `XOption`) and is not exported.
149
149
  - **`X`** (e.g. `AccountType`, `Currency`) = the union of codes. Always public (for typing variables/params).
150
150
 
@@ -156,18 +156,26 @@ one-off predicates even where `queryX()` exists.
156
156
 
157
157
  ```ts
158
158
  import {
159
- getAccountTypes, getAccountProviders,
159
+ getAccountTypes, getAccountProviders, getAccountStatuses, queryAccountStatuses,
160
160
  type AccountType, type AccountTypeOption,
161
161
  type AccountProvider, type AccountProviderRecord,
162
+ type AccountStatus, type AccountStatusOption, type AccountStatusQuery,
162
163
  type Account, type AccountResponsePaginated, /* ... interfaces */
163
164
  } from "@cobre-npm/library-portal-core/accounts"
164
165
 
165
- getAccountTypes("en") // Record<AccountType, AccountTypeOption> → { ch: { code, geo, label }, ... }
166
- getAccountProviders() // Record<AccountProvider, AccountProviderRecord> (no i18n)
166
+ getAccountTypes("en") // Record<AccountType, AccountTypeOption> → { ch: { code, geo, label }, ... }
167
+ getAccountProviders() // Record<AccountProvider, AccountProviderRecord> (no i18n)
168
+ getAccountStatuses("en").closed // { code: "closed", type: "neutral", label: "Inactive" }
169
+ queryAccountStatuses({ lang: "en", type: "error" }) // [ disconnected, failed ] → the list a picker needs
167
170
  ```
168
171
 
169
172
  - **types** (i18n): `getAccountTypes(lang)`; each record carries `code`, `geo` (`Country[]`) and `label`.
170
173
  - **providers** (no i18n): `getAccountProviders()`.
174
+ - **status** (i18n): `getAccountStatuses(lang)`; account statuses (`creating`, `connected`, `connecting`,
175
+ `disconnected`, `failed`, `closed`). `queryAccountStatuses({ lang, ... })` returns the same catalog as a
176
+ **list**, narrowed by `code`/`type` — same matching rules as [`queryCurrencies`](#currencies), except
177
+ `lang` is required (i18n domain, no default) and lives inside the query object rather than as a
178
+ separate argument.
171
179
  - **interfaces**: `Account`, `AccountResponsePaginated`, `AccountMetadata`, `AccountConnectivity`,
172
180
  `ParamsGetAccounts`, `CreateAccountRequest`, `UpdateAccountRequest`, `AccountDropdownMapper`, …
173
181
 
@@ -214,14 +222,16 @@ hasCountryISOFlag("col") // true — whether a flag asset is avai
214
222
  import {
215
223
  getMovementTypes, queryMovementTypes, type MovementType, type MovementTypeGroupLabel,
216
224
  type MovementTypeOption, type MovementTypeQuery,
217
- getMovementStatuses, type MovementStatus, type MovementStatusRecord,
225
+ getMovementStatuses, queryMovementStatuses, type MovementStatus, type MovementStatusType,
226
+ type MovementStatusOption, type MovementStatusQuery,
218
227
  } from "@cobre-npm/library-portal-core/movements"
219
228
 
220
229
  getMovementTypes("en").ach.label // "ACH"
221
230
  getMovementTypes("en").on_ramp.groupLabel // "Stablecoin"
222
231
  getMovementTypes("en").on_ramp.label // "On Ramp" (individual label, unchanged)
223
232
  queryMovementTypes({ lang: "en", groupLabel: "Stablecoin" }) // global, off_ramp, on_ramp, stable_payout
224
- getMovementStatuses().completed // { code: "completed" } (no i18n)
233
+ getMovementStatuses("en").completed // { code: "completed", label: "Completed", type: "success", icon: "icon-check" }
234
+ queryMovementStatuses({ lang: "en", type: "error" }) // error, failed, rejected — localized
225
235
  ```
226
236
 
227
237
  - **types** (i18n): movement types (ACH, SPEI, R2P, …). `on_ramp`/`off_ramp`/`stable_payout`/`global`
@@ -239,7 +249,18 @@ getMovementStatuses().completed // { code: "completed" }
239
249
  ```ts
240
250
  queryMovementTypes({ lang, ...(group.value ? { groupLabel: group.value } : {}) })
241
251
  ```
242
- - **status** (no i18n): movement statuses (`initiated`, `processing`, `completed`, …).
252
+ - **status** (i18n): movement statuses (`initiated`, `processing`, `completed`, …). Each record also
253
+ carries `type: MovementStatusType` (`success | warning | error | info | neutral | pending`) — a
254
+ Design-System-agnostic classification, not a UI component's prop value. Note it's `pending`, not
255
+ `status-pending`: the latter is a `ds-v3` `CobreBadge` variant name, and using it would tie this
256
+ library to that Design System. Mapping `type` to an actual badge variant/CSS class is each consumer's
257
+ job. `icon` is present on 9 of the 11 statuses (`under_review` and `pending_funds` have none) — unlike
258
+ `type`, `icon` **is** coupled to the portal's current icon set (its values are that set's class names);
259
+ a consumer without it should map its own icon from `code`/`type` instead.
260
+ - **status query** (i18n `queryX()`): `queryMovementStatuses({ lang, ...filters })` — `code` and `type`
261
+ are the filterable fields; there's no `label` filter, same as every other `queryX()` here. `type` is
262
+ the real use case: `queryMovementStatuses({ lang, type: "error" })` returns `error`, `failed`,
263
+ `rejected`, replacing a hand-maintained list of codes with a query.
243
264
 
244
265
  ### `subclients`
245
266
 
@@ -2,6 +2,8 @@ export type { AccountProvider, AccountProviderRecord } from "./providers/catalog
2
2
  export * from "./providers/utils/account-provider.utils";
3
3
  export type { AccountType } from "./types/catalog";
4
4
  export * from "./types/utils/account-type.utils";
5
+ export type { AccountStatus } from "./status/catalog";
6
+ export * from "./status/utils/account-status.utils";
5
7
  export * from "./interfaces/response.interface";
6
8
  export * from "./interfaces/params.interface";
7
9
  export * from "./interfaces/request.interface";
@@ -1 +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"}
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,YAAY,EAAE,aAAa,EAAE,MAAM,kBAAkB,CAAA;AACrD,cAAc,qCAAqC,CAAA;AAEnD,cAAc,iCAAiC,CAAA;AAC/C,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA;AAC9C,cAAc,gCAAgC,CAAA"}
@@ -16,6 +16,7 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  __exportStar(require("./providers/utils/account-provider.utils"), exports);
18
18
  __exportStar(require("./types/utils/account-type.utils"), exports);
19
+ __exportStar(require("./status/utils/account-status.utils"), exports);
19
20
  __exportStar(require("./interfaces/response.interface"), exports);
20
21
  __exportStar(require("./interfaces/params.interface"), exports);
21
22
  __exportStar(require("./interfaces/request.interface"), exports);
@@ -1 +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"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/accounts/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AACA,2EAAwD;AAGxD,mEAAgD;AAGhD,sEAAmD;AAEnD,kEAA+C;AAC/C,gEAA6C;AAC7C,iEAA8C;AAC9C,iEAA8C"}
@@ -2,6 +2,7 @@ import type { AccountProvider } from "../providers/catalog";
2
2
  import type { Country } from "../../countries/base/catalog";
3
3
  import type { Currency } from "../../currencies/catalog";
4
4
  import type { AccountType } from "../types/catalog";
5
+ import type { AccountStatus } from "../status/catalog";
5
6
  export interface AccountResponsePaginated<T = Account> {
6
7
  total_items: number;
7
8
  total_pages: number;
@@ -15,7 +16,7 @@ export interface Account {
15
16
  provider_id?: AccountProvider;
16
17
  provider_name: string;
17
18
  connectivity?: AccountConnectivity;
18
- connectivity_status?: AccountConnectivityStatus;
19
+ connectivity_status?: AccountStatus;
19
20
  connectivity_description?: string;
20
21
  alias?: string;
21
22
  metadata?: AccountMetadata;
@@ -45,9 +46,8 @@ export interface AccountMetadata {
45
46
  token?: Currency;
46
47
  token_symbol?: string;
47
48
  }
48
- export type AccountConnectivityStatus = "creating" | "connected" | "connecting" | "disconnected" | "failed" | "closed";
49
49
  export interface AccountConnectivity {
50
- status?: AccountConnectivityStatus;
50
+ status?: AccountStatus;
51
51
  description: string;
52
52
  }
53
53
  //# sourceMappingURL=response.interface.d.ts.map
@@ -1 +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"}
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;AACnD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAEtD,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,aAAa,CAAA;IACnC,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,WAAW,mBAAmB;IAClC,MAAM,CAAC,EAAE,aAAa,CAAA;IACtB,WAAW,EAAE,MAAM,CAAA;CACpB"}
@@ -0,0 +1,29 @@
1
+ export declare const ACCOUNT_STATUSES: {
2
+ readonly connected: {
3
+ readonly code: "connected";
4
+ readonly type: "success";
5
+ };
6
+ readonly connecting: {
7
+ readonly code: "connecting";
8
+ readonly type: "info";
9
+ };
10
+ readonly disconnected: {
11
+ readonly code: "disconnected";
12
+ readonly type: "error";
13
+ };
14
+ readonly creating: {
15
+ readonly code: "creating";
16
+ readonly type: "info";
17
+ };
18
+ readonly failed: {
19
+ readonly code: "failed";
20
+ readonly type: "error";
21
+ };
22
+ readonly closed: {
23
+ readonly code: "closed";
24
+ readonly type: "neutral";
25
+ };
26
+ };
27
+ export type AccountStatus = keyof typeof ACCOUNT_STATUSES;
28
+ export type AccountStatusRecord = (typeof ACCOUNT_STATUSES)[AccountStatus];
29
+ //# sourceMappingURL=catalog.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/accounts/status/catalog.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;CAOnB,CAAA;AAEV,MAAM,MAAM,aAAa,GAAG,MAAM,OAAO,gBAAgB,CAAA;AACzD,MAAM,MAAM,mBAAmB,GAAG,CAAC,OAAO,gBAAgB,CAAC,CAAC,aAAa,CAAC,CAAA"}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ACCOUNT_STATUSES = void 0;
4
+ exports.ACCOUNT_STATUSES = {
5
+ connected: { code: "connected", type: "success" },
6
+ connecting: { code: "connecting", type: "info" },
7
+ disconnected: { code: "disconnected", type: "error" },
8
+ creating: { code: "creating", type: "info" },
9
+ failed: { code: "failed", type: "error" },
10
+ closed: { code: "closed", type: "neutral" }
11
+ };
12
+ //# sourceMappingURL=catalog.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../src/accounts/status/catalog.ts"],"names":[],"mappings":";;;AAAa,QAAA,gBAAgB,GAAG;IAC9B,SAAS,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE;IACjD,UAAU,EAAE,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE;IAChD,YAAY,EAAE,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,OAAO,EAAE;IACrD,QAAQ,EAAE,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,EAAE;IAC5C,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE;IACzC,MAAM,EAAE,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,SAAS,EAAE;CACnC,CAAA"}
@@ -0,0 +1,10 @@
1
+ {
2
+ "accountStatuses": {
3
+ "connected": "Connected",
4
+ "connecting": "Connecting",
5
+ "disconnected": "Disconnected",
6
+ "creating": "Creating account",
7
+ "failed": "Connection error",
8
+ "closed": "Inactive"
9
+ }
10
+ }
@@ -0,0 +1,10 @@
1
+ {
2
+ "accountStatuses": {
3
+ "connected": "Conectada",
4
+ "connecting": "En conexión",
5
+ "disconnected": "Desconectada",
6
+ "creating": "Creando la cuenta",
7
+ "failed": "Error de conexión",
8
+ "closed": "Inactiva"
9
+ }
10
+ }
@@ -0,0 +1,14 @@
1
+ import type { AccountStatus, AccountStatusRecord } from "../catalog";
2
+ import type { Locale } from "../../../lang";
3
+ import type { CatalogQuery } from "../../../utils/catalog-query.utils";
4
+ export type AccountStatusOption = AccountStatusRecord & {
5
+ label: string;
6
+ };
7
+ export declare const getAccountStatuses: (lang: Locale) => Record<AccountStatus, AccountStatusOption>;
8
+ /** `lang` is required (i18n domain, no default) and travels inside the query object, never positional. */
9
+ export type AccountStatusQuery = CatalogQuery<AccountStatusRecord> & {
10
+ lang: Locale;
11
+ };
12
+ /** The catalog as a list, narrowed by the query — see `matchesQuery` for the matching rules. */
13
+ export declare const queryAccountStatuses: (query: AccountStatusQuery) => AccountStatusOption[];
14
+ //# sourceMappingURL=account-status.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-status.utils.d.ts","sourceRoot":"","sources":["../../../../src/accounts/status/utils/account-status.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,mBAAmB,EAAE,MAAM,YAAY,CAAA;AAGpE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AAItE,MAAM,MAAM,mBAAmB,GAAG,mBAAmB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAEzE,eAAO,MAAM,kBAAkB,GAAI,MAAM,MAAM,KAAG,MAAM,CAAC,aAAa,EAAE,mBAAmB,CAS1F,CAAA;AAED,0GAA0G;AAC1G,MAAM,MAAM,kBAAkB,GAAG,YAAY,CAAC,mBAAmB,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAErF,gGAAgG;AAChG,eAAO,MAAM,oBAAoB,GAAI,OAAO,kBAAkB,KAAG,mBAAmB,EAKnF,CAAA"}
@@ -0,0 +1,28 @@
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.queryAccountStatuses = exports.getAccountStatuses = 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
+ const getAccountStatuses = (lang) => {
13
+ const locale = locales[lang];
14
+ const result = {};
15
+ for (const record of Object.values(catalog_1.ACCOUNT_STATUSES)) {
16
+ result[record.code] = { ...record, label: locale.accountStatuses[record.code] };
17
+ }
18
+ return result;
19
+ };
20
+ exports.getAccountStatuses = getAccountStatuses;
21
+ /** The catalog as a list, narrowed by the query — see `matchesQuery` for the matching rules. */
22
+ const queryAccountStatuses = (query) => {
23
+ const { lang, ...criteria } = query;
24
+ const statuses = (0, exports.getAccountStatuses)(lang);
25
+ return Object.values(statuses).filter(status => (0, catalog_query_utils_1.matchesQuery)(status, criteria));
26
+ };
27
+ exports.queryAccountStatuses = queryAccountStatuses;
28
+ //# sourceMappingURL=account-status.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"account-status.utils.js","sourceRoot":"","sources":["../../../../src/accounts/status/utils/account-status.utils.ts"],"names":[],"mappings":";;;;;;AAAA,wCAA6C;AAE7C,iEAAyC;AACzC,yEAAgD;AAEhD,4EAAiE;AAGjE,MAAM,OAAO,GAAuC,EAAE,EAAE,EAAE,iBAAQ,EAAE,QAAQ,EAAE,qBAAW,EAAE,CAAA;AAIpF,MAAM,kBAAkB,GAAG,CAAC,IAAY,EAA8C,EAAE;IAC7F,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,MAAM,MAAM,GAAG,EAAgD,CAAA;IAE/D,KAAK,MAAM,MAAM,IAAI,MAAM,CAAC,MAAM,CAAC,0BAAgB,CAAC,EAAE,CAAC;QACrD,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,GAAG,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,eAAe,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAA;IACjF,CAAC;IAED,OAAO,MAAM,CAAA;AACf,CAAC,CAAA;AATY,QAAA,kBAAkB,sBAS9B;AAKD,gGAAgG;AACzF,MAAM,oBAAoB,GAAG,CAAC,KAAyB,EAAyB,EAAE;IACvF,MAAM,EAAE,IAAI,EAAE,GAAG,QAAQ,EAAE,GAAG,KAAK,CAAA;IACnC,MAAM,QAAQ,GAAG,IAAA,0BAAkB,EAAC,IAAI,CAAC,CAAA;IAEzC,OAAO,MAAM,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,EAAE,CAAC,IAAA,kCAAY,EAAC,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAA;AACjF,CAAC,CAAA;AALY,QAAA,oBAAoB,wBAKhC"}
@@ -1,5 +1,5 @@
1
1
  export type { MovementType, MovementTypeGroup, MovementTypeGroupLabel } from "./types/catalog";
2
2
  export * from "./types/utils/movement-type.utils";
3
- export type { MovementStatus, MovementStatusRecord } from "./status/catalog";
3
+ export type { MovementStatus, MovementStatusType } from "./status/catalog";
4
4
  export * from "./status/utils/movement-status.utils";
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/movements/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAC9F,cAAc,mCAAmC,CAAA;AAEjD,YAAY,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,kBAAkB,CAAA;AAC5E,cAAc,sCAAsC,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/movements/index.ts"],"names":[],"mappings":"AAAA,YAAY,EAAE,YAAY,EAAE,iBAAiB,EAAE,sBAAsB,EAAE,MAAM,iBAAiB,CAAA;AAC9F,cAAc,mCAAmC,CAAA;AAEjD,YAAY,EAAE,cAAc,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAC1E,cAAc,sCAAsC,CAAA"}
@@ -1,38 +1,61 @@
1
+ export type MovementStatusType = "success" | "warning" | "error" | "info" | "neutral" | "pending";
1
2
  export declare const MOVEMENT_STATUSES: {
2
3
  readonly initiated: {
3
4
  readonly code: "initiated";
5
+ readonly type: "info";
6
+ readonly icon: "icon-hourglass-03";
4
7
  };
5
8
  readonly processing: {
6
9
  readonly code: "processing";
10
+ readonly type: "info";
11
+ readonly icon: "icon-refresh-ccw-02";
7
12
  };
8
13
  readonly completed: {
9
14
  readonly code: "completed";
15
+ readonly type: "success";
16
+ readonly icon: "icon-check";
10
17
  };
11
18
  readonly canceled: {
12
19
  readonly code: "canceled";
20
+ readonly type: "neutral";
21
+ readonly icon: "icon-x-circle";
13
22
  };
14
23
  readonly under_review: {
15
24
  readonly code: "under_review";
25
+ readonly type: "warning";
16
26
  };
17
27
  readonly returned: {
18
28
  readonly code: "returned";
29
+ readonly type: "neutral";
30
+ readonly icon: "icon-flip-backward";
19
31
  };
20
32
  readonly rejected: {
21
33
  readonly code: "rejected";
34
+ readonly type: "error";
35
+ readonly icon: "icon-file-question-01";
22
36
  };
23
37
  readonly failed: {
24
38
  readonly code: "failed";
39
+ readonly type: "error";
40
+ readonly icon: "icon-file-x-01";
25
41
  };
26
42
  readonly pending_approval: {
27
43
  readonly code: "pending_approval";
44
+ readonly type: "pending";
45
+ readonly icon: "icon-file-question-01";
28
46
  };
29
47
  readonly pending_funds: {
30
48
  readonly code: "pending_funds";
49
+ readonly type: "warning";
31
50
  };
32
51
  readonly error: {
33
52
  readonly code: "error";
53
+ readonly type: "error";
54
+ readonly icon: "icon-file-x-03";
34
55
  };
35
56
  };
36
57
  export type MovementStatus = keyof typeof MOVEMENT_STATUSES;
37
- export type MovementStatusRecord = (typeof MOVEMENT_STATUSES)[MovementStatus];
58
+ export type MovementStatusRecord = (typeof MOVEMENT_STATUSES)[MovementStatus] & {
59
+ readonly icon?: string;
60
+ };
38
61
  //# sourceMappingURL=catalog.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/movements/status/catalog.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYpB,CAAA;AAEV,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAC3D,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,cAAc,CAAC,CAAA"}
1
+ {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../../src/movements/status/catalog.ts"],"names":[],"mappings":"AASA,MAAM,MAAM,kBAAkB,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,GAAG,SAAS,GAAG,SAAS,CAAA;AAEjG,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAYgE,CAAA;AAE9F,MAAM,MAAM,cAAc,GAAG,MAAM,OAAO,iBAAiB,CAAA;AAM3D,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,iBAAiB,CAAC,CAAC,cAAc,CAAC,GAC3E;IAAE,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,CAAA"}
@@ -2,16 +2,16 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MOVEMENT_STATUSES = void 0;
4
4
  exports.MOVEMENT_STATUSES = {
5
- initiated: { code: "initiated" },
6
- processing: { code: "processing" },
7
- completed: { code: "completed" },
8
- canceled: { code: "canceled" },
9
- under_review: { code: "under_review" },
10
- returned: { code: "returned" },
11
- rejected: { code: "rejected" },
12
- failed: { code: "failed" },
13
- pending_approval: { code: "pending_approval" },
14
- pending_funds: { code: "pending_funds" },
15
- error: { code: "error" },
5
+ initiated: { code: "initiated", type: "info", icon: "icon-hourglass-03" },
6
+ processing: { code: "processing", type: "info", icon: "icon-refresh-ccw-02" },
7
+ completed: { code: "completed", type: "success", icon: "icon-check" },
8
+ canceled: { code: "canceled", type: "neutral", icon: "icon-x-circle" },
9
+ under_review: { code: "under_review", type: "warning" },
10
+ returned: { code: "returned", type: "neutral", icon: "icon-flip-backward" },
11
+ rejected: { code: "rejected", type: "error", icon: "icon-file-question-01" },
12
+ failed: { code: "failed", type: "error", icon: "icon-file-x-01" },
13
+ pending_approval: { code: "pending_approval", type: "pending", icon: "icon-file-question-01" },
14
+ pending_funds: { code: "pending_funds", type: "warning" },
15
+ error: { code: "error", type: "error", icon: "icon-file-x-03" },
16
16
  };
17
17
  //# sourceMappingURL=catalog.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../src/movements/status/catalog.ts"],"names":[],"mappings":";;;AAAa,QAAA,iBAAiB,GAAG;IAC/B,SAAS,EAAU,EAAE,IAAI,EAAE,WAAW,EAAE;IACxC,UAAU,EAAS,EAAE,IAAI,EAAE,YAAY,EAAE;IACzC,SAAS,EAAU,EAAE,IAAI,EAAE,WAAW,EAAE;IACxC,QAAQ,EAAW,EAAE,IAAI,EAAE,UAAU,EAAE;IACvC,YAAY,EAAO,EAAE,IAAI,EAAE,cAAc,EAAE;IAC3C,QAAQ,EAAW,EAAE,IAAI,EAAE,UAAU,EAAE;IACvC,QAAQ,EAAW,EAAE,IAAI,EAAE,UAAU,EAAE;IACvC,MAAM,EAAa,EAAE,IAAI,EAAE,QAAQ,EAAE;IACrC,gBAAgB,EAAG,EAAE,IAAI,EAAE,kBAAkB,EAAE;IAC/C,aAAa,EAAM,EAAE,IAAI,EAAE,eAAe,EAAE;IAC5C,KAAK,EAAc,EAAE,IAAI,EAAE,OAAO,EAAE;CAC5B,CAAA"}
1
+ {"version":3,"file":"catalog.js","sourceRoot":"","sources":["../../../src/movements/status/catalog.ts"],"names":[],"mappings":";;;AAWa,QAAA,iBAAiB,GAAG;IAC/B,SAAS,EAAU,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,mBAAmB,EAAE;IACjF,UAAU,EAAS,EAAE,IAAI,EAAE,YAAY,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,qBAAqB,EAAE;IACpF,SAAS,EAAU,EAAE,IAAI,EAAE,WAAW,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,YAAY,EAAE;IAC7E,QAAQ,EAAW,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,eAAe,EAAE;IAC/E,YAAY,EAAO,EAAE,IAAI,EAAE,cAAc,EAAE,IAAI,EAAE,SAAS,EAAE;IAC5D,QAAQ,EAAW,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,oBAAoB,EAAE;IACpF,QAAQ,EAAW,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,uBAAuB,EAAE;IACrF,MAAM,EAAa,EAAE,IAAI,EAAE,QAAQ,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE;IAC5E,gBAAgB,EAAG,EAAE,IAAI,EAAE,kBAAkB,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,uBAAuB,EAAE;IAC/F,aAAa,EAAM,EAAE,IAAI,EAAE,eAAe,EAAE,IAAI,EAAE,SAAS,EAAE;IAC7D,KAAK,EAAc,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,gBAAgB,EAAE;CACiB,CAAA"}
@@ -0,0 +1,15 @@
1
+ {
2
+ "movementStatuses": {
3
+ "initiated": "Initiated",
4
+ "processing": "Processing",
5
+ "completed": "Completed",
6
+ "canceled": "Canceled",
7
+ "under_review": "Under Review",
8
+ "returned": "Returned",
9
+ "rejected": "Rejected",
10
+ "failed": "Failed",
11
+ "pending_approval": "Pending Approval",
12
+ "pending_funds": "Waiting funds",
13
+ "error": "Error"
14
+ }
15
+ }
@@ -0,0 +1,15 @@
1
+ {
2
+ "movementStatuses": {
3
+ "initiated": "Iniciado",
4
+ "processing": "Procesando",
5
+ "completed": "Completado",
6
+ "canceled": "Cancelado",
7
+ "under_review": "Bajo revisión",
8
+ "returned": "Devuelto",
9
+ "rejected": "Rechazado",
10
+ "failed": "Fallido",
11
+ "pending_approval": "Por aprobar",
12
+ "pending_funds": "Esperando fondos",
13
+ "error": "Error"
14
+ }
15
+ }
@@ -1,3 +1,17 @@
1
1
  import type { MovementStatus, MovementStatusRecord } from "../catalog";
2
- export declare const getMovementStatuses: () => Record<MovementStatus, MovementStatusRecord>;
2
+ import type { Locale } from "../../../lang";
3
+ import type { CatalogQuery } from "../../../utils/catalog-query.utils";
4
+ export type MovementStatusOption = MovementStatusRecord & {
5
+ label: string;
6
+ };
7
+ export declare const getMovementStatuses: (lang: Locale) => Record<MovementStatus, MovementStatusOption>;
8
+ /** i18n domain: `lang` is required, inside the query object — see matchesQuery for the matching rules. */
9
+ export type MovementStatusQuery = CatalogQuery<MovementStatusRecord> & {
10
+ lang: Locale;
11
+ };
12
+ /**
13
+ * The catalog as a list narrowed by the query, each record enriched with its label for `query.lang`.
14
+ * `code` is the only filterable field — `label` is display text, added after filtering, never a query key.
15
+ */
16
+ export declare const queryMovementStatuses: (query: MovementStatusQuery) => MovementStatusOption[];
3
17
  //# sourceMappingURL=movement-status.utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"movement-status.utils.d.ts","sourceRoot":"","sources":["../../../../src/movements/status/utils/movement-status.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAEtE,eAAO,MAAM,mBAAmB,QAAO,MAAM,CAAC,cAAc,EAAE,oBAAoB,CAAsB,CAAA"}
1
+ {"version":3,"file":"movement-status.utils.d.ts","sourceRoot":"","sources":["../../../../src/movements/status/utils/movement-status.utils.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AAGtE,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,eAAe,CAAA;AAE3C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,oCAAoC,CAAA;AAItE,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,GAAG;IAAE,KAAK,EAAE,MAAM,CAAA;CAAE,CAAA;AAE3E,eAAO,MAAM,mBAAmB,GAAI,MAAM,MAAM,KAAG,MAAM,CAAC,cAAc,EAAE,oBAAoB,CAS7F,CAAA;AAED,0GAA0G;AAC1G,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,oBAAoB,CAAC,GAAG;IAAE,IAAI,EAAE,MAAM,CAAA;CAAE,CAAA;AAEvF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,OAAO,mBAAmB,KAAG,oBAAoB,EAMtF,CAAA"}
@@ -1,7 +1,32 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getMovementStatuses = void 0;
6
+ exports.queryMovementStatuses = exports.getMovementStatuses = void 0;
4
7
  const catalog_1 = require("../catalog");
5
- const getMovementStatuses = () => catalog_1.MOVEMENT_STATUSES;
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
+ const getMovementStatuses = (lang) => {
13
+ const locale = locales[lang];
14
+ const result = {};
15
+ for (const record of Object.values(catalog_1.MOVEMENT_STATUSES)) {
16
+ result[record.code] = { ...record, label: locale.movementStatuses[record.code] };
17
+ }
18
+ return result;
19
+ };
6
20
  exports.getMovementStatuses = getMovementStatuses;
21
+ /**
22
+ * The catalog as a list narrowed by the query, each record enriched with its label for `query.lang`.
23
+ * `code` is the only filterable field — `label` is display text, added after filtering, never a query key.
24
+ */
25
+ const queryMovementStatuses = (query) => {
26
+ const { lang, ...filters } = query;
27
+ return Object.values(catalog_1.MOVEMENT_STATUSES)
28
+ .filter(record => (0, catalog_query_utils_1.matchesQuery)(record, filters))
29
+ .map(record => ({ ...record, label: locales[lang].movementStatuses[record.code] }));
30
+ };
31
+ exports.queryMovementStatuses = queryMovementStatuses;
7
32
  //# sourceMappingURL=movement-status.utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"movement-status.utils.js","sourceRoot":"","sources":["../../../../src/movements/status/utils/movement-status.utils.ts"],"names":[],"mappings":";;;AAAA,wCAA8C;AAGvC,MAAM,mBAAmB,GAAG,GAAiD,EAAE,CAAC,2BAAiB,CAAA;AAA3F,QAAA,mBAAmB,uBAAwE"}
1
+ {"version":3,"file":"movement-status.utils.js","sourceRoot":"","sources":["../../../../src/movements/status/utils/movement-status.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;AAIpF,MAAM,mBAAmB,GAAG,CAAC,IAAY,EAAgD,EAAE;IAChG,MAAM,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;IAC5B,MAAM,MAAM,GAAG,EAAkD,CAAA;IAEjE,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;;;GAGG;AACI,MAAM,qBAAqB,GAAG,CAAC,KAA0B,EAA0B,EAAE;IAC1F,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.36.0",
3
+ "version": "0.38.0",
4
4
  "description": "Shared configurations and resources for Portal MFEs",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",