@getivy/node-sdk 0.1.0-alpha.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +24 -0
- package/LICENSE +201 -0
- package/README.md +303 -0
- package/_shims/MultipartBody.d.ts +9 -0
- package/_shims/MultipartBody.d.ts.map +1 -0
- package/_shims/MultipartBody.js +16 -0
- package/_shims/MultipartBody.js.map +1 -0
- package/_shims/MultipartBody.mjs +12 -0
- package/_shims/MultipartBody.mjs.map +1 -0
- package/_shims/README.md +46 -0
- package/_shims/auto/runtime-bun.d.ts +5 -0
- package/_shims/auto/runtime-bun.d.ts.map +1 -0
- package/_shims/auto/runtime-bun.js +21 -0
- package/_shims/auto/runtime-bun.js.map +1 -0
- package/_shims/auto/runtime-bun.mjs +2 -0
- package/_shims/auto/runtime-bun.mjs.map +1 -0
- package/_shims/auto/runtime-node.d.ts +5 -0
- package/_shims/auto/runtime-node.d.ts.map +1 -0
- package/_shims/auto/runtime-node.js +21 -0
- package/_shims/auto/runtime-node.js.map +1 -0
- package/_shims/auto/runtime-node.mjs +2 -0
- package/_shims/auto/runtime-node.mjs.map +1 -0
- package/_shims/auto/runtime.d.ts +5 -0
- package/_shims/auto/runtime.d.ts.map +1 -0
- package/_shims/auto/runtime.js +21 -0
- package/_shims/auto/runtime.js.map +1 -0
- package/_shims/auto/runtime.mjs +2 -0
- package/_shims/auto/runtime.mjs.map +1 -0
- package/_shims/auto/types-node.d.ts +5 -0
- package/_shims/auto/types-node.d.ts.map +1 -0
- package/_shims/auto/types-node.js +21 -0
- package/_shims/auto/types-node.js.map +1 -0
- package/_shims/auto/types-node.mjs +2 -0
- package/_shims/auto/types-node.mjs.map +1 -0
- package/_shims/auto/types.d.ts +101 -0
- package/_shims/auto/types.js +3 -0
- package/_shims/auto/types.mjs +3 -0
- package/_shims/bun-runtime.d.ts +6 -0
- package/_shims/bun-runtime.d.ts.map +1 -0
- package/_shims/bun-runtime.js +14 -0
- package/_shims/bun-runtime.js.map +1 -0
- package/_shims/bun-runtime.mjs +10 -0
- package/_shims/bun-runtime.mjs.map +1 -0
- package/_shims/index.d.ts +81 -0
- package/_shims/index.js +13 -0
- package/_shims/index.mjs +7 -0
- package/_shims/manual-types.d.ts +12 -0
- package/_shims/manual-types.js +3 -0
- package/_shims/manual-types.mjs +3 -0
- package/_shims/node-runtime.d.ts +3 -0
- package/_shims/node-runtime.d.ts.map +1 -0
- package/_shims/node-runtime.js +89 -0
- package/_shims/node-runtime.js.map +1 -0
- package/_shims/node-runtime.mjs +56 -0
- package/_shims/node-runtime.mjs.map +1 -0
- package/_shims/node-types.d.ts +42 -0
- package/_shims/node-types.js +3 -0
- package/_shims/node-types.mjs +3 -0
- package/_shims/registry.d.ts +37 -0
- package/_shims/registry.d.ts.map +1 -0
- package/_shims/registry.js +41 -0
- package/_shims/registry.js.map +1 -0
- package/_shims/registry.mjs +37 -0
- package/_shims/registry.mjs.map +1 -0
- package/_shims/web-runtime.d.ts +5 -0
- package/_shims/web-runtime.d.ts.map +1 -0
- package/_shims/web-runtime.js +78 -0
- package/_shims/web-runtime.js.map +1 -0
- package/_shims/web-runtime.mjs +71 -0
- package/_shims/web-runtime.mjs.map +1 -0
- package/_shims/web-types.d.ts +83 -0
- package/_shims/web-types.js +3 -0
- package/_shims/web-types.mjs +3 -0
- package/core.d.ts +241 -0
- package/core.d.ts.map +1 -0
- package/core.js +908 -0
- package/core.js.map +1 -0
- package/core.mjs +876 -0
- package/core.mjs.map +1 -0
- package/error.d.ts +47 -0
- package/error.d.ts.map +1 -0
- package/error.js +113 -0
- package/error.js.map +1 -0
- package/error.mjs +97 -0
- package/error.mjs.map +1 -0
- package/index.d.mts +157 -0
- package/index.d.ts +157 -0
- package/index.d.ts.map +1 -0
- package/index.js +164 -0
- package/index.js.map +1 -0
- package/index.mjs +121 -0
- package/index.mjs.map +1 -0
- package/package.json +103 -0
- package/resource.d.ts +6 -0
- package/resource.d.ts.map +1 -0
- package/resource.js +11 -0
- package/resource.js.map +1 -0
- package/resource.mjs +7 -0
- package/resource.mjs.map +1 -0
- package/resources/balance.d.ts +34 -0
- package/resources/balance.d.ts.map +1 -0
- package/resources/balance.js +16 -0
- package/resources/balance.js.map +1 -0
- package/resources/balance.mjs +12 -0
- package/resources/balance.mjs.map +1 -0
- package/resources/banks.d.ts +223 -0
- package/resources/banks.d.ts.map +1 -0
- package/resources/banks.js +30 -0
- package/resources/banks.js.map +1 -0
- package/resources/banks.mjs +26 -0
- package/resources/banks.mjs.map +1 -0
- package/resources/capabilities.d.ts +28 -0
- package/resources/capabilities.d.ts.map +1 -0
- package/resources/capabilities.js +16 -0
- package/resources/capabilities.js.map +1 -0
- package/resources/capabilities.mjs +12 -0
- package/resources/capabilities.mjs.map +1 -0
- package/resources/charges.d.ts +86 -0
- package/resources/charges.d.ts.map +1 -0
- package/resources/charges.js +15 -0
- package/resources/charges.js.map +1 -0
- package/resources/charges.mjs +11 -0
- package/resources/charges.mjs.map +1 -0
- package/resources/checkoutsession.d.ts +2370 -0
- package/resources/checkoutsession.d.ts.map +1 -0
- package/resources/checkoutsession.js +30 -0
- package/resources/checkoutsession.js.map +1 -0
- package/resources/checkoutsession.mjs +26 -0
- package/resources/checkoutsession.mjs.map +1 -0
- package/resources/customers.d.ts +37 -0
- package/resources/customers.d.ts.map +1 -0
- package/resources/customers.js +21 -0
- package/resources/customers.js.map +1 -0
- package/resources/customers.mjs +17 -0
- package/resources/customers.mjs.map +1 -0
- package/resources/index.d.ts +13 -0
- package/resources/index.d.ts.map +1 -0
- package/resources/index.js +29 -0
- package/resources/index.js.map +1 -0
- package/resources/index.mjs +14 -0
- package/resources/index.mjs.map +1 -0
- package/resources/mandates.d.ts +91 -0
- package/resources/mandates.d.ts.map +1 -0
- package/resources/mandates.js +27 -0
- package/resources/mandates.js.map +1 -0
- package/resources/mandates.mjs +23 -0
- package/resources/mandates.mjs.map +1 -0
- package/resources/orders.d.ts +1255 -0
- package/resources/orders.d.ts.map +1 -0
- package/resources/orders.js +23 -0
- package/resources/orders.js.map +1 -0
- package/resources/orders.mjs +19 -0
- package/resources/orders.mjs.map +1 -0
- package/resources/payouts.d.ts +224 -0
- package/resources/payouts.d.ts.map +1 -0
- package/resources/payouts.js +28 -0
- package/resources/payouts.js.map +1 -0
- package/resources/payouts.mjs +24 -0
- package/resources/payouts.mjs.map +1 -0
- package/resources/refunds.d.ts +138 -0
- package/resources/refunds.d.ts.map +1 -0
- package/resources/refunds.js +28 -0
- package/resources/refunds.js.map +1 -0
- package/resources/refunds.mjs +24 -0
- package/resources/refunds.mjs.map +1 -0
- package/resources/reports.d.ts +120 -0
- package/resources/reports.d.ts.map +1 -0
- package/resources/reports.js +31 -0
- package/resources/reports.js.map +1 -0
- package/resources/reports.mjs +27 -0
- package/resources/reports.mjs.map +1 -0
- package/resources/subaccounts.d.ts +49 -0
- package/resources/subaccounts.d.ts.map +1 -0
- package/resources/subaccounts.js +22 -0
- package/resources/subaccounts.js.map +1 -0
- package/resources/subaccounts.mjs +18 -0
- package/resources/subaccounts.mjs.map +1 -0
- package/shims/node.d.ts +30 -0
- package/shims/node.d.ts.map +1 -0
- package/shims/node.js +31 -0
- package/shims/node.js.map +1 -0
- package/shims/node.mjs +5 -0
- package/shims/node.mjs.map +1 -0
- package/shims/web.d.ts +26 -0
- package/shims/web.d.ts.map +1 -0
- package/shims/web.js +31 -0
- package/shims/web.js.map +1 -0
- package/shims/web.mjs +5 -0
- package/shims/web.mjs.map +1 -0
- package/src/_shims/MultipartBody.ts +9 -0
- package/src/_shims/README.md +46 -0
- package/src/_shims/auto/runtime-bun.ts +4 -0
- package/src/_shims/auto/runtime-node.ts +4 -0
- package/src/_shims/auto/runtime.ts +4 -0
- package/src/_shims/auto/types-node.ts +4 -0
- package/src/_shims/auto/types.d.ts +101 -0
- package/src/_shims/auto/types.js +3 -0
- package/src/_shims/auto/types.mjs +3 -0
- package/src/_shims/bun-runtime.ts +14 -0
- package/src/_shims/index.d.ts +81 -0
- package/src/_shims/index.js +13 -0
- package/src/_shims/index.mjs +7 -0
- package/src/_shims/manual-types.d.ts +12 -0
- package/src/_shims/manual-types.js +3 -0
- package/src/_shims/manual-types.mjs +3 -0
- package/src/_shims/node-runtime.ts +81 -0
- package/src/_shims/node-types.d.ts +42 -0
- package/src/_shims/node-types.js +3 -0
- package/src/_shims/node-types.mjs +3 -0
- package/src/_shims/registry.ts +67 -0
- package/src/_shims/web-runtime.ts +103 -0
- package/src/_shims/web-types.d.ts +83 -0
- package/src/_shims/web-types.js +3 -0
- package/src/_shims/web-types.mjs +3 -0
- package/src/core.ts +1200 -0
- package/src/error.ts +130 -0
- package/src/index.ts +393 -0
- package/src/lib/.keep +4 -0
- package/src/resource.ts +11 -0
- package/src/resources/balance.ts +49 -0
- package/src/resources/banks.ts +1536 -0
- package/src/resources/capabilities.ts +291 -0
- package/src/resources/charges.ts +108 -0
- package/src/resources/checkoutsession.ts +9254 -0
- package/src/resources/customers.ts +60 -0
- package/src/resources/index.ts +75 -0
- package/src/resources/mandates.ts +135 -0
- package/src/resources/orders.ts +3195 -0
- package/src/resources/payouts.ts +297 -0
- package/src/resources/refunds.ts +184 -0
- package/src/resources/reports.ts +172 -0
- package/src/resources/subaccounts.ts +73 -0
- package/src/shims/node.ts +50 -0
- package/src/shims/web.ts +50 -0
- package/src/tsconfig.json +11 -0
- package/src/uploads.ts +255 -0
- package/src/version.ts +1 -0
- package/uploads.d.ts +75 -0
- package/uploads.d.ts.map +1 -0
- package/uploads.js +171 -0
- package/uploads.js.map +1 -0
- package/uploads.mjs +158 -0
- package/uploads.mjs.map +1 -0
- package/version.d.ts +2 -0
- package/version.d.ts.map +1 -0
- package/version.js +5 -0
- package/version.js.map +1 -0
- package/version.mjs +2 -0
- package/version.mjs.map +1 -0
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
import { APIResource } from "../resource.js";
|
|
2
|
+
import * as Core from "../core.js";
|
|
3
|
+
export declare class Reports extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Create a Payout Report for a given timerange. A Payout Report is generated
|
|
6
|
+
* async. Please follow [this guide](https://docs.getivy.de/docs/payout-report-1)
|
|
7
|
+
* to learn more in detail.
|
|
8
|
+
*/
|
|
9
|
+
create(body: ReportCreateParams, options?: Core.RequestOptions): Core.APIPromise<ReportCreateResponse>;
|
|
10
|
+
/**
|
|
11
|
+
* Retrieve the status of an existing Payout Report. Use this endpoint to poll for
|
|
12
|
+
* the status before downloading a Payout Report.
|
|
13
|
+
*/
|
|
14
|
+
retrieve(body: ReportRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<ReportRetrieveResponse>;
|
|
15
|
+
/**
|
|
16
|
+
* Download the actual Payout Report once the creation succeeded with this
|
|
17
|
+
* endpoint.
|
|
18
|
+
*/
|
|
19
|
+
download(body: ReportDownloadParams, options?: Core.RequestOptions): Core.APIPromise<PayoutReport>;
|
|
20
|
+
}
|
|
21
|
+
export interface PayoutReport {
|
|
22
|
+
payouts: Array<PayoutReport.Payout>;
|
|
23
|
+
}
|
|
24
|
+
export declare namespace PayoutReport {
|
|
25
|
+
interface Payout {
|
|
26
|
+
id: string;
|
|
27
|
+
amount: number;
|
|
28
|
+
availableAt: string;
|
|
29
|
+
merchantAppId: string;
|
|
30
|
+
transactions: Array<Payout.Transaction>;
|
|
31
|
+
}
|
|
32
|
+
namespace Payout {
|
|
33
|
+
interface Transaction {
|
|
34
|
+
currency: 'EUR' | 'GBP' | 'PLN';
|
|
35
|
+
fee: number;
|
|
36
|
+
gross: number;
|
|
37
|
+
net: number;
|
|
38
|
+
reportingCategory: string;
|
|
39
|
+
billingFullName?: string;
|
|
40
|
+
createdAt?: string;
|
|
41
|
+
description?: string;
|
|
42
|
+
displayId?: string;
|
|
43
|
+
orderId?: string;
|
|
44
|
+
referenceId?: string;
|
|
45
|
+
subaccountId?: string;
|
|
46
|
+
userMail?: string;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
export interface ReportCreateResponse {
|
|
51
|
+
/**
|
|
52
|
+
* The unique identifier of the new Payout Report Object that was created.
|
|
53
|
+
*/
|
|
54
|
+
id: string;
|
|
55
|
+
/**
|
|
56
|
+
* Status of the Payout Report creation. This will be `pending` when the run is
|
|
57
|
+
* initially created. As soon as the report is created, this will be set to
|
|
58
|
+
* `succeeded`. Rarely, we may encounter an error, at which point this will be set
|
|
59
|
+
* to `failed`. See [the guide](https://docs.getivy.de/docs/payout-report-1) to
|
|
60
|
+
* learn more.
|
|
61
|
+
*/
|
|
62
|
+
status: string;
|
|
63
|
+
/**
|
|
64
|
+
* @deprecated
|
|
65
|
+
*/
|
|
66
|
+
fileUrl?: string;
|
|
67
|
+
}
|
|
68
|
+
export interface ReportRetrieveResponse {
|
|
69
|
+
/**
|
|
70
|
+
* Status of this Payout Report creation. This will be `pending` when the run is
|
|
71
|
+
* initially created. When the run finishes, this will be set to `succeeded`.
|
|
72
|
+
* Rarely, we may encounter an error, at which point this will be set to `failed`.
|
|
73
|
+
*/
|
|
74
|
+
status: string;
|
|
75
|
+
/**
|
|
76
|
+
* @deprecated
|
|
77
|
+
*/
|
|
78
|
+
fileUrl?: string;
|
|
79
|
+
}
|
|
80
|
+
export interface ReportCreateParams {
|
|
81
|
+
/**
|
|
82
|
+
* Unix timestamp. The end of the timerange to create a Payout Report for.
|
|
83
|
+
*/
|
|
84
|
+
intervalEnd: number;
|
|
85
|
+
/**
|
|
86
|
+
* Unix timestamp. The start of the timerange to create a Payout Report for.
|
|
87
|
+
*/
|
|
88
|
+
intervalStart: number;
|
|
89
|
+
/**
|
|
90
|
+
* If provided, the report will be generated for this currency only. If not
|
|
91
|
+
* provided, the report will be generated for all currencies.
|
|
92
|
+
*/
|
|
93
|
+
currency?: 'EUR' | 'GBP' | 'PLN';
|
|
94
|
+
/**
|
|
95
|
+
* Optional URL of a webhook. If provided, the report, once generated, will be sent
|
|
96
|
+
* there in JSON format.
|
|
97
|
+
*/
|
|
98
|
+
webhookUrl?: string;
|
|
99
|
+
}
|
|
100
|
+
export interface ReportRetrieveParams {
|
|
101
|
+
/**
|
|
102
|
+
* The unique identifier of the Payout Report to retrieve.
|
|
103
|
+
*/
|
|
104
|
+
reportId: string;
|
|
105
|
+
}
|
|
106
|
+
export interface ReportDownloadParams {
|
|
107
|
+
/**
|
|
108
|
+
* The unique identifier of the report you want to download. This was returned when
|
|
109
|
+
* creating a new Payout Report.
|
|
110
|
+
*/
|
|
111
|
+
reportId: string;
|
|
112
|
+
/**
|
|
113
|
+
* The format in which you want to download the report. Default is csv.
|
|
114
|
+
*/
|
|
115
|
+
format?: 'csv' | 'json' | 'datev';
|
|
116
|
+
}
|
|
117
|
+
export declare namespace Reports {
|
|
118
|
+
export { type PayoutReport as PayoutReport, type ReportCreateResponse as ReportCreateResponse, type ReportRetrieveResponse as ReportRetrieveResponse, type ReportCreateParams as ReportCreateParams, type ReportRetrieveParams as ReportRetrieveParams, type ReportDownloadParams as ReportDownloadParams, };
|
|
119
|
+
}
|
|
120
|
+
//# sourceMappingURL=reports.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reports.d.ts","sourceRoot":"","sources":["../src/resources/reports.ts"],"names":[],"mappings":"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"}
|
|
@@ -0,0 +1,31 @@
|
|
|
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.Reports = void 0;
|
|
5
|
+
const resource_1 = require("../resource.js");
|
|
6
|
+
class Reports extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a Payout Report for a given timerange. A Payout Report is generated
|
|
9
|
+
* async. Please follow [this guide](https://docs.getivy.de/docs/payout-report-1)
|
|
10
|
+
* to learn more in detail.
|
|
11
|
+
*/
|
|
12
|
+
create(body, options) {
|
|
13
|
+
return this._client.post('/api/service/merchant/payout/export/create', { body, ...options });
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Retrieve the status of an existing Payout Report. Use this endpoint to poll for
|
|
17
|
+
* the status before downloading a Payout Report.
|
|
18
|
+
*/
|
|
19
|
+
retrieve(body, options) {
|
|
20
|
+
return this._client.post('/api/service/merchant/payout/export/retrieve', { body, ...options });
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Download the actual Payout Report once the creation succeeded with this
|
|
24
|
+
* endpoint.
|
|
25
|
+
*/
|
|
26
|
+
download(body, options) {
|
|
27
|
+
return this._client.post('/api/service/merchant/payout/export/download', { body, ...options });
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
exports.Reports = Reports;
|
|
31
|
+
//# sourceMappingURL=reports.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reports.js","sourceRoot":"","sources":["../src/resources/reports.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,OAAQ,SAAQ,sBAAW;IACtC;;;;OAIG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4CAA4C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;OAGG;IACH,QAAQ,CACN,IAA0B,EAC1B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,IAA0B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;CACF;AA5BD,0BA4BC"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
// File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.
|
|
2
|
+
import { APIResource } from "../resource.mjs";
|
|
3
|
+
export class Reports extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Create a Payout Report for a given timerange. A Payout Report is generated
|
|
6
|
+
* async. Please follow [this guide](https://docs.getivy.de/docs/payout-report-1)
|
|
7
|
+
* to learn more in detail.
|
|
8
|
+
*/
|
|
9
|
+
create(body, options) {
|
|
10
|
+
return this._client.post('/api/service/merchant/payout/export/create', { body, ...options });
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Retrieve the status of an existing Payout Report. Use this endpoint to poll for
|
|
14
|
+
* the status before downloading a Payout Report.
|
|
15
|
+
*/
|
|
16
|
+
retrieve(body, options) {
|
|
17
|
+
return this._client.post('/api/service/merchant/payout/export/retrieve', { body, ...options });
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Download the actual Payout Report once the creation succeeded with this
|
|
21
|
+
* endpoint.
|
|
22
|
+
*/
|
|
23
|
+
download(body, options) {
|
|
24
|
+
return this._client.post('/api/service/merchant/payout/export/download', { body, ...options });
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=reports.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reports.mjs","sourceRoot":"","sources":["../src/resources/reports.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,OAAQ,SAAQ,WAAW;IACtC;;;;OAIG;IACH,MAAM,CAAC,IAAwB,EAAE,OAA6B;QAC5D,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,4CAA4C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAC/F,CAAC;IAED;;;OAGG;IACH,QAAQ,CACN,IAA0B,EAC1B,OAA6B;QAE7B,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;IAED;;;OAGG;IACH,QAAQ,CAAC,IAA0B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,8CAA8C,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACjG,CAAC;CACF"}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { APIResource } from "../resource.js";
|
|
2
|
+
import * as Core from "../core.js";
|
|
3
|
+
export declare class Subaccounts extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Create a Subaccount which can be used to reconcile orders, refunds and payouts
|
|
6
|
+
* more easily.
|
|
7
|
+
*/
|
|
8
|
+
create(body: SubaccountCreateParams, options?: Core.RequestOptions): Core.APIPromise<Subaccount>;
|
|
9
|
+
/**
|
|
10
|
+
* Retrieve a Subaccount by id.
|
|
11
|
+
*/
|
|
12
|
+
retrieve(body: SubaccountRetrieveParams, options?: Core.RequestOptions): Core.APIPromise<Subaccount>;
|
|
13
|
+
}
|
|
14
|
+
export interface Subaccount {
|
|
15
|
+
id: string;
|
|
16
|
+
legalName: string;
|
|
17
|
+
mcc: string;
|
|
18
|
+
ownerId: string;
|
|
19
|
+
status: 'active' | 'inactive';
|
|
20
|
+
createdAt?: string;
|
|
21
|
+
updatedAt?: string;
|
|
22
|
+
websiteUrl?: string;
|
|
23
|
+
}
|
|
24
|
+
export interface SubaccountCreateParams {
|
|
25
|
+
/**
|
|
26
|
+
* The legal name of the Subaccount
|
|
27
|
+
*/
|
|
28
|
+
legalName: string;
|
|
29
|
+
/**
|
|
30
|
+
* The merchant category code of the Subaccount. See
|
|
31
|
+
* [here](https://www.citibank.com/tts/solutions/commercial-cards/assets/docs/govt/Merchant-Category-Codes.pdf)
|
|
32
|
+
* for more information.
|
|
33
|
+
*/
|
|
34
|
+
mcc: string;
|
|
35
|
+
/**
|
|
36
|
+
* The website url of the Subaccount
|
|
37
|
+
*/
|
|
38
|
+
websiteUrl?: string;
|
|
39
|
+
}
|
|
40
|
+
export interface SubaccountRetrieveParams {
|
|
41
|
+
/**
|
|
42
|
+
* The unique identifier of the Subaccount
|
|
43
|
+
*/
|
|
44
|
+
id: string;
|
|
45
|
+
}
|
|
46
|
+
export declare namespace Subaccounts {
|
|
47
|
+
export { type Subaccount as Subaccount, type SubaccountCreateParams as SubaccountCreateParams, type SubaccountRetrieveParams as SubaccountRetrieveParams, };
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=subaccounts.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subaccounts.d.ts","sourceRoot":"","sources":["../src/resources/subaccounts.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAC;AAC1C,OAAO,KAAK,IAAI,MAAM,SAAS,CAAC;AAEhC,qBAAa,WAAY,SAAQ,WAAW;IAC1C;;;OAGG;IACH,MAAM,CAAC,IAAI,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;IAIhG;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,wBAAwB,EAAE,OAAO,CAAC,EAAE,IAAI,CAAC,cAAc,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC;CAGrG;AAED,MAAM,WAAW,UAAU;IACzB,EAAE,EAAE,MAAM,CAAC;IAEX,SAAS,EAAE,MAAM,CAAC;IAElB,GAAG,EAAE,MAAM,CAAC;IAEZ,OAAO,EAAE,MAAM,CAAC;IAEhB,MAAM,EAAE,QAAQ,GAAG,UAAU,CAAC;IAE9B,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,sBAAsB;IACrC;;OAEG;IACH,SAAS,EAAE,MAAM,CAAC;IAElB;;;;OAIG;IACH,GAAG,EAAE,MAAM,CAAC;IAEZ;;OAEG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,wBAAwB;IACvC;;OAEG;IACH,EAAE,EAAE,MAAM,CAAC;CACZ;AAED,MAAM,CAAC,OAAO,WAAW,WAAW,CAAC;IACnC,OAAO,EACL,KAAK,UAAU,IAAI,UAAU,EAC7B,KAAK,sBAAsB,IAAI,sBAAsB,EACrD,KAAK,wBAAwB,IAAI,wBAAwB,GAC1D,CAAC;CACH"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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.Subaccounts = void 0;
|
|
5
|
+
const resource_1 = require("../resource.js");
|
|
6
|
+
class Subaccounts extends resource_1.APIResource {
|
|
7
|
+
/**
|
|
8
|
+
* Create a Subaccount which can be used to reconcile orders, refunds and payouts
|
|
9
|
+
* more easily.
|
|
10
|
+
*/
|
|
11
|
+
create(body, options) {
|
|
12
|
+
return this._client.post('/api/service/subaccount/create', { body, ...options });
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Retrieve a Subaccount by id.
|
|
16
|
+
*/
|
|
17
|
+
retrieve(body, options) {
|
|
18
|
+
return this._client.post('/api/service/subaccount/retrieve', { body, ...options });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
exports.Subaccounts = Subaccounts;
|
|
22
|
+
//# sourceMappingURL=subaccounts.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subaccounts.js","sourceRoot":"","sources":["../src/resources/subaccounts.ts"],"names":[],"mappings":";AAAA,sFAAsF;;;AAEtF,6CAA0C;AAG1C,MAAa,WAAY,SAAQ,sBAAW;IAC1C;;;OAGG;IACH,MAAM,CAAC,IAA4B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,IAA8B,EAAE,OAA6B;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF;AAfD,kCAeC"}
|
|
@@ -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
|
+
export class Subaccounts extends APIResource {
|
|
4
|
+
/**
|
|
5
|
+
* Create a Subaccount which can be used to reconcile orders, refunds and payouts
|
|
6
|
+
* more easily.
|
|
7
|
+
*/
|
|
8
|
+
create(body, options) {
|
|
9
|
+
return this._client.post('/api/service/subaccount/create', { body, ...options });
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Retrieve a Subaccount by id.
|
|
13
|
+
*/
|
|
14
|
+
retrieve(body, options) {
|
|
15
|
+
return this._client.post('/api/service/subaccount/retrieve', { body, ...options });
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=subaccounts.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subaccounts.mjs","sourceRoot":"","sources":["../src/resources/subaccounts.ts"],"names":[],"mappings":"AAAA,sFAAsF;OAE/E,EAAE,WAAW,EAAE;AAGtB,MAAM,OAAO,WAAY,SAAQ,WAAW;IAC1C;;;OAGG;IACH,MAAM,CAAC,IAA4B,EAAE,OAA6B;QAChE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,gCAAgC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACnF,CAAC;IAED;;OAEG;IACH,QAAQ,CAAC,IAA8B,EAAE,OAA6B;QACpE,OAAO,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,kCAAkC,EAAE,EAAE,IAAI,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IACrF,CAAC;CACF"}
|
package/shims/node.d.ts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
import * as types from "../_shims/node-types.js";
|
|
6
|
+
declare module '../_shims/manual-types' {
|
|
7
|
+
namespace manual {
|
|
8
|
+
type Agent = types.Agent;
|
|
9
|
+
export import fetch = types.fetch;
|
|
10
|
+
type Request = types.Request;
|
|
11
|
+
type RequestInfo = types.RequestInfo;
|
|
12
|
+
type RequestInit = types.RequestInit;
|
|
13
|
+
type Response = types.Response;
|
|
14
|
+
type ResponseInit = types.ResponseInit;
|
|
15
|
+
type ResponseType = types.ResponseType;
|
|
16
|
+
type BodyInit = types.BodyInit;
|
|
17
|
+
type Headers = types.Headers;
|
|
18
|
+
type HeadersInit = types.HeadersInit;
|
|
19
|
+
type BlobPropertyBag = types.BlobPropertyBag;
|
|
20
|
+
type FilePropertyBag = types.FilePropertyBag;
|
|
21
|
+
type FileFromPathOptions = types.FileFromPathOptions;
|
|
22
|
+
export import FormData = types.FormData;
|
|
23
|
+
export import File = types.File;
|
|
24
|
+
export import Blob = types.Blob;
|
|
25
|
+
type Readable = types.Readable;
|
|
26
|
+
type FsReadStream = types.FsReadStream;
|
|
27
|
+
export import ReadableStream = types.ReadableStream;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=node.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.d.ts","sourceRoot":"","sources":["../src/shims/node.ts"],"names":[],"mappings":";;;;AACA,OAAO,KAAK,KAAK,MAAM,sBAAsB,CAAC;AAK9C,OAAO,QAAQ,wBAAwB,CAAC;IACtC,UAAiB,MAAM,CAAC;QAEtB,KAAY,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAEhC,MAAM,QAAQ,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAElC,KAAY,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAEpC,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAEpC,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAEpD,KAAY,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAEpD,KAAY,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;QAE5D,MAAM,QAAQ,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAExC,MAAM,QAAQ,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEhC,MAAM,QAAQ,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEhC,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,MAAM,QAAQ,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;KACrD;CACF"}
|
package/shims/node.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
const types = __importStar(require("../_shims/node-types.js"));
|
|
28
|
+
const registry_1 = require("../_shims/registry.js");
|
|
29
|
+
const node_runtime_1 = require("../_shims/node-runtime.js");
|
|
30
|
+
(0, registry_1.setShims)((0, node_runtime_1.getRuntime)());
|
|
31
|
+
//# sourceMappingURL=node.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.js","sourceRoot":"","sources":["../src/shims/node.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,aAAa;AACb,+DAA8C;AAC9C,oDAA8C;AAC9C,4DAAoD;AACpD,IAAA,mBAAQ,EAAC,IAAA,yBAAU,GAAE,CAAC,CAAC"}
|
package/shims/node.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"node.mjs","sourceRoot":"","sources":["../src/shims/node.ts"],"names":[],"mappings":"OACO,KAAK,KAAK;OACV,EAAE,QAAQ,EAAE;OACZ,EAAE,UAAU,EAAE;AACrB,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC"}
|
package/shims/web.d.ts
ADDED
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import * as types from "../_shims/web-types.js";
|
|
2
|
+
declare module '../_shims/manual-types' {
|
|
3
|
+
namespace manual {
|
|
4
|
+
type Agent = types.Agent;
|
|
5
|
+
export import fetch = types.fetch;
|
|
6
|
+
type Request = types.Request;
|
|
7
|
+
type RequestInfo = types.RequestInfo;
|
|
8
|
+
type RequestInit = types.RequestInit;
|
|
9
|
+
type Response = types.Response;
|
|
10
|
+
type ResponseInit = types.ResponseInit;
|
|
11
|
+
type ResponseType = types.ResponseType;
|
|
12
|
+
type BodyInit = types.BodyInit;
|
|
13
|
+
type Headers = types.Headers;
|
|
14
|
+
type HeadersInit = types.HeadersInit;
|
|
15
|
+
type BlobPropertyBag = types.BlobPropertyBag;
|
|
16
|
+
type FilePropertyBag = types.FilePropertyBag;
|
|
17
|
+
type FileFromPathOptions = types.FileFromPathOptions;
|
|
18
|
+
export import FormData = types.FormData;
|
|
19
|
+
export import File = types.File;
|
|
20
|
+
export import Blob = types.Blob;
|
|
21
|
+
type Readable = types.Readable;
|
|
22
|
+
type FsReadStream = types.FsReadStream;
|
|
23
|
+
export import ReadableStream = types.ReadableStream;
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
//# sourceMappingURL=web.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.d.ts","sourceRoot":"","sources":["../src/shims/web.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,KAAK,MAAM,qBAAqB,CAAC;AAK7C,OAAO,QAAQ,wBAAwB,CAAC;IACtC,UAAiB,MAAM,CAAC;QAEtB,KAAY,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAEhC,MAAM,QAAQ,KAAK,GAAG,KAAK,CAAC,KAAK,CAAC;QAElC,KAAY,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAEpC,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,OAAO,GAAG,KAAK,CAAC,OAAO,CAAC;QAEpC,KAAY,WAAW,GAAG,KAAK,CAAC,WAAW,CAAC;QAE5C,KAAY,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAEpD,KAAY,eAAe,GAAG,KAAK,CAAC,eAAe,CAAC;QAEpD,KAAY,mBAAmB,GAAG,KAAK,CAAC,mBAAmB,CAAC;QAE5D,MAAM,QAAQ,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAExC,MAAM,QAAQ,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEhC,MAAM,QAAQ,IAAI,GAAG,KAAK,CAAC,IAAI,CAAC;QAEhC,KAAY,QAAQ,GAAG,KAAK,CAAC,QAAQ,CAAC;QAEtC,KAAY,YAAY,GAAG,KAAK,CAAC,YAAY,CAAC;QAE9C,MAAM,QAAQ,cAAc,GAAG,KAAK,CAAC,cAAc,CAAC;KACrD;CACF"}
|
package/shims/web.js
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
14
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
15
|
+
}) : function(o, v) {
|
|
16
|
+
o["default"] = v;
|
|
17
|
+
});
|
|
18
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
|
19
|
+
if (mod && mod.__esModule) return mod;
|
|
20
|
+
var result = {};
|
|
21
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
|
22
|
+
__setModuleDefault(result, mod);
|
|
23
|
+
return result;
|
|
24
|
+
};
|
|
25
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
const types = __importStar(require("../_shims/web-types.js"));
|
|
28
|
+
const registry_1 = require("../_shims/registry.js");
|
|
29
|
+
const web_runtime_1 = require("../_shims/web-runtime.js");
|
|
30
|
+
(0, registry_1.setShims)((0, web_runtime_1.getRuntime)({ manuallyImported: true }));
|
|
31
|
+
//# sourceMappingURL=web.js.map
|
package/shims/web.js.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.js","sourceRoot":"","sources":["../src/shims/web.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAAA,aAAa;AACb,8DAA6C;AAC7C,oDAA8C;AAC9C,0DAAmD;AACnD,IAAA,mBAAQ,EAAC,IAAA,wBAAU,EAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC"}
|
package/shims/web.mjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"web.mjs","sourceRoot":"","sources":["../src/shims/web.ts"],"names":[],"mappings":"OACO,KAAK,KAAK;OACV,EAAE,QAAQ,EAAE;OACZ,EAAE,UAAU,EAAE;AACrB,QAAQ,CAAC,UAAU,CAAC,EAAE,gBAAgB,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# 👋 Wondering what everything in here does?
|
|
2
|
+
|
|
3
|
+
`@getivy/node-sdk` supports a wide variety of runtime environments like Node.js, Deno, Bun, browsers, and various
|
|
4
|
+
edge runtimes, as well as both CommonJS (CJS) and EcmaScript Modules (ESM).
|
|
5
|
+
|
|
6
|
+
To do this, `@getivy/node-sdk` provides shims for either using `node-fetch` when in Node (because `fetch` is still experimental there) or the global `fetch` API built into the environment when not in Node.
|
|
7
|
+
|
|
8
|
+
It uses [conditional exports](https://nodejs.org/api/packages.html#conditional-exports) to
|
|
9
|
+
automatically select the correct shims for each environment. However, conditional exports are a fairly new
|
|
10
|
+
feature and not supported everywhere. For instance, the TypeScript `"moduleResolution": "node"`
|
|
11
|
+
|
|
12
|
+
setting doesn't consult the `exports` map, compared to `"moduleResolution": "nodeNext"`, which does.
|
|
13
|
+
Unfortunately that's still the default setting, and it can result in errors like
|
|
14
|
+
getting the wrong raw `Response` type from `.asResponse()`, for example.
|
|
15
|
+
|
|
16
|
+
The user can work around these issues by manually importing one of:
|
|
17
|
+
|
|
18
|
+
- `import '@getivy/node-sdk/shims/node'`
|
|
19
|
+
- `import '@getivy/node-sdk/shims/web'`
|
|
20
|
+
|
|
21
|
+
All of the code here in `_shims` handles selecting the automatic default shims or manual overrides.
|
|
22
|
+
|
|
23
|
+
### How it works - Runtime
|
|
24
|
+
|
|
25
|
+
Runtime shims get installed by calling `setShims` exported by `@getivy/node-sdk/_shims/registry`.
|
|
26
|
+
|
|
27
|
+
Manually importing `@getivy/node-sdk/shims/node` or `@getivy/node-sdk/shims/web`, calls `setShims` with the respective runtime shims.
|
|
28
|
+
|
|
29
|
+
All client code imports shims from `@getivy/node-sdk/_shims/index`, which:
|
|
30
|
+
|
|
31
|
+
- checks if shims have been set manually
|
|
32
|
+
- if not, calls `setShims` with the shims from `@getivy/node-sdk/_shims/auto/runtime`
|
|
33
|
+
- re-exports the installed shims from `@getivy/node-sdk/_shims/registry`.
|
|
34
|
+
|
|
35
|
+
`@getivy/node-sdk/_shims/auto/runtime` exports web runtime shims.
|
|
36
|
+
If the `node` export condition is set, the export map replaces it with `@getivy/node-sdk/_shims/auto/runtime-node`.
|
|
37
|
+
|
|
38
|
+
### How it works - Type time
|
|
39
|
+
|
|
40
|
+
All client code imports shim types from `@getivy/node-sdk/_shims/index`, which selects the manual types from `@getivy/node-sdk/_shims/manual-types` if they have been declared, otherwise it exports the auto types from `@getivy/node-sdk/_shims/auto/types`.
|
|
41
|
+
|
|
42
|
+
`@getivy/node-sdk/_shims/manual-types` exports an empty namespace.
|
|
43
|
+
Manually importing `@getivy/node-sdk/shims/node` or `@getivy/node-sdk/shims/web` merges declarations into this empty namespace, so they get picked up by `@getivy/node-sdk/_shims/index`.
|
|
44
|
+
|
|
45
|
+
`@getivy/node-sdk/_shims/auto/types` exports web type definitions.
|
|
46
|
+
If the `node` export condition is set, the export map replaces it with `@getivy/node-sdk/_shims/auto/types-node`, though TS only picks this up if `"moduleResolution": "nodenext"` or `"moduleResolution": "bundler"`.
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Disclaimer: modules in _shims aren't intended to be imported by SDK users.
|
|
3
|
+
*/
|
|
4
|
+
export type Agent = any;
|
|
5
|
+
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
declare const _fetch: typeof fetch;
|
|
8
|
+
export { _fetch as fetch };
|
|
9
|
+
|
|
10
|
+
// @ts-ignore
|
|
11
|
+
type _Request = Request;
|
|
12
|
+
export { _Request as Request };
|
|
13
|
+
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
type _RequestInfo = RequestInfo;
|
|
16
|
+
export { type _RequestInfo as RequestInfo };
|
|
17
|
+
|
|
18
|
+
// @ts-ignore
|
|
19
|
+
type _RequestInit = RequestInit;
|
|
20
|
+
export { type _RequestInit as RequestInit };
|
|
21
|
+
|
|
22
|
+
// @ts-ignore
|
|
23
|
+
type _Response = Response;
|
|
24
|
+
export { _Response as Response };
|
|
25
|
+
|
|
26
|
+
// @ts-ignore
|
|
27
|
+
type _ResponseInit = ResponseInit;
|
|
28
|
+
export { type _ResponseInit as ResponseInit };
|
|
29
|
+
|
|
30
|
+
// @ts-ignore
|
|
31
|
+
type _ResponseType = ResponseType;
|
|
32
|
+
export { type _ResponseType as ResponseType };
|
|
33
|
+
|
|
34
|
+
// @ts-ignore
|
|
35
|
+
type _BodyInit = BodyInit;
|
|
36
|
+
export { type _BodyInit as BodyInit };
|
|
37
|
+
|
|
38
|
+
// @ts-ignore
|
|
39
|
+
type _Headers = Headers;
|
|
40
|
+
export { _Headers as Headers };
|
|
41
|
+
|
|
42
|
+
// @ts-ignore
|
|
43
|
+
type _HeadersInit = HeadersInit;
|
|
44
|
+
export { type _HeadersInit as HeadersInit };
|
|
45
|
+
|
|
46
|
+
type EndingType = 'native' | 'transparent';
|
|
47
|
+
|
|
48
|
+
export interface BlobPropertyBag {
|
|
49
|
+
endings?: EndingType;
|
|
50
|
+
type?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface FilePropertyBag extends BlobPropertyBag {
|
|
54
|
+
lastModified?: number;
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
export type FileFromPathOptions = Omit<FilePropertyBag, 'lastModified'>;
|
|
58
|
+
|
|
59
|
+
// @ts-ignore
|
|
60
|
+
type _FormData = FormData;
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
declare const _FormData: typeof FormData;
|
|
63
|
+
export { _FormData as FormData };
|
|
64
|
+
|
|
65
|
+
// @ts-ignore
|
|
66
|
+
type _File = File;
|
|
67
|
+
// @ts-ignore
|
|
68
|
+
declare const _File: typeof File;
|
|
69
|
+
export { _File as File };
|
|
70
|
+
|
|
71
|
+
// @ts-ignore
|
|
72
|
+
type _Blob = Blob;
|
|
73
|
+
// @ts-ignore
|
|
74
|
+
declare const _Blob: typeof Blob;
|
|
75
|
+
export { _Blob as Blob };
|
|
76
|
+
|
|
77
|
+
export declare class Readable {
|
|
78
|
+
readable: boolean;
|
|
79
|
+
readonly readableEnded: boolean;
|
|
80
|
+
readonly readableFlowing: boolean | null;
|
|
81
|
+
readonly readableHighWaterMark: number;
|
|
82
|
+
readonly readableLength: number;
|
|
83
|
+
readonly readableObjectMode: boolean;
|
|
84
|
+
destroyed: boolean;
|
|
85
|
+
read(size?: number): any;
|
|
86
|
+
pause(): this;
|
|
87
|
+
resume(): this;
|
|
88
|
+
isPaused(): boolean;
|
|
89
|
+
destroy(error?: Error): this;
|
|
90
|
+
[Symbol.asyncIterator](): AsyncIterableIterator<any>;
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
export declare class FsReadStream extends Readable {
|
|
94
|
+
path: {}; // node type is string | Buffer
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
// @ts-ignore
|
|
98
|
+
type _ReadableStream<R = any> = ReadableStream<R>;
|
|
99
|
+
// @ts-ignore
|
|
100
|
+
declare const _ReadableStream: typeof ReadableStream;
|
|
101
|
+
export { _ReadableStream as ReadableStream };
|