@stackup-fi/sdk 1.0.12 → 1.0.13
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/dist/v1/gen/sdk.gen.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { type Client, type Options as Options2, type TDataShape } from "./client/index.js";
|
|
2
|
-
import type { CheckoutSessionCreateErrors,
|
|
2
|
+
import type { CheckoutSessionCreateErrors, CheckoutSessionCreateResponseForType, CustomerCheckErrors, CustomerCheckResponses, CustomerCreateErrors, CustomerCreateResponses, CustomerDeleteErrors, CustomerDeleteResponses, CustomerGetErrors, CustomerGetResponses, CustomerListResponses, CustomerUpdateErrors, CustomerUpdateResponses, ProductCreateErrors, ProductCreateResponses, ProductDeleteErrors, ProductDeleteResponses, ProductGetErrors, ProductGetResponses, ProductListResponses, ProductUpdateErrors, ProductUpdateResponses } from "./types.gen.js";
|
|
3
3
|
export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
|
|
4
4
|
/**
|
|
5
5
|
* You can provide a client instance returned by `createClient()` instead of
|
|
@@ -151,12 +151,14 @@ export declare class Session extends HeyApiClient {
|
|
|
151
151
|
* console.log(session.url);
|
|
152
152
|
* ```
|
|
153
153
|
*/
|
|
154
|
-
create<ThrowOnError extends boolean = false>(parameters?: {
|
|
155
|
-
type?:
|
|
154
|
+
create<T extends "hosted" | "embedded" | undefined = undefined, ThrowOnError extends boolean = false>(parameters?: {
|
|
155
|
+
type?: T;
|
|
156
156
|
items?: Array<{
|
|
157
157
|
product: string;
|
|
158
158
|
}>;
|
|
159
|
-
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<
|
|
159
|
+
}, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<{
|
|
160
|
+
200: CheckoutSessionCreateResponseForType<T>;
|
|
161
|
+
}, CheckoutSessionCreateErrors, ThrowOnError, "fields">;
|
|
160
162
|
}
|
|
161
163
|
export declare class Checkout extends HeyApiClient {
|
|
162
164
|
private _session?;
|
|
@@ -462,3 +462,11 @@ export type CheckoutSessionCreateResponses = {
|
|
|
462
462
|
};
|
|
463
463
|
};
|
|
464
464
|
export type CheckoutSessionCreateResponse = CheckoutSessionCreateResponses[keyof CheckoutSessionCreateResponses];
|
|
465
|
+
export type CheckoutSessionCreateResponseForType<T extends "hosted" | "embedded" | undefined> = T extends "embedded" ? {
|
|
466
|
+
id: string;
|
|
467
|
+
type: "embedded";
|
|
468
|
+
} : {
|
|
469
|
+
id: string;
|
|
470
|
+
type: "hosted";
|
|
471
|
+
url: string;
|
|
472
|
+
};
|
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@stackup-fi/sdk",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.13",
|
|
4
4
|
"module": "index.ts",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
8
|
"import": "./dist/index.js",
|
|
9
9
|
"types": "./dist/index.d.ts"
|
|
10
|
+
},
|
|
11
|
+
"./checkout": {
|
|
12
|
+
"import": "./dist/checkout/index.js",
|
|
13
|
+
"types": "./dist/checkout/index.d.ts"
|
|
10
14
|
}
|
|
11
15
|
},
|
|
12
16
|
"scripts": {
|