@pax2pay/client 0.6.17 → 0.6.18
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,6 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
export type AccountState = typeof
|
|
1
|
+
import { isly } from "isly";
|
|
2
|
+
export type AccountState = typeof AccountState.values[number];
|
|
3
3
|
export declare namespace AccountState {
|
|
4
|
-
|
|
4
|
+
const values: readonly ["ACTIVE", "INACTIVE", "DELETED", "EXPIRED", "PENDING", "APPROVED", "DECLINED", "ARCHIVED"];
|
|
5
|
+
const type: isly.Type<"ACTIVE" | "INACTIVE" | "DELETED" | "EXPIRED" | "PENDING" | "APPROVED" | "DECLINED" | "ARCHIVED">;
|
|
6
|
+
const is: (value: any | ("ACTIVE" | "INACTIVE" | "DELETED" | "EXPIRED" | "PENDING" | "APPROVED" | "DECLINED" | "ARCHIVED")) => value is "ACTIVE" | "INACTIVE" | "DELETED" | "EXPIRED" | "PENDING" | "APPROVED" | "DECLINED" | "ARCHIVED";
|
|
7
|
+
function toDisplay(value: AccountState): string;
|
|
5
8
|
}
|
|
6
|
-
export {};
|
|
@@ -1,9 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
import { isly } from "isly";
|
|
2
2
|
export var AccountState;
|
|
3
3
|
(function (AccountState) {
|
|
4
|
-
|
|
5
|
-
|
|
4
|
+
AccountState.values = [
|
|
5
|
+
"ACTIVE",
|
|
6
|
+
"INACTIVE",
|
|
7
|
+
"DELETED",
|
|
8
|
+
"EXPIRED",
|
|
9
|
+
"PENDING",
|
|
10
|
+
"APPROVED",
|
|
11
|
+
"DECLINED",
|
|
12
|
+
"ARCHIVED",
|
|
13
|
+
];
|
|
14
|
+
AccountState.type = isly.string(AccountState.values);
|
|
15
|
+
AccountState.is = AccountState.type.is;
|
|
16
|
+
function toDisplay(value) {
|
|
17
|
+
if (value == "ACTIVE")
|
|
18
|
+
return "active";
|
|
19
|
+
if (value == "INACTIVE")
|
|
20
|
+
return "frozen";
|
|
21
|
+
if (value == "DELETED")
|
|
22
|
+
return "closed";
|
|
23
|
+
if (value == "EXPIRED")
|
|
24
|
+
return "expired";
|
|
25
|
+
if (value == "PENDING")
|
|
26
|
+
return "pending";
|
|
27
|
+
if (value == "APPROVED")
|
|
28
|
+
return "approved";
|
|
29
|
+
if (value == "DECLINED")
|
|
30
|
+
return "declined";
|
|
31
|
+
if (value == "ARCHIVED")
|
|
32
|
+
return "archived";
|
|
33
|
+
return value;
|
|
6
34
|
}
|
|
7
|
-
AccountState.
|
|
35
|
+
AccountState.toDisplay = toDisplay;
|
|
8
36
|
})(AccountState || (AccountState = {}));
|
|
9
37
|
//# sourceMappingURL=AccountState.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountState.js","sourceRoot":"../","sources":["model/AccountState.ts"],"names":[],"mappings":"AAAA,MAAM,YAAY,GAAG,
|
|
1
|
+
{"version":3,"file":"AccountState.js","sourceRoot":"../","sources":["model/AccountState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,MAAM,KAAW,YAAY,CAgC5B;AAhCD,WAAiB,YAAY;IACf,mBAAM,GAAG;QACrB,QAAQ;QACR,UAAU;QACV,SAAS;QACT,SAAS;QACT,SAAS;QACT,UAAU;QACV,UAAU;QACV,UAAU;KACD,CAAA;IACG,iBAAI,GAAG,IAAI,CAAC,MAAM,CAAe,aAAA,MAAM,CAAC,CAAA;IACxC,eAAE,GAAG,aAAA,IAAI,CAAC,EAAE,CAAA;IACzB,SAAgB,SAAS,CAAC,KAAmB;QAC5C,IAAI,KAAK,IAAI,QAAQ;YACpB,OAAO,QAAQ,CAAA;QAChB,IAAI,KAAK,IAAI,UAAU;YACtB,OAAO,QAAQ,CAAA;QAChB,IAAI,KAAK,IAAI,SAAS;YACrB,OAAO,QAAQ,CAAA;QAChB,IAAI,KAAK,IAAI,SAAS;YACrB,OAAO,SAAS,CAAA;QACjB,IAAI,KAAK,IAAI,SAAS;YACrB,OAAO,SAAS,CAAA;QACjB,IAAI,KAAK,IAAI,UAAU;YACtB,OAAO,UAAU,CAAA;QAClB,IAAI,KAAK,IAAI,UAAU;YACtB,OAAO,UAAU,CAAA;QAClB,IAAI,KAAK,IAAI,UAAU;YACtB,OAAO,UAAU,CAAA;QAClB,OAAO,KAAK,CAAA;IACb,CAAC;IAlBe,sBAAS,YAkBxB,CAAA;AACF,CAAC,EAhCgB,YAAY,KAAZ,YAAY,QAgC5B"}
|
package/model/AccountState.ts
CHANGED
|
@@ -1,9 +1,37 @@
|
|
|
1
|
-
|
|
1
|
+
import { isly } from "isly"
|
|
2
2
|
|
|
3
|
-
export type AccountState = typeof
|
|
3
|
+
export type AccountState = typeof AccountState.values[number]
|
|
4
4
|
|
|
5
5
|
export namespace AccountState {
|
|
6
|
-
export
|
|
7
|
-
|
|
6
|
+
export const values = [
|
|
7
|
+
"ACTIVE",
|
|
8
|
+
"INACTIVE",
|
|
9
|
+
"DELETED",
|
|
10
|
+
"EXPIRED",
|
|
11
|
+
"PENDING",
|
|
12
|
+
"APPROVED",
|
|
13
|
+
"DECLINED",
|
|
14
|
+
"ARCHIVED",
|
|
15
|
+
] as const
|
|
16
|
+
export const type = isly.string<AccountState>(values)
|
|
17
|
+
export const is = type.is
|
|
18
|
+
export function toDisplay(value: AccountState): string {
|
|
19
|
+
if (value == "ACTIVE")
|
|
20
|
+
return "active"
|
|
21
|
+
if (value == "INACTIVE")
|
|
22
|
+
return "frozen"
|
|
23
|
+
if (value == "DELETED")
|
|
24
|
+
return "closed"
|
|
25
|
+
if (value == "EXPIRED")
|
|
26
|
+
return "expired"
|
|
27
|
+
if (value == "PENDING")
|
|
28
|
+
return "pending"
|
|
29
|
+
if (value == "APPROVED")
|
|
30
|
+
return "approved"
|
|
31
|
+
if (value == "DECLINED")
|
|
32
|
+
return "declined"
|
|
33
|
+
if (value == "ARCHIVED")
|
|
34
|
+
return "archived"
|
|
35
|
+
return value
|
|
8
36
|
}
|
|
9
37
|
}
|