@temboplus/frontend-core 1.0.1 → 1.0.2

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.
@@ -1,23 +1,44 @@
1
1
  import type { ISO2CountryCode } from "@domain/country/country.types.js";
2
2
  import type { CurrencyCode } from "@domain/currency/currency.types.js";
3
3
  import type { TransactionDirection } from "@domain/channel/channel.enums.js";
4
+ import { z } from "zod";
4
5
  /**
5
6
  * Tanzania mobile-money provider IDs.
6
7
  * Keep this in sync with src/data/mobile-money/tz.json.
7
8
  */
8
- export type TZMobileMoneyProviderId = "VODACOM" | "AIRTEL" | "TIGO" | "HALOTEL";
9
+ export declare const TZ_MOBILE_MONEY_PROVIDER_IDS: readonly ["VODACOM", "AIRTEL", "TIGO", "HALOTEL"];
9
10
  /**
10
11
  * Kenya mobile-money provider IDs.
11
12
  * Keep this in sync with src/data/mobile-money/ke.json.
12
13
  */
13
- export type KEMobileMoneyProviderId = "SAFARICOM";
14
+ export declare const KE_MOBILE_MONEY_PROVIDER_IDS: readonly ["SAFARICOM"];
15
+ /**
16
+ * Tanzania mobile-money provider ID schema.
17
+ */
18
+ export declare const TZMobileMoneyProviderIdSchema: z.ZodEnum<["VODACOM", "AIRTEL", "TIGO", "HALOTEL"]>;
19
+ /**
20
+ * Kenya mobile-money provider ID schema.
21
+ */
22
+ export declare const KEMobileMoneyProviderIdSchema: z.ZodEnum<["SAFARICOM"]>;
23
+ /**
24
+ * Stable Tembo identifier for any supported mobile-money provider.
25
+ */
26
+ export declare const MobileMoneyProviderIdSchema: z.ZodUnion<[z.ZodEnum<["VODACOM", "AIRTEL", "TIGO", "HALOTEL"]>, z.ZodEnum<["SAFARICOM"]>]>;
27
+ /**
28
+ * Tanzania mobile-money provider IDs.
29
+ */
30
+ export type TZMobileMoneyProviderId = (typeof TZ_MOBILE_MONEY_PROVIDER_IDS)[number];
31
+ /**
32
+ * Kenya mobile-money provider IDs.
33
+ */
34
+ export type KEMobileMoneyProviderId = (typeof KE_MOBILE_MONEY_PROVIDER_IDS)[number];
14
35
  /**
15
36
  * Stable Tembo identifier for any supported mobile-money provider.
16
37
  *
17
38
  * Combines the per-country provider unions so a value of this type is
18
39
  * guaranteed to refer to a real provider in the package's dataset.
19
40
  */
20
- export type MobileMoneyProviderId = TZMobileMoneyProviderId | KEMobileMoneyProviderId;
41
+ export type MobileMoneyProviderId = z.infer<typeof MobileMoneyProviderIdSchema>;
21
42
  export interface MobileMoneyProviderData {
22
43
  id: MobileMoneyProviderId;
23
44
  displayName: string;
@@ -1,4 +1,5 @@
1
1
  import { z } from "zod";
2
+ export declare const E164PhoneNumberFormatSchema: z.ZodString;
2
3
  /**
3
4
  * Compact JSON identity for a PhoneNumber, sufficient to re-resolve the value
4
5
  * via PhoneNumberFactory.