@omnibase/core-js 0.9.18 → 0.10.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 (229) hide show
  1. package/.openapi-generator/FILES +44 -0
  2. package/README.md +34 -3
  3. package/docs/AddInvoiceLineItem200Response.md +36 -0
  4. package/docs/AddInvoiceLineItemRequest.md +38 -0
  5. package/docs/ConfigureWebhooks200Response.md +36 -0
  6. package/docs/CreateInvoice200Response.md +36 -0
  7. package/docs/CreateInvoiceRequest.md +40 -0
  8. package/docs/FinalizeInvoiceRequest.md +34 -0
  9. package/docs/GetMeterByID200Response.md +36 -0
  10. package/docs/GetPriceByID200Response.md +36 -0
  11. package/docs/GetProductByID200Response.md +36 -0
  12. package/docs/GetWebhookSecret200Response.md +36 -0
  13. package/docs/InvoiceLineItemResponse.md +38 -0
  14. package/docs/InvoiceResponse.md +46 -0
  15. package/docs/MeterResponse.md +34 -0
  16. package/docs/PerUnitPrice.md +1 -1
  17. package/docs/Price.md +1 -1
  18. package/docs/PriceResponse.md +36 -0
  19. package/docs/PriceWithStripeID.md +1 -1
  20. package/docs/ProductResponse.md +34 -0
  21. package/docs/UpdateInvoiceRequest.md +36 -0
  22. package/docs/V1PaymentsApi.md +391 -0
  23. package/docs/V1StripeApi.md +213 -0
  24. package/docs/V1WebhooksApi.md +150 -0
  25. package/docs/WebhookEndpointConfig.md +40 -0
  26. package/docs/WebhookResult.md +46 -0
  27. package/docs/WebhookSecretResponse.md +48 -0
  28. package/docs/WebhooksConfigRequest.md +34 -0
  29. package/docs/WebhooksConfigResponse.md +34 -0
  30. package/package.json +1 -1
  31. package/src/apis/V1AuthApi.ts +2 -2
  32. package/src/apis/V1ConfigurationApi.ts +2 -2
  33. package/src/apis/V1EventsApi.ts +2 -2
  34. package/src/apis/V1PaymentsApi.ts +350 -2
  35. package/src/apis/V1PermissionsApi.ts +2 -2
  36. package/src/apis/V1StorageApi.ts +2 -2
  37. package/src/apis/V1StripeApi.ts +140 -2
  38. package/src/apis/V1TenantsApi.ts +2 -2
  39. package/src/apis/V1WebhooksApi.ts +132 -0
  40. package/src/apis/index.ts +1 -0
  41. package/src/models/AcceptInvite200Response.ts +2 -2
  42. package/src/models/AcceptInviteRequest.ts +2 -2
  43. package/src/models/AcceptInviteResponse.ts +2 -2
  44. package/src/models/ActiveTenantResponse.ts +2 -2
  45. package/src/models/AddInvoiceLineItem200Response.ts +82 -0
  46. package/src/models/AddInvoiceLineItemRequest.ts +94 -0
  47. package/src/models/AddSubscription200Response.ts +2 -2
  48. package/src/models/AddSubscriptionRequest.ts +2 -2
  49. package/src/models/AddSubscriptionResponse.ts +2 -2
  50. package/src/models/ArchiveAllResponse.ts +2 -2
  51. package/src/models/ArchiveAllStripeConfig200Response.ts +2 -2
  52. package/src/models/BadRequest.ts +2 -2
  53. package/src/models/BadRequestResponse.ts +2 -2
  54. package/src/models/BillingInterval.ts +2 -2
  55. package/src/models/BillingStatusResponse.ts +2 -2
  56. package/src/models/CheckPermission200Response.ts +2 -2
  57. package/src/models/CheckPermissionRequest.ts +2 -2
  58. package/src/models/CheckPermissionRequestWithSubjectId.ts +2 -2
  59. package/src/models/CheckPermissionRequestWithSubjectSet.ts +2 -2
  60. package/src/models/CheckPermissionResponse.ts +2 -2
  61. package/src/models/ConfigHistoryItem.ts +2 -2
  62. package/src/models/ConfigHistoryPagination.ts +2 -2
  63. package/src/models/ConfigHistoryResponse.ts +2 -2
  64. package/src/models/ConfigureWebhooks200Response.ts +82 -0
  65. package/src/models/ConflictResponse.ts +2 -2
  66. package/src/models/ConvertStripeIDToConfigID200Response.ts +2 -2
  67. package/src/models/CreateCheckout200Response.ts +2 -2
  68. package/src/models/CreateCheckoutRequest.ts +2 -2
  69. package/src/models/CreateCheckoutResponse.ts +2 -2
  70. package/src/models/CreateCustomerPortal200Response.ts +2 -2
  71. package/src/models/CreateEmailTemplateRequest.ts +2 -2
  72. package/src/models/CreateInvite200Response.ts +2 -2
  73. package/src/models/CreateInvoice200Response.ts +82 -0
  74. package/src/models/CreateInvoiceRequest.ts +100 -0
  75. package/src/models/CreateOrUpdateEmailTemplate200Response.ts +2 -2
  76. package/src/models/CreateOrUpdateEmailTemplate200ResponseAllOfData.ts +2 -2
  77. package/src/models/CreatePortalRequest.ts +2 -2
  78. package/src/models/CreatePortalResponse.ts +2 -2
  79. package/src/models/CreateRelationship200Response.ts +2 -2
  80. package/src/models/CreateRelationshipRequest.ts +2 -2
  81. package/src/models/CreateRelationshipRequestWithSubjectId.ts +2 -2
  82. package/src/models/CreateRelationshipRequestWithSubjectSet.ts +2 -2
  83. package/src/models/CreateRelationshipResponse.ts +2 -2
  84. package/src/models/CreateRole200Response.ts +2 -2
  85. package/src/models/CreateRoleRequest.ts +2 -2
  86. package/src/models/CreateTenant200Response.ts +2 -2
  87. package/src/models/CreateTenantRequest.ts +2 -2
  88. package/src/models/CreateTenantResponse.ts +2 -2
  89. package/src/models/CreateTenantUserInviteRequest.ts +2 -2
  90. package/src/models/CreateTenantUserInviteResponse.ts +2 -2
  91. package/src/models/CreateUser200Response.ts +2 -2
  92. package/src/models/CreateUserRequest.ts +2 -2
  93. package/src/models/CreateUserRequestName.ts +2 -2
  94. package/src/models/CurrencyCode.ts +2 -2
  95. package/src/models/DeleteEmailTemplate200Response.ts +2 -2
  96. package/src/models/DeleteEmailTemplate200ResponseAllOfData.ts +2 -2
  97. package/src/models/DeleteObject200Response.ts +2 -2
  98. package/src/models/DeleteObjectRequest.ts +2 -2
  99. package/src/models/DeleteRelationship200Response.ts +2 -2
  100. package/src/models/DeleteRelationshipRequest.ts +2 -2
  101. package/src/models/DeleteRelationshipRequestWithSubjectId.ts +2 -2
  102. package/src/models/DeleteRelationshipRequestWithSubjectSet.ts +2 -2
  103. package/src/models/DeleteRelationshipResponse.ts +2 -2
  104. package/src/models/DeleteRole200Response.ts +2 -2
  105. package/src/models/DeleteRoleResponse.ts +2 -2
  106. package/src/models/DeleteTenant200Response.ts +2 -2
  107. package/src/models/DeleteTenantResponse.ts +2 -2
  108. package/src/models/DeleteTenantUserRequest.ts +2 -2
  109. package/src/models/DeployPermissionNamespaces200Response.ts +2 -2
  110. package/src/models/DownloadFile200Response.ts +2 -2
  111. package/src/models/DownloadRequest.ts +2 -2
  112. package/src/models/DownloadResponse.ts +2 -2
  113. package/src/models/EmailTemplate.ts +2 -2
  114. package/src/models/ErrorResponse.ts +2 -2
  115. package/src/models/FinalizeInvoiceRequest.ts +65 -0
  116. package/src/models/ForbiddenResponse.ts +2 -2
  117. package/src/models/GetActiveTenant200Response.ts +2 -2
  118. package/src/models/GetEmailTemplates200Response.ts +2 -2
  119. package/src/models/GetEmailTemplates200ResponseAllOfData.ts +2 -2
  120. package/src/models/GetIdentity200Response.ts +2 -2
  121. package/src/models/GetMeterByID200Response.ts +82 -0
  122. package/src/models/GetPriceByID200Response.ts +82 -0
  123. package/src/models/GetProductByID200Response.ts +82 -0
  124. package/src/models/GetRoleDefinitions200Response.ts +2 -2
  125. package/src/models/GetSession200Response.ts +2 -2
  126. package/src/models/GetStripeConfig200Response.ts +2 -2
  127. package/src/models/GetStripeConfigHistory200Response.ts +2 -2
  128. package/src/models/GetTenantBillingStatus200Response.ts +2 -2
  129. package/src/models/GetTenantJWT200Response.ts +2 -2
  130. package/src/models/GetWebhookSecret200Response.ts +82 -0
  131. package/src/models/InternalServerError.ts +2 -2
  132. package/src/models/InternalServerErrorResponse.ts +2 -2
  133. package/src/models/InvoiceLineItemResponse.ts +82 -0
  134. package/src/models/InvoiceResponse.ts +115 -0
  135. package/src/models/JWTTokenResponse.ts +2 -2
  136. package/src/models/KratosIdentity.ts +2 -2
  137. package/src/models/KratosIdentityCredentials.ts +2 -2
  138. package/src/models/KratosIdentityCredentialsPassword.ts +2 -2
  139. package/src/models/KratosIdentityRecoveryAddressesInner.ts +2 -2
  140. package/src/models/KratosIdentityTraits.ts +2 -2
  141. package/src/models/KratosIdentityTraitsName.ts +2 -2
  142. package/src/models/KratosIdentityVerifiableAddressesInner.ts +2 -2
  143. package/src/models/ListRoles200Response.ts +2 -2
  144. package/src/models/ListTenantSubscriptions200Response.ts +2 -2
  145. package/src/models/ListTenantUsers200Response.ts +2 -2
  146. package/src/models/ListTenants200Response.ts +2 -2
  147. package/src/models/ListTenantsResponse.ts +2 -2
  148. package/src/models/Logout200Response.ts +2 -2
  149. package/src/models/LogoutResponse.ts +2 -2
  150. package/src/models/MessageResponse.ts +2 -2
  151. package/src/models/Meter.ts +2 -2
  152. package/src/models/MeterCustomerMapping.ts +2 -2
  153. package/src/models/MeterDefaultAggregation.ts +2 -2
  154. package/src/models/MeterResponse.ts +74 -0
  155. package/src/models/MeterValueSettings.ts +2 -2
  156. package/src/models/MeterWithStripeID.ts +2 -2
  157. package/src/models/MigrationErrorResponse.ts +2 -2
  158. package/src/models/MigrationSuccessResponse.ts +2 -2
  159. package/src/models/NamespaceDefinition.ts +2 -2
  160. package/src/models/NamespaceDefinitionsResponse.ts +2 -2
  161. package/src/models/NamespaceDeploymentResponse.ts +2 -2
  162. package/src/models/NotFound.ts +2 -2
  163. package/src/models/NotFoundResponse.ts +2 -2
  164. package/src/models/PerUnitBillingScheme.ts +2 -2
  165. package/src/models/PerUnitPrice.ts +3 -3
  166. package/src/models/Price.ts +2 -2
  167. package/src/models/PriceDisplay.ts +2 -2
  168. package/src/models/PriceLimit.ts +2 -2
  169. package/src/models/PriceResponse.ts +90 -0
  170. package/src/models/PriceUI.ts +2 -2
  171. package/src/models/PriceWithStripeID.ts +3 -3
  172. package/src/models/Product.ts +2 -2
  173. package/src/models/ProductResponse.ts +74 -0
  174. package/src/models/ProductUI.ts +2 -2
  175. package/src/models/ProductWithStripeIDs.ts +2 -2
  176. package/src/models/PullStripeConfig200Response.ts +2 -2
  177. package/src/models/RecordUsageRequest.ts +2 -2
  178. package/src/models/Relationship.ts +2 -2
  179. package/src/models/RemoveSubscription200Response.ts +2 -2
  180. package/src/models/RemoveSubscriptionRequest.ts +2 -2
  181. package/src/models/RemoveSubscriptionResponse.ts +2 -2
  182. package/src/models/Role.ts +2 -2
  183. package/src/models/RolesListResponse.ts +2 -2
  184. package/src/models/SchemasConflictResponse.ts +2 -2
  185. package/src/models/SessionResponse.ts +2 -2
  186. package/src/models/StripeConfigResponse.ts +2 -2
  187. package/src/models/StripeConfigUpdateRequest.ts +2 -2
  188. package/src/models/StripeConfigValidateRequest.ts +2 -2
  189. package/src/models/StripeConfiguration.ts +2 -2
  190. package/src/models/StripeConfigurationWithIDs.ts +2 -2
  191. package/src/models/StripeIDConversionResponse.ts +2 -2
  192. package/src/models/SubjectSet.ts +2 -2
  193. package/src/models/SubjectSetRequest.ts +2 -2
  194. package/src/models/SubscriptionResponse.ts +2 -2
  195. package/src/models/SuccessResponse.ts +2 -2
  196. package/src/models/SuccessResponseData.ts +2 -2
  197. package/src/models/SwitchActiveTenant200Response.ts +2 -2
  198. package/src/models/SwitchTenantRequest.ts +2 -2
  199. package/src/models/SwitchTenantResponse.ts +2 -2
  200. package/src/models/Tenant.ts +2 -2
  201. package/src/models/TenantInvite.ts +2 -2
  202. package/src/models/TenantSettings.ts +2 -2
  203. package/src/models/TenantUserResponse.ts +2 -2
  204. package/src/models/Tier.ts +2 -2
  205. package/src/models/TierUpTo.ts +2 -2
  206. package/src/models/TieredBillingScheme.ts +2 -2
  207. package/src/models/TieredPrice.ts +2 -2
  208. package/src/models/TiersMode.ts +2 -2
  209. package/src/models/Unauthorized.ts +2 -2
  210. package/src/models/UnauthorizedResponse.ts +2 -2
  211. package/src/models/UpdateInvoiceRequest.ts +73 -0
  212. package/src/models/UpdateRoleRequest.ts +2 -2
  213. package/src/models/UpdateTenantUserRole200Response.ts +2 -2
  214. package/src/models/UpdateTenantUserRoleRequest.ts +2 -2
  215. package/src/models/UpdateTenantUserRoleResponse.ts +2 -2
  216. package/src/models/UploadFile200Response.ts +2 -2
  217. package/src/models/UploadRequest.ts +2 -2
  218. package/src/models/UploadResponse.ts +2 -2
  219. package/src/models/UsageType.ts +2 -2
  220. package/src/models/UserTenantListItem.ts +2 -2
  221. package/src/models/WebhookEndpointConfig.ts +91 -0
  222. package/src/models/WebhookResult.ts +131 -0
  223. package/src/models/WebhookSecretResponse.ts +127 -0
  224. package/src/models/WebhooksConfigRequest.ts +74 -0
  225. package/src/models/WebhooksConfigResponse.ts +74 -0
  226. package/src/models/WhoAmI200Response.ts +2 -2
  227. package/src/models/WhoAmIResponse.ts +2 -2
  228. package/src/models/index.ts +21 -0
  229. package/src/runtime.ts +2 -2
@@ -4,12 +4,99 @@ All URIs are relative to *https://api.omnibase.tech*
4
4
 
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
+ | [**addInvoiceLineItem**](V1PaymentsApi.md#addinvoicelineitemoperation) | **POST** /api/v1/payments/invoices/{invoice_id}/items | Add invoice line item |
7
8
  | [**createCheckout**](V1PaymentsApi.md#createcheckoutoperation) | **POST** /api/v1/payments/checkout | Create checkout session |
8
9
  | [**createCustomerPortal**](V1PaymentsApi.md#createcustomerportal) | **POST** /api/v1/payments/portal | Create customer portal session |
10
+ | [**createInvoice**](V1PaymentsApi.md#createinvoiceoperation) | **POST** /api/v1/payments/invoices | Create invoice |
11
+ | [**finalizeInvoice**](V1PaymentsApi.md#finalizeinvoiceoperation) | **POST** /api/v1/payments/invoices/{invoice_id}/finalize | Finalize invoice |
12
+ | [**getInvoice**](V1PaymentsApi.md#getinvoice) | **GET** /api/v1/payments/invoices/{invoice_id} | Get invoice |
9
13
  | [**recordUsage**](V1PaymentsApi.md#recordusageoperation) | **POST** /api/v1/payments/usage | Record metered usage |
14
+ | [**updateInvoice**](V1PaymentsApi.md#updateinvoiceoperation) | **PATCH** /api/v1/payments/invoices/{invoice_id} | Update invoice |
10
15
 
11
16
 
12
17
 
18
+ ## addInvoiceLineItem
19
+
20
+ > AddInvoiceLineItem200Response addInvoiceLineItem(xServiceKey, invoiceId, addInvoiceLineItemRequest, xTenantId, xStripeCustomerId)
21
+
22
+ Add invoice line item
23
+
24
+ Adds a new line item to a draft invoice. ## Authentication Requires service key authentication via `X-Service-Key` header. ## Customer Identification You must provide the Stripe customer ID using ONE of: - `X-Stripe-Customer-Id` header: Directly specify the Stripe customer ID - `X-Tenant-Id` header: Look up the Stripe customer ID from the tenant\'s configuration ## Prerequisites - Invoice must be in draft status ## Use Cases - Adding platform fees - Adding additional charges - Custom billing line items
25
+
26
+ ### Example
27
+
28
+ ```ts
29
+ import {
30
+ Configuration,
31
+ V1PaymentsApi,
32
+ } from '@omnibase/core-js';
33
+ import type { AddInvoiceLineItemOperationRequest } from '@omnibase/core-js';
34
+
35
+ async function example() {
36
+ console.log("🚀 Testing @omnibase/core-js SDK...");
37
+ const api = new V1PaymentsApi();
38
+
39
+ const body = {
40
+ // string | Service key for authentication
41
+ xServiceKey: xServiceKey_example,
42
+ // string | Stripe Invoice ID
43
+ invoiceId: invoiceId_example,
44
+ // AddInvoiceLineItemRequest
45
+ addInvoiceLineItemRequest: ...,
46
+ // string | Tenant ID (UUID) - Used to look up the Stripe customer ID from tenant configuration. Required if X-Stripe-Customer-Id is not provided. (optional)
47
+ xTenantId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
48
+ // string | Stripe Customer ID (e.g., cus_xxx) - Directly specify the customer. Required if X-Tenant-Id is not provided. (optional)
49
+ xStripeCustomerId: xStripeCustomerId_example,
50
+ } satisfies AddInvoiceLineItemOperationRequest;
51
+
52
+ try {
53
+ const data = await api.addInvoiceLineItem(body);
54
+ console.log(data);
55
+ } catch (error) {
56
+ console.error(error);
57
+ }
58
+ }
59
+
60
+ // Run the test
61
+ example().catch(console.error);
62
+ ```
63
+
64
+ ### Parameters
65
+
66
+
67
+ | Name | Type | Description | Notes |
68
+ |------------- | ------------- | ------------- | -------------|
69
+ | **xServiceKey** | `string` | Service key for authentication | [Defaults to `undefined`] |
70
+ | **invoiceId** | `string` | Stripe Invoice ID | [Defaults to `undefined`] |
71
+ | **addInvoiceLineItemRequest** | [AddInvoiceLineItemRequest](AddInvoiceLineItemRequest.md) | | |
72
+ | **xTenantId** | `string` | Tenant ID (UUID) - Used to look up the Stripe customer ID from tenant configuration. Required if X-Stripe-Customer-Id is not provided. | [Optional] [Defaults to `undefined`] |
73
+ | **xStripeCustomerId** | `string` | Stripe Customer ID (e.g., cus_xxx) - Directly specify the customer. Required if X-Tenant-Id is not provided. | [Optional] [Defaults to `undefined`] |
74
+
75
+ ### Return type
76
+
77
+ [**AddInvoiceLineItem200Response**](AddInvoiceLineItem200Response.md)
78
+
79
+ ### Authorization
80
+
81
+ No authorization required
82
+
83
+ ### HTTP request headers
84
+
85
+ - **Content-Type**: `application/json`
86
+ - **Accept**: `application/json`, `text/plain`
87
+
88
+
89
+ ### HTTP response details
90
+ | Status code | Description | Response headers |
91
+ |-------------|-------------|------------------|
92
+ | **200** | Line item added successfully | - |
93
+ | **400** | Bad Request - Invalid request parameters | - |
94
+ | **401** | Unauthorized - Authentication required | - |
95
+ | **500** | Internal Server Error - Server encountered an error | - |
96
+
97
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
98
+
99
+
13
100
  ## createCheckout
14
101
 
15
102
  > CreateCheckout200Response createCheckout(createCheckoutRequest)
@@ -151,6 +238,234 @@ No authorization required
151
238
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
152
239
 
153
240
 
241
+ ## createInvoice
242
+
243
+ > CreateInvoice200Response createInvoice(xServiceKey, createInvoiceRequest, xTenantId, xStripeCustomerId)
244
+
245
+ Create invoice
246
+
247
+ Creates a new draft invoice for the specified customer. ## Authentication Requires service key authentication via `X-Service-Key` header. ## Customer Identification You must provide the Stripe customer ID using ONE of: - `X-Stripe-Customer-Id` header: Directly specify the Stripe customer ID - `X-Tenant-Id` header: Look up the Stripe customer ID from the tenant\'s configuration ## Use Cases - Creating invoices for platform fees - Manual billing scenarios - Custom invoice generation
248
+
249
+ ### Example
250
+
251
+ ```ts
252
+ import {
253
+ Configuration,
254
+ V1PaymentsApi,
255
+ } from '@omnibase/core-js';
256
+ import type { CreateInvoiceOperationRequest } from '@omnibase/core-js';
257
+
258
+ async function example() {
259
+ console.log("🚀 Testing @omnibase/core-js SDK...");
260
+ const api = new V1PaymentsApi();
261
+
262
+ const body = {
263
+ // string | Service key for authentication
264
+ xServiceKey: xServiceKey_example,
265
+ // CreateInvoiceRequest
266
+ createInvoiceRequest: ...,
267
+ // string | Tenant ID (UUID) - Used to look up the Stripe customer ID from tenant configuration. Required if X-Stripe-Customer-Id is not provided. (optional)
268
+ xTenantId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
269
+ // string | Stripe Customer ID (e.g., cus_xxx) - Directly specify the customer. Required if X-Tenant-Id is not provided. (optional)
270
+ xStripeCustomerId: xStripeCustomerId_example,
271
+ } satisfies CreateInvoiceOperationRequest;
272
+
273
+ try {
274
+ const data = await api.createInvoice(body);
275
+ console.log(data);
276
+ } catch (error) {
277
+ console.error(error);
278
+ }
279
+ }
280
+
281
+ // Run the test
282
+ example().catch(console.error);
283
+ ```
284
+
285
+ ### Parameters
286
+
287
+
288
+ | Name | Type | Description | Notes |
289
+ |------------- | ------------- | ------------- | -------------|
290
+ | **xServiceKey** | `string` | Service key for authentication | [Defaults to `undefined`] |
291
+ | **createInvoiceRequest** | [CreateInvoiceRequest](CreateInvoiceRequest.md) | | |
292
+ | **xTenantId** | `string` | Tenant ID (UUID) - Used to look up the Stripe customer ID from tenant configuration. Required if X-Stripe-Customer-Id is not provided. | [Optional] [Defaults to `undefined`] |
293
+ | **xStripeCustomerId** | `string` | Stripe Customer ID (e.g., cus_xxx) - Directly specify the customer. Required if X-Tenant-Id is not provided. | [Optional] [Defaults to `undefined`] |
294
+
295
+ ### Return type
296
+
297
+ [**CreateInvoice200Response**](CreateInvoice200Response.md)
298
+
299
+ ### Authorization
300
+
301
+ No authorization required
302
+
303
+ ### HTTP request headers
304
+
305
+ - **Content-Type**: `application/json`
306
+ - **Accept**: `application/json`, `text/plain`
307
+
308
+
309
+ ### HTTP response details
310
+ | Status code | Description | Response headers |
311
+ |-------------|-------------|------------------|
312
+ | **200** | Invoice created successfully | - |
313
+ | **400** | Bad Request - Invalid request parameters | - |
314
+ | **401** | Unauthorized - Authentication required | - |
315
+ | **500** | Internal Server Error - Server encountered an error | - |
316
+
317
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
318
+
319
+
320
+ ## finalizeInvoice
321
+
322
+ > CreateInvoice200Response finalizeInvoice(xServiceKey, invoiceId, finalizeInvoiceRequest)
323
+
324
+ Finalize invoice
325
+
326
+ Finalizes a draft invoice, optionally auto-advancing to send it immediately. ## Authentication Requires service key authentication via `X-Service-Key` header. ## Prerequisites - Invoice must be in draft status ## Use Cases - Approving invoices for sending - Completing invoice preparation - Triggering invoice emails
327
+
328
+ ### Example
329
+
330
+ ```ts
331
+ import {
332
+ Configuration,
333
+ V1PaymentsApi,
334
+ } from '@omnibase/core-js';
335
+ import type { FinalizeInvoiceOperationRequest } from '@omnibase/core-js';
336
+
337
+ async function example() {
338
+ console.log("🚀 Testing @omnibase/core-js SDK...");
339
+ const api = new V1PaymentsApi();
340
+
341
+ const body = {
342
+ // string | Service key for authentication
343
+ xServiceKey: xServiceKey_example,
344
+ // string | Stripe Invoice ID
345
+ invoiceId: invoiceId_example,
346
+ // FinalizeInvoiceRequest
347
+ finalizeInvoiceRequest: ...,
348
+ } satisfies FinalizeInvoiceOperationRequest;
349
+
350
+ try {
351
+ const data = await api.finalizeInvoice(body);
352
+ console.log(data);
353
+ } catch (error) {
354
+ console.error(error);
355
+ }
356
+ }
357
+
358
+ // Run the test
359
+ example().catch(console.error);
360
+ ```
361
+
362
+ ### Parameters
363
+
364
+
365
+ | Name | Type | Description | Notes |
366
+ |------------- | ------------- | ------------- | -------------|
367
+ | **xServiceKey** | `string` | Service key for authentication | [Defaults to `undefined`] |
368
+ | **invoiceId** | `string` | Stripe Invoice ID | [Defaults to `undefined`] |
369
+ | **finalizeInvoiceRequest** | [FinalizeInvoiceRequest](FinalizeInvoiceRequest.md) | | |
370
+
371
+ ### Return type
372
+
373
+ [**CreateInvoice200Response**](CreateInvoice200Response.md)
374
+
375
+ ### Authorization
376
+
377
+ No authorization required
378
+
379
+ ### HTTP request headers
380
+
381
+ - **Content-Type**: `application/json`
382
+ - **Accept**: `application/json`, `text/plain`
383
+
384
+
385
+ ### HTTP response details
386
+ | Status code | Description | Response headers |
387
+ |-------------|-------------|------------------|
388
+ | **200** | Invoice finalized successfully | - |
389
+ | **400** | Bad Request - Invalid request parameters | - |
390
+ | **401** | Unauthorized - Authentication required | - |
391
+ | **500** | Internal Server Error - Server encountered an error | - |
392
+
393
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
394
+
395
+
396
+ ## getInvoice
397
+
398
+ > CreateInvoice200Response getInvoice(xServiceKey, invoiceId)
399
+
400
+ Get invoice
401
+
402
+ Retrieves a Stripe invoice by its ID. ## Authentication Requires service key authentication via `X-Service-Key` header. ## Use Cases - Webhook processing - Invoice status checking - Invoice data retrieval
403
+
404
+ ### Example
405
+
406
+ ```ts
407
+ import {
408
+ Configuration,
409
+ V1PaymentsApi,
410
+ } from '@omnibase/core-js';
411
+ import type { GetInvoiceRequest } from '@omnibase/core-js';
412
+
413
+ async function example() {
414
+ console.log("🚀 Testing @omnibase/core-js SDK...");
415
+ const api = new V1PaymentsApi();
416
+
417
+ const body = {
418
+ // string | Service key for authentication
419
+ xServiceKey: xServiceKey_example,
420
+ // string | Stripe Invoice ID
421
+ invoiceId: invoiceId_example,
422
+ } satisfies GetInvoiceRequest;
423
+
424
+ try {
425
+ const data = await api.getInvoice(body);
426
+ console.log(data);
427
+ } catch (error) {
428
+ console.error(error);
429
+ }
430
+ }
431
+
432
+ // Run the test
433
+ example().catch(console.error);
434
+ ```
435
+
436
+ ### Parameters
437
+
438
+
439
+ | Name | Type | Description | Notes |
440
+ |------------- | ------------- | ------------- | -------------|
441
+ | **xServiceKey** | `string` | Service key for authentication | [Defaults to `undefined`] |
442
+ | **invoiceId** | `string` | Stripe Invoice ID | [Defaults to `undefined`] |
443
+
444
+ ### Return type
445
+
446
+ [**CreateInvoice200Response**](CreateInvoice200Response.md)
447
+
448
+ ### Authorization
449
+
450
+ No authorization required
451
+
452
+ ### HTTP request headers
453
+
454
+ - **Content-Type**: Not defined
455
+ - **Accept**: `application/json`, `text/plain`
456
+
457
+
458
+ ### HTTP response details
459
+ | Status code | Description | Response headers |
460
+ |-------------|-------------|------------------|
461
+ | **200** | Invoice retrieved successfully | - |
462
+ | **400** | Bad Request - Invalid request parameters | - |
463
+ | **401** | Unauthorized - Authentication required | - |
464
+ | **500** | Internal Server Error - Server encountered an error | - |
465
+
466
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
467
+
468
+
154
469
  ## recordUsage
155
470
 
156
471
  > SuccessResponse recordUsage(recordUsageRequest)
@@ -220,3 +535,79 @@ No authorization required
220
535
 
221
536
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
222
537
 
538
+
539
+ ## updateInvoice
540
+
541
+ > CreateInvoice200Response updateInvoice(xServiceKey, invoiceId, updateInvoiceRequest)
542
+
543
+ Update invoice
544
+
545
+ Updates a draft invoice\'s description and metadata. ## Authentication Requires service key authentication via `X-Service-Key` header. ## Prerequisites - Invoice must be in draft status ## Use Cases - Adding custom descriptions - Adding metadata for tracking - Customizing invoice before sending
546
+
547
+ ### Example
548
+
549
+ ```ts
550
+ import {
551
+ Configuration,
552
+ V1PaymentsApi,
553
+ } from '@omnibase/core-js';
554
+ import type { UpdateInvoiceOperationRequest } from '@omnibase/core-js';
555
+
556
+ async function example() {
557
+ console.log("🚀 Testing @omnibase/core-js SDK...");
558
+ const api = new V1PaymentsApi();
559
+
560
+ const body = {
561
+ // string | Service key for authentication
562
+ xServiceKey: xServiceKey_example,
563
+ // string | Stripe Invoice ID
564
+ invoiceId: invoiceId_example,
565
+ // UpdateInvoiceRequest
566
+ updateInvoiceRequest: ...,
567
+ } satisfies UpdateInvoiceOperationRequest;
568
+
569
+ try {
570
+ const data = await api.updateInvoice(body);
571
+ console.log(data);
572
+ } catch (error) {
573
+ console.error(error);
574
+ }
575
+ }
576
+
577
+ // Run the test
578
+ example().catch(console.error);
579
+ ```
580
+
581
+ ### Parameters
582
+
583
+
584
+ | Name | Type | Description | Notes |
585
+ |------------- | ------------- | ------------- | -------------|
586
+ | **xServiceKey** | `string` | Service key for authentication | [Defaults to `undefined`] |
587
+ | **invoiceId** | `string` | Stripe Invoice ID | [Defaults to `undefined`] |
588
+ | **updateInvoiceRequest** | [UpdateInvoiceRequest](UpdateInvoiceRequest.md) | | |
589
+
590
+ ### Return type
591
+
592
+ [**CreateInvoice200Response**](CreateInvoice200Response.md)
593
+
594
+ ### Authorization
595
+
596
+ No authorization required
597
+
598
+ ### HTTP request headers
599
+
600
+ - **Content-Type**: `application/json`
601
+ - **Accept**: `application/json`, `text/plain`
602
+
603
+
604
+ ### HTTP response details
605
+ | Status code | Description | Response headers |
606
+ |-------------|-------------|------------------|
607
+ | **200** | Invoice updated successfully | - |
608
+ | **400** | Bad Request - Invalid request parameters | - |
609
+ | **401** | Unauthorized - Authentication required | - |
610
+ | **500** | Internal Server Error - Server encountered an error | - |
611
+
612
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
613
+
@@ -5,6 +5,9 @@ All URIs are relative to *https://api.omnibase.tech*
5
5
  | Method | HTTP request | Description |
6
6
  |------------- | ------------- | -------------|
7
7
  | [**convertStripeIDToConfigID**](V1StripeApi.md#convertstripeidtoconfigid) | **GET** /api/v1/stripe/convert/stripe-id/{stripe_id} | Convert Stripe ID to config ID |
8
+ | [**getMeterByID**](V1StripeApi.md#getmeterbyid) | **GET** /api/v1/stripe/config/meters/{meter_id} | Get meter by ID |
9
+ | [**getPriceByID**](V1StripeApi.md#getpricebyid) | **GET** /api/v1/stripe/config/prices/{price_id} | Get price by ID |
10
+ | [**getProductByID**](V1StripeApi.md#getproductbyid) | **GET** /api/v1/stripe/config/products/{product_id} | Get product by ID |
8
11
  | [**getStripeConfig**](V1StripeApi.md#getstripeconfig) | **GET** /api/v1/stripe/config | Get public Stripe config |
9
12
  | [**getStripeConfigAdmin**](V1StripeApi.md#getstripeconfigadmin) | **GET** /api/v1/stripe/admin/config | Get full Stripe config (admin) |
10
13
 
@@ -80,6 +83,216 @@ No authorization required
80
83
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
81
84
 
82
85
 
86
+ ## getMeterByID
87
+
88
+ > GetMeterByID200Response getMeterByID(meterId)
89
+
90
+ Get meter by ID
91
+
92
+ Returns a specific billing meter from the Stripe configuration by its config ID. ## Authentication No authentication required for public endpoint. ## Use Cases - Fetch meter details for usage tracking - Display metered billing information - Usage reporting configuration
93
+
94
+ ### Example
95
+
96
+ ```ts
97
+ import {
98
+ Configuration,
99
+ V1StripeApi,
100
+ } from '@omnibase/core-js';
101
+ import type { GetMeterByIDRequest } from '@omnibase/core-js';
102
+
103
+ async function example() {
104
+ console.log("🚀 Testing @omnibase/core-js SDK...");
105
+ const api = new V1StripeApi();
106
+
107
+ const body = {
108
+ // string | Meter config ID
109
+ meterId: api_requests,
110
+ } satisfies GetMeterByIDRequest;
111
+
112
+ try {
113
+ const data = await api.getMeterByID(body);
114
+ console.log(data);
115
+ } catch (error) {
116
+ console.error(error);
117
+ }
118
+ }
119
+
120
+ // Run the test
121
+ example().catch(console.error);
122
+ ```
123
+
124
+ ### Parameters
125
+
126
+
127
+ | Name | Type | Description | Notes |
128
+ |------------- | ------------- | ------------- | -------------|
129
+ | **meterId** | `string` | Meter config ID | [Defaults to `undefined`] |
130
+
131
+ ### Return type
132
+
133
+ [**GetMeterByID200Response**](GetMeterByID200Response.md)
134
+
135
+ ### Authorization
136
+
137
+ No authorization required
138
+
139
+ ### HTTP request headers
140
+
141
+ - **Content-Type**: Not defined
142
+ - **Accept**: `application/json`
143
+
144
+
145
+ ### HTTP response details
146
+ | Status code | Description | Response headers |
147
+ |-------------|-------------|------------------|
148
+ | **200** | Meter found | - |
149
+ | **400** | Missing meter_id | - |
150
+ | **404** | Meter not found | - |
151
+ | **500** | Failed to retrieve meter | - |
152
+
153
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
154
+
155
+
156
+ ## getPriceByID
157
+
158
+ > GetPriceByID200Response getPriceByID(priceId)
159
+
160
+ Get price by ID
161
+
162
+ Returns a specific price from the Stripe configuration by its config ID, along with its parent product. ## Authentication No authentication required for public endpoint. ## Use Cases - Fetch price details for checkout - Display specific pricing information - Subscription management
163
+
164
+ ### Example
165
+
166
+ ```ts
167
+ import {
168
+ Configuration,
169
+ V1StripeApi,
170
+ } from '@omnibase/core-js';
171
+ import type { GetPriceByIDRequest } from '@omnibase/core-js';
172
+
173
+ async function example() {
174
+ console.log("🚀 Testing @omnibase/core-js SDK...");
175
+ const api = new V1StripeApi();
176
+
177
+ const body = {
178
+ // string | Price config ID
179
+ priceId: basic_monthly,
180
+ } satisfies GetPriceByIDRequest;
181
+
182
+ try {
183
+ const data = await api.getPriceByID(body);
184
+ console.log(data);
185
+ } catch (error) {
186
+ console.error(error);
187
+ }
188
+ }
189
+
190
+ // Run the test
191
+ example().catch(console.error);
192
+ ```
193
+
194
+ ### Parameters
195
+
196
+
197
+ | Name | Type | Description | Notes |
198
+ |------------- | ------------- | ------------- | -------------|
199
+ | **priceId** | `string` | Price config ID | [Defaults to `undefined`] |
200
+
201
+ ### Return type
202
+
203
+ [**GetPriceByID200Response**](GetPriceByID200Response.md)
204
+
205
+ ### Authorization
206
+
207
+ No authorization required
208
+
209
+ ### HTTP request headers
210
+
211
+ - **Content-Type**: Not defined
212
+ - **Accept**: `application/json`
213
+
214
+
215
+ ### HTTP response details
216
+ | Status code | Description | Response headers |
217
+ |-------------|-------------|------------------|
218
+ | **200** | Price found | - |
219
+ | **400** | Missing price_id | - |
220
+ | **404** | Price not found | - |
221
+ | **500** | Failed to retrieve price | - |
222
+
223
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
224
+
225
+
226
+ ## getProductByID
227
+
228
+ > GetProductByID200Response getProductByID(productId)
229
+
230
+ Get product by ID
231
+
232
+ Returns a specific product from the Stripe configuration by its config ID, including all its prices. ## Authentication No authentication required for public endpoint. ## Use Cases - Fetch product details - Display product information with all price options - Product catalog pages
233
+
234
+ ### Example
235
+
236
+ ```ts
237
+ import {
238
+ Configuration,
239
+ V1StripeApi,
240
+ } from '@omnibase/core-js';
241
+ import type { GetProductByIDRequest } from '@omnibase/core-js';
242
+
243
+ async function example() {
244
+ console.log("🚀 Testing @omnibase/core-js SDK...");
245
+ const api = new V1StripeApi();
246
+
247
+ const body = {
248
+ // string | Product config ID
249
+ productId: basic_plan,
250
+ } satisfies GetProductByIDRequest;
251
+
252
+ try {
253
+ const data = await api.getProductByID(body);
254
+ console.log(data);
255
+ } catch (error) {
256
+ console.error(error);
257
+ }
258
+ }
259
+
260
+ // Run the test
261
+ example().catch(console.error);
262
+ ```
263
+
264
+ ### Parameters
265
+
266
+
267
+ | Name | Type | Description | Notes |
268
+ |------------- | ------------- | ------------- | -------------|
269
+ | **productId** | `string` | Product config ID | [Defaults to `undefined`] |
270
+
271
+ ### Return type
272
+
273
+ [**GetProductByID200Response**](GetProductByID200Response.md)
274
+
275
+ ### Authorization
276
+
277
+ No authorization required
278
+
279
+ ### HTTP request headers
280
+
281
+ - **Content-Type**: Not defined
282
+ - **Accept**: `application/json`
283
+
284
+
285
+ ### HTTP response details
286
+ | Status code | Description | Response headers |
287
+ |-------------|-------------|------------------|
288
+ | **200** | Product found | - |
289
+ | **400** | Missing product_id | - |
290
+ | **404** | Product not found | - |
291
+ | **500** | Failed to retrieve product | - |
292
+
293
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
294
+
295
+
83
296
  ## getStripeConfig
84
297
 
85
298
  > GetStripeConfig200Response getStripeConfig()