@getivy/node-sdk 2.6.0 → 2.20.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 +164 -0
- package/README.md +2 -2
- package/api-promise.d.mts +1 -0
- package/api-promise.d.mts.map +1 -1
- package/api-promise.d.ts +1 -0
- package/api-promise.d.ts.map +1 -1
- package/api-promise.mjs +1 -0
- package/api-promise.mjs.map +1 -1
- package/bin/migration-config.json +1 -1
- package/client.d.mts +10 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -4
- package/client.d.ts.map +1 -1
- package/client.js +21 -7
- package/client.js.map +1 -1
- package/client.mjs +21 -7
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts.map +1 -1
- package/core/uploads.d.mts.map +1 -1
- package/core/uploads.d.ts.map +1 -1
- package/core/uploads.mjs.map +1 -1
- package/error.d.mts +1 -0
- package/error.d.mts.map +1 -1
- package/error.d.ts +1 -0
- package/error.d.ts.map +1 -1
- package/error.mjs +1 -0
- package/error.mjs.map +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts.map +1 -1
- package/index.mjs.map +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/headers.mjs.map +1 -1
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts.map +1 -1
- package/internal/shims.d.mts +6 -0
- package/internal/shims.d.mts.map +1 -1
- package/internal/shims.d.ts +6 -0
- package/internal/shims.d.ts.map +1 -1
- package/internal/to-file.d.mts.map +1 -1
- package/internal/to-file.d.ts.map +1 -1
- package/internal/to-file.mjs.map +1 -1
- package/internal/tslib.js +17 -17
- package/internal/types.d.mts +4 -4
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +4 -4
- package/internal/types.d.ts.map +1 -1
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +4 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +4 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/query.mjs.map +1 -1
- package/internal/utils/values.mjs.map +1 -1
- package/internal/utils.d.mts.map +1 -1
- package/internal/utils.d.ts.map +1 -1
- package/internal/utils.mjs.map +1 -1
- package/lib/request-signing.d.mts +6 -0
- package/lib/request-signing.d.mts.map +1 -0
- package/lib/request-signing.d.ts +6 -0
- package/lib/request-signing.d.ts.map +1 -0
- package/lib/request-signing.js +113 -0
- package/lib/request-signing.js.map +1 -0
- package/lib/request-signing.mjs +109 -0
- package/lib/request-signing.mjs.map +1 -0
- package/package.json +16 -4
- package/resource.d.mts +1 -0
- package/resource.d.mts.map +1 -1
- package/resource.d.ts +1 -0
- package/resource.d.ts.map +1 -1
- package/resource.mjs +1 -0
- package/resource.mjs.map +1 -1
- package/resources/balance.d.mts.map +1 -1
- package/resources/balance.d.ts.map +1 -1
- package/resources/balance.mjs.map +1 -1
- package/resources/banks.d.mts +12 -14
- package/resources/banks.d.mts.map +1 -1
- package/resources/banks.d.ts +12 -14
- package/resources/banks.d.ts.map +1 -1
- package/resources/banks.mjs.map +1 -1
- package/resources/beneficiary-payouts.d.mts +2 -2
- package/resources/beneficiary-payouts.d.mts.map +1 -1
- package/resources/beneficiary-payouts.d.ts +2 -2
- package/resources/beneficiary-payouts.d.ts.map +1 -1
- package/resources/beneficiary-payouts.mjs.map +1 -1
- package/resources/capabilities.d.mts +8 -1
- package/resources/capabilities.d.mts.map +1 -1
- package/resources/capabilities.d.ts +8 -1
- package/resources/capabilities.d.ts.map +1 -1
- package/resources/capabilities.js +7 -0
- package/resources/capabilities.js.map +1 -1
- package/resources/capabilities.mjs +7 -0
- package/resources/capabilities.mjs.map +1 -1
- package/resources/checkoutsession.d.mts +18 -10
- package/resources/checkoutsession.d.mts.map +1 -1
- package/resources/checkoutsession.d.ts +18 -10
- package/resources/checkoutsession.d.ts.map +1 -1
- package/resources/checkoutsession.js +3 -2
- package/resources/checkoutsession.js.map +1 -1
- package/resources/checkoutsession.mjs +3 -2
- package/resources/checkoutsession.mjs.map +1 -1
- package/resources/counterparties.d.mts +956 -0
- package/resources/counterparties.d.mts.map +1 -0
- package/resources/counterparties.d.ts +956 -0
- package/resources/counterparties.d.ts.map +1 -0
- package/resources/counterparties.js +41 -0
- package/resources/counterparties.js.map +1 -0
- package/resources/counterparties.mjs +37 -0
- package/resources/counterparties.mjs.map +1 -0
- package/resources/customers.d.mts +6 -6
- package/resources/customers.d.mts.map +1 -1
- package/resources/customers.d.ts +6 -6
- package/resources/customers.d.ts.map +1 -1
- package/resources/customers.mjs.map +1 -1
- package/resources/deposits.d.mts +21 -7
- package/resources/deposits.d.mts.map +1 -1
- package/resources/deposits.d.ts +21 -7
- package/resources/deposits.d.ts.map +1 -1
- package/resources/deposits.mjs.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -3
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/orders.d.mts +102 -39
- package/resources/orders.d.mts.map +1 -1
- package/resources/orders.d.ts +102 -39
- package/resources/orders.d.ts.map +1 -1
- package/resources/orders.mjs.map +1 -1
- package/resources/payee.d.mts.map +1 -1
- package/resources/payee.d.ts.map +1 -1
- package/resources/payee.mjs.map +1 -1
- package/resources/payouts.d.mts +82 -21
- package/resources/payouts.d.mts.map +1 -1
- package/resources/payouts.d.ts +82 -21
- package/resources/payouts.d.ts.map +1 -1
- package/resources/payouts.mjs.map +1 -1
- package/resources/refunds.d.mts +1 -1
- package/resources/refunds.d.mts.map +1 -1
- package/resources/refunds.d.ts +1 -1
- package/resources/refunds.d.ts.map +1 -1
- package/resources/refunds.mjs.map +1 -1
- package/resources/returns.d.mts +2 -2
- package/resources/returns.d.mts.map +1 -1
- package/resources/returns.d.ts +2 -2
- package/resources/returns.d.ts.map +1 -1
- package/resources/returns.mjs.map +1 -1
- package/resources/subaccounts.d.mts +4 -4
- package/resources/subaccounts.d.mts.map +1 -1
- package/resources/subaccounts.d.ts +4 -4
- package/resources/subaccounts.d.ts.map +1 -1
- package/resources/subaccounts.mjs.map +1 -1
- package/resources/transactions.d.mts +3 -3
- package/resources/transactions.d.mts.map +1 -1
- package/resources/transactions.d.ts +3 -3
- package/resources/transactions.d.ts.map +1 -1
- package/resources/transactions.mjs.map +1 -1
- package/resources/webhook/index.d.mts.map +1 -1
- package/resources/webhook/index.d.ts.map +1 -1
- package/resources/webhook/index.mjs.map +1 -1
- package/resources/webhook/subscription.d.mts +12 -12
- package/resources/webhook/subscription.d.mts.map +1 -1
- package/resources/webhook/subscription.d.ts +12 -12
- package/resources/webhook/subscription.d.ts.map +1 -1
- package/resources/webhook/subscription.mjs.map +1 -1
- package/resources/webhook/webhook.d.mts.map +1 -1
- package/resources/webhook/webhook.d.ts.map +1 -1
- package/resources/webhook/webhook.mjs.map +1 -1
- package/resources/webhook.d.mts.map +1 -1
- package/resources/webhook.d.ts.map +1 -1
- package/resources/webhook.mjs.map +1 -1
- package/resources.d.mts.map +1 -1
- package/resources.d.ts.map +1 -1
- package/resources.mjs.map +1 -1
- package/src/client.ts +51 -22
- package/src/internal/utils/log.ts +3 -0
- package/src/lib/request-signing.ts +139 -0
- package/src/resources/banks.ts +21 -11
- package/src/resources/beneficiary-payouts.ts +2 -2
- package/src/resources/capabilities.ts +8 -1
- package/src/resources/checkoutsession.ts +31 -10
- package/src/resources/counterparties.ts +3073 -0
- package/src/resources/customers.ts +3509 -3509
- package/src/resources/deposits.ts +52 -6
- package/src/resources/index.ts +13 -9
- package/src/resources/orders.ts +222 -36
- package/src/resources/payouts.ts +396 -17
- package/src/resources/refunds.ts +1 -1
- package/src/resources/returns.ts +2 -2
- package/src/resources/subaccounts.ts +4 -4
- package/src/resources/transactions.ts +5 -2
- package/src/resources/webhook/subscription.ts +37 -12
- package/src/version.ts +1 -1
- package/uploads.d.mts +1 -0
- package/uploads.d.mts.map +1 -1
- package/uploads.d.ts +1 -0
- package/uploads.d.ts.map +1 -1
- package/uploads.mjs +1 -0
- package/uploads.mjs.map +1 -1
- package/version.d.mts +1 -1
- package/version.d.mts.map +1 -1
- package/version.d.ts +1 -1
- package/version.d.ts.map +1 -1
- package/version.js +1 -1
- package/version.js.map +1 -1
- package/version.mjs +1 -1
- package/version.mjs.map +1 -1
- package/resources/fx.d.mts +0 -155
- package/resources/fx.d.mts.map +0 -1
- package/resources/fx.d.ts +0 -155
- package/resources/fx.d.ts.map +0 -1
- package/resources/fx.js +0 -28
- package/resources/fx.js.map +0 -1
- package/resources/fx.mjs +0 -24
- package/resources/fx.mjs.map +0 -1
- package/src/resources/fx.ts +0 -195
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"transactions.d.ts","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,4BAAyB;AAC/C,OAAO,EAAE,UAAU,EAAE,+BAA4B;AACjD,OAAO,EAAE,cAAc,EAAE,uCAAoC;AAE7D,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,qBAAqB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,uBAAuB,CAAC;CAGjG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B,QAAQ;gBACvB,iBAAiB,EAAE,MAAM,CAAC;gBAE1B,aAAa,EAAE,MAAM,CAAC;gBAEtB,IAAI,EAAE,MAAM,CAAC;aACd;YAED,UAAiB,IAAI;gBACnB,iBAAiB,EAAE,MAAM,CAAC;gBAE1B,IAAI,EAAE,MAAM,CAAC;gBAEb,GAAG,CAAC,EAAE,MAAM,CAAC;aACd;YAED,UAAiB,IAAI;gBACnB,iBAAiB,EAAE,MAAM,CAAC;gBAE1B,IAAI,EAAE,MAAM,CAAC;gBAEb,GAAG,CAAC,EAAE,MAAM,CAAC;aACd;YAED,UAAiB,QAAQ;gBACvB,iBAAiB,EAAE,MAAM,CAAC;gBAE1B,aAAa,EAAE,MAAM,CAAC;gBAEtB,QAAQ,EAAE,MAAM,CAAC;aAClB;YAED,UAAiB,MAAM;gBACrB;;mBAEG;gBACH,OAAO,EAAE,MAAM,CAAC;aACjB;SACF;KACF;IAED;;OAEG;IACH,UAAiB,MAAM;QACrB;;WAEG;QACH,OAAO,EAAE,OAAO,CAAC;QAEjB;;WAEG;QACH,UAAU,CAAC,EAAE,MAAM,CAAC;KACrB;CACF;AAED,MAAM,WAAW,qBAAqB;IACpC;;OAEG;IACH,IAAI,EAAE,MAAM,CAAC;IAEb;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;IAEX;;;OAGG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;OAEG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,KAAK,uBAAuB,IAAI,uBAAuB,EACvD,KAAK,qBAAqB,IAAI,qBAAqB,GACpD,CAAC;CACH"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"transactions.mjs","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"transactions.mjs","sourceRoot":"","sources":["../src/resources/transactions.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,6BAAyB;AAI/C,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;OAEG;IACH,IAAI,CAAC,IAA2B,EAAE,OAAwB;QACxD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,+BAA+B,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAClF,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/webhook/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.mts","sourceRoot":"","sources":["../../src/resources/webhook/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B,2BAAuB;AACxB,OAAO,EAAE,OAAO,EAAE,KAAK,sBAAsB,EAAE,KAAK,oBAAoB,EAAE,sBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/webhook/index.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/resources/webhook/index.ts"],"names":[],"mappings":"AAEA,OAAO,EACL,YAAY,EACZ,KAAK,0BAA0B,EAC/B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,0BAA0B,EAC/B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,EAC3B,KAAK,wBAAwB,EAC7B,KAAK,sBAAsB,GAC5B,0BAAuB;AACxB,OAAO,EAAE,OAAO,EAAE,KAAK,sBAAsB,EAAE,KAAK,oBAAoB,EAAE,qBAAkB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/webhook/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"index.mjs","sourceRoot":"","sources":["../../src/resources/webhook/index.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EACL,YAAY,GAWb,2BAAuB;AACxB,OAAO,EAAE,OAAO,EAA0D,sBAAkB"}
|
|
@@ -28,20 +28,20 @@ export declare class Subscription extends APIResource {
|
|
|
28
28
|
}
|
|
29
29
|
export interface SubscriptionCreateResponse {
|
|
30
30
|
id: unknown;
|
|
31
|
-
createdAt:
|
|
32
|
-
events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | '
|
|
31
|
+
createdAt: string;
|
|
32
|
+
events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'user_payout.initiated' | 'user_payout.failed' | 'user_payout.paid' | 'payout.initiated' | 'payout.failed' | 'payout.paid' | 'deposit.received' | 'return.initiated' | 'return.succeeded' | 'return.failed' | 'return.returned' | 'fx.initiated' | 'fx.succeeded' | 'fx.failed' | 'counterparty.updated' | 'counterparty.pending' | 'counterparty.active' | 'counterparty.rejected' | 'counterparty.blocked' | 'counterparty.unblocked'>;
|
|
33
33
|
merchant: unknown;
|
|
34
34
|
merchantApp: unknown;
|
|
35
|
-
updatedAt:
|
|
35
|
+
updatedAt: string;
|
|
36
36
|
url: string;
|
|
37
37
|
}
|
|
38
38
|
export interface SubscriptionUpdateResponse {
|
|
39
39
|
id: unknown;
|
|
40
|
-
createdAt:
|
|
41
|
-
events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | '
|
|
40
|
+
createdAt: string;
|
|
41
|
+
events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'user_payout.initiated' | 'user_payout.failed' | 'user_payout.paid' | 'payout.initiated' | 'payout.failed' | 'payout.paid' | 'deposit.received' | 'return.initiated' | 'return.succeeded' | 'return.failed' | 'return.returned' | 'fx.initiated' | 'fx.succeeded' | 'fx.failed' | 'counterparty.updated' | 'counterparty.pending' | 'counterparty.active' | 'counterparty.rejected' | 'counterparty.blocked' | 'counterparty.unblocked'>;
|
|
42
42
|
merchant: unknown;
|
|
43
43
|
merchantApp: unknown;
|
|
44
|
-
updatedAt:
|
|
44
|
+
updatedAt: string;
|
|
45
45
|
url: string;
|
|
46
46
|
}
|
|
47
47
|
export interface SubscriptionListResponse {
|
|
@@ -65,11 +65,11 @@ export interface SubscriptionListResponse {
|
|
|
65
65
|
export declare namespace SubscriptionListResponse {
|
|
66
66
|
interface Item {
|
|
67
67
|
id: unknown;
|
|
68
|
-
createdAt:
|
|
69
|
-
events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | '
|
|
68
|
+
createdAt: string;
|
|
69
|
+
events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'user_payout.initiated' | 'user_payout.failed' | 'user_payout.paid' | 'payout.initiated' | 'payout.failed' | 'payout.paid' | 'deposit.received' | 'return.initiated' | 'return.succeeded' | 'return.failed' | 'return.returned' | 'fx.initiated' | 'fx.succeeded' | 'fx.failed' | 'counterparty.updated' | 'counterparty.pending' | 'counterparty.active' | 'counterparty.rejected' | 'counterparty.blocked' | 'counterparty.unblocked'>;
|
|
70
70
|
merchant: unknown;
|
|
71
71
|
merchantApp: unknown;
|
|
72
|
-
updatedAt:
|
|
72
|
+
updatedAt: string;
|
|
73
73
|
url: string;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -87,7 +87,7 @@ export interface SubscriptionPingResponse {
|
|
|
87
87
|
/**
|
|
88
88
|
* The timestamp when the ping was executed
|
|
89
89
|
*/
|
|
90
|
-
date:
|
|
90
|
+
date: string;
|
|
91
91
|
/**
|
|
92
92
|
* The response from the webhook endpoint
|
|
93
93
|
*/
|
|
@@ -109,7 +109,7 @@ export interface SubscriptionCreateParams {
|
|
|
109
109
|
/**
|
|
110
110
|
* The events to subscribe the url to.
|
|
111
111
|
*/
|
|
112
|
-
events?: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | '
|
|
112
|
+
events?: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'user_payout.initiated' | 'user_payout.failed' | 'user_payout.paid' | 'payout.initiated' | 'payout.failed' | 'payout.paid' | 'deposit.received' | 'return.initiated' | 'return.succeeded' | 'return.failed' | 'return.returned' | 'fx.initiated' | 'fx.succeeded' | 'fx.failed' | 'counterparty.updated' | 'counterparty.pending' | 'counterparty.active' | 'counterparty.rejected' | 'counterparty.blocked' | 'counterparty.unblocked'>;
|
|
113
113
|
}
|
|
114
114
|
export interface SubscriptionUpdateParams {
|
|
115
115
|
/**
|
|
@@ -119,7 +119,7 @@ export interface SubscriptionUpdateParams {
|
|
|
119
119
|
/**
|
|
120
120
|
* The new events to subscribe the url to
|
|
121
121
|
*/
|
|
122
|
-
events?: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | '
|
|
122
|
+
events?: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'user_payout.initiated' | 'user_payout.failed' | 'user_payout.paid' | 'payout.initiated' | 'payout.failed' | 'payout.paid' | 'deposit.received' | 'return.initiated' | 'return.succeeded' | 'return.failed' | 'return.returned' | 'fx.initiated' | 'fx.succeeded' | 'fx.failed' | 'counterparty.updated' | 'counterparty.pending' | 'counterparty.active' | 'counterparty.rejected' | 'counterparty.blocked' | 'counterparty.unblocked'>;
|
|
123
123
|
/**
|
|
124
124
|
* The new endpoint where webhook events are sent
|
|
125
125
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.d.mts","sourceRoot":"","sources":["../../src/resources/webhook/subscription.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subscription.d.mts","sourceRoot":"","sources":["../../src/resources/webhook/subscription.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,mCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,2CAAuC;AAEhE,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAIxG;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAIxG;;;OAGG;IACH,IAAI,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAIlG;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAIxG;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;CAGnG;AAED,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,OAAO,CAAC;IAEZ,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,KAAK,CACT,MAAM,GACN,kBAAkB,GAClB,sBAAsB,GACtB,eAAe,GACf,eAAe,GACf,kBAAkB,GAClB,eAAe,GACf,kBAAkB,GAClB,kBAAkB,GAClB,eAAe,GACf,yBAAyB,GACzB,0BAA0B,GAC1B,0BAA0B,GAC1B,0BAA0B,GAC1B,4BAA4B,GAC5B,gBAAgB,GAChB,gBAAgB,GAChB,uBAAuB,GACvB,oBAAoB,GACpB,kBAAkB,GAClB,kBAAkB,GAClB,eAAe,GACf,a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,CAAC;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,EAAE,EAAE,OAAO,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,EAAE,OAAO,CAAC;CACb;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,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"}
|
|
@@ -28,20 +28,20 @@ export declare class Subscription extends APIResource {
|
|
|
28
28
|
}
|
|
29
29
|
export interface SubscriptionCreateResponse {
|
|
30
30
|
id: unknown;
|
|
31
|
-
createdAt:
|
|
32
|
-
events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | '
|
|
31
|
+
createdAt: string;
|
|
32
|
+
events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'user_payout.initiated' | 'user_payout.failed' | 'user_payout.paid' | 'payout.initiated' | 'payout.failed' | 'payout.paid' | 'deposit.received' | 'return.initiated' | 'return.succeeded' | 'return.failed' | 'return.returned' | 'fx.initiated' | 'fx.succeeded' | 'fx.failed' | 'counterparty.updated' | 'counterparty.pending' | 'counterparty.active' | 'counterparty.rejected' | 'counterparty.blocked' | 'counterparty.unblocked'>;
|
|
33
33
|
merchant: unknown;
|
|
34
34
|
merchantApp: unknown;
|
|
35
|
-
updatedAt:
|
|
35
|
+
updatedAt: string;
|
|
36
36
|
url: string;
|
|
37
37
|
}
|
|
38
38
|
export interface SubscriptionUpdateResponse {
|
|
39
39
|
id: unknown;
|
|
40
|
-
createdAt:
|
|
41
|
-
events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | '
|
|
40
|
+
createdAt: string;
|
|
41
|
+
events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'user_payout.initiated' | 'user_payout.failed' | 'user_payout.paid' | 'payout.initiated' | 'payout.failed' | 'payout.paid' | 'deposit.received' | 'return.initiated' | 'return.succeeded' | 'return.failed' | 'return.returned' | 'fx.initiated' | 'fx.succeeded' | 'fx.failed' | 'counterparty.updated' | 'counterparty.pending' | 'counterparty.active' | 'counterparty.rejected' | 'counterparty.blocked' | 'counterparty.unblocked'>;
|
|
42
42
|
merchant: unknown;
|
|
43
43
|
merchantApp: unknown;
|
|
44
|
-
updatedAt:
|
|
44
|
+
updatedAt: string;
|
|
45
45
|
url: string;
|
|
46
46
|
}
|
|
47
47
|
export interface SubscriptionListResponse {
|
|
@@ -65,11 +65,11 @@ export interface SubscriptionListResponse {
|
|
|
65
65
|
export declare namespace SubscriptionListResponse {
|
|
66
66
|
interface Item {
|
|
67
67
|
id: unknown;
|
|
68
|
-
createdAt:
|
|
69
|
-
events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | '
|
|
68
|
+
createdAt: string;
|
|
69
|
+
events: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'user_payout.initiated' | 'user_payout.failed' | 'user_payout.paid' | 'payout.initiated' | 'payout.failed' | 'payout.paid' | 'deposit.received' | 'return.initiated' | 'return.succeeded' | 'return.failed' | 'return.returned' | 'fx.initiated' | 'fx.succeeded' | 'fx.failed' | 'counterparty.updated' | 'counterparty.pending' | 'counterparty.active' | 'counterparty.rejected' | 'counterparty.blocked' | 'counterparty.unblocked'>;
|
|
70
70
|
merchant: unknown;
|
|
71
71
|
merchantApp: unknown;
|
|
72
|
-
updatedAt:
|
|
72
|
+
updatedAt: string;
|
|
73
73
|
url: string;
|
|
74
74
|
}
|
|
75
75
|
}
|
|
@@ -87,7 +87,7 @@ export interface SubscriptionPingResponse {
|
|
|
87
87
|
/**
|
|
88
88
|
* The timestamp when the ping was executed
|
|
89
89
|
*/
|
|
90
|
-
date:
|
|
90
|
+
date: string;
|
|
91
91
|
/**
|
|
92
92
|
* The response from the webhook endpoint
|
|
93
93
|
*/
|
|
@@ -109,7 +109,7 @@ export interface SubscriptionCreateParams {
|
|
|
109
109
|
/**
|
|
110
110
|
* The events to subscribe the url to.
|
|
111
111
|
*/
|
|
112
|
-
events?: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | '
|
|
112
|
+
events?: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'user_payout.initiated' | 'user_payout.failed' | 'user_payout.paid' | 'payout.initiated' | 'payout.failed' | 'payout.paid' | 'deposit.received' | 'return.initiated' | 'return.succeeded' | 'return.failed' | 'return.returned' | 'fx.initiated' | 'fx.succeeded' | 'fx.failed' | 'counterparty.updated' | 'counterparty.pending' | 'counterparty.active' | 'counterparty.rejected' | 'counterparty.blocked' | 'counterparty.unblocked'>;
|
|
113
113
|
}
|
|
114
114
|
export interface SubscriptionUpdateParams {
|
|
115
115
|
/**
|
|
@@ -119,7 +119,7 @@ export interface SubscriptionUpdateParams {
|
|
|
119
119
|
/**
|
|
120
120
|
* The new events to subscribe the url to
|
|
121
121
|
*/
|
|
122
|
-
events?: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | '
|
|
122
|
+
events?: Array<'test' | 'merchant_updated' | 'merchant_app_updated' | 'order_created' | 'order_updated' | 'refund_succeeded' | 'refund_failed' | 'refund.initiated' | 'refund.succeeded' | 'refund.failed' | 'payout_report_requested' | 'checkout_session_created' | 'checkout_session_updated' | 'checkout_session_expired' | 'checkout_session_completed' | 'payout_created' | 'payout_updated' | 'user_payout.initiated' | 'user_payout.failed' | 'user_payout.paid' | 'payout.initiated' | 'payout.failed' | 'payout.paid' | 'deposit.received' | 'return.initiated' | 'return.succeeded' | 'return.failed' | 'return.returned' | 'fx.initiated' | 'fx.succeeded' | 'fx.failed' | 'counterparty.updated' | 'counterparty.pending' | 'counterparty.active' | 'counterparty.rejected' | 'counterparty.blocked' | 'counterparty.unblocked'>;
|
|
123
123
|
/**
|
|
124
124
|
* The new endpoint where webhook events are sent
|
|
125
125
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/resources/webhook/subscription.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"subscription.d.ts","sourceRoot":"","sources":["../../src/resources/webhook/subscription.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE,qBAAa,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAIxG;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAIxG;;;OAGG;IACH,IAAI,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;IAIlG;;OAEG;IACH,MAAM,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,0BAA0B,CAAC;IAIxG;;OAEG;IACH,IAAI,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,wBAAwB,CAAC;CAGnG;AAED,MAAM,WAAW,0BAA0B;IACzC,EAAE,EAAE,OAAO,CAAC;IAEZ,SAAS,EAAE,MAAM,CAAC;IAElB,MAAM,EAAE,KAAK,CAC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vB,oBAAoB,GACpB,kBAAkB,GAClB,kBAAkB,GAClB,eAAe,GACf,aAAa,GACb,kBAAkB,GAClB,kBAAkB,GAClB,kBAAkB,GAClB,eAAe,GACf,iBAAiB,GACjB,cAAc,GACd,cAAc,GACd,WAAW,GACX,sBAAsB,GACtB,sBAAsB,GACtB,qBAAqB,GACrB,uBAAuB,GACvB,sBAAsB,GACtB,wBAAwB,CAC3B,CAAC;IAEF;;OAEG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,CAAC;IAEf;;OAEG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,EAAE,EAAE,OAAO,CAAC;CACb;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,EAAE,EAAE,OAAO,CAAC;CACb;AAED,MAAM,CAAC,OAAO,WAAW,YAAY,CAAC;IACpC,OAAO,EACL,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"subscription.mjs","sourceRoot":"","sources":["../../src/resources/webhook/subscription.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"subscription.mjs","sourceRoot":"","sources":["../../src/resources/webhook/subscription.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAIlD,MAAM,OAAO,YAAa,SAAQ,WAAW;IAC3C;;;OAGG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;OAGG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;;OAGG;IACH,IAAI,CAAC,IAA4B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;IAED;;OAEG;IACH,MAAM,CAAC,IAA8B,EAAE,OAAwB;QAC7D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,0CAA0C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC7F,CAAC;IAED;;OAEG;IACH,IAAI,CAAC,IAA4B,EAAE,OAAwB;QACzD,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,wCAAwC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC3F,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.d.mts","sourceRoot":"","sources":["../../src/resources/webhook/webhook.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webhook.d.mts","sourceRoot":"","sources":["../../src/resources/webhook/webhook.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,eAAe,2BAAuB;AA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/webhook.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../../src/resources/webhook/webhook.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,+BAA4B;AAClD,OAAO,KAAK,eAAe,0BAAuB;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,0BAAuB;AACxB,OAAO,EAAE,UAAU,EAAE,kCAA+B;AACpD,OAAO,EAAE,cAAc,EAAE,0CAAuC;AAEhE,qBAAa,OAAQ,SAAQ,WAAW;IACtC,YAAY,EAAE,eAAe,CAAC,YAAY,CAAkD;IAE5F;;OAEG;IACH,OAAO,CAAC,IAAI,EAAE,oBAAoB,EAAE,OAAO,CAAC,EAAE,cAAc,GAAG,UAAU,CAAC,sBAAsB,CAAC;CAGlG;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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.mjs","sourceRoot":"","sources":["../../src/resources/webhook/webhook.ts"],"names":[],"mappings":"AAAA,sFAAsF;
|
|
1
|
+
{"version":3,"file":"webhook.mjs","sourceRoot":"","sources":["../../src/resources/webhook/webhook.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,OAAO,EAAE,WAAW,EAAE,gCAA4B;AAClD,OAAO,KAAK,eAAe,2BAAuB;AAClD,OAAO,EACL,YAAY,GAWb,2BAAuB;AAIxB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IAAxC;;QACE,iBAAY,GAAiC,IAAI,eAAe,CAAC,YAAY,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IAQ9F,CAAC;IANC;;OAEG;IACH,OAAO,CAAC,IAA0B,EAAE,OAAwB;QAC1D,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"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.d.mts","sourceRoot":"","sources":["../src/resources/webhook.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"webhook.d.mts","sourceRoot":"","sources":["../src/resources/webhook.ts"],"names":[],"mappings":"AAEA,oCAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../src/resources/webhook.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"webhook.d.ts","sourceRoot":"","sources":["../src/resources/webhook.ts"],"names":[],"mappings":"AAEA,mCAAgC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhook.mjs","sourceRoot":"","sources":["../src/resources/webhook.ts"],"names":[],"mappings":"AAAA,sFAAsF"}
|
|
1
|
+
{"version":3,"file":"webhook.mjs","sourceRoot":"","sources":["../src/resources/webhook.ts"],"names":[],"mappings":"AAAA,sFAAsF;AAEtF,oCAAgC"}
|
package/resources.d.mts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.mts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"resources.d.mts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
|
package/resources.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"resources.d.ts","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,qCAAkC"}
|
package/resources.mjs.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":""}
|
|
1
|
+
{"version":3,"file":"resources.mjs","sourceRoot":"","sources":["src/resources.ts"],"names":[],"mappings":"AAAA,sCAAkC"}
|
package/src/client.ts
CHANGED
|
@@ -13,6 +13,7 @@ import * as Shims from './internal/shims';
|
|
|
13
13
|
import * as Opts from './internal/request-options';
|
|
14
14
|
import { stringifyQuery } from './internal/utils/query';
|
|
15
15
|
import { VERSION } from './version';
|
|
16
|
+
import { RequestSigner } from './lib/request-signing';
|
|
16
17
|
import * as Errors from './core/error';
|
|
17
18
|
import * as Uploads from './core/uploads';
|
|
18
19
|
import * as API from './resources/index';
|
|
@@ -38,6 +39,19 @@ import {
|
|
|
38
39
|
CheckoutsessionRetrieveParams,
|
|
39
40
|
CheckoutsessionRetrieveResponse,
|
|
40
41
|
} from './resources/checkoutsession';
|
|
42
|
+
import {
|
|
43
|
+
Counterparties,
|
|
44
|
+
Counterparty,
|
|
45
|
+
CounterpartyActivateParams,
|
|
46
|
+
CounterpartyActivateResponse,
|
|
47
|
+
CounterpartyCreateParams,
|
|
48
|
+
CounterpartyListParams,
|
|
49
|
+
CounterpartyListResponse,
|
|
50
|
+
CounterpartyRetrieveParams,
|
|
51
|
+
CounterpartyRetrieveResponse,
|
|
52
|
+
CounterpartyUpdateParams,
|
|
53
|
+
CounterpartyUpdateResponse,
|
|
54
|
+
} from './resources/counterparties';
|
|
41
55
|
import {
|
|
42
56
|
CustomerCreateParams,
|
|
43
57
|
CustomerCreateResponse,
|
|
@@ -52,15 +66,6 @@ import {
|
|
|
52
66
|
Customers,
|
|
53
67
|
} from './resources/customers';
|
|
54
68
|
import { DepositRetrieveParams, DepositRetrieveResponse, Deposits } from './resources/deposits';
|
|
55
|
-
import {
|
|
56
|
-
Fx,
|
|
57
|
-
FxExecuteParams,
|
|
58
|
-
FxExecuteResponse,
|
|
59
|
-
FxRetrieveParams,
|
|
60
|
-
FxRetrieveRateParams,
|
|
61
|
-
FxRetrieveRateResponse,
|
|
62
|
-
FxRetrieveResponse,
|
|
63
|
-
} from './resources/fx';
|
|
64
69
|
import {
|
|
65
70
|
OrderCreateParams,
|
|
66
71
|
OrderCreateResponse,
|
|
@@ -123,6 +128,13 @@ const environments = {
|
|
|
123
128
|
type Environment = keyof typeof environments;
|
|
124
129
|
|
|
125
130
|
export interface ClientOptions {
|
|
131
|
+
/**
|
|
132
|
+
* Unencrypted PKCS#8 Ed25519 or P-256 private PEM key for automatic request signing.
|
|
133
|
+
* Defaults to process.env['IVY_SIGNING_PRIVATE_KEY']. Kept client-side.
|
|
134
|
+
* Pass null to disable signing on a client created with withOptions().
|
|
135
|
+
*/
|
|
136
|
+
signingPrivateKey?: string | null | undefined;
|
|
137
|
+
|
|
126
138
|
/**
|
|
127
139
|
* API key for authentication with Ivy API
|
|
128
140
|
*/
|
|
@@ -223,6 +235,7 @@ export class Ivy {
|
|
|
223
235
|
#encoder: Opts.RequestEncoder;
|
|
224
236
|
protected idempotencyHeader?: string;
|
|
225
237
|
private _options: ClientOptions;
|
|
238
|
+
#requestSigner: RequestSigner | undefined;
|
|
226
239
|
|
|
227
240
|
/**
|
|
228
241
|
* API Client for interfacing with the Ivy API.
|
|
@@ -238,6 +251,7 @@ export class Ivy {
|
|
|
238
251
|
* @param {Record<string, string | undefined>} opts.defaultQuery - Default query parameters to include with every request to the API.
|
|
239
252
|
*/
|
|
240
253
|
constructor({
|
|
254
|
+
signingPrivateKey = readEnv('IVY_SIGNING_PRIVATE_KEY'),
|
|
241
255
|
baseURL = readEnv('IVY_BASE_URL'),
|
|
242
256
|
apiKey = readEnv('IVY_API_KEY'),
|
|
243
257
|
...opts
|
|
@@ -288,6 +302,7 @@ export class Ivy {
|
|
|
288
302
|
options.defaultHeaders = { ...parsed, ...options.defaultHeaders };
|
|
289
303
|
}
|
|
290
304
|
|
|
305
|
+
this.#requestSigner = signingPrivateKey == null ? undefined : new RequestSigner(signingPrivateKey);
|
|
291
306
|
this._options = options;
|
|
292
307
|
this.idempotencyHeader = 'Idempotency-Key';
|
|
293
308
|
|
|
@@ -311,6 +326,7 @@ export class Ivy {
|
|
|
311
326
|
apiKey: this.apiKey,
|
|
312
327
|
...options,
|
|
313
328
|
});
|
|
329
|
+
if (options.signingPrivateKey === undefined) client.#requestSigner = this.#requestSigner;
|
|
314
330
|
return client;
|
|
315
331
|
}
|
|
316
332
|
|
|
@@ -454,6 +470,7 @@ export class Ivy {
|
|
|
454
470
|
});
|
|
455
471
|
|
|
456
472
|
await this.prepareRequest(req, { url, options });
|
|
473
|
+
await this.#requestSigner?.sign(req, url, 'x-ivy-api-key');
|
|
457
474
|
|
|
458
475
|
/** Not an API request ID, just for correlating local log entries. */
|
|
459
476
|
const requestLogID = 'log_' + ((Math.random() * (1 << 24)) | 0).toString(16).padStart(6, '0');
|
|
@@ -776,11 +793,19 @@ export class Ivy {
|
|
|
776
793
|
return () => controller.abort();
|
|
777
794
|
}
|
|
778
795
|
|
|
779
|
-
private buildBody({ options
|
|
796
|
+
private buildBody({ options }: { options: FinalRequestOptions }): {
|
|
780
797
|
bodyHeaders: HeadersLike;
|
|
781
798
|
body: BodyInit | undefined;
|
|
782
799
|
} {
|
|
800
|
+
const { body, headers: rawHeaders } = options;
|
|
783
801
|
if (!body) {
|
|
802
|
+
// A resource method always passes a `body` key when its operation defines a
|
|
803
|
+
// request body, even if the caller omitted an optional body param. Keep the
|
|
804
|
+
// content-type for those, and only elide it for operations with no body at
|
|
805
|
+
// all (e.g. GET/DELETE).
|
|
806
|
+
if (body == null && 'body' in options) {
|
|
807
|
+
return this.#encoder({ body, headers: buildHeaders([rawHeaders]) });
|
|
808
|
+
}
|
|
784
809
|
return { bodyHeaders: undefined, body: undefined };
|
|
785
810
|
}
|
|
786
811
|
const headers = buildHeaders([rawHeaders]);
|
|
@@ -846,13 +871,13 @@ export class Ivy {
|
|
|
846
871
|
orders: API.Orders = new API.Orders(this);
|
|
847
872
|
deposits: API.Deposits = new API.Deposits(this);
|
|
848
873
|
returns: API.Returns = new API.Returns(this);
|
|
849
|
-
fx: API.Fx = new API.Fx(this);
|
|
850
874
|
beneficiaryPayouts: API.BeneficiaryPayouts = new API.BeneficiaryPayouts(this);
|
|
851
875
|
transactions: API.Transactions = new API.Transactions(this);
|
|
852
876
|
capabilities: API.Capabilities = new API.Capabilities(this);
|
|
853
877
|
refunds: API.Refunds = new API.Refunds(this);
|
|
854
878
|
payouts: API.Payouts = new API.Payouts(this);
|
|
855
879
|
subaccounts: API.Subaccounts = new API.Subaccounts(this);
|
|
880
|
+
counterparties: API.Counterparties = new API.Counterparties(this);
|
|
856
881
|
balance: API.Balance = new API.Balance(this);
|
|
857
882
|
webhook: API.Webhook = new API.Webhook(this);
|
|
858
883
|
payee: API.Payee = new API.Payee(this);
|
|
@@ -864,13 +889,13 @@ Ivy.Customers = Customers;
|
|
|
864
889
|
Ivy.Orders = Orders;
|
|
865
890
|
Ivy.Deposits = Deposits;
|
|
866
891
|
Ivy.Returns = Returns;
|
|
867
|
-
Ivy.Fx = Fx;
|
|
868
892
|
Ivy.BeneficiaryPayouts = BeneficiaryPayouts;
|
|
869
893
|
Ivy.Transactions = Transactions;
|
|
870
894
|
Ivy.Capabilities = Capabilities;
|
|
871
895
|
Ivy.Refunds = Refunds;
|
|
872
896
|
Ivy.Payouts = Payouts;
|
|
873
897
|
Ivy.Subaccounts = Subaccounts;
|
|
898
|
+
Ivy.Counterparties = Counterparties;
|
|
874
899
|
Ivy.Balance = Balance;
|
|
875
900
|
Ivy.Webhook = Webhook;
|
|
876
901
|
Ivy.Payee = Payee;
|
|
@@ -936,16 +961,6 @@ export declare namespace Ivy {
|
|
|
936
961
|
type ReturnRetrieveParams as ReturnRetrieveParams,
|
|
937
962
|
};
|
|
938
963
|
|
|
939
|
-
export {
|
|
940
|
-
Fx as Fx,
|
|
941
|
-
type FxRetrieveResponse as FxRetrieveResponse,
|
|
942
|
-
type FxExecuteResponse as FxExecuteResponse,
|
|
943
|
-
type FxRetrieveRateResponse as FxRetrieveRateResponse,
|
|
944
|
-
type FxRetrieveParams as FxRetrieveParams,
|
|
945
|
-
type FxExecuteParams as FxExecuteParams,
|
|
946
|
-
type FxRetrieveRateParams as FxRetrieveRateParams,
|
|
947
|
-
};
|
|
948
|
-
|
|
949
964
|
export {
|
|
950
965
|
BeneficiaryPayouts as BeneficiaryPayouts,
|
|
951
966
|
type BeneficiaryPayoutCreateResponse as BeneficiaryPayoutCreateResponse,
|
|
@@ -989,6 +1004,20 @@ export declare namespace Ivy {
|
|
|
989
1004
|
type SubaccountRetrieveParams as SubaccountRetrieveParams,
|
|
990
1005
|
};
|
|
991
1006
|
|
|
1007
|
+
export {
|
|
1008
|
+
Counterparties as Counterparties,
|
|
1009
|
+
type Counterparty as Counterparty,
|
|
1010
|
+
type CounterpartyRetrieveResponse as CounterpartyRetrieveResponse,
|
|
1011
|
+
type CounterpartyUpdateResponse as CounterpartyUpdateResponse,
|
|
1012
|
+
type CounterpartyListResponse as CounterpartyListResponse,
|
|
1013
|
+
type CounterpartyActivateResponse as CounterpartyActivateResponse,
|
|
1014
|
+
type CounterpartyCreateParams as CounterpartyCreateParams,
|
|
1015
|
+
type CounterpartyRetrieveParams as CounterpartyRetrieveParams,
|
|
1016
|
+
type CounterpartyUpdateParams as CounterpartyUpdateParams,
|
|
1017
|
+
type CounterpartyListParams as CounterpartyListParams,
|
|
1018
|
+
type CounterpartyActivateParams as CounterpartyActivateParams,
|
|
1019
|
+
};
|
|
1020
|
+
|
|
992
1021
|
export {
|
|
993
1022
|
Balance as Balance,
|
|
994
1023
|
type BalanceRetrieveResponse as BalanceRetrieveResponse,
|
|
@@ -106,6 +106,9 @@ export const formatRequestDetails = (details: {
|
|
|
106
106
|
([name, value]) => [
|
|
107
107
|
name,
|
|
108
108
|
(
|
|
109
|
+
name.toLowerCase() === 'signature' ||
|
|
110
|
+
name.toLowerCase() === 'signature-input' ||
|
|
111
|
+
name.toLowerCase() === 'content-digest' ||
|
|
109
112
|
name.toLowerCase() === 'authorization' ||
|
|
110
113
|
name.toLowerCase() === 'api-key' ||
|
|
111
114
|
name.toLowerCase() === 'x-api-key' ||
|