@pax2pay/model-banking 0.1.565 → 0.1.567

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 (43) hide show
  1. package/Client/Organizations/Fx.ts +10 -0
  2. package/Client/Organizations/index.ts +3 -0
  3. package/Organization/Creatable.ts +3 -0
  4. package/Organization/Fx.ts +8 -0
  5. package/Organization/index.ts +4 -0
  6. package/dist/cjs/Client/Organizations/Fx.d.ts +8 -0
  7. package/dist/cjs/Client/Organizations/Fx.js +14 -0
  8. package/dist/cjs/Client/Organizations/Fx.js.map +1 -0
  9. package/dist/cjs/Client/Organizations/index.d.ts +2 -0
  10. package/dist/cjs/Client/Organizations/index.js +3 -0
  11. package/dist/cjs/Client/Organizations/index.js.map +1 -1
  12. package/dist/cjs/Organization/Creatable.d.ts +2 -0
  13. package/dist/cjs/Organization/Creatable.js +2 -0
  14. package/dist/cjs/Organization/Creatable.js.map +1 -1
  15. package/dist/cjs/Organization/Fx.d.ts +6 -0
  16. package/dist/cjs/Organization/Fx.js +9 -0
  17. package/dist/cjs/Organization/Fx.js.map +1 -0
  18. package/dist/cjs/Organization/index.d.ts +3 -0
  19. package/dist/cjs/Organization/index.js +3 -0
  20. package/dist/cjs/Organization/index.js.map +1 -1
  21. package/dist/cjs/fx.d.ts +35 -6
  22. package/dist/cjs/fx.js +33 -6
  23. package/dist/cjs/fx.js.map +1 -1
  24. package/dist/mjs/Client/Organizations/Fx.d.ts +8 -0
  25. package/dist/mjs/Client/Organizations/Fx.js +10 -0
  26. package/dist/mjs/Client/Organizations/Fx.js.map +1 -0
  27. package/dist/mjs/Client/Organizations/index.d.ts +2 -0
  28. package/dist/mjs/Client/Organizations/index.js +3 -0
  29. package/dist/mjs/Client/Organizations/index.js.map +1 -1
  30. package/dist/mjs/Organization/Creatable.d.ts +2 -0
  31. package/dist/mjs/Organization/Creatable.js +2 -0
  32. package/dist/mjs/Organization/Creatable.js.map +1 -1
  33. package/dist/mjs/Organization/Fx.d.ts +6 -0
  34. package/dist/mjs/Organization/Fx.js +6 -0
  35. package/dist/mjs/Organization/Fx.js.map +1 -0
  36. package/dist/mjs/Organization/index.d.ts +3 -0
  37. package/dist/mjs/Organization/index.js +3 -0
  38. package/dist/mjs/Organization/index.js.map +1 -1
  39. package/dist/mjs/fx.d.ts +35 -6
  40. package/dist/mjs/fx.js +33 -6
  41. package/dist/mjs/fx.js.map +1 -1
  42. package/fx.ts +42 -16
  43. package/package.json +1 -1
@@ -0,0 +1,10 @@
1
+ import { gracely } from "gracely"
2
+ import { http } from "cloudly-http"
3
+ import { Organization } from "../../Organization"
4
+
5
+ export class Fx {
6
+ constructor(private readonly client: http.Client) {}
7
+ async markup(organization: string, markup: number): Promise<Organization | gracely.Error> {
8
+ return this.client.put<Organization>(`/organization/markup`, { markup }, { organization })
9
+ }
10
+ }
@@ -1,15 +1,18 @@
1
1
  import { gracely } from "gracely"
2
2
  import { http } from "cloudly-http"
3
3
  import { Organization } from "../../Organization"
4
+ import { Fx } from "./Fx"
4
5
  import { Groups } from "./Groups"
5
6
  import { Rules } from "./Rules"
6
7
 
7
8
  export class Organizations {
8
9
  readonly Rules: Rules
9
10
  readonly groups: Groups
11
+ readonly fx: Fx
10
12
  constructor(private readonly client: http.Client) {
11
13
  this.Rules = new Rules(this.client)
12
14
  this.groups = new Groups(this.client)
15
+ this.fx = new Fx(this.client)
13
16
  }
14
17
 
15
18
  async list(options?: {
@@ -2,6 +2,7 @@ import { isly } from "isly"
2
2
  import { Rule } from "../Rule"
3
3
  import { type as ruleType } from "../Rule/type"
4
4
  import { Contact } from "./Contact"
5
+ import { Fx } from "./Fx"
5
6
 
6
7
  export interface Creatable {
7
8
  name: string
@@ -9,6 +10,7 @@ export interface Creatable {
9
10
  rules?: Rule[]
10
11
  contact?: Contact.Creatable
11
12
  groups?: string[]
13
+ fx?: Fx
12
14
  }
13
15
  export namespace Creatable {
14
16
  export const type = isly.object<Creatable>({
@@ -17,5 +19,6 @@ export namespace Creatable {
17
19
  rules: ruleType.array().optional(),
18
20
  contact: Contact.Creatable.type.optional(),
19
21
  groups: isly.string().array().optional(),
22
+ fx: Fx.type.optional(),
20
23
  })
21
24
  }
@@ -0,0 +1,8 @@
1
+ import { isly } from "isly"
2
+
3
+ export interface Fx {
4
+ markup: number
5
+ }
6
+ export namespace Fx {
7
+ export const type = isly.object<Fx>({ markup: isly.number(value => value >= 0) })
8
+ }
@@ -5,6 +5,7 @@ import { type as ruleType } from "../Rule/type"
5
5
  import { Changeable as OrganizationChangeable } from "./Changeable"
6
6
  import { Contact as OrganizationContact } from "./Contact"
7
7
  import { Creatable as OrganizationCreatable } from "./Creatable"
8
+ import { Fx as OrganizationFx } from "./Fx"
8
9
 
9
10
  export interface Organization {
10
11
  name: string
@@ -14,11 +15,13 @@ export interface Organization {
14
15
  status: "active" | "inactive"
15
16
  contact?: Organization.Contact
16
17
  groups?: string[]
18
+ fx?: OrganizationFx
17
19
  }
18
20
  export namespace Organization {
19
21
  export import Creatable = OrganizationCreatable
20
22
  export import Changeable = OrganizationChangeable
21
23
  export import Contact = OrganizationContact
24
+ export import Fx = OrganizationFx
22
25
  export const type = isly.object<Organization>({
23
26
  name: isly.string(),
24
27
  code: isly.string(new RegExp(/^[A-Za-z0-9\-_]+$/)),
@@ -27,5 +30,6 @@ export namespace Organization {
27
30
  status: isly.string(["active", "inactive"]),
28
31
  contact: Contact.type.optional(),
29
32
  groups: isly.string().array().optional(),
33
+ fx: OrganizationFx.type.optional(),
30
34
  })
31
35
  }
@@ -0,0 +1,8 @@
1
+ import { gracely } from "gracely";
2
+ import { http } from "cloudly-http";
3
+ import { Organization } from "../../Organization";
4
+ export declare class Fx {
5
+ private readonly client;
6
+ constructor(client: http.Client);
7
+ markup(organization: string, markup: number): Promise<Organization | gracely.Error>;
8
+ }
@@ -0,0 +1,14 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Fx = void 0;
4
+ class Fx {
5
+ client;
6
+ constructor(client) {
7
+ this.client = client;
8
+ }
9
+ async markup(organization, markup) {
10
+ return this.client.put(`/organization/markup`, { markup }, { organization });
11
+ }
12
+ }
13
+ exports.Fx = Fx;
14
+ //# sourceMappingURL=Fx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fx.js","sourceRoot":"","sources":["../../../../Client/Organizations/Fx.ts"],"names":[],"mappings":";;;AAIA,MAAa,EAAE;IACe;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,YAAoB,EAAE,MAAc;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAe,sBAAsB,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAA;IAC3F,CAAC;CACD;AALD,gBAKC"}
@@ -1,12 +1,14 @@
1
1
  import { gracely } from "gracely";
2
2
  import { http } from "cloudly-http";
3
3
  import { Organization } from "../../Organization";
4
+ import { Fx } from "./Fx";
4
5
  import { Groups } from "./Groups";
5
6
  import { Rules } from "./Rules";
6
7
  export declare class Organizations {
7
8
  private readonly client;
8
9
  readonly Rules: Rules;
9
10
  readonly groups: Groups;
11
+ readonly fx: Fx;
10
12
  constructor(client: http.Client);
11
13
  list(options?: {
12
14
  limit?: string;
@@ -1,16 +1,19 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.Organizations = void 0;
4
+ const Fx_1 = require("./Fx");
4
5
  const Groups_1 = require("./Groups");
5
6
  const Rules_1 = require("./Rules");
6
7
  class Organizations {
7
8
  client;
8
9
  Rules;
9
10
  groups;
11
+ fx;
10
12
  constructor(client) {
11
13
  this.client = client;
12
14
  this.Rules = new Rules_1.Rules(this.client);
13
15
  this.groups = new Groups_1.Groups(this.client);
16
+ this.fx = new Fx_1.Fx(this.client);
14
17
  }
15
18
  async list(options) {
16
19
  return this.client.get(`/organization`, options);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Organizations/index.ts"],"names":[],"mappings":";;;AAGA,qCAAiC;AACjC,mCAA+B;AAE/B,MAAa,aAAa;IAGI;IAFpB,KAAK,CAAO;IACZ,MAAM,CAAQ;IACvB,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IACtC,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAGV;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmD,eAAe,EAAE,OAAO,CAAC,CAAA;IACnG,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,YAAoC;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAe,eAAe,EAAE,YAAY,CAAC,CAAA;IACrE,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,UAAmC;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAe,iBAAiB,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;IAC1E,CAAC;IACD,KAAK,CAAC,UAAU,CAAC,YAAoB;QACpC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAe,iBAAiB,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAA;IAC3F,CAAC;CACD;AAvBD,sCAuBC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Organizations/index.ts"],"names":[],"mappings":";;;AAGA,6BAAyB;AACzB,qCAAiC;AACjC,mCAA+B;AAE/B,MAAa,aAAa;IAII;IAHpB,KAAK,CAAO;IACZ,MAAM,CAAQ;IACd,EAAE,CAAI;IACf,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,aAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,eAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACrC,IAAI,CAAC,EAAE,GAAG,IAAI,OAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC9B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAGV;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmD,eAAe,EAAE,OAAO,CAAC,CAAA;IACnG,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,YAAoC;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAe,eAAe,EAAE,YAAY,CAAC,CAAA;IACrE,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,UAAmC;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAe,iBAAiB,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;IAC1E,CAAC;IACD,KAAK,CAAC,UAAU,CAAC,YAAoB;QACpC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAe,iBAAiB,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAA;IAC3F,CAAC;CACD;AAzBD,sCAyBC"}
@@ -1,11 +1,13 @@
1
1
  import { Rule } from "../Rule";
2
2
  import { Contact } from "./Contact";
3
+ import { Fx } from "./Fx";
3
4
  export interface Creatable {
4
5
  name: string;
5
6
  code: string;
6
7
  rules?: Rule[];
7
8
  contact?: Contact.Creatable;
8
9
  groups?: string[];
10
+ fx?: Fx;
9
11
  }
10
12
  export declare namespace Creatable {
11
13
  const type: import("isly/dist/cjs/object").IslyObject<Rule.State.Organization.Creatable, object>;
@@ -4,6 +4,7 @@ exports.Creatable = void 0;
4
4
  const isly_1 = require("isly");
5
5
  const type_1 = require("../Rule/type");
6
6
  const Contact_1 = require("./Contact");
7
+ const Fx_1 = require("./Fx");
7
8
  var Creatable;
8
9
  (function (Creatable) {
9
10
  Creatable.type = isly_1.isly.object({
@@ -12,6 +13,7 @@ var Creatable;
12
13
  rules: type_1.type.array().optional(),
13
14
  contact: Contact_1.Contact.Creatable.type.optional(),
14
15
  groups: isly_1.isly.string().array().optional(),
16
+ fx: Fx_1.Fx.type.optional(),
15
17
  });
16
18
  })(Creatable || (exports.Creatable = Creatable = {}));
17
19
  //# sourceMappingURL=Creatable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../Organization/Creatable.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAE3B,uCAA+C;AAC/C,uCAAmC;AASnC,IAAiB,SAAS,CAQzB;AARD,WAAiB,SAAS;IACZ,cAAI,GAAG,WAAI,CAAC,MAAM,CAAY;QAC1C,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAClD,KAAK,EAAE,WAAQ,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAClC,OAAO,EAAE,iBAAO,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE;QAC1C,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KACxC,CAAC,CAAA;AACH,CAAC,EARgB,SAAS,yBAAT,SAAS,QAQzB"}
1
+ {"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../Organization/Creatable.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAE3B,uCAA+C;AAC/C,uCAAmC;AACnC,6BAAyB;AAUzB,IAAiB,SAAS,CASzB;AATD,WAAiB,SAAS;IACZ,cAAI,GAAG,WAAI,CAAC,MAAM,CAAY;QAC1C,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAClD,KAAK,EAAE,WAAQ,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAClC,OAAO,EAAE,iBAAO,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE;QAC1C,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QACxC,EAAE,EAAE,OAAE,CAAC,IAAI,CAAC,QAAQ,EAAE;KACtB,CAAC,CAAA;AACH,CAAC,EATgB,SAAS,yBAAT,SAAS,QASzB"}
@@ -0,0 +1,6 @@
1
+ export interface Fx {
2
+ markup: number;
3
+ }
4
+ export declare namespace Fx {
5
+ const type: import("isly/dist/cjs/object").IslyObject<Fx, object>;
6
+ }
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.Fx = void 0;
4
+ const isly_1 = require("isly");
5
+ var Fx;
6
+ (function (Fx) {
7
+ Fx.type = isly_1.isly.object({ markup: isly_1.isly.number(value => value >= 0) });
8
+ })(Fx || (exports.Fx = Fx = {}));
9
+ //# sourceMappingURL=Fx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fx.js","sourceRoot":"","sources":["../../../Organization/Fx.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAK3B,IAAiB,EAAE,CAElB;AAFD,WAAiB,EAAE;IACL,OAAI,GAAG,WAAI,CAAC,MAAM,CAAK,EAAE,MAAM,EAAE,WAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,CAAC,CAAA;AAClF,CAAC,EAFgB,EAAE,kBAAF,EAAE,QAElB"}
@@ -3,6 +3,7 @@ import { Rule } from "../Rule";
3
3
  import { Changeable as OrganizationChangeable } from "./Changeable";
4
4
  import { Contact as OrganizationContact } from "./Contact";
5
5
  import { Creatable as OrganizationCreatable } from "./Creatable";
6
+ import { Fx as OrganizationFx } from "./Fx";
6
7
  export interface Organization {
7
8
  name: string;
8
9
  code: string;
@@ -11,10 +12,12 @@ export interface Organization {
11
12
  status: "active" | "inactive";
12
13
  contact?: Organization.Contact;
13
14
  groups?: string[];
15
+ fx?: OrganizationFx;
14
16
  }
15
17
  export declare namespace Organization {
16
18
  export import Creatable = OrganizationCreatable;
17
19
  export import Changeable = OrganizationChangeable;
18
20
  export import Contact = OrganizationContact;
21
+ export import Fx = OrganizationFx;
19
22
  const type: import("isly/dist/cjs/object").IslyObject<Rule.State.Organization, object>;
20
23
  }
@@ -7,11 +7,13 @@ const type_1 = require("../Rule/type");
7
7
  const Changeable_1 = require("./Changeable");
8
8
  const Contact_1 = require("./Contact");
9
9
  const Creatable_1 = require("./Creatable");
10
+ const Fx_1 = require("./Fx");
10
11
  var Organization;
11
12
  (function (Organization) {
12
13
  Organization.Creatable = Creatable_1.Creatable;
13
14
  Organization.Changeable = Changeable_1.Changeable;
14
15
  Organization.Contact = Contact_1.Contact;
16
+ Organization.Fx = Fx_1.Fx;
15
17
  Organization.type = isly_1.isly.object({
16
18
  name: isly_1.isly.string(),
17
19
  code: isly_1.isly.string(new RegExp(/^[A-Za-z0-9\-_]+$/)),
@@ -20,6 +22,7 @@ var Organization;
20
22
  status: isly_1.isly.string(["active", "inactive"]),
21
23
  contact: Organization.Contact.type.optional(),
22
24
  groups: isly_1.isly.string().array().optional(),
25
+ fx: Fx_1.Fx.type.optional(),
23
26
  });
24
27
  })(Organization || (exports.Organization = Organization = {}));
25
28
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Organization/index.ts"],"names":[],"mappings":";;;AAAA,+BAA2B;AAC3B,oCAAgC;AAEhC,uCAA+C;AAC/C,6CAAmE;AACnE,uCAA0D;AAC1D,2CAAgE;AAWhE,IAAiB,YAAY,CAa5B;AAbD,WAAiB,YAAY;IACd,sBAAS,GAAG,qBAAqB,CAAA;IACjC,uBAAU,GAAG,uBAA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,EAAE,UAAU,CAAC,CAAC;QAC3C,OAAO,EAAE,aAAA,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;QAChC,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QACxC,EAAE,EAAE,OAAc,CAAC,IAAI,CAAC,QAAQ,EAAE;KAClC,CAAC,CAAA;AACH,CAAC,EAfgB,YAAY,4BAAZ,YAAY,QAe5B"}
package/dist/cjs/fx.d.ts CHANGED
@@ -1,9 +1,17 @@
1
1
  import { isoly } from "isoly";
2
+ import { isly } from "isly";
2
3
  export declare namespace fx {
3
4
  interface Quote {
4
5
  id: string;
5
6
  created: isoly.DateTime;
6
7
  expires: isoly.DateTime;
8
+ account: {
9
+ id: string;
10
+ fx: {
11
+ markup: number;
12
+ };
13
+ };
14
+ fixed: Quote.Fixed;
7
15
  from: {
8
16
  amount: number;
9
17
  currency: isoly.Currency;
@@ -19,14 +27,35 @@ export declare namespace fx {
19
27
  };
20
28
  }
21
29
  namespace Quote {
22
- interface Creatable {
23
- type: "sell" | "buy";
24
- from: isoly.Currency;
25
- to: isoly.Currency;
26
- amount: number;
30
+ type Fixed = typeof Fixed.values[number];
31
+ namespace Fixed {
32
+ const values: readonly ["from", "to"];
33
+ const type: isly.Type<"from" | "to">;
27
34
  }
35
+ type Creatable = Creatable.From | Creatable.To;
28
36
  namespace Creatable {
29
- const type: import("isly/dist/cjs/object").IslyObject<Creatable, object>;
37
+ interface From {
38
+ from: {
39
+ amount: number;
40
+ currency: isoly.Currency;
41
+ };
42
+ to: isoly.Currency;
43
+ }
44
+ namespace From {
45
+ const type: import("isly/dist/cjs/object").IslyObject<From, object>;
46
+ }
47
+ interface To {
48
+ from: isoly.Currency;
49
+ to: {
50
+ amount: number;
51
+ currency: isoly.Currency;
52
+ };
53
+ }
54
+ namespace To {
55
+ const type: import("isly/dist/cjs/object").IslyObject<To, object>;
56
+ }
57
+ const type: isly.Type<Creatable>;
30
58
  }
31
59
  }
60
+ const type: import("isly/dist/cjs/object").IslyObject<Quote, object>;
32
61
  }
package/dist/cjs/fx.js CHANGED
@@ -7,15 +7,42 @@ var fx;
7
7
  (function (fx) {
8
8
  let Quote;
9
9
  (function (Quote) {
10
+ let Fixed;
11
+ (function (Fixed) {
12
+ Fixed.values = ["from", "to"];
13
+ Fixed.type = isly_1.isly.string(Fixed.values);
14
+ })(Fixed = Quote.Fixed || (Quote.Fixed = {}));
10
15
  let Creatable;
11
16
  (function (Creatable) {
12
- Creatable.type = isly_1.isly.object({
13
- type: isly_1.isly.string(["sell", "buy"]),
14
- from: isly_1.isly.string(isoly_1.isoly.Currency.values),
15
- to: isly_1.isly.string(isoly_1.isoly.Currency.values),
16
- amount: isly_1.isly.number(),
17
- });
17
+ let From;
18
+ (function (From) {
19
+ From.type = isly_1.isly.object({
20
+ from: isly_1.isly.object({ currency: isly_1.isly.string(isoly_1.isoly.Currency.values), amount: isly_1.isly.number() }),
21
+ to: isly_1.isly.string(isoly_1.isoly.Currency.values),
22
+ });
23
+ })(From = Creatable.From || (Creatable.From = {}));
24
+ let To;
25
+ (function (To) {
26
+ To.type = isly_1.isly.object({
27
+ from: isly_1.isly.string(isoly_1.isoly.Currency.values),
28
+ to: isly_1.isly.object({ currency: isly_1.isly.string(isoly_1.isoly.Currency.values), amount: isly_1.isly.number() }),
29
+ });
30
+ })(To = Creatable.To || (Creatable.To = {}));
31
+ Creatable.type = isly_1.isly.union(From.type, To.type);
18
32
  })(Creatable = Quote.Creatable || (Quote.Creatable = {}));
19
33
  })(Quote = fx.Quote || (fx.Quote = {}));
34
+ fx.type = isly_1.isly.object({
35
+ id: isly_1.isly.string(),
36
+ created: isly_1.isly.string(),
37
+ expires: isly_1.isly.string(),
38
+ account: isly_1.isly.object({
39
+ id: isly_1.isly.string(),
40
+ fx: isly_1.isly.object({ markup: isly_1.isly.number() }),
41
+ }),
42
+ fixed: Quote.Fixed.type,
43
+ from: isly_1.isly.object({ amount: isly_1.isly.number(), currency: isly_1.isly.string(isoly_1.isoly.Currency.values) }),
44
+ to: isly_1.isly.object({ amount: isly_1.isly.number(), currency: isly_1.isly.string(isoly_1.isoly.Currency.values) }),
45
+ rate: isly_1.isly.object({ base: isly_1.isly.number(), markup: isly_1.isly.number(), effective: isly_1.isly.number() }),
46
+ });
20
47
  })(fx || (exports.fx = fx = {}));
21
48
  //# sourceMappingURL=fx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fx.js","sourceRoot":"","sources":["../../fx.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAE3B,IAAiB,EAAE,CA6BlB;AA7BD,WAAiB,EAAE;IAalB,IAAiB,KAAK,CAerB;IAfD,WAAiB,KAAK;QAOrB,IAAiB,SAAS,CAOzB;QAPD,WAAiB,SAAS;YACZ,cAAI,GAAG,WAAI,CAAC,MAAM,CAAY;gBAC1C,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBAClC,IAAI,EAAE,WAAI,CAAC,MAAM,CAAC,aAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;gBACxC,EAAE,EAAE,WAAI,CAAC,MAAM,CAAC,aAAK,CAAC,QAAQ,CAAC,MAAM,CAAC;gBACtC,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE;aACrB,CAAC,CAAA;QACH,CAAC,EAPgB,SAAS,GAAT,eAAS,KAAT,eAAS,QAOzB;IACF,CAAC,EAfgB,KAAK,GAAL,QAAK,KAAL,QAAK,QAerB;AACF,CAAC,EA7BgB,EAAE,kBAAF,EAAE,QA6BlB"}
1
+ {"version":3,"file":"fx.js","sourceRoot":"","sources":["../../fx.ts"],"names":[],"mappings":";;;AAAA,iCAA6B;AAC7B,+BAA2B;AAE3B,IAAiB,EAAE,CAuDlB;AAvDD,WAAiB,EAAE;IAWlB,IAAiB,KAAK,CA8BrB;IA9BD,WAAiB,KAAK;QAErB,IAAiB,KAAK,CAGrB;QAHD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zB;IACF,CAAC,EA9BgB,KAAK,GAAL,QAAK,KAAL,QAAK,QA8BrB;IACY,OAAI,GAAG,WAAI,CAAC,MAAM,CAAQ;QACtC,EAAE,EAAE,WAAI,CAAC,MAAM,EAAE;QACjB,OAAO,EAAE,WAAI,CAAC,MAAM,EAAE;QACtB,OAAO,EAAE,WAAI,CAAC,MAAM,EAAE;QACtB,OAAO,EAAE,WAAI,CAAC,MAAM,CAAmB;YACtC,EAAE,EAAE,WAAI,CAAC,MAAM,EAAE;YACjB,EAAE,EAAE,WAAI,CAAC,MAAM,CAAyB,EAAE,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,CAAC;SAClE,CAAC;QACF,KAAK,EAAE,KAAK,CAAC,KAAK,CAAC,IAAI;QACvB,IAAI,EAAE,WAAI,CAAC,MAAM,CAAgB,EAAE,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,WAAI,CAAC,MAAM,CAAC,aAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACzG,EAAE,EAAE,WAAI,CAAC,MAAM,CAAc,EAAE,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,WAAI,CAAC,MAAM,CAAC,aAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACrG,IAAI,EAAE,WAAI,CAAC,MAAM,CAAgB,EAAE,IAAI,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,WAAI,CAAC,MAAM,EAAE,EAAE,CAAC;KAC1G,CAAC,CAAA;AACH,CAAC,EAvDgB,EAAE,kBAAF,EAAE,QAuDlB"}
@@ -0,0 +1,8 @@
1
+ import { gracely } from "gracely";
2
+ import { http } from "cloudly-http";
3
+ import { Organization } from "../../Organization";
4
+ export declare class Fx {
5
+ private readonly client;
6
+ constructor(client: http.Client);
7
+ markup(organization: string, markup: number): Promise<Organization | gracely.Error>;
8
+ }
@@ -0,0 +1,10 @@
1
+ export class Fx {
2
+ client;
3
+ constructor(client) {
4
+ this.client = client;
5
+ }
6
+ async markup(organization, markup) {
7
+ return this.client.put(`/organization/markup`, { markup }, { organization });
8
+ }
9
+ }
10
+ //# sourceMappingURL=Fx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fx.js","sourceRoot":"","sources":["../../../../Client/Organizations/Fx.ts"],"names":[],"mappings":"AAIA,MAAM,OAAO,EAAE;IACe;IAA7B,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;IAAG,CAAC;IACpD,KAAK,CAAC,MAAM,CAAC,YAAoB,EAAE,MAAc;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAe,sBAAsB,EAAE,EAAE,MAAM,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAA;IAC3F,CAAC;CACD"}
@@ -1,12 +1,14 @@
1
1
  import { gracely } from "gracely";
2
2
  import { http } from "cloudly-http";
3
3
  import { Organization } from "../../Organization";
4
+ import { Fx } from "./Fx";
4
5
  import { Groups } from "./Groups";
5
6
  import { Rules } from "./Rules";
6
7
  export declare class Organizations {
7
8
  private readonly client;
8
9
  readonly Rules: Rules;
9
10
  readonly groups: Groups;
11
+ readonly fx: Fx;
10
12
  constructor(client: http.Client);
11
13
  list(options?: {
12
14
  limit?: string;
@@ -1,13 +1,16 @@
1
+ import { Fx } from "./Fx";
1
2
  import { Groups } from "./Groups";
2
3
  import { Rules } from "./Rules";
3
4
  export class Organizations {
4
5
  client;
5
6
  Rules;
6
7
  groups;
8
+ fx;
7
9
  constructor(client) {
8
10
  this.client = client;
9
11
  this.Rules = new Rules(this.client);
10
12
  this.groups = new Groups(this.client);
13
+ this.fx = new Fx(this.client);
11
14
  }
12
15
  async list(options) {
13
16
  return this.client.get(`/organization`, options);
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../Client/Organizations/index.ts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AAO;IACZ,MAAM,CAAQ;IACd,EAAE,CAAI;IACf,YAA6B,MAAmB;QAAnB,WAAM,GAAN,MAAM,CAAa;QAC/C,IAAI,CAAC,KAAK,GAAG,IAAI,KAAK,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACnC,IAAI,CAAC,MAAM,GAAG,IAAI,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;QACrC,IAAI,CAAC,EAAE,GAAG,IAAI,EAAE,CAAC,IAAI,CAAC,MAAM,CAAC,CAAA;IAC9B,CAAC;IAED,KAAK,CAAC,IAAI,CAAC,OAGV;QACA,OAAO,IAAI,CAAC,MAAM,CAAC,GAAG,CAAmD,eAAe,EAAE,OAAO,CAAC,CAAA;IACnG,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,YAAoC;QAChD,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAe,eAAe,EAAE,YAAY,CAAC,CAAA;IACrE,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU,EAAE,UAAmC;QAC3D,OAAO,IAAI,CAAC,MAAM,CAAC,KAAK,CAAe,iBAAiB,EAAE,EAAE,EAAE,UAAU,CAAC,CAAA;IAC1E,CAAC;IACD,KAAK,CAAC,UAAU,CAAC,YAAoB;QACpC,OAAO,IAAI,CAAC,MAAM,CAAC,MAAM,CAAe,iBAAiB,YAAY,EAAE,EAAE,EAAE,YAAY,EAAE,CAAC,CAAA;IAC3F,CAAC;CACD"}
@@ -1,11 +1,13 @@
1
1
  import { Rule } from "../Rule";
2
2
  import { Contact } from "./Contact";
3
+ import { Fx } from "./Fx";
3
4
  export interface Creatable {
4
5
  name: string;
5
6
  code: string;
6
7
  rules?: Rule[];
7
8
  contact?: Contact.Creatable;
8
9
  groups?: string[];
10
+ fx?: Fx;
9
11
  }
10
12
  export declare namespace Creatable {
11
13
  const type: import("isly/dist/cjs/object").IslyObject<Rule.State.Organization.Creatable, object>;
@@ -1,6 +1,7 @@
1
1
  import { isly } from "isly";
2
2
  import { type as ruleType } from "../Rule/type";
3
3
  import { Contact } from "./Contact";
4
+ import { Fx } from "./Fx";
4
5
  export var Creatable;
5
6
  (function (Creatable) {
6
7
  Creatable.type = isly.object({
@@ -9,6 +10,7 @@ export var Creatable;
9
10
  rules: ruleType.array().optional(),
10
11
  contact: Contact.Creatable.type.optional(),
11
12
  groups: isly.string().array().optional(),
13
+ fx: Fx.type.optional(),
12
14
  });
13
15
  })(Creatable || (Creatable = {}));
14
16
  //# sourceMappingURL=Creatable.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../Organization/Creatable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AASnC,MAAM,KAAW,SAAS,CAQzB;AARD,WAAiB,SAAS;IACZ,cAAI,GAAG,IAAI,CAAC,MAAM,CAAY;QAC1C,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAClD,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAClC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE;QAC1C,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KACxC,CAAC,CAAA;AACH,CAAC,EARgB,SAAS,KAAT,SAAS,QAQzB"}
1
+ {"version":3,"file":"Creatable.js","sourceRoot":"","sources":["../../../Organization/Creatable.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAA;AAUzB,MAAM,KAAW,SAAS,CASzB;AATD,WAAiB,SAAS;IACZ,cAAI,GAAG,IAAI,CAAC,MAAM,CAAY;QAC1C,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAClD,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QAClC,OAAO,EAAE,OAAO,CAAC,SAAS,CAAC,IAAI,CAAC,QAAQ,EAAE;QAC1C,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QACxC,EAAE,EAAE,EAAE,CAAC,IAAI,CAAC,QAAQ,EAAE;KACtB,CAAC,CAAA;AACH,CAAC,EATgB,SAAS,KAAT,SAAS,QASzB"}
@@ -0,0 +1,6 @@
1
+ export interface Fx {
2
+ markup: number;
3
+ }
4
+ export declare namespace Fx {
5
+ const type: import("isly/dist/cjs/object").IslyObject<Fx, object>;
6
+ }
@@ -0,0 +1,6 @@
1
+ import { isly } from "isly";
2
+ export var Fx;
3
+ (function (Fx) {
4
+ Fx.type = isly.object({ markup: isly.number(value => value >= 0) });
5
+ })(Fx || (Fx = {}));
6
+ //# sourceMappingURL=Fx.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Fx.js","sourceRoot":"","sources":["../../../Organization/Fx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAK3B,MAAM,KAAW,EAAE,CAElB;AAFD,WAAiB,EAAE;IACL,OAAI,GAAG,IAAI,CAAC,MAAM,CAAK,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,EAAE,CAAC,KAAK,IAAI,CAAC,CAAC,EAAE,CAAC,CAAA;AAClF,CAAC,EAFgB,EAAE,KAAF,EAAE,QAElB"}
@@ -3,6 +3,7 @@ import { Rule } from "../Rule";
3
3
  import { Changeable as OrganizationChangeable } from "./Changeable";
4
4
  import { Contact as OrganizationContact } from "./Contact";
5
5
  import { Creatable as OrganizationCreatable } from "./Creatable";
6
+ import { Fx as OrganizationFx } from "./Fx";
6
7
  export interface Organization {
7
8
  name: string;
8
9
  code: string;
@@ -11,10 +12,12 @@ export interface Organization {
11
12
  status: "active" | "inactive";
12
13
  contact?: Organization.Contact;
13
14
  groups?: string[];
15
+ fx?: OrganizationFx;
14
16
  }
15
17
  export declare namespace Organization {
16
18
  export import Creatable = OrganizationCreatable;
17
19
  export import Changeable = OrganizationChangeable;
18
20
  export import Contact = OrganizationContact;
21
+ export import Fx = OrganizationFx;
19
22
  const type: import("isly/dist/cjs/object").IslyObject<Rule.State.Organization, object>;
20
23
  }
@@ -4,11 +4,13 @@ import { type as ruleType } from "../Rule/type";
4
4
  import { Changeable as OrganizationChangeable } from "./Changeable";
5
5
  import { Contact as OrganizationContact } from "./Contact";
6
6
  import { Creatable as OrganizationCreatable } from "./Creatable";
7
+ import { Fx as OrganizationFx } from "./Fx";
7
8
  export var Organization;
8
9
  (function (Organization) {
9
10
  Organization.Creatable = OrganizationCreatable;
10
11
  Organization.Changeable = OrganizationChangeable;
11
12
  Organization.Contact = OrganizationContact;
13
+ Organization.Fx = OrganizationFx;
12
14
  Organization.type = isly.object({
13
15
  name: isly.string(),
14
16
  code: isly.string(new RegExp(/^[A-Za-z0-9\-_]+$/)),
@@ -17,6 +19,7 @@ export var Organization;
17
19
  status: isly.string(["active", "inactive"]),
18
20
  contact: Organization.Contact.type.optional(),
19
21
  groups: isly.string().array().optional(),
22
+ fx: OrganizationFx.type.optional(),
20
23
  });
21
24
  })(Organization || (Organization = {}));
22
25
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Organization/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEhC,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,UAAU,IAAI,sBAAsB,EAAE,MAAM,cAAc,CAAA;AACnE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAC1D,OAAO,EAAE,SAAS,IAAI,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAWhE,MAAM,KAAW,YAAY,CAa5B;AAbD,WAAiB,YAAY;IACd,sBAAS,GAAG,qBAAqB,CAAA;IACjC,uBAAU,GAAG,sBAAsB,CAAA;IACnC,oBAAO,GAAG,mBAAmB,CAAA;IAC9B,iBAAI,GAAG,IAAI,CAAC,MAAM,CAAe;QAC7C,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAClD,KAAK,EAAE,KAAK,CAAC,IAAI;QACjB,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE;QACvB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC3C,OAAO,EAAE,aAAA,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;QAChC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;KACxC,CAAC,CAAA;AACH,CAAC,EAbgB,YAAY,KAAZ,YAAY,QAa5B"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../Organization/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEhC,OAAO,EAAE,IAAI,IAAI,QAAQ,EAAE,MAAM,cAAc,CAAA;AAC/C,OAAO,EAAE,UAAU,IAAI,sBAAsB,EAAE,MAAM,cAAc,CAAA;AACnE,OAAO,EAAE,OAAO,IAAI,mBAAmB,EAAE,MAAM,WAAW,CAAA;AAC1D,OAAO,EAAE,SAAS,IAAI,qBAAqB,EAAE,MAAM,aAAa,CAAA;AAChE,OAAO,EAAE,EAAE,IAAI,cAAc,EAAE,MAAM,MAAM,CAAA;AAY3C,MAAM,KAAW,YAAY,CAe5B;AAfD,WAAiB,YAAY;IACd,sBAAS,GAAG,qBAAqB,CAAA;IACjC,uBAAU,GAAG,sBAAsB,CAAA;IACnC,oBAAO,GAAG,mBAAmB,CAAA;IAC7B,eAAE,GAAG,cAAc,CAAA;IACpB,iBAAI,GAAG,IAAI,CAAC,MAAM,CAAe;QAC7C,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;QACnB,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,IAAI,MAAM,CAAC,mBAAmB,CAAC,CAAC;QAClD,KAAK,EAAE,KAAK,CAAC,IAAI;QACjB,KAAK,EAAE,QAAQ,CAAC,KAAK,EAAE;QACvB,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,UAAU,CAAC,CAAC;QAC3C,OAAO,EAAE,aAAA,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE;QAChC,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;QACxC,EAAE,EAAE,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE;KAClC,CAAC,CAAA;AACH,CAAC,EAfgB,YAAY,KAAZ,YAAY,QAe5B"}
package/dist/mjs/fx.d.ts CHANGED
@@ -1,9 +1,17 @@
1
1
  import { isoly } from "isoly";
2
+ import { isly } from "isly";
2
3
  export declare namespace fx {
3
4
  interface Quote {
4
5
  id: string;
5
6
  created: isoly.DateTime;
6
7
  expires: isoly.DateTime;
8
+ account: {
9
+ id: string;
10
+ fx: {
11
+ markup: number;
12
+ };
13
+ };
14
+ fixed: Quote.Fixed;
7
15
  from: {
8
16
  amount: number;
9
17
  currency: isoly.Currency;
@@ -19,14 +27,35 @@ export declare namespace fx {
19
27
  };
20
28
  }
21
29
  namespace Quote {
22
- interface Creatable {
23
- type: "sell" | "buy";
24
- from: isoly.Currency;
25
- to: isoly.Currency;
26
- amount: number;
30
+ type Fixed = typeof Fixed.values[number];
31
+ namespace Fixed {
32
+ const values: readonly ["from", "to"];
33
+ const type: isly.Type<"from" | "to">;
27
34
  }
35
+ type Creatable = Creatable.From | Creatable.To;
28
36
  namespace Creatable {
29
- const type: import("isly/dist/cjs/object").IslyObject<Creatable, object>;
37
+ interface From {
38
+ from: {
39
+ amount: number;
40
+ currency: isoly.Currency;
41
+ };
42
+ to: isoly.Currency;
43
+ }
44
+ namespace From {
45
+ const type: import("isly/dist/cjs/object").IslyObject<From, object>;
46
+ }
47
+ interface To {
48
+ from: isoly.Currency;
49
+ to: {
50
+ amount: number;
51
+ currency: isoly.Currency;
52
+ };
53
+ }
54
+ namespace To {
55
+ const type: import("isly/dist/cjs/object").IslyObject<To, object>;
56
+ }
57
+ const type: isly.Type<Creatable>;
30
58
  }
31
59
  }
60
+ const type: import("isly/dist/cjs/object").IslyObject<Quote, object>;
32
61
  }
package/dist/mjs/fx.js CHANGED
@@ -4,15 +4,42 @@ export var fx;
4
4
  (function (fx) {
5
5
  let Quote;
6
6
  (function (Quote) {
7
+ let Fixed;
8
+ (function (Fixed) {
9
+ Fixed.values = ["from", "to"];
10
+ Fixed.type = isly.string(Fixed.values);
11
+ })(Fixed = Quote.Fixed || (Quote.Fixed = {}));
7
12
  let Creatable;
8
13
  (function (Creatable) {
9
- Creatable.type = isly.object({
10
- type: isly.string(["sell", "buy"]),
11
- from: isly.string(isoly.Currency.values),
12
- to: isly.string(isoly.Currency.values),
13
- amount: isly.number(),
14
- });
14
+ let From;
15
+ (function (From) {
16
+ From.type = isly.object({
17
+ from: isly.object({ currency: isly.string(isoly.Currency.values), amount: isly.number() }),
18
+ to: isly.string(isoly.Currency.values),
19
+ });
20
+ })(From = Creatable.From || (Creatable.From = {}));
21
+ let To;
22
+ (function (To) {
23
+ To.type = isly.object({
24
+ from: isly.string(isoly.Currency.values),
25
+ to: isly.object({ currency: isly.string(isoly.Currency.values), amount: isly.number() }),
26
+ });
27
+ })(To = Creatable.To || (Creatable.To = {}));
28
+ Creatable.type = isly.union(From.type, To.type);
15
29
  })(Creatable = Quote.Creatable || (Quote.Creatable = {}));
16
30
  })(Quote = fx.Quote || (fx.Quote = {}));
31
+ fx.type = isly.object({
32
+ id: isly.string(),
33
+ created: isly.string(),
34
+ expires: isly.string(),
35
+ account: isly.object({
36
+ id: isly.string(),
37
+ fx: isly.object({ markup: isly.number() }),
38
+ }),
39
+ fixed: Quote.Fixed.type,
40
+ from: isly.object({ amount: isly.number(), currency: isly.string(isoly.Currency.values) }),
41
+ to: isly.object({ amount: isly.number(), currency: isly.string(isoly.Currency.values) }),
42
+ rate: isly.object({ base: isly.number(), markup: isly.number(), effective: isly.number() }),
43
+ });
17
44
  })(fx || (fx = {}));
18
45
  //# sourceMappingURL=fx.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"fx.js","sourceRoot":"","sources":["../../fx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAE3B,MAAM,KAAW,EAAE,CA6BlB;AA7BD,WAAiB,EAAE;IAalB,IAAiB,KAAK,CAerB;IAfD,WAAiB,KAAK;QAOrB,IAAiB,SAAS,CAOzB;QAPD,WAAiB,SAAS;YACZ,cAAI,GAAG,IAAI,CAAC,MAAM,CAAY;gBAC1C,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;gBAClC,IAAI,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EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACzG,EAAE,EAAE,IAAI,CAAC,MAAM,CAAc,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,QAAQ,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC;QACrG,IAAI,EAAE,IAAI,CAAC,MAAM,CAAgB,EAAE,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC;KAC1G,CAAC,CAAA;AACH,CAAC,EAvDgB,EAAE,KAAF,EAAE,QAuDlB"}
package/fx.ts CHANGED
@@ -6,28 +6,54 @@ export namespace fx {
6
6
  id: string
7
7
  created: isoly.DateTime
8
8
  expires: isoly.DateTime
9
+ account: { id: string; fx: { markup: number } }
10
+ fixed: Quote.Fixed
9
11
  from: { amount: number; currency: isoly.Currency }
10
12
  to: { amount: number; currency: isoly.Currency }
11
- rate: {
12
- base: number
13
- markup: number
14
- effective: number
15
- }
13
+ rate: { base: number; markup: number; effective: number }
16
14
  }
17
15
  export namespace Quote {
18
- export interface Creatable {
19
- type: "sell" | "buy"
20
- from: isoly.Currency
21
- to: isoly.Currency
22
- amount: number
16
+ export type Fixed = typeof Fixed.values[number]
17
+ export namespace Fixed {
18
+ export const values = ["from", "to"] as const
19
+ export const type = isly.string<Fixed>(values)
23
20
  }
21
+ export type Creatable = Creatable.From | Creatable.To
24
22
  export namespace Creatable {
25
- export const type = isly.object<Creatable>({
26
- type: isly.string(["sell", "buy"]),
27
- from: isly.string(isoly.Currency.values),
28
- to: isly.string(isoly.Currency.values),
29
- amount: isly.number(),
30
- })
23
+ export interface From {
24
+ from: { amount: number; currency: isoly.Currency }
25
+ to: isoly.Currency
26
+ }
27
+ export namespace From {
28
+ export const type = isly.object<From>({
29
+ from: isly.object<From["from"]>({ currency: isly.string(isoly.Currency.values), amount: isly.number() }),
30
+ to: isly.string(isoly.Currency.values),
31
+ })
32
+ }
33
+ export interface To {
34
+ from: isoly.Currency
35
+ to: { amount: number; currency: isoly.Currency }
36
+ }
37
+ export namespace To {
38
+ export const type = isly.object<To>({
39
+ from: isly.string(isoly.Currency.values),
40
+ to: isly.object<To["to"]>({ currency: isly.string(isoly.Currency.values), amount: isly.number() }),
41
+ })
42
+ }
43
+ export const type = isly.union<Creatable, From, To>(From.type, To.type)
31
44
  }
32
45
  }
46
+ export const type = isly.object<Quote>({
47
+ id: isly.string(),
48
+ created: isly.string(),
49
+ expires: isly.string(),
50
+ account: isly.object<Quote["account"]>({
51
+ id: isly.string(),
52
+ fx: isly.object<Quote["account"]["fx"]>({ markup: isly.number() }),
53
+ }),
54
+ fixed: Quote.Fixed.type,
55
+ from: isly.object<Quote["from"]>({ amount: isly.number(), currency: isly.string(isoly.Currency.values) }),
56
+ to: isly.object<Quote["to"]>({ amount: isly.number(), currency: isly.string(isoly.Currency.values) }),
57
+ rate: isly.object<Quote["rate"]>({ base: isly.number(), markup: isly.number(), effective: isly.number() }),
58
+ })
33
59
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/model-banking",
3
- "version": "0.1.565",
3
+ "version": "0.1.567",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",