@temboplus/tembo-dashboard 0.5.1 → 0.7.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/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/lib/status.d.ts +111 -0
- package/dist/lib/status.d.ts.map +1 -0
- package/dist/modules/auth/auth.repository.d.ts.map +1 -1
- package/dist/modules/collection/collection.api-contract.d.ts +8 -0
- package/dist/modules/collection/collection.api-contract.d.ts.map +1 -1
- package/dist/modules/collection/collection.model.d.ts +56 -7
- package/dist/modules/collection/collection.model.d.ts.map +1 -1
- package/dist/modules/collection/collection.query.d.ts +13 -1
- package/dist/modules/collection/collection.query.d.ts.map +1 -1
- package/dist/modules/collection/collection.types.d.ts +22 -1
- package/dist/modules/collection/collection.types.d.ts.map +1 -1
- package/dist/modules/payout/payout.api-contract.d.ts +6 -2
- package/dist/modules/payout/payout.api-contract.d.ts.map +1 -1
- package/dist/modules/payout/payout.model.d.ts +33 -10
- package/dist/modules/payout/payout.model.d.ts.map +1 -1
- package/dist/modules/payout/payout.types.d.ts +3 -1
- package/dist/modules/payout/payout.types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Normalized payment outcome, shared by collections and payouts.
|
|
3
|
+
*
|
|
4
|
+
* These are the v2 collection statuses. The backend reports the same
|
|
5
|
+
* vocabulary on records that are not themselves v2 (v1 collections, payouts)
|
|
6
|
+
* through the optional `normalizedStatus` field, so a single set of labels can
|
|
7
|
+
* describe every record.
|
|
8
|
+
*/
|
|
9
|
+
export declare enum NORMALIZED_STATUS {
|
|
10
|
+
PENDING_ACK = "PENDING_ACK",
|
|
11
|
+
PAYMENT_ACCEPTED = "PAYMENT_ACCEPTED",
|
|
12
|
+
PAYMENT_FAILED = "PAYMENT_FAILED",
|
|
13
|
+
PAYMENT_EXPIRED = "PAYMENT_EXPIRED"
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* The reason behind a `NORMALIZED_STATUS`. Identical across all channels.
|
|
17
|
+
*
|
|
18
|
+
* New codes may be added over time; any value that is not one of these is
|
|
19
|
+
* normalized to `UNKNOWN` by `toNormalizedStatusCode()`.
|
|
20
|
+
*/
|
|
21
|
+
export declare enum NORMALIZED_STATUS_CODE {
|
|
22
|
+
AWAITING_USER = "AWAITING_USER",
|
|
23
|
+
PROVIDER_UNCERTAIN = "PROVIDER_UNCERTAIN",
|
|
24
|
+
SUCCESS = "SUCCESS",
|
|
25
|
+
USER_TIMEOUT = "USER_TIMEOUT",
|
|
26
|
+
INSUFFICIENT_BALANCE = "INSUFFICIENT_BALANCE",
|
|
27
|
+
INVALID_NUMBER = "INVALID_NUMBER",
|
|
28
|
+
INVALID_PIN = "INVALID_PIN",
|
|
29
|
+
ACCOUNT_LOCKED = "ACCOUNT_LOCKED",
|
|
30
|
+
ACCOUNT_RESTRICTED = "ACCOUNT_RESTRICTED",
|
|
31
|
+
USER_CANCELLED = "USER_CANCELLED",
|
|
32
|
+
USER_BUSY = "USER_BUSY",
|
|
33
|
+
USER_UNREACHABLE = "USER_UNREACHABLE",
|
|
34
|
+
LIMIT_EXCEEDED = "LIMIT_EXCEEDED",
|
|
35
|
+
INVALID_AMOUNT = "INVALID_AMOUNT",
|
|
36
|
+
PROVIDER_BUSY = "PROVIDER_BUSY",
|
|
37
|
+
PROVIDER_ERROR = "PROVIDER_ERROR",
|
|
38
|
+
UNKNOWN = "UNKNOWN"
|
|
39
|
+
}
|
|
40
|
+
export interface NormalizedStatusInfo {
|
|
41
|
+
label: string;
|
|
42
|
+
description: string;
|
|
43
|
+
category: "success" | "pending" | "failed";
|
|
44
|
+
color: "success" | "warning" | "error";
|
|
45
|
+
userFriendlyMessage: string;
|
|
46
|
+
}
|
|
47
|
+
export declare const NORMALIZED_STATUS_INFO: Record<NORMALIZED_STATUS, NormalizedStatusInfo>;
|
|
48
|
+
export interface NormalizedStatusCodeInfo {
|
|
49
|
+
label: string;
|
|
50
|
+
description: string;
|
|
51
|
+
/** The status this code is reported under. */
|
|
52
|
+
status: NORMALIZED_STATUS;
|
|
53
|
+
userFriendlyMessage: string;
|
|
54
|
+
}
|
|
55
|
+
export declare const NORMALIZED_STATUS_CODE_INFO: Record<NORMALIZED_STATUS_CODE, NormalizedStatusCodeInfo>;
|
|
56
|
+
/**
|
|
57
|
+
* Strict: the value only when it is a known `NORMALIZED_STATUS`, otherwise
|
|
58
|
+
* `undefined`. Use on fields that may hold something else entirely.
|
|
59
|
+
*/
|
|
60
|
+
export declare function asNormalizedStatus(value: unknown): NORMALIZED_STATUS | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Strict: the value only when it is a known `NORMALIZED_STATUS_CODE`,
|
|
63
|
+
* otherwise `undefined`. Use on fields that may hold something else entirely
|
|
64
|
+
* (e.g. a payout's provider status code).
|
|
65
|
+
*/
|
|
66
|
+
export declare function asNormalizedStatusCode(value: unknown): NORMALIZED_STATUS_CODE | undefined;
|
|
67
|
+
/**
|
|
68
|
+
* Presence-preserving: `undefined` when the field is absent (`null`,
|
|
69
|
+
* `undefined` or empty), `UNKNOWN` when it is present but unrecognised.
|
|
70
|
+
*
|
|
71
|
+
* Absence is meaningful — it is what distinguishes a record that carries a
|
|
72
|
+
* status code from one that does not — so it is never collapsed to `UNKNOWN`.
|
|
73
|
+
*/
|
|
74
|
+
export declare function toNormalizedStatusCode(value: unknown): NORMALIZED_STATUS_CODE | undefined;
|
|
75
|
+
/**
|
|
76
|
+
* Which tier of the resolution produced a `DisplayStatus`:
|
|
77
|
+
* - `native` — the record's own status and status code (a v2 record).
|
|
78
|
+
* - `normalized` — the backend-supplied `normalizedStatus`.
|
|
79
|
+
* - `legacy` — the record's own status alone; no status code to show.
|
|
80
|
+
*/
|
|
81
|
+
export type DisplayStatusSource = "native" | "normalized" | "legacy";
|
|
82
|
+
/** What the UI should render for a record's status. */
|
|
83
|
+
export interface DisplayStatus<TStatus extends string = string> {
|
|
84
|
+
status: TStatus | NORMALIZED_STATUS;
|
|
85
|
+
statusInfo: NormalizedStatusInfo;
|
|
86
|
+
/** Absent when there is no status code to display. */
|
|
87
|
+
statusCode?: NORMALIZED_STATUS_CODE;
|
|
88
|
+
/** Absent when there is no status code to display. */
|
|
89
|
+
statusCodeInfo?: NormalizedStatusCodeInfo;
|
|
90
|
+
source: DisplayStatusSource;
|
|
91
|
+
}
|
|
92
|
+
export interface DisplayStatusInput<TStatus extends string> {
|
|
93
|
+
/** The record's own status. */
|
|
94
|
+
status: TStatus;
|
|
95
|
+
/** Label and colour for the record's own status. */
|
|
96
|
+
statusInfo: NormalizedStatusInfo;
|
|
97
|
+
/** The record's own status code, only when it carries the normalized vocabulary. */
|
|
98
|
+
statusCode?: NORMALIZED_STATUS_CODE;
|
|
99
|
+
normalizedStatus?: NORMALIZED_STATUS;
|
|
100
|
+
normalizedStatusCode?: NORMALIZED_STATUS_CODE;
|
|
101
|
+
}
|
|
102
|
+
/**
|
|
103
|
+
* Resolve what to display for a record's status, in three tiers:
|
|
104
|
+
*
|
|
105
|
+
* 1. Its own status and status code are both present — a v2 record. Show both.
|
|
106
|
+
* 2. Otherwise `normalizedStatus` is present. Show it, with
|
|
107
|
+
* `normalizedStatusCode` if that is present too.
|
|
108
|
+
* 3. Otherwise fall back to its own status, and show no status code.
|
|
109
|
+
*/
|
|
110
|
+
export declare function resolveDisplayStatus<TStatus extends string>(input: DisplayStatusInput<TStatus>): DisplayStatus<TStatus>;
|
|
111
|
+
//# sourceMappingURL=status.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"status.d.ts","sourceRoot":"","sources":["../../src/lib/status.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,oBAAY,iBAAiB;IAC3B,WAAW,gBAAgB;IAC3B,gBAA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AMG;AACH,wBAAgB,sBAAsB,CAAC,KAAK,EAAE,OAAO,GAAG,sBAAsB,GAAG,SAAS,CAGzF;AAID;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,QAAQ,GAAG,YAAY,GAAG,QAAQ,CAAC;AAErE,uDAAuD;AACvD,MAAM,WAAW,aAAa,CAAC,OAAO,SAAS,MAAM,GAAG,MAAM;IAC5D,MAAM,EAAE,OAAO,GAAG,iBAAiB,CAAC;IACpC,UAAU,EAAE,oBAAoB,CAAC;IACjC,sDAAsD;IACtD,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,sDAAsD;IACtD,cAAc,CAAC,EAAE,wBAAwB,CAAC;IAC1C,MAAM,EAAE,mBAAmB,CAAC;CAC7B;AAED,MAAM,WAAW,kBAAkB,CAAC,OAAO,SAAS,MAAM;IACxD,+BAA+B;IAC/B,MAAM,EAAE,OAAO,CAAC;IAChB,oDAAoD;IACpD,UAAU,EAAE,oBAAoB,CAAC;IACjC,oFAAoF;IACpF,UAAU,CAAC,EAAE,sBAAsB,CAAC;IACpC,gBAAgB,CAAC,EAAE,iBAAiB,CAAC;IACrC,oBAAoB,CAAC,EAAE,sBAAsB,CAAC;CAC/C;AAED;;;;;;;GAOG;AACH,wBAAgB,oBAAoB,CAAC,OAAO,SAAS,MAAM,EACzD,KAAK,EAAE,kBAAkB,CAAC,OAAO,CAAC,GACjC,aAAa,CAAC,OAAO,CAAC,CA0BxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.repository.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/auth.repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;
|
|
1
|
+
{"version":3,"file":"auth.repository.d.ts","sourceRoot":"","sources":["../../../src/modules/auth/auth.repository.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AACtD,OAAO,EAAE,IAAI,EAAiB,MAAM,iBAAiB,CAAC;AAEtD;;;GAGG;AACH,qBAAa,cAAe,SAAQ,cAAc,CAAC,OAAO,YAAY,CAAC;gBACzD,OAAO,CAAC,EAAE;QAAE,KAAK,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAA;KAAE;IAIvD;;OAEG;IACG,KAAK,CAAC,WAAW,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC;QAAE,IAAI,EAAE,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IAoD/F,cAAc,CAAC,KAAK,EAAE;QAAE,eAAe,EAAE,MAAM,CAAC;QAAC,WAAW,EAAE,MAAM,CAAA;KAAE,GAAG,OAAO,CAAC,OAAO,CAAC;CAchG"}
|
|
@@ -23,6 +23,8 @@ export declare const collectionContract: {
|
|
|
23
23
|
channelIn: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodEnum<typeof import("./collection.types.js").COLLECTION_CHANNEL>>>>;
|
|
24
24
|
status: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<import("./collection.types.js").COLLECTION_STATUS, string>>>;
|
|
25
25
|
statusIn: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodEnum<typeof import("./collection.types.js").COLLECTION_STATUS>>>>;
|
|
26
|
+
statusCode: z.ZodOptional<z.ZodEnum<typeof import("./collection.types.js").COLLECTION_STATUS_CODE>>;
|
|
27
|
+
statusCodeIn: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodEnum<typeof import("./collection.types.js").COLLECTION_STATUS_CODE>>>>;
|
|
26
28
|
minAmount: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
27
29
|
maxAmount: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
28
30
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -36,6 +38,9 @@ export declare const collectionContract: {
|
|
|
36
38
|
results: z.ZodArray<z.ZodObject<{
|
|
37
39
|
id: z.ZodString;
|
|
38
40
|
status: z.ZodEnum<typeof import("./collection.types.js").COLLECTION_STATUS>;
|
|
41
|
+
statusCode: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<import("./collection.types.js").COLLECTION_STATUS_CODE | undefined, unknown>>;
|
|
42
|
+
normalizedStatus: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<import("../../index.js").NORMALIZED_STATUS | undefined, unknown>>;
|
|
43
|
+
normalizedStatusCode: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<import("./collection.types.js").COLLECTION_STATUS_CODE | undefined, unknown>>;
|
|
39
44
|
statusMessage: z.ZodString;
|
|
40
45
|
accountNo: z.ZodString;
|
|
41
46
|
walletId: z.ZodString;
|
|
@@ -98,6 +103,9 @@ export declare const collectionContract: {
|
|
|
98
103
|
200: z.ZodObject<{
|
|
99
104
|
id: z.ZodString;
|
|
100
105
|
status: z.ZodEnum<typeof import("./collection.types.js").COLLECTION_STATUS>;
|
|
106
|
+
statusCode: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<import("./collection.types.js").COLLECTION_STATUS_CODE | undefined, unknown>>;
|
|
107
|
+
normalizedStatus: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<import("../../index.js").NORMALIZED_STATUS | undefined, unknown>>;
|
|
108
|
+
normalizedStatusCode: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<import("./collection.types.js").COLLECTION_STATUS_CODE | undefined, unknown>>;
|
|
101
109
|
statusMessage: z.ZodString;
|
|
102
110
|
accountNo: z.ZodString;
|
|
103
111
|
walletId: z.ZodString;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.api-contract.d.ts","sourceRoot":"","sources":["../../../src/modules/collection/collection.api-contract.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,kBAAkB
|
|
1
|
+
{"version":3,"file":"collection.api-contract.d.ts","sourceRoot":"","sources":["../../../src/modules/collection/collection.api-contract.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkD7B,CAAC;AAEH,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAC"}
|
|
@@ -1,17 +1,23 @@
|
|
|
1
1
|
import { Amount, type AmountJSON } from "@temboplus/frontend-core";
|
|
2
|
+
import { type DisplayStatus, type NORMALIZED_STATUS, type NORMALIZED_STATUS_CODE, NORMALIZED_STATUS_CODE_INFO, type NormalizedStatusCodeInfo, type NormalizedStatusInfo } from "../../lib/status.js";
|
|
2
3
|
import { type MobileChannelInfo } from "../../lib/types.js";
|
|
3
4
|
import { COLLECTION_CHANNEL, COLLECTION_STATUS } from "./collection.types.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
description: string;
|
|
7
|
-
category: "success" | "pending" | "failed";
|
|
8
|
-
color: "success" | "warning" | "error";
|
|
9
|
-
userFriendlyMessage: string;
|
|
10
|
-
}
|
|
5
|
+
/** Collections describe their status with the shared normalized shape. */
|
|
6
|
+
export type CollectionStatusInfo = NormalizedStatusInfo;
|
|
11
7
|
export declare const COLLECTION_STATUS_INFO: Record<COLLECTION_STATUS, CollectionStatusInfo>;
|
|
8
|
+
/** Collections describe their status code with the shared normalized shape. */
|
|
9
|
+
export type CollectionStatusCodeInfo = NormalizedStatusCodeInfo;
|
|
10
|
+
export { NORMALIZED_STATUS_CODE_INFO as COLLECTION_STATUS_CODE_INFO };
|
|
11
|
+
/**
|
|
12
|
+
* All statuses (v1 and v2) in the given category.
|
|
13
|
+
*/
|
|
14
|
+
export declare function getCollectionStatusesByCategory(category: CollectionStatusInfo["category"]): COLLECTION_STATUS[];
|
|
12
15
|
export interface CollectionData {
|
|
13
16
|
id: string;
|
|
14
17
|
status: COLLECTION_STATUS;
|
|
18
|
+
statusCode?: string | null;
|
|
19
|
+
normalizedStatus?: string | null;
|
|
20
|
+
normalizedStatusCode?: string | null;
|
|
15
21
|
statusMessage: string;
|
|
16
22
|
accountNo: string;
|
|
17
23
|
walletId: string;
|
|
@@ -40,6 +46,9 @@ export interface CollectionData {
|
|
|
40
46
|
export interface CollectionJson {
|
|
41
47
|
id: string;
|
|
42
48
|
status: COLLECTION_STATUS;
|
|
49
|
+
statusCode?: string | null;
|
|
50
|
+
normalizedStatus?: string | null;
|
|
51
|
+
normalizedStatusCode?: string | null;
|
|
43
52
|
statusMessage: string;
|
|
44
53
|
accountNo: string;
|
|
45
54
|
walletId: string;
|
|
@@ -71,6 +80,19 @@ export interface CollectionJson {
|
|
|
71
80
|
export declare class Collection {
|
|
72
81
|
readonly id: string;
|
|
73
82
|
readonly status: COLLECTION_STATUS;
|
|
83
|
+
/**
|
|
84
|
+
* v2 reason code. `undefined` on collections that carry no code (e.g. v1);
|
|
85
|
+
* a code that is present but unrecognised is `UNKNOWN`. The raw value is
|
|
86
|
+
* available via `getOriginalField("statusCode")`.
|
|
87
|
+
*/
|
|
88
|
+
readonly statusCode?: NORMALIZED_STATUS_CODE;
|
|
89
|
+
/**
|
|
90
|
+
* The v2 outcome the backend mapped this collection onto, when it is not
|
|
91
|
+
* itself a v2 collection. `undefined` when the backend supplied none.
|
|
92
|
+
*/
|
|
93
|
+
readonly normalizedStatus?: NORMALIZED_STATUS;
|
|
94
|
+
/** The reason behind `normalizedStatus`, when the backend supplied one. */
|
|
95
|
+
readonly normalizedStatusCode?: NORMALIZED_STATUS_CODE;
|
|
74
96
|
readonly statusMessage: string;
|
|
75
97
|
readonly accountNo: string;
|
|
76
98
|
readonly walletId: string;
|
|
@@ -124,10 +146,37 @@ export declare class Collection {
|
|
|
124
146
|
* Check if collection failed
|
|
125
147
|
*/
|
|
126
148
|
isFailed(): boolean;
|
|
149
|
+
/**
|
|
150
|
+
* Check if the customer did not respond to the prompt in time (v2).
|
|
151
|
+
* Expired collections are also counted by `isFailed()`.
|
|
152
|
+
*/
|
|
153
|
+
isExpired(): boolean;
|
|
154
|
+
/**
|
|
155
|
+
* Check if the collection reached a final status. Pending collections must
|
|
156
|
+
* never be treated as failed.
|
|
157
|
+
*/
|
|
158
|
+
isFinal(): boolean;
|
|
127
159
|
/**
|
|
128
160
|
* Get status color and label
|
|
129
161
|
*/
|
|
130
162
|
getStatusInfo(): CollectionStatusInfo;
|
|
163
|
+
/**
|
|
164
|
+
* Get the v2 status code. `undefined` when this collection carries none.
|
|
165
|
+
*/
|
|
166
|
+
getStatusCode(): NORMALIZED_STATUS_CODE | undefined;
|
|
167
|
+
/**
|
|
168
|
+
* Get the label and description for the status code, when there is one.
|
|
169
|
+
*/
|
|
170
|
+
getStatusCodeInfo(): CollectionStatusCodeInfo | undefined;
|
|
171
|
+
/**
|
|
172
|
+
* What the UI should show for this collection:
|
|
173
|
+
*
|
|
174
|
+
* 1. `status` and `statusCode` are both present — a v2 collection. Show both.
|
|
175
|
+
* 2. Otherwise `normalizedStatus` is present. Show it, with
|
|
176
|
+
* `normalizedStatusCode` if that is present too.
|
|
177
|
+
* 3. Otherwise show `status` alone, and no status code.
|
|
178
|
+
*/
|
|
179
|
+
getDisplayStatus(): DisplayStatus<COLLECTION_STATUS>;
|
|
131
180
|
/**
|
|
132
181
|
* Get channel information. Returns `undefined` for non-mobile channels
|
|
133
182
|
* (e.g. bank channels such as CRDB or Ecobank).
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.model.d.ts","sourceRoot":"","sources":["../../../src/modules/collection/collection.model.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAiB,KAAK,UAAU,EAAsC,MAAM,0BAA0B,CAAC;AACtH,OAAO,EAAE,KAAK,iBAAiB,EAAkB,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAI9E,MAAM,
|
|
1
|
+
{"version":3,"file":"collection.model.d.ts","sourceRoot":"","sources":["../../../src/modules/collection/collection.model.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,MAAM,EAAiB,KAAK,UAAU,EAAsC,MAAM,0BAA0B,CAAC;AACtH,OAAO,EAEL,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,2BAA2B,EAE3B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EAG1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,iBAAiB,EAAkB,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,MAAM,uBAAuB,CAAC;AAI9E,0EAA0E;AAC1E,MAAM,MAAM,oBAAoB,GAAG,oBAAoB,CAAC;AAExD,eAAO,MAAM,sBAAsB,EAAE,MAAM,CAAC,iBAAiB,EAAE,oBAAoB,CA8ClF,CAAC;AAIF,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clD,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,UAAU,EAAE;IAWrD;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,cAAc,GAAG,UAAU,GAAG,SAAS;IAyF7D;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,SAAS,EAAE,cAAc,EAAE,GAAG,UAAU,EAAE;IAWpE;;OAEG;IACH,MAAM,IAAI,cAAc;CAiCzB"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { QueryBuilder } from "../../lib/query/index.js";
|
|
2
|
-
import { COLLECTION_CHANNEL, COLLECTION_STATUS, type CollectionFilters } from "./collection.types.js";
|
|
2
|
+
import { COLLECTION_CHANNEL, COLLECTION_STATUS, COLLECTION_STATUS_CODE, type CollectionFilters } from "./collection.types.js";
|
|
3
3
|
type CollectionUrlParams = Record<string, string | string[]>;
|
|
4
4
|
/**
|
|
5
5
|
* Collection-specific query builder that extends the base QueryBuilder
|
|
@@ -50,13 +50,19 @@ export declare class CollectionQuery extends QueryBuilder {
|
|
|
50
50
|
private static normalizeUrlParams;
|
|
51
51
|
whereStatus(status: COLLECTION_STATUS): this;
|
|
52
52
|
whereStatusIn(statuses: COLLECTION_STATUS[]): this;
|
|
53
|
+
whereStatusCode(statusCode: COLLECTION_STATUS_CODE): this;
|
|
54
|
+
whereStatusCodeIn(statusCodes: COLLECTION_STATUS_CODE[]): this;
|
|
53
55
|
whereChannel(channel: COLLECTION_CHANNEL): this;
|
|
54
56
|
whereChannelIn(channels: COLLECTION_CHANNEL[]): this;
|
|
55
57
|
whereIdIn(ids: string[]): this;
|
|
56
58
|
whereReferenceIn(references: string[]): this;
|
|
59
|
+
/** Pending collections, across v1 and v2 statuses. */
|
|
57
60
|
wherePending(): this;
|
|
58
61
|
whereSuccessful(): this;
|
|
62
|
+
/** Failed collections, across v1 and v2 statuses. Includes `PAYMENT_EXPIRED`. */
|
|
59
63
|
whereFailed(): this;
|
|
64
|
+
/** Collections the customer did not respond to in time (v2). */
|
|
65
|
+
whereExpired(): this;
|
|
60
66
|
whereAmount(amount: number): this;
|
|
61
67
|
whereAmountLessThan(amount: number): this;
|
|
62
68
|
whereAmountGreaterThan(amount: number): this;
|
|
@@ -133,6 +139,8 @@ export declare class CollectionQuery extends QueryBuilder {
|
|
|
133
139
|
private whereInValues;
|
|
134
140
|
/** Narrow an unknown array to a `COLLECTION_STATUS[]` (preserving order). */
|
|
135
141
|
private getValidStatuses;
|
|
142
|
+
/** Narrow an unknown array to a `COLLECTION_STATUS_CODE[]` (preserving order). */
|
|
143
|
+
private getValidStatusCodes;
|
|
136
144
|
/** Narrow an unknown array to a `COLLECTION_CHANNEL[]` (preserving order). */
|
|
137
145
|
private getValidChannels;
|
|
138
146
|
/**
|
|
@@ -151,6 +159,10 @@ export declare class CollectionQuery extends QueryBuilder {
|
|
|
151
159
|
* Type guard for valid statuses
|
|
152
160
|
*/
|
|
153
161
|
private isValidStatus;
|
|
162
|
+
/**
|
|
163
|
+
* Type guard for valid status codes
|
|
164
|
+
*/
|
|
165
|
+
private isValidStatusCode;
|
|
154
166
|
}
|
|
155
167
|
export {};
|
|
156
168
|
//# sourceMappingURL=collection.query.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.query.d.ts","sourceRoot":"","sources":["../../../src/modules/collection/collection.query.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;
|
|
1
|
+
{"version":3,"file":"collection.query.d.ts","sourceRoot":"","sources":["../../../src/modules/collection/collection.query.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,OAAO,EACL,kBAAkB,EAClB,iBAAiB,EACjB,sBAAsB,EAEtB,KAAK,iBAAiB,EAEvB,MAAM,uBAAuB,CAAC;AA2B/B,KAAK,mBAAmB,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MA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CAAC,EAAE,kBAAkB,GAAG,eAAe;IAM1D;;OAEG;IACH,SAAS,IAAI,eAAe;IAM5B;;OAEG;IACH,UAAU,IAAI,OAAO;IAyBrB;;OAEG;IACH,gBAAgB,IAAI,MAAM,EAAE;IAwD5B;;OAEG;IACH,OAAO,CAAC,mBAAmB;IAoD3B;;OAEG;IACH,OAAO,CAAC,aAAa;IAQrB,6EAA6E;IAC7E,OAAO,CAAC,gBAAgB;IAKxB,kFAAkF;IAClF,OAAO,CAAC,mBAAmB;IAK3B,8EAA8E;IAC9E,OAAO,CAAC,gBAAgB;IAKxB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAKxB;;OAEG;IACH,OAAO,CAAC,gBAAgB;IAKxB;;OAEG;IACH,OAAO,CAAC,cAAc;IAItB;;OAEG;IACH,OAAO,CAAC,aAAa;IAIrB;;OAEG;IACH,OAAO,CAAC,iBAAiB;CAG1B"}
|
|
@@ -1,14 +1,26 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { NORMALIZED_STATUS_CODE, toNormalizedStatusCode } from "../../lib/status.js";
|
|
3
|
+
/**
|
|
4
|
+
* Collection outcome.
|
|
5
|
+
*
|
|
6
|
+
* v1 encoded the failure reason in the status itself (e.g. `INSUFFICIENT_FUNDS`).
|
|
7
|
+
* v2 reduces the status to the outcome (`PENDING_ACK`, `PAYMENT_ACCEPTED`,
|
|
8
|
+
* `PAYMENT_FAILED`, `PAYMENT_EXPIRED`) and moves the reason to `statusCode`.
|
|
9
|
+
* Both sets are supported because historical collections keep their v1 status.
|
|
10
|
+
*/
|
|
2
11
|
export declare enum COLLECTION_STATUS {
|
|
3
12
|
PAYMENT_ACCEPTED = "PAYMENT_ACCEPTED",
|
|
13
|
+
PENDING_ACK = "PENDING_ACK",
|
|
14
|
+
PAYMENT_FAILED = "PAYMENT_FAILED",
|
|
15
|
+
PAYMENT_EXPIRED = "PAYMENT_EXPIRED",
|
|
4
16
|
GENERIC_FAILURE = "GENERIC_FAILURE",
|
|
5
17
|
INSUFFICIENT_FUNDS = "INSUFFICIENT_FUNDS",
|
|
6
18
|
INVALID_REFERENCE = "INVALID_REFERENCE",
|
|
7
19
|
PAYMENT_REJECTED = "PAYMENT_REJECTED",
|
|
8
20
|
PENDING = "PENDING",
|
|
9
|
-
PENDING_ACK = "PENDING_ACK",
|
|
10
21
|
PROVIDER_FAILED = "PROVIDER_FAILED"
|
|
11
22
|
}
|
|
23
|
+
export { NORMALIZED_STATUS_CODE as COLLECTION_STATUS_CODE };
|
|
12
24
|
export declare enum COLLECTION_CHANNEL {
|
|
13
25
|
AIRTEL = "TZ-AIRTEL-C2B",
|
|
14
26
|
TIGO = "TZ-TIGO-C2B",
|
|
@@ -18,6 +30,7 @@ export declare enum COLLECTION_CHANNEL {
|
|
|
18
30
|
CRDB = "TZ-CRDB",
|
|
19
31
|
ECOBANK = "TZ-ECOBANK"
|
|
20
32
|
}
|
|
33
|
+
export { toNormalizedStatusCode as toCollectionStatusCode };
|
|
21
34
|
/**
|
|
22
35
|
* Accepts a single string, a comma-separated string, or an array of strings,
|
|
23
36
|
* and normalizes to a deduplicated, trimmed, non-empty `string[]`.
|
|
@@ -28,6 +41,9 @@ export declare const CollectionDTOSchemas: {
|
|
|
28
41
|
collection: z.ZodObject<{
|
|
29
42
|
id: z.ZodString;
|
|
30
43
|
status: z.ZodEnum<typeof COLLECTION_STATUS>;
|
|
44
|
+
statusCode: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<NORMALIZED_STATUS_CODE | undefined, unknown>>;
|
|
45
|
+
normalizedStatus: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<import("../../lib/status.js").NORMALIZED_STATUS | undefined, unknown>>;
|
|
46
|
+
normalizedStatusCode: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<NORMALIZED_STATUS_CODE | undefined, unknown>>;
|
|
31
47
|
statusMessage: z.ZodString;
|
|
32
48
|
accountNo: z.ZodString;
|
|
33
49
|
walletId: z.ZodString;
|
|
@@ -75,6 +91,8 @@ export declare const CollectionDTOSchemas: {
|
|
|
75
91
|
channelIn: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof COLLECTION_CHANNEL>>>;
|
|
76
92
|
status: z.ZodOptional<z.ZodEnum<typeof COLLECTION_STATUS>>;
|
|
77
93
|
statusIn: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof COLLECTION_STATUS>>>;
|
|
94
|
+
statusCode: z.ZodOptional<z.ZodEnum<typeof NORMALIZED_STATUS_CODE>>;
|
|
95
|
+
statusCodeIn: z.ZodOptional<z.ZodArray<z.ZodEnum<typeof NORMALIZED_STATUS_CODE>>>;
|
|
78
96
|
minAmount: z.ZodOptional<z.ZodNumber>;
|
|
79
97
|
maxAmount: z.ZodOptional<z.ZodNumber>;
|
|
80
98
|
search: z.ZodOptional<z.ZodString>;
|
|
@@ -101,11 +119,14 @@ export declare const CollectionDTOSchemas: {
|
|
|
101
119
|
channelIn: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodEnum<typeof COLLECTION_CHANNEL>>>>;
|
|
102
120
|
status: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<COLLECTION_STATUS, string>>>;
|
|
103
121
|
statusIn: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodEnum<typeof COLLECTION_STATUS>>>>;
|
|
122
|
+
statusCode: z.ZodOptional<z.ZodEnum<typeof NORMALIZED_STATUS_CODE>>;
|
|
123
|
+
statusCodeIn: z.ZodOptional<z.ZodPipe<z.ZodPipe<z.ZodUnion<readonly [z.ZodString, z.ZodArray<z.ZodString>]>, z.ZodTransform<string[], string | string[]>>, z.ZodArray<z.ZodEnum<typeof NORMALIZED_STATUS_CODE>>>>;
|
|
104
124
|
minAmount: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
105
125
|
maxAmount: z.ZodOptional<z.ZodPipe<z.ZodString, z.ZodTransform<number, string>>>;
|
|
106
126
|
search: z.ZodOptional<z.ZodString>;
|
|
107
127
|
}, z.core.$strip>;
|
|
108
128
|
paymentStatus: z.ZodEnum<typeof COLLECTION_STATUS>;
|
|
129
|
+
statusCode: z.ZodEnum<typeof NORMALIZED_STATUS_CODE>;
|
|
109
130
|
paymentChannel: z.ZodEnum<typeof COLLECTION_CHANNEL>;
|
|
110
131
|
};
|
|
111
132
|
export type CollectionDTO = z.infer<typeof CollectionDTOSchemas.collection>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collection.types.d.ts","sourceRoot":"","sources":["../../../src/modules/collection/collection.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,oBAAY,iBAAiB;
|
|
1
|
+
{"version":3,"file":"collection.types.d.ts","sourceRoot":"","sources":["../../../src/modules/collection/collection.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EAAsB,sBAAsB,EAAE,sBAAsB,EAAE,MAAM,qBAAqB,CAAC;AAEzG;;;;;;;GAOG;AACH,oBAAY,iBAAiB;IAE3B,gBAAgB,qBAAqB;IACrC,WAAW,gBAAgB;IAG3B,cAAc,mBAAmB;IACjC,eAAe,oBAAoB;IAGnC,eAAe,oBAAoB;IACnC,kBAAkB,uBAAuB;IACzC,iBAAiB,sBAAsB;IACvC,gBAAgB,qBAAqB;IACrC,OAAO,YAAY;IACnB,eAAe,oBAAoB;CACpC;AAKD,OAAO,EAAE,sBAAsB,IAAI,sBAAsB,EAAE,CAAC;AAE5D,oBAAY,kBAAkB;IAC5B,MAAM,kBAAkB;IACxB,IAAI,gBAAgB;IACpB,OAAO,mBAAmB;IAC1B,SAAS,qBAAqB;IAC9B,OAAO,mBAAmB;IAC1B,IAAI,YAAY;IAChB,OAAO,eAAe;CACvB;AAMD,OAAO,EAAE,sBAAsB,IAAI,sBAAsB,EAAE,CAAC;AAQ5D;;;GAGG;AACH,QAAA,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,MAAM,EAO7C,CAAC;AAuHF,OAAO,EAAE,aAAa,IAAI,uBAAuB,EAAE,CAAC;AAEpD,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAOhC,CAAC;AAGF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,UAAU,CAAC,CAAC;AAC5E,MAAM,MAAM,iBAAiB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,iBAAiB,CAAC,CAAC;AACvF,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,wBAAwB,CAAC,CAAC"}
|
|
@@ -36,8 +36,10 @@ export declare const payoutContract: {
|
|
|
36
36
|
200: z.ZodObject<{
|
|
37
37
|
results: z.ZodArray<z.ZodObject<{
|
|
38
38
|
id: z.ZodString;
|
|
39
|
-
statusCode: z.ZodString
|
|
39
|
+
statusCode: z.ZodOptional<z.ZodString>;
|
|
40
40
|
statusCodeText: z.ZodEnum<typeof import("./payout.types.js").PAYOUT_STATUS>;
|
|
41
|
+
normalizedStatus: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<import("../../index.js").NORMALIZED_STATUS | undefined, unknown>>;
|
|
42
|
+
normalizedStatusCode: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<import("../collection/collection.types.js").COLLECTION_STATUS_CODE | undefined, unknown>>;
|
|
41
43
|
statusDescription: z.ZodString;
|
|
42
44
|
countryCode: z.ZodString;
|
|
43
45
|
serviceCode: z.ZodUnion<readonly [z.ZodEnum<typeof import("./payout.types.js").MOBILE_PAYOUT_CHANNEL>, z.ZodEnum<typeof import("./payout.types.js").BANK_PAYOUT_CHANNEL>]>;
|
|
@@ -100,8 +102,10 @@ export declare const payoutContract: {
|
|
|
100
102
|
responses: {
|
|
101
103
|
200: z.ZodObject<{
|
|
102
104
|
id: z.ZodString;
|
|
103
|
-
statusCode: z.ZodString
|
|
105
|
+
statusCode: z.ZodOptional<z.ZodString>;
|
|
104
106
|
statusCodeText: z.ZodEnum<typeof import("./payout.types.js").PAYOUT_STATUS>;
|
|
107
|
+
normalizedStatus: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<import("../../index.js").NORMALIZED_STATUS | undefined, unknown>>;
|
|
108
|
+
normalizedStatusCode: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<import("../collection/collection.types.js").COLLECTION_STATUS_CODE | undefined, unknown>>;
|
|
105
109
|
statusDescription: z.ZodString;
|
|
106
110
|
countryCode: z.ZodString;
|
|
107
111
|
serviceCode: z.ZodUnion<readonly [z.ZodEnum<typeof import("./payout.types.js").MOBILE_PAYOUT_CHANNEL>, z.ZodEnum<typeof import("./payout.types.js").BANK_PAYOUT_CHANNEL>]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payout.api-contract.d.ts","sourceRoot":"","sources":["../../../src/modules/payout/payout.api-contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"payout.api-contract.d.ts","sourceRoot":"","sources":["../../../src/modules/payout/payout.api-contract.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkDzB,CAAC;AAEH,MAAM,MAAM,cAAc,GAAG,OAAO,cAAc,CAAC"}
|
|
@@ -1,13 +1,9 @@
|
|
|
1
1
|
import { Amount, type AmountJson, Bank } from "@temboplus/frontend-core";
|
|
2
|
+
import { type DisplayStatus, type NORMALIZED_STATUS, type NORMALIZED_STATUS_CODE, type NormalizedStatusInfo } from "../../lib/status.js";
|
|
2
3
|
import { type MobileChannelInfo } from "../../lib/types.js";
|
|
3
4
|
import { type PAYOUT_CHANNEL, PAYOUT_STATUS } from "./payout.types.js";
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
description: string;
|
|
7
|
-
category: "success" | "pending" | "failed";
|
|
8
|
-
color: "success" | "warning" | "error";
|
|
9
|
-
userFriendlyMessage: string;
|
|
10
|
-
}
|
|
5
|
+
/** Payouts describe their status with the shared normalized shape. */
|
|
6
|
+
export type PayoutStatusInfo = NormalizedStatusInfo;
|
|
11
7
|
export declare const PAYOUT_STATUS_INFO: Record<PAYOUT_STATUS, PayoutStatusInfo>;
|
|
12
8
|
export interface PayoutData {
|
|
13
9
|
id: string;
|
|
@@ -26,7 +22,9 @@ export interface PayoutData {
|
|
|
26
22
|
swiftCode?: string;
|
|
27
23
|
createdAt: string;
|
|
28
24
|
updatedAt?: string;
|
|
29
|
-
statusCode
|
|
25
|
+
statusCode?: string;
|
|
26
|
+
normalizedStatus?: string | null;
|
|
27
|
+
normalizedStatusCode?: string | null;
|
|
30
28
|
countryCode: string;
|
|
31
29
|
postedAmount?: string;
|
|
32
30
|
walletId?: string;
|
|
@@ -57,7 +55,9 @@ export interface PayoutJson {
|
|
|
57
55
|
swiftCode?: string;
|
|
58
56
|
createdAt: string;
|
|
59
57
|
updatedAt?: string;
|
|
60
|
-
statusCode
|
|
58
|
+
statusCode?: string;
|
|
59
|
+
normalizedStatus?: string | null;
|
|
60
|
+
normalizedStatusCode?: string | null;
|
|
61
61
|
countryCode: string;
|
|
62
62
|
postedAmount?: AmountJson;
|
|
63
63
|
walletId?: string;
|
|
@@ -91,7 +91,18 @@ export declare class Payout {
|
|
|
91
91
|
readonly swiftCode?: string;
|
|
92
92
|
readonly createdAt: Date;
|
|
93
93
|
readonly updatedAt?: Date;
|
|
94
|
-
|
|
94
|
+
/**
|
|
95
|
+
* The provider status code. Payouts have no v2 tier, so this normally holds
|
|
96
|
+
* a provider value rather than a `NORMALIZED_STATUS_CODE`.
|
|
97
|
+
*/
|
|
98
|
+
readonly statusCode?: string;
|
|
99
|
+
/**
|
|
100
|
+
* The v2 outcome the backend mapped this payout onto. `undefined` when the
|
|
101
|
+
* backend supplied none.
|
|
102
|
+
*/
|
|
103
|
+
readonly normalizedStatus?: NORMALIZED_STATUS;
|
|
104
|
+
/** The reason behind `normalizedStatus`, when the backend supplied one. */
|
|
105
|
+
readonly normalizedStatusCode?: NORMALIZED_STATUS_CODE;
|
|
95
106
|
readonly countryCode: string;
|
|
96
107
|
readonly postedAmount?: Amount;
|
|
97
108
|
readonly walletId?: string;
|
|
@@ -137,6 +148,18 @@ export declare class Payout {
|
|
|
137
148
|
* Get status color and label
|
|
138
149
|
*/
|
|
139
150
|
getStatusInfo(): PayoutStatusInfo;
|
|
151
|
+
/**
|
|
152
|
+
* What the UI should show for this payout:
|
|
153
|
+
*
|
|
154
|
+
* 1. `statusCodeText` and a normalized `statusCode` are both present. Show
|
|
155
|
+
* both. Payouts have no v2 tier today, so `statusCode` normally holds a
|
|
156
|
+
* provider value and this tier does not apply — it is only reached if
|
|
157
|
+
* the code is one of `NORMALIZED_STATUS_CODE`.
|
|
158
|
+
* 2. Otherwise `normalizedStatus` is present. Show it, with
|
|
159
|
+
* `normalizedStatusCode` if that is present too.
|
|
160
|
+
* 3. Otherwise show `statusCodeText` alone, and no status code.
|
|
161
|
+
*/
|
|
162
|
+
getDisplayStatus(): DisplayStatus<PAYOUT_STATUS>;
|
|
140
163
|
/**
|
|
141
164
|
* Get channel information with bank detection for bank transfers
|
|
142
165
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payout.model.d.ts","sourceRoot":"","sources":["../../../src/modules/payout/payout.model.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EAEN,KAAK,UAAU,EACf,IAAI,EAKL,MAAM,0BAA0B,CAAC;AAClC,OAAO,
|
|
1
|
+
{"version":3,"file":"payout.model.d.ts","sourceRoot":"","sources":["../../../src/modules/payout/payout.model.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,MAAM,EAEN,KAAK,UAAU,EACf,IAAI,EAKL,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,iBAAiB,EACtB,KAAK,sBAAsB,EAC3B,KAAK,oBAAoB,EAG1B,MAAM,qBAAqB,CAAC;AAC7B,OAAO,EAAE,KAAK,iBAAiB,EAAkB,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAA8C,KAAK,cAAc,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAInH,sEAAsE;AACtE,MAAM,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAEpD,eAAO,MAAM,kBAAkB,EAAE,MAAM,CAAC,aAAa,EAAE,gBAAgB,CA4FtE,CAAC;AA6BF,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IACX,WAAW,EAAE,cAAc,CAAC;IAC5B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,eAAe,EAAE,MAAM,CAAC;IACxB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,cAAc,EAAE,aAAa,CAAC;IAC9B,aAAa,EAAE,MAAM,CAAC;IACtB,cAAc,EAAE,MAAM,CAAC;IACvB,cAAc,CAA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OAAO;IAIpB;;OAEG;IACH,YAAY,IAAI,OAAO;IAIvB;;OAEG;IACH,QAAQ,IAAI,OAAO;IAInB;;OAEG;IACH,aAAa,IAAI,gBAAgB;IAIjC;;;;;;;;;;OAUG;IACH,gBAAgB,IAAI,aAAa,CAAC,aAAa,CAAC;IAUhD;;OAEG;IACH,cAAc,IAAI,iBAAiB,GAAG,IAAI,GAAG,SAAS;IAyCtD;;;OAGG;IACH,gBAAgB,IAAI,MAAM;IAkB1B;;OAEG;IACH,eAAe,IAAI,MAAM;IAczB;;OAEG;IACH,MAAM,CAAC,IAAI,CAAC,IAAI,EAAE,OAAO,GAAG,MAAM,GAAG,SAAS;IAc9C,MAAM,CAAC,UAAU,CAAC,SAAS,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE;IAWjD;;OAEG;IACH,MAAM,CAAC,QAAQ,CAAC,IAAI,EAAE,UAAU,GAAG,MAAM,GAAG,SAAS;IA6FrD;;OAEG;IACH,MAAM,CAAC,kBAAkB,CAAC,SAAS,EAAE,UAAU,EAAE,GAAG,MAAM,EAAE;IAW5D;;OAEG;IACH,MAAM,IAAI,UAAU;CAqCrB"}
|
|
@@ -34,8 +34,10 @@ export { toStringArray as payoutToStringArray };
|
|
|
34
34
|
export declare const PayoutDTOSchemas: {
|
|
35
35
|
payout: z.ZodObject<{
|
|
36
36
|
id: z.ZodString;
|
|
37
|
-
statusCode: z.ZodString
|
|
37
|
+
statusCode: z.ZodOptional<z.ZodString>;
|
|
38
38
|
statusCodeText: z.ZodEnum<typeof PAYOUT_STATUS>;
|
|
39
|
+
normalizedStatus: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<import("../../lib/status.js").NORMALIZED_STATUS | undefined, unknown>>;
|
|
40
|
+
normalizedStatusCode: z.ZodPipe<z.ZodOptional<z.ZodUnknown>, z.ZodTransform<import("../../lib/status.js").NORMALIZED_STATUS_CODE | undefined, unknown>>;
|
|
39
41
|
statusDescription: z.ZodString;
|
|
40
42
|
countryCode: z.ZodString;
|
|
41
43
|
serviceCode: z.ZodUnion<readonly [z.ZodEnum<typeof MOBILE_PAYOUT_CHANNEL>, z.ZodEnum<typeof BANK_PAYOUT_CHANNEL>]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"payout.types.d.ts","sourceRoot":"","sources":["../../../src/modules/payout/payout.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"payout.types.d.ts","sourceRoot":"","sources":["../../../src/modules/payout/payout.types.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAIxB,oBAAY,aAAa;IACvB,gBAAgB,qBAAqB;IACrC,eAAe,oBAAoB;IACnC,cAAc,mBAAmB;IACjC,gBAAgB,qBAAqB;IACrC,OAAO,YAAY;IACnB,qBAAqB,0BAA0B;IAC/C,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,eAAe,oBAAoB;IACnC,cAAc,mBAAmB;IACjC,oBAAoB,yBAAyB;IAC7C,iBAAiB,sBAAsB;IACvC,eAAe,oBAAoB;CACpC;AAED,oBAAY,qBAAqB;IAC/B,MAAM,kBAAkB;IACxB,OAAO,mBAAmB;IAC1B,IAAI,gBAAgB;IACpB,OAAO,mBAAmB;IAC1B,SAAS,qBAAqB;CAC/B;AAED,oBAAY,mBAAmB;IAC7B,IAAI,gBAAgB;CACrB;AAED,MAAM,MAAM,cAAc,GAAG,qBAAqB,GAAG,mBAAmB,CAAC;AASzE;;;GAGG;AACH,QAAA,MAAM,aAAa,GAAI,OAAO,OAAO,KAAG,MAAM,EAO7C,CAAC;AAgIF,OAAO,EAAE,aAAa,IAAI,mBAAmB,EAAE,CAAC;AAEhD,eAAO,MAAM,gBAAgB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4B5B,CAAC;AAGF,MAAM,MAAM,SAAS,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,MAAM,CAAC,CAAC;AAChE,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,aAAa,CAAC,CAAC;AAC3E,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,gBAAgB,CAAC,oBAAoB,CAAC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@temboplus/tembo-dashboard",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.0",
|
|
4
4
|
"description": "A foundational library for Temboplus-Dashboard projects providing type-safe data layer abstraction with API contracts, domain models, and repositories.",
|
|
5
5
|
"author": "Okello Gerald",
|
|
6
6
|
"license": "MIT",
|