@spritz-finance/api-client 0.8.2 → 0.8.3

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.
@@ -8,84 +8,6 @@ declare enum Environment {
8
8
 
9
9
  type Headers = Record<string, string | null | undefined>;
10
10
 
11
- type GraphQLVariables = Record<string, unknown>;
12
- interface QueryParams<V extends GraphQLVariables | undefined = GraphQLVariables> {
13
- query: DocumentNode;
14
- variables?: V | undefined;
15
- }
16
- type HTTPMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
17
- declare class SpritzClient {
18
- private baseGraphURL;
19
- private baseRestURL;
20
- private baseRestApiURL;
21
- private timeout;
22
- private apiKey;
23
- private integrationKey;
24
- private integratorSecret;
25
- constructor({ environment, timeout, // 5 minutes
26
- apiKey, integrationKey, integratorSecret, }: {
27
- environment: Environment;
28
- timeout?: number | undefined;
29
- integrationKey: string | undefined;
30
- integratorSecret: string | undefined;
31
- apiKey: string | undefined;
32
- });
33
- query<Q, V extends GraphQLVariables | undefined = GraphQLVariables>({ query, variables, }: QueryParams<V>): Promise<Q>;
34
- request<Response, Request extends GraphQLVariables = GraphQLVariables>({ method, path, body, }: {
35
- method: HTTPMethod;
36
- path: string;
37
- body?: Request | undefined;
38
- }): Promise<Response>;
39
- restApi<Response, Request extends GraphQLVariables = GraphQLVariables>({ method, path, body, query, }: {
40
- method: HTTPMethod;
41
- path: string;
42
- body?: Request | undefined;
43
- query?: Record<string, string | number | boolean | undefined>;
44
- }): Promise<Response>;
45
- sendQuery({ query: documentNodeQuery, variables: inputVariables, }: QueryParams<GraphQLVariables>): Promise<{
46
- response: Response;
47
- controller: AbortController;
48
- headers: {
49
- traceId: string | null;
50
- requestId: string | null;
51
- };
52
- }>;
53
- sendRequest({ method, path, body, }: {
54
- method: HTTPMethod;
55
- path: string;
56
- body: GraphQLVariables | undefined;
57
- }): Promise<{
58
- response: Response;
59
- controller: AbortController;
60
- headers: {
61
- traceId: string | null;
62
- requestId: string | null;
63
- };
64
- }>;
65
- sendRestApiRequest({ method, path, body, query, }: {
66
- method: HTTPMethod;
67
- path: string;
68
- body: GraphQLVariables | undefined;
69
- query?: Record<string, string | number | boolean | undefined>;
70
- }): Promise<{
71
- response: Response;
72
- controller: AbortController;
73
- headers: {
74
- traceId: string | null;
75
- requestId: string | null;
76
- };
77
- }>;
78
- private sendHTTPRequest;
79
- private getResponseHeaders;
80
- private fetchWithTimeout;
81
- private buildGraphRequest;
82
- private buildRestRequest;
83
- private defaultHeaders;
84
- private calculateContentLength;
85
- protected authHeaders(): Headers;
86
- private makeStatusError;
87
- }
88
-
89
11
  /**
90
12
  * This file was auto-generated by openapi-typescript.
91
13
  * Do not make direct changes to the file.
@@ -1967,6 +1889,26 @@ interface paths {
1967
1889
  patch?: never;
1968
1890
  trace?: never;
1969
1891
  };
1892
+ "/v1/sandbox/funding-sources/{fundingSourceId}": {
1893
+ parameters: {
1894
+ query?: never;
1895
+ header?: never;
1896
+ path?: never;
1897
+ cookie?: never;
1898
+ };
1899
+ get?: never;
1900
+ put?: never;
1901
+ post?: never;
1902
+ /**
1903
+ * Remove a funding source (sandbox only)
1904
+ * @description Permanently removes an ACH debit funding source for the authenticated user. **Only available in sandbox environments** — returns 403 in production. Intended for resetting funding sources during integration testing.
1905
+ */
1906
+ delete: operations["deleteV1SandboxFunding-sourcesByFundingSourceId"];
1907
+ options?: never;
1908
+ head?: never;
1909
+ patch?: never;
1910
+ trace?: never;
1911
+ };
1970
1912
  }
1971
1913
  interface operations {
1972
1914
  "getV1Auto-ramp-accounts": {
@@ -2773,7 +2715,7 @@ interface operations {
2773
2715
  "application/json": {
2774
2716
  /**
2775
2717
  * @description Destination account ID
2776
- * @example 6a073b8fc31db9dffe9cd278
2718
+ * @example 6a0d5f1ac3aa49d4f16d0721
2777
2719
  */
2778
2720
  accountId: string;
2779
2721
  /**
@@ -2801,7 +2743,7 @@ interface operations {
2801
2743
  "application/x-www-form-urlencoded": {
2802
2744
  /**
2803
2745
  * @description Destination account ID
2804
- * @example 6a073b8fc31db9dffe9cd278
2746
+ * @example 6a0d5f1ac3aa49d4f16d0721
2805
2747
  */
2806
2748
  accountId: string;
2807
2749
  /**
@@ -2829,7 +2771,7 @@ interface operations {
2829
2771
  "multipart/form-data": {
2830
2772
  /**
2831
2773
  * @description Destination account ID
2832
- * @example 6a073b8fc31db9dffe9cd278
2774
+ * @example 6a0d5f1ac3aa49d4f16d0721
2833
2775
  */
2834
2776
  accountId: string;
2835
2777
  /**
@@ -2876,7 +2818,7 @@ interface operations {
2876
2818
  /**
2877
2819
  * Format: date-time
2878
2820
  * @description When the quote was created
2879
- * @example 2026-05-15T15:28:15.636Z
2821
+ * @example 2026-05-20T07:13:30.894Z
2880
2822
  */
2881
2823
  createdAt: string;
2882
2824
  /** @description What the user pays — total USD cost and token used. */
@@ -2915,7 +2857,7 @@ interface operations {
2915
2857
  rail: "ach_standard" | "ach_same_day" | "rtp" | "wire" | "eft" | "sepa" | "faster_payments" | "push_to_card" | "bill_pay" | "card_deposit";
2916
2858
  /**
2917
2859
  * @description Destination account ID
2918
- * @example 6a073b8fc31db9dffe9cd279
2860
+ * @example 6a0d5f1ac3aa49d4f16d0722
2919
2861
  */
2920
2862
  accountId: string;
2921
2863
  };
@@ -3122,7 +3064,7 @@ interface operations {
3122
3064
  /**
3123
3065
  * Format: date-time
3124
3066
  * @description When the quote was created
3125
- * @example 2026-05-15T15:28:15.636Z
3067
+ * @example 2026-05-20T07:13:30.894Z
3126
3068
  */
3127
3069
  createdAt: string;
3128
3070
  /** @description What the user pays — total USD cost and token used. */
@@ -3161,7 +3103,7 @@ interface operations {
3161
3103
  rail: "ach_standard" | "ach_same_day" | "rtp" | "wire" | "eft" | "sepa" | "faster_payments" | "push_to_card" | "bill_pay" | "card_deposit";
3162
3104
  /**
3163
3105
  * @description Destination account ID
3164
- * @example 6a073b8fc31db9dffe9cd279
3106
+ * @example 6a0d5f1ac3aa49d4f16d0722
3165
3107
  */
3166
3108
  accountId: string;
3167
3109
  };
@@ -3658,7 +3600,7 @@ interface operations {
3658
3600
  currency: string;
3659
3601
  /**
3660
3602
  * @description Destination account ID
3661
- * @example 6a073b8fc31db9dffe9cd27a
3603
+ * @example 6a0d5f1ac3aa49d4f16d0723
3662
3604
  */
3663
3605
  accountId: string;
3664
3606
  accountName: (string | null) | null;
@@ -3874,7 +3816,7 @@ interface operations {
3874
3816
  currency: string;
3875
3817
  /**
3876
3818
  * @description Destination account ID
3877
- * @example 6a073b8fc31db9dffe9cd27a
3819
+ * @example 6a0d5f1ac3aa49d4f16d0723
3878
3820
  */
3879
3821
  accountId: string;
3880
3822
  accountName: (string | null) | null;
@@ -11638,7 +11580,7 @@ interface operations {
11638
11580
  accessToken: string;
11639
11581
  /**
11640
11582
  * @description The internal ID of the authorized user
11641
- * @example 6a073b8fc31db9dffe9cd282
11583
+ * @example 6a0d5f1bc3aa49d4f16d072b
11642
11584
  */
11643
11585
  userId: string;
11644
11586
  /**
@@ -11654,7 +11596,7 @@ interface operations {
11654
11596
  /**
11655
11597
  * Format: date-time
11656
11598
  * @description ISO 8601 timestamp when token expires
11657
- * @example 2026-05-15T16:28:15.737Z
11599
+ * @example 2026-05-20T08:13:31.080Z
11658
11600
  */
11659
11601
  expiresAt: string;
11660
11602
  };
@@ -11829,7 +11771,7 @@ interface operations {
11829
11771
  /**
11830
11772
  * Format: date-time
11831
11773
  * @description ISO 8601 timestamp of when the integrator was created
11832
- * @example 2026-05-15T15:28:15.737Z
11774
+ * @example 2026-05-20T07:13:31.080Z
11833
11775
  */
11834
11776
  createdAt: string;
11835
11777
  };
@@ -12000,7 +11942,7 @@ interface operations {
12000
11942
  depositId: string;
12001
11943
  /**
12002
11944
  * @description Spritz user ID associated with the returned deposit
12003
- * @example 6a073b8fc31db9dffe9cd281
11945
+ * @example 6a0d5f1bc3aa49d4f16d072a
12004
11946
  */
12005
11947
  userId: string;
12006
11948
  /**
@@ -12188,7 +12130,7 @@ interface operations {
12188
12130
  depositId: string;
12189
12131
  /**
12190
12132
  * @description Spritz user ID associated with the returned deposit
12191
- * @example 6a073b8fc31db9dffe9cd281
12133
+ * @example 6a0d5f1bc3aa49d4f16d072a
12192
12134
  */
12193
12135
  userId: string;
12194
12136
  /**
@@ -12357,7 +12299,7 @@ interface operations {
12357
12299
  "application/json": {
12358
12300
  /**
12359
12301
  * @description Unique identifier for the webhook
12360
- * @example 6a073b8fc31db9dffe9cd283
12302
+ * @example 6a0d5f1bc3aa49d4f16d072c
12361
12303
  */
12362
12304
  id: string;
12363
12305
  /** @description List of event types this webhook is subscribed to */
@@ -12564,7 +12506,7 @@ interface operations {
12564
12506
  "application/json": {
12565
12507
  /**
12566
12508
  * @description Unique identifier for the webhook
12567
- * @example 6a073b8fc31db9dffe9cd283
12509
+ * @example 6a0d5f1bc3aa49d4f16d072c
12568
12510
  */
12569
12511
  id: string;
12570
12512
  /** @description List of event types this webhook is subscribed to */
@@ -12900,7 +12842,7 @@ interface operations {
12900
12842
  "application/json": {
12901
12843
  /**
12902
12844
  * @description Unique identifier for the webhook
12903
- * @example 6a073b8fc31db9dffe9cd283
12845
+ * @example 6a0d5f1bc3aa49d4f16d072c
12904
12846
  */
12905
12847
  id: string;
12906
12848
  /** @description List of event types this webhook is subscribed to */
@@ -13275,7 +13217,7 @@ interface operations {
13275
13217
  /**
13276
13218
  * Format: date-time
13277
13219
  * @description ISO 8601 timestamp when the old secret will expire. Only present if a grace period was specified.
13278
- * @example 2026-05-15T15:33:15.737Z
13220
+ * @example 2026-05-20T07:18:31.080Z
13279
13221
  */
13280
13222
  oldSecretExpiresAt?: string;
13281
13223
  };
@@ -13422,7 +13364,7 @@ interface operations {
13422
13364
  "application/json": {
13423
13365
  /**
13424
13366
  * @description Unique identifier for the user
13425
- * @example 6a073b8fc31db9dffe9cd27f
13367
+ * @example 6a0d5f1bc3aa49d4f16d0728
13426
13368
  */
13427
13369
  id: string;
13428
13370
  email: (string | null) | null;
@@ -13430,7 +13372,7 @@ interface operations {
13430
13372
  /**
13431
13373
  * Format: date-time
13432
13374
  * @description ISO 8601 timestamp of when the user was created
13433
- * @example 2026-05-15T15:28:15.732Z
13375
+ * @example 2026-05-20T07:13:31.075Z
13434
13376
  */
13435
13377
  signedUpAt: string;
13436
13378
  timezone: (string | null) | null;
@@ -13760,7 +13702,7 @@ interface operations {
13760
13702
  "application/json": {
13761
13703
  /**
13762
13704
  * @description Unique identifier for the user
13763
- * @example 6a073b8fc31db9dffe9cd27f
13705
+ * @example 6a0d5f1bc3aa49d4f16d0728
13764
13706
  */
13765
13707
  id: string;
13766
13708
  email: (string | null) | null;
@@ -13768,7 +13710,7 @@ interface operations {
13768
13710
  /**
13769
13711
  * Format: date-time
13770
13712
  * @description ISO 8601 timestamp of when the user was created
13771
- * @example 2026-05-15T15:28:15.732Z
13713
+ * @example 2026-05-20T07:13:31.075Z
13772
13714
  */
13773
13715
  signedUpAt: string;
13774
13716
  timezone: (string | null) | null;
@@ -14170,7 +14112,7 @@ interface operations {
14170
14112
  "application/json": {
14171
14113
  /**
14172
14114
  * @description Unique identifier for the user
14173
- * @example 6a073b8fc31db9dffe9cd27f
14115
+ * @example 6a0d5f1bc3aa49d4f16d0728
14174
14116
  */
14175
14117
  id: string;
14176
14118
  email: (string | null) | null;
@@ -14178,7 +14120,7 @@ interface operations {
14178
14120
  /**
14179
14121
  * Format: date-time
14180
14122
  * @description ISO 8601 timestamp of when the user was created
14181
- * @example 2026-05-15T15:28:15.732Z
14123
+ * @example 2026-05-20T07:13:31.075Z
14182
14124
  */
14183
14125
  signedUpAt: string;
14184
14126
  timezone: (string | null) | null;
@@ -21898,10 +21840,204 @@ interface operations {
21898
21840
  };
21899
21841
  };
21900
21842
  };
21843
+ "deleteV1SandboxFunding-sourcesByFundingSourceId": {
21844
+ parameters: {
21845
+ query?: never;
21846
+ header?: never;
21847
+ path: {
21848
+ fundingSourceId: string;
21849
+ };
21850
+ cookie?: never;
21851
+ };
21852
+ requestBody?: never;
21853
+ responses: {
21854
+ /** @description Confirmation that a funding source was removed */
21855
+ 200: {
21856
+ headers: {
21857
+ [name: string]: unknown;
21858
+ };
21859
+ content: {
21860
+ "application/json": {
21861
+ /**
21862
+ * @description Opaque public identifier for the removed funding source
21863
+ * @example fs_01JV7Q8M4Y8K6N2Z5P3R1T9W0X
21864
+ */
21865
+ id: string;
21866
+ /**
21867
+ * @description Always true for a removed funding source response
21868
+ * @constant
21869
+ */
21870
+ deleted: true;
21871
+ };
21872
+ };
21873
+ };
21874
+ /** @description Response for status 401 */
21875
+ 401: {
21876
+ headers: {
21877
+ [name: string]: unknown;
21878
+ };
21879
+ content: {
21880
+ "application/json": {
21881
+ /**
21882
+ * @description A URI reference that identifies the problem type
21883
+ * @default about:blank
21884
+ * @example urn:problem-type:auth:unauthorized
21885
+ * @example urn:problem-type:auth:token-expired
21886
+ */
21887
+ type: string;
21888
+ /**
21889
+ * @description A short, human-readable summary of the problem type
21890
+ * @example Unauthorized
21891
+ * @example Token Expired
21892
+ */
21893
+ title: string;
21894
+ /**
21895
+ * @description The HTTP status code
21896
+ * @example 401
21897
+ * @example 403
21898
+ */
21899
+ status: number;
21900
+ /**
21901
+ * @description A human-readable explanation specific to this occurrence
21902
+ * @example Bearer token required
21903
+ * @example Invalid token
21904
+ */
21905
+ detail?: string;
21906
+ /** @description A URI reference that identifies the specific occurrence */
21907
+ instance?: string;
21908
+ /**
21909
+ * @description The authentication realm
21910
+ * @example API
21911
+ */
21912
+ realm?: string;
21913
+ /**
21914
+ * @description The required scope for this resource
21915
+ * @example read:users
21916
+ * @example write:orders
21917
+ */
21918
+ scope?: string;
21919
+ };
21920
+ };
21921
+ };
21922
+ /** @description Response for status 403 */
21923
+ 403: {
21924
+ headers: {
21925
+ [name: string]: unknown;
21926
+ };
21927
+ content: {
21928
+ "application/json": {
21929
+ /**
21930
+ * @description A URI reference that identifies the problem type
21931
+ * @default about:blank
21932
+ * @example urn:problem-type:auth:unauthorized
21933
+ * @example urn:problem-type:system:internal-error
21934
+ */
21935
+ type: string;
21936
+ /**
21937
+ * @description A short, human-readable summary of the problem type
21938
+ * @example Unauthorized
21939
+ * @example Internal Server Error
21940
+ */
21941
+ title: string;
21942
+ /**
21943
+ * @description The HTTP status code
21944
+ * @example 400
21945
+ * @example 401
21946
+ * @example 404
21947
+ * @example 500
21948
+ */
21949
+ status: number;
21950
+ /** @description A human-readable explanation specific to this occurrence */
21951
+ detail?: string;
21952
+ /**
21953
+ * @description A URI reference that identifies the specific occurrence
21954
+ * @example /errors/1234567890
21955
+ */
21956
+ instance?: string;
21957
+ };
21958
+ };
21959
+ };
21960
+ /** @description Response for status 404 */
21961
+ 404: {
21962
+ headers: {
21963
+ [name: string]: unknown;
21964
+ };
21965
+ content: {
21966
+ "application/json": {
21967
+ /**
21968
+ * @description A URI reference that identifies the problem type
21969
+ * @default about:blank
21970
+ */
21971
+ type: string;
21972
+ /** @description A short, human-readable summary of the problem type */
21973
+ title: string;
21974
+ /**
21975
+ * @description The HTTP status code
21976
+ * @example 404
21977
+ */
21978
+ status: number;
21979
+ /** @description A human-readable explanation specific to this occurrence */
21980
+ detail?: string;
21981
+ /** @description A URI reference that identifies the specific occurrence */
21982
+ instance?: string;
21983
+ /**
21984
+ * @description The type of resource that was not found
21985
+ * @example user
21986
+ * @example account
21987
+ * @example transaction
21988
+ */
21989
+ resourceType: string;
21990
+ /** @description The identifier of the resource that was not found */
21991
+ resourceId: string;
21992
+ };
21993
+ };
21994
+ };
21995
+ /** @description Response for status 500 */
21996
+ 500: {
21997
+ headers: {
21998
+ [name: string]: unknown;
21999
+ };
22000
+ content: {
22001
+ "application/json": {
22002
+ /**
22003
+ * @description A URI reference that identifies the problem type
22004
+ * @default about:blank
22005
+ * @example urn:problem-type:auth:unauthorized
22006
+ * @example urn:problem-type:system:internal-error
22007
+ */
22008
+ type: string;
22009
+ /**
22010
+ * @description A short, human-readable summary of the problem type
22011
+ * @example Unauthorized
22012
+ * @example Internal Server Error
22013
+ */
22014
+ title: string;
22015
+ /**
22016
+ * @description The HTTP status code
22017
+ * @example 400
22018
+ * @example 401
22019
+ * @example 404
22020
+ * @example 500
22021
+ */
22022
+ status: number;
22023
+ /** @description A human-readable explanation specific to this occurrence */
22024
+ detail?: string;
22025
+ /**
22026
+ * @description A URI reference that identifies the specific occurrence
22027
+ * @example /errors/1234567890
22028
+ */
22029
+ instance?: string;
22030
+ };
22031
+ };
22032
+ };
22033
+ };
22034
+ };
21901
22035
  }
21902
22036
 
22037
+ type RestPath = keyof paths;
21903
22038
  type HttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
21904
- type Extract200<P extends keyof paths, M extends HttpMethod & keyof paths[P]> = paths[P][M] extends {
22039
+ type RestMethod<P extends RestPath> = HttpMethod & keyof paths[P];
22040
+ type Extract200<P extends RestPath, M extends RestMethod<P>> = paths[P][M] extends {
21905
22041
  responses: {
21906
22042
  200: {
21907
22043
  content: {
@@ -21910,7 +22046,7 @@ type Extract200<P extends keyof paths, M extends HttpMethod & keyof paths[P]> =
21910
22046
  };
21911
22047
  };
21912
22048
  } ? R : never;
21913
- type Extract201<P extends keyof paths, M extends HttpMethod & keyof paths[P]> = paths[P][M] extends {
22049
+ type Extract201<P extends RestPath, M extends RestMethod<P>> = paths[P][M] extends {
21914
22050
  responses: {
21915
22051
  201: {
21916
22052
  content: {
@@ -21920,9 +22056,9 @@ type Extract201<P extends keyof paths, M extends HttpMethod & keyof paths[P]> =
21920
22056
  };
21921
22057
  } ? R : never;
21922
22058
  /** Extract the success (200/201) JSON response body for a path + method */
21923
- type PathResponse<P extends keyof paths, M extends HttpMethod & keyof paths[P]> = Extract200<P, M> extends never ? Extract201<P, M> : Extract200<P, M> | Extract201<P, M>;
22059
+ type PathResponse<P extends RestPath, M extends RestMethod<P>> = Extract200<P, M> extends never ? Extract201<P, M> : Extract200<P, M> | Extract201<P, M>;
21924
22060
  /** Extract the JSON request body for a path + method */
21925
- type PathRequestBody<P extends keyof paths, M extends HttpMethod & keyof paths[P]> = paths[P][M] extends {
22061
+ type PathRequestBody<P extends RestPath, M extends RestMethod<P>> = paths[P][M] extends {
21926
22062
  requestBody: {
21927
22063
  content: {
21928
22064
  'application/json': infer B;
@@ -21930,18 +22066,105 @@ type PathRequestBody<P extends keyof paths, M extends HttpMethod & keyof paths[P
21930
22066
  };
21931
22067
  } ? B : never;
21932
22068
  /** Extract query parameters for a path + method */
21933
- type PathQuery<P extends keyof paths, M extends HttpMethod & keyof paths[P]> = paths[P][M] extends {
22069
+ type PathQuery<P extends RestPath, M extends RestMethod<P>> = paths[P][M] extends {
21934
22070
  parameters: {
21935
22071
  query?: infer Q;
21936
22072
  };
21937
22073
  } ? Q : never;
21938
22074
  /** Extract path parameters for a path + method */
21939
- type PathParams<P extends keyof paths, M extends HttpMethod & keyof paths[P]> = paths[P][M] extends {
22075
+ type PathParams<P extends RestPath, M extends RestMethod<P>> = paths[P][M] extends {
21940
22076
  parameters: {
21941
22077
  path: infer PP;
21942
22078
  };
21943
22079
  } ? PP : never;
21944
22080
 
22081
+ type RestQueryValue = string | number | boolean | undefined;
22082
+ type RestQuery = Record<string, RestQueryValue>;
22083
+ type RestRoute<P extends RestPath = RestPath, M extends RestMethod<P> = RestMethod<P>> = {
22084
+ method: M;
22085
+ path: string;
22086
+ body?: PathRequestBody<P, M>;
22087
+ query?: RestQuery;
22088
+ };
22089
+
22090
+ type GraphQLVariables = Record<string, unknown>;
22091
+ interface QueryParams<V extends GraphQLVariables | undefined = GraphQLVariables> {
22092
+ query: DocumentNode;
22093
+ variables?: V | undefined;
22094
+ }
22095
+ declare class SpritzClient {
22096
+ private baseGraphURL;
22097
+ private baseRestURL;
22098
+ private baseRestApiURL;
22099
+ private timeout;
22100
+ private apiKey;
22101
+ private integrationKey;
22102
+ private integratorSecret;
22103
+ constructor({ environment, timeout, // 5 minutes
22104
+ apiKey, integrationKey, integratorSecret, }: {
22105
+ environment: Environment;
22106
+ timeout?: number | undefined;
22107
+ integrationKey: string | undefined;
22108
+ integratorSecret: string | undefined;
22109
+ apiKey: string | undefined;
22110
+ });
22111
+ query<Q, V extends GraphQLVariables | undefined = GraphQLVariables>({ query, variables, }: QueryParams<V>): Promise<Q>;
22112
+ request<Response, Request extends GraphQLVariables = GraphQLVariables>({ method, path, body, }: {
22113
+ method: HttpMethod;
22114
+ path: string;
22115
+ body?: Request | undefined;
22116
+ }): Promise<Response>;
22117
+ restApi<P extends RestPath, M extends RestMethod<P>>(route: RestRoute<P, M>): Promise<PathResponse<P, M>>;
22118
+ restApi<Response, Request = unknown>({ method, path, body, query, }: {
22119
+ method: HttpMethod;
22120
+ path: string;
22121
+ body?: Request | undefined;
22122
+ query?: RestQuery;
22123
+ }): Promise<Response>;
22124
+ sendQuery({ query: documentNodeQuery, variables: inputVariables, }: QueryParams<GraphQLVariables>): Promise<{
22125
+ response: Response;
22126
+ controller: AbortController;
22127
+ headers: {
22128
+ traceId: string | null;
22129
+ requestId: string | null;
22130
+ };
22131
+ }>;
22132
+ sendRequest({ method, path, body, }: {
22133
+ method: HttpMethod;
22134
+ path: string;
22135
+ body: GraphQLVariables | undefined;
22136
+ }): Promise<{
22137
+ response: Response;
22138
+ controller: AbortController;
22139
+ headers: {
22140
+ traceId: string | null;
22141
+ requestId: string | null;
22142
+ };
22143
+ }>;
22144
+ sendRestApiRequest({ method, path, body, query, }: {
22145
+ method: HttpMethod;
22146
+ path: string;
22147
+ body: unknown | undefined;
22148
+ query?: RestQuery;
22149
+ }): Promise<{
22150
+ response: Response;
22151
+ controller: AbortController;
22152
+ headers: {
22153
+ traceId: string | null;
22154
+ requestId: string | null;
22155
+ };
22156
+ }>;
22157
+ private sendHTTPRequest;
22158
+ private getResponseHeaders;
22159
+ private fetchWithTimeout;
22160
+ private buildGraphRequest;
22161
+ private buildRestRequest;
22162
+ private defaultHeaders;
22163
+ private calculateContentLength;
22164
+ protected authHeaders(): Headers;
22165
+ private makeStatusError;
22166
+ }
22167
+
21945
22168
  type AchDebitReturnListResponse = PathResponse<'/v1/integrator/ach-debit/returns', 'get'>;
21946
22169
  type AchDebitReturn = AchDebitReturnListResponse['data'][number];
21947
22170
  type AchDebitReturnListQuery = PathQuery<'/v1/integrator/ach-debit/returns', 'get'>;
@@ -23905,6 +24128,7 @@ declare class InstitutionService {
23905
24128
  type BypassKycRequest = PathRequestBody<'/v1/sandbox/bypass-kyc', 'post'>;
23906
24129
  type CreateDepositWithReturnRequest = PathRequestBody<'/v1/sandbox/deposits/direct', 'post'>;
23907
24130
  type CreateDepositWithReturnResponse = PathResponse<'/v1/sandbox/deposits/direct', 'post'>;
24131
+ type DeleteFundingSourceResponse = PathResponse<'/v1/sandbox/funding-sources/{fundingSourceId}', 'delete'>;
23908
24132
  declare class SandboxService {
23909
24133
  private client;
23910
24134
  constructor(client: SpritzClient);
@@ -23962,6 +24186,16 @@ declare class SandboxService {
23962
24186
  releaseFailureReason: string | null;
23963
24187
  payoutTxHash: string | null;
23964
24188
  }>;
24189
+ /**
24190
+ * Permanently remove an ACH debit funding source for the authenticated user.
24191
+ * Intended for resetting funding sources during integration testing.
24192
+ *
24193
+ * Only available in sandbox environments — returns 403 in production.
24194
+ */
24195
+ deleteFundingSource(fundingSourceId: string): Promise<{
24196
+ id: string;
24197
+ deleted: true;
24198
+ }>;
23965
24199
  }
23966
24200
 
23967
24201
  interface CreateOnrampPayment_createOnrampPayment_depositInstructions {
@@ -24589,4 +24823,4 @@ declare class InternalServerError extends APIError {
24589
24823
  }
24590
24824
 
24591
24825
  export { APIConnectionError, APIConnectionTimeoutError, APIError, APIUserAbortError, AmountMode, AuthenticationError, BadRequestError, BankAccountSubType, BankAccountType, BillType, CardFeatureType, ConflictError, DebitCardNetwork, Environment, InternalServerError, NotFoundError, OfframpFeatureType, OnrampFeatureType, PayableAccountType, PaymentDeliveryMethod, PaymentNetwork, DirectPaymentStatus as PaymentRequestStatus, PaymentStatus, PermissionDeniedError, RateLimitError, RequirementType, SpritzApiClient, SpritzApiError, UnprocessableEntityError, VirtualCardType, onrampSupportedTokens };
24592
- export type { AccountPayments, AccountPaymentsVariables, AccountPayments_paymentsForAccount, AccountPayments_paymentsForAccount_transaction, AchDebitReturn, AchDebitReturnListQuery, AchDebitReturnListResponse, BankAccount, BankAccountFragment, BankAccountFragment_bankAccountDetails, BankAccountFragment_bankAccountDetails_CanadianBankAccountDetails, BankAccountFragment_bankAccountDetails_USBankAccountDetails, BankAccountFragment_institution, BankAccountFragment_paymentAddresses, BankAccountInput, BankAccountList, BillFragment, BillFragment_billAccountDetails, BillFragment_dataSync, BillFragment_institution, BillFragment_paymentAddresses, BypassKycRequest, CategoryAccess, ClientOptions, CompleteLinkingRequest, CompleteLinkingResponse, CreateBankAccountInput, CreateBankAccountResponse, CreateDepositRequest, CreateDepositWithReturnRequest, CreateDepositWithReturnResponse, CreateDirectPaymentInput, CreateOnrampPaymentInput, CreatePaymentRequestInput, CreateVirtualAccountInput, CreateWebhookParams, CurrentUser, CurrentUser_me, CurrentUser_verification, CurrentUser_verification_identity, CurrentUser_verification_identity_verificationMetadata, CurrentUser_verification_identity_verificationMetadata_details, DebitCardFragment, DebitCardInput, DeleteBankAccountResponse, Deposit, FullBridgeUser, FundingSource, FundingSourceDepositLimits, GetSolanaPayParams, GetSolanaPayParamsVariables, GetSolanaPayParams_solanaParams, GetSpritzPayParams, GetSpritzPayParamsVariables, GetSpritzPayParams_spritzPayParams, IntegratorWebhook, KycStatus, LinkTokenResponse, OnRamp, OnRampDetail, OnRampListQuery, OnRampListResponse, OnrampPaymentFragment, OnrampPaymentFragment_depositInstructions, OnrampPayments, OnrampPayments_onrampPayments, OnrampPayments_onrampPayments_depositInstructions, PathParams, PathQuery, PathRequestBody, PathResponse, PayableAccountFragment, PayableAccountFragment_BankAccount, PayableAccountFragment_BankAccount_bankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_CanadianBankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_USBankAccountDetails, PayableAccountFragment_BankAccount_dataSync, PayableAccountFragment_BankAccount_institution, PayableAccountFragment_Bill, PayableAccountFragment_Bill_billAccountDetails, PayableAccountFragment_Bill_dataSync, PayableAccountFragment_Bill_institution, PayableAccountFragment_DebitCard, PayableAccountFragment_DebitCard_dataSync, PayableAccountFragment_DebitCard_institution, PayableAccountFragment_VirtualCard, PayableAccountFragment_VirtualCard_billingInfo, PayableAccountFragment_VirtualCard_billingInfo_address, PayableAccountFragment_VirtualCard_dataSync, PayableAccountFragment_VirtualCard_institution, PayableAccountInstitutionFragment, Payment, PaymentFragment, PaymentFragment_transaction, PaymentLimits, PaymentLimitsResponse, PaymentLimitsVariables, PaymentLimits_paymentLimits, PaymentRequestFragment, PaymentRequestPayment, PaymentRequestPaymentVariables, PaymentRequestPayment_paymentForPaymentRequest, PaymentRequestPayment_paymentForPaymentRequest_transaction, PaymentVariables, Payment_payment, Payment_payment_transaction, PopularBillInstitutions, PopularBillInstitutionsVariables, PopularBillInstitutions_popularUSBillInstitutions, PrepareDepositRequest, PrepareDepositResponse, Requirement, operations as RestApiOperations, paths as RestApiPaths, SearchUSBillInstitutions, SearchUSBillInstitutionsVariables, SearchUSBillInstitutions_searchUSBillInstitutions, TokenBalanceFragment, UpdateWebhookParams, UpdateWebhookSecretResponse, UserAccess, UserAccessCapabilities, UserAccess_bridgeUser, UserAccess_me, UserAccess_verification, UserAccess_verification_identity, UserAccess_verification_identity_verificationMetadata, UserAccess_verification_identity_verificationMetadata_details, UserBankAccounts, UserBankAccounts_bankAccounts, UserBankAccounts_bankAccounts_bankAccountDetails, UserBankAccounts_bankAccounts_bankAccountDetails_CanadianBankAccountDetails, UserBankAccounts_bankAccounts_bankAccountDetails_USBankAccountDetails, UserBankAccounts_bankAccounts_institution, UserBankAccounts_bankAccounts_paymentAddresses, UserBills, UserBills_bills, UserBills_bills_billAccountDetails, UserBills_bills_dataSync, UserBills_bills_institution, UserBills_bills_paymentAddresses, UserDebitCards, UserDebitCards_debitCards, UserFragment, UserPayableAccounts, UserPayableAccounts_payableAccounts, UserPayableAccounts_payableAccounts_BankAccount, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_CanadianBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_USBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_dataSync, UserPayableAccounts_payableAccounts_BankAccount_institution, UserPayableAccounts_payableAccounts_Bill, UserPayableAccounts_payableAccounts_Bill_billAccountDetails, UserPayableAccounts_payableAccounts_Bill_dataSync, UserPayableAccounts_payableAccounts_Bill_institution, UserPayableAccounts_payableAccounts_DebitCard, UserPayableAccounts_payableAccounts_DebitCard_dataSync, UserPayableAccounts_payableAccounts_DebitCard_institution, UserPayableAccounts_payableAccounts_VirtualCard, UserPayableAccounts_payableAccounts_VirtualCard_billingInfo, UserPayableAccounts_payableAccounts_VirtualCard_billingInfo_address, UserPayableAccounts_payableAccounts_VirtualCard_dataSync, UserPayableAccounts_payableAccounts_VirtualCard_institution, UserVerification, UserVerification_verification, UserVerification_verification_identity, UserVerification_verification_identity_user, UserVerification_verification_identity_verificationMetadata, UserVerification_verification_identity_verificationMetadata_details, UserVirtualDebitCard, UserVirtualDebitCard_virtualDebitCard, UserVirtualDebitCard_virtualDebitCard_billingInfo, UserVirtualDebitCard_virtualDebitCard_billingInfo_address, UserVirtualDebitCard_virtualDebitCard_paymentAddresses, VerificationFragment, VerificationFragment_identity, VerificationFragment_identity_verificationMetadata, VerificationFragment_identity_verificationMetadata_details, VirtualAccountFragment, VirtualAccountFragment_depositInstructions, VirtualAccounts, VirtualAccounts_virtualAccounts, VirtualAccounts_virtualAccounts_depositInstructions, VirtualDebitCardFragment, VirtualDebitCardFragment_billingInfo, VirtualDebitCardFragment_billingInfo_address, VirtualDebitCardFragment_paymentAddresses, WalletTokenBalances, WalletTokenBalancesVariables, WalletTokenBalances_tokenBalances, WebhookEvent };
24826
+ export type { AccountPayments, AccountPaymentsVariables, AccountPayments_paymentsForAccount, AccountPayments_paymentsForAccount_transaction, AchDebitReturn, AchDebitReturnListQuery, AchDebitReturnListResponse, BankAccount, BankAccountFragment, BankAccountFragment_bankAccountDetails, BankAccountFragment_bankAccountDetails_CanadianBankAccountDetails, BankAccountFragment_bankAccountDetails_USBankAccountDetails, BankAccountFragment_institution, BankAccountFragment_paymentAddresses, BankAccountInput, BankAccountList, BillFragment, BillFragment_billAccountDetails, BillFragment_dataSync, BillFragment_institution, BillFragment_paymentAddresses, BypassKycRequest, CategoryAccess, ClientOptions, CompleteLinkingRequest, CompleteLinkingResponse, CreateBankAccountInput, CreateBankAccountResponse, CreateDepositRequest, CreateDepositWithReturnRequest, CreateDepositWithReturnResponse, CreateDirectPaymentInput, CreateOnrampPaymentInput, CreatePaymentRequestInput, CreateVirtualAccountInput, CreateWebhookParams, CurrentUser, CurrentUser_me, CurrentUser_verification, CurrentUser_verification_identity, CurrentUser_verification_identity_verificationMetadata, CurrentUser_verification_identity_verificationMetadata_details, DebitCardFragment, DebitCardInput, DeleteBankAccountResponse, DeleteFundingSourceResponse, Deposit, FullBridgeUser, FundingSource, FundingSourceDepositLimits, GetSolanaPayParams, GetSolanaPayParamsVariables, GetSolanaPayParams_solanaParams, GetSpritzPayParams, GetSpritzPayParamsVariables, GetSpritzPayParams_spritzPayParams, IntegratorWebhook, KycStatus, LinkTokenResponse, OnRamp, OnRampDetail, OnRampListQuery, OnRampListResponse, OnrampPaymentFragment, OnrampPaymentFragment_depositInstructions, OnrampPayments, OnrampPayments_onrampPayments, OnrampPayments_onrampPayments_depositInstructions, PathParams, PathQuery, PathRequestBody, PathResponse, PayableAccountFragment, PayableAccountFragment_BankAccount, PayableAccountFragment_BankAccount_bankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_CanadianBankAccountDetails, PayableAccountFragment_BankAccount_bankAccountDetails_USBankAccountDetails, PayableAccountFragment_BankAccount_dataSync, PayableAccountFragment_BankAccount_institution, PayableAccountFragment_Bill, PayableAccountFragment_Bill_billAccountDetails, PayableAccountFragment_Bill_dataSync, PayableAccountFragment_Bill_institution, PayableAccountFragment_DebitCard, PayableAccountFragment_DebitCard_dataSync, PayableAccountFragment_DebitCard_institution, PayableAccountFragment_VirtualCard, PayableAccountFragment_VirtualCard_billingInfo, PayableAccountFragment_VirtualCard_billingInfo_address, PayableAccountFragment_VirtualCard_dataSync, PayableAccountFragment_VirtualCard_institution, PayableAccountInstitutionFragment, Payment, PaymentFragment, PaymentFragment_transaction, PaymentLimits, PaymentLimitsResponse, PaymentLimitsVariables, PaymentLimits_paymentLimits, PaymentRequestFragment, PaymentRequestPayment, PaymentRequestPaymentVariables, PaymentRequestPayment_paymentForPaymentRequest, PaymentRequestPayment_paymentForPaymentRequest_transaction, PaymentVariables, Payment_payment, Payment_payment_transaction, PopularBillInstitutions, PopularBillInstitutionsVariables, PopularBillInstitutions_popularUSBillInstitutions, PrepareDepositRequest, PrepareDepositResponse, Requirement, operations as RestApiOperations, paths as RestApiPaths, SearchUSBillInstitutions, SearchUSBillInstitutionsVariables, SearchUSBillInstitutions_searchUSBillInstitutions, TokenBalanceFragment, UpdateWebhookParams, UpdateWebhookSecretResponse, UserAccess, UserAccessCapabilities, UserAccess_bridgeUser, UserAccess_me, UserAccess_verification, UserAccess_verification_identity, UserAccess_verification_identity_verificationMetadata, UserAccess_verification_identity_verificationMetadata_details, UserBankAccounts, UserBankAccounts_bankAccounts, UserBankAccounts_bankAccounts_bankAccountDetails, UserBankAccounts_bankAccounts_bankAccountDetails_CanadianBankAccountDetails, UserBankAccounts_bankAccounts_bankAccountDetails_USBankAccountDetails, UserBankAccounts_bankAccounts_institution, UserBankAccounts_bankAccounts_paymentAddresses, UserBills, UserBills_bills, UserBills_bills_billAccountDetails, UserBills_bills_dataSync, UserBills_bills_institution, UserBills_bills_paymentAddresses, UserDebitCards, UserDebitCards_debitCards, UserFragment, UserPayableAccounts, UserPayableAccounts_payableAccounts, UserPayableAccounts_payableAccounts_BankAccount, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_CanadianBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_bankAccountDetails_USBankAccountDetails, UserPayableAccounts_payableAccounts_BankAccount_dataSync, UserPayableAccounts_payableAccounts_BankAccount_institution, UserPayableAccounts_payableAccounts_Bill, UserPayableAccounts_payableAccounts_Bill_billAccountDetails, UserPayableAccounts_payableAccounts_Bill_dataSync, UserPayableAccounts_payableAccounts_Bill_institution, UserPayableAccounts_payableAccounts_DebitCard, UserPayableAccounts_payableAccounts_DebitCard_dataSync, UserPayableAccounts_payableAccounts_DebitCard_institution, UserPayableAccounts_payableAccounts_VirtualCard, UserPayableAccounts_payableAccounts_VirtualCard_billingInfo, UserPayableAccounts_payableAccounts_VirtualCard_billingInfo_address, UserPayableAccounts_payableAccounts_VirtualCard_dataSync, UserPayableAccounts_payableAccounts_VirtualCard_institution, UserVerification, UserVerification_verification, UserVerification_verification_identity, UserVerification_verification_identity_user, UserVerification_verification_identity_verificationMetadata, UserVerification_verification_identity_verificationMetadata_details, UserVirtualDebitCard, UserVirtualDebitCard_virtualDebitCard, UserVirtualDebitCard_virtualDebitCard_billingInfo, UserVirtualDebitCard_virtualDebitCard_billingInfo_address, UserVirtualDebitCard_virtualDebitCard_paymentAddresses, VerificationFragment, VerificationFragment_identity, VerificationFragment_identity_verificationMetadata, VerificationFragment_identity_verificationMetadata_details, VirtualAccountFragment, VirtualAccountFragment_depositInstructions, VirtualAccounts, VirtualAccounts_virtualAccounts, VirtualAccounts_virtualAccounts_depositInstructions, VirtualDebitCardFragment, VirtualDebitCardFragment_billingInfo, VirtualDebitCardFragment_billingInfo_address, VirtualDebitCardFragment_paymentAddresses, WalletTokenBalances, WalletTokenBalancesVariables, WalletTokenBalances_tokenBalances, WebhookEvent };