@mft/moneyhub-api-client 6.1.1 → 6.1.2
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.
|
@@ -1,14 +1,24 @@
|
|
|
1
1
|
import { ApiResponse, ExtraOptions } from "../../request";
|
|
2
2
|
import { RequestPayee } from "../../schema/payee";
|
|
3
3
|
import { PayLink, PayLinkSearchParams } from "../../schema/pay-link";
|
|
4
|
-
|
|
4
|
+
interface PayLinkPost {
|
|
5
5
|
widgetId: string;
|
|
6
|
-
payeeId?: string;
|
|
7
|
-
amount?: number;
|
|
8
|
-
payee?: RequestPayee;
|
|
9
6
|
reference: string;
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
amount: number;
|
|
8
|
+
endToEndId?: string;
|
|
9
|
+
useOnce?: boolean;
|
|
10
|
+
expiresAt?: string;
|
|
11
|
+
}
|
|
12
|
+
interface PayLinkPostWithPayeeId extends PayLinkPost {
|
|
13
|
+
payeeId: string;
|
|
14
|
+
payee?: never;
|
|
15
|
+
}
|
|
16
|
+
interface PayLinkPostWithPayee extends PayLinkPost {
|
|
17
|
+
payee: RequestPayee;
|
|
18
|
+
payeeId?: never;
|
|
19
|
+
}
|
|
20
|
+
declare type PayLinkPostBody = PayLinkPostWithPayeeId | PayLinkPostWithPayee;
|
|
21
|
+
export declare type AddPayLink = (body: PayLinkPostBody, options?: ExtraOptions) => Promise<ApiResponse<PayLink>>;
|
|
12
22
|
export declare type GetPayLink = ({ id }: {
|
|
13
23
|
id: string;
|
|
14
24
|
}, options?: ExtraOptions) => Promise<ApiResponse<PayLink>>;
|
|
@@ -18,4 +28,5 @@ export interface PayLinksRequests {
|
|
|
18
28
|
getPayLink: GetPayLink;
|
|
19
29
|
getPayLinks: GetPayLinks;
|
|
20
30
|
}
|
|
31
|
+
export {};
|
|
21
32
|
//# sourceMappingURL=pay-links.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pay-links.d.ts","sourceRoot":"","sources":["../../../src/requests/types/pay-links.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,YAAY,EAAC,MAAM,eAAe,CAAA;AACvD,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EAAC,OAAO,EAAE,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AAElE,
|
|
1
|
+
{"version":3,"file":"pay-links.d.ts","sourceRoot":"","sources":["../../../src/requests/types/pay-links.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,WAAW,EAAE,YAAY,EAAC,MAAM,eAAe,CAAA;AACvD,OAAO,EAAC,YAAY,EAAC,MAAM,oBAAoB,CAAA;AAC/C,OAAO,EAAC,OAAO,EAAE,mBAAmB,EAAC,MAAM,uBAAuB,CAAA;AAElE,UAAU,WAAW;IACnB,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,UAAU,sBAAuB,SAAQ,WAAW;IAClD,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,CAAC,EAAE,KAAK,CAAA;CACb;AAEF,UAAU,oBAAqB,SAAQ,WAAW;IAChD,KAAK,EAAE,YAAY,CAAA;IACnB,OAAO,CAAC,EAAE,KAAK,CAAA;CAChB;AAED,aAAK,eAAe,GAAG,sBAAsB,GAAG,oBAAoB,CAAA;AAEpE,oBAAY,UAAU,GAAG,CACvB,IAAI,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,YAAY,KACnB,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAA;AAElC,oBAAY,UAAU,GAAG,CACvB,EAAC,EAAE,EAAC,EAAE;IAAC,EAAE,EAAE,MAAM,CAAA;CAAC,EAClB,OAAO,CAAC,EAAE,YAAY,KACnB,OAAO,CAAC,WAAW,CAAC,OAAO,CAAC,CAAC,CAAA;AAElC,oBAAY,WAAW,GAAG,CACxB,MAAM,CAAC,EAAE,mBAAmB,EAC5B,OAAO,CAAC,EAAE,YAAY,KACnB,OAAO,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC,CAAC,CAAA;AAEpC,MAAM,WAAW,gBAAgB;IAC/B,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,UAAU,CAAA;IACtB,WAAW,EAAE,WAAW,CAAA;CACzB"}
|
|
@@ -2,17 +2,21 @@ import { SearchParams } from "../request";
|
|
|
2
2
|
export interface PayLinkSearchParams extends SearchParams {
|
|
3
3
|
widgetId?: string;
|
|
4
4
|
payeeId?: string;
|
|
5
|
+
isActive?: boolean;
|
|
5
6
|
}
|
|
6
7
|
export interface PayLink {
|
|
7
8
|
id: string;
|
|
8
9
|
clientId: string;
|
|
10
|
+
widgetId: string;
|
|
9
11
|
payeeId: string;
|
|
10
12
|
reference: string;
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
expiry?: string;
|
|
14
|
-
endToEndId?: string;
|
|
13
|
+
amount: number;
|
|
14
|
+
useOnce: boolean;
|
|
15
15
|
createdAt: string;
|
|
16
16
|
updatedAt: string;
|
|
17
|
+
archivedAt: string | null;
|
|
18
|
+
usedAt: string | null;
|
|
19
|
+
endToEndId: string | null;
|
|
20
|
+
expiresAt: string | null;
|
|
17
21
|
}
|
|
18
22
|
//# sourceMappingURL=pay-link.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"pay-link.d.ts","sourceRoot":"","sources":["../../src/schema/pay-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAEvC,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;
|
|
1
|
+
{"version":3,"file":"pay-link.d.ts","sourceRoot":"","sources":["../../src/schema/pay-link.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,YAAY,EAAC,MAAM,YAAY,CAAA;AAEvC,MAAM,WAAW,mBAAoB,SAAQ,YAAY;IACvD,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,MAAM,WAAW,OAAO;IACtB,EAAE,EAAE,MAAM,CAAA;IACV,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,OAAO,EAAE,MAAM,CAAA;IACf,SAAS,EAAE,MAAM,CAAA;IACjB,MAAM,EAAE,MAAM,CAAA;IACd,OAAO,EAAE,OAAO,CAAA;IAChB,SAAS,EAAE,MAAM,CAAA;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,UAAU,EAAE,MAAM,GAAG,IAAI,CAAA;IACzB,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;CACzB"}
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -80,7 +80,7 @@ This module exposes a single factory function that accepts the following configu
|
|
|
80
80
|
```javascript
|
|
81
81
|
const {Moneyhub} = require("@mft/moneyhub-api-client")
|
|
82
82
|
const moneyhub = await Moneyhub({
|
|
83
|
-
resourceServerUrl: "https://api.moneyhub.co.uk/
|
|
83
|
+
resourceServerUrl: "https://api.moneyhub.co.uk/v3",
|
|
84
84
|
identityServiceUrl: "https://identity.moneyhub.co.uk",
|
|
85
85
|
options: { // optional
|
|
86
86
|
timeout: 60000
|
|
@@ -1601,8 +1601,10 @@ const paymentData = await moneyhub.addPayLink({
|
|
|
1601
1601
|
payee: "Details of payee to create", // required or payeeId
|
|
1602
1602
|
payerId: "Id of payer", // required or payee
|
|
1603
1603
|
amount: "Amount in pence to authorize payment", // required
|
|
1604
|
-
expiry: "ISO Date-time string for pay-link expiry"
|
|
1605
1604
|
reference: "Payee reference", // required
|
|
1605
|
+
expiresAt: "ISO Date-time string for pay-link expiry", // optional
|
|
1606
|
+
endToEndId: "Unique identifier relevant to the transaction", // optional
|
|
1607
|
+
useOnce: "Boolean to indicate if the pay-link can only be consumed once." // optional
|
|
1606
1608
|
});
|
|
1607
1609
|
```
|
|
1608
1610
|
|