@getivy/node-sdk 1.0.0 → 1.2.0
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.
- package/CHANGELOG.md +21 -0
- package/index.d.mts +6 -6
- package/index.d.ts +6 -6
- package/index.d.ts.map +1 -1
- package/index.js +6 -6
- package/index.js.map +1 -1
- package/index.mjs +6 -6
- package/index.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/data/accounts.d.ts +83 -0
- package/resources/data/accounts.d.ts.map +1 -0
- package/resources/data/accounts.js +15 -0
- package/resources/data/accounts.js.map +1 -0
- package/resources/data/accounts.mjs +11 -0
- package/resources/data/accounts.mjs.map +1 -0
- package/resources/data/balances.d.ts +48 -0
- package/resources/data/balances.d.ts.map +1 -0
- package/resources/data/balances.js +15 -0
- package/resources/data/balances.js.map +1 -0
- package/resources/data/balances.mjs +11 -0
- package/resources/data/balances.mjs.map +1 -0
- package/resources/data/consent.d.ts +80 -0
- package/resources/data/consent.d.ts.map +1 -0
- package/resources/data/consent.js +21 -0
- package/resources/data/consent.js.map +1 -0
- package/resources/data/consent.mjs +17 -0
- package/resources/data/consent.mjs.map +1 -0
- package/resources/data/data.d.ts +26 -0
- package/resources/data/data.d.ts.map +1 -0
- package/resources/data/data.js +55 -0
- package/resources/data/data.js.map +1 -0
- package/resources/data/data.mjs +28 -0
- package/resources/data/data.mjs.map +1 -0
- package/resources/data/index.d.ts +7 -0
- package/resources/data/index.d.ts.map +1 -0
- package/resources/data/index.js +17 -0
- package/resources/data/index.js.map +1 -0
- package/resources/data/index.mjs +8 -0
- package/resources/data/index.mjs.map +1 -0
- package/resources/data/session.d.ts +258 -0
- package/resources/data/session.d.ts.map +1 -0
- package/resources/data/session.js +21 -0
- package/resources/data/session.js.map +1 -0
- package/resources/data/session.mjs +17 -0
- package/resources/data/session.mjs.map +1 -0
- package/resources/data/transactions.d.ts +175 -0
- package/resources/data/transactions.d.ts.map +1 -0
- package/resources/data/transactions.js +16 -0
- package/resources/data/transactions.js.map +1 -0
- package/resources/data/transactions.mjs +12 -0
- package/resources/data/transactions.mjs.map +1 -0
- package/resources/data.d.ts +2 -0
- package/resources/data.d.ts.map +1 -0
- package/resources/data.js +19 -0
- package/resources/data.js.map +1 -0
- package/resources/data.mjs +3 -0
- package/resources/data.mjs.map +1 -0
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +5 -5
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +2 -2
- package/resources/index.mjs.map +1 -1
- package/resources/webhook/index.d.ts +3 -0
- package/resources/webhook/index.d.ts.map +1 -0
- package/resources/webhook/index.js +9 -0
- package/resources/webhook/index.js.map +1 -0
- package/resources/webhook/index.mjs +4 -0
- package/resources/webhook/index.mjs.map +1 -0
- package/resources/webhook/subscription.d.ts +152 -0
- package/resources/webhook/subscription.d.ts.map +1 -0
- package/resources/webhook/subscription.js +42 -0
- package/resources/webhook/subscription.js.map +1 -0
- package/resources/webhook/subscription.mjs +38 -0
- package/resources/webhook/subscription.mjs.map +1 -0
- package/resources/webhook/webhook.d.ts +28 -0
- package/resources/webhook/webhook.d.ts.map +1 -0
- package/resources/webhook/webhook.js +45 -0
- package/resources/webhook/webhook.js.map +1 -0
- package/resources/webhook/webhook.mjs +18 -0
- package/resources/webhook/webhook.mjs.map +1 -0
- package/resources/webhook.d.ts +2 -0
- package/resources/webhook.d.ts.map +1 -0
- package/resources/webhook.js +19 -0
- package/resources/webhook.js.map +1 -0
- package/resources/webhook.mjs +3 -0
- package/resources/webhook.mjs.map +1 -0
- package/src/index.ts +14 -26
- package/src/resources/data/accounts.ts +113 -0
- package/src/resources/data/balances.ts +60 -0
- package/src/resources/data/consent.ts +110 -0
- package/src/resources/data/data.ts +75 -0
- package/src/resources/data/index.ts +20 -0
- package/src/resources/data/session.ts +1317 -0
- package/src/resources/data/transactions.ts +235 -0
- package/src/resources/data.ts +3 -0
- package/src/resources/index.ts +2 -10
- package/src/resources/webhook/index.ts +16 -0
- package/src/resources/webhook/subscription.ts +405 -0
- package/src/resources/webhook/webhook.ts +69 -0
- package/src/resources/webhook.ts +3 -0
- package/src/version.ts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/charges.d.ts +0 -82
- package/resources/charges.d.ts.map +0 -1
- package/resources/charges.js +0 -15
- package/resources/charges.js.map +0 -1
- package/resources/charges.mjs +0 -11
- package/resources/charges.mjs.map +0 -1
- package/resources/mandates.d.ts +0 -129
- package/resources/mandates.d.ts.map +0 -1
- package/resources/mandates.js +0 -27
- package/resources/mandates.js.map +0 -1
- package/resources/mandates.mjs +0 -23
- package/resources/mandates.mjs.map +0 -1
- package/src/resources/charges.ts +0 -104
- package/src/resources/mandates.ts +0 -197
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
4
|
+
exports.Subscription = void 0;
|
|
5
|
+
const resource_1 = require("../../resource.js");
|
|
6
|
+
class Subscription extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Creates a webhook subscription that sends various events from Ivy to a specified
|
|
9
|
+
* url. There can be multiple subscriptions per app.
|
|
10
|
+
*/
|
|
11
|
+
create(body, options) {
|
|
12
|
+
return this._client.post('/api/service/webhook-subscription/create', { body, ...options });
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Updates the url or subcribed to events for a webhook subscription. This can be
|
|
16
|
+
* used via the app or via the API by providing an API key.
|
|
17
|
+
*/
|
|
18
|
+
update(body, options) {
|
|
19
|
+
return this._client.post('/api/service/webhook-subscription/update', { body, ...options });
|
|
20
|
+
}
|
|
21
|
+
/**
|
|
22
|
+
* Lists all webhook subscriptions that are registered for the merchant. The
|
|
23
|
+
* results are paginated and provided in chronological order.
|
|
24
|
+
*/
|
|
25
|
+
list(body, options) {
|
|
26
|
+
return this._client.post('/api/service/webhook-subscription/list', { body, ...options });
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Deletes a webhook subscription.
|
|
30
|
+
*/
|
|
31
|
+
delete(body, options) {
|
|
32
|
+
return this._client.post('/api/service/webhook-subscription/delete', { body, ...options });
|
|
33
|
+
}
|
|
34
|
+
/**
|
|
35
|
+
* Sends a test ping to verify webhook subscription endpoint connectivity.
|
|
36
|
+
*/
|
|
37
|
+
ping(body, options) {
|
|
38
|
+
return this._client.post('/api/service/webhook-subscription/ping', { body, ...options });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.Subscription = Subscription;
|
|
42
|
+
//# sourceMappingURL=subscription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription.js","sourceRoot":"","sources":["../../src/resources/webhook/subscription.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,gDAA6C;AAG7C,MAAa,YAAa,SAAQ,sBAAW;IAC3C;;;OAGG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;OAGG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;OAEG;IACH,IAAI,CACF,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF;AArDD,oCAqDC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
|
3
|
+
export class Subscription extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Creates a webhook subscription that sends various events from Ivy to a specified
|
|
6
|
+
* url. There can be multiple subscriptions per app.
|
|
7
|
+
*/
|
|
8
|
+
create(body, options) {
|
|
9
|
+
return this._client.post('/api/service/webhook-subscription/create', { body, ...options });
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Updates the url or subcribed to events for a webhook subscription. This can be
|
|
13
|
+
* used via the app or via the API by providing an API key.
|
|
14
|
+
*/
|
|
15
|
+
update(body, options) {
|
|
16
|
+
return this._client.post('/api/service/webhook-subscription/update', { body, ...options });
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Lists all webhook subscriptions that are registered for the merchant. The
|
|
20
|
+
* results are paginated and provided in chronological order.
|
|
21
|
+
*/
|
|
22
|
+
list(body, options) {
|
|
23
|
+
return this._client.post('/api/service/webhook-subscription/list', { body, ...options });
|
|
24
|
+
}
|
|
25
|
+
/**
|
|
26
|
+
* Deletes a webhook subscription.
|
|
27
|
+
*/
|
|
28
|
+
delete(body, options) {
|
|
29
|
+
return this._client.post('/api/service/webhook-subscription/delete', { body, ...options });
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Sends a test ping to verify webhook subscription endpoint connectivity.
|
|
33
|
+
*/
|
|
34
|
+
ping(body, options) {
|
|
35
|
+
return this._client.post('/api/service/webhook-subscription/ping', { body, ...options });
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
//# sourceMappingURL=subscription.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subscription.mjs","sourceRoot":"","sources":["../../src/resources/webhook/subscription.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;OAGG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;OAGG;IACH,IAAI,CACF,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED;;OAEG;IACH,MAAM,CACJ,IAA8B,EAC9B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;OAEG;IACH,IAAI,CACF,IAA4B,EAC5B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
import { APIResource } from "../../resource.js";
|
|
2
|
+
import * as Core from "../../core.js";
|
|
3
|
+
import * as SubscriptionAPI from "./subscription.js";
|
|
4
|
+
import { Subscription, SubscriptionCreateParams, SubscriptionCreateResponse, SubscriptionDeleteParams, SubscriptionDeleteResponse, SubscriptionListParams, SubscriptionListResponse, SubscriptionPingParams, SubscriptionPingResponse, SubscriptionUpdateParams, SubscriptionUpdateResponse } from "./subscription.js";
|
|
5
|
+
export declare class Webhook extends APIResource {
|
|
6
|
+
subscription: SubscriptionAPI.Subscription;
|
|
7
|
+
/**
|
|
8
|
+
* This endpoint allows you to trigger a specific webhook by its ID.
|
|
9
|
+
*/
|
|
10
|
+
trigger(body: WebhookTriggerParams, options?: Core.RequestOptions): Core.APIPromise<WebhookTriggerResponse>;
|
|
11
|
+
}
|
|
12
|
+
export interface WebhookTriggerResponse {
|
|
13
|
+
/**
|
|
14
|
+
* Indicates whether the webhook was successfully triggered
|
|
15
|
+
*/
|
|
16
|
+
success: boolean;
|
|
17
|
+
}
|
|
18
|
+
export interface WebhookTriggerParams {
|
|
19
|
+
/**
|
|
20
|
+
* The unique identifier for the webhook to trigger.
|
|
21
|
+
*/
|
|
22
|
+
id: unknown;
|
|
23
|
+
}
|
|
24
|
+
export declare namespace Webhook {
|
|
25
|
+
export { type WebhookTriggerResponse as WebhookTriggerResponse, type WebhookTriggerParams as WebhookTriggerParams, };
|
|
26
|
+
export { Subscription as Subscription, type SubscriptionCreateResponse as SubscriptionCreateResponse, type SubscriptionUpdateResponse as SubscriptionUpdateResponse, type SubscriptionListResponse as SubscriptionListResponse, type SubscriptionDeleteResponse as SubscriptionDeleteResponse, type SubscriptionPingResponse as SubscriptionPingResponse, type SubscriptionCreateParams as SubscriptionCreateParams, type SubscriptionUpdateParams as SubscriptionUpdateParams, type SubscriptionListParams as SubscriptionListParams, type SubscriptionDeleteParams as SubscriptionDeleteParams, type SubscriptionPingParams as SubscriptionPingParams, };
|
|
27
|
+
}
|
|
28
|
+
//# sourceMappingURL=webhook.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../src/resources/webhook/webhook.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,KAAK,IAAI,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,eAAe,MAAM,gBAAgB,CAAC;AAClD,OAAO,EACL,YAAY,EACZ,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,EACxB,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACxB,sBAAsB,EACtB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC3B,MAAM,gBAAgB,CAAC;AAExB,qBAAa,OAAQ,SAAQ,WAAW;IACtC,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;IAE5F;;OAEG;IACH,OAAO,CACL,IAAI,EAAE,oBAAoB,EAC1B,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,sBAAsB,CAAC;CAG3C;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,OAAO,EAAE,OAAO,CAAC;CAClB;AAED,MAAM,WAAW,oBAAoB;IACnC;;OAEG;IACH,EAAE,EAAE,OAAO,CAAC;CACb;AAID,MAAM,CAAC,OAAO,WAAW,OAAO,CAAC;IAC/B,OAAO,EACL,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,oBAAoB,IAAI,oBAAoB,GAClD,CAAC;IAEF,OAAO,EACL,YAAY,IAAI,YAAY,EAC5B,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,0BAA0B,IAAI,0BAA0B,EAC7D,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,EACzD,KAAK,sBAAsB,IAAI,sBAAsB,GACtD,CAAC;CACH"}
|
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
15
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
16
|
+
}) : function(o, v) {
|
|
17
|
+
o["default"] = v;
|
|
18
|
+
});
|
|
19
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
20
|
+
if (mod && mod.__esModule) return mod;
|
|
21
|
+
var result = {};
|
|
22
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
23
|
+
__setModuleDefault(result, mod);
|
|
24
|
+
return result;
|
|
25
|
+
};
|
|
26
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
27
|
+
exports.Webhook = void 0;
|
|
28
|
+
const resource_1 = require("../../resource.js");
|
|
29
|
+
const SubscriptionAPI = __importStar(require("./subscription.js"));
|
|
30
|
+
const subscription_1 = require("./subscription.js");
|
|
31
|
+
class Webhook extends resource_1.APIResource {
|
|
32
|
+
constructor() {
|
|
33
|
+
super(...arguments);
|
|
34
|
+
this.subscription = new SubscriptionAPI.Subscription(this._client);
|
|
35
|
+
}
|
|
36
|
+
/**
|
|
37
|
+
* This endpoint allows you to trigger a specific webhook by its ID.
|
|
38
|
+
*/
|
|
39
|
+
trigger(body, options) {
|
|
40
|
+
return this._client.post('/api/service/webhook/trigger', { body, ...options });
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
exports.Webhook = Webhook;
|
|
44
|
+
Webhook.Subscription = subscription_1.Subscription;
|
|
45
|
+
//# sourceMappingURL=webhook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../../src/resources/webhook/webhook.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;;;;;;;;;;;AAEtF,gDAA6C;AAE7C,mEAAkD;AAClD,oDAYwB;AAExB,MAAa,OAAQ,SAAQ,sBAAW;IAAxC;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAW9F,CAAC;IATC;;OAEG;IACH,OAAO,CACL,IAA0B,EAC1B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF;AAZD,0BAYC;AAgBD,OAAO,CAAC,YAAY,GAAG,2BAAY,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../../resource.mjs";
|
|
3
|
+
import * as SubscriptionAPI from "./subscription.mjs";
|
|
4
|
+
import { Subscription, } from "./subscription.mjs";
|
|
5
|
+
export class Webhook extends APIResource {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.subscription = new SubscriptionAPI.Subscription(this._client);
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* This endpoint allows you to trigger a specific webhook by its ID.
|
|
12
|
+
*/
|
|
13
|
+
trigger(body, options) {
|
|
14
|
+
return this._client.post('/api/service/webhook/trigger', { body, ...options });
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
Webhook.Subscription = Subscription;
|
|
18
|
+
//# sourceMappingURL=webhook.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook.mjs","sourceRoot":"","sources":["../../src/resources/webhook/webhook.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;OAEf,KAAK,eAAe;OACpB,EACL,YAAY,GAWb;AAED,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAW9F,CAAC;IATC;;OAEG;IACH,OAAO,CACL,IAA0B,EAC1B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8BAA8B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjF,CAAC;CACF;AAgBD,OAAO,CAAC,YAAY,GAAG,YAAY,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../src/resources/webhook.ts"],"names":[],"mappings":"AAEA,cAAc,iBAAiB,CAAC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
3
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
4
|
+
if (k2 === undefined) k2 = k;
|
|
5
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
6
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
7
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
8
|
+
}
|
|
9
|
+
Object.defineProperty(o, k2, desc);
|
|
10
|
+
}) : (function(o, m, k, k2) {
|
|
11
|
+
if (k2 === undefined) k2 = k;
|
|
12
|
+
o[k2] = m[k];
|
|
13
|
+
}));
|
|
14
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
16
|
+
};
|
|
17
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
18
|
+
__exportStar(require("./webhook/index.js"), exports);
|
|
19
|
+
//# sourceMappingURL=webhook.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook.js","sourceRoot":"","sources":["../src/resources/webhook.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;;;;;;;;;;;;;;AAEtF,qDAAgC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"webhook.mjs","sourceRoot":"","sources":["../src/resources/webhook.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
package/src/index.ts
CHANGED
|
@@ -17,7 +17,6 @@ import {
|
|
|
17
17
|
} from './resources/banks';
|
|
18
18
|
import { BeneficiaryPayoutCreateResponse, BeneficiaryPayouts } from './resources/beneficiary-payouts';
|
|
19
19
|
import { Capabilities, CapabilityRetrieveParams, CapabilityRetrieveResponse } from './resources/capabilities';
|
|
20
|
-
import { Charge, ChargeCreateParams, Charges } from './resources/charges';
|
|
21
20
|
import {
|
|
22
21
|
Checkoutsession,
|
|
23
22
|
CheckoutsessionCreateParams,
|
|
@@ -44,15 +43,6 @@ import {
|
|
|
44
43
|
FxRetrieveRateResponse,
|
|
45
44
|
FxRetrieveResponse,
|
|
46
45
|
} from './resources/fx';
|
|
47
|
-
import {
|
|
48
|
-
Mandate,
|
|
49
|
-
MandateLookupParams,
|
|
50
|
-
MandateLookupResponse,
|
|
51
|
-
MandateRetrieveParams,
|
|
52
|
-
MandateRevokeParams,
|
|
53
|
-
MandateRevokeResponse,
|
|
54
|
-
Mandates,
|
|
55
|
-
} from './resources/mandates';
|
|
56
46
|
import {
|
|
57
47
|
OrderCreateParams,
|
|
58
48
|
OrderCreateResponse,
|
|
@@ -94,6 +84,8 @@ import {
|
|
|
94
84
|
Subaccounts,
|
|
95
85
|
} from './resources/subaccounts';
|
|
96
86
|
import { TransactionListParams, TransactionListResponse, Transactions } from './resources/transactions';
|
|
87
|
+
import { Data } from './resources/data/data';
|
|
88
|
+
import { Webhook, WebhookTriggerParams, WebhookTriggerResponse } from './resources/webhook/webhook';
|
|
97
89
|
|
|
98
90
|
const environments = {
|
|
99
91
|
production: 'https://api.getivy.de',
|
|
@@ -236,20 +228,20 @@ export class Ivy extends Core.APIClient {
|
|
|
236
228
|
|
|
237
229
|
banks: API.Banks = new API.Banks(this);
|
|
238
230
|
checkoutsession: API.Checkoutsession = new API.Checkoutsession(this);
|
|
231
|
+
data: API.Data = new API.Data(this);
|
|
239
232
|
customers: API.Customers = new API.Customers(this);
|
|
240
233
|
orders: API.Orders = new API.Orders(this);
|
|
241
|
-
charges: API.Charges = new API.Charges(this);
|
|
242
234
|
deposits: API.Deposits = new API.Deposits(this);
|
|
243
235
|
returns: API.Returns = new API.Returns(this);
|
|
244
236
|
fx: API.Fx = new API.Fx(this);
|
|
245
237
|
beneficiaryPayouts: API.BeneficiaryPayouts = new API.BeneficiaryPayouts(this);
|
|
246
238
|
transactions: API.Transactions = new API.Transactions(this);
|
|
247
|
-
mandates: API.Mandates = new API.Mandates(this);
|
|
248
239
|
capabilities: API.Capabilities = new API.Capabilities(this);
|
|
249
240
|
refunds: API.Refunds = new API.Refunds(this);
|
|
250
241
|
payouts: API.Payouts = new API.Payouts(this);
|
|
251
242
|
subaccounts: API.Subaccounts = new API.Subaccounts(this);
|
|
252
243
|
balance: API.Balance = new API.Balance(this);
|
|
244
|
+
webhook: API.Webhook = new API.Webhook(this);
|
|
253
245
|
|
|
254
246
|
/**
|
|
255
247
|
* Check whether the base URL is set to its default.
|
|
@@ -296,20 +288,20 @@ export class Ivy extends Core.APIClient {
|
|
|
296
288
|
|
|
297
289
|
Ivy.Banks = Banks;
|
|
298
290
|
Ivy.Checkoutsession = Checkoutsession;
|
|
291
|
+
Ivy.Data = Data;
|
|
299
292
|
Ivy.Customers = Customers;
|
|
300
293
|
Ivy.Orders = Orders;
|
|
301
|
-
Ivy.Charges = Charges;
|
|
302
294
|
Ivy.Deposits = Deposits;
|
|
303
295
|
Ivy.Returns = Returns;
|
|
304
296
|
Ivy.Fx = Fx;
|
|
305
297
|
Ivy.BeneficiaryPayouts = BeneficiaryPayouts;
|
|
306
298
|
Ivy.Transactions = Transactions;
|
|
307
|
-
Ivy.Mandates = Mandates;
|
|
308
299
|
Ivy.Capabilities = Capabilities;
|
|
309
300
|
Ivy.Refunds = Refunds;
|
|
310
301
|
Ivy.Payouts = Payouts;
|
|
311
302
|
Ivy.Subaccounts = Subaccounts;
|
|
312
303
|
Ivy.Balance = Balance;
|
|
304
|
+
Ivy.Webhook = Webhook;
|
|
313
305
|
|
|
314
306
|
export declare namespace Ivy {
|
|
315
307
|
export type RequestOptions = Core.RequestOptions;
|
|
@@ -334,6 +326,8 @@ export declare namespace Ivy {
|
|
|
334
326
|
type CheckoutsessionExpireParams as CheckoutsessionExpireParams,
|
|
335
327
|
};
|
|
336
328
|
|
|
329
|
+
export { Data as Data };
|
|
330
|
+
|
|
337
331
|
export {
|
|
338
332
|
Customers as Customers,
|
|
339
333
|
type CustomerCreateResponse as CustomerCreateResponse,
|
|
@@ -354,8 +348,6 @@ export declare namespace Ivy {
|
|
|
354
348
|
type OrderExpireParams as OrderExpireParams,
|
|
355
349
|
};
|
|
356
350
|
|
|
357
|
-
export { Charges as Charges, type Charge as Charge, type ChargeCreateParams as ChargeCreateParams };
|
|
358
|
-
|
|
359
351
|
export {
|
|
360
352
|
Deposits as Deposits,
|
|
361
353
|
type DepositRetrieveResponse as DepositRetrieveResponse,
|
|
@@ -389,16 +381,6 @@ export declare namespace Ivy {
|
|
|
389
381
|
type TransactionListParams as TransactionListParams,
|
|
390
382
|
};
|
|
391
383
|
|
|
392
|
-
export {
|
|
393
|
-
Mandates as Mandates,
|
|
394
|
-
type Mandate as Mandate,
|
|
395
|
-
type MandateLookupResponse as MandateLookupResponse,
|
|
396
|
-
type MandateRevokeResponse as MandateRevokeResponse,
|
|
397
|
-
type MandateRetrieveParams as MandateRetrieveParams,
|
|
398
|
-
type MandateLookupParams as MandateLookupParams,
|
|
399
|
-
type MandateRevokeParams as MandateRevokeParams,
|
|
400
|
-
};
|
|
401
|
-
|
|
402
384
|
export {
|
|
403
385
|
Capabilities as Capabilities,
|
|
404
386
|
type CapabilityRetrieveResponse as CapabilityRetrieveResponse,
|
|
@@ -437,6 +419,12 @@ export declare namespace Ivy {
|
|
|
437
419
|
type BalanceRetrieveResponse as BalanceRetrieveResponse,
|
|
438
420
|
type BalanceRetrieveParams as BalanceRetrieveParams,
|
|
439
421
|
};
|
|
422
|
+
|
|
423
|
+
export {
|
|
424
|
+
Webhook as Webhook,
|
|
425
|
+
type WebhookTriggerResponse as WebhookTriggerResponse,
|
|
426
|
+
type WebhookTriggerParams as WebhookTriggerParams,
|
|
427
|
+
};
|
|
440
428
|
}
|
|
441
429
|
|
|
442
430
|
export { toFile, fileFromPath } from './uploads';
|
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
|
|
6
|
+
export class Accounts extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves the list of accounts for a given data session.
|
|
9
|
+
*/
|
|
10
|
+
list(body: AccountListParams, options?: Core.RequestOptions): Core.APIPromise<AccountListResponse> {
|
|
11
|
+
return this._client.post('/api/service/data/accounts/list', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface AccountListResponse {
|
|
16
|
+
/**
|
|
17
|
+
* Array of bank accounts for the given data session
|
|
18
|
+
*/
|
|
19
|
+
accounts: Array<AccountListResponse.Account>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export namespace AccountListResponse {
|
|
23
|
+
export interface Account {
|
|
24
|
+
/**
|
|
25
|
+
* The ID of the account.
|
|
26
|
+
*/
|
|
27
|
+
id: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The ID of the bank.
|
|
31
|
+
*/
|
|
32
|
+
bankId: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The name of the bank.
|
|
36
|
+
*/
|
|
37
|
+
bankName: string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The currency of the account.
|
|
41
|
+
*/
|
|
42
|
+
currency: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* Financial address details of the account
|
|
46
|
+
*/
|
|
47
|
+
financialAddress: Array<Account.FinancialAddress>;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* The name of the account.
|
|
51
|
+
*/
|
|
52
|
+
accountName?: string;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
export namespace Account {
|
|
56
|
+
export interface FinancialAddress {
|
|
57
|
+
type: 'iban' | 'sort_code' | 'bank_code' | 'bban';
|
|
58
|
+
|
|
59
|
+
bankCode?: FinancialAddress.BankCode;
|
|
60
|
+
|
|
61
|
+
bban?: FinancialAddress.Bban;
|
|
62
|
+
|
|
63
|
+
iban?: FinancialAddress.Iban;
|
|
64
|
+
|
|
65
|
+
sortCode?: FinancialAddress.SortCode;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export namespace FinancialAddress {
|
|
69
|
+
export interface BankCode {
|
|
70
|
+
accountNumber: string;
|
|
71
|
+
|
|
72
|
+
code: string;
|
|
73
|
+
|
|
74
|
+
accountHolderName?: string;
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
export interface Bban {
|
|
78
|
+
bban: string;
|
|
79
|
+
|
|
80
|
+
accountHolderName?: string;
|
|
81
|
+
|
|
82
|
+
bic?: string;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
export interface Iban {
|
|
86
|
+
iban: string;
|
|
87
|
+
|
|
88
|
+
accountHolderName?: string;
|
|
89
|
+
|
|
90
|
+
bic?: string;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export interface SortCode {
|
|
94
|
+
accountNumber: string;
|
|
95
|
+
|
|
96
|
+
sortCode: string;
|
|
97
|
+
|
|
98
|
+
accountHolderName?: string;
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export interface AccountListParams {
|
|
105
|
+
/**
|
|
106
|
+
* The ID of the data session to retrieve accounts for.
|
|
107
|
+
*/
|
|
108
|
+
sessionId: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
export declare namespace Accounts {
|
|
112
|
+
export { type AccountListResponse as AccountListResponse, type AccountListParams as AccountListParams };
|
|
113
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
|
|
6
|
+
export class Balances extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves the list of account balances for a given data session.
|
|
9
|
+
*/
|
|
10
|
+
list(body: BalanceListParams, options?: Core.RequestOptions): Core.APIPromise<BalanceListResponse> {
|
|
11
|
+
return this._client.post('/api/service/data/account-balances/list', { body, ...options });
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface BalanceListResponse {
|
|
16
|
+
/**
|
|
17
|
+
* Array of account balances for the given data session
|
|
18
|
+
*/
|
|
19
|
+
balances: Array<BalanceListResponse.Balance>;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export namespace BalanceListResponse {
|
|
23
|
+
export interface Balance {
|
|
24
|
+
/**
|
|
25
|
+
* The ID of the account.
|
|
26
|
+
*/
|
|
27
|
+
accountId: string;
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* The available balance.
|
|
31
|
+
*/
|
|
32
|
+
available: string;
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* The currency of the balance.
|
|
36
|
+
*/
|
|
37
|
+
currency: string;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* The current balance.
|
|
41
|
+
*/
|
|
42
|
+
current: string;
|
|
43
|
+
|
|
44
|
+
/**
|
|
45
|
+
* The date and time when the balance was last updated.
|
|
46
|
+
*/
|
|
47
|
+
timestamp: unknown;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
export interface BalanceListParams {
|
|
52
|
+
/**
|
|
53
|
+
* The ID of the data session to retrieve account balances for.
|
|
54
|
+
*/
|
|
55
|
+
sessionId: string;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export declare namespace Balances {
|
|
59
|
+
export { type BalanceListResponse as BalanceListResponse, type BalanceListParams as BalanceListParams };
|
|
60
|
+
}
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
|
|
3
|
+
import { APIResource } from '../../resource';
|
|
4
|
+
import * as Core from '../../core';
|
|
5
|
+
|
|
6
|
+
export class Consent extends APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Retrieves the details of a consent by session ID.
|
|
9
|
+
*/
|
|
10
|
+
retrieve(
|
|
11
|
+
body: ConsentRetrieveParams,
|
|
12
|
+
options?: Core.RequestOptions,
|
|
13
|
+
): Core.APIPromise<ConsentRetrieveResponse> {
|
|
14
|
+
return this._client.post('/api/service/data/consent/details', { body, ...options });
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Revokes a consent by session ID.
|
|
19
|
+
*/
|
|
20
|
+
revoke(body: ConsentRevokeParams, options?: Core.RequestOptions): Core.APIPromise<ConsentRevokeResponse> {
|
|
21
|
+
return this._client.post('/api/service/data/consent/revoke', { body, ...options });
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ConsentRetrieveResponse {
|
|
26
|
+
/**
|
|
27
|
+
* The Epoch time in seconds when the consent was created.
|
|
28
|
+
*/
|
|
29
|
+
createdAt: number;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* The permissions granted in this consent.
|
|
33
|
+
*/
|
|
34
|
+
permissions: Array<'accounts' | 'balances' | 'transactions'>;
|
|
35
|
+
|
|
36
|
+
/**
|
|
37
|
+
* The current status of the consent.
|
|
38
|
+
*/
|
|
39
|
+
status: 'created' | 'authorised' | 'expired' | 'revoked' | 'failed';
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* The Epoch time in seconds when the consent was last updated.
|
|
43
|
+
*/
|
|
44
|
+
updatedAt: number;
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* The Epoch time in seconds at which the consent expires.
|
|
48
|
+
*/
|
|
49
|
+
expiresAt?: number;
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* The Epoch time in seconds at which the consent was revoked.
|
|
53
|
+
*/
|
|
54
|
+
revokedAt?: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export interface ConsentRevokeResponse {
|
|
58
|
+
/**
|
|
59
|
+
* The Epoch time in seconds when the consent was created.
|
|
60
|
+
*/
|
|
61
|
+
createdAt: number;
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* The permissions granted in this consent.
|
|
65
|
+
*/
|
|
66
|
+
permissions: Array<'accounts' | 'balances' | 'transactions'>;
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* The Epoch time in seconds at which the consent was revoked.
|
|
70
|
+
*/
|
|
71
|
+
revokedAt: number;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* The current status of the consent.
|
|
75
|
+
*/
|
|
76
|
+
status: 'revoked';
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* The Epoch time in seconds when the consent was last updated.
|
|
80
|
+
*/
|
|
81
|
+
updatedAt: number;
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* The Epoch time in seconds at which the consent expires.
|
|
85
|
+
*/
|
|
86
|
+
expiresAt?: number;
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
export interface ConsentRetrieveParams {
|
|
90
|
+
/**
|
|
91
|
+
* The ID of the data session to which the consent belongs.
|
|
92
|
+
*/
|
|
93
|
+
sessionId: string;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
export interface ConsentRevokeParams {
|
|
97
|
+
/**
|
|
98
|
+
* The ID of the data session to which the consent belongs.
|
|
99
|
+
*/
|
|
100
|
+
sessionId: string;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export declare namespace Consent {
|
|
104
|
+
export {
|
|
105
|
+
type ConsentRetrieveResponse as ConsentRetrieveResponse,
|
|
106
|
+
type ConsentRevokeResponse as ConsentRevokeResponse,
|
|
107
|
+
type ConsentRetrieveParams as ConsentRetrieveParams,
|
|
108
|
+
type ConsentRevokeParams as ConsentRevokeParams,
|
|
109
|
+
};
|
|
110
|
+
}
|