@pax2pay/model-banking 0.1.42 → 0.1.44

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 (145) hide show
  1. package/Account/index.ts +1 -1
  2. package/Balances/index.ts +1 -1
  3. package/Card/Changable.ts +17 -0
  4. package/Card/Creatable.ts +36 -0
  5. package/Card/Expiry.ts +15 -0
  6. package/Card/Meta.ts +17 -0
  7. package/Card/Operation/Cancel.ts +15 -0
  8. package/Card/Operation/Change.ts +18 -0
  9. package/Card/Operation/Create.ts +15 -0
  10. package/Card/Operation/index.ts +11 -0
  11. package/Card/Preset.ts +10 -0
  12. package/Card/index.ts +68 -0
  13. package/Client/Accounts/Rails.ts +2 -2
  14. package/Client/Accounts/index.ts +2 -2
  15. package/Client/Application.ts +3 -3
  16. package/Client/Me.ts +1 -1
  17. package/Client/Operations.ts +2 -2
  18. package/Client/Organization.ts +3 -3
  19. package/Client/Organizations/Rules.ts +2 -2
  20. package/Client/Organizations/index.ts +2 -2
  21. package/Client/Transactions/Notes.ts +2 -2
  22. package/Client/Transactions/index.ts +2 -2
  23. package/Client/Treasury.ts +3 -3
  24. package/Client/User.ts +3 -3
  25. package/Client/Version.ts +2 -2
  26. package/Client/index.ts +2 -10
  27. package/Operation/Creatable.ts +1 -1
  28. package/Operation/index.ts +1 -1
  29. package/Organization/Rule.ts +1 -1
  30. package/Transaction/Creatable.ts +1 -1
  31. package/Transaction/Incoming.ts +1 -1
  32. package/Transaction/Note.ts +1 -1
  33. package/Transaction/index.ts +1 -1
  34. package/Treasury/Account/Creatable.ts +1 -1
  35. package/Treasury/Account/Fetchable.ts +1 -1
  36. package/Treasury/Account/Storable.ts +1 -1
  37. package/Treasury/Account/index.ts +1 -1
  38. package/Treasury/Balance/index.ts +1 -1
  39. package/Treasury/Client/Treasury.ts +3 -3
  40. package/Treasury/Client/index.ts +3 -3
  41. package/Treasury/Treasury.ts +1 -1
  42. package/dist/Account/index.d.ts +1 -1
  43. package/dist/Account/index.js +1 -1
  44. package/dist/Account/index.js.map +1 -1
  45. package/dist/Balances/index.d.ts +1 -1
  46. package/dist/Balances/index.js +1 -1
  47. package/dist/Balances/index.js.map +1 -1
  48. package/dist/Card/Changable.d.ts +11 -0
  49. package/dist/Card/Changable.js +12 -0
  50. package/dist/Card/Changable.js.map +1 -0
  51. package/dist/Card/Creatable.d.ts +22 -0
  52. package/dist/Card/Creatable.js +23 -0
  53. package/dist/Card/Creatable.js.map +1 -0
  54. package/dist/Card/Expiry.d.ts +11 -0
  55. package/dist/Card/Expiry.js +11 -0
  56. package/dist/Card/Expiry.js.map +1 -0
  57. package/dist/Card/Meta.d.ts +8 -0
  58. package/dist/Card/Meta.js +13 -0
  59. package/dist/Card/Meta.js.map +1 -0
  60. package/dist/Card/Operation/Cancel.d.ts +10 -0
  61. package/dist/Card/Operation/Cancel.js +11 -0
  62. package/dist/Card/Operation/Cancel.js.map +1 -0
  63. package/dist/Card/Operation/Change.d.ts +12 -0
  64. package/dist/Card/Operation/Change.js +13 -0
  65. package/dist/Card/Operation/Change.js.map +1 -0
  66. package/dist/Card/Operation/Create.d.ts +10 -0
  67. package/dist/Card/Operation/Create.js +11 -0
  68. package/dist/Card/Operation/Create.js.map +1 -0
  69. package/dist/Card/Operation/index.d.ts +9 -0
  70. package/dist/Card/Operation/index.js +10 -0
  71. package/dist/Card/Operation/index.js.map +1 -0
  72. package/dist/Card/Preset.d.ts +8 -0
  73. package/dist/Card/Preset.js +8 -0
  74. package/dist/Card/Preset.js.map +1 -0
  75. package/dist/Card/index.d.ts +45 -0
  76. package/dist/Card/index.js +41 -0
  77. package/dist/Card/index.js.map +1 -0
  78. package/dist/Client/Accounts/Rails.d.ts +2 -2
  79. package/dist/Client/Accounts/index.d.ts +2 -2
  80. package/dist/Client/Application.d.ts +3 -3
  81. package/dist/Client/Application.js +2 -2
  82. package/dist/Client/Application.js.map +1 -1
  83. package/dist/Client/Me.d.ts +1 -1
  84. package/dist/Client/Me.js +1 -1
  85. package/dist/Client/Me.js.map +1 -1
  86. package/dist/Client/Operations.d.ts +2 -2
  87. package/dist/Client/Organization.d.ts +3 -3
  88. package/dist/Client/Organization.js +2 -2
  89. package/dist/Client/Organization.js.map +1 -1
  90. package/dist/Client/Organizations/Rules.d.ts +2 -2
  91. package/dist/Client/Organizations/index.d.ts +2 -2
  92. package/dist/Client/Transactions/Notes.d.ts +2 -2
  93. package/dist/Client/Transactions/index.d.ts +2 -2
  94. package/dist/Client/Treasury.d.ts +3 -3
  95. package/dist/Client/User.d.ts +3 -3
  96. package/dist/Client/User.js +2 -2
  97. package/dist/Client/User.js.map +1 -1
  98. package/dist/Client/Version.d.ts +2 -2
  99. package/dist/Client/index.d.ts +2 -9
  100. package/dist/Client/index.js +1 -2
  101. package/dist/Client/index.js.map +1 -1
  102. package/dist/Operation/Creatable.d.ts +1 -1
  103. package/dist/Operation/Creatable.js +1 -1
  104. package/dist/Operation/Creatable.js.map +1 -1
  105. package/dist/Operation/index.d.ts +1 -1
  106. package/dist/Operation/index.js +1 -1
  107. package/dist/Operation/index.js.map +1 -1
  108. package/dist/Organization/Rule.d.ts +1 -1
  109. package/dist/Transaction/Creatable.d.ts +1 -1
  110. package/dist/Transaction/Creatable.js +1 -1
  111. package/dist/Transaction/Creatable.js.map +1 -1
  112. package/dist/Transaction/Incoming.d.ts +1 -1
  113. package/dist/Transaction/Incoming.js +1 -1
  114. package/dist/Transaction/Incoming.js.map +1 -1
  115. package/dist/Transaction/Note.d.ts +1 -1
  116. package/dist/Transaction/Note.js +1 -1
  117. package/dist/Transaction/Note.js.map +1 -1
  118. package/dist/Transaction/index.d.ts +1 -1
  119. package/dist/Transaction/index.js +1 -1
  120. package/dist/Transaction/index.js.map +1 -1
  121. package/dist/Treasury/Account/Creatable.d.ts +1 -1
  122. package/dist/Treasury/Account/Creatable.js +1 -1
  123. package/dist/Treasury/Account/Creatable.js.map +1 -1
  124. package/dist/Treasury/Account/Fetchable.d.ts +1 -1
  125. package/dist/Treasury/Account/Fetchable.js +1 -1
  126. package/dist/Treasury/Account/Fetchable.js.map +1 -1
  127. package/dist/Treasury/Account/Storable.d.ts +1 -1
  128. package/dist/Treasury/Account/Storable.js +1 -1
  129. package/dist/Treasury/Account/Storable.js.map +1 -1
  130. package/dist/Treasury/Account/index.d.ts +1 -1
  131. package/dist/Treasury/Account/index.js +1 -1
  132. package/dist/Treasury/Account/index.js.map +1 -1
  133. package/dist/Treasury/Balance/index.d.ts +1 -1
  134. package/dist/Treasury/Balance/index.js +1 -1
  135. package/dist/Treasury/Balance/index.js.map +1 -1
  136. package/dist/Treasury/Client/Treasury.d.ts +3 -3
  137. package/dist/Treasury/Client/index.d.ts +3 -3
  138. package/dist/Treasury/Client/index.js +1 -1
  139. package/dist/Treasury/Client/index.js.map +1 -1
  140. package/dist/Treasury/Treasury.d.ts +1 -1
  141. package/dist/pax2pay.d.ts +1 -0
  142. package/dist/pax2pay.js +1 -0
  143. package/dist/pax2pay.js.map +1 -1
  144. package/package.json +10 -9
  145. package/pax2pay.ts +1 -0
package/Account/index.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import * as cryptly from "cryptly"
2
- import * as isoly from "isoly"
2
+ import { isoly } from "isoly"
3
3
  import { Balances } from "../Balances"
4
4
  import { Rail } from "../Rail"
5
5
  import { Creatable as AccountCreatable } from "./Creatable"
package/Balances/index.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as isoly from "isoly"
1
+ import { isoly } from "isoly"
2
2
  import { BalanceEntries, BalanceEntry } from "./type"
3
3
 
4
4
  export type Balances = Partial<Record<isoly.Currency, Partial<Record<BalanceEntry, number>>>>
@@ -0,0 +1,17 @@
1
+ import * as isoly from "isoly"
2
+ import { isly } from "isly"
3
+ import { Meta } from "./Meta"
4
+
5
+ export type Changable = {
6
+ limit?: [isoly.Currency, number]
7
+ rules?: string[]
8
+ meta?: Meta
9
+ }
10
+
11
+ export namespace Changable {
12
+ export const type = isly.object({
13
+ limit: isly.tuple(isly.fromIs("isoly.Currency", isoly.Currency.is), isly.number()).optional(),
14
+ rules: isly.string().array().optional(),
15
+ meta: isly.fromIs("Card.Meta", Meta.is).optional(),
16
+ })
17
+ }
@@ -0,0 +1,36 @@
1
+ import * as isoly from "isoly"
2
+ import { isly } from "isly"
3
+ import { Expiry } from "./Expiry"
4
+ import { Meta } from "./Meta"
5
+ import { Preset } from "./Preset"
6
+
7
+ export interface Creatable {
8
+ account: string
9
+ number?: string
10
+ preset: Preset
11
+ details: {
12
+ iin: string
13
+ expiry: Expiry
14
+ holder: string
15
+ }
16
+ limit: [isoly.Currency, number]
17
+ rules?: string[]
18
+ meta?: Meta
19
+ }
20
+
21
+ export namespace Creatable {
22
+ export const type = isly.object<Creatable>({
23
+ account: isly.string(),
24
+ number: isly.string().optional(),
25
+ preset: Preset.type,
26
+ details: isly.object({
27
+ iin: isly.string(),
28
+ expiry: Expiry.type,
29
+ holder: isly.string(),
30
+ }),
31
+ limit: isly.tuple(isly.fromIs("isoly.Currency", isoly.Currency.is), isly.number()),
32
+ rules: isly.string().array().optional(),
33
+ meta: isly.fromIs("Card.Meta", Meta.is).optional(),
34
+ })
35
+ export const is = type.is
36
+ }
package/Card/Expiry.ts ADDED
@@ -0,0 +1,15 @@
1
+ import { isly } from "isly"
2
+
3
+ const year = [
4
+ 2023, 2024, 2025, 2026, 2027, 2028, 2029, 2030, 2031, 2032, 2033, 2034, 2035, 2036, 2037, 2038, 2039, 2040,
5
+ ] as const
6
+ type Year = typeof year[number]
7
+
8
+ const month = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12] as const
9
+ type Month = typeof month[number]
10
+
11
+ export type Expiry = [Year, Month]
12
+ export namespace Expiry {
13
+ export const type = isly.tuple<Expiry>(isly.number([...year]), isly.number([...month])) // Deconstructing to remove readonly.
14
+ export const is = type.is
15
+ }
package/Card/Meta.ts ADDED
@@ -0,0 +1,17 @@
1
+ type Value = Meta | Value[] | undefined | number | string | boolean
2
+ export interface Meta {
3
+ [key: string]: Value
4
+ }
5
+
6
+ export namespace Meta {
7
+ export function is(value: any | Meta): value is Meta {
8
+ return (
9
+ (typeof value == "object" && Object.values(value).every(Meta.is)) ||
10
+ (Array.isArray(value) && value.every(Meta.is)) ||
11
+ value == undefined ||
12
+ typeof value == "number" ||
13
+ typeof value == "string" ||
14
+ typeof value == "boolean"
15
+ )
16
+ }
17
+ }
@@ -0,0 +1,15 @@
1
+ import * as isoly from "isoly"
2
+ import { isly } from "isly"
3
+
4
+ export interface Cancel {
5
+ type: "cancel"
6
+ created: isoly.DateTime
7
+ }
8
+
9
+ export namespace Cancel {
10
+ export const type = isly.object<Cancel>({
11
+ type: isly.string("cancel"),
12
+ created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
13
+ })
14
+ export const is = type.is
15
+ }
@@ -0,0 +1,18 @@
1
+ import * as isoly from "isoly"
2
+ import { isly } from "isly"
3
+ import { Changable } from "../Changable"
4
+
5
+ export interface Change {
6
+ type: "change"
7
+ from: Changable
8
+ created: isoly.DateTime
9
+ }
10
+
11
+ export namespace Change {
12
+ export const type = isly.object<Change>({
13
+ type: isly.string("change"),
14
+ from: Changable.type,
15
+ created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
16
+ })
17
+ export const is = type.is
18
+ }
@@ -0,0 +1,15 @@
1
+ import * as isoly from "isoly"
2
+ import { isly } from "isly"
3
+
4
+ export interface Create {
5
+ type: "create"
6
+ created: isoly.DateTime
7
+ }
8
+
9
+ export namespace Create {
10
+ export const type = isly.object<Create>({
11
+ type: isly.string("create"),
12
+ created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
13
+ })
14
+ export const is = type.is
15
+ }
@@ -0,0 +1,11 @@
1
+ import { isly } from "isly"
2
+ import { Cancel } from "./Cancel"
3
+ import { Change } from "./Change"
4
+ import { Create } from "./Create"
5
+
6
+ export type Operation = Cancel | Change | Create
7
+
8
+ export namespace Operation {
9
+ export const type = isly.union(Cancel.type, Change.type, Create.type)
10
+ export const is = type.is
11
+ }
package/Card/Preset.ts ADDED
@@ -0,0 +1,10 @@
1
+ import { isly } from "isly"
2
+
3
+ const preset = ["example1"] as const
4
+
5
+ export type Preset = typeof preset[number]
6
+
7
+ export namespace Preset {
8
+ export const type = isly.string(preset)
9
+ export const is = type.is
10
+ }
package/Card/index.ts ADDED
@@ -0,0 +1,68 @@
1
+ import * as isoly from "isoly"
2
+ import { isly } from "isly"
3
+ import { Operation as BankingOperation } from "../Operation"
4
+ import { Changable as CardChangable } from "./Changable"
5
+ import { Creatable as CardCreatable } from "./Creatable"
6
+ import { Expiry as CardExpiry } from "./Expiry"
7
+ import { Meta as CardMeta } from "./Meta"
8
+ import { Operation as CardOperation } from "./Operation"
9
+ import { Preset as CardPreset } from "./Preset"
10
+
11
+ export interface Card {
12
+ id: string
13
+ number?: string
14
+ token: string
15
+ created: isoly.DateTime
16
+ organization: string
17
+ account: string
18
+ preset: CardPreset
19
+ reference?: string
20
+ details: {
21
+ iin: string
22
+ last4: string
23
+ expiry: CardExpiry
24
+ holder: string
25
+ }
26
+ limit: [isoly.Currency, number]
27
+ spent: [isoly.Currency, number]
28
+ status: "active" | "cancelled"
29
+ history: (BankingOperation | CardOperation)[]
30
+ rules: string[]
31
+ meta?: CardMeta
32
+ }
33
+
34
+ export namespace Card {
35
+ export const type = isly.object<Card>({
36
+ id: isly.string(),
37
+ number: isly.string().optional(),
38
+ token: isly.string(),
39
+ created: isly.string(),
40
+ organization: isly.string(),
41
+ account: isly.string(),
42
+ preset: CardPreset.type,
43
+ reference: isly.string().optional(),
44
+ details: isly.object({
45
+ iin: isly.string(),
46
+ last4: isly.string(),
47
+ expiry: CardExpiry.type,
48
+ holder: isly.string(),
49
+ }),
50
+ limit: isly.tuple(isly.fromIs("isoly.Currency", isoly.Currency.is), isly.number()),
51
+ spent: isly.tuple(isly.fromIs("isoly.Currency", isoly.Currency.is), isly.number()),
52
+ status: isly.union(isly.string("active"), isly.string("cancelled")),
53
+ history: isly.union(CardOperation.type, isly.fromIs("Banking.Operation", BankingOperation.is)).array(),
54
+ rules: isly.string().array(),
55
+ meta: isly.fromIs("Card.Meta", CardMeta.is).optional(),
56
+ })
57
+ export const is = type.is
58
+ export type Creatable = CardCreatable
59
+ export const Creatable = CardCreatable
60
+ export type Preset = CardPreset
61
+ export const Preset = CardPreset
62
+ export type Meta = CardMeta
63
+ export const Meta = CardMeta
64
+ export type Expiry = CardExpiry
65
+ export const Expiry = CardExpiry
66
+ export type Changable = CardChangable
67
+ export const Changable = CardChangable
68
+ }
@@ -1,5 +1,5 @@
1
- import * as gracely from "gracely"
2
- import * as http from "cloudly-http"
1
+ import { gracely } from "gracely"
2
+ import { http } from "cloudly-http"
3
3
  import * as rest from "cloudly-rest"
4
4
  import { Rail } from "../../Rail"
5
5
  import { Supplier } from "../../Supplier"
@@ -1,5 +1,5 @@
1
- import * as gracely from "gracely"
2
- import * as http from "cloudly-http"
1
+ import { gracely } from "gracely"
2
+ import { http } from "cloudly-http"
3
3
  import * as rest from "cloudly-rest"
4
4
  import { Account } from "../../Account"
5
5
  import { Rails } from "./Rails"
@@ -1,7 +1,7 @@
1
- import * as gracely from "gracely"
2
- import * as isoly from "isoly"
1
+ import { gracely } from "gracely"
2
+ import { isoly } from "isoly"
3
3
  import { userwidgets } from "@userwidgets/model"
4
- import * as http from "cloudly-http"
4
+ import { http } from "cloudly-http"
5
5
  import * as rest from "cloudly-rest"
6
6
 
7
7
  export interface EntityTags {
package/Client/Me.ts CHANGED
@@ -1,4 +1,4 @@
1
- import * as gracely from "gracely"
1
+ import { gracely } from "gracely"
2
2
  import { userwidgets } from "@userwidgets/model"
3
3
  import * as rest from "cloudly-rest"
4
4
 
@@ -1,5 +1,5 @@
1
- import * as gracely from "gracely"
2
- import * as http from "cloudly-http"
1
+ import { gracely } from "gracely"
2
+ import { http } from "cloudly-http"
3
3
  import * as rest from "cloudly-rest"
4
4
  import { Operation } from "../Operation"
5
5
 
@@ -1,7 +1,7 @@
1
- import * as gracely from "gracely"
2
- import * as isoly from "isoly"
1
+ import { gracely } from "gracely"
2
+ import { isoly } from "isoly"
3
3
  import { userwidgets } from "@userwidgets/model"
4
- import * as http from "cloudly-http"
4
+ import { http } from "cloudly-http"
5
5
  import * as rest from "cloudly-rest"
6
6
 
7
7
  export interface EntityTags {
@@ -1,5 +1,5 @@
1
- import * as gracely from "gracely"
2
- import * as http from "cloudly-http"
1
+ import { gracely } from "gracely"
2
+ import { http } from "cloudly-http"
3
3
  import * as rest from "cloudly-rest"
4
4
  import { Organization } from "../../Organization"
5
5
 
@@ -1,5 +1,5 @@
1
- import * as gracely from "gracely"
2
- import * as http from "cloudly-http"
1
+ import { gracely } from "gracely"
2
+ import { http } from "cloudly-http"
3
3
  import * as rest from "cloudly-rest"
4
4
  import { Organization } from "../../Organization"
5
5
  import { Rules } from "./Rules"
@@ -1,5 +1,5 @@
1
- import * as gracely from "gracely"
2
- import * as http from "cloudly-http"
1
+ import { gracely } from "gracely"
2
+ import { http } from "cloudly-http"
3
3
  import * as rest from "cloudly-rest"
4
4
  import { Transaction } from "../../Transaction"
5
5
 
@@ -1,5 +1,5 @@
1
- import * as gracely from "gracely"
2
- import * as http from "cloudly-http"
1
+ import { gracely } from "gracely"
2
+ import { http } from "cloudly-http"
3
3
  import * as rest from "cloudly-rest"
4
4
  import { Transaction } from "../../Transaction"
5
5
  import { Notes } from "./Notes"
@@ -1,6 +1,6 @@
1
- import * as gracely from "gracely"
2
- import * as isoly from "isoly"
3
- import * as http from "cloudly-http"
1
+ import { gracely } from "gracely"
2
+ import { isoly } from "isoly"
3
+ import { http } from "cloudly-http"
4
4
  import * as rest from "cloudly-rest"
5
5
  import { Treasury as TreasuryModel } from "../Treasury"
6
6
  import { Result } from "../Treasury/Balance"
package/Client/User.ts CHANGED
@@ -1,7 +1,7 @@
1
- import * as gracely from "gracely"
2
- import * as isoly from "isoly"
1
+ import { gracely } from "gracely"
2
+ import { isoly } from "isoly"
3
3
  import { userwidgets } from "@userwidgets/model"
4
- import * as http from "cloudly-http"
4
+ import { http } from "cloudly-http"
5
5
  import * as rest from "cloudly-rest"
6
6
 
7
7
  export interface EntityTags {
package/Client/Version.ts CHANGED
@@ -1,5 +1,5 @@
1
- import * as gracely from "gracely"
2
- import * as http from "cloudly-http"
1
+ import { gracely } from "gracely"
2
+ import { http } from "cloudly-http"
3
3
  import * as rest from "cloudly-rest"
4
4
 
5
5
  export class Version extends rest.Collection<gracely.Error> {
package/Client/index.ts CHANGED
@@ -1,7 +1,6 @@
1
- import * as gracely from "gracely"
2
- import * as isoly from "isoly"
1
+ import { gracely } from "gracely"
3
2
  import { userwidgets } from "@userwidgets/model"
4
- import * as http from "cloudly-http"
3
+ import { http } from "cloudly-http"
5
4
  import * as rest from "cloudly-rest"
6
5
  import { Accounts } from "./Accounts"
7
6
  import { Application as ClientApplication } from "./Application"
@@ -14,16 +13,9 @@ import { Treasury } from "./Treasury"
14
13
  import { User as ClientUser } from "./User"
15
14
  import { Version } from "./Version"
16
15
 
17
- export interface EntityTags {
18
- application: Record<string, isoly.DateTime | undefined>
19
- organization: Record<string, isoly.DateTime | undefined>
20
- user: Record<string, isoly.DateTime | undefined>
21
- }
22
-
23
16
  export class Client extends rest.Client<gracely.Error> {
24
17
  realm?: string
25
18
  organization?: string
26
- entityTags: EntityTags = { application: {}, organization: {}, user: {} }
27
19
  readonly userwidgets = new userwidgets.ClientCollection(this.client, "/widgets")
28
20
  readonly accounts = new Accounts(this.client)
29
21
  readonly operations = new Operations(this.client)
@@ -1,5 +1,5 @@
1
1
  import * as cryptly from "cryptly"
2
- import * as isoly from "isoly"
2
+ import { isoly } from "isoly"
3
3
  import { Balances } from "../Balances"
4
4
 
5
5
  export type Status = "pending" | "success" | "failed" //| "cancelled"
@@ -1,5 +1,5 @@
1
1
  import * as cryptly from "cryptly"
2
- import * as isoly from "isoly"
2
+ import { isoly } from "isoly"
3
3
  import { Creatable as OperationCreatable } from "./Creatable"
4
4
 
5
5
  export interface Operation extends OperationCreatable {
@@ -1,4 +1,4 @@
1
- import * as selectively from "selectively"
1
+ import { selectively } from "selectively"
2
2
 
3
3
  export interface Rule {
4
4
  label: string
@@ -1,4 +1,4 @@
1
- import * as isoly from "isoly"
1
+ import { isoly } from "isoly"
2
2
  import { Operation } from "../Operation"
3
3
  import { Rail } from "../Rail"
4
4
 
@@ -1,4 +1,4 @@
1
- import * as isoly from "isoly"
1
+ import { isoly } from "isoly"
2
2
  import { Rail } from "../Rail"
3
3
  import { Creatable as TransactionCreatable } from "./Creatable"
4
4
  import { Reference as TransactionReference } from "./Reference"
@@ -1,4 +1,4 @@
1
- import * as isoly from "isoly"
1
+ import { isoly } from "isoly"
2
2
 
3
3
  export interface Note extends Note.Creatable {
4
4
  author: string
@@ -1,5 +1,5 @@
1
1
  import * as cryptly from "cryptly"
2
- import * as isoly from "isoly"
2
+ import { isoly } from "isoly"
3
3
  import { Operation } from "../Operation"
4
4
  import { Rail } from "../Rail"
5
5
  import { Creatable as TransactionCreatable } from "./Creatable"
@@ -1,4 +1,4 @@
1
- import * as isoly from "isoly"
1
+ import { isoly } from "isoly"
2
2
  import { Realm } from "../../Realm"
3
3
  import { Supplier } from "../../Supplier"
4
4
 
@@ -1,4 +1,4 @@
1
- import * as isoly from "isoly"
1
+ import { isoly } from "isoly"
2
2
  import { Rail } from "../../Rail"
3
3
  import { Supplier } from "../../Supplier"
4
4
  import { Balance } from "../Balance"
@@ -1,5 +1,5 @@
1
1
  import * as cryptly from "cryptly"
2
- import * as isoly from "isoly"
2
+ import { isoly } from "isoly"
3
3
  import { Realm } from "../../Realm"
4
4
  import { Supplier } from "../../Supplier"
5
5
 
@@ -1,5 +1,5 @@
1
1
  import * as cryptly from "cryptly"
2
- import * as isoly from "isoly"
2
+ import { isoly } from "isoly"
3
3
  import { Rail } from "../../Rail"
4
4
  import { Realm } from "../../Realm"
5
5
  import { Supplier } from "../../Supplier"
@@ -1,4 +1,4 @@
1
- import * as isoly from "isoly"
1
+ import { isoly } from "isoly"
2
2
 
3
3
  export type Balance = Partial<Record<isoly.Currency, number>>
4
4
 
@@ -1,6 +1,6 @@
1
- import * as gracely from "gracely"
2
- import * as isoly from "isoly"
3
- import * as http from "cloudly-http"
1
+ import { gracely } from "gracely"
2
+ import { isoly } from "isoly"
3
+ import { http } from "cloudly-http"
4
4
  import * as rest from "cloudly-rest"
5
5
  import { Result } from "../Balance"
6
6
  import { Treasury as TreasuryModel } from "../Treasury"
@@ -1,6 +1,6 @@
1
- import * as gracely from "gracely"
2
- import * as isoly from "isoly"
3
- import * as http from "cloudly-http"
1
+ import { gracely } from "gracely"
2
+ import { isoly } from "isoly"
3
+ import { http } from "cloudly-http"
4
4
  import * as rest from "cloudly-rest"
5
5
  import { Application as ClientApplication } from "./../../Client/Application"
6
6
  import { Me as ClientMe } from "./../../Client/Me"
@@ -1,4 +1,4 @@
1
- import * as isoly from "isoly"
1
+ import { isoly } from "isoly"
2
2
  import { Balances } from "../Balances"
3
3
  import { Fiat } from "./Fiat"
4
4
 
@@ -1,5 +1,5 @@
1
1
  import * as cryptly from "cryptly";
2
- import * as isoly from "isoly";
2
+ import { isoly } from "isoly";
3
3
  import { Balances } from "../Balances";
4
4
  import { Rail } from "../Rail";
5
5
  import { Creatable as AccountCreatable } from "./Creatable";
@@ -1,5 +1,5 @@
1
1
  import * as cryptly from "cryptly";
2
- import * as isoly from "isoly";
2
+ import { isoly } from "isoly";
3
3
  import { Balances } from "../Balances";
4
4
  import { Rail } from "../Rail";
5
5
  import { Creatable as AccountCreatable } from "./Creatable";
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Account/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,OAAO,MAAM,SAAS,CAAA;AAClC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAA;AACtC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAC9B,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAA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AAiB,IAAI,CAUpB;IAVD,WAAiB,IAAI;QACpB,SAAgB,EAAE,CAAC,KAAiB;YACnC,OAAO,CACN,OAAO,KAAK,IAAI,QAAQ;gBACxB,OAAO,CAAC,EAAE,CAAC,EAAE,GAAG,KAAK,EAAE,CAAC;gBACxB,KAAK,CAAC,OAAO,CAAC,KAAK,CAAC,KAAK,CAAC;gBAC1B,KAAK,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAM,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC;gBACzC,QAAQ,CAAC,EAAE,CAAC,KAAK,CAAC,QAAQ,CAAC,CAC3B,CAAA;QACF,CAAC;QARe,OAAE,KAQjB,CAAA;IACF,CAAC,EAVgB,IAAI,GAAJ,YAAI,KAAJ,YAAI,QAUpB;AACF,CAAC,EA/BgB,OAAO,KAAP,OAAO,QA+BvB"}
@@ -1,4 +1,4 @@
1
- import * as isoly from "isoly";
1
+ import { isoly } from "isoly";
2
2
  import { BalanceEntry } from "./type";
3
3
  export type Balances = Partial<Record<isoly.Currency, Partial<Record<BalanceEntry, number>>>>;
4
4
  export declare namespace Balances {
@@ -1,4 +1,4 @@
1
- import * as isoly from "isoly";
1
+ import { isoly } from "isoly";
2
2
  import { BalanceEntries, BalanceEntry } from "./type";
3
3
  export var Balances;
4
4
  (function (Balances) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Balances/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,QAAQ,CAAA;AAIrD,MAAM,KAAW,QAAQ,CAiBxB;AAjBD,WAAiB,QAAQ;IACX,gBAAO,GAAmB,CAAC,GAAG,cAAc,CAAC,CAAA;IAC1D,SAAgB,EAAE,CAAC,KAAqB;QACvC,OAAO,CACN,OAAO,KAAK,IAAI,QAAQ;YACxB,MAAM,CAAC,OAAO,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,CAC1E,CACF,CACD,CAAA;IACF,CAAC;IAZe,WAAE,KAYjB,CAAA;IAEY,cAAK,GAAG,YAAY,CAAA;AAClC,CAAC,EAjBgB,QAAQ,KAAR,QAAQ,QAiBxB"}
@@ -0,0 +1,11 @@
1
+ import * as isoly from "isoly";
2
+ import { isly } from "isly";
3
+ import { Meta } from "./Meta";
4
+ export type Changable = {
5
+ limit?: [isoly.Currency, number];
6
+ rules?: string[];
7
+ meta?: Meta;
8
+ };
9
+ export declare namespace Changable {
10
+ const type: isly.object.ExtendableType<object>;
11
+ }
@@ -0,0 +1,12 @@
1
+ import * as isoly from "isoly";
2
+ import { isly } from "isly";
3
+ import { Meta } from "./Meta";
4
+ export var Changable;
5
+ (function (Changable) {
6
+ Changable.type = isly.object({
7
+ limit: isly.tuple(isly.fromIs("isoly.Currency", isoly.Currency.is), isly.number()).optional(),
8
+ rules: isly.string().array().optional(),
9
+ meta: isly.fromIs("Card.Meta", Meta.is).optional(),
10
+ });
11
+ })(Changable || (Changable = {}));
12
+ //# sourceMappingURL=Changable.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Changable.js","sourceRoot":"../","sources":["Card/Changable.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAQ7B,MAAM,KAAW,SAAS,CAMzB;AAND,WAAiB,SAAS;IACZ,cAAI,GAAG,IAAI,CAAC,MAAM,CAAC;QAC/B,KAAK,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE;QAC7F,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QACvC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,WAAW,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,QAAQ,EAAE;KAClD,CAAC,CAAA;AACH,CAAC,EANgB,SAAS,KAAT,SAAS,QAMzB"}
@@ -0,0 +1,22 @@
1
+ import * as isoly from "isoly";
2
+ import { isly } from "isly";
3
+ import { Expiry } from "./Expiry";
4
+ import { Meta } from "./Meta";
5
+ import { Preset } from "./Preset";
6
+ export interface Creatable {
7
+ account: string;
8
+ number?: string;
9
+ preset: Preset;
10
+ details: {
11
+ iin: string;
12
+ expiry: Expiry;
13
+ holder: string;
14
+ };
15
+ limit: [isoly.Currency, number];
16
+ rules?: string[];
17
+ meta?: Meta;
18
+ }
19
+ export declare namespace Creatable {
20
+ const type: isly.object.ExtendableType<Creatable>;
21
+ const is: isly.Type.IsFunction<Creatable>;
22
+ }