@temboplus/afloat 0.1.65 → 0.1.68

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.
@@ -15,20 +15,20 @@ export declare const contract: {
15
15
  displayName: z.ZodString;
16
16
  accountNo: z.ZodString;
17
17
  channel: z.ZodString;
18
- countryCode: z.ZodDefault<z.ZodString>;
18
+ countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
19
19
  type: z.ZodNativeEnum<typeof import("./contact.dtos").ContactType>;
20
20
  }, "strip", z.ZodTypeAny, {
21
21
  type: import("./contact.dtos").ContactType;
22
22
  displayName: string;
23
23
  accountNo: string;
24
24
  channel: string;
25
- countryCode: string;
25
+ countryCode?: string | null | undefined;
26
26
  }, {
27
27
  type: import("./contact.dtos").ContactType;
28
28
  displayName: string;
29
29
  accountNo: string;
30
30
  channel: string;
31
- countryCode?: string | undefined;
31
+ countryCode?: string | null | undefined;
32
32
  }>;
33
33
  path: "/";
34
34
  responses: {
@@ -42,7 +42,7 @@ export declare const contract: {
42
42
  displayName: z.ZodString;
43
43
  accountNo: z.ZodString;
44
44
  channel: z.ZodString;
45
- countryCode: z.ZodDefault<z.ZodString>;
45
+ countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
46
  type: z.ZodNativeEnum<typeof import("./contact.dtos").ContactType>;
47
47
  }, "strip", z.ZodTypeAny, {
48
48
  type: import("./contact.dtos").ContactType;
@@ -51,9 +51,9 @@ export declare const contract: {
51
51
  accountNo: string;
52
52
  channel: string;
53
53
  profileId: string;
54
- countryCode: string;
55
54
  createdAt: string;
56
55
  updatedAt: string;
56
+ countryCode?: string | null | undefined;
57
57
  }, {
58
58
  type: import("./contact.dtos").ContactType;
59
59
  id: string;
@@ -63,7 +63,7 @@ export declare const contract: {
63
63
  profileId: string;
64
64
  createdAt: string;
65
65
  updatedAt: string;
66
- countryCode?: string | undefined;
66
+ countryCode?: string | null | undefined;
67
67
  }>;
68
68
  };
69
69
  };
@@ -73,20 +73,20 @@ export declare const contract: {
73
73
  displayName: z.ZodString;
74
74
  accountNo: z.ZodString;
75
75
  channel: z.ZodString;
76
- countryCode: z.ZodDefault<z.ZodString>;
76
+ countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
77
77
  type: z.ZodNativeEnum<typeof import("./contact.dtos").ContactType>;
78
78
  }, "strip", z.ZodTypeAny, {
79
79
  type: import("./contact.dtos").ContactType;
80
80
  displayName: string;
81
81
  accountNo: string;
82
82
  channel: string;
83
- countryCode: string;
83
+ countryCode?: string | null | undefined;
84
84
  }, {
85
85
  type: import("./contact.dtos").ContactType;
86
86
  displayName: string;
87
87
  accountNo: string;
88
88
  channel: string;
89
- countryCode?: string | undefined;
89
+ countryCode?: string | null | undefined;
90
90
  }>;
91
91
  path: "/:id";
92
92
  responses: {
@@ -100,7 +100,7 @@ export declare const contract: {
100
100
  displayName: z.ZodString;
101
101
  accountNo: z.ZodString;
102
102
  channel: z.ZodString;
103
- countryCode: z.ZodDefault<z.ZodString>;
103
+ countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
104
104
  type: z.ZodNativeEnum<typeof import("./contact.dtos").ContactType>;
105
105
  }, "strip", z.ZodTypeAny, {
106
106
  type: import("./contact.dtos").ContactType;
@@ -109,9 +109,9 @@ export declare const contract: {
109
109
  accountNo: string;
110
110
  channel: string;
111
111
  profileId: string;
112
- countryCode: string;
113
112
  createdAt: string;
114
113
  updatedAt: string;
114
+ countryCode?: string | null | undefined;
115
115
  }, {
116
116
  type: import("./contact.dtos").ContactType;
117
117
  id: string;
@@ -121,7 +121,7 @@ export declare const contract: {
121
121
  profileId: string;
122
122
  createdAt: string;
123
123
  updatedAt: string;
124
- countryCode?: string | undefined;
124
+ countryCode?: string | null | undefined;
125
125
  }>;
126
126
  };
127
127
  };
@@ -146,7 +146,7 @@ export declare const contract: {
146
146
  displayName: z.ZodString;
147
147
  accountNo: z.ZodString;
148
148
  channel: z.ZodString;
149
- countryCode: z.ZodDefault<z.ZodString>;
149
+ countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
150
150
  type: z.ZodNativeEnum<typeof import("./contact.dtos").ContactType>;
151
151
  }, "strip", z.ZodTypeAny, {
152
152
  type: import("./contact.dtos").ContactType;
@@ -155,9 +155,9 @@ export declare const contract: {
155
155
  accountNo: string;
156
156
  channel: string;
157
157
  profileId: string;
158
- countryCode: string;
159
158
  createdAt: string;
160
159
  updatedAt: string;
160
+ countryCode?: string | null | undefined;
161
161
  }, {
162
162
  type: import("./contact.dtos").ContactType;
163
163
  id: string;
@@ -167,7 +167,7 @@ export declare const contract: {
167
167
  profileId: string;
168
168
  createdAt: string;
169
169
  updatedAt: string;
170
- countryCode?: string | undefined;
170
+ countryCode?: string | null | undefined;
171
171
  }>, "many">;
172
172
  };
173
173
  };
@@ -185,7 +185,7 @@ export declare const contract: {
185
185
  displayName: z.ZodString;
186
186
  accountNo: z.ZodString;
187
187
  channel: z.ZodString;
188
- countryCode: z.ZodDefault<z.ZodString>;
188
+ countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
189
189
  type: z.ZodNativeEnum<typeof import("./contact.dtos").ContactType>;
190
190
  }, "strip", z.ZodTypeAny, {
191
191
  type: import("./contact.dtos").ContactType;
@@ -194,9 +194,9 @@ export declare const contract: {
194
194
  accountNo: string;
195
195
  channel: string;
196
196
  profileId: string;
197
- countryCode: string;
198
197
  createdAt: string;
199
198
  updatedAt: string;
199
+ countryCode?: string | null | undefined;
200
200
  }, {
201
201
  type: import("./contact.dtos").ContactType;
202
202
  id: string;
@@ -206,7 +206,7 @@ export declare const contract: {
206
206
  profileId: string;
207
207
  createdAt: string;
208
208
  updatedAt: string;
209
- countryCode?: string | undefined;
209
+ countryCode?: string | null | undefined;
210
210
  }>;
211
211
  };
212
212
  };
@@ -42,7 +42,7 @@ export declare const ContactDTOSchemas: {
42
42
  displayName: z.ZodString;
43
43
  accountNo: z.ZodString;
44
44
  channel: z.ZodString;
45
- countryCode: z.ZodDefault<z.ZodString>;
45
+ countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
46
46
  type: z.ZodNativeEnum<typeof ContactType>;
47
47
  }, "strip", z.ZodTypeAny, {
48
48
  type: ContactType;
@@ -51,9 +51,9 @@ export declare const ContactDTOSchemas: {
51
51
  accountNo: string;
52
52
  channel: string;
53
53
  profileId: string;
54
- countryCode: string;
55
54
  createdAt: string;
56
55
  updatedAt: string;
56
+ countryCode?: string | null | undefined;
57
57
  }, {
58
58
  type: ContactType;
59
59
  id: string;
@@ -63,27 +63,27 @@ export declare const ContactDTOSchemas: {
63
63
  profileId: string;
64
64
  createdAt: string;
65
65
  updatedAt: string;
66
- countryCode?: string | undefined;
66
+ countryCode?: string | null | undefined;
67
67
  }>;
68
68
  /** Schema for contact input validation */
69
69
  contactInputDTO: z.ZodObject<{
70
70
  displayName: z.ZodString;
71
71
  accountNo: z.ZodString;
72
72
  channel: z.ZodString;
73
- countryCode: z.ZodDefault<z.ZodString>;
73
+ countryCode: z.ZodOptional<z.ZodNullable<z.ZodString>>;
74
74
  type: z.ZodNativeEnum<typeof ContactType>;
75
75
  }, "strip", z.ZodTypeAny, {
76
76
  type: ContactType;
77
77
  displayName: string;
78
78
  accountNo: string;
79
79
  channel: string;
80
- countryCode: string;
80
+ countryCode?: string | null | undefined;
81
81
  }, {
82
82
  type: ContactType;
83
83
  displayName: string;
84
84
  accountNo: string;
85
85
  channel: string;
86
- countryCode?: string | undefined;
86
+ countryCode?: string | null | undefined;
87
87
  }>;
88
88
  /** Schema for contact channel types */
89
89
  contactType: z.ZodNativeEnum<typeof ContactType>;
@@ -1,6 +1,6 @@
1
1
  import { Amount, MNOId, PhoneNumber } from "@temboplus/frontend-core";
2
2
  import { PayoutChannel, PayoutInputDTO } from "./payout.dtos";
3
- import { ContactInfo, MobileContactInfo, BankContactInfo } from "../../models/contact-info.model";
3
+ import { ContactInfo, BankContactInfo } from "../../models/contact-info.model";
4
4
  import { Wallet } from "@/models/wallet.model";
5
5
  /**
6
6
  * Valid payout channel codes that can be used in the system
@@ -12,27 +12,6 @@ import { Wallet } from "@/models/wallet.model";
12
12
  * @see {@link PayoutChannelCodeFactory} for functions to generate valid codes
13
13
  */
14
14
  export type PayoutChannelCode = `${string}-BANK-B2C` | `${string}-${string}-B2C`;
15
- /**
16
- * Utility functions for generating payout narration strings
17
- */
18
- declare class PayoutNarrationGenerator {
19
- /**
20
- * Generates a narration string for a mobile payout.
21
- *
22
- * @param data - The mobile contact information used to generate the narration
23
- * @returns A formatted, uppercase narration string for the mobile payout
24
- * @throws Will throw an error if the provided data is not a valid MobileContactInfo instance
25
- */
26
- static generateMobilePayoutNarration(data: MobileContactInfo): string;
27
- /**
28
- * Generates a narration string for a bank payout.
29
- *
30
- * @param data - The bank contact information used to generate the narration
31
- * @returns A formatted, uppercase narration string for the bank payout
32
- * @throws Will throw an error if the provided data is not a valid BankContactInfo instance
33
- */
34
- static generateBankPayoutNarration(data: BankContactInfo): string;
35
- }
36
15
  /**
37
16
  * Factory for creating standardized payout channel codes
38
17
  *
@@ -92,11 +71,6 @@ export declare class PayoutInputFactory {
92
71
  notes?: string;
93
72
  }, wallet: Wallet): PayoutInputDTO;
94
73
  }
95
- /**
96
- * @deprecated Use PayoutNarrationGenerator instead
97
- * @see {@link PayoutNarrationGenerator}
98
- */
99
- export declare const PayoutUtils: typeof PayoutNarrationGenerator;
100
74
  /**
101
75
  * @deprecated Use PayoutChannelCodeFactory instead
102
76
  * @see {@link PayoutChannelCodeFactory}
@@ -1,7 +1,7 @@
1
1
  import { BaseRepository } from "@/lib/api";
2
2
  import { type PayoutAPI } from "./payout.api-contract";
3
3
  import { Payout } from "../../models/payout.model";
4
- import { Amount, CurrencyCode } from "@temboplus/frontend-core";
4
+ import { Amount } from "@temboplus/frontend-core";
5
5
  import { PayoutChannel } from "./payout.dtos";
6
6
  import { ContactInfo } from "../../models/contact-info.model";
7
7
  /**
@@ -175,19 +175,3 @@ export declare class PayoutRepository extends BaseRepository<PayoutAPI> {
175
175
  */
176
176
  getByID(id: string): Promise<Payout>;
177
177
  }
178
- /**
179
- * Helper function to get default amount constraints based on currency.
180
- *
181
- * @param currency - The currency code
182
- * @returns Object containing default minimum and maximum amounts
183
- *
184
- * @example
185
- * ```typescript
186
- * const { defaultMin, defaultMax } = getDefaultConstraints("TZS");
187
- * console.log(`TZS limits: ${defaultMin} - ${defaultMax}`);
188
- * ```
189
- */
190
- export declare const getDefaultConstraints: (currency: CurrencyCode) => {
191
- defaultMin: number;
192
- defaultMax: number;
193
- };