@pax2pay/client 0.0.68 → 0.0.71

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.
@@ -37,7 +37,10 @@ export class Cards extends List<
37
37
  return new Cards(connection)
38
38
  }
39
39
  async getCard(providerCardId: string, providerCode: model.ProviderCode) {
40
- const result = await this.connection.get<model.CardResponse>(`cards/virtual/${providerCode}/${providerCardId}`)
40
+ const result = await this.connection.get<
41
+ model.CardResponse
42
+ >(`cards/virtual/${providerCode}/${providerCardId}?includeSchedules=true
43
+ `)
41
44
  return model.ErrorResponse.is(result) ? result : this.mapLegacy(result)
42
45
  }
43
46
  async getCardTypes(providerCode: model.ProviderCode) {
@@ -51,4 +54,9 @@ export class Cards extends List<
51
54
  )
52
55
  return result
53
56
  }
57
+ async getCardBookingInfo(providerCardId: string, providerCode: model.ProviderCode) {
58
+ const result = await this.connection.get<model.CardResponse>(`/booking-info/cards/${providerCode}/${providerCardId}
59
+ `)
60
+ return model.ErrorResponse.is(result) ? result : this.mapLegacy(result)
61
+ }
54
62
  }
@@ -25,4 +25,7 @@ export declare class Cards extends List<model.CardResponseV2 | model.CardRespons
25
25
  getFundingAccounts(searchRequest: model.FundingAccountSearchRequest): Promise<(model.ErrorResponse & {
26
26
  status: 400 | 404 | 500 | 403 | 503;
27
27
  }) | model.CardFundingAccountResponse[]>;
28
+ getCardBookingInfo(providerCardId: string, providerCode: model.ProviderCode): Promise<(model.ErrorResponse & {
29
+ status: 400 | 404 | 500 | 403 | 503;
30
+ }) | (Card & model.CardResponse)>;
28
31
  }
@@ -30,7 +30,8 @@ export class Cards extends List {
30
30
  return new Cards(connection);
31
31
  }
32
32
  async getCard(providerCardId, providerCode) {
33
- const result = await this.connection.get(`cards/virtual/${providerCode}/${providerCardId}`);
33
+ const result = await this.connection.get(`cards/virtual/${providerCode}/${providerCardId}?includeSchedules=true
34
+ `);
34
35
  return model.ErrorResponse.is(result) ? result : this.mapLegacy(result);
35
36
  }
36
37
  async getCardTypes(providerCode) {
@@ -41,5 +42,10 @@ export class Cards extends List {
41
42
  const result = await this.connection.post("funding-accounts/searches", searchRequest);
42
43
  return result;
43
44
  }
45
+ async getCardBookingInfo(providerCardId, providerCode) {
46
+ const result = await this.connection.get(`/booking-info/cards/${providerCode}/${providerCardId}
47
+ `);
48
+ return model.ErrorResponse.is(result) ? result : this.mapLegacy(result);
49
+ }
44
50
  }
45
51
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"../","sources":["Client/Cards/index.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,aAAa,CAAA;AACpC,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,OAAO,EAAE,IAAI,EAAE,MAAM,SAAS,CAAA;AAE9B,MAAM,OAAO,KAAM,SAAQ,IAK1B;IAEA,YAAY,UAAsB;QACjC,KAAK,CAAC,UAAU,CAAC,CAAA;QAFR,WAAM,GAAG,eAAe,CAAA;IAGlC,CAAC;IACS,eAAe,CAAC,QAAmD;QAC5E,OAAO,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;IAC/E,CAAC;IACS,cAAc,CAAC,QAA8B;QACtD,OAAO,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,CAAC,IAAI,CAAC,MAAM,EAAE,QAAQ,CAAC,YAAY,EAAE,QAAQ,CAAC,cAAc,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,QAAQ,CAAC,CAAA;IACpH,CAAC;IACS,GAAG,CAAC,QAA8B;QAC3C,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,IAAI,CAAC,eAAe,CAAC,QAAQ,CAAC,EAAE,QAAQ,CAAC,EAAE,QAAQ,CAAC,CAAA;IACpG,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CAAC,YAAY,CAAC,YAAgC;QAClD,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAA2B,kBAAkB,YAAY,EAAE,CAAC,CAAA;QACpG,OAAO,MAAM,CAAA;IACd,CAAC;IACD,KAAK,CAAC,kBAAkB,CAAC,aAAgD;QACxE,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,IAAI,CACxC,2BAA2B,EAC3B,aAAa,CACb,CAAA;QACD,OAAO,MAAM,CAAA;IACd,CAAC;IACD,KAAK,CAAC,kBAAkB,CAAC,cAAsB,EAAE,YAAgC;QAChF,MAAM,MAAM,GAAG,MAAM,IAAI,CAAC,UAAU,CAAC,GAAG,CAAqB,uBAAuB,YAAY,IAAI,cAAc;CACnH,CAAC,CAAA;QACA,OAAO,KAAK,CAAC,aAAa,CAAC,EAAE,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,CAAA;IACxE,CAAC;CACD"}
@@ -0,0 +1,10 @@
1
+ import * as isoly from "isoly";
2
+ export interface CardDeliveryResponse {
3
+ type: "EMAIL";
4
+ to: string | [string, string];
5
+ deliveredMessage: string;
6
+ linkExpiry: isoly.Date;
7
+ sent: string;
8
+ status: "SUCCESS" | "FAILURE" | "TODO";
9
+ statusText?: string;
10
+ }
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=CardDeliveryResponse.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"CardDeliveryResponse.js","sourceRoot":"../","sources":["model/CardDeliveryResponse.ts"],"names":[],"mappings":""}
@@ -1,5 +1,7 @@
1
1
  import { AccountResponse } from "./AccountResponse";
2
2
  import { BookingInfo } from "./BookingInfo";
3
+ import { BookingInfoResponse } from "./BookingInfoResponse";
4
+ import { CardDeliveryResponse } from "./CardDeliveryResponse";
3
5
  import { CardScheduleResponseItem } from "./CardScheduleResponseItem";
4
6
  import { CardTypeSpecification } from "./CardTypeSpecification";
5
7
  import { CardUsage } from "./CardUsage";
@@ -26,6 +28,7 @@ export interface CardResponse {
26
28
  fundingAccount?: AccountResponse;
27
29
  creatingSystem?: "PORTAL" | "REST_API" | "FAB" | "REST_API_PORTAL" | "REST_API_EXTERNAL" | "SOAP_API_FAB" | "SOAP_API_EXTERNAL" | "CRON" | "UNKNOWN" | "UNDEFINED";
28
30
  createdBy?: string;
29
- bookingInfo?: BookingInfo;
31
+ bookingInfo?: BookingInfo | BookingInfoResponse;
30
32
  schedule?: CardScheduleResponseItem[];
33
+ delivery?: CardDeliveryResponse;
31
34
  }
@@ -0,0 +1,12 @@
1
+ import * as isoly from "isoly"
2
+
3
+ export interface CardDeliveryResponse {
4
+ type: "EMAIL"
5
+ to: string | [string, string]
6
+ deliveredMessage: string
7
+ linkExpiry: isoly.Date
8
+ sent: string
9
+ status: "SUCCESS" | "FAILURE" | "TODO"
10
+ statusText?: string
11
+ }
12
+
@@ -1,5 +1,7 @@
1
1
  import { AccountResponse } from "./AccountResponse"
2
2
  import { BookingInfo } from "./BookingInfo"
3
+ import { BookingInfoResponse } from "./BookingInfoResponse"
4
+ import { CardDeliveryResponse } from "./CardDeliveryResponse"
3
5
  import { CardScheduleResponseItem } from "./CardScheduleResponseItem"
4
6
  import { CardTypeSpecification } from "./CardTypeSpecification"
5
7
  import { CardUsage } from "./CardUsage"
@@ -37,6 +39,7 @@ export interface CardResponse {
37
39
  | "UNKNOWN"
38
40
  | "UNDEFINED"
39
41
  createdBy?: string
40
- bookingInfo?: BookingInfo
42
+ bookingInfo?: BookingInfo | BookingInfoResponse
41
43
  schedule?: CardScheduleResponseItem[]
44
+ delivery?: CardDeliveryResponse
42
45
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/client",
3
- "version": "0.0.68",
3
+ "version": "0.0.71",
4
4
  "description": "Client library for the Pax2Pay API",
5
5
  "author": "Pax2Pay Ltd.",
6
6
  "license": "MIT",