@omnibase/core-js 0.10.0 → 0.10.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.
- package/.openapi-generator/FILES +2 -0
- package/README.md +5 -3
- package/docs/AddInvoiceLineItemWithPriceIDRequest.md +44 -0
- package/docs/PerUnitPrice.md +1 -1
- package/docs/Price.md +1 -1
- package/docs/PriceWithStripeID.md +1 -1
- package/docs/V1PaymentsApi.md +84 -0
- package/package.json +1 -1
- package/src/apis/V1AuthApi.ts +1 -1
- package/src/apis/V1ConfigurationApi.ts +1 -1
- package/src/apis/V1EventsApi.ts +1 -1
- package/src/apis/V1PaymentsApi.ts +80 -1
- package/src/apis/V1PermissionsApi.ts +1 -1
- package/src/apis/V1StorageApi.ts +1 -1
- package/src/apis/V1StripeApi.ts +1 -1
- package/src/apis/V1TenantsApi.ts +1 -1
- package/src/apis/V1WebhooksApi.ts +1 -1
- package/src/models/AcceptInvite200Response.ts +1 -1
- package/src/models/AcceptInviteRequest.ts +1 -1
- package/src/models/AcceptInviteResponse.ts +1 -1
- package/src/models/ActiveTenantResponse.ts +1 -1
- package/src/models/AddInvoiceLineItem200Response.ts +1 -1
- package/src/models/AddInvoiceLineItemRequest.ts +1 -1
- package/src/models/AddInvoiceLineItemWithPriceIDRequest.ts +118 -0
- package/src/models/AddSubscription200Response.ts +1 -1
- package/src/models/AddSubscriptionRequest.ts +1 -1
- package/src/models/AddSubscriptionResponse.ts +1 -1
- package/src/models/ArchiveAllResponse.ts +1 -1
- package/src/models/ArchiveAllStripeConfig200Response.ts +1 -1
- package/src/models/BadRequest.ts +1 -1
- package/src/models/BadRequestResponse.ts +1 -1
- package/src/models/BillingInterval.ts +1 -1
- package/src/models/BillingStatusResponse.ts +1 -1
- package/src/models/CheckPermission200Response.ts +1 -1
- package/src/models/CheckPermissionRequest.ts +1 -1
- package/src/models/CheckPermissionRequestWithSubjectId.ts +1 -1
- package/src/models/CheckPermissionRequestWithSubjectSet.ts +1 -1
- package/src/models/CheckPermissionResponse.ts +1 -1
- package/src/models/ConfigHistoryItem.ts +1 -1
- package/src/models/ConfigHistoryPagination.ts +1 -1
- package/src/models/ConfigHistoryResponse.ts +1 -1
- package/src/models/ConfigureWebhooks200Response.ts +1 -1
- package/src/models/ConflictResponse.ts +1 -1
- package/src/models/ConvertStripeIDToConfigID200Response.ts +1 -1
- package/src/models/CreateCheckout200Response.ts +1 -1
- package/src/models/CreateCheckoutRequest.ts +1 -1
- package/src/models/CreateCheckoutResponse.ts +1 -1
- package/src/models/CreateCustomerPortal200Response.ts +1 -1
- package/src/models/CreateEmailTemplateRequest.ts +1 -1
- package/src/models/CreateInvite200Response.ts +1 -1
- package/src/models/CreateInvoice200Response.ts +1 -1
- package/src/models/CreateInvoiceRequest.ts +1 -1
- package/src/models/CreateOrUpdateEmailTemplate200Response.ts +1 -1
- package/src/models/CreateOrUpdateEmailTemplate200ResponseAllOfData.ts +1 -1
- package/src/models/CreatePortalRequest.ts +1 -1
- package/src/models/CreatePortalResponse.ts +1 -1
- package/src/models/CreateRelationship200Response.ts +1 -1
- package/src/models/CreateRelationshipRequest.ts +1 -1
- package/src/models/CreateRelationshipRequestWithSubjectId.ts +1 -1
- package/src/models/CreateRelationshipRequestWithSubjectSet.ts +1 -1
- package/src/models/CreateRelationshipResponse.ts +1 -1
- package/src/models/CreateRole200Response.ts +1 -1
- package/src/models/CreateRoleRequest.ts +1 -1
- package/src/models/CreateTenant200Response.ts +1 -1
- package/src/models/CreateTenantRequest.ts +1 -1
- package/src/models/CreateTenantResponse.ts +1 -1
- package/src/models/CreateTenantUserInviteRequest.ts +1 -1
- package/src/models/CreateTenantUserInviteResponse.ts +1 -1
- package/src/models/CreateUser200Response.ts +1 -1
- package/src/models/CreateUserRequest.ts +1 -1
- package/src/models/CreateUserRequestName.ts +1 -1
- package/src/models/CurrencyCode.ts +1 -1
- package/src/models/DeleteEmailTemplate200Response.ts +1 -1
- package/src/models/DeleteEmailTemplate200ResponseAllOfData.ts +1 -1
- package/src/models/DeleteObject200Response.ts +1 -1
- package/src/models/DeleteObjectRequest.ts +1 -1
- package/src/models/DeleteRelationship200Response.ts +1 -1
- package/src/models/DeleteRelationshipRequest.ts +1 -1
- package/src/models/DeleteRelationshipRequestWithSubjectId.ts +1 -1
- package/src/models/DeleteRelationshipRequestWithSubjectSet.ts +1 -1
- package/src/models/DeleteRelationshipResponse.ts +1 -1
- package/src/models/DeleteRole200Response.ts +1 -1
- package/src/models/DeleteRoleResponse.ts +1 -1
- package/src/models/DeleteTenant200Response.ts +1 -1
- package/src/models/DeleteTenantResponse.ts +1 -1
- package/src/models/DeleteTenantUserRequest.ts +1 -1
- package/src/models/DeployPermissionNamespaces200Response.ts +1 -1
- package/src/models/DownloadFile200Response.ts +1 -1
- package/src/models/DownloadRequest.ts +1 -1
- package/src/models/DownloadResponse.ts +1 -1
- package/src/models/EmailTemplate.ts +1 -1
- package/src/models/ErrorResponse.ts +1 -1
- package/src/models/FinalizeInvoiceRequest.ts +1 -1
- package/src/models/ForbiddenResponse.ts +1 -1
- package/src/models/GetActiveTenant200Response.ts +1 -1
- package/src/models/GetEmailTemplates200Response.ts +1 -1
- package/src/models/GetEmailTemplates200ResponseAllOfData.ts +1 -1
- package/src/models/GetIdentity200Response.ts +1 -1
- package/src/models/GetMeterByID200Response.ts +1 -1
- package/src/models/GetPriceByID200Response.ts +1 -1
- package/src/models/GetProductByID200Response.ts +1 -1
- package/src/models/GetRoleDefinitions200Response.ts +1 -1
- package/src/models/GetSession200Response.ts +1 -1
- package/src/models/GetStripeConfig200Response.ts +1 -1
- package/src/models/GetStripeConfigHistory200Response.ts +1 -1
- package/src/models/GetTenantBillingStatus200Response.ts +1 -1
- package/src/models/GetTenantJWT200Response.ts +1 -1
- package/src/models/GetWebhookSecret200Response.ts +1 -1
- package/src/models/InternalServerError.ts +1 -1
- package/src/models/InternalServerErrorResponse.ts +1 -1
- package/src/models/InvoiceLineItemResponse.ts +1 -1
- package/src/models/InvoiceResponse.ts +1 -1
- package/src/models/JWTTokenResponse.ts +1 -1
- package/src/models/KratosIdentity.ts +1 -1
- package/src/models/KratosIdentityCredentials.ts +1 -1
- package/src/models/KratosIdentityCredentialsPassword.ts +1 -1
- package/src/models/KratosIdentityRecoveryAddressesInner.ts +1 -1
- package/src/models/KratosIdentityTraits.ts +1 -1
- package/src/models/KratosIdentityTraitsName.ts +1 -1
- package/src/models/KratosIdentityVerifiableAddressesInner.ts +1 -1
- package/src/models/ListRoles200Response.ts +1 -1
- package/src/models/ListTenantSubscriptions200Response.ts +1 -1
- package/src/models/ListTenantUsers200Response.ts +1 -1
- package/src/models/ListTenants200Response.ts +1 -1
- package/src/models/ListTenantsResponse.ts +1 -1
- package/src/models/Logout200Response.ts +1 -1
- package/src/models/LogoutResponse.ts +1 -1
- package/src/models/MessageResponse.ts +1 -1
- package/src/models/Meter.ts +1 -1
- package/src/models/MeterCustomerMapping.ts +1 -1
- package/src/models/MeterDefaultAggregation.ts +1 -1
- package/src/models/MeterResponse.ts +1 -1
- package/src/models/MeterValueSettings.ts +1 -1
- package/src/models/MeterWithStripeID.ts +1 -1
- package/src/models/MigrationErrorResponse.ts +1 -1
- package/src/models/MigrationSuccessResponse.ts +1 -1
- package/src/models/NamespaceDefinition.ts +1 -1
- package/src/models/NamespaceDefinitionsResponse.ts +1 -1
- package/src/models/NamespaceDeploymentResponse.ts +1 -1
- package/src/models/NotFound.ts +1 -1
- package/src/models/NotFoundResponse.ts +1 -1
- package/src/models/PerUnitBillingScheme.ts +1 -1
- package/src/models/PerUnitPrice.ts +2 -2
- package/src/models/Price.ts +1 -1
- package/src/models/PriceDisplay.ts +1 -1
- package/src/models/PriceLimit.ts +1 -1
- package/src/models/PriceResponse.ts +1 -1
- package/src/models/PriceUI.ts +1 -1
- package/src/models/PriceWithStripeID.ts +2 -2
- package/src/models/Product.ts +1 -1
- package/src/models/ProductResponse.ts +1 -1
- package/src/models/ProductUI.ts +1 -1
- package/src/models/ProductWithStripeIDs.ts +1 -1
- package/src/models/PullStripeConfig200Response.ts +1 -1
- package/src/models/RecordUsageRequest.ts +1 -1
- package/src/models/Relationship.ts +1 -1
- package/src/models/RemoveSubscription200Response.ts +1 -1
- package/src/models/RemoveSubscriptionRequest.ts +1 -1
- package/src/models/RemoveSubscriptionResponse.ts +1 -1
- package/src/models/Role.ts +1 -1
- package/src/models/RolesListResponse.ts +1 -1
- package/src/models/SchemasConflictResponse.ts +1 -1
- package/src/models/SessionResponse.ts +1 -1
- package/src/models/StripeConfigResponse.ts +1 -1
- package/src/models/StripeConfigUpdateRequest.ts +1 -1
- package/src/models/StripeConfigValidateRequest.ts +1 -1
- package/src/models/StripeConfiguration.ts +1 -1
- package/src/models/StripeConfigurationWithIDs.ts +1 -1
- package/src/models/StripeIDConversionResponse.ts +1 -1
- package/src/models/SubjectSet.ts +1 -1
- package/src/models/SubjectSetRequest.ts +1 -1
- package/src/models/SubscriptionResponse.ts +1 -1
- package/src/models/SuccessResponse.ts +1 -1
- package/src/models/SuccessResponseData.ts +1 -1
- package/src/models/SwitchActiveTenant200Response.ts +1 -1
- package/src/models/SwitchTenantRequest.ts +1 -1
- package/src/models/SwitchTenantResponse.ts +1 -1
- package/src/models/Tenant.ts +1 -1
- package/src/models/TenantInvite.ts +1 -1
- package/src/models/TenantSettings.ts +1 -1
- package/src/models/TenantUserResponse.ts +1 -1
- package/src/models/Tier.ts +1 -1
- package/src/models/TierUpTo.ts +1 -1
- package/src/models/TieredBillingScheme.ts +1 -1
- package/src/models/TieredPrice.ts +1 -1
- package/src/models/TiersMode.ts +1 -1
- package/src/models/Unauthorized.ts +1 -1
- package/src/models/UnauthorizedResponse.ts +1 -1
- package/src/models/UpdateInvoiceRequest.ts +1 -1
- package/src/models/UpdateRoleRequest.ts +1 -1
- package/src/models/UpdateTenantUserRole200Response.ts +1 -1
- package/src/models/UpdateTenantUserRoleRequest.ts +1 -1
- package/src/models/UpdateTenantUserRoleResponse.ts +1 -1
- package/src/models/UploadFile200Response.ts +1 -1
- package/src/models/UploadRequest.ts +1 -1
- package/src/models/UploadResponse.ts +1 -1
- package/src/models/UsageType.ts +1 -1
- package/src/models/UserTenantListItem.ts +1 -1
- package/src/models/WebhookEndpointConfig.ts +1 -1
- package/src/models/WebhookResult.ts +1 -1
- package/src/models/WebhookSecretResponse.ts +1 -1
- package/src/models/WebhooksConfigRequest.ts +1 -1
- package/src/models/WebhooksConfigResponse.ts +1 -1
- package/src/models/WhoAmI200Response.ts +1 -1
- package/src/models/WhoAmIResponse.ts +1 -1
- package/src/models/index.ts +1 -0
- package/src/runtime.ts +1 -1
package/.openapi-generator/FILES
CHANGED
|
@@ -7,6 +7,7 @@ docs/AcceptInviteResponse.md
|
|
|
7
7
|
docs/ActiveTenantResponse.md
|
|
8
8
|
docs/AddInvoiceLineItem200Response.md
|
|
9
9
|
docs/AddInvoiceLineItemRequest.md
|
|
10
|
+
docs/AddInvoiceLineItemWithPriceIDRequest.md
|
|
10
11
|
docs/AddSubscription200Response.md
|
|
11
12
|
docs/AddSubscriptionRequest.md
|
|
12
13
|
docs/AddSubscriptionResponse.md
|
|
@@ -215,6 +216,7 @@ src/models/AcceptInviteResponse.ts
|
|
|
215
216
|
src/models/ActiveTenantResponse.ts
|
|
216
217
|
src/models/AddInvoiceLineItem200Response.ts
|
|
217
218
|
src/models/AddInvoiceLineItemRequest.ts
|
|
219
|
+
src/models/AddInvoiceLineItemWithPriceIDRequest.ts
|
|
218
220
|
src/models/AddSubscription200Response.ts
|
|
219
221
|
src/models/AddSubscriptionRequest.ts
|
|
220
222
|
src/models/AddSubscriptionResponse.ts
|
package/README.md
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# @omnibase/core-js@0.10.
|
|
1
|
+
# @omnibase/core-js@0.10.2
|
|
2
2
|
|
|
3
3
|
A TypeScript SDK client for the api.omnibase.tech API.
|
|
4
4
|
|
|
@@ -74,6 +74,7 @@ All URIs are relative to *https://api.omnibase.tech*
|
|
|
74
74
|
*V1ConfigurationApi* | [**validateStripeConfig**](docs/V1ConfigurationApi.md#validatestripeconfig) | **POST** /api/v1/stripe/admin/config/validate | Validate Stripe config
|
|
75
75
|
*V1EventsApi* | [**connectWebSocket**](docs/V1EventsApi.md#connectwebsocket) | **GET** /api/v1/events | WebSocket connection for real-time events
|
|
76
76
|
*V1PaymentsApi* | [**addInvoiceLineItem**](docs/V1PaymentsApi.md#addinvoicelineitemoperation) | **POST** /api/v1/payments/invoices/{invoice_id}/items | Add invoice line item
|
|
77
|
+
*V1PaymentsApi* | [**addInvoiceLineItemWithPriceId**](docs/V1PaymentsApi.md#addinvoicelineitemwithpriceid) | **POST** /api/v1/payments/invoices/{invoice_id}/items/price | Add invoice line item with price ID
|
|
77
78
|
*V1PaymentsApi* | [**createCheckout**](docs/V1PaymentsApi.md#createcheckoutoperation) | **POST** /api/v1/payments/checkout | Create checkout session
|
|
78
79
|
*V1PaymentsApi* | [**createCustomerPortal**](docs/V1PaymentsApi.md#createcustomerportal) | **POST** /api/v1/payments/portal | Create customer portal session
|
|
79
80
|
*V1PaymentsApi* | [**createInvoice**](docs/V1PaymentsApi.md#createinvoiceoperation) | **POST** /api/v1/payments/invoices | Create invoice
|
|
@@ -123,6 +124,7 @@ All URIs are relative to *https://api.omnibase.tech*
|
|
|
123
124
|
- [ActiveTenantResponse](docs/ActiveTenantResponse.md)
|
|
124
125
|
- [AddInvoiceLineItem200Response](docs/AddInvoiceLineItem200Response.md)
|
|
125
126
|
- [AddInvoiceLineItemRequest](docs/AddInvoiceLineItemRequest.md)
|
|
127
|
+
- [AddInvoiceLineItemWithPriceIDRequest](docs/AddInvoiceLineItemWithPriceIDRequest.md)
|
|
126
128
|
- [AddSubscription200Response](docs/AddSubscription200Response.md)
|
|
127
129
|
- [AddSubscriptionRequest](docs/AddSubscriptionRequest.md)
|
|
128
130
|
- [AddSubscriptionResponse](docs/AddSubscriptionResponse.md)
|
|
@@ -337,8 +339,8 @@ This TypeScript SDK client supports the [Fetch API](https://fetch.spec.whatwg.or
|
|
|
337
339
|
and is automatically generated by the
|
|
338
340
|
[OpenAPI Generator](https://openapi-generator.tech) project:
|
|
339
341
|
|
|
340
|
-
- API version: `0.10.
|
|
341
|
-
- Package version: `0.10.
|
|
342
|
+
- API version: `0.10.2`
|
|
343
|
+
- Package version: `0.10.2`
|
|
342
344
|
- Generator version: `7.17.0`
|
|
343
345
|
- Build package: `org.openapitools.codegen.languages.TypeScriptFetchClientCodegen`
|
|
344
346
|
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
|
|
2
|
+
# AddInvoiceLineItemWithPriceIDRequest
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
## Properties
|
|
6
|
+
|
|
7
|
+
Name | Type
|
|
8
|
+
------------ | -------------
|
|
9
|
+
`priceId` | string
|
|
10
|
+
`stripePriceId` | string
|
|
11
|
+
`quantity` | number
|
|
12
|
+
`description` | string
|
|
13
|
+
`currency` | [CurrencyCode](CurrencyCode.md)
|
|
14
|
+
`metadata` | { [key: string]: string; }
|
|
15
|
+
|
|
16
|
+
## Example
|
|
17
|
+
|
|
18
|
+
```typescript
|
|
19
|
+
import type { AddInvoiceLineItemWithPriceIDRequest } from '@omnibase/core-js'
|
|
20
|
+
|
|
21
|
+
// TODO: Update the object below with actual values
|
|
22
|
+
const example = {
|
|
23
|
+
"priceId": hetzner_cx23_nbg1_hourly,
|
|
24
|
+
"stripePriceId": price_1ABC123,
|
|
25
|
+
"quantity": 720,
|
|
26
|
+
"description": VPS Compute - 720 hours,
|
|
27
|
+
"currency": null,
|
|
28
|
+
"metadata": null,
|
|
29
|
+
} satisfies AddInvoiceLineItemWithPriceIDRequest
|
|
30
|
+
|
|
31
|
+
console.log(example)
|
|
32
|
+
|
|
33
|
+
// Convert the instance to a JSON string
|
|
34
|
+
const exampleJSON: string = JSON.stringify(example)
|
|
35
|
+
console.log(exampleJSON)
|
|
36
|
+
|
|
37
|
+
// Parse the JSON string back to an object
|
|
38
|
+
const exampleParsed = JSON.parse(exampleJSON) as AddInvoiceLineItemWithPriceIDRequest
|
|
39
|
+
console.log(exampleParsed)
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
43
|
+
|
|
44
|
+
|
package/docs/PerUnitPrice.md
CHANGED
package/docs/Price.md
CHANGED
package/docs/V1PaymentsApi.md
CHANGED
|
@@ -5,6 +5,7 @@ All URIs are relative to *https://api.omnibase.tech*
|
|
|
5
5
|
| Method | HTTP request | Description |
|
|
6
6
|
|------------- | ------------- | -------------|
|
|
7
7
|
| [**addInvoiceLineItem**](V1PaymentsApi.md#addinvoicelineitemoperation) | **POST** /api/v1/payments/invoices/{invoice_id}/items | Add invoice line item |
|
|
8
|
+
| [**addInvoiceLineItemWithPriceId**](V1PaymentsApi.md#addinvoicelineitemwithpriceid) | **POST** /api/v1/payments/invoices/{invoice_id}/items/price | Add invoice line item with price ID |
|
|
8
9
|
| [**createCheckout**](V1PaymentsApi.md#createcheckoutoperation) | **POST** /api/v1/payments/checkout | Create checkout session |
|
|
9
10
|
| [**createCustomerPortal**](V1PaymentsApi.md#createcustomerportal) | **POST** /api/v1/payments/portal | Create customer portal session |
|
|
10
11
|
| [**createInvoice**](V1PaymentsApi.md#createinvoiceoperation) | **POST** /api/v1/payments/invoices | Create invoice |
|
|
@@ -97,6 +98,89 @@ No authorization required
|
|
|
97
98
|
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
98
99
|
|
|
99
100
|
|
|
101
|
+
## addInvoiceLineItemWithPriceId
|
|
102
|
+
|
|
103
|
+
> AddInvoiceLineItem200Response addInvoiceLineItemWithPriceId(xServiceKey, invoiceId, addInvoiceLineItemWithPriceIDRequest, xTenantId, xStripeCustomerId)
|
|
104
|
+
|
|
105
|
+
Add invoice line item with price ID
|
|
106
|
+
|
|
107
|
+
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.
|
|
108
|
+
|
|
109
|
+
### Example
|
|
110
|
+
|
|
111
|
+
```ts
|
|
112
|
+
import {
|
|
113
|
+
Configuration,
|
|
114
|
+
V1PaymentsApi,
|
|
115
|
+
} from '@omnibase/core-js';
|
|
116
|
+
import type { AddInvoiceLineItemWithPriceIdRequest } from '@omnibase/core-js';
|
|
117
|
+
|
|
118
|
+
async function example() {
|
|
119
|
+
console.log("🚀 Testing @omnibase/core-js SDK...");
|
|
120
|
+
const api = new V1PaymentsApi();
|
|
121
|
+
|
|
122
|
+
const body = {
|
|
123
|
+
// string | Service key for authentication
|
|
124
|
+
xServiceKey: xServiceKey_example,
|
|
125
|
+
// string | Stripe Invoice ID
|
|
126
|
+
invoiceId: invoiceId_example,
|
|
127
|
+
// AddInvoiceLineItemWithPriceIDRequest
|
|
128
|
+
addInvoiceLineItemWithPriceIDRequest: ...,
|
|
129
|
+
// string | Tenant ID (UUID) - Used to look up the Stripe customer ID from tenant configuration. Required if X-Stripe-Customer-Id is not provided. (optional)
|
|
130
|
+
xTenantId: 38400000-8cf0-11bd-b23e-10b96e4ef00d,
|
|
131
|
+
// string | Stripe Customer ID (e.g., cus_xxx) - Directly specify the customer. Required if X-Tenant-Id is not provided. (optional)
|
|
132
|
+
xStripeCustomerId: xStripeCustomerId_example,
|
|
133
|
+
} satisfies AddInvoiceLineItemWithPriceIdRequest;
|
|
134
|
+
|
|
135
|
+
try {
|
|
136
|
+
const data = await api.addInvoiceLineItemWithPriceId(body);
|
|
137
|
+
console.log(data);
|
|
138
|
+
} catch (error) {
|
|
139
|
+
console.error(error);
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// Run the test
|
|
144
|
+
example().catch(console.error);
|
|
145
|
+
```
|
|
146
|
+
|
|
147
|
+
### Parameters
|
|
148
|
+
|
|
149
|
+
|
|
150
|
+
| Name | Type | Description | Notes |
|
|
151
|
+
|------------- | ------------- | ------------- | -------------|
|
|
152
|
+
| **xServiceKey** | `string` | Service key for authentication | [Defaults to `undefined`] |
|
|
153
|
+
| **invoiceId** | `string` | Stripe Invoice ID | [Defaults to `undefined`] |
|
|
154
|
+
| **addInvoiceLineItemWithPriceIDRequest** | [AddInvoiceLineItemWithPriceIDRequest](AddInvoiceLineItemWithPriceIDRequest.md) | | |
|
|
155
|
+
| **xTenantId** | `string` | Tenant ID (UUID) - Used to look up the Stripe customer ID from tenant configuration. Required if X-Stripe-Customer-Id is not provided. | [Optional] [Defaults to `undefined`] |
|
|
156
|
+
| **xStripeCustomerId** | `string` | Stripe Customer ID (e.g., cus_xxx) - Directly specify the customer. Required if X-Tenant-Id is not provided. | [Optional] [Defaults to `undefined`] |
|
|
157
|
+
|
|
158
|
+
### Return type
|
|
159
|
+
|
|
160
|
+
[**AddInvoiceLineItem200Response**](AddInvoiceLineItem200Response.md)
|
|
161
|
+
|
|
162
|
+
### Authorization
|
|
163
|
+
|
|
164
|
+
No authorization required
|
|
165
|
+
|
|
166
|
+
### HTTP request headers
|
|
167
|
+
|
|
168
|
+
- **Content-Type**: `application/json`
|
|
169
|
+
- **Accept**: `application/json`, `text/plain`
|
|
170
|
+
|
|
171
|
+
|
|
172
|
+
### HTTP response details
|
|
173
|
+
| Status code | Description | Response headers |
|
|
174
|
+
|-------------|-------------|------------------|
|
|
175
|
+
| **200** | Line item added successfully | - |
|
|
176
|
+
| **400** | Bad Request - Invalid request parameters | - |
|
|
177
|
+
| **401** | Unauthorized - Authentication required | - |
|
|
178
|
+
| **404** | Not Found - Resource not found | - |
|
|
179
|
+
| **500** | Internal Server Error - Server encountered an error | - |
|
|
180
|
+
|
|
181
|
+
[[Back to top]](#) [[Back to API list]](../README.md#api-endpoints) [[Back to Model list]](../README.md#models) [[Back to README]](../README.md)
|
|
182
|
+
|
|
183
|
+
|
|
100
184
|
## createCheckout
|
|
101
185
|
|
|
102
186
|
> CreateCheckout200Response createCheckout(createCheckoutRequest)
|
package/package.json
CHANGED
package/src/apis/V1AuthApi.ts
CHANGED
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.2
|
|
8
8
|
* Contact: support@omnibase.dev
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/src/apis/V1EventsApi.ts
CHANGED
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.2
|
|
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
|
AddInvoiceLineItem200Response,
|
|
19
19
|
AddInvoiceLineItemRequest,
|
|
20
|
+
AddInvoiceLineItemWithPriceIDRequest,
|
|
20
21
|
BadRequestResponse,
|
|
21
22
|
CreateCheckout200Response,
|
|
22
23
|
CreateCheckoutRequest,
|
|
@@ -37,6 +38,8 @@ import {
|
|
|
37
38
|
AddInvoiceLineItem200ResponseToJSON,
|
|
38
39
|
AddInvoiceLineItemRequestFromJSON,
|
|
39
40
|
AddInvoiceLineItemRequestToJSON,
|
|
41
|
+
AddInvoiceLineItemWithPriceIDRequestFromJSON,
|
|
42
|
+
AddInvoiceLineItemWithPriceIDRequestToJSON,
|
|
40
43
|
BadRequestResponseFromJSON,
|
|
41
44
|
BadRequestResponseToJSON,
|
|
42
45
|
CreateCheckout200ResponseFromJSON,
|
|
@@ -75,6 +78,14 @@ export interface AddInvoiceLineItemOperationRequest {
|
|
|
75
78
|
xStripeCustomerId?: string;
|
|
76
79
|
}
|
|
77
80
|
|
|
81
|
+
export interface AddInvoiceLineItemWithPriceIdRequest {
|
|
82
|
+
xServiceKey: string;
|
|
83
|
+
invoiceId: string;
|
|
84
|
+
addInvoiceLineItemWithPriceIDRequest: AddInvoiceLineItemWithPriceIDRequest;
|
|
85
|
+
xTenantId?: string;
|
|
86
|
+
xStripeCustomerId?: string;
|
|
87
|
+
}
|
|
88
|
+
|
|
78
89
|
export interface CreateCheckoutOperationRequest {
|
|
79
90
|
createCheckoutRequest: CreateCheckoutRequest;
|
|
80
91
|
}
|
|
@@ -184,6 +195,74 @@ export class V1PaymentsApi extends runtime.BaseAPI {
|
|
|
184
195
|
return await response.value();
|
|
185
196
|
}
|
|
186
197
|
|
|
198
|
+
/**
|
|
199
|
+
* 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.
|
|
200
|
+
* Add invoice line item with price ID
|
|
201
|
+
*/
|
|
202
|
+
async addInvoiceLineItemWithPriceIdRaw(requestParameters: AddInvoiceLineItemWithPriceIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<runtime.ApiResponse<AddInvoiceLineItem200Response>> {
|
|
203
|
+
if (requestParameters['xServiceKey'] == null) {
|
|
204
|
+
throw new runtime.RequiredError(
|
|
205
|
+
'xServiceKey',
|
|
206
|
+
'Required parameter "xServiceKey" was null or undefined when calling addInvoiceLineItemWithPriceId().'
|
|
207
|
+
);
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
if (requestParameters['invoiceId'] == null) {
|
|
211
|
+
throw new runtime.RequiredError(
|
|
212
|
+
'invoiceId',
|
|
213
|
+
'Required parameter "invoiceId" was null or undefined when calling addInvoiceLineItemWithPriceId().'
|
|
214
|
+
);
|
|
215
|
+
}
|
|
216
|
+
|
|
217
|
+
if (requestParameters['addInvoiceLineItemWithPriceIDRequest'] == null) {
|
|
218
|
+
throw new runtime.RequiredError(
|
|
219
|
+
'addInvoiceLineItemWithPriceIDRequest',
|
|
220
|
+
'Required parameter "addInvoiceLineItemWithPriceIDRequest" was null or undefined when calling addInvoiceLineItemWithPriceId().'
|
|
221
|
+
);
|
|
222
|
+
}
|
|
223
|
+
|
|
224
|
+
const queryParameters: any = {};
|
|
225
|
+
|
|
226
|
+
const headerParameters: runtime.HTTPHeaders = {};
|
|
227
|
+
|
|
228
|
+
headerParameters['Content-Type'] = 'application/json';
|
|
229
|
+
|
|
230
|
+
if (requestParameters['xServiceKey'] != null) {
|
|
231
|
+
headerParameters['X-Service-Key'] = String(requestParameters['xServiceKey']);
|
|
232
|
+
}
|
|
233
|
+
|
|
234
|
+
if (requestParameters['xTenantId'] != null) {
|
|
235
|
+
headerParameters['X-Tenant-Id'] = String(requestParameters['xTenantId']);
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
if (requestParameters['xStripeCustomerId'] != null) {
|
|
239
|
+
headerParameters['X-Stripe-Customer-Id'] = String(requestParameters['xStripeCustomerId']);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
|
|
243
|
+
let urlPath = `/api/v1/payments/invoices/{invoice_id}/items/price`;
|
|
244
|
+
urlPath = urlPath.replace(`{${"invoice_id"}}`, encodeURIComponent(String(requestParameters['invoiceId'])));
|
|
245
|
+
|
|
246
|
+
const response = await this.request({
|
|
247
|
+
path: urlPath,
|
|
248
|
+
method: 'POST',
|
|
249
|
+
headers: headerParameters,
|
|
250
|
+
query: queryParameters,
|
|
251
|
+
body: AddInvoiceLineItemWithPriceIDRequestToJSON(requestParameters['addInvoiceLineItemWithPriceIDRequest']),
|
|
252
|
+
}, initOverrides);
|
|
253
|
+
|
|
254
|
+
return new runtime.JSONApiResponse(response, (jsonValue) => AddInvoiceLineItem200ResponseFromJSON(jsonValue));
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
/**
|
|
258
|
+
* 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.
|
|
259
|
+
* Add invoice line item with price ID
|
|
260
|
+
*/
|
|
261
|
+
async addInvoiceLineItemWithPriceId(requestParameters: AddInvoiceLineItemWithPriceIdRequest, initOverrides?: RequestInit | runtime.InitOverrideFunction): Promise<AddInvoiceLineItem200Response> {
|
|
262
|
+
const response = await this.addInvoiceLineItemWithPriceIdRaw(requestParameters, initOverrides);
|
|
263
|
+
return await response.value();
|
|
264
|
+
}
|
|
265
|
+
|
|
187
266
|
/**
|
|
188
267
|
* 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
268
|
* 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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.2
|
|
8
8
|
* Contact: support@omnibase.dev
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/src/apis/V1StorageApi.ts
CHANGED
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.2
|
|
8
8
|
* Contact: support@omnibase.dev
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/src/apis/V1StripeApi.ts
CHANGED
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.2
|
|
8
8
|
* Contact: support@omnibase.dev
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
package/src/apis/V1TenantsApi.ts
CHANGED
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.2
|
|
8
8
|
* Contact: support@omnibase.dev
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|
|
@@ -0,0 +1,118 @@
|
|
|
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.10.2
|
|
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 AddInvoiceLineItemWithPriceIDRequest
|
|
28
|
+
*/
|
|
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
|
+
}
|
|
79
|
+
|
|
80
|
+
export function AddInvoiceLineItemWithPriceIDRequestFromJSON(json: any): AddInvoiceLineItemWithPriceIDRequest {
|
|
81
|
+
return AddInvoiceLineItemWithPriceIDRequestFromJSONTyped(json, false);
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
export function AddInvoiceLineItemWithPriceIDRequestFromJSONTyped(json: any, ignoreDiscriminator: boolean): AddInvoiceLineItemWithPriceIDRequest {
|
|
85
|
+
if (json == null) {
|
|
86
|
+
return json;
|
|
87
|
+
}
|
|
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
|
+
};
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
export function AddInvoiceLineItemWithPriceIDRequestToJSON(json: any): AddInvoiceLineItemWithPriceIDRequest {
|
|
100
|
+
return AddInvoiceLineItemWithPriceIDRequestToJSONTyped(json, false);
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
export function AddInvoiceLineItemWithPriceIDRequestToJSONTyped(value?: AddInvoiceLineItemWithPriceIDRequest | null, ignoreDiscriminator: boolean = false): any {
|
|
104
|
+
if (value == null) {
|
|
105
|
+
return value;
|
|
106
|
+
}
|
|
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
|
+
};
|
|
117
|
+
}
|
|
118
|
+
|
|
@@ -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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.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.
|
|
7
|
+
* The version of the OpenAPI document: 0.10.2
|
|
8
8
|
* Contact: support@omnibase.dev
|
|
9
9
|
*
|
|
10
10
|
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
|