@pax2pay/model-banking 0.1.153 → 0.1.155

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.
@@ -3,7 +3,6 @@ import { isoly } from "isoly"
3
3
  import { http } from "cloudly-http"
4
4
  import * as rest from "cloudly-rest"
5
5
  import { Transaction } from "../../Transaction"
6
- import { Indices as TransactionIndex } from "./Indices"
7
6
  import { Notes } from "./Notes"
8
7
 
9
8
  export class Transactions extends rest.Collection<gracely.Error> {
@@ -25,12 +24,12 @@ export class Transactions extends rest.Collection<gracely.Error> {
25
24
  account?: string
26
25
  limit?: number
27
26
  cursor?: string
28
- index?: Transactions.Index
27
+ index?: "review"
29
28
  dateRange?: isoly.DateRange
30
29
  }): Promise<(Transaction[] & { cursor?: string | undefined }) | gracely.Error> {
31
30
  const query = Object.entries({
32
31
  ...(options?.cursor ? { cursor: options.cursor } : {}),
33
- ...(options?.index ? { index: options.index.join(",") } : {}),
32
+ ...(options?.index ? { index: options?.index } : {}),
34
33
  ...(options?.dateRange ?? {}),
35
34
  })
36
35
  .map(([k, v]) => `${k}=${v}`)
@@ -49,8 +48,3 @@ export class Transactions extends rest.Collection<gracely.Error> {
49
48
  return result
50
49
  }
51
50
  }
52
-
53
- export namespace Transactions {
54
- export type Index = TransactionIndex
55
- export const Index = TransactionIndex
56
- }
package/Client/index.ts CHANGED
@@ -9,7 +9,7 @@ import { Operations } from "./Operations"
9
9
  import { Organizations } from "./Organizations"
10
10
  import { Rules } from "./Rules"
11
11
  import { Settlements } from "./Settlements"
12
- import { Transactions as ClientTransactions } from "./Transactions"
12
+ import { Transactions } from "./Transactions"
13
13
  import { Treasury } from "./Treasury"
14
14
  import { Version } from "./Version"
15
15
 
@@ -22,7 +22,7 @@ export class Client extends rest.Client<gracely.Error> {
22
22
  readonly organizations = new Organizations(this.client)
23
23
  readonly rules = new Rules(this.client)
24
24
  readonly settlements = new Settlements(this.client)
25
- readonly transactions = new ClientTransactions(this.client)
25
+ readonly transactions = new Transactions(this.client)
26
26
  readonly treasury = new Treasury(this.client)
27
27
  readonly flags = new Flags(this.client)
28
28
  readonly userwidgets = new userwidgets.ClientCollection(this.client, { pathPrefix: "/widgets" })
@@ -41,9 +41,5 @@ export class Client extends rest.Client<gracely.Error> {
41
41
  }
42
42
  }
43
43
  export namespace Client {
44
- export const Transactions = ClientTransactions
45
- export namespace Transactions {
46
- export type Index = ClientTransactions.Index
47
- }
48
44
  export type Unauthorized = (client: rest.Client<never>) => Promise<boolean>
49
45
  }
package/Rule/Rule.ts CHANGED
@@ -24,6 +24,7 @@ export const type = isly.object<Rule>({
24
24
  })
25
25
  export const is = type.is
26
26
  export const flaw = type.flaw
27
+ //TODO: remove when rule evaluation rebuilt
27
28
  export function stringify(rule: Rule): string {
28
29
  return `{ label: ${rule.name}, action: ${rule.action}, type: ${rule.type}, condition: ${rule.condition}, description: ${rule.description}. }`
29
30
  }
@@ -1,5 +1,6 @@
1
1
  import { isoly } from "isoly"
2
2
  import { isly } from "isly"
3
+ import { Rule } from "../Rule"
3
4
 
4
5
  export interface Note extends Note.Creatable {
5
6
  author: string
@@ -14,12 +15,14 @@ export namespace Note {
14
15
  text?: string
15
16
  action?: "approve" | "reject"
16
17
  flags?: string[]
18
+ rule?: Omit<Rule, ""> // Solves a typing issue in the test
17
19
  }
18
20
  export namespace Creatable {
19
21
  export const type = isly.object<Creatable>({
20
22
  text: isly.string().optional(),
21
23
  action: isly.string(["approve", "reject"]).optional(),
22
24
  flags: isly.string().array().optional(),
25
+ rule: Rule.type.optional(),
23
26
  })
24
27
  export const is = type.is
25
28
  }
@@ -3,7 +3,6 @@ import { isoly } from "isoly";
3
3
  import { http } from "cloudly-http";
4
4
  import * as rest from "cloudly-rest";
5
5
  import { Transaction } from "../../Transaction";
6
- import { Indices as TransactionIndex } from "./Indices";
7
6
  import { Notes } from "./Notes";
8
7
  export declare class Transactions extends rest.Collection<gracely.Error> {
9
8
  readonly Notes: Notes;
@@ -13,13 +12,9 @@ export declare class Transactions extends rest.Collection<gracely.Error> {
13
12
  account?: string;
14
13
  limit?: number;
15
14
  cursor?: string;
16
- index?: Transactions.Index;
15
+ index?: "review";
17
16
  dateRange?: isoly.DateRange;
18
17
  }): Promise<(Transaction[] & {
19
18
  cursor?: string | undefined;
20
19
  }) | gracely.Error>;
21
20
  }
22
- export declare namespace Transactions {
23
- type Index = TransactionIndex;
24
- const Index: typeof TransactionIndex;
25
- }
@@ -1,7 +1,6 @@
1
1
  import { gracely } from "gracely";
2
2
  import { http } from "cloudly-http";
3
3
  import * as rest from "cloudly-rest";
4
- import { Indices as TransactionIndex } from "./Indices";
5
4
  import { Notes } from "./Notes";
6
5
  export class Transactions extends rest.Collection {
7
6
  constructor(client) {
@@ -20,7 +19,7 @@ export class Transactions extends rest.Collection {
20
19
  async list(options) {
21
20
  const query = Object.entries({
22
21
  ...(options?.cursor ? { cursor: options.cursor } : {}),
23
- ...(options?.index ? { index: options.index.join(",") } : {}),
22
+ ...(options?.index ? { index: options?.index } : {}),
24
23
  ...(options?.dateRange ?? {}),
25
24
  })
26
25
  .map(([k, v]) => `${k}=${v}`)
@@ -37,7 +36,4 @@ export class Transactions extends rest.Collection {
37
36
  return result;
38
37
  }
39
38
  }
40
- (function (Transactions) {
41
- Transactions.Index = TransactionIndex;
42
- })(Transactions || (Transactions = {}));
43
39
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Transactions/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAA;AAEjC,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,KAAK,IAAI,MAAM,cAAc,CAAA;AAEpC,OAAO,EAAE,OAAO,IAAI,gBAAgB,EAAE,MAAM,WAAW,CAAA;AACvD,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAE/B,MAAM,OAAO,YAAa,SAAQ,IAAI,C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AM,IAAI,GAAG,OAAO,EAAE,OAAO,CAAC,CAAC,CAAC,YAAY,OAAO,CAAC,OAAO,cAAc,CAAC,CAAC,CAAC,cAAc,CAAA;QAC1F,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,GAAG,CACnC,IAAI,GAAG,CAAC,KAAK,IAAI,GAAG,GAAG,KAAK,CAAC,EAC7B,OAAO,EAAE,KAAK,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,CAC1D,CAAA;QACD,IAAI,MAAyE,CAAA;QAC7E,IAAI,CAAC,OAAO,CAAC,KAAK,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE;YAC9B,MAAM,GAAG,MAAM,CAAC,IAAI,CAAA;YACpB,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,MAAM,CAAA;SAC7B;;YACA,MAAM,GAAG,MAAM,CAAA;QAChB,OAAO,MAAM,CAAA;IACd,CAAC;CACD"}
@@ -9,7 +9,7 @@ import { Operations } from "./Operations";
9
9
  import { Organizations } from "./Organizations";
10
10
  import { Rules } from "./Rules";
11
11
  import { Settlements } from "./Settlements";
12
- import { Transactions as ClientTransactions } from "./Transactions";
12
+ import { Transactions } from "./Transactions";
13
13
  import { Treasury } from "./Treasury";
14
14
  import { Version } from "./Version";
15
15
  export declare class Client extends rest.Client<gracely.Error> {
@@ -21,7 +21,7 @@ export declare class Client extends rest.Client<gracely.Error> {
21
21
  readonly organizations: Organizations;
22
22
  readonly rules: Rules;
23
23
  readonly settlements: Settlements;
24
- readonly transactions: ClientTransactions;
24
+ readonly transactions: Transactions;
25
25
  readonly treasury: Treasury;
26
26
  readonly flags: Flags;
27
27
  readonly userwidgets: userwidgets.ClientCollection;
@@ -29,9 +29,5 @@ export declare class Client extends rest.Client<gracely.Error> {
29
29
  static create<T = Record<string, any>>(server: string, key: string, load?: (client: http.Client) => T): Client & T;
30
30
  }
31
31
  export declare namespace Client {
32
- const Transactions: typeof ClientTransactions;
33
- namespace Transactions {
34
- type Index = ClientTransactions.Index;
35
- }
36
32
  type Unauthorized = (client: rest.Client<never>) => Promise<boolean>;
37
33
  }
@@ -8,7 +8,7 @@ import { Operations } from "./Operations";
8
8
  import { Organizations } from "./Organizations";
9
9
  import { Rules } from "./Rules";
10
10
  import { Settlements } from "./Settlements";
11
- import { Transactions as ClientTransactions } from "./Transactions";
11
+ import { Transactions } from "./Transactions";
12
12
  import { Treasury } from "./Treasury";
13
13
  import { Version } from "./Version";
14
14
  export class Client extends rest.Client {
@@ -20,7 +20,7 @@ export class Client extends rest.Client {
20
20
  this.organizations = new Organizations(this.client);
21
21
  this.rules = new Rules(this.client);
22
22
  this.settlements = new Settlements(this.client);
23
- this.transactions = new ClientTransactions(this.client);
23
+ this.transactions = new Transactions(this.client);
24
24
  this.treasury = new Treasury(this.client);
25
25
  this.flags = new Flags(this.client);
26
26
  this.userwidgets = new userwidgets.ClientCollection(this.client, { pathPrefix: "/widgets" });
@@ -36,7 +36,4 @@ export class Client extends rest.Client {
36
36
  return result;
37
37
  }
38
38
  }
39
- (function (Client) {
40
- Client.Transactions = ClientTransactions;
41
- })(Client || (Client = {}));
42
39
  //# 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,EAAE,IAAI,EAAE,MAAM,cAAc,CAAA;AACnC,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AACrC,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAC/B,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAA;AACzC,OAAO,EAAE,aAAa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Root":"../","sources":["Rule/Rule.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAW3B,MAAM,CAAC,MAAM,OAAO,GAAG,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,CAAU,CAAA;AAE5D,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,eAAe,EAAE,UAAU,EAAE,SAAS,CAAU,CAAA;AAGtE,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,MAAM,CAAO;IACrC,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE;IACnB,WAAW,EAAE,IAAI,CAAC,MAAM,EAAE;IAC1B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,OAAO,CAAC;IAC5B,IAAI,EAAE,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;IACxB,SAAS,EAAE,IAAI,CAAC,MAAM,EAAE;IACxB,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE;CAC5B,CAAC,CAAA;AACF,MAAM,CAAC,MAAM,EAAE,GAAG,IAAI,CAAC,EAAE,CAAA;AACzB,MAAM,CAAC,MAAM,IAAI,GAAG,IAAI,CAAC,IAAI,CAAA;AAE7B,MAAM,UAAU,SAAS,CAAC,IAAU;IACnC,OAAO,YAAY,IAAI,CAAC,IAAI,aAAa,IAAI,CAAC,MAAM,WAAW,IAAI,CAAC,IAAI,gBAAgB,IAAI,CAAC,SAAS,kBAAkB,IAAI,CAAC,WAAW,KAAK,CAAA;AAC9I,CAAC"}
@@ -1,5 +1,6 @@
1
1
  import { isoly } from "isoly";
2
2
  import { isly } from "isly";
3
+ import { Rule } from "../Rule";
3
4
  export interface Note extends Note.Creatable {
4
5
  author: string;
5
6
  created: isoly.DateTime;
@@ -10,6 +11,7 @@ export declare namespace Note {
10
11
  text?: string;
11
12
  action?: "approve" | "reject";
12
13
  flags?: string[];
14
+ rule?: Omit<Rule, "">;
13
15
  }
14
16
  namespace Creatable {
15
17
  const type: isly.object.ExtendableType<Creatable>;
@@ -1,5 +1,6 @@
1
1
  import { isoly } from "isoly";
2
2
  import { isly } from "isly";
3
+ import { Rule } from "../Rule";
3
4
  export var Note;
4
5
  (function (Note) {
5
6
  function fromCreatable(note, author) {
@@ -12,6 +13,7 @@ export var Note;
12
13
  text: isly.string().optional(),
13
14
  action: isly.string(["approve", "reject"]).optional(),
14
15
  flags: isly.string().array().optional(),
16
+ rule: Rule.type.optional(),
15
17
  });
16
18
  Creatable.is = Creatable.type.is;
17
19
  })(Creatable = Note.Creatable || (Note.Creatable = {}));
@@ -1 +1 @@
1
- {"version":3,"file":"Note.js","sourceRoot":"../","sources":["Transaction/Note.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAO3B,MAAM,KAAW,IAAI,CAsBpB;AAtBD,WAAiB,IAAI;IACpB,SAAgB,aAAa,CAAC,IAAe,EAAE,MAAc;QAC5D,OAAO,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,CAAC,QAAQ,CAAC,GAAG,EAAE,EAAE,MAAM,EAAE,MAAM,EAAE,CAAA;IAClE,CAAC;IAFe,kBAAa,gBAE5B,CAAA;IAMD,IAAiB,SAAS,CAOzB;IAPD,WAAiB,SAAS;QACZ,cAAI,GAAG,IAAI,CAAC,MAAM,CAAY;YAC1C,IAAI,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE;YAC9B,MAAM,EAAE,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,QAAQ,CAAC,CAAC,CAAC,QAAQ,EAAE;YACrD,KAAK,EAAE,IAAI,CAAC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC,QAAQ,EAAE;SACvC,CAAC,CAAA;QACW,YAAE,GAAG,UAAA,IAAI,CAAC,EAAE,CAAA;IAC1B,CAAC,EAPgB,SAAS,GAAT,c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T,cAAS,KAAT,cAAS,QAQzB;IACY,SAAI,GAAG,SAAS,CAAC,IAAI,CAAC,MAAM,CAAO;QAC/C,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE;QACrB,OAAO,EAAE,IAAI,CAAC,MAAM,EAAE;KACtB,CAAC,CAAA;IACW,OAAE,GAAG,KAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAxBgB,IAAI,KAAJ,IAAI,QAwBpB"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/model-banking",
3
- "version": "0.1.153",
3
+ "version": "0.1.155",
4
4
  "description": "Library containing data model types and functions for the Pax2Pay Banking API.",
5
5
  "author": "Pax2Pay Ltd",
6
6
  "license": "MIT",
@@ -1,28 +0,0 @@
1
- import { isoly } from "isoly"
2
- import { isly } from "isly"
3
-
4
- export type Indices =
5
- | ["currency", isoly.Currency]
6
- | ["direction", Indices.Direction]
7
- | ["rail", Indices.Rail]
8
- | ["status", Indices.Status]
9
- export namespace Indices {
10
- const direction = ["inbound", "outbound"] as const
11
- export type Direction = typeof direction[number]
12
- const rail = "internal"
13
- export type Rail = typeof rail
14
- const status = ["review", "created", "approved", "rejected", "processing", "finalized"] as const
15
- export type Status = typeof status[number]
16
- export const type = isly.union(
17
- isly.tuple<Indices>(isly.string("currency"), isly.fromIs("isoly.Currency", isoly.Currency.is)),
18
- isly.tuple<Indices>(isly.string("direction"), isly.string(direction)),
19
- isly.tuple<Indices>(isly.string("rail"), isly.string(rail)),
20
- isly.tuple<Indices>(isly.string("status"), isly.string(status))
21
- )
22
- export const is = type.is
23
- export const flaw = type.flaw
24
- export function parse(value: string | undefined): Indices | undefined {
25
- const indices = value?.split(",")
26
- return is(indices) ? indices : undefined
27
- }
28
- }
@@ -1,16 +0,0 @@
1
- import { isoly } from "isoly";
2
- import { isly } from "isly";
3
- export type Indices = ["currency", isoly.Currency] | ["direction", Indices.Direction] | ["rail", Indices.Rail] | ["status", Indices.Status];
4
- export declare namespace Indices {
5
- const direction: readonly ["inbound", "outbound"];
6
- export type Direction = typeof direction[number];
7
- const rail = "internal";
8
- export type Rail = typeof rail;
9
- const status: readonly ["review", "created", "approved", "rejected", "processing", "finalized"];
10
- export type Status = typeof status[number];
11
- export const type: isly.Type<Indices>;
12
- export const is: isly.Type.IsFunction<Indices>;
13
- export const flaw: isly.Type.FlawFunction;
14
- export function parse(value: string | undefined): Indices | undefined;
15
- export {};
16
- }
@@ -1,17 +0,0 @@
1
- import { isoly } from "isoly";
2
- import { isly } from "isly";
3
- export var Indices;
4
- (function (Indices) {
5
- const direction = ["inbound", "outbound"];
6
- const rail = "internal";
7
- const status = ["review", "created", "approved", "rejected", "processing", "finalized"];
8
- Indices.type = isly.union(isly.tuple(isly.string("currency"), isly.fromIs("isoly.Currency", isoly.Currency.is)), isly.tuple(isly.string("direction"), isly.string(direction)), isly.tuple(isly.string("rail"), isly.string(rail)), isly.tuple(isly.string("status"), isly.string(status)));
9
- Indices.is = Indices.type.is;
10
- Indices.flaw = Indices.type.flaw;
11
- function parse(value) {
12
- const indices = value?.split(",");
13
- return Indices.is(indices) ? indices : undefined;
14
- }
15
- Indices.parse = parse;
16
- })(Indices || (Indices = {}));
17
- //# sourceMappingURL=Indices.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Indices.js","sourceRoot":"../","sources":["Client/Transactions/Indices.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAC7B,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAO3B,MAAM,KAAW,OAAO,CAmBvB;AAnBD,WAAiB,OAAO;IACvB,MAAM,SAAS,GAAG,CAAC,SAAS,EAAE,UAAU,CAAU,CAAA;IAElD,MAAM,IAAI,GAAG,UAAU,CAAA;IAEvB,MAAM,MAAM,GAAG,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,EAAE,UAAU,EAAE,YAAY,EAAE,WAAW,CAAU,CAAA;IA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