@pax2pay/client 0.3.159 → 0.3.161

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.
@@ -40,4 +40,13 @@ export class Payments extends List<model.PaymentResponse> {
40
40
  sort
41
41
  )
42
42
  }
43
+ async freeze(id: string) {
44
+ return await this.connection.get<model.PaymentResponse>(`${this.folder}/${id}/freeze`)
45
+ }
46
+ async thaw(id: string) {
47
+ return await this.connection.get<model.PaymentResponse>(`${this.folder}/${id}/thaw`)
48
+ }
49
+ async cancel(id: string) {
50
+ return await this.connection.remove<model.PaymentResponse>(`${this.folder}/${id}`)
51
+ }
43
52
  }
@@ -16,4 +16,13 @@ export declare class Payments extends List<model.PaymentResponse> {
16
16
  status: 400 | 404 | 500 | 403 | 503;
17
17
  })>;
18
18
  search(request: model.PaymentSearch, previous?: Paginated<model.SummaryPaymentResponse>, page?: number, size?: number, sort?: string, includeCount?: boolean): Promise<model.ErrorResponse | Paginated<model.SummaryPaymentResponse>>;
19
+ freeze(id: string): Promise<model.PaymentResponse | (model.ErrorResponse & {
20
+ status: 400 | 404 | 500 | 403 | 503;
21
+ })>;
22
+ thaw(id: string): Promise<model.PaymentResponse | (model.ErrorResponse & {
23
+ status: 400 | 404 | 500 | 403 | 503;
24
+ })>;
25
+ cancel(id: string): Promise<model.PaymentResponse | (model.ErrorResponse & {
26
+ status: 400 | 404 | 500 | 403 | 503;
27
+ })>;
19
28
  }
@@ -19,5 +19,14 @@ export class Payments extends List {
19
19
  async search(request, previous, page, size, sort = "createdOn,desc", includeCount = true) {
20
20
  return await this.getNextPaginated(previous, (page, size, sort, request) => this.connection.post(`${this.folder}/searches`, request, { page, size, sort, includeCount }), request, page, size, sort);
21
21
  }
22
+ async freeze(id) {
23
+ return await this.connection.get(`${this.folder}/${id}/freeze`);
24
+ }
25
+ async thaw(id) {
26
+ return await this.connection.get(`${this.folder}/${id}/thaw`);
27
+ }
28
+ async cancel(id) {
29
+ return await this.connection.remove(`${this.folder}/${id}`);
30
+ }
22
31
  }
23
32
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Payments/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAG9B,MAAM,OAAO,QAAS,SAAQ,IAA2B;IAExD,YAAY,UAAsB;QACjC,KAAK,CAAC,UAAU,CAAC,CAAA;QAFC,WAAM,GAAG,UAAU,CAAA;IAGtC,CAAC;IACD,MAAM,CAAC,MAAM,CAAC,UAAsB;QACnC,OAAO,IAAI,QAAQ,CAAC,UAAU,CAAC,CAAA;IAChC,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,OAA6B;QACzC,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAA8C,IAAI,CAAC,MAAM,EAAE,OAAO,CAAC,CAAA;IACrG,CAAC;IACD,KAAK,CAAC,eAAe,CAAC,OAA6B;QAClD,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CAA8C,GAAG,IAAI,CAAC,MAAM,YAAY,EAAE,OAAO,CAAC,CAAA;IACpH,CAAC;IACD,KAAK,CAAC,GAAG,CAAC,EAAU;QACnB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAwB,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC,CAAA;IAChF,CAAC;IACD,KAAK,CAAC,MAAM,CACX,OAA4B,EAC5B,QAAkD,EAClD,IAAa,EACb,IAAa,EACb,IAAI,GAAG,gBAAgB,EACvB,YAAY,GAAG,IAAI;QAEnB,OAAO,MAAM,IAAI,CAAC,gBAAgB,CACjC,QAAQ,EACR,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,EAAE,CAC7B,IAAI,CAAC,UAAU,CAAC,IAAI,CAElB,GAAG,IAAI,CAAC,MAAM,WAAW,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,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MAAM,WAAW,EAAE,OAAO,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,YAAY,EAAE,CAAC,EAC1E,OAAO,EACP,IAAI,EACJ,IAAI,EACJ,IAAI,CACJ,CAAA;IACF,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU;QACtB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAwB,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,SAAS,CAAC,CAAA;IACvF,CAAC;IACD,KAAK,CAAC,IAAI,CAAC,EAAU;QACpB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAwB,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,OAAO,CAAC,CAAA;IACrF,CAAC;IACD,KAAK,CAAC,MAAM,CAAC,EAAU;QACtB,OAAO,MAAM,IAAI,CAAC,UAAU,CAAC,MAAM,CAAwB,GAAG,IAAI,CAAC,MAAM,IAAI,EAAE,EAAE,CAAC,CAAA;IACnF,CAAC;CACD"}
@@ -1,9 +1,10 @@
1
1
  import { isly } from "isly";
2
+ import { AbstractPaymentOperation } from "./AbstractPaymentOperation";
2
3
  import { GenericPaymentOperation } from "./GenericPaymentOperation";
3
4
  import { ProviderCardTransactionOperation } from "./ProviderCardTransactionOperation";
4
5
  import { ProviderTransferTransactionOperation } from "./ProviderTransferTransactionOperation";
5
- export type PaymentOperation = GenericPaymentOperation | ProviderTransferTransactionOperation | ProviderCardTransactionOperation;
6
+ export type PaymentOperation = AbstractPaymentOperation | GenericPaymentOperation | ProviderTransferTransactionOperation | ProviderCardTransactionOperation;
6
7
  export declare namespace PaymentOperation {
7
- const type: isly.Type<GenericPaymentOperation | ProviderCardTransactionOperation | ProviderTransferTransactionOperation>;
8
- const is: (value: any | (GenericPaymentOperation | ProviderCardTransactionOperation | ProviderTransferTransactionOperation)) => value is GenericPaymentOperation | ProviderCardTransactionOperation | ProviderTransferTransactionOperation;
8
+ const type: isly.Type<AbstractPaymentOperation | GenericPaymentOperation | ProviderCardTransactionOperation | ProviderTransferTransactionOperation>;
9
+ const is: (value: any | (AbstractPaymentOperation | GenericPaymentOperation | ProviderCardTransactionOperation | ProviderTransferTransactionOperation)) => value is AbstractPaymentOperation | GenericPaymentOperation | ProviderCardTransactionOperation | ProviderTransferTransactionOperation;
9
10
  }
@@ -1,10 +1,11 @@
1
1
  import { isly } from "isly";
2
+ import { AbstractPaymentOperation } from "./AbstractPaymentOperation";
2
3
  import { GenericPaymentOperation } from "./GenericPaymentOperation";
3
4
  import { ProviderCardTransactionOperation } from "./ProviderCardTransactionOperation";
4
5
  import { ProviderTransferTransactionOperation } from "./ProviderTransferTransactionOperation";
5
6
  export var PaymentOperation;
6
7
  (function (PaymentOperation) {
7
- PaymentOperation.type = isly.union(GenericPaymentOperation.type, ProviderTransferTransactionOperation.type, ProviderCardTransactionOperation.type);
8
+ PaymentOperation.type = isly.union(AbstractPaymentOperation.type, GenericPaymentOperation.type, ProviderTransferTransactionOperation.type, ProviderCardTransactionOperation.type);
8
9
  PaymentOperation.is = PaymentOperation.type.is;
9
10
  })(PaymentOperation || (PaymentOperation = {}));
10
11
  //# sourceMappingURL=PaymentOperation.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"PaymentOperation.js","sourceRoot":"../","sources":["model/PaymentOperation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAA;AACrF,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAA;AAO7F,MAAM,KAAW,gBAAgB,CAOhC;AAPD,WAAiB,gBAAgB;IACnB,qBAAI,GAAG,IAAI,CAAC,KAAK,CAC7B,uBAAuB,CAAC,IAAI,EAC5B,oCAAoC,CAAC,IAAI,EACzC,gCAAgC,CAAC,IAAI,CACrC,CAAA;IACY,mBAAE,GAAG,iBAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAPgB,gBAAgB,KAAhB,gBAAgB,QAOhC"}
1
+ {"version":3,"file":"PaymentOperation.js","sourceRoot":"../","sources":["model/PaymentOperation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAC3B,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAA;AACrE,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAA;AACnE,OAAO,EAAE,gCAAgC,EAAE,MAAM,oCAAoC,CAAA;AACrF,OAAO,EAAE,oCAAoC,EAAE,MAAM,wCAAwC,CAAA;AAQ7F,MAAM,KAAW,gBAAgB,CAQhC;AARD,WAAiB,gBAAgB;IACnB,qBAAI,GAAG,IAAI,CAAC,KAAK,CAC7B,wBAAwB,CAAC,IAAI,EAC7B,uBAAuB,CAAC,IAAI,EAC5B,oCAAoC,CAAC,IAAI,EACzC,gCAAgC,CAAC,IAAI,CACrC,CAAA;IACY,mBAAE,GAAG,iBAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EARgB,gBAAgB,KAAhB,gBAAgB,QAQhC"}
@@ -1,15 +1,18 @@
1
1
  import { isly } from "isly"
2
+ import { AbstractPaymentOperation } from "./AbstractPaymentOperation"
2
3
  import { GenericPaymentOperation } from "./GenericPaymentOperation"
3
4
  import { ProviderCardTransactionOperation } from "./ProviderCardTransactionOperation"
4
5
  import { ProviderTransferTransactionOperation } from "./ProviderTransferTransactionOperation"
5
6
 
6
7
  export type PaymentOperation =
8
+ | AbstractPaymentOperation
7
9
  | GenericPaymentOperation
8
10
  | ProviderTransferTransactionOperation
9
11
  | ProviderCardTransactionOperation
10
12
 
11
13
  export namespace PaymentOperation {
12
14
  export const type = isly.union(
15
+ AbstractPaymentOperation.type,
13
16
  GenericPaymentOperation.type,
14
17
  ProviderTransferTransactionOperation.type,
15
18
  ProviderCardTransactionOperation.type
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/client",
3
- "version": "0.3.159",
3
+ "version": "0.3.161",
4
4
  "description": "Client library for the Pax2Pay API",
5
5
  "author": "Pax2Pay Ltd.",
6
6
  "license": "MIT",