@getivy/node-sdk 0.1.0-alpha.3 → 0.1.0-alpha.5

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/index.mjs.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["src/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;;OAG/E,KAAK,IAAI;OACT,KAAK,MAAM;OACX,KAAK,OAAO;OACZ,KAAK,GAAG;OACR,EAAE,OAAO,EAAkD;OAC3D,EAOL,KAAK,GACN;OACM,EAAE,YAAY,EAAwD;OACtE,EAA8B,OAAO,EAAE;OACvC,EACL,eAAe,GAOhB;OACM,EAKL,SAAS,GACV;OACM,EAML,QAAQ,GACT;OACM,EAKL,MAAM,GACP;OACM,EAKL,OAAO,GAER;OACM,EAKL,OAAO,GACR;OACM,EAOL,OAAO,GACR;OACM,EAIL,WAAW,GACZ;AAED,MAAM,YAAY,GAAG;IACnB,UAAU,EAAE,uBAAuB;IACnC,OAAO,EAAE,4BAA4B;CACtC,CAAC;AA2EF;;GAEG;AACH,MAAM,OAAO,GAAI,SAAQ,IAAI,CAAC,SAAS;IAKrC;;;;;;;;;;;;OAYG;IACH,YAAY,EACV,OAAO,GAAG,IAAI,CAAC,OAAO,CAAC,cAAc,CAAC,EACtC,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EACpC,GAAG,IAAI,KACU,EAAE;QACnB,IAAI,MAAM,KAAK,SAAS,EAAE;YACxB,MAAM,IAAI,MAAM,CAAC,QAAQ,CACvB,2KAA2K,CAC5K,CAAC;SACH;QAED,MAAM,OAAO,GAAkB;YAC7B,MAAM;YACN,GAAG,IAAI;YACP,OAAO;YACP,WAAW,EAAE,IAAI,CAAC,WAAW,IAAI,YAAY;SAC9C,CAAC;QAEF,IAAI,OAAO,IAAI,IAAI,CAAC,WAAW,EAAE;YAC/B,MAAM,IAAI,MAAM,CAAC,QAAQ,CACvB,sK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json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@getivy/node-sdk",
3
- "version": "0.1.0-alpha.3",
3
+ "version": "0.1.0-alpha.5",
4
4
  "description": "The official TypeScript library for the Ivy API",
5
5
  "author": "Ivy <developer@getivy.de>",
6
6
  "types": "./index.d.ts",
@@ -87,17 +87,38 @@
87
87
  "default": "./index.mjs"
88
88
  },
89
89
  "./*.mjs": {
90
- "types": "./*.d.ts",
91
- "default": "./*.mjs"
90
+ "types": [
91
+ "./*.d.ts",
92
+ "./*/index.d.ts"
93
+ ],
94
+ "default": [
95
+ "./*.mjs",
96
+ "./*/index.mjs"
97
+ ]
92
98
  },
93
99
  "./*.js": {
94
- "types": "./*.d.ts",
95
- "default": "./*.js"
100
+ "types": [
101
+ "./*.d.ts",
102
+ "./*/index.d.ts"
103
+ ],
104
+ "default": [
105
+ "./*.js",
106
+ "./*/index.js"
107
+ ]
96
108
  },
97
109
  "./*": {
98
- "types": "./*.d.ts",
99
- "require": "./*.js",
100
- "default": "./*.mjs"
110
+ "types": [
111
+ "./*.d.ts",
112
+ "./*/index.d.ts"
113
+ ],
114
+ "require": [
115
+ "./*.js",
116
+ "./*/index.js"
117
+ ],
118
+ "default": [
119
+ "./*.mjs",
120
+ "./*/index.mjs"
121
+ ]
101
122
  }
102
123
  }
103
124
  }
@@ -10,4 +10,5 @@ export { Payouts, type PublicUserPayout, type PayoutListResponse, type PayoutCre
10
10
  export { Refunds, type RefundResponse, type RefundBatchResponse, type RefundCreateParams, type RefundBatchParams, } from "./refunds.js";
11
11
  export { Reports, type PayoutReport, type ReportCreateResponse, type ReportRetrieveResponse, type ReportCreateParams, type ReportRetrieveParams, type ReportDownloadParams, } from "./reports.js";
12
12
  export { Subaccounts, type Subaccount, type SubaccountCreateParams, type SubaccountRetrieveParams, } from "./subaccounts.js";
13
+ export { Webhooksubscription, type WebhooksubscriptionCreateResponse, type WebhooksubscriptionUpdateResponse, type WebhooksubscriptionListResponse, type WebhooksubscriptionDeleteResponse, type WebhooksubscriptionPingResponse, type WebhooksubscriptionCreateParams, type WebhooksubscriptionUpdateParams, type WebhooksubscriptionListParams, type WebhooksubscriptionDeleteParams, type WebhooksubscriptionPingParams, } from "./webhooksubscription.js";
13
14
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,uBAAuB,EAAE,KAAK,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAC9F,OAAO,EACL,KAAK,EACL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,KAAK,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC9G,OAAO,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC1E,OAAO,EACL,eAAe,EACf,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,GACjC,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,SAAS,EACT,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,GAC5B,MAAM,aAAa,CAAC;AACrB,OAAO,EACL,QAAQ,EACR,KAAK,eAAe,EACpB,KAAK,qBAAqB,EAC1B,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,GACzB,MAAM,YAAY,CAAC;AACpB,OAAO,EACL,MAAM,EACN,KAAK,qBAAqB,EAC1B,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,GACvB,MAAM,UAAU,CAAC;AAClB,OAAO,EACL,OAAO,EACP,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,GACtB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,OAAO,EACP,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,iBAAiB,GACvB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,OAAO,EACP,KAAK,YAAY,EACjB,KAAK,oBAAoB,EACzB,KAAK,sBAAsB,EAC3B,KAAK,kBAAkB,EACvB,KAAK,oBAAoB,EACzB,KAAK,oBAAoB,GAC1B,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,WAAW,EACX,KAAK,UAAU,EACf,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,GAC9B,MAAM,eAAe,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,OAAO,EAAE,KAAK,uBAAuB,EAAE,KAAK,qBAAqB,EAAE,MAAM,WAAW,CAAC;AAC9F,OAAO,EACL,KAAK,EACL,KAAK,oBAAoB,EACzB,KAAK,gBAAgB,EACrB,KAAK,kBAAkB,EACvB,KAAK,kBAAkB,EACvB,KAAK,cAAc,EACnB,KAAK,gBAAgB,GACtB,MAAM,SAAS,CAAC;AACjB,OAAO,EAAE,YAAY,EAAE,KAAK,0BAA0B,EAAE,KAAK,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAC9G,OAAO,EAAE,OAAO,EAAE,KAAK,MAAM,EAAE,KAAK,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC1E,OAAO,EACL,eAAe,EACf,KAAK,6BAA6B,EAClC,KAAK,+BAA+B,EACpC,KAAK,6BAA6B,EAClC,KAAK,2BAA2B,EAChC,KAAK,6BAA6B,EAClC,K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,MAAM,uBAAuB,CAAC"}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
  // File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
- exports.Subaccounts = exports.Reports = exports.Refunds = exports.Payouts = exports.Orders = exports.Mandates = exports.Customers = exports.Checkoutsession = exports.Charges = exports.Capabilities = exports.Banks = exports.Balance = void 0;
4
+ exports.Webhooksubscription = exports.Subaccounts = exports.Reports = exports.Refunds = exports.Payouts = exports.Orders = exports.Mandates = exports.Customers = exports.Checkoutsession = exports.Charges = exports.Capabilities = exports.Banks = exports.Balance = void 0;
5
5
  var balance_1 = require("./balance.js");
6
6
  Object.defineProperty(exports, "Balance", { enumerable: true, get: function () { return balance_1.Balance; } });
7
7
  var banks_1 = require("./banks.js");
@@ -26,4 +26,6 @@ var reports_1 = require("./reports.js");
26
26
  Object.defineProperty(exports, "Reports", { enumerable: true, get: function () { return reports_1.Reports; } });
27
27
  var subaccounts_1 = require("./subaccounts.js");
28
28
  Object.defineProperty(exports, "Subaccounts", { enumerable: true, get: function () { return subaccounts_1.Subaccounts; } });
29
+ var webhooksubscription_1 = require("./webhooksubscription.js");
30
+ Object.defineProperty(exports, "Webhooksubscription", { enumerable: true, get: function () { return webhooksubscription_1.Webhooksubscription; } });
29
31
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAA8F;AAArF,kGAAA,OAAO,OAAA;AAChB,oCAQiB;AAPf,8FAAA,KAAK,OAAA;AAQP,kDAA8G;AAArG,4GAAA,YAAY,OAAA;AACrB,wCAA0E;AAAjE,kGAAA,OAAO,OAAA;AAChB,wDAQ2B;AAPzB,kHAAA,eAAe,OAAA;AAQjB,4CAMqB;AALnB,sGAAA,SAAS,OAAA;AAMX,0CAOoB;AANlB,oGAAA,QAAQ,OAAA;AAOV,sCAMkB;AALhB,gGAAA,MAAM,OAAA;AAMR,wCAOmB;AANjB,kGAAA,OAAO,OAAA;AAOT,wCAMmB;AALjB,kGAAA,OAAO,OAAA;AAMT,wCAQmB;AAPjB,kGAAA,OAAO,OAAA;AAQT,gDAKuB;AAJrB,0GAAA,WAAW,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,wCAA8F;AAArF,kGAAA,OAAO,OAAA;AAChB,oCAQiB;AAPf,8FAAA,KAAK,OAAA;AAQP,kDAA8G;AAArG,4GAAA,YAAY,OAAA;AACrB,wCAA0E;AAAjE,kGAAA,OAAO,OAAA;AAChB,wDAQ2B;AAPzB,kHAAA,eAAe,OAAA;AAQjB,4CAMqB;AALnB,sGAAA,SAAS,OAAA;AAMX,0CAOoB;AANlB,oGAAA,QAAQ,OAAA;AAOV,sCAMkB;AALhB,gGAAA,MAAM,OAAA;AAMR,wCAOmB;AANjB,kGAAA,OAAO,OAAA;AAOT,wCAMmB;AALjB,kGAAA,OAAO,OAAA;AAMT,wCAQmB;AAPjB,kGAAA,OAAO,OAAA;AAQT,gDAKuB;AAJrB,0GAAA,WAAW,OAAA;AAKb,gEAY+B;AAX7B,0HAAA,mBAAmB,OAAA"}
@@ -11,4 +11,5 @@ export { Payouts, } from "./payouts.mjs";
11
11
  export { Refunds, } from "./refunds.mjs";
12
12
  export { Reports, } from "./reports.mjs";
13
13
  export { Subaccounts, } from "./subaccounts.mjs";
14
+ export { Webhooksubscription, } from "./webhooksubscription.mjs";
14
15
  //# sourceMappingURL=index.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAA4D;OACrE,EACL,KAAK,GAON;OACM,EAAE,YAAY,EAAkE;OAChF,EAAE,OAAO,EAAwC;OACjD,EACL,eAAe,GAOhB;OACM,EACL,SAAS,GAKV;OACM,EACL,QAAQ,GAMT;OACM,EACL,MAAM,GAKP;OACM,EACL,OAAO,GAMR;OACM,EACL,OAAO,GAKR;OACM,EACL,OAAO,GAOR;OACM,EACL,WAAW,GAIZ"}
1
+ {"version":3,"file":"index.mjs","sourceRoot":"","sources":["../src/resources/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,OAAO,EAA4D;OACrE,EACL,KAAK,GAON;OACM,EAAE,YAAY,EAAkE;OAChF,EAAE,OAAO,EAAwC;OACjD,EACL,eAAe,GAOhB;OACM,EACL,SAAS,GAKV;OACM,EACL,QAAQ,GAMT;OACM,EACL,MAAM,GAKP;OACM,EACL,OAAO,GAMR;OACM,EACL,OAAO,GAKR;OACM,EACL,OAAO,GAOR;OACM,EACL,WAAW,GAIZ;OACM,EACL,mBAAmB,GAWpB"}
@@ -0,0 +1,155 @@
1
+ import { APIResource } from "../resource.js";
2
+ import * as Core from "../core.js";
3
+ export declare class Webhooksubscription 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: WebhooksubscriptionCreateParams, options?: Core.RequestOptions): Core.APIPromise<WebhooksubscriptionCreateResponse>;
9
+ /**
10
+ * Updates the url or subcribed to events for a webhook subscription. This can be
11
+ * used via the app or via the API by providing an API key.
12
+ */
13
+ update(body: WebhooksubscriptionUpdateParams, options?: Core.RequestOptions): Core.APIPromise<WebhooksubscriptionUpdateResponse>;
14
+ /**
15
+ * Lists all webhook subscriptions that are registered for the merchant. The
16
+ * results are paginated and provided in chronological order.
17
+ */
18
+ list(body: WebhooksubscriptionListParams, options?: Core.RequestOptions): Core.APIPromise<WebhooksubscriptionListResponse>;
19
+ /**
20
+ * Deletes a webhook subscription.
21
+ */
22
+ delete(body: WebhooksubscriptionDeleteParams, options?: Core.RequestOptions): Core.APIPromise<WebhooksubscriptionDeleteResponse>;
23
+ /**
24
+ * Trigger the webhook event "test" for the specified webhook subscription.
25
+ */
26
+ ping(body: WebhooksubscriptionPingParams, options?: Core.RequestOptions): Core.APIPromise<WebhooksubscriptionPingResponse>;
27
+ }
28
+ export interface WebhooksubscriptionCreateResponse {
29
+ /**
30
+ * The unique id for the webhook subscription.
31
+ */
32
+ id: string;
33
+ createdAt: string;
34
+ events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'payout_report_requested' | 'data_session_completed' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'mandate_setup_started' | 'mandate_setup_succeeded' | 'mandate_setup_failed' | 'mandate_revoked' | 'user_payout.failed' | 'user_payout.paid' | 'user_payout.initiated'>;
35
+ /**
36
+ * The unique id for the webhook subscription.
37
+ */
38
+ merchant: string;
39
+ /**
40
+ * @deprecated The unique id for the webhook subscription.
41
+ */
42
+ merchantApp: string;
43
+ updatedAt: string;
44
+ /**
45
+ * The url that will listen to the webhook events coming from Ivy. Must be unique
46
+ * for the merchant app.
47
+ */
48
+ url: string;
49
+ }
50
+ export interface WebhooksubscriptionUpdateResponse {
51
+ /**
52
+ * The unique id for the webhook subscription.
53
+ */
54
+ id: string;
55
+ createdAt: string;
56
+ events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'payout_report_requested' | 'data_session_completed' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'mandate_setup_started' | 'mandate_setup_succeeded' | 'mandate_setup_failed' | 'mandate_revoked' | 'user_payout.failed' | 'user_payout.paid' | 'user_payout.initiated'>;
57
+ /**
58
+ * The unique id for the webhook subscription.
59
+ */
60
+ merchant: string;
61
+ /**
62
+ * @deprecated The unique id for the webhook subscription.
63
+ */
64
+ merchantApp: string;
65
+ updatedAt: string;
66
+ /**
67
+ * The url that will listen to the webhook events coming from Ivy. Must be unique
68
+ * for the merchant app.
69
+ */
70
+ url: string;
71
+ }
72
+ export interface WebhooksubscriptionListResponse {
73
+ count: number;
74
+ hasNext: boolean;
75
+ items: Array<WebhooksubscriptionListResponse.Item>;
76
+ skip: number;
77
+ }
78
+ export declare namespace WebhooksubscriptionListResponse {
79
+ interface Item {
80
+ /**
81
+ * The unique id for the webhook subscription.
82
+ */
83
+ id: string;
84
+ createdAt: string;
85
+ events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'payout_report_requested' | 'data_session_completed' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'mandate_setup_started' | 'mandate_setup_succeeded' | 'mandate_setup_failed' | 'mandate_revoked' | 'user_payout.failed' | 'user_payout.paid' | 'user_payout.initiated'>;
86
+ /**
87
+ * The unique id for the webhook subscription.
88
+ */
89
+ merchant: string;
90
+ /**
91
+ * @deprecated The unique id for the webhook subscription.
92
+ */
93
+ merchantApp: string;
94
+ updatedAt: string;
95
+ /**
96
+ * The url that will listen to the webhook events coming from Ivy. Must be unique
97
+ * for the merchant app.
98
+ */
99
+ url: string;
100
+ }
101
+ }
102
+ export interface WebhooksubscriptionDeleteResponse {
103
+ success: boolean;
104
+ }
105
+ export interface WebhooksubscriptionPingResponse {
106
+ /**
107
+ * The unique identifier of the webhook that was sent.
108
+ */
109
+ id: string;
110
+ date: string;
111
+ /**
112
+ * The response body returned by the targeted webhook endpoint.
113
+ */
114
+ response: string | number | boolean | Array<unknown> | Record<string, unknown> | null;
115
+ /**
116
+ * The status code returned by the targeted webhook endpoint.
117
+ */
118
+ statusCode: number;
119
+ /**
120
+ * True if the targeted webhook endpoint returned status code 200. False otherwise.
121
+ */
122
+ success: boolean;
123
+ }
124
+ export interface WebhooksubscriptionCreateParams {
125
+ /**
126
+ * The events to subscribe the url to.
127
+ */
128
+ events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'payout_report_requested' | 'data_session_completed' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'mandate_setup_started' | 'mandate_setup_succeeded' | 'mandate_setup_failed' | 'mandate_revoked' | 'user_payout.failed' | 'user_payout.paid' | 'user_payout.initiated'>;
129
+ /**
130
+ * The endpoint where webhook events are sent.
131
+ */
132
+ url: string;
133
+ }
134
+ export interface WebhooksubscriptionUpdateParams {
135
+ id: string;
136
+ events?: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'payout_report_requested' | 'data_session_completed' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'mandate_setup_started' | 'mandate_setup_succeeded' | 'mandate_setup_failed' | 'mandate_revoked' | 'user_payout.failed' | 'user_payout.paid' | 'user_payout.initiated'>;
137
+ url?: string;
138
+ }
139
+ export interface WebhooksubscriptionListParams {
140
+ limit?: number;
141
+ skip?: number;
142
+ }
143
+ export interface WebhooksubscriptionDeleteParams {
144
+ id: string;
145
+ }
146
+ export interface WebhooksubscriptionPingParams {
147
+ /**
148
+ * The unique identifier for the webhook subscription to trigger.
149
+ */
150
+ id: string;
151
+ }
152
+ export declare namespace Webhooksubscription {
153
+ export { type WebhooksubscriptionCreateResponse as WebhooksubscriptionCreateResponse, type WebhooksubscriptionUpdateResponse as WebhooksubscriptionUpdateResponse, type WebhooksubscriptionListResponse as WebhooksubscriptionListResponse, type WebhooksubscriptionDeleteResponse as WebhooksubscriptionDeleteResponse, type WebhooksubscriptionPingResponse as WebhooksubscriptionPingResponse, type WebhooksubscriptionCreateParams as WebhooksubscriptionCreateParams, type WebhooksubscriptionUpdateParams as WebhooksubscriptionUpdateParams, type WebhooksubscriptionListParams as WebhooksubscriptionListParams, type WebhooksubscriptionDeleteParams as WebhooksubscriptionDeleteParams, type WebhooksubscriptionPingParams as WebhooksubscriptionPingParams, };
154
+ }
155
+ //# sourceMappingURL=webhooksubscription.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooksubscription.d.ts","sourceRoot":"","sources":["../src/resources/webhooksubscription.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,mBAAoB,SAAQ,WAAW;IAClD;;;OAGG;IACH,MAAM,CACJ,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,iCAAiC,CAAC;IAIrD;;;OAGG;IACH,MAAM,CACJ,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,iCAAiC,CAAC;IAIrD;;;OAGG;IACH,IAAI,CACF,IAAI,EAAE,6BAA6B,EACnC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,+BAA+B,CAAC;IAInD;;OAEG;IACH,MAAM,CACJ,IAAI,EAAE,+BAA+B,EACrC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,iCAAiC,CAAC;IAIrD;;OAEG;IACH,IAAI,CACF,IAAI,EAAE,6BAA6B,EACnC,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAC5B,IAAI,CAAC,UAAU,CAAC,+BAA+B,CAAC;CAGpD;AAED,MAAM,WAAW,iCAAiC;IAChD;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,KAAK,CACT,MAAM,GACN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,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,EACnE,KAAK,+BAA+B,IAAI,+BAA+B,EACvE,KAAK,6BAA6B,IAAI,6BAA6B,GACpE,CAAC;CACH"}
@@ -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.Webhooksubscription = void 0;
5
+ const resource_1 = require("../resource.js");
6
+ class Webhooksubscription 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
+ * Trigger the webhook event "test" for the specified webhook subscription.
36
+ */
37
+ ping(body, options) {
38
+ return this._client.post('/api/service/webhook-subscription/ping', { body, ...options });
39
+ }
40
+ }
41
+ exports.Webhooksubscription = Webhooksubscription;
42
+ //# sourceMappingURL=webhooksubscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooksubscription.js","sourceRoot":"","sources":["../src/resources/webhooksubscription.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,mBAAoB,SAAQ,sBAAW;IAClD;;;OAGG;IACH,MAAM,CACJ,IAAqC,EACrC,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,IAAqC,EACrC,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,IAAmC,EACnC,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,IAAqC,EACrC,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,IAAmC,EACnC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF;AArDD,kDAqDC"}
@@ -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 Webhooksubscription 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
+ * Trigger the webhook event "test" for the specified webhook subscription.
33
+ */
34
+ ping(body, options) {
35
+ return this._client.post('/api/service/webhook-subscription/ping', { body, ...options });
36
+ }
37
+ }
38
+ //# sourceMappingURL=webhooksubscription.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"webhooksubscription.mjs","sourceRoot":"","sources":["../src/resources/webhooksubscription.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,mBAAoB,SAAQ,WAAW;IAClD;;;OAGG;IACH,MAAM,CACJ,IAAqC,EACrC,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,IAAqC,EACrC,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,IAAmC,EACnC,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,IAAqC,EACrC,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,IAAmC,EACnC,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF"}
package/src/core.ts CHANGED
@@ -280,6 +280,7 @@ export abstract class APIClient {
280
280
  options: FinalRequestOptions<Req>,
281
281
  { retryCount = 0 }: { retryCount?: number } = {},
282
282
  ): { req: RequestInit; url: string; timeout: number } {
283
+ options = { ...options };
283
284
  const { method, path, query, headers: headers = {} } = options;
284
285
 
285
286
  const body =
@@ -292,9 +293,9 @@ export abstract class APIClient {
292
293
 
293
294
  const url = this.buildURL(path!, query);
294
295
  if ('timeout' in options) validatePositiveInteger('timeout', options.timeout);
295
- const timeout = options.timeout ?? this.timeout;
296
+ options.timeout = options.timeout ?? this.timeout;
296
297
  const httpAgent = options.httpAgent ?? this.httpAgent ?? getDefaultAgent(url);
297
- const minAgentTimeout = timeout + 1000;
298
+ const minAgentTimeout = options.timeout + 1000;
298
299
  if (
299
300
  typeof (httpAgent as any)?.options?.timeout === 'number' &&
300
301
  minAgentTimeout > ((httpAgent as any).options.timeout ?? 0)
@@ -323,7 +324,7 @@ export abstract class APIClient {
323
324
  signal: options.signal ?? null,
324
325
  };
325
326
 
326
- return { req, url, timeout };
327
+ return { req, url, timeout: options.timeout };
327
328
  }
328
329
 
329
330
  private buildHeaders({
@@ -351,15 +352,22 @@ export abstract class APIClient {
351
352
  delete reqHeaders['content-type'];
352
353
  }
353
354
 
354
- // Don't set the retry count header if it was already set or removed through default headers or by the
355
- // caller. We check `defaultHeaders` and `headers`, which can contain nulls, instead of `reqHeaders` to
356
- // account for the removal case.
355
+ // Don't set theses headers if they were already set or removed through default headers or by the caller.
356
+ // We check `defaultHeaders` and `headers`, which can contain nulls, instead of `reqHeaders` to account
357
+ // for the removal case.
357
358
  if (
358
359
  getHeader(defaultHeaders, 'x-stainless-retry-count') === undefined &&
359
360
  getHeader(headers, 'x-stainless-retry-count') === undefined
360
361
  ) {
361
362
  reqHeaders['x-stainless-retry-count'] = String(retryCount);
362
363
  }
364
+ if (
365
+ getHeader(defaultHeaders, 'x-stainless-timeout') === undefined &&
366
+ getHeader(headers, 'x-stainless-timeout') === undefined &&
367
+ options.timeout
368
+ ) {
369
+ reqHeaders['x-stainless-timeout'] = String(options.timeout);
370
+ }
363
371
 
364
372
  this.validateHeaders(reqHeaders, headers);
365
373
 
package/src/index.ts CHANGED
@@ -78,6 +78,19 @@ import {
78
78
  SubaccountRetrieveParams,
79
79
  Subaccounts,
80
80
  } from './resources/subaccounts';
81
+ import {
82
+ Webhooksubscription,
83
+ WebhooksubscriptionCreateParams,
84
+ WebhooksubscriptionCreateResponse,
85
+ WebhooksubscriptionDeleteParams,
86
+ WebhooksubscriptionDeleteResponse,
87
+ WebhooksubscriptionListParams,
88
+ WebhooksubscriptionListResponse,
89
+ WebhooksubscriptionPingParams,
90
+ WebhooksubscriptionPingResponse,
91
+ WebhooksubscriptionUpdateParams,
92
+ WebhooksubscriptionUpdateResponse,
93
+ } from './resources/webhooksubscription';
81
94
 
82
95
  const environments = {
83
96
  production: 'https://api.getivy.de',
@@ -227,6 +240,7 @@ export class Ivy extends Core.APIClient {
227
240
  reports: API.Reports = new API.Reports(this);
228
241
  subaccounts: API.Subaccounts = new API.Subaccounts(this);
229
242
  balance: API.Balance = new API.Balance(this);
243
+ webhooksubscription: API.Webhooksubscription = new API.Webhooksubscription(this);
230
244
 
231
245
  protected override defaultQuery(): Core.DefaultQuery | undefined {
232
246
  return this._options.defaultQuery;
@@ -276,6 +290,7 @@ Ivy.Payouts = Payouts;
276
290
  Ivy.Reports = Reports;
277
291
  Ivy.Subaccounts = Subaccounts;
278
292
  Ivy.Balance = Balance;
293
+ Ivy.Webhooksubscription = Webhooksubscription;
279
294
  export declare namespace Ivy {
280
295
  export type RequestOptions = Core.RequestOptions;
281
296
 
@@ -371,6 +386,20 @@ export declare namespace Ivy {
371
386
  type BalanceRetrieveResponse as BalanceRetrieveResponse,
372
387
  type BalanceRetrieveParams as BalanceRetrieveParams,
373
388
  };
389
+
390
+ export {
391
+ Webhooksubscription as Webhooksubscription,
392
+ type WebhooksubscriptionCreateResponse as WebhooksubscriptionCreateResponse,
393
+ type WebhooksubscriptionUpdateResponse as WebhooksubscriptionUpdateResponse,
394
+ type WebhooksubscriptionListResponse as WebhooksubscriptionListResponse,
395
+ type WebhooksubscriptionDeleteResponse as WebhooksubscriptionDeleteResponse,
396
+ type WebhooksubscriptionPingResponse as WebhooksubscriptionPingResponse,
397
+ type WebhooksubscriptionCreateParams as WebhooksubscriptionCreateParams,
398
+ type WebhooksubscriptionUpdateParams as WebhooksubscriptionUpdateParams,
399
+ type WebhooksubscriptionListParams as WebhooksubscriptionListParams,
400
+ type WebhooksubscriptionDeleteParams as WebhooksubscriptionDeleteParams,
401
+ type WebhooksubscriptionPingParams as WebhooksubscriptionPingParams,
402
+ };
374
403
  }
375
404
 
376
405
  export { toFile, fileFromPath } from './uploads';
@@ -73,3 +73,16 @@ export {
73
73
  type SubaccountCreateParams,
74
74
  type SubaccountRetrieveParams,
75
75
  } from './subaccounts';
76
+ export {
77
+ Webhooksubscription,
78
+ type WebhooksubscriptionCreateResponse,
79
+ type WebhooksubscriptionUpdateResponse,
80
+ type WebhooksubscriptionListResponse,
81
+ type WebhooksubscriptionDeleteResponse,
82
+ type WebhooksubscriptionPingResponse,
83
+ type WebhooksubscriptionCreateParams,
84
+ type WebhooksubscriptionUpdateParams,
85
+ type WebhooksubscriptionListParams,
86
+ type WebhooksubscriptionDeleteParams,
87
+ type WebhooksubscriptionPingParams,
88
+ } from './webhooksubscription';