@omnibase/core-js 0.10.2 → 0.12.2

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
@@ -93,6 +93,9 @@ No authorization required
93
93
  | **200** | Line item added successfully | - |
94
94
  | **400** | Bad Request - Invalid request parameters | - |
95
95
  | **401** | Unauthorized - Authentication required | - |
96
+ | **404** | Not Found - Resource not found | - |
97
+ | **409** | Conflict - Resource already exists or conflicts with current state | - |
98
+ | **429** | Too Many Requests - Rate limit exceeded | - |
96
99
  | **500** | Internal Server Error - Server encountered an error | - |
97
100
 
98
101
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -176,6 +179,8 @@ No authorization required
176
179
  | **400** | Bad Request - Invalid request parameters | - |
177
180
  | **401** | Unauthorized - Authentication required | - |
178
181
  | **404** | Not Found - Resource not found | - |
182
+ | **409** | Conflict - Resource already exists or conflicts with current state | - |
183
+ | **429** | Too Many Requests - Rate limit exceeded | - |
179
184
  | **500** | Internal Server Error - Server encountered an error | - |
180
185
 
181
186
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -247,6 +252,8 @@ No authorization required
247
252
  | **400** | Bad Request - Invalid request parameters | - |
248
253
  | **401** | Unauthorized - Authentication required | - |
249
254
  | **404** | Not Found - Resource not found | - |
255
+ | **409** | Conflict - Resource already exists or conflicts with current state | - |
256
+ | **429** | Too Many Requests - Rate limit exceeded | - |
250
257
  | **500** | Internal Server Error - Server encountered an error | - |
251
258
 
252
259
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -317,6 +324,7 @@ No authorization required
317
324
  | **200** | Portal session created successfully | - |
318
325
  | **400** | Bad Request - Invalid request parameters | - |
319
326
  | **401** | Unauthorized - Authentication required | - |
327
+ | **429** | Too Many Requests - Rate limit exceeded | - |
320
328
  | **500** | Internal Server Error - Server encountered an error | - |
321
329
 
322
330
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -396,6 +404,8 @@ No authorization required
396
404
  | **200** | Invoice created successfully | - |
397
405
  | **400** | Bad Request - Invalid request parameters | - |
398
406
  | **401** | Unauthorized - Authentication required | - |
407
+ | **409** | Conflict - Resource already exists or conflicts with current state | - |
408
+ | **429** | Too Many Requests - Rate limit exceeded | - |
399
409
  | **500** | Internal Server Error - Server encountered an error | - |
400
410
 
401
411
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -472,6 +482,9 @@ No authorization required
472
482
  | **200** | Invoice finalized successfully | - |
473
483
  | **400** | Bad Request - Invalid request parameters | - |
474
484
  | **401** | Unauthorized - Authentication required | - |
485
+ | **404** | Not Found - Resource not found | - |
486
+ | **409** | Conflict - Resource already exists or conflicts with current state | - |
487
+ | **429** | Too Many Requests - Rate limit exceeded | - |
475
488
  | **500** | Internal Server Error - Server encountered an error | - |
476
489
 
477
490
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -545,6 +558,8 @@ No authorization required
545
558
  | **200** | Invoice retrieved successfully | - |
546
559
  | **400** | Bad Request - Invalid request parameters | - |
547
560
  | **401** | Unauthorized - Authentication required | - |
561
+ | **404** | Not Found - Resource not found | - |
562
+ | **429** | Too Many Requests - Rate limit exceeded | - |
548
563
  | **500** | Internal Server Error - Server encountered an error | - |
549
564
 
550
565
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -615,6 +630,7 @@ No authorization required
615
630
  | **200** | Usage recorded successfully | - |
616
631
  | **400** | Bad Request - Invalid request parameters | - |
617
632
  | **401** | Unauthorized - Authentication required | - |
633
+ | **429** | Too Many Requests - Rate limit exceeded | - |
618
634
  | **500** | Internal Server Error - Server encountered an error | - |
619
635
 
620
636
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -691,6 +707,9 @@ No authorization required
691
707
  | **200** | Invoice updated successfully | - |
692
708
  | **400** | Bad Request - Invalid request parameters | - |
693
709
  | **401** | Unauthorized - Authentication required | - |
710
+ | **404** | Not Found - Resource not found | - |
711
+ | **409** | Conflict - Resource already exists or conflicts with current state | - |
712
+ | **429** | Too Many Requests - Rate limit exceeded | - |
694
713
  | **500** | Internal Server Error - Server encountered an error | - |
695
714
 
696
715
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
@@ -13,7 +13,10 @@ All URIs are relative to *https://api.omnibase.tech*
13
13
  | [**deleteTenant**](V1TenantsApi.md#deletetenant) | **DELETE** /api/v1/tenants | Delete tenant |
14
14
  | [**getRoleDefinitions**](V1TenantsApi.md#getroledefinitions) | **GET** /api/v1/tenants/roles/definitions | Get namespace definitions |
15
15
  | [**getTenantBillingStatus**](V1TenantsApi.md#gettenantbillingstatus) | **GET** /api/v1/tenants/billing-status | Get billing status |
16
+ | [**getTenantByID**](V1TenantsApi.md#gettenantbyid) | **GET** /api/v1/tenants/by-id/{tenant_id} | Get tenant by ID |
17
+ | [**getTenantByStripeCustomerID**](V1TenantsApi.md#gettenantbystripecustomerid) | **GET** /api/v1/tenants/by-stripe-customer/{stripe_customer_id} | Get tenant by Stripe customer ID |
16
18
  | [**getTenantJWT**](V1TenantsApi.md#gettenantjwt) | **GET** /api/v1/tenants/jwt | Get PostgREST JWT token |
19
+ | [**getTenantSubscription**](V1TenantsApi.md#gettenantsubscription) | **GET** /api/v1/tenants/subscriptions/{config_price_id} | Get tenant subscription by plan |
17
20
  | [**listRoles**](V1TenantsApi.md#listroles) | **GET** /api/v1/tenants/roles | List roles |
18
21
  | [**listTenantSubscriptions**](V1TenantsApi.md#listtenantsubscriptions) | **GET** /api/v1/tenants/subscriptions | Get tenant subscriptions |
19
22
  | [**listTenantUsers**](V1TenantsApi.md#listtenantusers) | **GET** /api/v1/tenants/users | Get tenant users |
@@ -755,6 +758,164 @@ This endpoint does not need any parameter.
755
758
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
756
759
 
757
760
 
761
+ ## getTenantByID
762
+
763
+ > GetTenantByID200Response getTenantByID(tenantId)
764
+
765
+ Get tenant by ID
766
+
767
+ 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
768
+
769
+ ### Example
770
+
771
+ ```ts
772
+ import {
773
+ Configuration,
774
+ V1TenantsApi,
775
+ } from '@omnibase/core-js';
776
+ import type { GetTenantByIDRequest } from '@omnibase/core-js';
777
+
778
+ async function example() {
779
+ console.log("🚀 Testing @omnibase/core-js SDK...");
780
+ const config = new Configuration({
781
+ // To configure API key authorization: ServiceKeyAuth
782
+ apiKey: "YOUR API KEY",
783
+ // To configure API key authorization: CookieAuth
784
+ apiKey: "YOUR API KEY",
785
+ // To configure API key authorization: SessionTokenAuth
786
+ apiKey: "YOUR API KEY",
787
+ });
788
+ const api = new V1TenantsApi(config);
789
+
790
+ const body = {
791
+ // string | Tenant ID (UUID)
792
+ tenantId: 7d5da463-8351-4abe-870c-8ccdefc4d78c,
793
+ } satisfies GetTenantByIDRequest;
794
+
795
+ try {
796
+ const data = await api.getTenantByID(body);
797
+ console.log(data);
798
+ } catch (error) {
799
+ console.error(error);
800
+ }
801
+ }
802
+
803
+ // Run the test
804
+ example().catch(console.error);
805
+ ```
806
+
807
+ ### Parameters
808
+
809
+
810
+ | Name | Type | Description | Notes |
811
+ |------------- | ------------- | ------------- | -------------|
812
+ | **tenantId** | `string` | Tenant ID (UUID) | [Defaults to `undefined`] |
813
+
814
+ ### Return type
815
+
816
+ [**GetTenantByID200Response**](GetTenantByID200Response.md)
817
+
818
+ ### Authorization
819
+
820
+ [ServiceKeyAuth](../README.md#ServiceKeyAuth), [CookieAuth](../README.md#CookieAuth), [SessionTokenAuth](../README.md#SessionTokenAuth)
821
+
822
+ ### HTTP request headers
823
+
824
+ - **Content-Type**: Not defined
825
+ - **Accept**: `application/json`
826
+
827
+
828
+ ### HTTP response details
829
+ | Status code | Description | Response headers |
830
+ |-------------|-------------|------------------|
831
+ | **200** | Tenant found | - |
832
+ | **400** | Bad request - Invalid tenant_id | - |
833
+ | **401** | User not authenticated | - |
834
+ | **404** | Tenant not found | - |
835
+ | **500** | Internal server error | - |
836
+
837
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
838
+
839
+
840
+ ## getTenantByStripeCustomerID
841
+
842
+ > GetTenantByStripeCustomerID200Response getTenantByStripeCustomerID(stripeCustomerId)
843
+
844
+ Get tenant by Stripe customer ID
845
+
846
+ 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
847
+
848
+ ### Example
849
+
850
+ ```ts
851
+ import {
852
+ Configuration,
853
+ V1TenantsApi,
854
+ } from '@omnibase/core-js';
855
+ import type { GetTenantByStripeCustomerIDRequest } from '@omnibase/core-js';
856
+
857
+ async function example() {
858
+ console.log("🚀 Testing @omnibase/core-js SDK...");
859
+ const config = new Configuration({
860
+ // To configure API key authorization: ServiceKeyAuth
861
+ apiKey: "YOUR API KEY",
862
+ // To configure API key authorization: CookieAuth
863
+ apiKey: "YOUR API KEY",
864
+ // To configure API key authorization: SessionTokenAuth
865
+ apiKey: "YOUR API KEY",
866
+ });
867
+ const api = new V1TenantsApi(config);
868
+
869
+ const body = {
870
+ // string | Stripe customer ID
871
+ stripeCustomerId: cus_TOWEstcga5ou7a,
872
+ } satisfies GetTenantByStripeCustomerIDRequest;
873
+
874
+ try {
875
+ const data = await api.getTenantByStripeCustomerID(body);
876
+ console.log(data);
877
+ } catch (error) {
878
+ console.error(error);
879
+ }
880
+ }
881
+
882
+ // Run the test
883
+ example().catch(console.error);
884
+ ```
885
+
886
+ ### Parameters
887
+
888
+
889
+ | Name | Type | Description | Notes |
890
+ |------------- | ------------- | ------------- | -------------|
891
+ | **stripeCustomerId** | `string` | Stripe customer ID | [Defaults to `undefined`] |
892
+
893
+ ### Return type
894
+
895
+ [**GetTenantByStripeCustomerID200Response**](GetTenantByStripeCustomerID200Response.md)
896
+
897
+ ### Authorization
898
+
899
+ [ServiceKeyAuth](../README.md#ServiceKeyAuth), [CookieAuth](../README.md#CookieAuth), [SessionTokenAuth](../README.md#SessionTokenAuth)
900
+
901
+ ### HTTP request headers
902
+
903
+ - **Content-Type**: Not defined
904
+ - **Accept**: `application/json`
905
+
906
+
907
+ ### HTTP response details
908
+ | Status code | Description | Response headers |
909
+ |-------------|-------------|------------------|
910
+ | **200** | Tenant found | - |
911
+ | **400** | Bad request - Invalid stripe_customer_id | - |
912
+ | **401** | User not authenticated | - |
913
+ | **404** | Tenant not found | - |
914
+ | **500** | Internal server error | - |
915
+
916
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
917
+
918
+
758
919
  ## getTenantJWT
759
920
 
760
921
  > GetTenantJWT200Response getTenantJWT(xUserId, xTenantId)
@@ -837,6 +998,85 @@ example().catch(console.error);
837
998
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
838
999
 
839
1000
 
1001
+ ## getTenantSubscription
1002
+
1003
+ > GetTenantSubscription200Response getTenantSubscription(configPriceId)
1004
+
1005
+ Get tenant subscription by plan
1006
+
1007
+ 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
1008
+
1009
+ ### Example
1010
+
1011
+ ```ts
1012
+ import {
1013
+ Configuration,
1014
+ V1TenantsApi,
1015
+ } from '@omnibase/core-js';
1016
+ import type { GetTenantSubscriptionRequest } from '@omnibase/core-js';
1017
+
1018
+ async function example() {
1019
+ console.log("🚀 Testing @omnibase/core-js SDK...");
1020
+ const config = new Configuration({
1021
+ // To configure API key authorization: ServiceKeyAuth
1022
+ apiKey: "YOUR API KEY",
1023
+ // To configure API key authorization: CookieAuth
1024
+ apiKey: "YOUR API KEY",
1025
+ // To configure API key authorization: SessionTokenAuth
1026
+ apiKey: "YOUR API KEY",
1027
+ });
1028
+ const api = new V1TenantsApi(config);
1029
+
1030
+ const body = {
1031
+ // string | The configuration price ID (plan ID) to look up
1032
+ configPriceId: neon_compute_starter,
1033
+ } satisfies GetTenantSubscriptionRequest;
1034
+
1035
+ try {
1036
+ const data = await api.getTenantSubscription(body);
1037
+ console.log(data);
1038
+ } catch (error) {
1039
+ console.error(error);
1040
+ }
1041
+ }
1042
+
1043
+ // Run the test
1044
+ example().catch(console.error);
1045
+ ```
1046
+
1047
+ ### Parameters
1048
+
1049
+
1050
+ | Name | Type | Description | Notes |
1051
+ |------------- | ------------- | ------------- | -------------|
1052
+ | **configPriceId** | `string` | The configuration price ID (plan ID) to look up | [Defaults to `undefined`] |
1053
+
1054
+ ### Return type
1055
+
1056
+ [**GetTenantSubscription200Response**](GetTenantSubscription200Response.md)
1057
+
1058
+ ### Authorization
1059
+
1060
+ [ServiceKeyAuth](../README.md#ServiceKeyAuth), [CookieAuth](../README.md#CookieAuth), [SessionTokenAuth](../README.md#SessionTokenAuth)
1061
+
1062
+ ### HTTP request headers
1063
+
1064
+ - **Content-Type**: Not defined
1065
+ - **Accept**: `application/json`
1066
+
1067
+
1068
+ ### HTTP response details
1069
+ | Status code | Description | Response headers |
1070
+ |-------------|-------------|------------------|
1071
+ | **200** | Subscription found | - |
1072
+ | **400** | Missing config_price_id parameter | - |
1073
+ | **401** | User not authenticated | - |
1074
+ | **404** | Subscription not found for the specified plan | - |
1075
+ | **500** | Failed to fetch subscription | - |
1076
+
1077
+ [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
1078
+
1079
+
840
1080
  ## listRoles
841
1081
 
842
1082
  > ListRoles200Response listRoles(xTenantId)
@@ -76,8 +76,9 @@ example().catch(console.error);
76
76
  | Status code | Description | Response headers |
77
77
  |-------------|-------------|------------------|
78
78
  | **200** | Webhooks configured successfully | - |
79
- | **400** | Invalid request - validation errors | - |
79
+ | **400** | Invalid request - validation errors or invalid Stripe event types | - |
80
80
  | **401** | Invalid or missing service key | - |
81
+ | **409** | Conflict - duplicate webhook URL provided | - |
81
82
  | **500** | Failed to configure webhooks | - |
82
83
 
83
84
  [[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@omnibase/core-js",
3
- "version": "0.10.2",
3
+ "version": "0.12.2",
4
4
  "description": "OpenAPI client for @omnibase/core-js",
5
5
  "author": "OpenAPI-Generator",
6
6
  "repository": {
7
7
  "type": "git",
8
- "url": "https://github.com/GIT_USER_ID/GIT_REPO_ID.git"
8
+ "url": "https://github.com/PhoenixSolutionsGroup/omnibase.git"
9
9
  },
10
10
  "main": "./dist/index.js",
11
11
  "types": "./dist/index.d.ts",
@@ -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.2
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -59,6 +59,10 @@ export interface CreateUserOperationRequest {
59
59
  createUserRequest: CreateUserRequest;
60
60
  }
61
61
 
62
+ export interface GetActiveTenantRequest {
63
+ xUserId?: string;
64
+ }
65
+
62
66
  export interface ListTenantsRequest {
63
67
  xUserId?: string;
64
68
  }
@@ -114,14 +118,22 @@ export class V1AuthApi extends runtime.BaseAPI {
114
118
  }
115
119
 
116
120
  /**
117
- * Returns the full tenant object for the user\'s currently active tenant. ## Tenant Context Users can be members of multiple tenants but only one is active at a time. The active tenant determines which resources and data the user can access. ## Use Case Determine which tenant context to use for API calls and data filtering.
121
+ * Returns the full tenant object for the user\'s currently active tenant. ## Tenant Context Users can be members of multiple tenants but only one is active at a time. The active tenant determines which resources and data the user can access. ## Authentication - **Session Auth**: Requires JWT token / Cookie Session - **Service Key Auth**: Requires X-Service-Key + X-User-ID header ## Use Case Determine which tenant context to use for API calls and data filtering.
118
122
  * Get active tenant
119
123
  */
120
- async getActiveTenantRaw(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetActiveTenant200Response>> {
124
+ async getActiveTenantRaw(requestParameters: GetActiveTenantRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<GetActiveTenant200Response>> {
121
125
  const queryParameters: any = {};
122
126
 
123
127
  const headerParameters: runtime.HTTPHeaders = {};
124
128
 
129
+ if (requestParameters['xUserId'] != null) {
130
+ headerParameters['X-User-Id'] = String(requestParameters['xUserId']);
131
+ }
132
+
133
+ if (this.configuration && this.configuration.apiKey) {
134
+ headerParameters["X-Service-Key"] = await this.configuration.apiKey("X-Service-Key"); // ServiceKeyAuth authentication
135
+ }
136
+
125
137
  if (this.configuration && this.configuration.apiKey) {
126
138
  headerParameters["X-Session-Token"] = await this.configuration.apiKey("X-Session-Token"); // SessionTokenAuth authentication
127
139
  }
@@ -140,11 +152,11 @@ export class V1AuthApi extends runtime.BaseAPI {
140
152
  }
141
153
 
142
154
  /**
143
- * Returns the full tenant object for the user\'s currently active tenant. ## Tenant Context Users can be members of multiple tenants but only one is active at a time. The active tenant determines which resources and data the user can access. ## Use Case Determine which tenant context to use for API calls and data filtering.
155
+ * Returns the full tenant object for the user\'s currently active tenant. ## Tenant Context Users can be members of multiple tenants but only one is active at a time. The active tenant determines which resources and data the user can access. ## Authentication - **Session Auth**: Requires JWT token / Cookie Session - **Service Key Auth**: Requires X-Service-Key + X-User-ID header ## Use Case Determine which tenant context to use for API calls and data filtering.
144
156
  * Get active tenant
145
157
  */
146
- async getActiveTenant(initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetActiveTenant200Response> {
147
- const response = await this.getActiveTenantRaw(initOverrides);
158
+ async getActiveTenant(requestParameters: GetActiveTenantRequest = {}, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<GetActiveTenant200Response> {
159
+ const response = await this.getActiveTenantRaw(requestParameters, initOverrides);
148
160
  return await response.value();
149
161
  }
150
162
 
@@ -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.2
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -169,6 +169,10 @@ export class V1ConfigurationApi extends runtime.BaseAPI {
169
169
 
170
170
  headerParameters['Content-Type'] = 'application/json';
171
171
 
172
+ if (this.configuration && this.configuration.apiKey) {
173
+ headerParameters["X-Service-Key"] = await this.configuration.apiKey("X-Service-Key"); // ServiceKeyAuth authentication
174
+ }
175
+
172
176
  if (this.configuration && this.configuration.apiKey) {
173
177
  headerParameters["X-Session-Token"] = await this.configuration.apiKey("X-Session-Token"); // SessionTokenAuth authentication
174
178
  }
@@ -212,6 +216,10 @@ export class V1ConfigurationApi extends runtime.BaseAPI {
212
216
 
213
217
  const headerParameters: runtime.HTTPHeaders = {};
214
218
 
219
+ if (this.configuration && this.configuration.apiKey) {
220
+ headerParameters["X-Service-Key"] = await this.configuration.apiKey("X-Service-Key"); // ServiceKeyAuth authentication
221
+ }
222
+
215
223
  if (this.configuration && this.configuration.apiKey) {
216
224
  headerParameters["X-Session-Token"] = await this.configuration.apiKey("X-Session-Token"); // SessionTokenAuth authentication
217
225
  }
@@ -311,6 +319,10 @@ export class V1ConfigurationApi extends runtime.BaseAPI {
311
319
 
312
320
  const headerParameters: runtime.HTTPHeaders = {};
313
321
 
322
+ if (this.configuration && this.configuration.apiKey) {
323
+ headerParameters["X-Service-Key"] = await this.configuration.apiKey("X-Service-Key"); // ServiceKeyAuth authentication
324
+ }
325
+
314
326
  if (this.configuration && this.configuration.apiKey) {
315
327
  headerParameters["X-Session-Token"] = await this.configuration.apiKey("X-Session-Token"); // SessionTokenAuth authentication
316
328
  }
@@ -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.2
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.2
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
@@ -19,6 +19,7 @@ import type {
19
19
  AddInvoiceLineItemRequest,
20
20
  AddInvoiceLineItemWithPriceIDRequest,
21
21
  BadRequestResponse,
22
+ ConflictResponse,
22
23
  CreateCheckout200Response,
23
24
  CreateCheckoutRequest,
24
25
  CreateCustomerPortal200Response,
@@ -30,6 +31,7 @@ import type {
30
31
  NotFoundResponse,
31
32
  RecordUsageRequest,
32
33
  SuccessResponse,
34
+ TooManyRequestsResponse,
33
35
  UnauthorizedResponse,
34
36
  UpdateInvoiceRequest,
35
37
  } from '../models/index';
@@ -42,6 +44,8 @@ import {
42
44
  AddInvoiceLineItemWithPriceIDRequestToJSON,
43
45
  BadRequestResponseFromJSON,
44
46
  BadRequestResponseToJSON,
47
+ ConflictResponseFromJSON,
48
+ ConflictResponseToJSON,
45
49
  CreateCheckout200ResponseFromJSON,
46
50
  CreateCheckout200ResponseToJSON,
47
51
  CreateCheckoutRequestFromJSON,
@@ -64,6 +68,8 @@ import {
64
68
  RecordUsageRequestToJSON,
65
69
  SuccessResponseFromJSON,
66
70
  SuccessResponseToJSON,
71
+ TooManyRequestsResponseFromJSON,
72
+ TooManyRequestsResponseToJSON,
67
73
  UnauthorizedResponseFromJSON,
68
74
  UnauthorizedResponseToJSON,
69
75
  UpdateInvoiceRequestFromJSON,
@@ -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.2
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.2
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.2
8
8
  * Contact: support@omnibase.dev
9
9
  *
10
10
  * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).