@stackup-fi/sdk 1.0.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.
Files changed (36) hide show
  1. package/README.md +15 -0
  2. package/dist/client.d.ts +5 -0
  3. package/dist/client.js +19 -0
  4. package/dist/index.d.ts +8 -0
  5. package/dist/index.js +14 -0
  6. package/dist/v1/gen/client/client.gen.d.ts +2 -0
  7. package/dist/v1/gen/client/client.gen.js +228 -0
  8. package/dist/v1/gen/client/index.d.ts +8 -0
  9. package/dist/v1/gen/client/index.js +6 -0
  10. package/dist/v1/gen/client/types.gen.d.ts +117 -0
  11. package/dist/v1/gen/client/types.gen.js +2 -0
  12. package/dist/v1/gen/client/utils.gen.d.ts +33 -0
  13. package/dist/v1/gen/client/utils.gen.js +231 -0
  14. package/dist/v1/gen/client.gen.d.ts +12 -0
  15. package/dist/v1/gen/client.gen.js +3 -0
  16. package/dist/v1/gen/core/auth.gen.d.ts +18 -0
  17. package/dist/v1/gen/core/auth.gen.js +14 -0
  18. package/dist/v1/gen/core/bodySerializer.gen.d.ts +25 -0
  19. package/dist/v1/gen/core/bodySerializer.gen.js +57 -0
  20. package/dist/v1/gen/core/params.gen.d.ts +43 -0
  21. package/dist/v1/gen/core/params.gen.js +100 -0
  22. package/dist/v1/gen/core/pathSerializer.gen.d.ts +33 -0
  23. package/dist/v1/gen/core/pathSerializer.gen.js +114 -0
  24. package/dist/v1/gen/core/queryKeySerializer.gen.d.ts +18 -0
  25. package/dist/v1/gen/core/queryKeySerializer.gen.js +99 -0
  26. package/dist/v1/gen/core/serverSentEvents.gen.d.ts +71 -0
  27. package/dist/v1/gen/core/serverSentEvents.gen.js +137 -0
  28. package/dist/v1/gen/core/types.gen.d.ts +78 -0
  29. package/dist/v1/gen/core/types.gen.js +2 -0
  30. package/dist/v1/gen/core/utils.gen.d.ts +19 -0
  31. package/dist/v1/gen/core/utils.gen.js +87 -0
  32. package/dist/v1/gen/sdk.gen.d.ts +90 -0
  33. package/dist/v1/gen/sdk.gen.js +132 -0
  34. package/dist/v1/gen/types.gen.d.ts +290 -0
  35. package/dist/v1/gen/types.gen.js +2 -0
  36. package/package.json +22 -0
@@ -0,0 +1,99 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ /**
3
+ * Replacer that converts non-JSON values (bigint, Date, etc.) to safe substitutes.
4
+ */
5
+ export const queryKeyJsonReplacer = (_key, value) => {
6
+ if (value === undefined ||
7
+ typeof value === "function" ||
8
+ typeof value === "symbol") {
9
+ return undefined;
10
+ }
11
+ if (typeof value === "bigint") {
12
+ return value.toString();
13
+ }
14
+ if (value instanceof Date) {
15
+ return value.toISOString();
16
+ }
17
+ return value;
18
+ };
19
+ /**
20
+ * Safely stringifies a value and parses it back into a JsonValue.
21
+ */
22
+ export const stringifyToJsonValue = (input) => {
23
+ try {
24
+ const json = JSON.stringify(input, queryKeyJsonReplacer);
25
+ if (json === undefined) {
26
+ return undefined;
27
+ }
28
+ return JSON.parse(json);
29
+ }
30
+ catch {
31
+ return undefined;
32
+ }
33
+ };
34
+ /**
35
+ * Detects plain objects (including objects with a null prototype).
36
+ */
37
+ const isPlainObject = (value) => {
38
+ if (value === null || typeof value !== "object") {
39
+ return false;
40
+ }
41
+ const prototype = Object.getPrototypeOf(value);
42
+ return prototype === Object.prototype || prototype === null;
43
+ };
44
+ /**
45
+ * Turns URLSearchParams into a sorted JSON object for deterministic keys.
46
+ */
47
+ const serializeSearchParams = (params) => {
48
+ const entries = Array.from(params.entries()).sort(([a], [b]) => a.localeCompare(b));
49
+ const result = {};
50
+ for (const [key, value] of entries) {
51
+ const existing = result[key];
52
+ if (existing === undefined) {
53
+ result[key] = value;
54
+ continue;
55
+ }
56
+ if (Array.isArray(existing)) {
57
+ existing.push(value);
58
+ }
59
+ else {
60
+ result[key] = [existing, value];
61
+ }
62
+ }
63
+ return result;
64
+ };
65
+ /**
66
+ * Normalizes any accepted value into a JSON-friendly shape for query keys.
67
+ */
68
+ export const serializeQueryKeyValue = (value) => {
69
+ if (value === null) {
70
+ return null;
71
+ }
72
+ if (typeof value === "string" ||
73
+ typeof value === "number" ||
74
+ typeof value === "boolean") {
75
+ return value;
76
+ }
77
+ if (value === undefined ||
78
+ typeof value === "function" ||
79
+ typeof value === "symbol") {
80
+ return undefined;
81
+ }
82
+ if (typeof value === "bigint") {
83
+ return value.toString();
84
+ }
85
+ if (value instanceof Date) {
86
+ return value.toISOString();
87
+ }
88
+ if (Array.isArray(value)) {
89
+ return stringifyToJsonValue(value);
90
+ }
91
+ if (typeof URLSearchParams !== "undefined" &&
92
+ value instanceof URLSearchParams) {
93
+ return serializeSearchParams(value);
94
+ }
95
+ if (isPlainObject(value)) {
96
+ return stringifyToJsonValue(value);
97
+ }
98
+ return undefined;
99
+ };
@@ -0,0 +1,71 @@
1
+ import type { Config } from "./types.gen.js";
2
+ export type ServerSentEventsOptions<TData = unknown> = Omit<RequestInit, "method"> & Pick<Config, "method" | "responseTransformer" | "responseValidator"> & {
3
+ /**
4
+ * Fetch API implementation. You can use this option to provide a custom
5
+ * fetch instance.
6
+ *
7
+ * @default globalThis.fetch
8
+ */
9
+ fetch?: typeof fetch;
10
+ /**
11
+ * Implementing clients can call request interceptors inside this hook.
12
+ */
13
+ onRequest?: (url: string, init: RequestInit) => Promise<Request>;
14
+ /**
15
+ * Callback invoked when a network or parsing error occurs during streaming.
16
+ *
17
+ * This option applies only if the endpoint returns a stream of events.
18
+ *
19
+ * @param error The error that occurred.
20
+ */
21
+ onSseError?: (error: unknown) => void;
22
+ /**
23
+ * Callback invoked when an event is streamed from the server.
24
+ *
25
+ * This option applies only if the endpoint returns a stream of events.
26
+ *
27
+ * @param event Event streamed from the server.
28
+ * @returns Nothing (void).
29
+ */
30
+ onSseEvent?: (event: StreamEvent<TData>) => void;
31
+ serializedBody?: RequestInit["body"];
32
+ /**
33
+ * Default retry delay in milliseconds.
34
+ *
35
+ * This option applies only if the endpoint returns a stream of events.
36
+ *
37
+ * @default 3000
38
+ */
39
+ sseDefaultRetryDelay?: number;
40
+ /**
41
+ * Maximum number of retry attempts before giving up.
42
+ */
43
+ sseMaxRetryAttempts?: number;
44
+ /**
45
+ * Maximum retry delay in milliseconds.
46
+ *
47
+ * Applies only when exponential backoff is used.
48
+ *
49
+ * This option applies only if the endpoint returns a stream of events.
50
+ *
51
+ * @default 30000
52
+ */
53
+ sseMaxRetryDelay?: number;
54
+ /**
55
+ * Optional sleep function for retry backoff.
56
+ *
57
+ * Defaults to using `setTimeout`.
58
+ */
59
+ sseSleepFn?: (ms: number) => Promise<void>;
60
+ url: string;
61
+ };
62
+ export interface StreamEvent<TData = unknown> {
63
+ data: TData;
64
+ event?: string;
65
+ id?: string;
66
+ retry?: number;
67
+ }
68
+ export type ServerSentEventsResult<TData = unknown, TReturn = void, TNext = unknown> = {
69
+ stream: AsyncGenerator<TData extends Record<string, unknown> ? TData[keyof TData] : TData, TReturn, TNext>;
70
+ };
71
+ export declare const createSseClient: <TData = unknown>({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }: ServerSentEventsOptions) => ServerSentEventsResult<TData>;
@@ -0,0 +1,137 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export const createSseClient = ({ onRequest, onSseError, onSseEvent, responseTransformer, responseValidator, sseDefaultRetryDelay, sseMaxRetryAttempts, sseMaxRetryDelay, sseSleepFn, url, ...options }) => {
3
+ let lastEventId;
4
+ const sleep = sseSleepFn ??
5
+ ((ms) => new Promise((resolve) => setTimeout(resolve, ms)));
6
+ const createStream = async function* () {
7
+ let retryDelay = sseDefaultRetryDelay ?? 3000;
8
+ let attempt = 0;
9
+ const signal = options.signal ?? new AbortController().signal;
10
+ while (true) {
11
+ if (signal.aborted)
12
+ break;
13
+ attempt++;
14
+ const headers = options.headers instanceof Headers
15
+ ? options.headers
16
+ : new Headers(options.headers);
17
+ if (lastEventId !== undefined) {
18
+ headers.set("Last-Event-ID", lastEventId);
19
+ }
20
+ try {
21
+ const requestInit = {
22
+ redirect: "follow",
23
+ ...options,
24
+ body: options.serializedBody,
25
+ headers,
26
+ signal,
27
+ };
28
+ let request = new Request(url, requestInit);
29
+ if (onRequest) {
30
+ request = await onRequest(url, requestInit);
31
+ }
32
+ // fetch must be assigned here, otherwise it would throw the error:
33
+ // TypeError: Failed to execute 'fetch' on 'Window': Illegal invocation
34
+ const _fetch = options.fetch ?? globalThis.fetch;
35
+ const response = await _fetch(request);
36
+ if (!response.ok)
37
+ throw new Error(`SSE failed: ${response.status} ${response.statusText}`);
38
+ if (!response.body)
39
+ throw new Error("No body in SSE response");
40
+ const reader = response.body
41
+ .pipeThrough(new TextDecoderStream())
42
+ .getReader();
43
+ let buffer = "";
44
+ const abortHandler = () => {
45
+ try {
46
+ reader.cancel();
47
+ }
48
+ catch {
49
+ // noop
50
+ }
51
+ };
52
+ signal.addEventListener("abort", abortHandler);
53
+ try {
54
+ while (true) {
55
+ const { done, value } = await reader.read();
56
+ if (done)
57
+ break;
58
+ buffer += value;
59
+ // Normalize line endings: CRLF -> LF, then CR -> LF
60
+ buffer = buffer.replace(/\r\n/g, "\n").replace(/\r/g, "\n");
61
+ const chunks = buffer.split("\n\n");
62
+ buffer = chunks.pop() ?? "";
63
+ for (const chunk of chunks) {
64
+ const lines = chunk.split("\n");
65
+ const dataLines = [];
66
+ let eventName;
67
+ for (const line of lines) {
68
+ if (line.startsWith("data:")) {
69
+ dataLines.push(line.replace(/^data:\s*/, ""));
70
+ }
71
+ else if (line.startsWith("event:")) {
72
+ eventName = line.replace(/^event:\s*/, "");
73
+ }
74
+ else if (line.startsWith("id:")) {
75
+ lastEventId = line.replace(/^id:\s*/, "");
76
+ }
77
+ else if (line.startsWith("retry:")) {
78
+ const parsed = Number.parseInt(line.replace(/^retry:\s*/, ""), 10);
79
+ if (!Number.isNaN(parsed)) {
80
+ retryDelay = parsed;
81
+ }
82
+ }
83
+ }
84
+ let data;
85
+ let parsedJson = false;
86
+ if (dataLines.length) {
87
+ const rawData = dataLines.join("\n");
88
+ try {
89
+ data = JSON.parse(rawData);
90
+ parsedJson = true;
91
+ }
92
+ catch {
93
+ data = rawData;
94
+ }
95
+ }
96
+ if (parsedJson) {
97
+ if (responseValidator) {
98
+ await responseValidator(data);
99
+ }
100
+ if (responseTransformer) {
101
+ data = await responseTransformer(data);
102
+ }
103
+ }
104
+ onSseEvent?.({
105
+ data,
106
+ event: eventName,
107
+ id: lastEventId,
108
+ retry: retryDelay,
109
+ });
110
+ if (dataLines.length) {
111
+ yield data;
112
+ }
113
+ }
114
+ }
115
+ }
116
+ finally {
117
+ signal.removeEventListener("abort", abortHandler);
118
+ reader.releaseLock();
119
+ }
120
+ break; // exit loop on normal completion
121
+ }
122
+ catch (error) {
123
+ // connection failed or aborted; retry after delay
124
+ onSseError?.(error);
125
+ if (sseMaxRetryAttempts !== undefined &&
126
+ attempt >= sseMaxRetryAttempts) {
127
+ break; // stop after firing error
128
+ }
129
+ // exponential backoff: double retry each attempt, cap at 30s
130
+ const backoff = Math.min(retryDelay * 2 ** (attempt - 1), sseMaxRetryDelay ?? 30000);
131
+ await sleep(backoff);
132
+ }
133
+ }
134
+ };
135
+ const stream = createStream();
136
+ return { stream };
137
+ };
@@ -0,0 +1,78 @@
1
+ import type { Auth, AuthToken } from "./auth.gen.js";
2
+ import type { BodySerializer, QuerySerializer, QuerySerializerOptions } from "./bodySerializer.gen.js";
3
+ export type HttpMethod = "connect" | "delete" | "get" | "head" | "options" | "patch" | "post" | "put" | "trace";
4
+ export type Client<RequestFn = never, Config = unknown, MethodFn = never, BuildUrlFn = never, SseFn = never> = {
5
+ /**
6
+ * Returns the final request URL.
7
+ */
8
+ buildUrl: BuildUrlFn;
9
+ getConfig: () => Config;
10
+ request: RequestFn;
11
+ setConfig: (config: Config) => Config;
12
+ } & {
13
+ [K in HttpMethod]: MethodFn;
14
+ } & ([SseFn] extends [never] ? {
15
+ sse?: never;
16
+ } : {
17
+ sse: {
18
+ [K in HttpMethod]: SseFn;
19
+ };
20
+ });
21
+ export interface Config {
22
+ /**
23
+ * Auth token or a function returning auth token. The resolved value will be
24
+ * added to the request payload as defined by its `security` array.
25
+ */
26
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
27
+ /**
28
+ * A function for serializing request body parameter. By default,
29
+ * {@link JSON.stringify()} will be used.
30
+ */
31
+ bodySerializer?: BodySerializer | null;
32
+ /**
33
+ * An object containing any HTTP headers that you want to pre-populate your
34
+ * `Headers` object with.
35
+ *
36
+ * {@link https://developer.mozilla.org/docs/Web/API/Headers/Headers#init See more}
37
+ */
38
+ headers?: RequestInit["headers"] | Record<string, string | number | boolean | (string | number | boolean)[] | null | undefined | unknown>;
39
+ /**
40
+ * The request method.
41
+ *
42
+ * {@link https://developer.mozilla.org/docs/Web/API/fetch#method See more}
43
+ */
44
+ method?: Uppercase<HttpMethod>;
45
+ /**
46
+ * A function for serializing request query parameters. By default, arrays
47
+ * will be exploded in form style, objects will be exploded in deepObject
48
+ * style, and reserved characters are percent-encoded.
49
+ *
50
+ * This method will have no effect if the native `paramsSerializer()` Axios
51
+ * API function is used.
52
+ *
53
+ * {@link https://swagger.io/docs/specification/serialization/#query View examples}
54
+ */
55
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
56
+ /**
57
+ * A function validating request data. This is useful if you want to ensure
58
+ * the request conforms to the desired shape, so it can be safely sent to
59
+ * the server.
60
+ */
61
+ requestValidator?: (data: unknown) => Promise<unknown>;
62
+ /**
63
+ * A function transforming response data before it's returned. This is useful
64
+ * for post-processing data, e.g. converting ISO strings into Date objects.
65
+ */
66
+ responseTransformer?: (data: unknown) => Promise<unknown>;
67
+ /**
68
+ * A function validating response data. This is useful if you want to ensure
69
+ * the response conforms to the desired shape, so it can be safely passed to
70
+ * the transformers and returned to the user.
71
+ */
72
+ responseValidator?: (data: unknown) => Promise<unknown>;
73
+ }
74
+ type IsExactlyNeverOrNeverUndefined<T> = [T] extends [never] ? true : [T] extends [never | undefined] ? [undefined] extends [T] ? false : true : false;
75
+ export type OmitNever<T extends Record<string, unknown>> = {
76
+ [K in keyof T as IsExactlyNeverOrNeverUndefined<T[K]> extends true ? never : K]: T[K];
77
+ };
78
+ export {};
@@ -0,0 +1,2 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { BodySerializer, QuerySerializer } from "./bodySerializer.gen.js";
2
+ export interface PathSerializer {
3
+ path: Record<string, unknown>;
4
+ url: string;
5
+ }
6
+ export declare const PATH_PARAM_RE: RegExp;
7
+ export declare const defaultPathSerializer: ({ path, url: _url }: PathSerializer) => string;
8
+ export declare const getUrl: ({ baseUrl, path, query, querySerializer, url: _url, }: {
9
+ baseUrl?: string;
10
+ path?: Record<string, unknown>;
11
+ query?: Record<string, unknown>;
12
+ querySerializer: QuerySerializer;
13
+ url: string;
14
+ }) => string;
15
+ export declare function getValidRequestBody(options: {
16
+ body?: unknown;
17
+ bodySerializer?: BodySerializer | null;
18
+ serializedBody?: unknown;
19
+ }): unknown;
@@ -0,0 +1,87 @@
1
+ // This file is auto-generated by @hey-api/openapi-ts
2
+ import { serializeArrayParam, serializeObjectParam, serializePrimitiveParam, } from "./pathSerializer.gen.js";
3
+ export const PATH_PARAM_RE = /\{[^{}]+\}/g;
4
+ export const defaultPathSerializer = ({ path, url: _url }) => {
5
+ let url = _url;
6
+ const matches = _url.match(PATH_PARAM_RE);
7
+ if (matches) {
8
+ for (const match of matches) {
9
+ let explode = false;
10
+ let name = match.substring(1, match.length - 1);
11
+ let style = "simple";
12
+ if (name.endsWith("*")) {
13
+ explode = true;
14
+ name = name.substring(0, name.length - 1);
15
+ }
16
+ if (name.startsWith(".")) {
17
+ name = name.substring(1);
18
+ style = "label";
19
+ }
20
+ else if (name.startsWith(";")) {
21
+ name = name.substring(1);
22
+ style = "matrix";
23
+ }
24
+ const value = path[name];
25
+ if (value === undefined || value === null) {
26
+ continue;
27
+ }
28
+ if (Array.isArray(value)) {
29
+ url = url.replace(match, serializeArrayParam({ explode, name, style, value }));
30
+ continue;
31
+ }
32
+ if (typeof value === "object") {
33
+ url = url.replace(match, serializeObjectParam({
34
+ explode,
35
+ name,
36
+ style,
37
+ value: value,
38
+ valueOnly: true,
39
+ }));
40
+ continue;
41
+ }
42
+ if (style === "matrix") {
43
+ url = url.replace(match, `;${serializePrimitiveParam({
44
+ name,
45
+ value: value,
46
+ })}`);
47
+ continue;
48
+ }
49
+ const replaceValue = encodeURIComponent(style === "label" ? `.${value}` : value);
50
+ url = url.replace(match, replaceValue);
51
+ }
52
+ }
53
+ return url;
54
+ };
55
+ export const getUrl = ({ baseUrl, path, query, querySerializer, url: _url, }) => {
56
+ const pathUrl = _url.startsWith("/") ? _url : `/${_url}`;
57
+ let url = (baseUrl ?? "") + pathUrl;
58
+ if (path) {
59
+ url = defaultPathSerializer({ path, url });
60
+ }
61
+ let search = query ? querySerializer(query) : "";
62
+ if (search.startsWith("?")) {
63
+ search = search.substring(1);
64
+ }
65
+ if (search) {
66
+ url += `?${search}`;
67
+ }
68
+ return url;
69
+ };
70
+ export function getValidRequestBody(options) {
71
+ const hasBody = options.body !== undefined;
72
+ const isSerializedBody = hasBody && options.bodySerializer;
73
+ if (isSerializedBody) {
74
+ if ("serializedBody" in options) {
75
+ const hasSerializedBody = options.serializedBody !== undefined && options.serializedBody !== "";
76
+ return hasSerializedBody ? options.serializedBody : null;
77
+ }
78
+ // not all clients implement a serializedBody property (i.e. client-axios)
79
+ return options.body !== "" ? options.body : null;
80
+ }
81
+ // plain/text body
82
+ if (hasBody) {
83
+ return options.body;
84
+ }
85
+ // no body was provided
86
+ return undefined;
87
+ }
@@ -0,0 +1,90 @@
1
+ import { type Client, type Options as Options2, type TDataShape } from "./client/index.js";
2
+ import type { CheckoutCreateErrors, CheckoutCreateResponses, CustomerCreateErrors, CustomerCreateResponses, CustomerDeleteErrors, CustomerDeleteResponses, CustomerGetErrors, CustomerGetResponses, CustomerListResponses, CustomerUpdateErrors, CustomerUpdateResponses } from "./types.gen.js";
3
+ export type Options<TData extends TDataShape = TDataShape, ThrowOnError extends boolean = boolean> = Options2<TData, ThrowOnError> & {
4
+ /**
5
+ * You can provide a client instance returned by `createClient()` instead of
6
+ * individual options. This might be also useful if you want to implement a
7
+ * custom client.
8
+ */
9
+ client?: Client;
10
+ /**
11
+ * You can pass arbitrary values through the `meta` object. This can be
12
+ * used to access values that aren't defined as part of the SDK function.
13
+ */
14
+ meta?: Record<string, unknown>;
15
+ };
16
+ declare class HeyApiClient {
17
+ protected client: Client;
18
+ constructor(args?: {
19
+ client?: Client;
20
+ });
21
+ }
22
+ declare class HeyApiRegistry<T> {
23
+ private readonly defaultKey;
24
+ private readonly instances;
25
+ get(key?: string): T;
26
+ set(value: T, key?: string): void;
27
+ }
28
+ export declare class Customer extends HeyApiClient {
29
+ /**
30
+ * Create customer
31
+ *
32
+ * Create a new customer with a wallet address
33
+ */
34
+ create<ThrowOnError extends boolean = false>(parameters?: {
35
+ walletAddress?: unknown;
36
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<CustomerCreateResponses, CustomerCreateErrors, ThrowOnError, "fields">;
37
+ /**
38
+ * List customers
39
+ *
40
+ * List all customers for the current workspace
41
+ */
42
+ list<ThrowOnError extends boolean = false>(options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<CustomerListResponses, unknown, ThrowOnError, "fields">;
43
+ /**
44
+ * Delete customer
45
+ *
46
+ * Delete a customer (soft delete)
47
+ */
48
+ delete<ThrowOnError extends boolean = false>(parameters: {
49
+ id: string;
50
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<CustomerDeleteResponses, CustomerDeleteErrors, ThrowOnError, "fields">;
51
+ /**
52
+ * Get customer
53
+ *
54
+ * Get a specific customer by ID
55
+ */
56
+ get<ThrowOnError extends boolean = false>(parameters: {
57
+ id: string;
58
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<CustomerGetResponses, CustomerGetErrors, ThrowOnError, "fields">;
59
+ /**
60
+ * Update customer
61
+ *
62
+ * Update a customer's wallet address
63
+ */
64
+ update<ThrowOnError extends boolean = false>(parameters: {
65
+ id: string;
66
+ walletAddress?: unknown;
67
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<CustomerUpdateResponses, CustomerUpdateErrors, ThrowOnError, "fields">;
68
+ }
69
+ export declare class Checkout extends HeyApiClient {
70
+ /**
71
+ * Get checkout details
72
+ *
73
+ * Retrieve product, token, and chain information for checkout by product ID
74
+ */
75
+ create<ThrowOnError extends boolean = false>(parameters: {
76
+ id: string;
77
+ }, options?: Options<never, ThrowOnError>): import("./client/types.gen.js").RequestResult<CheckoutCreateResponses, CheckoutCreateErrors, ThrowOnError, "fields">;
78
+ }
79
+ export declare class StackupClient extends HeyApiClient {
80
+ static readonly __registry: HeyApiRegistry<StackupClient>;
81
+ constructor(args?: {
82
+ client?: Client;
83
+ key?: string;
84
+ });
85
+ private _customer?;
86
+ get customer(): Customer;
87
+ private _checkout?;
88
+ get checkout(): Checkout;
89
+ }
90
+ export {};