@omnibase/core-js 0.10.2 → 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 +16 -2
  2. package/README.md +14 -4
  3. package/docs/AddInvoiceLineItemWithConfigPriceRequest.md +42 -0
  4. package/docs/AddInvoiceLineItemWithPriceIDRequest.md +3 -2
  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 +19 -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 +7 -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 +38 -80
  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 +8 -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.2
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.2
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.2
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.2
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.2
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.2
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.2
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.2
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
+
@@ -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.2
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).
@@ -12,70 +12,27 @@
12
12
  * Do not edit the class manually.
13
13
  */
14
14
 
15
- import { mapValues } from '../runtime';
16
- import type { CurrencyCode } from './CurrencyCode';
15
+ import type { AddInvoiceLineItemWithConfigPriceRequest } from './AddInvoiceLineItemWithConfigPriceRequest';
17
16
  import {
18
- CurrencyCodeFromJSON,
19
- CurrencyCodeFromJSONTyped,
20
- CurrencyCodeToJSON,
21
- CurrencyCodeToJSONTyped,
22
- } from './CurrencyCode';
17
+ instanceOfAddInvoiceLineItemWithConfigPriceRequest,
18
+ AddInvoiceLineItemWithConfigPriceRequestFromJSON,
19
+ AddInvoiceLineItemWithConfigPriceRequestFromJSONTyped,
20
+ AddInvoiceLineItemWithConfigPriceRequestToJSON,
21
+ } from './AddInvoiceLineItemWithConfigPriceRequest';
22
+ import type { AddInvoiceLineItemWithStripePriceRequest } from './AddInvoiceLineItemWithStripePriceRequest';
23
+ import {
24
+ instanceOfAddInvoiceLineItemWithStripePriceRequest,
25
+ AddInvoiceLineItemWithStripePriceRequestFromJSON,
26
+ AddInvoiceLineItemWithStripePriceRequestFromJSONTyped,
27
+ AddInvoiceLineItemWithStripePriceRequestToJSON,
28
+ } from './AddInvoiceLineItemWithStripePriceRequest';
23
29
 
24
30
  /**
25
- *
31
+ * @type AddInvoiceLineItemWithPriceIDRequest
32
+ * Add a line item using either a config price_id or raw stripe_price_id
26
33
  * @export
27
- * @interface AddInvoiceLineItemWithPriceIDRequest
28
34
  */
29
- export interface AddInvoiceLineItemWithPriceIDRequest {
30
- /**
31
- * Config price ID (e.g., "hetzner_cx23_nbg1_hourly") - looked up via GetStripeIDByConfigID. Provide either this or stripe_price_id.
32
- * @type {string}
33
- * @memberof AddInvoiceLineItemWithPriceIDRequest
34
- */
35
- priceId?: string;
36
- /**
37
- * Raw Stripe price ID (e.g., "price_1ABC...") - used directly. Provide either this or price_id.
38
- * @type {string}
39
- * @memberof AddInvoiceLineItemWithPriceIDRequest
40
- */
41
- stripePriceId?: string;
42
- /**
43
- * Quantity of units (required)
44
- * @type {number}
45
- * @memberof AddInvoiceLineItemWithPriceIDRequest
46
- */
47
- quantity: number;
48
- /**
49
- * Description for the line item (required)
50
- * @type {string}
51
- * @memberof AddInvoiceLineItemWithPriceIDRequest
52
- */
53
- description: string;
54
- /**
55
- *
56
- * @type {CurrencyCode}
57
- * @memberof AddInvoiceLineItemWithPriceIDRequest
58
- */
59
- currency: CurrencyCode;
60
- /**
61
- * Optional metadata key-value pairs
62
- * @type {{ [key: string]: string; }}
63
- * @memberof AddInvoiceLineItemWithPriceIDRequest
64
- */
65
- metadata?: { [key: string]: string; };
66
- }
67
-
68
-
69
-
70
- /**
71
- * Check if a given object implements the AddInvoiceLineItemWithPriceIDRequest interface.
72
- */
73
- export function instanceOfAddInvoiceLineItemWithPriceIDRequest(value: object): value is AddInvoiceLineItemWithPriceIDRequest {
74
- if (!('quantity' in value) || value['quantity'] === undefined) return false;
75
- if (!('description' in value) || value['description'] === undefined) return false;
76
- if (!('currency' in value) || value['currency'] === undefined) return false;
77
- return true;
78
- }
35
+ export type AddInvoiceLineItemWithPriceIDRequest = AddInvoiceLineItemWithConfigPriceRequest | AddInvoiceLineItemWithStripePriceRequest;
79
36
 
80
37
  export function AddInvoiceLineItemWithPriceIDRequestFromJSON(json: any): AddInvoiceLineItemWithPriceIDRequest {
81
38
  return AddInvoiceLineItemWithPriceIDRequestFromJSONTyped(json, false);
@@ -85,18 +42,19 @@ export function AddInvoiceLineItemWithPriceIDRequestFromJSONTyped(json: any, ign
85
42
  if (json == null) {
86
43
  return json;
87
44
  }
88
- return {
89
-
90
- 'priceId': json['price_id'] == null ? undefined : json['price_id'],
91
- 'stripePriceId': json['stripe_price_id'] == null ? undefined : json['stripe_price_id'],
92
- 'quantity': json['quantity'],
93
- 'description': json['description'],
94
- 'currency': CurrencyCodeFromJSON(json['currency']),
95
- 'metadata': json['metadata'] == null ? undefined : json['metadata'],
96
- };
45
+ if (typeof json !== 'object') {
46
+ return json;
47
+ }
48
+ if (instanceOfAddInvoiceLineItemWithConfigPriceRequest(json)) {
49
+ return AddInvoiceLineItemWithConfigPriceRequestFromJSONTyped(json, true);
50
+ }
51
+ if (instanceOfAddInvoiceLineItemWithStripePriceRequest(json)) {
52
+ return AddInvoiceLineItemWithStripePriceRequestFromJSONTyped(json, true);
53
+ }
54
+ return {} as any;
97
55
  }
98
56
 
99
- export function AddInvoiceLineItemWithPriceIDRequestToJSON(json: any): AddInvoiceLineItemWithPriceIDRequest {
57
+ export function AddInvoiceLineItemWithPriceIDRequestToJSON(json: any): any {
100
58
  return AddInvoiceLineItemWithPriceIDRequestToJSONTyped(json, false);
101
59
  }
102
60
 
@@ -104,15 +62,15 @@ export function AddInvoiceLineItemWithPriceIDRequestToJSONTyped(value?: AddInvoi
104
62
  if (value == null) {
105
63
  return value;
106
64
  }
107
-
108
- return {
109
-
110
- 'price_id': value['priceId'],
111
- 'stripe_price_id': value['stripePriceId'],
112
- 'quantity': value['quantity'],
113
- 'description': value['description'],
114
- 'currency': CurrencyCodeToJSON(value['currency']),
115
- 'metadata': value['metadata'],
116
- };
65
+ if (typeof value !== 'object') {
66
+ return value;
67
+ }
68
+ if (instanceOfAddInvoiceLineItemWithConfigPriceRequest(value)) {
69
+ return AddInvoiceLineItemWithConfigPriceRequestToJSON(value as AddInvoiceLineItemWithConfigPriceRequest);
70
+ }
71
+ if (instanceOfAddInvoiceLineItemWithStripePriceRequest(value)) {
72
+ return AddInvoiceLineItemWithStripePriceRequestToJSON(value as AddInvoiceLineItemWithStripePriceRequest);
73
+ }
74
+ return {};
117
75
  }
118
76