@gpuai/sdk 0.3.18 → 0.4.1

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 (187) hide show
  1. package/.openapi-generator/FILES +48 -0
  2. package/README.md +41 -2
  3. package/dist/apis/BillingApi.d.ts +70 -0
  4. package/dist/apis/BillingApi.js +197 -0
  5. package/dist/apis/FunctionsApi.d.ts +228 -0
  6. package/dist/apis/FunctionsApi.js +627 -0
  7. package/dist/apis/InstancesApi.d.ts +18 -0
  8. package/dist/apis/InstancesApi.js +49 -0
  9. package/dist/apis/index.d.ts +1 -0
  10. package/dist/apis/index.js +1 -0
  11. package/dist/esm/apis/BillingApi.d.ts +70 -0
  12. package/dist/esm/apis/BillingApi.js +197 -0
  13. package/dist/esm/apis/FunctionsApi.d.ts +228 -0
  14. package/dist/esm/apis/FunctionsApi.js +623 -0
  15. package/dist/esm/apis/InstancesApi.d.ts +18 -0
  16. package/dist/esm/apis/InstancesApi.js +49 -0
  17. package/dist/esm/apis/index.d.ts +1 -0
  18. package/dist/esm/apis/index.js +1 -0
  19. package/dist/esm/models/AutolaunchRule.d.ts +2 -1
  20. package/dist/esm/models/BillingDetails.d.ts +98 -0
  21. package/dist/esm/models/BillingDetails.js +85 -0
  22. package/dist/esm/models/CreateFunctionRequest.d.ts +32 -0
  23. package/dist/esm/models/CreateFunctionRequest.js +43 -0
  24. package/dist/esm/models/CreateFunctionRunRequest.d.ts +38 -0
  25. package/dist/esm/models/CreateFunctionRunRequest.js +45 -0
  26. package/dist/esm/models/CreateFunctionVersionRequest.d.ts +110 -0
  27. package/dist/esm/models/CreateFunctionVersionRequest.js +79 -0
  28. package/dist/esm/models/Function.d.ts +163 -0
  29. package/dist/esm/models/Function.js +109 -0
  30. package/dist/esm/models/FunctionList.d.ts +33 -0
  31. package/dist/esm/models/FunctionList.js +44 -0
  32. package/dist/esm/models/FunctionReplicaCounts.d.ts +44 -0
  33. package/dist/esm/models/FunctionReplicaCounts.js +51 -0
  34. package/dist/esm/models/FunctionRun.d.ts +130 -0
  35. package/dist/esm/models/FunctionRun.js +94 -0
  36. package/dist/esm/models/FunctionRunError.d.ts +44 -0
  37. package/dist/esm/models/FunctionRunError.js +49 -0
  38. package/dist/esm/models/FunctionRunList.d.ts +39 -0
  39. package/dist/esm/models/FunctionRunList.js +48 -0
  40. package/dist/esm/models/FunctionRunLogChunk.d.ts +59 -0
  41. package/dist/esm/models/FunctionRunLogChunk.js +63 -0
  42. package/dist/esm/models/FunctionRunLogs.d.ts +45 -0
  43. package/dist/esm/models/FunctionRunLogs.js +52 -0
  44. package/dist/esm/models/FunctionUpload.d.ts +51 -0
  45. package/dist/esm/models/FunctionUpload.js +59 -0
  46. package/dist/esm/models/FunctionVersion.d.ts +137 -0
  47. package/dist/esm/models/FunctionVersion.js +109 -0
  48. package/dist/esm/models/GpuSuggestion.d.ts +82 -0
  49. package/dist/esm/models/GpuSuggestion.js +77 -0
  50. package/dist/esm/models/GpuSuggestionCheaper.d.ts +62 -0
  51. package/dist/esm/models/GpuSuggestionCheaper.js +63 -0
  52. package/dist/esm/models/GpuSuggestionGpu.d.ts +50 -0
  53. package/dist/esm/models/GpuSuggestionGpu.js +55 -0
  54. package/dist/esm/models/Instance.d.ts +7 -0
  55. package/dist/esm/models/Instance.js +3 -0
  56. package/dist/esm/models/InstanceGpuMemory.d.ts +51 -0
  57. package/dist/esm/models/InstanceGpuMemory.js +55 -0
  58. package/dist/esm/models/Invoice.d.ts +68 -0
  59. package/dist/esm/models/Invoice.js +67 -0
  60. package/dist/esm/models/InvoiceList.d.ts +45 -0
  61. package/dist/esm/models/InvoiceList.js +50 -0
  62. package/dist/esm/models/ModelPricing.d.ts +46 -0
  63. package/dist/esm/models/ModelPricing.js +21 -0
  64. package/dist/esm/models/ModelRate.d.ts +62 -0
  65. package/dist/esm/models/ModelRate.js +51 -0
  66. package/dist/esm/models/PeakWindow.d.ts +38 -0
  67. package/dist/esm/models/PeakWindow.js +47 -0
  68. package/dist/esm/models/UpdateBillingDetailsRequest.d.ts +80 -0
  69. package/dist/esm/models/UpdateBillingDetailsRequest.js +57 -0
  70. package/dist/esm/models/index.d.ts +23 -0
  71. package/dist/esm/models/index.js +23 -0
  72. package/dist/esm/runtime.js +1 -1
  73. package/dist/models/AutolaunchRule.d.ts +2 -1
  74. package/dist/models/BillingDetails.d.ts +98 -0
  75. package/dist/models/BillingDetails.js +92 -0
  76. package/dist/models/CreateFunctionRequest.d.ts +32 -0
  77. package/dist/models/CreateFunctionRequest.js +50 -0
  78. package/dist/models/CreateFunctionRunRequest.d.ts +38 -0
  79. package/dist/models/CreateFunctionRunRequest.js +52 -0
  80. package/dist/models/CreateFunctionVersionRequest.d.ts +110 -0
  81. package/dist/models/CreateFunctionVersionRequest.js +86 -0
  82. package/dist/models/Function.d.ts +163 -0
  83. package/dist/models/Function.js +117 -0
  84. package/dist/models/FunctionList.d.ts +33 -0
  85. package/dist/models/FunctionList.js +51 -0
  86. package/dist/models/FunctionReplicaCounts.d.ts +44 -0
  87. package/dist/models/FunctionReplicaCounts.js +58 -0
  88. package/dist/models/FunctionRun.d.ts +130 -0
  89. package/dist/models/FunctionRun.js +102 -0
  90. package/dist/models/FunctionRunError.d.ts +44 -0
  91. package/dist/models/FunctionRunError.js +56 -0
  92. package/dist/models/FunctionRunList.d.ts +39 -0
  93. package/dist/models/FunctionRunList.js +55 -0
  94. package/dist/models/FunctionRunLogChunk.d.ts +59 -0
  95. package/dist/models/FunctionRunLogChunk.js +71 -0
  96. package/dist/models/FunctionRunLogs.d.ts +45 -0
  97. package/dist/models/FunctionRunLogs.js +59 -0
  98. package/dist/models/FunctionUpload.d.ts +51 -0
  99. package/dist/models/FunctionUpload.js +67 -0
  100. package/dist/models/FunctionVersion.d.ts +137 -0
  101. package/dist/models/FunctionVersion.js +117 -0
  102. package/dist/models/GpuSuggestion.d.ts +82 -0
  103. package/dist/models/GpuSuggestion.js +85 -0
  104. package/dist/models/GpuSuggestionCheaper.d.ts +62 -0
  105. package/dist/models/GpuSuggestionCheaper.js +70 -0
  106. package/dist/models/GpuSuggestionGpu.d.ts +50 -0
  107. package/dist/models/GpuSuggestionGpu.js +62 -0
  108. package/dist/models/Instance.d.ts +7 -0
  109. package/dist/models/Instance.js +3 -0
  110. package/dist/models/InstanceGpuMemory.d.ts +51 -0
  111. package/dist/models/InstanceGpuMemory.js +62 -0
  112. package/dist/models/Invoice.d.ts +68 -0
  113. package/dist/models/Invoice.js +74 -0
  114. package/dist/models/InvoiceList.d.ts +45 -0
  115. package/dist/models/InvoiceList.js +57 -0
  116. package/dist/models/ModelPricing.d.ts +46 -0
  117. package/dist/models/ModelPricing.js +22 -0
  118. package/dist/models/ModelRate.d.ts +62 -0
  119. package/dist/models/ModelRate.js +58 -0
  120. package/dist/models/PeakWindow.d.ts +38 -0
  121. package/dist/models/PeakWindow.js +54 -0
  122. package/dist/models/UpdateBillingDetailsRequest.d.ts +80 -0
  123. package/dist/models/UpdateBillingDetailsRequest.js +64 -0
  124. package/dist/models/index.d.ts +23 -0
  125. package/dist/models/index.js +23 -0
  126. package/dist/runtime.js +1 -1
  127. package/docs/BillingApi.md +299 -0
  128. package/docs/BillingDetails.md +56 -0
  129. package/docs/CreateFunctionRequest.md +34 -0
  130. package/docs/CreateFunctionRunRequest.md +36 -0
  131. package/docs/CreateFunctionVersionRequest.md +60 -0
  132. package/docs/Function.md +75 -0
  133. package/docs/FunctionList.md +34 -0
  134. package/docs/FunctionReplicaCounts.md +39 -0
  135. package/docs/FunctionRun.md +63 -0
  136. package/docs/FunctionRunError.md +38 -0
  137. package/docs/FunctionRunList.md +36 -0
  138. package/docs/FunctionRunLogChunk.md +40 -0
  139. package/docs/FunctionRunLogs.md +38 -0
  140. package/docs/FunctionUpload.md +38 -0
  141. package/docs/FunctionVersion.md +66 -0
  142. package/docs/FunctionsApi.md +880 -0
  143. package/docs/GpuSuggestion.md +47 -0
  144. package/docs/GpuSuggestionCheaper.md +45 -0
  145. package/docs/GpuSuggestionGpu.md +41 -0
  146. package/docs/Instance.md +2 -0
  147. package/docs/InstanceGpuMemory.md +41 -0
  148. package/docs/InstancesApi.md +75 -0
  149. package/docs/Invoice.md +46 -0
  150. package/docs/InvoiceList.md +38 -0
  151. package/docs/ModelPricing.md +12 -0
  152. package/docs/ModelRate.md +45 -0
  153. package/docs/PeakWindow.md +37 -0
  154. package/docs/UpdateBillingDetailsRequest.md +50 -0
  155. package/package.json +1 -1
  156. package/src/apis/BillingApi.ts +247 -0
  157. package/src/apis/FunctionsApi.ts +828 -0
  158. package/src/apis/InstancesApi.ts +64 -0
  159. package/src/apis/index.ts +1 -0
  160. package/src/models/AutolaunchRule.ts +2 -1
  161. package/src/models/BillingDetails.ts +164 -0
  162. package/src/models/CreateFunctionRequest.ts +66 -0
  163. package/src/models/CreateFunctionRunRequest.ts +74 -0
  164. package/src/models/CreateFunctionVersionRequest.ts +175 -0
  165. package/src/models/Function.ts +255 -0
  166. package/src/models/FunctionList.ts +74 -0
  167. package/src/models/FunctionReplicaCounts.ts +84 -0
  168. package/src/models/FunctionRun.ts +207 -0
  169. package/src/models/FunctionRunError.ts +83 -0
  170. package/src/models/FunctionRunList.ts +83 -0
  171. package/src/models/FunctionRunLogChunk.ts +105 -0
  172. package/src/models/FunctionRunLogs.ts +92 -0
  173. package/src/models/FunctionUpload.ts +96 -0
  174. package/src/models/FunctionVersion.ts +226 -0
  175. package/src/models/GpuSuggestion.ts +150 -0
  176. package/src/models/GpuSuggestionCheaper.ts +111 -0
  177. package/src/models/GpuSuggestionGpu.ts +93 -0
  178. package/src/models/Instance.ts +15 -0
  179. package/src/models/InstanceGpuMemory.ts +94 -0
  180. package/src/models/Invoice.ts +120 -0
  181. package/src/models/InvoiceList.ts +91 -0
  182. package/src/models/ModelPricing.ts +74 -0
  183. package/src/models/ModelRate.ts +105 -0
  184. package/src/models/PeakWindow.ts +75 -0
  185. package/src/models/UpdateBillingDetailsRequest.ts +129 -0
  186. package/src/models/index.ts +23 -0
  187. package/src/runtime.ts +1 -1
@@ -8,6 +8,7 @@ docs/AutolaunchRuleDisarm.md
8
8
  docs/AutolaunchRulePage.md
9
9
  docs/Balance.md
10
10
  docs/BillingApi.md
11
+ docs/BillingDetails.md
11
12
  docs/ChatChoice.md
12
13
  docs/ChatCompletionRequest.md
13
14
  docs/ChatCompletionResponse.md
@@ -22,6 +23,9 @@ docs/CreateFineTuningJobRequest.md
22
23
  docs/CreateFineTuningJobRequestGpuai.md
23
24
  docs/CreateFineTuningJobRequestMethod.md
24
25
  docs/CreateFineTuningJobRequestMethodLora.md
26
+ docs/CreateFunctionRequest.md
27
+ docs/CreateFunctionRunRequest.md
28
+ docs/CreateFunctionVersionRequest.md
25
29
  docs/CreateInstanceRequest.md
26
30
  docs/CreateInstanceRequestPortsInner.md
27
31
  docs/CreateRegistryCredentialRequest.md
@@ -44,9 +48,23 @@ docs/FineTuningJobEventList.md
44
48
  docs/FineTuningJobList.md
45
49
  docs/FineTuningJobMethod.md
46
50
  docs/FrameworkVersion.md
51
+ docs/Function.md
52
+ docs/FunctionList.md
53
+ docs/FunctionReplicaCounts.md
54
+ docs/FunctionRun.md
55
+ docs/FunctionRunError.md
56
+ docs/FunctionRunList.md
57
+ docs/FunctionRunLogChunk.md
58
+ docs/FunctionRunLogs.md
59
+ docs/FunctionUpload.md
60
+ docs/FunctionVersion.md
61
+ docs/FunctionsApi.md
47
62
  docs/GPUType.md
48
63
  docs/GPUTypePage.md
49
64
  docs/GetHealth200Response.md
65
+ docs/GpuSuggestion.md
66
+ docs/GpuSuggestionCheaper.md
67
+ docs/GpuSuggestionGpu.md
50
68
  docs/GpuTypesApi.md
51
69
  docs/ImagesGenerationsRequest.md
52
70
  docs/ImagesResponse.md
@@ -56,8 +74,11 @@ docs/IncludeItem.md
56
74
  docs/InferenceApi.md
57
75
  docs/Instance.md
58
76
  docs/InstanceConnection.md
77
+ docs/InstanceGpuMemory.md
59
78
  docs/InstancePage.md
60
79
  docs/InstancesApi.md
80
+ docs/Invoice.md
81
+ docs/InvoiceList.md
61
82
  docs/ListCommunityMachines200Response.md
62
83
  docs/ListDeposits200Response.md
63
84
  docs/ListRegistryCredentials200Response.md
@@ -69,12 +90,14 @@ docs/Model.md
69
90
  docs/ModelList.md
70
91
  docs/ModelParametersInner.md
71
92
  docs/ModelPricing.md
93
+ docs/ModelRate.md
72
94
  docs/OpenAIErrorEnvelope.md
73
95
  docs/OpenAIErrorEnvelopeError.md
74
96
  docs/Operation.md
75
97
  docs/OperationError.md
76
98
  docs/OperationResult.md
77
99
  docs/OperationsApi.md
100
+ docs/PeakWindow.md
78
101
  docs/Pricing.md
79
102
  docs/PricingApi.md
80
103
  docs/PricingPage.md
@@ -93,6 +116,7 @@ docs/TemplateEnvInner.md
93
116
  docs/TemplateList.md
94
117
  docs/TemplatePortsInner.md
95
118
  docs/TemplatesApi.md
119
+ docs/UpdateBillingDetailsRequest.md
96
120
  docs/UpdateInstanceRequest.md
97
121
  docs/UpdateSpendingLimitRequest.md
98
122
  docs/Usage.md
@@ -117,6 +141,7 @@ src/apis/BillingApi.ts
117
141
  src/apis/CommunityApi.ts
118
142
  src/apis/EnvironmentsApi.ts
119
143
  src/apis/FineTuningApi.ts
144
+ src/apis/FunctionsApi.ts
120
145
  src/apis/GpuTypesApi.ts
121
146
  src/apis/InferenceApi.ts
122
147
  src/apis/InstancesApi.ts
@@ -137,6 +162,7 @@ src/models/AutolaunchRuleCreate.ts
137
162
  src/models/AutolaunchRuleDisarm.ts
138
163
  src/models/AutolaunchRulePage.ts
139
164
  src/models/Balance.ts
165
+ src/models/BillingDetails.ts
140
166
  src/models/ChatChoice.ts
141
167
  src/models/ChatCompletionRequest.ts
142
168
  src/models/ChatCompletionResponse.ts
@@ -150,6 +176,9 @@ src/models/CreateFineTuningJobRequest.ts
150
176
  src/models/CreateFineTuningJobRequestGpuai.ts
151
177
  src/models/CreateFineTuningJobRequestMethod.ts
152
178
  src/models/CreateFineTuningJobRequestMethodLora.ts
179
+ src/models/CreateFunctionRequest.ts
180
+ src/models/CreateFunctionRunRequest.ts
181
+ src/models/CreateFunctionVersionRequest.ts
153
182
  src/models/CreateInstanceRequest.ts
154
183
  src/models/CreateInstanceRequestPortsInner.ts
155
184
  src/models/CreateRegistryCredentialRequest.ts
@@ -170,9 +199,22 @@ src/models/FineTuningJobEventList.ts
170
199
  src/models/FineTuningJobList.ts
171
200
  src/models/FineTuningJobMethod.ts
172
201
  src/models/FrameworkVersion.ts
202
+ src/models/Function.ts
203
+ src/models/FunctionList.ts
204
+ src/models/FunctionReplicaCounts.ts
205
+ src/models/FunctionRun.ts
206
+ src/models/FunctionRunError.ts
207
+ src/models/FunctionRunList.ts
208
+ src/models/FunctionRunLogChunk.ts
209
+ src/models/FunctionRunLogs.ts
210
+ src/models/FunctionUpload.ts
211
+ src/models/FunctionVersion.ts
173
212
  src/models/GPUType.ts
174
213
  src/models/GPUTypePage.ts
175
214
  src/models/GetHealth200Response.ts
215
+ src/models/GpuSuggestion.ts
216
+ src/models/GpuSuggestionCheaper.ts
217
+ src/models/GpuSuggestionGpu.ts
176
218
  src/models/ImagesGenerationsRequest.ts
177
219
  src/models/ImagesResponse.ts
178
220
  src/models/ImagesResponseDataInner.ts
@@ -180,7 +222,10 @@ src/models/ImagesResponseUsage.ts
180
222
  src/models/IncludeItem.ts
181
223
  src/models/Instance.ts
182
224
  src/models/InstanceConnection.ts
225
+ src/models/InstanceGpuMemory.ts
183
226
  src/models/InstancePage.ts
227
+ src/models/Invoice.ts
228
+ src/models/InvoiceList.ts
184
229
  src/models/ListCommunityMachines200Response.ts
185
230
  src/models/ListDeposits200Response.ts
186
231
  src/models/ListRegistryCredentials200Response.ts
@@ -190,11 +235,13 @@ src/models/Model.ts
190
235
  src/models/ModelList.ts
191
236
  src/models/ModelParametersInner.ts
192
237
  src/models/ModelPricing.ts
238
+ src/models/ModelRate.ts
193
239
  src/models/OpenAIErrorEnvelope.ts
194
240
  src/models/OpenAIErrorEnvelopeError.ts
195
241
  src/models/Operation.ts
196
242
  src/models/OperationError.ts
197
243
  src/models/OperationResult.ts
244
+ src/models/PeakWindow.ts
198
245
  src/models/Pricing.ts
199
246
  src/models/PricingPage.ts
200
247
  src/models/Problem.ts
@@ -209,6 +256,7 @@ src/models/Template.ts
209
256
  src/models/TemplateEnvInner.ts
210
257
  src/models/TemplateList.ts
211
258
  src/models/TemplatePortsInner.ts
259
+ src/models/UpdateBillingDetailsRequest.ts
212
260
  src/models/UpdateInstanceRequest.ts
213
261
  src/models/UpdateSpendingLimitRequest.ts
214
262
  src/models/Usage.ts
package/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # @gpuai/sdk@0.3.18
1
+ # @gpuai/sdk@0.4.1
2
2
 
3
3
  A TypeScript SDK client for the api.gpu.ai API.
4
4
 
@@ -62,10 +62,14 @@ All URIs are relative to *https://api.gpu.ai/v1*
62
62
  *AutolaunchApi* | [**getAutolaunchRule**](docs/AutolaunchApi.md#getautolaunchrule) | **GET** /autolaunch-rules/{id} | Get an auto-launch rule
63
63
  *AutolaunchApi* | [**listAutolaunchRules**](docs/AutolaunchApi.md#listautolaunchrules) | **GET** /autolaunch-rules | List auto-launch rules
64
64
  *BillingApi* | [**createCryptoDeposit**](docs/BillingApi.md#createcryptodepositoperation) | **POST** /billing/deposits/crypto | Create a stablecoin deposit
65
+ *BillingApi* | [**downloadInvoicePdf**](docs/BillingApi.md#downloadinvoicepdf) | **GET** /billing/invoices/{id}/pdf | Download an invoice PDF
65
66
  *BillingApi* | [**getBalance**](docs/BillingApi.md#getbalance) | **GET** /billing/balance | Get the org credit balance
67
+ *BillingApi* | [**getBillingDetails**](docs/BillingApi.md#getbillingdetails) | **GET** /billing/details | Get billing details
66
68
  *BillingApi* | [**getDeposit**](docs/BillingApi.md#getdeposit) | **GET** /billing/deposits/{id} | Get one stablecoin deposit
67
69
  *BillingApi* | [**getSpendingLimit**](docs/BillingApi.md#getspendinglimit) | **GET** /billing/spending-limit | Get the org spending limit
68
70
  *BillingApi* | [**listDeposits**](docs/BillingApi.md#listdeposits) | **GET** /billing/deposits | List stablecoin deposits
71
+ *BillingApi* | [**listInvoices**](docs/BillingApi.md#listinvoices) | **GET** /billing/invoices | List invoices
72
+ *BillingApi* | [**updateBillingDetails**](docs/BillingApi.md#updatebillingdetailsoperation) | **PATCH** /billing/details | Update billing details
69
73
  *BillingApi* | [**updateSpendingLimit**](docs/BillingApi.md#updatespendinglimitoperation) | **PUT** /billing/spending-limit | Set the org spending limit
70
74
  *CommunityApi* | [**delistCommunityMachine**](docs/CommunityApi.md#delistcommunitymachine) | **POST** /community/machines/{id}/delist | Delist a Community Cloud machine
71
75
  *CommunityApi* | [**enableCommunitySupplier**](docs/CommunityApi.md#enablecommunitysupplier) | **POST** /community/suppliers | Enable the Community Cloud supplier role
@@ -81,6 +85,17 @@ All URIs are relative to *https://api.gpu.ai/v1*
81
85
  *FineTuningApi* | [**listFineTuningJobEvents**](docs/FineTuningApi.md#listfinetuningjobevents) | **GET** /fine_tuning/jobs/{id}/events | List fine-tuning job events (OpenAI-compatible)
82
86
  *FineTuningApi* | [**listFineTuningJobs**](docs/FineTuningApi.md#listfinetuningjobs) | **GET** /fine_tuning/jobs | List fine-tuning jobs (OpenAI-compatible)
83
87
  *FineTuningApi* | [**retrieveFile**](docs/FineTuningApi.md#retrievefile) | **GET** /files/{id} | Retrieve a file (OpenAI-compatible)
88
+ *FunctionsApi* | [**activateFunctionVersion**](docs/FunctionsApi.md#activatefunctionversion) | **POST** /functions/{id}/versions/{version_id}/activate | Confirm a version\'s upload and make it current
89
+ *FunctionsApi* | [**cancelFunctionRun**](docs/FunctionsApi.md#cancelfunctionrun) | **POST** /functions/{id}/runs/{run_id}/cancel | Cancel a run
90
+ *FunctionsApi* | [**createFunction**](docs/FunctionsApi.md#createfunctionoperation) | **POST** /functions | Get or create a function by name
91
+ *FunctionsApi* | [**createFunctionRun**](docs/FunctionsApi.md#createfunctionrunoperation) | **POST** /functions/{id}/runs | Call a function
92
+ *FunctionsApi* | [**createFunctionVersion**](docs/FunctionsApi.md#createfunctionversionoperation) | **POST** /functions/{id}/versions | Register a version of a function
93
+ *FunctionsApi* | [**deleteFunction**](docs/FunctionsApi.md#deletefunction) | **DELETE** /functions/{id} | Delete a function
94
+ *FunctionsApi* | [**getFunction**](docs/FunctionsApi.md#getfunction) | **GET** /functions/{id} | Get a function
95
+ *FunctionsApi* | [**getFunctionRun**](docs/FunctionsApi.md#getfunctionrun) | **GET** /functions/{id}/runs/{run_id} | Get a run
96
+ *FunctionsApi* | [**getFunctionRunLogs**](docs/FunctionsApi.md#getfunctionrunlogs) | **GET** /functions/{id}/runs/{run_id}/logs | Read a run\'s output
97
+ *FunctionsApi* | [**listFunctionRuns**](docs/FunctionsApi.md#listfunctionruns) | **GET** /functions/{id}/runs | List a function\'s runs
98
+ *FunctionsApi* | [**listFunctions**](docs/FunctionsApi.md#listfunctions) | **GET** /functions | List functions
84
99
  *GpuTypesApi* | [**listGpuTypes**](docs/GpuTypesApi.md#listgputypes) | **GET** /gpu-types | List available GPU types (no auth required)
85
100
  *InferenceApi* | [**cancelVideo**](docs/InferenceApi.md#cancelvideo) | **POST** /videos/{id}/cancel | Cancel a video generation job
86
101
  *InferenceApi* | [**createChatCompletion**](docs/InferenceApi.md#createchatcompletion) | **POST** /chat/completions | Create a chat completion (OpenAI-compatible)
@@ -95,6 +110,7 @@ All URIs are relative to *https://api.gpu.ai/v1*
95
110
  *InstancesApi* | [**createInstance**](docs/InstancesApi.md#createinstanceoperation) | **POST** /instances | Create an instance (async — returns 202 + Operation-Id header)
96
111
  *InstancesApi* | [**deleteInstance**](docs/InstancesApi.md#deleteinstance) | **DELETE** /instances/{id} | Terminate an instance (idempotent)
97
112
  *InstancesApi* | [**getInstance**](docs/InstancesApi.md#getinstance) | **GET** /instances/{id} | Get an instance
113
+ *InstancesApi* | [**getInstanceGpuSuggestion**](docs/InstancesApi.md#getinstancegpusuggestion) | **GET** /instances/{id}/gpu-suggestion | Suggest a lower-priced GPU for an instance
98
114
  *InstancesApi* | [**listInstances**](docs/InstancesApi.md#listinstances) | **GET** /instances | List instances
99
115
  *InstancesApi* | [**updateInstance**](docs/InstancesApi.md#updateinstanceoperation) | **PATCH** /instances/{id} | Update an instance (rename only in v1)
100
116
  *MarketApi* | [**getMarketHistory**](docs/MarketApi.md#getmarkethistory) | **GET** /market-history | Get a GPU\'s price and availability over time
@@ -130,6 +146,7 @@ All URIs are relative to *https://api.gpu.ai/v1*
130
146
  - [AutolaunchRuleDisarm](docs/AutolaunchRuleDisarm.md)
131
147
  - [AutolaunchRulePage](docs/AutolaunchRulePage.md)
132
148
  - [Balance](docs/Balance.md)
149
+ - [BillingDetails](docs/BillingDetails.md)
133
150
  - [ChatChoice](docs/ChatChoice.md)
134
151
  - [ChatCompletionRequest](docs/ChatCompletionRequest.md)
135
152
  - [ChatCompletionResponse](docs/ChatCompletionResponse.md)
@@ -143,6 +160,9 @@ All URIs are relative to *https://api.gpu.ai/v1*
143
160
  - [CreateFineTuningJobRequestGpuai](docs/CreateFineTuningJobRequestGpuai.md)
144
161
  - [CreateFineTuningJobRequestMethod](docs/CreateFineTuningJobRequestMethod.md)
145
162
  - [CreateFineTuningJobRequestMethodLora](docs/CreateFineTuningJobRequestMethodLora.md)
163
+ - [CreateFunctionRequest](docs/CreateFunctionRequest.md)
164
+ - [CreateFunctionRunRequest](docs/CreateFunctionRunRequest.md)
165
+ - [CreateFunctionVersionRequest](docs/CreateFunctionVersionRequest.md)
146
166
  - [CreateInstanceRequest](docs/CreateInstanceRequest.md)
147
167
  - [CreateInstanceRequestPortsInner](docs/CreateInstanceRequestPortsInner.md)
148
168
  - [CreateRegistryCredentialRequest](docs/CreateRegistryCredentialRequest.md)
@@ -163,9 +183,22 @@ All URIs are relative to *https://api.gpu.ai/v1*
163
183
  - [FineTuningJobList](docs/FineTuningJobList.md)
164
184
  - [FineTuningJobMethod](docs/FineTuningJobMethod.md)
165
185
  - [FrameworkVersion](docs/FrameworkVersion.md)
186
+ - [Function](docs/Function.md)
187
+ - [FunctionList](docs/FunctionList.md)
188
+ - [FunctionReplicaCounts](docs/FunctionReplicaCounts.md)
189
+ - [FunctionRun](docs/FunctionRun.md)
190
+ - [FunctionRunError](docs/FunctionRunError.md)
191
+ - [FunctionRunList](docs/FunctionRunList.md)
192
+ - [FunctionRunLogChunk](docs/FunctionRunLogChunk.md)
193
+ - [FunctionRunLogs](docs/FunctionRunLogs.md)
194
+ - [FunctionUpload](docs/FunctionUpload.md)
195
+ - [FunctionVersion](docs/FunctionVersion.md)
166
196
  - [GPUType](docs/GPUType.md)
167
197
  - [GPUTypePage](docs/GPUTypePage.md)
168
198
  - [GetHealth200Response](docs/GetHealth200Response.md)
199
+ - [GpuSuggestion](docs/GpuSuggestion.md)
200
+ - [GpuSuggestionCheaper](docs/GpuSuggestionCheaper.md)
201
+ - [GpuSuggestionGpu](docs/GpuSuggestionGpu.md)
169
202
  - [ImagesGenerationsRequest](docs/ImagesGenerationsRequest.md)
170
203
  - [ImagesResponse](docs/ImagesResponse.md)
171
204
  - [ImagesResponseDataInner](docs/ImagesResponseDataInner.md)
@@ -173,7 +206,10 @@ All URIs are relative to *https://api.gpu.ai/v1*
173
206
  - [IncludeItem](docs/IncludeItem.md)
174
207
  - [Instance](docs/Instance.md)
175
208
  - [InstanceConnection](docs/InstanceConnection.md)
209
+ - [InstanceGpuMemory](docs/InstanceGpuMemory.md)
176
210
  - [InstancePage](docs/InstancePage.md)
211
+ - [Invoice](docs/Invoice.md)
212
+ - [InvoiceList](docs/InvoiceList.md)
177
213
  - [ListCommunityMachines200Response](docs/ListCommunityMachines200Response.md)
178
214
  - [ListDeposits200Response](docs/ListDeposits200Response.md)
179
215
  - [ListRegistryCredentials200Response](docs/ListRegistryCredentials200Response.md)
@@ -183,11 +219,13 @@ All URIs are relative to *https://api.gpu.ai/v1*
183
219
  - [ModelList](docs/ModelList.md)
184
220
  - [ModelParametersInner](docs/ModelParametersInner.md)
185
221
  - [ModelPricing](docs/ModelPricing.md)
222
+ - [ModelRate](docs/ModelRate.md)
186
223
  - [OpenAIErrorEnvelope](docs/OpenAIErrorEnvelope.md)
187
224
  - [OpenAIErrorEnvelopeError](docs/OpenAIErrorEnvelopeError.md)
188
225
  - [Operation](docs/Operation.md)
189
226
  - [OperationError](docs/OperationError.md)
190
227
  - [OperationResult](docs/OperationResult.md)
228
+ - [PeakWindow](docs/PeakWindow.md)
191
229
  - [Pricing](docs/Pricing.md)
192
230
  - [PricingPage](docs/PricingPage.md)
193
231
  - [Problem](docs/Problem.md)
@@ -202,6 +240,7 @@ All URIs are relative to *https://api.gpu.ai/v1*
202
240
  - [TemplateEnvInner](docs/TemplateEnvInner.md)
203
241
  - [TemplateList](docs/TemplateList.md)
204
242
  - [TemplatePortsInner](docs/TemplatePortsInner.md)
243
+ - [UpdateBillingDetailsRequest](docs/UpdateBillingDetailsRequest.md)
205
244
  - [UpdateInstanceRequest](docs/UpdateInstanceRequest.md)
206
245
  - [UpdateSpendingLimitRequest](docs/UpdateSpendingLimitRequest.md)
207
246
  - [Usage](docs/Usage.md)
@@ -235,7 +274,7 @@ and is automatically generated by the
235
274
  [OpenAPI Generator](https://openapi-generator.tech) project:
236
275
 
237
276
  - API version: `1.0.0`
238
- - Package version: `0.3.18`
277
+ - Package version: `0.4.1`
239
278
  - Generator version: `7.24.0`
240
279
  - Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
241
280
 
@@ -11,17 +11,31 @@
11
11
  */
12
12
  import * as runtime from '../runtime';
13
13
  import { type Balance } from '../models/Balance';
14
+ import { type BillingDetails } from '../models/BillingDetails';
14
15
  import { type CreateCryptoDepositRequest } from '../models/CreateCryptoDepositRequest';
15
16
  import { type CryptoDeposit } from '../models/CryptoDeposit';
17
+ import { type InvoiceList } from '../models/InvoiceList';
16
18
  import { type ListDeposits200Response } from '../models/ListDeposits200Response';
17
19
  import { type SpendingLimit } from '../models/SpendingLimit';
20
+ import { type UpdateBillingDetailsRequest } from '../models/UpdateBillingDetailsRequest';
18
21
  import { type UpdateSpendingLimitRequest } from '../models/UpdateSpendingLimitRequest';
19
22
  export interface CreateCryptoDepositOperationRequest {
20
23
  createCryptoDepositRequest: CreateCryptoDepositRequest;
21
24
  }
25
+ export interface DownloadInvoicePdfRequest {
26
+ id: string;
27
+ }
22
28
  export interface GetDepositRequest {
23
29
  id: string;
24
30
  }
31
+ export interface ListInvoicesRequest {
32
+ limit?: number;
33
+ cursor?: string;
34
+ }
35
+ export interface UpdateBillingDetailsOperationRequest {
36
+ updateBillingDetailsRequest: UpdateBillingDetailsRequest;
37
+ idempotencyKey?: string;
38
+ }
25
39
  export interface UpdateSpendingLimitOperationRequest {
26
40
  updateSpendingLimitRequest: UpdateSpendingLimitRequest;
27
41
  }
@@ -43,6 +57,20 @@ export declare class BillingApi extends runtime.BaseAPI {
43
57
  * Create a stablecoin deposit
44
58
  */
45
59
  createCryptoDeposit(requestParameters: CreateCryptoDepositOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<CryptoDeposit>;
60
+ /**
61
+ * Creates request options for downloadInvoicePdf without sending the request
62
+ */
63
+ downloadInvoicePdfRequestOpts(requestParameters: DownloadInvoicePdfRequest): Promise<runtime.RequestOpts>;
64
+ /**
65
+ * Returns one invoice as a PDF, including the organization\'s billing details and full Tax ID. Requires the `billing:read` scope. An invoice belonging to another organization returns the same 404 as one that does not exist.
66
+ * Download an invoice PDF
67
+ */
68
+ downloadInvoicePdfRaw(requestParameters: DownloadInvoicePdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<Blob>>;
69
+ /**
70
+ * Returns one invoice as a PDF, including the organization\'s billing details and full Tax ID. Requires the `billing:read` scope. An invoice belonging to another organization returns the same 404 as one that does not exist.
71
+ * Download an invoice PDF
72
+ */
73
+ downloadInvoicePdf(requestParameters: DownloadInvoicePdfRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Blob>;
46
74
  /**
47
75
  * Creates request options for getBalance without sending the request
48
76
  */
@@ -57,6 +85,20 @@ export declare class BillingApi extends runtime.BaseAPI {
57
85
  * Get the org credit balance
58
86
  */
59
87
  getBalance(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<Balance>;
88
+ /**
89
+ * Creates request options for getBillingDetails without sending the request
90
+ */
91
+ getBillingDetailsRequestOpts(): Promise<runtime.RequestOpts>;
92
+ /**
93
+ * Returns the company name, address and Tax ID printed on the organization\'s invoices. Requires the `billing:read` scope. The Tax ID is stored encrypted and is only ever returned masked (`tax_id_masked`); the full value is printed on the organization\'s own invoice PDFs and nowhere else.
94
+ * Get billing details
95
+ */
96
+ getBillingDetailsRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillingDetails>>;
97
+ /**
98
+ * Returns the company name, address and Tax ID printed on the organization\'s invoices. Requires the `billing:read` scope. The Tax ID is stored encrypted and is only ever returned masked (`tax_id_masked`); the full value is printed on the organization\'s own invoice PDFs and nowhere else.
99
+ * Get billing details
100
+ */
101
+ getBillingDetails(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillingDetails>;
60
102
  /**
61
103
  * Creates request options for getDeposit without sending the request
62
104
  */
@@ -99,6 +141,34 @@ export declare class BillingApi extends runtime.BaseAPI {
99
141
  * List stablecoin deposits
100
142
  */
101
143
  listDeposits(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<ListDeposits200Response>;
144
+ /**
145
+ * Creates request options for listInvoices without sending the request
146
+ */
147
+ listInvoicesRequestOpts(requestParameters: ListInvoicesRequest): Promise<runtime.RequestOpts>;
148
+ /**
149
+ * Returns the organization\'s invoices, newest first. Every payment (card purchase, auto-pay top up, stablecoin deposit) has one; promotional credit does not. Requires the `billing:read` scope.
150
+ * List invoices
151
+ */
152
+ listInvoicesRaw(requestParameters: ListInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<InvoiceList>>;
153
+ /**
154
+ * Returns the organization\'s invoices, newest first. Every payment (card purchase, auto-pay top up, stablecoin deposit) has one; promotional credit does not. Requires the `billing:read` scope.
155
+ * List invoices
156
+ */
157
+ listInvoices(requestParameters?: ListInvoicesRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<InvoiceList>;
158
+ /**
159
+ * Creates request options for updateBillingDetails without sending the request
160
+ */
161
+ updateBillingDetailsRequestOpts(requestParameters: UpdateBillingDetailsOperationRequest): Promise<runtime.RequestOpts>;
162
+ /**
163
+ * Updates the billing details printed on invoices. Requires the `billing:write` scope and an org admin\'s key. Omitted fields keep their value. `tax_id` replaces the stored Tax ID (and needs `tax_id_type` unless one is already stored); an empty `tax_id` removes it. Returns 503 `tax-id-unavailable` when this deployment cannot store a Tax ID.
164
+ * Update billing details
165
+ */
166
+ updateBillingDetailsRaw(requestParameters: UpdateBillingDetailsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<BillingDetails>>;
167
+ /**
168
+ * Updates the billing details printed on invoices. Requires the `billing:write` scope and an org admin\'s key. Omitted fields keep their value. `tax_id` replaces the stored Tax ID (and needs `tax_id_type` unless one is already stored); an empty `tax_id` removes it. Returns 503 `tax-id-unavailable` when this deployment cannot store a Tax ID.
169
+ * Update billing details
170
+ */
171
+ updateBillingDetails(requestParameters: UpdateBillingDetailsOperationRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<BillingDetails>;
102
172
  /**
103
173
  * Creates request options for updateSpendingLimit without sending the request
104
174
  */
@@ -25,10 +25,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
25
25
  exports.BillingApi = void 0;
26
26
  const runtime = require("../runtime");
27
27
  const Balance_1 = require("../models/Balance");
28
+ const BillingDetails_1 = require("../models/BillingDetails");
28
29
  const CreateCryptoDepositRequest_1 = require("../models/CreateCryptoDepositRequest");
29
30
  const CryptoDeposit_1 = require("../models/CryptoDeposit");
31
+ const InvoiceList_1 = require("../models/InvoiceList");
30
32
  const ListDeposits200Response_1 = require("../models/ListDeposits200Response");
31
33
  const SpendingLimit_1 = require("../models/SpendingLimit");
34
+ const UpdateBillingDetailsRequest_1 = require("../models/UpdateBillingDetailsRequest");
32
35
  const UpdateSpendingLimitRequest_1 = require("../models/UpdateSpendingLimitRequest");
33
36
  /**
34
37
  *
@@ -83,6 +86,54 @@ class BillingApi extends runtime.BaseAPI {
83
86
  return yield response.value();
84
87
  });
85
88
  }
89
+ /**
90
+ * Creates request options for downloadInvoicePdf without sending the request
91
+ */
92
+ downloadInvoicePdfRequestOpts(requestParameters) {
93
+ return __awaiter(this, void 0, void 0, function* () {
94
+ if (requestParameters['id'] == null) {
95
+ throw new runtime.RequiredError('id', 'Required parameter "id" was null or undefined when calling downloadInvoicePdf().');
96
+ }
97
+ const queryParameters = {};
98
+ const headerParameters = {};
99
+ if (this.configuration && this.configuration.accessToken) {
100
+ const token = this.configuration.accessToken;
101
+ const tokenString = yield token("bearerAuth", []);
102
+ if (tokenString) {
103
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
104
+ }
105
+ }
106
+ let urlPath = `/billing/invoices/{id}/pdf`;
107
+ urlPath = urlPath.replace('{id}', encodeURIComponent(String(requestParameters['id'])));
108
+ return {
109
+ path: urlPath,
110
+ method: 'GET',
111
+ headers: headerParameters,
112
+ query: queryParameters,
113
+ };
114
+ });
115
+ }
116
+ /**
117
+ * Returns one invoice as a PDF, including the organization\'s billing details and full Tax ID. Requires the `billing:read` scope. An invoice belonging to another organization returns the same 404 as one that does not exist.
118
+ * Download an invoice PDF
119
+ */
120
+ downloadInvoicePdfRaw(requestParameters, initOverrides) {
121
+ return __awaiter(this, void 0, void 0, function* () {
122
+ const requestOptions = yield this.downloadInvoicePdfRequestOpts(requestParameters);
123
+ const response = yield this.request(requestOptions, initOverrides);
124
+ return new runtime.BlobApiResponse(response);
125
+ });
126
+ }
127
+ /**
128
+ * Returns one invoice as a PDF, including the organization\'s billing details and full Tax ID. Requires the `billing:read` scope. An invoice belonging to another organization returns the same 404 as one that does not exist.
129
+ * Download an invoice PDF
130
+ */
131
+ downloadInvoicePdf(requestParameters, initOverrides) {
132
+ return __awaiter(this, void 0, void 0, function* () {
133
+ const response = yield this.downloadInvoicePdfRaw(requestParameters, initOverrides);
134
+ return yield response.value();
135
+ });
136
+ }
86
137
  /**
87
138
  * Creates request options for getBalance without sending the request
88
139
  */
@@ -127,6 +178,50 @@ class BillingApi extends runtime.BaseAPI {
127
178
  return yield response.value();
128
179
  });
129
180
  }
181
+ /**
182
+ * Creates request options for getBillingDetails without sending the request
183
+ */
184
+ getBillingDetailsRequestOpts() {
185
+ return __awaiter(this, void 0, void 0, function* () {
186
+ const queryParameters = {};
187
+ const headerParameters = {};
188
+ if (this.configuration && this.configuration.accessToken) {
189
+ const token = this.configuration.accessToken;
190
+ const tokenString = yield token("bearerAuth", []);
191
+ if (tokenString) {
192
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
193
+ }
194
+ }
195
+ let urlPath = `/billing/details`;
196
+ return {
197
+ path: urlPath,
198
+ method: 'GET',
199
+ headers: headerParameters,
200
+ query: queryParameters,
201
+ };
202
+ });
203
+ }
204
+ /**
205
+ * Returns the company name, address and Tax ID printed on the organization\'s invoices. Requires the `billing:read` scope. The Tax ID is stored encrypted and is only ever returned masked (`tax_id_masked`); the full value is printed on the organization\'s own invoice PDFs and nowhere else.
206
+ * Get billing details
207
+ */
208
+ getBillingDetailsRaw(initOverrides) {
209
+ return __awaiter(this, void 0, void 0, function* () {
210
+ const requestOptions = yield this.getBillingDetailsRequestOpts();
211
+ const response = yield this.request(requestOptions, initOverrides);
212
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, BillingDetails_1.BillingDetailsFromJSON)(jsonValue));
213
+ });
214
+ }
215
+ /**
216
+ * Returns the company name, address and Tax ID printed on the organization\'s invoices. Requires the `billing:read` scope. The Tax ID is stored encrypted and is only ever returned masked (`tax_id_masked`); the full value is printed on the organization\'s own invoice PDFs and nowhere else.
217
+ * Get billing details
218
+ */
219
+ getBillingDetails(initOverrides) {
220
+ return __awaiter(this, void 0, void 0, function* () {
221
+ const response = yield this.getBillingDetailsRaw(initOverrides);
222
+ return yield response.value();
223
+ });
224
+ }
130
225
  /**
131
226
  * Creates request options for getDeposit without sending the request
132
227
  */
@@ -263,6 +358,108 @@ class BillingApi extends runtime.BaseAPI {
263
358
  return yield response.value();
264
359
  });
265
360
  }
361
+ /**
362
+ * Creates request options for listInvoices without sending the request
363
+ */
364
+ listInvoicesRequestOpts(requestParameters) {
365
+ return __awaiter(this, void 0, void 0, function* () {
366
+ const queryParameters = {};
367
+ if (requestParameters['limit'] != null) {
368
+ queryParameters['limit'] = requestParameters['limit'];
369
+ }
370
+ if (requestParameters['cursor'] != null) {
371
+ queryParameters['cursor'] = requestParameters['cursor'];
372
+ }
373
+ const headerParameters = {};
374
+ if (this.configuration && this.configuration.accessToken) {
375
+ const token = this.configuration.accessToken;
376
+ const tokenString = yield token("bearerAuth", []);
377
+ if (tokenString) {
378
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
379
+ }
380
+ }
381
+ let urlPath = `/billing/invoices`;
382
+ return {
383
+ path: urlPath,
384
+ method: 'GET',
385
+ headers: headerParameters,
386
+ query: queryParameters,
387
+ };
388
+ });
389
+ }
390
+ /**
391
+ * Returns the organization\'s invoices, newest first. Every payment (card purchase, auto-pay top up, stablecoin deposit) has one; promotional credit does not. Requires the `billing:read` scope.
392
+ * List invoices
393
+ */
394
+ listInvoicesRaw(requestParameters, initOverrides) {
395
+ return __awaiter(this, void 0, void 0, function* () {
396
+ const requestOptions = yield this.listInvoicesRequestOpts(requestParameters);
397
+ const response = yield this.request(requestOptions, initOverrides);
398
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, InvoiceList_1.InvoiceListFromJSON)(jsonValue));
399
+ });
400
+ }
401
+ /**
402
+ * Returns the organization\'s invoices, newest first. Every payment (card purchase, auto-pay top up, stablecoin deposit) has one; promotional credit does not. Requires the `billing:read` scope.
403
+ * List invoices
404
+ */
405
+ listInvoices() {
406
+ return __awaiter(this, arguments, void 0, function* (requestParameters = {}, initOverrides) {
407
+ const response = yield this.listInvoicesRaw(requestParameters, initOverrides);
408
+ return yield response.value();
409
+ });
410
+ }
411
+ /**
412
+ * Creates request options for updateBillingDetails without sending the request
413
+ */
414
+ updateBillingDetailsRequestOpts(requestParameters) {
415
+ return __awaiter(this, void 0, void 0, function* () {
416
+ if (requestParameters['updateBillingDetailsRequest'] == null) {
417
+ throw new runtime.RequiredError('updateBillingDetailsRequest', 'Required parameter "updateBillingDetailsRequest" was null or undefined when calling updateBillingDetails().');
418
+ }
419
+ const queryParameters = {};
420
+ const headerParameters = {};
421
+ headerParameters['Content-Type'] = 'application/json';
422
+ if (requestParameters['idempotencyKey'] != null) {
423
+ headerParameters['Idempotency-Key'] = String(requestParameters['idempotencyKey']);
424
+ }
425
+ if (this.configuration && this.configuration.accessToken) {
426
+ const token = this.configuration.accessToken;
427
+ const tokenString = yield token("bearerAuth", []);
428
+ if (tokenString) {
429
+ headerParameters["Authorization"] = `Bearer ${tokenString}`;
430
+ }
431
+ }
432
+ let urlPath = `/billing/details`;
433
+ return {
434
+ path: urlPath,
435
+ method: 'PATCH',
436
+ headers: headerParameters,
437
+ query: queryParameters,
438
+ body: (0, UpdateBillingDetailsRequest_1.UpdateBillingDetailsRequestToJSON)(requestParameters['updateBillingDetailsRequest']),
439
+ };
440
+ });
441
+ }
442
+ /**
443
+ * Updates the billing details printed on invoices. Requires the `billing:write` scope and an org admin\'s key. Omitted fields keep their value. `tax_id` replaces the stored Tax ID (and needs `tax_id_type` unless one is already stored); an empty `tax_id` removes it. Returns 503 `tax-id-unavailable` when this deployment cannot store a Tax ID.
444
+ * Update billing details
445
+ */
446
+ updateBillingDetailsRaw(requestParameters, initOverrides) {
447
+ return __awaiter(this, void 0, void 0, function* () {
448
+ const requestOptions = yield this.updateBillingDetailsRequestOpts(requestParameters);
449
+ const response = yield this.request(requestOptions, initOverrides);
450
+ return new runtime.JSONApiResponse(response, (jsonValue) => (0, BillingDetails_1.BillingDetailsFromJSON)(jsonValue));
451
+ });
452
+ }
453
+ /**
454
+ * Updates the billing details printed on invoices. Requires the `billing:write` scope and an org admin\'s key. Omitted fields keep their value. `tax_id` replaces the stored Tax ID (and needs `tax_id_type` unless one is already stored); an empty `tax_id` removes it. Returns 503 `tax-id-unavailable` when this deployment cannot store a Tax ID.
455
+ * Update billing details
456
+ */
457
+ updateBillingDetails(requestParameters, initOverrides) {
458
+ return __awaiter(this, void 0, void 0, function* () {
459
+ const response = yield this.updateBillingDetailsRaw(requestParameters, initOverrides);
460
+ return yield response.value();
461
+ });
462
+ }
266
463
  /**
267
464
  * Creates request options for updateSpendingLimit without sending the request
268
465
  */