@pax2pay/model-banking 0.1.48 → 0.1.50

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 (65) hide show
  1. package/Card/Operation/Authorization.ts +19 -0
  2. package/Card/Operation/Card.ts +20 -0
  3. package/Card/Operation/Settlement.ts +19 -0
  4. package/Card/Operation/index.ts +5 -5
  5. package/Card/index.ts +12 -8
  6. package/Client/index.ts +2 -14
  7. package/Treasury/index.ts +0 -3
  8. package/dist/Card/Operation/Authorization.d.ts +12 -0
  9. package/dist/Card/Operation/Authorization.js +13 -0
  10. package/dist/Card/Operation/Authorization.js.map +1 -0
  11. package/dist/Card/Operation/Card.d.ts +13 -0
  12. package/dist/Card/Operation/Card.js +14 -0
  13. package/dist/Card/Operation/Card.js.map +1 -0
  14. package/dist/Card/Operation/Settlement.d.ts +12 -0
  15. package/dist/Card/Operation/Settlement.js +13 -0
  16. package/dist/Card/Operation/Settlement.js.map +1 -0
  17. package/dist/Card/Operation/index.d.ts +6 -6
  18. package/dist/Card/Operation/index.js +4 -4
  19. package/dist/Card/Operation/index.js.map +1 -1
  20. package/dist/Card/index.d.ts +2 -3
  21. package/dist/Card/index.js +10 -6
  22. package/dist/Card/index.js.map +1 -1
  23. package/dist/Client/index.d.ts +1 -13
  24. package/dist/Client/index.js +2 -12
  25. package/dist/Client/index.js.map +1 -1
  26. package/dist/Treasury/index.d.ts +0 -3
  27. package/dist/Treasury/index.js +0 -2
  28. package/dist/Treasury/index.js.map +1 -1
  29. package/package.json +8 -8
  30. package/Card/Operation/Cancel.ts +0 -15
  31. package/Card/Operation/Change.ts +0 -18
  32. package/Card/Operation/Create.ts +0 -15
  33. package/Client/Application.ts +0 -27
  34. package/Client/Me.ts +0 -42
  35. package/Client/Organization.ts +0 -69
  36. package/Client/User.ts +0 -63
  37. package/Treasury/Client/Treasury.ts +0 -20
  38. package/Treasury/Client/index.ts +0 -55
  39. package/dist/Card/Operation/Cancel.d.ts +0 -10
  40. package/dist/Card/Operation/Cancel.js +0 -11
  41. package/dist/Card/Operation/Cancel.js.map +0 -1
  42. package/dist/Card/Operation/Change.d.ts +0 -12
  43. package/dist/Card/Operation/Change.js +0 -13
  44. package/dist/Card/Operation/Change.js.map +0 -1
  45. package/dist/Card/Operation/Create.d.ts +0 -10
  46. package/dist/Card/Operation/Create.js +0 -11
  47. package/dist/Card/Operation/Create.js.map +0 -1
  48. package/dist/Client/Application.d.ts +0 -16
  49. package/dist/Client/Application.js +0 -20
  50. package/dist/Client/Application.js.map +0 -1
  51. package/dist/Client/Me.d.ts +0 -8
  52. package/dist/Client/Me.js +0 -39
  53. package/dist/Client/Me.js.map +0 -1
  54. package/dist/Client/Organization.d.ts +0 -19
  55. package/dist/Client/Organization.js +0 -45
  56. package/dist/Client/Organization.js.map +0 -1
  57. package/dist/Client/User.d.ts +0 -18
  58. package/dist/Client/User.js +0 -36
  59. package/dist/Client/User.js.map +0 -1
  60. package/dist/Treasury/Client/Treasury.d.ts +0 -11
  61. package/dist/Treasury/Client/Treasury.js +0 -14
  62. package/dist/Treasury/Client/Treasury.js.map +0 -1
  63. package/dist/Treasury/Client/index.d.ts +0 -39
  64. package/dist/Treasury/Client/index.js +0 -40
  65. package/dist/Treasury/Client/index.js.map +0 -1
@@ -0,0 +1,19 @@
1
+ import { isoly } from "isoly"
2
+ import { isly } from "isly"
3
+
4
+ export interface Authorization {
5
+ type: "authorization"
6
+ status: "create" | "approve" | "decline"
7
+ reason?: string
8
+ created: isoly.DateTime
9
+ }
10
+
11
+ export namespace Authorization {
12
+ export const type = isly.object<Authorization>({
13
+ type: isly.string("authorization"),
14
+ status: isly.union(isly.string("create"), isly.string("approve"), isly.string("decline")),
15
+ reason: isly.string().optional(),
16
+ created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
17
+ })
18
+ export const is = type.is
19
+ }
@@ -0,0 +1,20 @@
1
+ import { isoly } from "isoly"
2
+ import { isly } from "isly"
3
+ import { Changeable } from "../Changeable"
4
+
5
+ export interface Card {
6
+ type: "card"
7
+ status: "create" | "change" | "cancel"
8
+ from?: Changeable
9
+ created: isoly.DateTime
10
+ }
11
+
12
+ export namespace Card {
13
+ export const type = isly.object<Card>({
14
+ type: isly.string("card"),
15
+ status: isly.union(isly.string("create"), isly.string("change"), isly.string("cancel")),
16
+ from: Changeable.type.optional(),
17
+ created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
18
+ })
19
+ export const is = type.is
20
+ }
@@ -0,0 +1,19 @@
1
+ import { isoly } from "isoly"
2
+ import { isly } from "isly"
3
+
4
+ export interface Settlement {
5
+ type: "settlement"
6
+ status: "capture" | "cancel" | "refund"
7
+ transaction?: string
8
+ created: isoly.DateTime
9
+ }
10
+
11
+ export namespace Settlement {
12
+ export const type = isly.object<Settlement>({
13
+ type: isly.string("settlement"),
14
+ status: isly.union(isly.string("capture"), isly.string("cancel"), isly.string("refund")),
15
+ transaction: isly.string().optional(),
16
+ created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
17
+ })
18
+ export const is = type.is
19
+ }
@@ -1,11 +1,11 @@
1
1
  import { isly } from "isly"
2
- import { Cancel } from "./Cancel"
3
- import { Change } from "./Change"
4
- import { Create } from "./Create"
2
+ import { Authorization } from "./Authorization"
3
+ import { Card } from "./Card"
4
+ import { Settlement } from "./Settlement"
5
5
 
6
- export type Operation = Cancel | Change | Create
6
+ export type Operation = Card | Authorization | Settlement
7
7
 
8
8
  export namespace Operation {
9
- export const type = isly.union(Cancel.type, Change.type, Create.type)
9
+ export const type = isly.union(Card.type, Authorization.type, Settlement.type)
10
10
  export const is = type.is
11
11
  }
package/Card/index.ts CHANGED
@@ -1,7 +1,6 @@
1
1
  import { cryptly } from "cryptly"
2
2
  import { isoly } from "isoly"
3
3
  import { isly } from "isly"
4
- import { Operation as BankingOperation } from "../Operation"
5
4
  import { Realm } from "../Realm"
6
5
  import { Changeable as CardChangeable } from "./Changeable"
7
6
  import { Creatable as CardCreatable } from "./Creatable"
@@ -13,7 +12,6 @@ import { Preset as CardPreset } from "./Preset"
13
12
  export interface Card {
14
13
  id: string
15
14
  number?: string
16
- token: string
17
15
  created: isoly.DateTime
18
16
  organization: string
19
17
  account: string
@@ -25,11 +23,12 @@ export interface Card {
25
23
  last4: string
26
24
  expiry: CardExpiry
27
25
  holder: string
26
+ token: string
28
27
  }
29
28
  limit: [isoly.Currency, number]
30
29
  spent: [isoly.Currency, number]
31
30
  status: "active" | "cancelled"
32
- history: (BankingOperation | CardOperation)[]
31
+ history: CardOperation[]
33
32
  rules: string[]
34
33
  meta?: CardMeta
35
34
  }
@@ -40,17 +39,22 @@ export namespace Card {
40
39
  return {
41
40
  id: cryptly.Identifier.generate(8),
42
41
  number: card.number,
43
- token: token,
44
42
  created: created,
45
43
  organization: organization,
46
44
  account: card.account,
47
45
  realm: card.realm,
48
46
  preset: card.preset,
49
- details: { iin: card.details.iin, last4: last4, expiry: card.details.expiry, holder: card.details.holder },
47
+ details: {
48
+ iin: card.details.iin,
49
+ last4: last4,
50
+ expiry: card.details.expiry,
51
+ holder: card.details.holder,
52
+ token: token,
53
+ },
50
54
  limit: card.limit,
51
55
  spent: [card.limit[0], 0],
52
56
  status: "active",
53
- history: [{ type: "create", created: created }],
57
+ history: [{ type: "card", status: "create", created: created }],
54
58
  rules: card.rules ?? [],
55
59
  meta: card.meta,
56
60
  }
@@ -58,7 +62,6 @@ export namespace Card {
58
62
  export const type = isly.object<Card>({
59
63
  id: isly.string(),
60
64
  number: isly.string().optional(),
61
- token: isly.string(),
62
65
  created: isly.string(),
63
66
  organization: isly.string(),
64
67
  account: isly.string(),
@@ -70,11 +73,12 @@ export namespace Card {
70
73
  last4: isly.string(),
71
74
  expiry: CardExpiry.type,
72
75
  holder: isly.string(),
76
+ token: isly.string(),
73
77
  }),
74
78
  limit: isly.tuple(isly.fromIs("isoly.Currency", isoly.Currency.is), isly.number()),
75
79
  spent: isly.tuple(isly.fromIs("isoly.Currency", isoly.Currency.is), isly.number()),
76
80
  status: isly.union(isly.string("active"), isly.string("cancelled")),
77
- history: isly.union(CardOperation.type, isly.fromIs("Banking.Operation", BankingOperation.is)).array(),
81
+ history: isly.array(CardOperation.type),
78
82
  rules: isly.string().array(),
79
83
  meta: isly.fromIs("Card.Meta", CardMeta.is).optional(),
80
84
  })
package/Client/index.ts CHANGED
@@ -1,23 +1,19 @@
1
1
  import { gracely } from "gracely"
2
2
  import { userwidgets } from "@userwidgets/model"
3
3
  import { http } from "cloudly-http"
4
- import * as rest from "cloudly-rest"
4
+ import { rest } from "cloudly-rest"
5
5
  import { Accounts } from "./Accounts"
6
- import { Application as ClientApplication } from "./Application"
7
6
  import { Cards } from "./Cards"
8
- import { Me as ClientMe } from "./Me"
9
7
  import { Operations } from "./Operations"
10
- import { Organization as ClientOrganization } from "./Organization"
11
8
  import { Organizations } from "./Organizations"
12
9
  import { Transactions } from "./Transactions"
13
10
  import { Treasury } from "./Treasury"
14
- import { User as ClientUser } from "./User"
15
11
  import { Version } from "./Version"
16
12
 
17
13
  export class Client extends rest.Client<gracely.Error> {
18
14
  realm?: string
19
15
  organization?: string
20
- readonly userwidgets = new userwidgets.ClientCollection(this.client, "/widgets")
16
+ readonly userwidgets = new userwidgets.ClientCollection(this.client, { pathPrefix: "/widgets" })
21
17
  readonly accounts = new Accounts(this.client)
22
18
  readonly operations = new Operations(this.client)
23
19
  readonly organizations = new Organizations(this.client)
@@ -39,13 +35,5 @@ export class Client extends rest.Client<gracely.Error> {
39
35
  }
40
36
  }
41
37
  export namespace Client {
42
- export type Application = ClientApplication
43
- export const Application = ClientApplication
44
- export type Organization = ClientOrganization
45
- export const Organization = ClientOrganization
46
- export type Me = ClientMe
47
- export const Me = ClientMe
48
- export type User = ClientUser
49
- export const User = ClientUser
50
38
  export type Unauthorized = (client: rest.Client<never>) => Promise<boolean>
51
39
  }
package/Treasury/index.ts CHANGED
@@ -1,6 +1,5 @@
1
1
  import { Account as TreasuryAccount } from "./Account"
2
2
  import { Balance as TreasuryBalance } from "./Balance"
3
- import { Client as TreasuryClient } from "./Client"
4
3
  import { Fiat as TreasuryFiat } from "./Fiat"
5
4
  export { Treasury } from "./Treasury"
6
5
 
@@ -8,9 +7,7 @@ export namespace Treasury {
8
7
  export type Account = TreasuryAccount
9
8
  export type Balance = TreasuryBalance
10
9
  export type Fiat = TreasuryFiat
11
- export type Client = TreasuryClient
12
10
  export const Balance = TreasuryBalance
13
- export const Client = TreasuryClient
14
11
  export namespace Account {
15
12
  export type Creatable = TreasuryAccount.Creatable
16
13
  export const Creatable = TreasuryAccount.Creatable
@@ -0,0 +1,12 @@
1
+ import { isoly } from "isoly";
2
+ import { isly } from "isly";
3
+ export interface Authorization {
4
+ type: "authorization";
5
+ status: "create" | "approve" | "decline";
6
+ reason?: string;
7
+ created: isoly.DateTime;
8
+ }
9
+ export declare namespace Authorization {
10
+ const type: isly.object.ExtendableType<Authorization>;
11
+ const is: isly.Type.IsFunction<Authorization>;
12
+ }
@@ -0,0 +1,13 @@
1
+ import { isoly } from "isoly";
2
+ import { isly } from "isly";
3
+ export var Authorization;
4
+ (function (Authorization) {
5
+ Authorization.type = isly.object({
6
+ type: isly.string("authorization"),
7
+ status: isly.union(isly.string("create"), isly.string("approve"), isly.string("decline")),
8
+ reason: isly.string().optional(),
9
+ created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
10
+ });
11
+ Authorization.is = Authorization.type.is;
12
+ })(Authorization || (Authorization = {}));
13
+ //# sourceMappingURL=Authorization.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Authorization.js","sourceRoot":"../","sources":["Card/Operation/Authorization.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAS3B,MAAM,KAAW,aAAa,CAQ7B;AARD,WAAiB,aAAa;IAChB,kBAAI,GAAG,IAAI,CAAC,MAAM,CAAgB;QAC9C,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,eAAe,CAAC;QAClC,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;QACzF,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QAChC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;KACzD,CAAC,CAAA;IACW,gBAAE,GAAG,cAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EARgB,aAAa,KAAb,aAAa,QAQ7B"}
@@ -0,0 +1,13 @@
1
+ import { isoly } from "isoly";
2
+ import { isly } from "isly";
3
+ import { Changeable } from "../Changeable";
4
+ export interface Card {
5
+ type: "card";
6
+ status: "create" | "change" | "cancel";
7
+ from?: Changeable;
8
+ created: isoly.DateTime;
9
+ }
10
+ export declare namespace Card {
11
+ const type: isly.object.ExtendableType<Card>;
12
+ const is: isly.Type.IsFunction<Card>;
13
+ }
@@ -0,0 +1,14 @@
1
+ import { isoly } from "isoly";
2
+ import { isly } from "isly";
3
+ import { Changeable } from "../Changeable";
4
+ export var Card;
5
+ (function (Card) {
6
+ Card.type = isly.object({
7
+ type: isly.string("card"),
8
+ status: isly.union(isly.string("create"), isly.string("change"), isly.string("cancel")),
9
+ from: Changeable.type.optional(),
10
+ created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
11
+ });
12
+ Card.is = Card.type.is;
13
+ })(Card || (Card = {}));
14
+ //# sourceMappingURL=Card.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Card.js","sourceRoot":"../","sources":["Card/Operation/Card.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,UAAU,EAAE,MAAM,eAAe,CAAA;AAS1C,MAAM,KAAW,IAAI,CAQpB;AARD,WAAiB,IAAI;IACP,SAAI,GAAG,IAAI,CAAC,MAAM,CAAO;QACrC,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC;QACzB,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACvF,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE;QAChC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;KACzD,CAAC,CAAA;IACW,OAAE,GAAG,KAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EARgB,IAAI,KAAJ,IAAI,QAQpB"}
@@ -0,0 +1,12 @@
1
+ import { isoly } from "isoly";
2
+ import { isly } from "isly";
3
+ export interface Settlement {
4
+ type: "settlement";
5
+ status: "capture" | "cancel" | "refund";
6
+ transaction?: string;
7
+ created: isoly.DateTime;
8
+ }
9
+ export declare namespace Settlement {
10
+ const type: isly.object.ExtendableType<Settlement>;
11
+ const is: isly.Type.IsFunction<Settlement>;
12
+ }
@@ -0,0 +1,13 @@
1
+ import { isoly } from "isoly";
2
+ import { isly } from "isly";
3
+ export var Settlement;
4
+ (function (Settlement) {
5
+ Settlement.type = isly.object({
6
+ type: isly.string("settlement"),
7
+ status: isly.union(isly.string("capture"), isly.string("cancel"), isly.string("refund")),
8
+ transaction: isly.string().optional(),
9
+ created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
10
+ });
11
+ Settlement.is = Settlement.type.is;
12
+ })(Settlement || (Settlement = {}));
13
+ //# sourceMappingURL=Settlement.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Settlement.js","sourceRoot":"../","sources":["Card/Operation/Settlement.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAS3B,MAAM,KAAW,UAAU,CAQ1B;AARD,WAAiB,UAAU;IACb,eAAI,GAAG,IAAI,CAAC,MAAM,CAAa;QAC3C,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC;QAC/B,MAAM,EAAE,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,SAAS,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,EAAE,IAAI,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QACxF,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;QACrC,OAAO,EAAE,IAAI,CAAC,MAAM,CAAC,gBAAgB,EAAE,KAAK,CAAC,QAAQ,CAAC,EAAE,CAAC;KACzD,CAAC,CAAA;IACW,aAAE,GAAG,WAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EARgB,UAAU,KAAV,UAAU,QAQ1B"}
@@ -1,9 +1,9 @@
1
1
  import { isly } from "isly";
2
- import { Cancel } from "./Cancel";
3
- import { Change } from "./Change";
4
- import { Create } from "./Create";
5
- export type Operation = Cancel | Change | Create;
2
+ import { Authorization } from "./Authorization";
3
+ import { Card } from "./Card";
4
+ import { Settlement } from "./Settlement";
5
+ export type Operation = Card | Authorization | Settlement;
6
6
  export declare namespace Operation {
7
- const type: isly.Type<Cancel | Change | Create>;
8
- const is: isly.Type.IsFunction<Cancel | Change | Create>;
7
+ const type: isly.Type<Authorization | Card | Settlement>;
8
+ const is: isly.Type.IsFunction<Authorization | Card | Settlement>;
9
9
  }
@@ -1,10 +1,10 @@
1
1
  import { isly } from "isly";
2
- import { Cancel } from "./Cancel";
3
- import { Change } from "./Change";
4
- import { Create } from "./Create";
2
+ import { Authorization } from "./Authorization";
3
+ import { Card } from "./Card";
4
+ import { Settlement } from "./Settlement";
5
5
  export var Operation;
6
6
  (function (Operation) {
7
- Operation.type = isly.union(Cancel.type, Change.type, Create.type);
7
+ Operation.type = isly.union(Card.type, Authorization.type, Settlement.type);
8
8
  Operation.is = Operation.type.is;
9
9
  })(Operation || (Operation = {}));
10
10
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Card/Operation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AACjC,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAA;AAIjC,MAAM,KAAW,SAAS,CAGzB;AAHD,WAAiB,SAAS;IACZ,cAAI,GAAG,IAAI,CAAC,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,IAAI,CAAC,CAAA;IACxD,YAAE,GAAG,UAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAHgB,SAAS,KAAT,SAAS,QAGzB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../","sources":["Card/Operation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA;AAC7B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AAIzC,MAAM,KAAW,SAAS,CAGzB;AAHD,WAAiB,SAAS;IACZ,cAAI,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,IAAI,EAAE,aAAa,CAAC,IAAI,EAAE,UAAU,CAAC,IAAI,CAAC,CAAA;IACjE,YAAE,GAAG,UAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAHgB,SAAS,KAAT,SAAS,QAGzB"}
@@ -1,6 +1,5 @@
1
1
  import { isoly } from "isoly";
2
2
  import { isly } from "isly";
3
- import { Operation as BankingOperation } from "../Operation";
4
3
  import { Realm } from "../Realm";
5
4
  import { Changeable as CardChangeable } from "./Changeable";
6
5
  import { Creatable as CardCreatable } from "./Creatable";
@@ -11,7 +10,6 @@ import { Preset as CardPreset } from "./Preset";
11
10
  export interface Card {
12
11
  id: string;
13
12
  number?: string;
14
- token: string;
15
13
  created: isoly.DateTime;
16
14
  organization: string;
17
15
  account: string;
@@ -23,11 +21,12 @@ export interface Card {
23
21
  last4: string;
24
22
  expiry: CardExpiry;
25
23
  holder: string;
24
+ token: string;
26
25
  };
27
26
  limit: [isoly.Currency, number];
28
27
  spent: [isoly.Currency, number];
29
28
  status: "active" | "cancelled";
30
- history: (BankingOperation | CardOperation)[];
29
+ history: CardOperation[];
31
30
  rules: string[];
32
31
  meta?: CardMeta;
33
32
  }
@@ -1,7 +1,6 @@
1
1
  import { cryptly } from "cryptly";
2
2
  import { isoly } from "isoly";
3
3
  import { isly } from "isly";
4
- import { Operation as BankingOperation } from "../Operation";
5
4
  import { Realm } from "../Realm";
6
5
  import { Changeable as CardChangeable } from "./Changeable";
7
6
  import { Creatable as CardCreatable } from "./Creatable";
@@ -16,17 +15,22 @@ export var Card;
16
15
  return {
17
16
  id: cryptly.Identifier.generate(8),
18
17
  number: card.number,
19
- token: token,
20
18
  created: created,
21
19
  organization: organization,
22
20
  account: card.account,
23
21
  realm: card.realm,
24
22
  preset: card.preset,
25
- details: { iin: card.details.iin, last4: last4, expiry: card.details.expiry, holder: card.details.holder },
23
+ details: {
24
+ iin: card.details.iin,
25
+ last4: last4,
26
+ expiry: card.details.expiry,
27
+ holder: card.details.holder,
28
+ token: token,
29
+ },
26
30
  limit: card.limit,
27
31
  spent: [card.limit[0], 0],
28
32
  status: "active",
29
- history: [{ type: "create", created: created }],
33
+ history: [{ type: "card", status: "create", created: created }],
30
34
  rules: card.rules ?? [],
31
35
  meta: card.meta,
32
36
  };
@@ -35,7 +39,6 @@ export var Card;
35
39
  Card.type = isly.object({
36
40
  id: isly.string(),
37
41
  number: isly.string().optional(),
38
- token: isly.string(),
39
42
  created: isly.string(),
40
43
  organization: isly.string(),
41
44
  account: isly.string(),
@@ -47,11 +50,12 @@ export var Card;
47
50
  last4: isly.string(),
48
51
  expiry: CardExpiry.type,
49
52
  holder: isly.string(),
53
+ token: isly.string(),
50
54
  }),
51
55
  limit: isly.tuple(isly.fromIs("isoly.Currency", isoly.Currency.is), isly.number()),
52
56
  spent: isly.tuple(isly.fromIs("isoly.Currency", isoly.Currency.is), isly.number()),
53
57
  status: isly.union(isly.string("active"), isly.string("cancelled")),
54
- history: isly.union(CardOperation.type, isly.fromIs("Banking.Operation", BankingOperation.is)).array(),
58
+ history: isly.array(CardOperation.type),
55
59
  rules: isly.string().array(),
56
60
  meta: isly.fromIs("Card.Meta", CardMeta.is).optional(),
57
61
  });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Card/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AACjC,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,SAAS,IAAI,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC5D,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAChC,OAAO,EAAE,UAAU,IAAI,cAAc,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,SAAS,IAAI,aAAa,EAAE,MAAM,aAAa,CAAA;AACxD,OAAO,EAAE,MAAM,IAAI,UAAU,EAAE,MAAM,UAAU,CAAA;AAC/C,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAA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IAEf,WAAM,GAAG,UAAU,CAAA;IAEnB,eAAU,GAAG,cAAc,CAAA;IAE3B,cAAS,GAAG,aAAa,CAAA;AACvC,CAAC,EA9DgB,IAAI,KAAJ,IAAI,QA8DpB"}
@@ -1,17 +1,13 @@
1
1
  import { gracely } from "gracely";
2
2
  import { userwidgets } from "@userwidgets/model";
3
3
  import { http } from "cloudly-http";
4
- import * as rest from "cloudly-rest";
4
+ import { rest } from "cloudly-rest";
5
5
  import { Accounts } from "./Accounts";
6
- import { Application as ClientApplication } from "./Application";
7
6
  import { Cards } from "./Cards";
8
- import { Me as ClientMe } from "./Me";
9
7
  import { Operations } from "./Operations";
10
- import { Organization as ClientOrganization } from "./Organization";
11
8
  import { Organizations } from "./Organizations";
12
9
  import { Transactions } from "./Transactions";
13
10
  import { Treasury } from "./Treasury";
14
- import { User as ClientUser } from "./User";
15
11
  import { Version } from "./Version";
16
12
  export declare class Client extends rest.Client<gracely.Error> {
17
13
  realm?: string;
@@ -27,13 +23,5 @@ export declare class Client extends rest.Client<gracely.Error> {
27
23
  static create<T = Record<string, any>>(server: string, key: string, load?: (client: http.Client) => T): Client & T;
28
24
  }
29
25
  export declare namespace Client {
30
- type Application = ClientApplication;
31
- const Application: typeof ClientApplication;
32
- type Organization = ClientOrganization;
33
- const Organization: typeof ClientOrganization;
34
- type Me = ClientMe;
35
- const Me: typeof ClientMe;
36
- type User = ClientUser;
37
- const User: typeof ClientUser;
38
26
  type Unauthorized = (client: rest.Client<never>) => Promise<boolean>;
39
27
  }
@@ -1,21 +1,17 @@
1
1
  import { userwidgets } from "@userwidgets/model";
2
2
  import { http } from "cloudly-http";
3
- import * as rest from "cloudly-rest";
3
+ import { rest } from "cloudly-rest";
4
4
  import { Accounts } from "./Accounts";
5
- import { Application as ClientApplication } from "./Application";
6
5
  import { Cards } from "./Cards";
7
- import { Me as ClientMe } from "./Me";
8
6
  import { Operations } from "./Operations";
9
- import { Organization as ClientOrganization } from "./Organization";
10
7
  import { Organizations } from "./Organizations";
11
8
  import { Transactions } from "./Transactions";
12
9
  import { Treasury } from "./Treasury";
13
- import { User as ClientUser } from "./User";
14
10
  import { Version } from "./Version";
15
11
  export class Client extends rest.Client {
16
12
  constructor() {
17
13
  super(...arguments);
18
- this.userwidgets = new userwidgets.ClientCollection(this.client, "/widgets");
14
+ this.userwidgets = new userwidgets.ClientCollection(this.client, { pathPrefix: "/widgets" });
19
15
  this.accounts = new Accounts(this.client);
20
16
  this.operations = new Operations(this.client);
21
17
  this.organizations = new Organizations(this.client);
@@ -34,10 +30,4 @@ export class Client extends rest.Client {
34
30
  return result;
35
31
  }
36
32
  }
37
- (function (Client) {
38
- Client.Application = ClientApplication;
39
- Client.Organization = ClientOrganization;
40
- Client.Me = ClientMe;
41
- Client.User = ClientUser;
42
- })(Client || (Client = {}));
43
33
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,WAAW,EAAE,MAAM,oBAAoB,CAAA;AAChD,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AACpC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,WAAW,IAAI,iBAAiB,EAAE,MAAM,eAAe,CAAA;AAChE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,EAAE,IAAI,QAAQ,EAAE,MAAM,MAAM,CAAA;AACrC,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,YAAY,IAAI,kBAAkB,EAAE,MAAM,gBAAgB,CAAA;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAA;AAC/C,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAA;AAC7C,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA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AC,MAAM,CAAC,CAAA;QAC5C,aAAQ,GAAG,IAAI,QAAQ,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACpC,YAAO,GAAG,IAAI,OAAO,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QAClC,UAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAaxC,CAAC;IAXA,MAAM,CAAC,MAAM,CAA0B,MAAc,EAAE,GAAW,EAAE,IAAiC;QACpG,IAAI,UAAsC,CAAA;QAC1C,MAAM,MAAM,GAAW,IAAI,MAAM,CAChC,CAAC,UAAU,GAAG,IAAI,IAAI,CAAC,MAAM,CAAgB,MAAM,EAAE,GAAG,EAAE;YACzD,YAAY,EAAE,OAAO,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,OAAO,CAAC,MAAM,EAAE,KAAK,EAAE,MAAM,CAAC,KAAK,EAAE,YAAY,EAAE,MAAM,CAAC,YAAY,EAAE,CAAC;SACxG,CAAC,CAAC,CACH,CAAA;QACD,IAAI,IAAI;YACP,MAAM,CAAC,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,UAAU,CAAC,CAAC,CAAA;QACxC,OAAO,MAAoB,CAAA;IAC5B,CAAC;CACD"}
@@ -1,15 +1,12 @@
1
1
  import { Account as TreasuryAccount } from "./Account";
2
2
  import { Balance as TreasuryBalance } from "./Balance";
3
- import { Client as TreasuryClient } from "./Client";
4
3
  import { Fiat as TreasuryFiat } from "./Fiat";
5
4
  export { Treasury } from "./Treasury";
6
5
  export declare namespace Treasury {
7
6
  type Account = TreasuryAccount;
8
7
  type Balance = TreasuryBalance;
9
8
  type Fiat = TreasuryFiat;
10
- type Client = TreasuryClient;
11
9
  const Balance: typeof TreasuryBalance;
12
- const Client: typeof TreasuryClient;
13
10
  namespace Account {
14
11
  type Creatable = TreasuryAccount.Creatable;
15
12
  const Creatable: typeof import("./Account/Creatable").Creatable;
@@ -1,10 +1,8 @@
1
1
  import { Account as TreasuryAccount } from "./Account";
2
2
  import { Balance as TreasuryBalance } from "./Balance";
3
- import { Client as TreasuryClient } from "./Client";
4
3
  export var Treasury;
5
4
  (function (Treasury) {
6
5
  Treasury.Balance = TreasuryBalance;
7
- Treasury.Client = TreasuryClient;
8
6
  let Account;
9
7
  (function (Account) {
10
8
  Account.Creatable = TreasuryAccount.Creatable;
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,MAAM,IAAI,cAAc,EAAE,MAAM,UAAU,CAAA;AAInD,MAAM,KAAW,QAAQ,CAgBxB;AAhBD,WAAiB,QAAQ;IAKX,gBAAO,GAAG,eAAe,CAAA;IACzB,eAAM,GAAG,cAAc,CAAA;IACpC,IAAiB,OAAO,CAQvB;IARD,WAAiB,OAAO;QAEV,iBAAS,GAAG,eAAe,CAAC,SAAS,CAAA;QAErC,gBAAQ,GAAG,eAAe,CAAC,QAAQ,CAAA;QAEnC,iBAAS,GAAG,eAAe,CAAC,SAAS,CAAA;QACrC,UAAE,GAAG,eAAe,CAAC,EAAE,CAAA;IACrC,CAAC,EARgB,OAAO,GAAP,gBAAO,KAAP,gBAAO,QAQvB;AACF,CAAC,EAhBgB,QAAQ,KAAR,QAAQ,QAgBxB"}
1
+ {"version":3,"file":"index.js","sourceRoot":"../","sources":["Treasury/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AACtD,OAAO,EAAE,OAAO,IAAI,eAAe,EAAE,MAAM,WAAW,CAAA;AAItD,MAAM,KAAW,QAAQ,CAcxB;AAdD,WAAiB,QAAQ;IAIX,gBAAO,GAAG,eAAe,CAAA;IACtC,IAAiB,OAAO,CAQvB;IARD,WAAiB,OAAO;QAEV,iBAAS,GAAG,eAAe,CAAC,SAAS,CAAA;QAErC,gBAAQ,GAAG,eAAe,CAAC,QAAQ,CAAA;QAEnC,iBAAS,GAAG,eAAe,CAAC,SAAS,CAAA;QACrC,UAAE,GAAG,eAAe,CAAC,EAAE,CAAA;IACrC,CAAC,EARgB,OAAO,GAAP,gBAAO,KAAP,gBAAO,QAQvB;AACF,CAAC,EAdgB,QAAQ,KAAR,QAAQ,QAcxB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/model-banking",
3
- "version": "0.1.48",
3
+ "version": "0.1.50",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",
@@ -54,22 +54,22 @@
54
54
  "clean": "rimraf dist node_modules coverage"
55
55
  },
56
56
  "devDependencies": {
57
- "@types/jest": "^29.5.1",
58
- "@typescript-eslint/eslint-plugin": "5.59.7",
59
- "@typescript-eslint/parser": "5.59.7",
60
- "eslint": "^8.41.0",
57
+ "@types/jest": "^29.5.2",
58
+ "@typescript-eslint/eslint-plugin": "5.59.11",
59
+ "@typescript-eslint/parser": "5.59.11",
60
+ "eslint": "^8.42.0",
61
61
  "eslint-plugin-prettierx": "github:utily/eslint-plugin-prettierx#utily-20221229",
62
62
  "eslint-plugin-simple-import-sort": "^10.0.0",
63
63
  "jest": "^29.5.0",
64
64
  "prettierx": "github:utily/prettierx#utily-20221229",
65
65
  "rimraf": "^5.0.1",
66
66
  "ts-jest": "^29.1.0",
67
- "typescript": "^5.0.4"
67
+ "typescript": "^5.1.3"
68
68
  },
69
69
  "dependencies": {
70
- "@userwidgets/model": "^0.2.4",
70
+ "@userwidgets/model": "^0.4.3",
71
71
  "cloudly-http": "^0.1.6",
72
- "cloudly-rest": "^0.1.2",
72
+ "cloudly-rest": "^0.1.3",
73
73
  "cryptly": "^3.0.4",
74
74
  "gracely": "^2.0.4",
75
75
  "isoly": "^2.0.20",
@@ -1,15 +0,0 @@
1
- import { 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
- }
@@ -1,18 +0,0 @@
1
- import { isoly } from "isoly"
2
- import { isly } from "isly"
3
- import { Changeable } from "../Changeable"
4
-
5
- export interface Change {
6
- type: "change"
7
- from: Changeable
8
- created: isoly.DateTime
9
- }
10
-
11
- export namespace Change {
12
- export const type = isly.object<Change>({
13
- type: isly.string("change"),
14
- from: Changeable.type,
15
- created: isly.fromIs("isoly.DateTime", isoly.DateTime.is),
16
- })
17
- export const is = type.is
18
- }