@pax2pay/client 0.3.139 → 0.3.141

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 (73) hide show
  1. package/Client/Cards/index.ts +11 -0
  2. package/dist/Client/Cards/index.d.ts +6 -0
  3. package/dist/Client/Cards/index.js +6 -0
  4. package/dist/Client/Cards/index.js.map +1 -1
  5. package/dist/index.d.ts +2 -2
  6. package/dist/index.js +2 -2
  7. package/dist/index.js.map +1 -1
  8. package/dist/model/CardResponse.d.ts +2 -2
  9. package/dist/model/CardResponse.js +2 -2
  10. package/dist/model/CardResponse.js.map +1 -1
  11. package/dist/model/CardResponseV2.d.ts +3 -2
  12. package/dist/model/CardResponseV2.js +3 -2
  13. package/dist/model/CardResponseV2.js.map +1 -1
  14. package/dist/model/CardResponseV3.d.ts +2 -2
  15. package/dist/model/CardResponseV3.js +2 -2
  16. package/dist/model/CardResponseV3.js.map +1 -1
  17. package/dist/model/CardSearch.d.ts +2 -2
  18. package/dist/model/CardUsage.d.ts +6 -3
  19. package/dist/model/CardUsage.js +17 -1
  20. package/dist/model/CardUsage.js.map +1 -1
  21. package/dist/model/CreateCardRequest.d.ts +8 -5
  22. package/dist/model/EditCloseDateRequest.d.ts +8 -0
  23. package/dist/model/EditCloseDateRequest.js +10 -0
  24. package/dist/model/EditCloseDateRequest.js.map +1 -0
  25. package/dist/model/OrganisationConfig.d.ts +2 -2
  26. package/dist/model/OrganisationConfig.js +2 -2
  27. package/dist/model/OrganisationConfig.js.map +1 -1
  28. package/dist/model/PaymentCardCreateRequest.d.ts +2 -2
  29. package/dist/model/PaymentCardCreateRequest.js +2 -2
  30. package/dist/model/PaymentCardCreateRequest.js.map +1 -1
  31. package/dist/model/PaymentDeliveryResponse.d.ts +2 -2
  32. package/dist/model/PaymentDeliveryResponse.js +2 -2
  33. package/dist/model/PaymentDeliveryResponse.js.map +1 -1
  34. package/dist/model/PaymentDeliveryStatus.d.ts +10 -0
  35. package/dist/model/PaymentDeliveryStatus.js +26 -0
  36. package/dist/model/PaymentDeliveryStatus.js.map +1 -0
  37. package/dist/model/PaymentMethodType.d.ts +5 -4
  38. package/dist/model/PaymentMethodType.js +4 -5
  39. package/dist/model/PaymentMethodType.js.map +1 -1
  40. package/dist/model/PaymentSearch.d.ts +14 -0
  41. package/dist/model/PaymentSearch.js +14 -0
  42. package/dist/model/PaymentSearch.js.map +1 -1
  43. package/dist/model/Usage.d.ts +7 -0
  44. package/dist/model/Usage.js +8 -0
  45. package/dist/model/Usage.js.map +1 -0
  46. package/dist/model/index.d.ts +4 -3
  47. package/dist/model/index.js +4 -3
  48. package/dist/model/index.js.map +1 -1
  49. package/index.ts +7 -5
  50. package/model/CardResponse.ts +3 -3
  51. package/model/CardResponseV2.ts +5 -3
  52. package/model/CardResponseV3.ts +3 -3
  53. package/model/CardSearch.ts +2 -2
  54. package/model/CardUsage.ts +21 -2
  55. package/model/CreateCardRequest.ts +8 -5
  56. package/model/EditCloseDateRequest.ts +12 -0
  57. package/model/OrganisationConfig.ts +3 -3
  58. package/model/PaymentCardCreateRequest.ts +3 -3
  59. package/model/PaymentDeliveryResponse.ts +3 -3
  60. package/model/PaymentDeliveryStatus.ts +32 -0
  61. package/model/PaymentMethodType.ts +6 -5
  62. package/model/PaymentSearch.ts +24 -0
  63. package/model/Usage.ts +9 -0
  64. package/model/index.ts +6 -4
  65. package/package.json +1 -1
  66. package/dist/model/PaymentCardUsage.d.ts +0 -6
  67. package/dist/model/PaymentCardUsage.js +0 -7
  68. package/dist/model/PaymentCardUsage.js.map +0 -1
  69. package/dist/model/PaymentDeliveryState.d.ts +0 -6
  70. package/dist/model/PaymentDeliveryState.js +0 -7
  71. package/dist/model/PaymentDeliveryState.js.map +0 -1
  72. package/model/PaymentCardUsage.ts +0 -8
  73. package/model/PaymentDeliveryState.ts +0 -8
@@ -3,17 +3,17 @@ import { isly } from "isly"
3
3
  import { ApprovalNotificationConfig } from "./ApprovalNotificationConfig"
4
4
  import { CardDeliveryEmailConfig } from "./CardDeliveryEmailConfig"
5
5
  import { CardTypesConfig } from "./CardTypesConfig"
6
- import { CardUsage } from "./CardUsage"
7
6
  import { FundingAccountInboundTransferNotificationConfig } from "./FundingAccountInboundTransferNotificationConfig"
8
7
  import { FundingLimitConfig } from "./FundingLimitConfig"
9
8
  import { ProviderCode } from "./ProviderCode"
10
9
  import { SecurityConfig } from "./SecurityConfig"
10
+ import { Usage } from "./Usage"
11
11
  /**
12
12
  * Organisation config, optional
13
13
  */
14
14
  export interface OrganisationConfig {
15
15
  showDefaultRolesets?: boolean
16
- defaultModulrUsage?: CardUsage
16
+ defaultModulrUsage?: Usage
17
17
  defaultExpiryMonthDelta?: number
18
18
  defaultExpiryMonthDeltaPerCurrency?: Partial<Record<Currency, number>>
19
19
  defaultPortalCardType?: Partial<Record<ProviderCode, string>>
@@ -31,7 +31,7 @@ export namespace OrganisationConfig {
31
31
  const currencyType = isly.fromIs<Currency>("Currency", Currency.is)
32
32
  export const type = isly.object<OrganisationConfig>({
33
33
  showDefaultRolesets: isly.boolean().optional(),
34
- defaultModulrUsage: CardUsage.type.optional(),
34
+ defaultModulrUsage: Usage.type.optional(),
35
35
  defaultExpiryMonthDelta: isly.number().optional(),
36
36
  defaultExpiryMonthDeltaPerCurrency: isly.record(currencyType, isly.number()).optional(),
37
37
  defaultPortalCardType: isly.record(ProviderCode.type, isly.string()).optional(),
@@ -1,16 +1,16 @@
1
1
  import { isly } from "isly"
2
- import { PaymentCardUsage } from "./PaymentCardUsage"
2
+ import { CardUsage } from "./CardUsage"
3
3
 
4
4
  export interface PaymentCardCreateRequest {
5
5
  cardType: string
6
6
  expires?: string
7
- usage?: PaymentCardUsage
7
+ usage?: CardUsage
8
8
  }
9
9
  export namespace PaymentCardCreateRequest {
10
10
  export const type = isly.object<PaymentCardCreateRequest>({
11
11
  cardType: isly.string(),
12
12
  expires: isly.string().optional(),
13
- usage: isly.fromIs("CardUsage", PaymentCardUsage.is).optional(),
13
+ usage: CardUsage.type.optional(),
14
14
  })
15
15
  export const is = type.is
16
16
  }
@@ -1,6 +1,6 @@
1
1
  import { Date, DateTime } from "isoly"
2
2
  import { isly } from "isly"
3
- import { PaymentDeliveryState } from "./PaymentDeliveryState"
3
+ import { PaymentDeliveryStatus } from "./PaymentDeliveryStatus"
4
4
 
5
5
  export interface PaymentDeliveryResponse {
6
6
  type: string
@@ -8,7 +8,7 @@ export interface PaymentDeliveryResponse {
8
8
  message: string
9
9
  lapses: Date
10
10
  sent?: DateTime
11
- state: PaymentDeliveryState
11
+ state: PaymentDeliveryStatus
12
12
  reason?: string
13
13
  }
14
14
  export namespace PaymentDeliveryResponse {
@@ -18,7 +18,7 @@ export namespace PaymentDeliveryResponse {
18
18
  message: isly.string(),
19
19
  lapses: isly.fromIs("Date", Date.is),
20
20
  sent: isly.fromIs("DateTime", DateTime.is).optional(),
21
- state: isly.fromIs("PaymentDeliveryState", PaymentDeliveryState.is),
21
+ state: PaymentDeliveryStatus.type,
22
22
  reason: isly.string().optional(),
23
23
  })
24
24
  export const is = type.is
@@ -0,0 +1,32 @@
1
+ import { isly } from "isly"
2
+ import { DeliveryStatus } from "./DeliveryStatus"
3
+
4
+ export type PaymentDeliveryStatus = typeof PaymentDeliveryStatus.values[number]
5
+
6
+ export namespace PaymentDeliveryStatus {
7
+ export const values = ["success", "failure", "todo", "pending", "declined"] as const
8
+ export const type = isly.string(values)
9
+ export const is = type.is
10
+ export const toDeliveryStatus = (value: PaymentDeliveryStatus): DeliveryStatus => {
11
+ return (
12
+ {
13
+ success: "SUCCESS",
14
+ failure: "FAILURE",
15
+ todo: "TODO",
16
+ pending: "PENDING",
17
+ declined: "CARD_DECLINED",
18
+ } as const
19
+ )[value]
20
+ }
21
+ export const fromDeliveryStatus = (value: DeliveryStatus): PaymentDeliveryStatus => {
22
+ return (
23
+ {
24
+ SUCCESS: "success",
25
+ FAILURE: "failure",
26
+ TODO: "todo",
27
+ PENDING: "pending",
28
+ CARD_DECLINED: "declined",
29
+ } as const
30
+ )[value]
31
+ }
32
+ }
@@ -1,8 +1,9 @@
1
- const paymentMethodTypes = ["card", "transfer"] as const
2
- export type PaymentMethodType = typeof paymentMethodTypes[number]
1
+ import { isly } from "isly"
2
+
3
+ export type PaymentMethodType = typeof PaymentMethodType.values[number]
3
4
 
4
5
  export namespace PaymentMethodType {
5
- export function is(value: unknown): value is PaymentMethodType {
6
- return typeof value == "string" && paymentMethodTypes.includes(value as PaymentMethodType)
7
- }
6
+ export const values = ["card", "transfer"] as const
7
+ export const type = isly.string<PaymentMethodType>(values)
8
+ export const is = type.is
8
9
  }
@@ -1,18 +1,32 @@
1
1
  import * as isoly from "isoly"
2
2
  import { isly } from "isly"
3
+ import { CardUsage } from "./CardUsage"
4
+ import { PaymentDeliveryStatus } from "./PaymentDeliveryStatus"
5
+ import { PaymentMethodType } from "./PaymentMethodType"
3
6
  import { PaymentStatus } from "./PaymentStatus"
4
7
  import { ProviderCode } from "./ProviderCode"
8
+ import { Range } from "./Range"
5
9
 
6
10
  export interface PaymentSearch {
7
11
  fuzzySearch?: string
8
12
  status?: PaymentStatus[]
13
+ method?: PaymentMethodType
9
14
  createdBy?: string[]
10
15
  personallyApprovable?: boolean
11
16
  paymentId?: string[]
12
17
  cardId?: string[]
13
18
  merchantId?: string[]
19
+ accountId?: string[]
14
20
  providerCode?: ProviderCode[]
15
21
  currency?: isoly.Currency[]
22
+ createdOn?: Range<isoly.DateTime>
23
+ initiationDate?: Range<isoly.Date>
24
+ metadataFormatName?: string[]
25
+ total?: Range<number>
26
+ deliveryStatus?: PaymentDeliveryStatus[]
27
+ cardExpiry?: Range<isoly.Date>
28
+ cardNumber?: string
29
+ cardUsage?: CardUsage
16
30
  includeCount?: boolean
17
31
  onlyCount?: boolean
18
32
  }
@@ -20,13 +34,23 @@ export namespace PaymentSearch {
20
34
  export const type = isly.object<PaymentSearch>({
21
35
  fuzzySearch: isly.string().optional(),
22
36
  status: PaymentStatus.type.array().optional(),
37
+ method: PaymentMethodType.type.optional(),
23
38
  createdBy: isly.string().array().optional(),
24
39
  personallyApprovable: isly.boolean().optional(),
25
40
  paymentId: isly.string().array().optional(),
26
41
  cardId: isly.string().array().optional(),
27
42
  merchantId: isly.string().array().optional(),
43
+ accountId: isly.string().array().optional(),
28
44
  providerCode: ProviderCode.type.array().optional(),
29
45
  currency: isly.array(isly.fromIs("Currency", isoly.Currency.is)).optional(),
46
+ createdOn: Range.type.optional(),
47
+ initiationDate: Range.type.optional(),
48
+ metadataFormatName: isly.string().array().optional(),
49
+ total: Range.type.optional(),
50
+ deliveryStatus: PaymentDeliveryStatus.type.array().optional(),
51
+ cardExpiry: Range.type.optional(),
52
+ cardNumber: isly.string().optional(),
53
+ cardUsage: CardUsage.type.optional(),
30
54
  includeCount: isly.boolean().optional(),
31
55
  onlyCount: isly.boolean().optional(),
32
56
  })
package/model/Usage.ts ADDED
@@ -0,0 +1,9 @@
1
+ import { isly } from "isly"
2
+
3
+ export type Usage = typeof Usage.values[number]
4
+
5
+ export namespace Usage {
6
+ export const values = ["SINGLE_USE", "MULTIPLE_USE", "SINGLE_USE_ALLOW_TEST_AUTH"] as const
7
+ export const type = isly.string<Usage>(values)
8
+ export const is = type.is
9
+ }
package/model/index.ts CHANGED
@@ -75,6 +75,7 @@ import { Criteria } from "./Criteria"
75
75
  import { CurrencyConversionRequest } from "./CurrencyConversionRequest"
76
76
  import { CurrencyConversionResponse } from "./CurrencyConversionResponse"
77
77
  import { DeliveryStatus } from "./DeliveryStatus"
78
+ import { EditCloseDateRequest } from "./EditCloseDateRequest"
78
79
  import { EmailValidationResponse } from "./EmailValidationResponse"
79
80
  import { ErrorMessageDto } from "./ErrorMessageDto"
80
81
  import { ErrorResponse } from "./ErrorResponse"
@@ -144,10 +145,9 @@ import { PaymentAccountState } from "./PaymentAccountState"
144
145
  import { PaymentAmountScheduleRequest } from "./PaymentAmountScheduleRequest"
145
146
  import { PaymentAmountScheduleResponse } from "./PaymentAmountScheduleResponse"
146
147
  import { PaymentCardCreateRequest } from "./PaymentCardCreateRequest"
147
- import { PaymentCardUsage } from "./PaymentCardUsage"
148
148
  import { PaymentDeliveryRequest } from "./PaymentDeliveryRequest"
149
149
  import { PaymentDeliveryResponse } from "./PaymentDeliveryResponse"
150
- import { PaymentDeliveryState } from "./PaymentDeliveryState"
150
+ import { PaymentDeliveryStatus } from "./PaymentDeliveryStatus"
151
151
  import { PaymentMerchantRequest } from "./PaymentMerchantRequest"
152
152
  import { PaymentMethodType } from "./PaymentMethodType"
153
153
  import { PaymentRequest } from "./PaymentRequest"
@@ -213,6 +213,7 @@ import { UpdateBeneficiaryRequest } from "./UpdateBeneficiaryRequest"
213
213
  import { UpdateCardTypeProfileRequest } from "./UpdateCardTypeProfileRequest"
214
214
  import { UpdateCategoryRequest } from "./UpdateCategoryRequest"
215
215
  import { UpdateRolesetRequest } from "./UpdateRolesetRequest"
216
+ import { Usage } from "./Usage"
216
217
  import { UserChangeRequest } from "./UserChangeRequest"
217
218
  import { UserConfig } from "./UserConfig"
218
219
  import { UserLimitsDeleteRequest } from "./UserLimitsDeleteRequest"
@@ -305,6 +306,7 @@ export {
305
306
  CurrencyConversionRequest,
306
307
  CurrencyConversionResponse,
307
308
  DeliveryStatus,
309
+ EditCloseDateRequest,
308
310
  EmailValidationResponse,
309
311
  ErrorMessageDto,
310
312
  ErrorResponse,
@@ -374,10 +376,9 @@ export {
374
376
  PaymentAmountScheduleRequest,
375
377
  PaymentAmountScheduleResponse,
376
378
  PaymentCardCreateRequest,
377
- PaymentCardUsage,
378
379
  PaymentDeliveryRequest,
379
380
  PaymentDeliveryResponse,
380
- PaymentDeliveryState,
381
+ PaymentDeliveryStatus,
381
382
  PaymentMerchantRequest,
382
383
  PaymentMethodType,
383
384
  PaymentRequest,
@@ -443,6 +444,7 @@ export {
443
444
  UpdateBeneficiaryRequest,
444
445
  UpdateCardTypeProfileRequest,
445
446
  UpdateRolesetRequest,
447
+ Usage,
446
448
  UserChangeRequest,
447
449
  UserConfig,
448
450
  UserLimitsDeleteRequest,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pax2pay/client",
3
- "version": "0.3.139",
3
+ "version": "0.3.141",
4
4
  "description": "Client library for the Pax2Pay API",
5
5
  "author": "Pax2Pay Ltd.",
6
6
  "license": "MIT",
@@ -1,6 +0,0 @@
1
- import { isly } from "isly";
2
- export type PaymentCardUsage = "single" | "multiple" | "single allow test auth";
3
- export declare namespace PaymentCardUsage {
4
- const type: isly.Type<"multiple" | "single" | "single allow test auth">;
5
- const is: (value: any | ("multiple" | "single" | "single allow test auth")) => value is "multiple" | "single" | "single allow test auth";
6
- }
@@ -1,7 +0,0 @@
1
- import { isly } from "isly";
2
- export var PaymentCardUsage;
3
- (function (PaymentCardUsage) {
4
- PaymentCardUsage.type = isly.string(["single", "multiple", "single allow test auth"]);
5
- PaymentCardUsage.is = PaymentCardUsage.type.is;
6
- })(PaymentCardUsage || (PaymentCardUsage = {}));
7
- //# sourceMappingURL=PaymentCardUsage.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PaymentCardUsage.js","sourceRoot":"../","sources":["model/PaymentCardUsage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,MAAM,KAAW,gBAAgB,CAGhC;AAHD,WAAiB,gBAAgB;IACnB,qBAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,QAAQ,EAAE,UAAU,EAAE,wBAAwB,CAAC,CAAC,CAAA;IACpE,mBAAE,GAAG,iBAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAHgB,gBAAgB,KAAhB,gBAAgB,QAGhC"}
@@ -1,6 +0,0 @@
1
- import { isly } from "isly";
2
- export type PaymentDeliveryState = "success" | "failure" | "todo" | "pending" | "card declined";
3
- export declare namespace PaymentDeliveryState {
4
- const type: isly.Type<"pending" | "success" | "failure" | "todo" | "card declined">;
5
- const is: (value: any | ("pending" | "success" | "failure" | "todo" | "card declined")) => value is "pending" | "success" | "failure" | "todo" | "card declined";
6
- }
@@ -1,7 +0,0 @@
1
- import { isly } from "isly";
2
- export var PaymentDeliveryState;
3
- (function (PaymentDeliveryState) {
4
- PaymentDeliveryState.type = isly.string(["success", "failure", "todo", "pending", "card declined"]);
5
- PaymentDeliveryState.is = PaymentDeliveryState.type.is;
6
- })(PaymentDeliveryState || (PaymentDeliveryState = {}));
7
- //# sourceMappingURL=PaymentDeliveryState.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"PaymentDeliveryState.js","sourceRoot":"../","sources":["model/PaymentDeliveryState.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,MAAM,CAAA;AAI3B,MAAM,KAAW,oBAAoB,CAGpC;AAHD,WAAiB,oBAAoB;IACvB,yBAAI,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,SAAS,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,eAAe,CAAC,CAAC,CAAA;IAC9E,uBAAE,GAAG,qBAAA,IAAI,CAAC,EAAE,CAAA;AAC1B,CAAC,EAHgB,oBAAoB,KAApB,oBAAoB,QAGpC"}
@@ -1,8 +0,0 @@
1
- import { isly } from "isly"
2
-
3
- export type PaymentCardUsage = "single" | "multiple" | "single allow test auth"
4
-
5
- export namespace PaymentCardUsage {
6
- export const type = isly.string(["single", "multiple", "single allow test auth"])
7
- export const is = type.is
8
- }
@@ -1,8 +0,0 @@
1
- import { isly } from "isly"
2
-
3
- export type PaymentDeliveryState = "success" | "failure" | "todo" | "pending" | "card declined"
4
-
5
- export namespace PaymentDeliveryState {
6
- export const type = isly.string(["success", "failure", "todo", "pending", "card declined"])
7
- export const is = type.is
8
- }