@omnibase/core-js 0.10.1 → 0.12.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 (226) hide show
  1. package/.openapi-generator/FILES +18 -2
  2. package/README.md +16 -4
  3. package/docs/AddInvoiceLineItemWithConfigPriceRequest.md +42 -0
  4. package/docs/AddInvoiceLineItemWithPriceIDRequest.md +45 -0
  5. package/docs/AddInvoiceLineItemWithStripePriceRequest.md +42 -0
  6. package/docs/GetTenantByID200Response.md +36 -0
  7. package/docs/GetTenantByIDResponse.md +35 -0
  8. package/docs/GetTenantByStripeCustomerID200Response.md +36 -0
  9. package/docs/GetTenantByStripeCustomerIDResponse.md +35 -0
  10. package/docs/GetTenantSubscription200Response.md +36 -0
  11. package/docs/PullStripeConfig200Response.md +1 -1
  12. package/docs/StripeConfigurationWithIDs.md +2 -0
  13. package/docs/TooManyRequestsResponse.md +37 -0
  14. package/docs/V1AuthApi.md +15 -5
  15. package/docs/V1ConfigurationApi.md +9 -3
  16. package/docs/V1PaymentsApi.md +103 -0
  17. package/docs/V1TenantsApi.md +240 -0
  18. package/docs/V1WebhooksApi.md +2 -1
  19. package/package.json +2 -2
  20. package/src/apis/V1AuthApi.ts +18 -6
  21. package/src/apis/V1ConfigurationApi.ts +13 -1
  22. package/src/apis/V1EventsApi.ts +1 -1
  23. package/src/apis/V1PaymentsApi.ts +86 -1
  24. package/src/apis/V1PermissionsApi.ts +1 -1
  25. package/src/apis/V1StorageApi.ts +1 -1
  26. package/src/apis/V1StripeApi.ts +1 -1
  27. package/src/apis/V1TenantsApi.ts +163 -1
  28. package/src/apis/V1WebhooksApi.ts +4 -1
  29. package/src/models/AcceptInvite200Response.ts +1 -1
  30. package/src/models/AcceptInviteRequest.ts +1 -1
  31. package/src/models/AcceptInviteResponse.ts +1 -1
  32. package/src/models/ActiveTenantResponse.ts +1 -1
  33. package/src/models/AddInvoiceLineItem200Response.ts +1 -1
  34. package/src/models/AddInvoiceLineItemRequest.ts +2 -2
  35. package/src/models/AddInvoiceLineItemWithConfigPriceRequest.ts +111 -0
  36. package/src/models/AddInvoiceLineItemWithPriceIDRequest.ts +76 -0
  37. package/src/models/AddInvoiceLineItemWithStripePriceRequest.ts +111 -0
  38. package/src/models/AddSubscription200Response.ts +1 -1
  39. package/src/models/AddSubscriptionRequest.ts +1 -1
  40. package/src/models/AddSubscriptionResponse.ts +1 -1
  41. package/src/models/ArchiveAllResponse.ts +1 -1
  42. package/src/models/ArchiveAllStripeConfig200Response.ts +1 -1
  43. package/src/models/BadRequest.ts +1 -1
  44. package/src/models/BadRequestResponse.ts +1 -1
  45. package/src/models/BillingInterval.ts +1 -1
  46. package/src/models/BillingStatusResponse.ts +1 -1
  47. package/src/models/CheckPermission200Response.ts +1 -1
  48. package/src/models/CheckPermissionRequest.ts +1 -1
  49. package/src/models/CheckPermissionRequestWithSubjectId.ts +1 -1
  50. package/src/models/CheckPermissionRequestWithSubjectSet.ts +1 -1
  51. package/src/models/CheckPermissionResponse.ts +1 -1
  52. package/src/models/ConfigHistoryItem.ts +1 -1
  53. package/src/models/ConfigHistoryPagination.ts +1 -1
  54. package/src/models/ConfigHistoryResponse.ts +1 -1
  55. package/src/models/ConfigureWebhooks200Response.ts +1 -1
  56. package/src/models/ConflictResponse.ts +1 -1
  57. package/src/models/ConvertStripeIDToConfigID200Response.ts +1 -1
  58. package/src/models/CreateCheckout200Response.ts +1 -1
  59. package/src/models/CreateCheckoutRequest.ts +1 -1
  60. package/src/models/CreateCheckoutResponse.ts +1 -1
  61. package/src/models/CreateCustomerPortal200Response.ts +1 -1
  62. package/src/models/CreateEmailTemplateRequest.ts +1 -1
  63. package/src/models/CreateInvite200Response.ts +1 -1
  64. package/src/models/CreateInvoice200Response.ts +1 -1
  65. package/src/models/CreateInvoiceRequest.ts +2 -2
  66. package/src/models/CreateOrUpdateEmailTemplate200Response.ts +1 -1
  67. package/src/models/CreateOrUpdateEmailTemplate200ResponseAllOfData.ts +1 -1
  68. package/src/models/CreatePortalRequest.ts +1 -1
  69. package/src/models/CreatePortalResponse.ts +1 -1
  70. package/src/models/CreateRelationship200Response.ts +1 -1
  71. package/src/models/CreateRelationshipRequest.ts +1 -1
  72. package/src/models/CreateRelationshipRequestWithSubjectId.ts +1 -1
  73. package/src/models/CreateRelationshipRequestWithSubjectSet.ts +1 -1
  74. package/src/models/CreateRelationshipResponse.ts +1 -1
  75. package/src/models/CreateRole200Response.ts +1 -1
  76. package/src/models/CreateRoleRequest.ts +1 -1
  77. package/src/models/CreateTenant200Response.ts +1 -1
  78. package/src/models/CreateTenantRequest.ts +1 -1
  79. package/src/models/CreateTenantResponse.ts +1 -1
  80. package/src/models/CreateTenantUserInviteRequest.ts +1 -1
  81. package/src/models/CreateTenantUserInviteResponse.ts +1 -1
  82. package/src/models/CreateUser200Response.ts +1 -1
  83. package/src/models/CreateUserRequest.ts +2 -2
  84. package/src/models/CreateUserRequestName.ts +1 -1
  85. package/src/models/CurrencyCode.ts +1 -1
  86. package/src/models/DeleteEmailTemplate200Response.ts +1 -1
  87. package/src/models/DeleteEmailTemplate200ResponseAllOfData.ts +1 -1
  88. package/src/models/DeleteObject200Response.ts +1 -1
  89. package/src/models/DeleteObjectRequest.ts +1 -1
  90. package/src/models/DeleteRelationship200Response.ts +1 -1
  91. package/src/models/DeleteRelationshipRequest.ts +1 -1
  92. package/src/models/DeleteRelationshipRequestWithSubjectId.ts +1 -1
  93. package/src/models/DeleteRelationshipRequestWithSubjectSet.ts +1 -1
  94. package/src/models/DeleteRelationshipResponse.ts +1 -1
  95. package/src/models/DeleteRole200Response.ts +1 -1
  96. package/src/models/DeleteRoleResponse.ts +1 -1
  97. package/src/models/DeleteTenant200Response.ts +1 -1
  98. package/src/models/DeleteTenantResponse.ts +1 -1
  99. package/src/models/DeleteTenantUserRequest.ts +1 -1
  100. package/src/models/DeployPermissionNamespaces200Response.ts +1 -1
  101. package/src/models/DownloadFile200Response.ts +1 -1
  102. package/src/models/DownloadRequest.ts +1 -1
  103. package/src/models/DownloadResponse.ts +1 -1
  104. package/src/models/EmailTemplate.ts +1 -1
  105. package/src/models/ErrorResponse.ts +1 -1
  106. package/src/models/FinalizeInvoiceRequest.ts +1 -1
  107. package/src/models/ForbiddenResponse.ts +1 -1
  108. package/src/models/GetActiveTenant200Response.ts +1 -1
  109. package/src/models/GetEmailTemplates200Response.ts +1 -1
  110. package/src/models/GetEmailTemplates200ResponseAllOfData.ts +1 -1
  111. package/src/models/GetIdentity200Response.ts +1 -1
  112. package/src/models/GetMeterByID200Response.ts +1 -1
  113. package/src/models/GetPriceByID200Response.ts +1 -1
  114. package/src/models/GetProductByID200Response.ts +1 -1
  115. package/src/models/GetRoleDefinitions200Response.ts +1 -1
  116. package/src/models/GetSession200Response.ts +1 -1
  117. package/src/models/GetStripeConfig200Response.ts +1 -1
  118. package/src/models/GetStripeConfigHistory200Response.ts +1 -1
  119. package/src/models/GetTenantBillingStatus200Response.ts +1 -1
  120. package/src/models/GetTenantByID200Response.ts +82 -0
  121. package/src/models/GetTenantByIDResponse.ts +74 -0
  122. package/src/models/GetTenantByStripeCustomerID200Response.ts +82 -0
  123. package/src/models/GetTenantByStripeCustomerIDResponse.ts +74 -0
  124. package/src/models/GetTenantJWT200Response.ts +1 -1
  125. package/src/models/GetTenantSubscription200Response.ts +82 -0
  126. package/src/models/GetWebhookSecret200Response.ts +1 -1
  127. package/src/models/InternalServerError.ts +1 -1
  128. package/src/models/InternalServerErrorResponse.ts +1 -1
  129. package/src/models/InvoiceLineItemResponse.ts +1 -1
  130. package/src/models/InvoiceResponse.ts +1 -1
  131. package/src/models/JWTTokenResponse.ts +1 -1
  132. package/src/models/KratosIdentity.ts +1 -1
  133. package/src/models/KratosIdentityCredentials.ts +1 -1
  134. package/src/models/KratosIdentityCredentialsPassword.ts +1 -1
  135. package/src/models/KratosIdentityRecoveryAddressesInner.ts +1 -1
  136. package/src/models/KratosIdentityTraits.ts +1 -1
  137. package/src/models/KratosIdentityTraitsName.ts +1 -1
  138. package/src/models/KratosIdentityVerifiableAddressesInner.ts +1 -1
  139. package/src/models/ListRoles200Response.ts +1 -1
  140. package/src/models/ListTenantSubscriptions200Response.ts +1 -1
  141. package/src/models/ListTenantUsers200Response.ts +1 -1
  142. package/src/models/ListTenants200Response.ts +1 -1
  143. package/src/models/ListTenantsResponse.ts +1 -1
  144. package/src/models/Logout200Response.ts +1 -1
  145. package/src/models/LogoutResponse.ts +1 -1
  146. package/src/models/MessageResponse.ts +1 -1
  147. package/src/models/Meter.ts +1 -1
  148. package/src/models/MeterCustomerMapping.ts +1 -1
  149. package/src/models/MeterDefaultAggregation.ts +1 -1
  150. package/src/models/MeterResponse.ts +1 -1
  151. package/src/models/MeterValueSettings.ts +1 -1
  152. package/src/models/MeterWithStripeID.ts +1 -1
  153. package/src/models/MigrationErrorResponse.ts +1 -1
  154. package/src/models/MigrationSuccessResponse.ts +1 -1
  155. package/src/models/NamespaceDefinition.ts +1 -1
  156. package/src/models/NamespaceDefinitionsResponse.ts +1 -1
  157. package/src/models/NamespaceDeploymentResponse.ts +1 -1
  158. package/src/models/NotFound.ts +1 -1
  159. package/src/models/NotFoundResponse.ts +1 -1
  160. package/src/models/PerUnitBillingScheme.ts +1 -1
  161. package/src/models/PerUnitPrice.ts +1 -1
  162. package/src/models/Price.ts +1 -1
  163. package/src/models/PriceDisplay.ts +1 -1
  164. package/src/models/PriceLimit.ts +1 -1
  165. package/src/models/PriceResponse.ts +1 -1
  166. package/src/models/PriceUI.ts +1 -1
  167. package/src/models/PriceWithStripeID.ts +1 -1
  168. package/src/models/Product.ts +1 -1
  169. package/src/models/ProductResponse.ts +1 -1
  170. package/src/models/ProductUI.ts +1 -1
  171. package/src/models/ProductWithStripeIDs.ts +1 -1
  172. package/src/models/PullStripeConfig200Response.ts +11 -11
  173. package/src/models/RecordUsageRequest.ts +1 -1
  174. package/src/models/Relationship.ts +1 -1
  175. package/src/models/RemoveSubscription200Response.ts +1 -1
  176. package/src/models/RemoveSubscriptionRequest.ts +1 -1
  177. package/src/models/RemoveSubscriptionResponse.ts +1 -1
  178. package/src/models/Role.ts +1 -1
  179. package/src/models/RolesListResponse.ts +1 -1
  180. package/src/models/SchemasConflictResponse.ts +1 -1
  181. package/src/models/SessionResponse.ts +1 -1
  182. package/src/models/StripeConfigResponse.ts +1 -1
  183. package/src/models/StripeConfigUpdateRequest.ts +1 -1
  184. package/src/models/StripeConfigValidateRequest.ts +1 -1
  185. package/src/models/StripeConfigurationWithIDs.ts +16 -1
  186. package/src/models/StripeIDConversionResponse.ts +1 -1
  187. package/src/models/SubjectSet.ts +1 -1
  188. package/src/models/SubjectSetRequest.ts +1 -1
  189. package/src/models/SubscriptionResponse.ts +1 -1
  190. package/src/models/SuccessResponse.ts +2 -2
  191. package/src/models/SuccessResponseData.ts +1 -1
  192. package/src/models/SwitchActiveTenant200Response.ts +1 -1
  193. package/src/models/SwitchTenantRequest.ts +1 -1
  194. package/src/models/SwitchTenantResponse.ts +1 -1
  195. package/src/models/Tenant.ts +1 -1
  196. package/src/models/TenantInvite.ts +1 -1
  197. package/src/models/TenantSettings.ts +1 -1
  198. package/src/models/TenantUserResponse.ts +1 -1
  199. package/src/models/Tier.ts +1 -1
  200. package/src/models/TierUpTo.ts +1 -1
  201. package/src/models/TieredBillingScheme.ts +1 -1
  202. package/src/models/TieredPrice.ts +1 -1
  203. package/src/models/TiersMode.ts +1 -1
  204. package/src/models/TooManyRequestsResponse.ts +75 -0
  205. package/src/models/Unauthorized.ts +1 -1
  206. package/src/models/UnauthorizedResponse.ts +1 -1
  207. package/src/models/UpdateInvoiceRequest.ts +2 -2
  208. package/src/models/UpdateRoleRequest.ts +1 -1
  209. package/src/models/UpdateTenantUserRole200Response.ts +1 -1
  210. package/src/models/UpdateTenantUserRoleRequest.ts +1 -1
  211. package/src/models/UpdateTenantUserRoleResponse.ts +1 -1
  212. package/src/models/UploadFile200Response.ts +1 -1
  213. package/src/models/UploadRequest.ts +1 -1
  214. package/src/models/UploadResponse.ts +1 -1
  215. package/src/models/UsageType.ts +1 -1
  216. package/src/models/UserTenantListItem.ts +1 -1
  217. package/src/models/WebhookEndpointConfig.ts +65 -2
  218. package/src/models/WebhookResult.ts +1 -1
  219. package/src/models/WebhookSecretResponse.ts +1 -1
  220. package/src/models/WebhooksConfigRequest.ts +2 -2
  221. package/src/models/WebhooksConfigResponse.ts +1 -1
  222. package/src/models/WhoAmI200Response.ts +1 -1
  223. package/src/models/WhoAmIResponse.ts +1 -1
  224. package/src/models/index.ts +9 -1
  225. package/src/runtime.ts +1 -1
  226. package/src/models/StripeConfiguration.ts +0 -98
@@ -4,7 +4,7 @@
4
4
  * Omnibase REST API
5
5
  * Self-hostable Backend-as-a-Service providing database management, authentication, payments, storage, and email services. ## Features - **Database**: PostgreSQL with RLS and migrations - **Authentication**: Ory Kratos integration with session management - **Payments**: Stripe integration with version-controlled billing configs - **Storage**: S3-compatible object storage with RLS - **Email**: Transactional email service - **Permissions**: Fine-grained access control ## Authentication Most endpoints require authentication via session cookies or JWT tokens. Use the appropriate security scheme based on the endpoint requirements.
6
6
  *
7
- * The version of the OpenAPI document: 0.10.1
7
+ * The version of the OpenAPI document: 0.12.1
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -17,7 +17,9 @@ import * as runtime from '../runtime';
17
17
  import type {
18
18
  AddInvoiceLineItem200Response,
19
19
  AddInvoiceLineItemRequest,
20
+ AddInvoiceLineItemWithPriceIDRequest,
20
21
  BadRequestResponse,
22
+ ConflictResponse,
21
23
  CreateCheckout200Response,
22
24
  CreateCheckoutRequest,
23
25
  CreateCustomerPortal200Response,
@@ -29,6 +31,7 @@ import type {
29
31
  NotFoundResponse,
30
32
  RecordUsageRequest,
31
33
  SuccessResponse,
34
+ TooManyRequestsResponse,
32
35
  UnauthorizedResponse,
33
36
  UpdateInvoiceRequest,
34
37
  } from '../models/index';
@@ -37,8 +40,12 @@ import {
37
40
  AddInvoiceLineItem200ResponseToJSON,
38
41
  AddInvoiceLineItemRequestFromJSON,
39
42
  AddInvoiceLineItemRequestToJSON,
43
+ AddInvoiceLineItemWithPriceIDRequestFromJSON,
44
+ AddInvoiceLineItemWithPriceIDRequestToJSON,
40
45
  BadRequestResponseFromJSON,
41
46
  BadRequestResponseToJSON,
47
+ ConflictResponseFromJSON,
48
+ ConflictResponseToJSON,
42
49
  CreateCheckout200ResponseFromJSON,
43
50
  CreateCheckout200ResponseToJSON,
44
51
  CreateCheckoutRequestFromJSON,
@@ -61,6 +68,8 @@ import {
61
68
  RecordUsageRequestToJSON,
62
69
  SuccessResponseFromJSON,
63
70
  SuccessResponseToJSON,
71
+ TooManyRequestsResponseFromJSON,
72
+ TooManyRequestsResponseToJSON,
64
73
  UnauthorizedResponseFromJSON,
65
74
  UnauthorizedResponseToJSON,
66
75
  UpdateInvoiceRequestFromJSON,
@@ -75,6 +84,14 @@ export interface AddInvoiceLineItemOperationRequest {
75
84
  xStripeCustomerId?: string;
76
85
  }
77
86
 
87
+ export interface AddInvoiceLineItemWithPriceIdRequest {
88
+ xServiceKey: string;
89
+ invoiceId: string;
90
+ addInvoiceLineItemWithPriceIDRequest: AddInvoiceLineItemWithPriceIDRequest;
91
+ xTenantId?: string;
92
+ xStripeCustomerId?: string;
93
+ }
94
+
78
95
  export interface CreateCheckoutOperationRequest {
79
96
  createCheckoutRequest: CreateCheckoutRequest;
80
97
  }
@@ -184,6 +201,74 @@ export class V1PaymentsApi extends runtime.BaseAPI {
184
201
  return await response.value();
185
202
  }
186
203
 
204
+ /**
205
+ * Adds a new line item to a draft invoice using a price ID and quantity. ## 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 ## Price ID Resolution You must provide ONE of: - `price_id`: A config price ID (e.g., \"hetzner_cx23_nbg1_hourly\") that will be looked up via the Stripe ID mapping table - `stripe_price_id`: A raw Stripe price ID (e.g., \"price_1ABC...\") that will be used directly ## Prerequisites - Invoice must be in draft status ## Use Cases - Adding metered usage line items - Adding subscription-based charges - Billing for compute hours, storage, etc.
206
+ * Add invoice line item with price ID
207
+ */
208
+ async addInvoiceLineItemWithPriceIdRaw(requestParameters: AddInvoiceLineItemWithPriceIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AddInvoiceLineItem200Response>> {
209
+ if (requestParameters['xServiceKey'] == null) {
210
+ throw new runtime.RequiredError(
211
+ 'xServiceKey',
212
+ 'Required parameter "xServiceKey" was null or undefined when calling addInvoiceLineItemWithPriceId().'
213
+ );
214
+ }
215
+
216
+ if (requestParameters['invoiceId'] == null) {
217
+ throw new runtime.RequiredError(
218
+ 'invoiceId',
219
+ 'Required parameter "invoiceId" was null or undefined when calling addInvoiceLineItemWithPriceId().'
220
+ );
221
+ }
222
+
223
+ if (requestParameters['addInvoiceLineItemWithPriceIDRequest'] == null) {
224
+ throw new runtime.RequiredError(
225
+ 'addInvoiceLineItemWithPriceIDRequest',
226
+ 'Required parameter "addInvoiceLineItemWithPriceIDRequest" was null or undefined when calling addInvoiceLineItemWithPriceId().'
227
+ );
228
+ }
229
+
230
+ const queryParameters: any = {};
231
+
232
+ const headerParameters: runtime.HTTPHeaders = {};
233
+
234
+ headerParameters['Content-Type'] = 'application/json';
235
+
236
+ if (requestParameters['xServiceKey'] != null) {
237
+ headerParameters['X-Service-Key'] = String(requestParameters['xServiceKey']);
238
+ }
239
+
240
+ if (requestParameters['xTenantId'] != null) {
241
+ headerParameters['X-Tenant-Id'] = String(requestParameters['xTenantId']);
242
+ }
243
+
244
+ if (requestParameters['xStripeCustomerId'] != null) {
245
+ headerParameters['X-Stripe-Customer-Id'] = String(requestParameters['xStripeCustomerId']);
246
+ }
247
+
248
+
249
+ let urlPath = `/api/v1/payments/invoices/{invoice_id}/items/price`;
250
+ urlPath = urlPath.replace(`{${"invoice_id"}}`, encodeURIComponent(String(requestParameters['invoiceId'])));
251
+
252
+ const response = await this.request({
253
+ path: urlPath,
254
+ method: 'POST',
255
+ headers: headerParameters,
256
+ query: queryParameters,
257
+ body: AddInvoiceLineItemWithPriceIDRequestToJSON(requestParameters['addInvoiceLineItemWithPriceIDRequest']),
258
+ }, initOverrides);
259
+
260
+ return new runtime.JSONApiResponse(response, (jsonValue) => AddInvoiceLineItem200ResponseFromJSON(jsonValue));
261
+ }
262
+
263
+ /**
264
+ * Adds a new line item to a draft invoice using a price ID and quantity. ## 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 ## Price ID Resolution You must provide ONE of: - `price_id`: A config price ID (e.g., \"hetzner_cx23_nbg1_hourly\") that will be looked up via the Stripe ID mapping table - `stripe_price_id`: A raw Stripe price ID (e.g., \"price_1ABC...\") that will be used directly ## Prerequisites - Invoice must be in draft status ## Use Cases - Adding metered usage line items - Adding subscription-based charges - Billing for compute hours, storage, etc.
265
+ * Add invoice line item with price ID
266
+ */
267
+ async addInvoiceLineItemWithPriceId(requestParameters: AddInvoiceLineItemWithPriceIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AddInvoiceLineItem200Response> {
268
+ const response = await this.addInvoiceLineItemWithPriceIdRaw(requestParameters, initOverrides);
269
+ return await response.value();
270
+ }
271
+
187
272
  /**
188
273
  * Creates a Stripe Checkout Session for the specified price ID. The session URL can be used to redirect users to complete payment. ## Authentication Optional cookie authentication. If authenticated and user has a Stripe customer ID, it will be used; otherwise, a new customer will be created. ## Use Cases - Subscription sign-ups - One-time purchases - Trial period checkouts - Promotional code redemption
189
274
  * Create checkout session
@@ -4,7 +4,7 @@
4
4
  * Omnibase REST API
5
5
  * Self-hostable Backend-as-a-Service providing database management, authentication, payments, storage, and email services. ## Features - **Database**: PostgreSQL with RLS and migrations - **Authentication**: Ory Kratos integration with session management - **Payments**: Stripe integration with version-controlled billing configs - **Storage**: S3-compatible object storage with RLS - **Email**: Transactional email service - **Permissions**: Fine-grained access control ## Authentication Most endpoints require authentication via session cookies or JWT tokens. Use the appropriate security scheme based on the endpoint requirements.
6
6
  *
7
- * The version of the OpenAPI document: 0.10.1
7
+ * The version of the OpenAPI document: 0.12.1
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Omnibase REST API
5
5
  * Self-hostable Backend-as-a-Service providing database management, authentication, payments, storage, and email services. ## Features - **Database**: PostgreSQL with RLS and migrations - **Authentication**: Ory Kratos integration with session management - **Payments**: Stripe integration with version-controlled billing configs - **Storage**: S3-compatible object storage with RLS - **Email**: Transactional email service - **Permissions**: Fine-grained access control ## Authentication Most endpoints require authentication via session cookies or JWT tokens. Use the appropriate security scheme based on the endpoint requirements.
6
6
  *
7
- * The version of the OpenAPI document: 0.10.1
7
+ * The version of the OpenAPI document: 0.12.1
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Omnibase REST API
5
5
  * Self-hostable Backend-as-a-Service providing database management, authentication, payments, storage, and email services. ## Features - **Database**: PostgreSQL with RLS and migrations - **Authentication**: Ory Kratos integration with session management - **Payments**: Stripe integration with version-controlled billing configs - **Storage**: S3-compatible object storage with RLS - **Email**: Transactional email service - **Permissions**: Fine-grained access control ## Authentication Most endpoints require authentication via session cookies or JWT tokens. Use the appropriate security scheme based on the endpoint requirements.
6
6
  *
7
- * The version of the OpenAPI document: 0.10.1
7
+ * The version of the OpenAPI document: 0.12.1
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Omnibase REST API
5
5
  * Self-hostable Backend-as-a-Service providing database management, authentication, payments, storage, and email services. ## Features - **Database**: PostgreSQL with RLS and migrations - **Authentication**: Ory Kratos integration with session management - **Payments**: Stripe integration with version-controlled billing configs - **Storage**: S3-compatible object storage with RLS - **Email**: Transactional email service - **Permissions**: Fine-grained access control ## Authentication Most endpoints require authentication via session cookies or JWT tokens. Use the appropriate security scheme based on the endpoint requirements.
6
6
  *
7
- * The version of the OpenAPI document: 0.10.1
7
+ * The version of the OpenAPI document: 0.12.1
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -33,7 +33,10 @@ import type {
33
33
  ForbiddenResponse,
34
34
  GetRoleDefinitions200Response,
35
35
  GetTenantBillingStatus200Response,
36
+ GetTenantByID200Response,
37
+ GetTenantByStripeCustomerID200Response,
36
38
  GetTenantJWT200Response,
39
+ GetTenantSubscription200Response,
37
40
  ListRoles200Response,
38
41
  ListTenantSubscriptions200Response,
39
42
  ListTenantUsers200Response,
@@ -84,8 +87,14 @@ import {
84
87
  GetRoleDefinitions200ResponseToJSON,
85
88
  GetTenantBillingStatus200ResponseFromJSON,
86
89
  GetTenantBillingStatus200ResponseToJSON,
90
+ GetTenantByID200ResponseFromJSON,
91
+ GetTenantByID200ResponseToJSON,
92
+ GetTenantByStripeCustomerID200ResponseFromJSON,
93
+ GetTenantByStripeCustomerID200ResponseToJSON,
87
94
  GetTenantJWT200ResponseFromJSON,
88
95
  GetTenantJWT200ResponseToJSON,
96
+ GetTenantSubscription200ResponseFromJSON,
97
+ GetTenantSubscription200ResponseToJSON,
89
98
  ListRoles200ResponseFromJSON,
90
99
  ListRoles200ResponseToJSON,
91
100
  ListTenantSubscriptions200ResponseFromJSON,
@@ -153,11 +162,23 @@ export interface GetRoleDefinitionsRequest {
153
162
  subject?: string;
154
163
  }
155
164
 
165
+ export interface GetTenantByIDRequest {
166
+ tenantId: string;
167
+ }
168
+
169
+ export interface GetTenantByStripeCustomerIDRequest {
170
+ stripeCustomerId: string;
171
+ }
172
+
156
173
  export interface GetTenantJWTRequest {
157
174
  xUserId?: string;
158
175
  xTenantId?: string;
159
176
  }
160
177
 
178
+ export interface GetTenantSubscriptionRequest {
179
+ configPriceId: string;
180
+ }
181
+
161
182
  export interface ListRolesRequest {
162
183
  xTenantId?: string;
163
184
  }
@@ -651,6 +672,100 @@ export class V1TenantsApi extends runtime.BaseAPI {
651
672
  return await response.value();
652
673
  }
653
674
 
675
+ /**
676
+ * Returns a tenant by its ID. ## Authentication - **Session Auth**: Requires JWT token / Cookie Session - **Service Key Auth**: Requires X-Service-Key header ## Use Cases - Direct tenant lookup by ID - Service-to-service tenant resolution - Webhook processing
677
+ * Get tenant by ID
678
+ */
679
+ async getTenantByIDRaw(requestParameters: GetTenantByIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetTenantByID200Response>> {
680
+ if (requestParameters['tenantId'] == null) {
681
+ throw new runtime.RequiredError(
682
+ 'tenantId',
683
+ 'Required parameter "tenantId" was null or undefined when calling getTenantByID().'
684
+ );
685
+ }
686
+
687
+ const queryParameters: any = {};
688
+
689
+ const headerParameters: runtime.HTTPHeaders = {};
690
+
691
+ if (this.configuration && this.configuration.apiKey) {
692
+ headerParameters["X-Service-Key"] = await this.configuration.apiKey("X-Service-Key"); // ServiceKeyAuth authentication
693
+ }
694
+
695
+ if (this.configuration && this.configuration.apiKey) {
696
+ headerParameters["X-Session-Token"] = await this.configuration.apiKey("X-Session-Token"); // SessionTokenAuth authentication
697
+ }
698
+
699
+
700
+ let urlPath = `/api/v1/tenants/by-id/{tenant_id}`;
701
+ urlPath = urlPath.replace(`{${"tenant_id"}}`, encodeURIComponent(String(requestParameters['tenantId'])));
702
+
703
+ const response = await this.request({
704
+ path: urlPath,
705
+ method: 'GET',
706
+ headers: headerParameters,
707
+ query: queryParameters,
708
+ }, initOverrides);
709
+
710
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetTenantByID200ResponseFromJSON(jsonValue));
711
+ }
712
+
713
+ /**
714
+ * Returns a tenant by its ID. ## Authentication - **Session Auth**: Requires JWT token / Cookie Session - **Service Key Auth**: Requires X-Service-Key header ## Use Cases - Direct tenant lookup by ID - Service-to-service tenant resolution - Webhook processing
715
+ * Get tenant by ID
716
+ */
717
+ async getTenantByID(requestParameters: GetTenantByIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetTenantByID200Response> {
718
+ const response = await this.getTenantByIDRaw(requestParameters, initOverrides);
719
+ return await response.value();
720
+ }
721
+
722
+ /**
723
+ * Returns a tenant by its Stripe customer ID. ## Authentication - **Session Auth**: Requires JWT token / Cookie Session - **Service Key Auth**: Requires X-Service-Key header ## Use Cases - Stripe webhook processing - Payment event correlation - Invoice/subscription tenant resolution
724
+ * Get tenant by Stripe customer ID
725
+ */
726
+ async getTenantByStripeCustomerIDRaw(requestParameters: GetTenantByStripeCustomerIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetTenantByStripeCustomerID200Response>> {
727
+ if (requestParameters['stripeCustomerId'] == null) {
728
+ throw new runtime.RequiredError(
729
+ 'stripeCustomerId',
730
+ 'Required parameter "stripeCustomerId" was null or undefined when calling getTenantByStripeCustomerID().'
731
+ );
732
+ }
733
+
734
+ const queryParameters: any = {};
735
+
736
+ const headerParameters: runtime.HTTPHeaders = {};
737
+
738
+ if (this.configuration && this.configuration.apiKey) {
739
+ headerParameters["X-Service-Key"] = await this.configuration.apiKey("X-Service-Key"); // ServiceKeyAuth authentication
740
+ }
741
+
742
+ if (this.configuration && this.configuration.apiKey) {
743
+ headerParameters["X-Session-Token"] = await this.configuration.apiKey("X-Session-Token"); // SessionTokenAuth authentication
744
+ }
745
+
746
+
747
+ let urlPath = `/api/v1/tenants/by-stripe-customer/{stripe_customer_id}`;
748
+ urlPath = urlPath.replace(`{${"stripe_customer_id"}}`, encodeURIComponent(String(requestParameters['stripeCustomerId'])));
749
+
750
+ const response = await this.request({
751
+ path: urlPath,
752
+ method: 'GET',
753
+ headers: headerParameters,
754
+ query: queryParameters,
755
+ }, initOverrides);
756
+
757
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetTenantByStripeCustomerID200ResponseFromJSON(jsonValue));
758
+ }
759
+
760
+ /**
761
+ * Returns a tenant by its Stripe customer ID. ## Authentication - **Session Auth**: Requires JWT token / Cookie Session - **Service Key Auth**: Requires X-Service-Key header ## Use Cases - Stripe webhook processing - Payment event correlation - Invoice/subscription tenant resolution
762
+ * Get tenant by Stripe customer ID
763
+ */
764
+ async getTenantByStripeCustomerID(requestParameters: GetTenantByStripeCustomerIDRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetTenantByStripeCustomerID200Response> {
765
+ const response = await this.getTenantByStripeCustomerIDRaw(requestParameters, initOverrides);
766
+ return await response.value();
767
+ }
768
+
654
769
  /**
655
770
  * Generates a JWT token for direct PostgREST database access with the user\'s active tenant context. ## Authentication - **Session Auth**: Requires JWT token / Cookie Session and active tenant - **Service Key Auth**: Requires X-Service-Key + X-Tenant-ID + X-User-ID headers ## Use Cases - Client-side database queries - Real-time subscriptions - Direct PostgREST API access
656
771
  * Get PostgREST JWT token
@@ -698,6 +813,53 @@ export class V1TenantsApi extends runtime.BaseAPI {
698
813
  return await response.value();
699
814
  }
700
815
 
816
+ /**
817
+ * Returns a single subscription for the specified config_price_id (plan ID). ## Authentication Requires JWT token with tenant context. ## Use Cases - Check if tenant has a specific subscription - Get subscription details for a specific plan - Retrieve Stripe subscription ID for a plan
818
+ * Get tenant subscription by plan
819
+ */
820
+ async getTenantSubscriptionRaw(requestParameters: GetTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetTenantSubscription200Response>> {
821
+ if (requestParameters['configPriceId'] == null) {
822
+ throw new runtime.RequiredError(
823
+ 'configPriceId',
824
+ 'Required parameter "configPriceId" was null or undefined when calling getTenantSubscription().'
825
+ );
826
+ }
827
+
828
+ const queryParameters: any = {};
829
+
830
+ const headerParameters: runtime.HTTPHeaders = {};
831
+
832
+ if (this.configuration && this.configuration.apiKey) {
833
+ headerParameters["X-Service-Key"] = await this.configuration.apiKey("X-Service-Key"); // ServiceKeyAuth authentication
834
+ }
835
+
836
+ if (this.configuration && this.configuration.apiKey) {
837
+ headerParameters["X-Session-Token"] = await this.configuration.apiKey("X-Session-Token"); // SessionTokenAuth authentication
838
+ }
839
+
840
+
841
+ let urlPath = `/api/v1/tenants/subscriptions/{config_price_id}`;
842
+ urlPath = urlPath.replace(`{${"config_price_id"}}`, encodeURIComponent(String(requestParameters['configPriceId'])));
843
+
844
+ const response = await this.request({
845
+ path: urlPath,
846
+ method: 'GET',
847
+ headers: headerParameters,
848
+ query: queryParameters,
849
+ }, initOverrides);
850
+
851
+ return new runtime.JSONApiResponse(response, (jsonValue) => GetTenantSubscription200ResponseFromJSON(jsonValue));
852
+ }
853
+
854
+ /**
855
+ * Returns a single subscription for the specified config_price_id (plan ID). ## Authentication Requires JWT token with tenant context. ## Use Cases - Check if tenant has a specific subscription - Get subscription details for a specific plan - Retrieve Stripe subscription ID for a plan
856
+ * Get tenant subscription by plan
857
+ */
858
+ async getTenantSubscription(requestParameters: GetTenantSubscriptionRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetTenantSubscription200Response> {
859
+ const response = await this.getTenantSubscriptionRaw(requestParameters, initOverrides);
860
+ return await response.value();
861
+ }
862
+
701
863
  /**
702
864
  * Returns all roles for the authenticated tenant, including both system roles and custom tenant-specific roles. ## Authentication - **Session Auth**: Requires JWT token / Cookie Session with tenant context - **Service Key Auth**: Requires X-Service-Key + X-Tenant-ID header ## Use Cases - Display available roles to assign - Role management UI - Permission auditing
703
865
  * List roles
@@ -4,7 +4,7 @@
4
4
  * Omnibase REST API
5
5
  * Self-hostable Backend-as-a-Service providing database management, authentication, payments, storage, and email services. ## Features - **Database**: PostgreSQL with RLS and migrations - **Authentication**: Ory Kratos integration with session management - **Payments**: Stripe integration with version-controlled billing configs - **Storage**: S3-compatible object storage with RLS - **Email**: Transactional email service - **Permissions**: Fine-grained access control ## Authentication Most endpoints require authentication via session cookies or JWT tokens. Use the appropriate security scheme based on the endpoint requirements.
6
6
  *
7
- * The version of the OpenAPI document: 0.10.1
7
+ * The version of the OpenAPI document: 0.12.1
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -17,6 +17,7 @@ import * as runtime from '../runtime';
17
17
  import type {
18
18
  BadRequest,
19
19
  ConfigureWebhooks200Response,
20
+ ConflictResponse,
20
21
  GetWebhookSecret200Response,
21
22
  InternalServerError,
22
23
  NotFound,
@@ -28,6 +29,8 @@ import {
28
29
  BadRequestToJSON,
29
30
  ConfigureWebhooks200ResponseFromJSON,
30
31
  ConfigureWebhooks200ResponseToJSON,
32
+ ConflictResponseFromJSON,
33
+ ConflictResponseToJSON,
31
34
  GetWebhookSecret200ResponseFromJSON,
32
35
  GetWebhookSecret200ResponseToJSON,
33
36
  InternalServerErrorFromJSON,
@@ -4,7 +4,7 @@
4
4
  * Omnibase REST API
5
5
  * Self-hostable Backend-as-a-Service providing database management, authentication, payments, storage, and email services. ## Features - **Database**: PostgreSQL with RLS and migrations - **Authentication**: Ory Kratos integration with session management - **Payments**: Stripe integration with version-controlled billing configs - **Storage**: S3-compatible object storage with RLS - **Email**: Transactional email service - **Permissions**: Fine-grained access control ## Authentication Most endpoints require authentication via session cookies or JWT tokens. Use the appropriate security scheme based on the endpoint requirements.
6
6
  *
7
- * The version of the OpenAPI document: 0.10.1
7
+ * The version of the OpenAPI document: 0.12.1
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Omnibase REST API
5
5
  * Self-hostable Backend-as-a-Service providing database management, authentication, payments, storage, and email services. ## Features - **Database**: PostgreSQL with RLS and migrations - **Authentication**: Ory Kratos integration with session management - **Payments**: Stripe integration with version-controlled billing configs - **Storage**: S3-compatible object storage with RLS - **Email**: Transactional email service - **Permissions**: Fine-grained access control ## Authentication Most endpoints require authentication via session cookies or JWT tokens. Use the appropriate security scheme based on the endpoint requirements.
6
6
  *
7
- * The version of the OpenAPI document: 0.10.1
7
+ * The version of the OpenAPI document: 0.12.1
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Omnibase REST API
5
5
  * Self-hostable Backend-as-a-Service providing database management, authentication, payments, storage, and email services. ## Features - **Database**: PostgreSQL with RLS and migrations - **Authentication**: Ory Kratos integration with session management - **Payments**: Stripe integration with version-controlled billing configs - **Storage**: S3-compatible object storage with RLS - **Email**: Transactional email service - **Permissions**: Fine-grained access control ## Authentication Most endpoints require authentication via session cookies or JWT tokens. Use the appropriate security scheme based on the endpoint requirements.
6
6
  *
7
- * The version of the OpenAPI document: 0.10.1
7
+ * The version of the OpenAPI document: 0.12.1
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Omnibase REST API
5
5
  * Self-hostable Backend-as-a-Service providing database management, authentication, payments, storage, and email services. ## Features - **Database**: PostgreSQL with RLS and migrations - **Authentication**: Ory Kratos integration with session management - **Payments**: Stripe integration with version-controlled billing configs - **Storage**: S3-compatible object storage with RLS - **Email**: Transactional email service - **Permissions**: Fine-grained access control ## Authentication Most endpoints require authentication via session cookies or JWT tokens. Use the appropriate security scheme based on the endpoint requirements.
6
6
  *
7
- * The version of the OpenAPI document: 0.10.1
7
+ * The version of the OpenAPI document: 0.12.1
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Omnibase REST API
5
5
  * Self-hostable Backend-as-a-Service providing database management, authentication, payments, storage, and email services. ## Features - **Database**: PostgreSQL with RLS and migrations - **Authentication**: Ory Kratos integration with session management - **Payments**: Stripe integration with version-controlled billing configs - **Storage**: S3-compatible object storage with RLS - **Email**: Transactional email service - **Permissions**: Fine-grained access control ## Authentication Most endpoints require authentication via session cookies or JWT tokens. Use the appropriate security scheme based on the endpoint requirements.
6
6
  *
7
- * The version of the OpenAPI document: 0.10.1
7
+ * The version of the OpenAPI document: 0.12.1
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -4,7 +4,7 @@
4
4
  * Omnibase REST API
5
5
  * Self-hostable Backend-as-a-Service providing database management, authentication, payments, storage, and email services. ## Features - **Database**: PostgreSQL with RLS and migrations - **Authentication**: Ory Kratos integration with session management - **Payments**: Stripe integration with version-controlled billing configs - **Storage**: S3-compatible object storage with RLS - **Email**: Transactional email service - **Permissions**: Fine-grained access control ## Authentication Most endpoints require authentication via session cookies or JWT tokens. Use the appropriate security scheme based on the endpoint requirements.
6
6
  *
7
- * The version of the OpenAPI document: 0.10.1
7
+ * The version of the OpenAPI document: 0.12.1
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -28,7 +28,7 @@ import {
28
28
  */
29
29
  export interface AddInvoiceLineItemRequest {
30
30
  /**
31
- * Amount in cents (required)
31
+ * Amount in cents (required, must be positive, max ~$999B)
32
32
  * @type {number}
33
33
  * @memberof AddInvoiceLineItemRequest
34
34
  */
@@ -0,0 +1,111 @@
1
+ /* tslint:disable */
2
+ /* eslint-disable */
3
+ /**
4
+ * Omnibase REST API
5
+ * Self-hostable Backend-as-a-Service providing database management, authentication, payments, storage, and email services. ## Features - **Database**: PostgreSQL with RLS and migrations - **Authentication**: Ory Kratos integration with session management - **Payments**: Stripe integration with version-controlled billing configs - **Storage**: S3-compatible object storage with RLS - **Email**: Transactional email service - **Permissions**: Fine-grained access control ## Authentication Most endpoints require authentication via session cookies or JWT tokens. Use the appropriate security scheme based on the endpoint requirements.
6
+ *
7
+ * The version of the OpenAPI document: 0.12.1
8
+ * Contact: support@omnibase.dev
9
+ *
10
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
11
+ * https://openapi-generator.tech
12
+ * Do not edit the class manually.
13
+ */
14
+
15
+ import { mapValues } from '../runtime';
16
+ import type { CurrencyCode } from './CurrencyCode';
17
+ import {
18
+ CurrencyCodeFromJSON,
19
+ CurrencyCodeFromJSONTyped,
20
+ CurrencyCodeToJSON,
21
+ CurrencyCodeToJSONTyped,
22
+ } from './CurrencyCode';
23
+
24
+ /**
25
+ *
26
+ * @export
27
+ * @interface AddInvoiceLineItemWithConfigPriceRequest
28
+ */
29
+ export interface AddInvoiceLineItemWithConfigPriceRequest {
30
+ /**
31
+ * Config price ID (e.g., "hetzner_cx23_nbg1_hourly") - looked up via GetStripeIDByConfigID
32
+ * @type {string}
33
+ * @memberof AddInvoiceLineItemWithConfigPriceRequest
34
+ */
35
+ priceId: string;
36
+ /**
37
+ * Quantity of units (required, must be at least 1)
38
+ * @type {number}
39
+ * @memberof AddInvoiceLineItemWithConfigPriceRequest
40
+ */
41
+ quantity: number;
42
+ /**
43
+ * Description for the line item (required)
44
+ * @type {string}
45
+ * @memberof AddInvoiceLineItemWithConfigPriceRequest
46
+ */
47
+ description: string;
48
+ /**
49
+ *
50
+ * @type {CurrencyCode}
51
+ * @memberof AddInvoiceLineItemWithConfigPriceRequest
52
+ */
53
+ currency: CurrencyCode;
54
+ /**
55
+ * Optional metadata key-value pairs (keys must be alphanumeric/underscore, max 40 chars; values max 500 chars)
56
+ * @type {{ [key: string]: string; }}
57
+ * @memberof AddInvoiceLineItemWithConfigPriceRequest
58
+ */
59
+ metadata?: { [key: string]: string; };
60
+ }
61
+
62
+
63
+
64
+ /**
65
+ * Check if a given object implements the AddInvoiceLineItemWithConfigPriceRequest interface.
66
+ */
67
+ export function instanceOfAddInvoiceLineItemWithConfigPriceRequest(value: object): value is AddInvoiceLineItemWithConfigPriceRequest {
68
+ if (!('priceId' in value) || value['priceId'] === undefined) return false;
69
+ if (!('quantity' in value) || value['quantity'] === undefined) return false;
70
+ if (!('description' in value) || value['description'] === undefined) return false;
71
+ if (!('currency' in value) || value['currency'] === undefined) return false;
72
+ return true;
73
+ }
74
+
75
+ export function AddInvoiceLineItemWithConfigPriceRequestFromJSON(json: any): AddInvoiceLineItemWithConfigPriceRequest {
76
+ return AddInvoiceLineItemWithConfigPriceRequestFromJSONTyped(json, false);
77
+ }
78
+
79
+ export function AddInvoiceLineItemWithConfigPriceRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddInvoiceLineItemWithConfigPriceRequest {
80
+ if (json == null) {
81
+ return json;
82
+ }
83
+ return {
84
+
85
+ 'priceId': json['price_id'],
86
+ 'quantity': json['quantity'],
87
+ 'description': json['description'],
88
+ 'currency': CurrencyCodeFromJSON(json['currency']),
89
+ 'metadata': json['metadata'] == null ? undefined : json['metadata'],
90
+ };
91
+ }
92
+
93
+ export function AddInvoiceLineItemWithConfigPriceRequestToJSON(json: any): AddInvoiceLineItemWithConfigPriceRequest {
94
+ return AddInvoiceLineItemWithConfigPriceRequestToJSONTyped(json, false);
95
+ }
96
+
97
+ export function AddInvoiceLineItemWithConfigPriceRequestToJSONTyped(value?: AddInvoiceLineItemWithConfigPriceRequest | null, ignoreDiscriminator: boolean = false): any {
98
+ if (value == null) {
99
+ return value;
100
+ }
101
+
102
+ return {
103
+
104
+ 'price_id': value['priceId'],
105
+ 'quantity': value['quantity'],
106
+ 'description': value['description'],
107
+ 'currency': CurrencyCodeToJSON(value['currency']),
108
+ 'metadata': value['metadata'],
109
+ };
110
+ }
111
+