@flexprice/sdk 2.1.40 → 2.1.41
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/docs/sdk/models/analytics-query-meta.md +5 -1
- package/docs/sdk/models/analytics-query-request.md +1 -1
- package/docs/sdk/models/analytics-view-definition-compare.md +17 -0
- package/docs/sdk/models/analytics-view-definition.md +15 -12
- package/docs/sdk/models/cancel-self-billing-checkout-request.md +17 -0
- package/docs/sdk/models/create-view-request.md +1 -1
- package/docs/sdk/models/default-shape.md +17 -0
- package/docs/sdk/models/delete-analytics-view-request.md +17 -0
- package/docs/sdk/models/dir.md +15 -0
- package/docs/sdk/models/display.md +17 -0
- package/docs/sdk/models/family.md +2 -2
- package/docs/sdk/models/get-analytics-view-request.md +17 -0
- package/docs/sdk/models/improvement-direction.md +17 -0
- package/docs/sdk/models/invoice-response.md +1 -0
- package/docs/sdk/models/list-analytics-views-request.md +15 -0
- package/docs/sdk/models/list-views-response.md +15 -0
- package/docs/sdk/models/metric.md +2 -2
- package/docs/sdk/models/op.md +15 -0
- package/docs/sdk/models/poll-self-billing-checkout-request.md +17 -0
- package/docs/sdk/models/report-catalog-entry-grain.md +17 -0
- package/docs/sdk/models/report-catalog-entry-shape.md +17 -0
- package/docs/sdk/models/report-catalog-entry.md +29 -0
- package/docs/sdk/models/report-catalog-response.md +15 -0
- package/docs/sdk/models/report-category.md +17 -0
- package/docs/sdk/models/report-dimension.md +16 -0
- package/docs/sdk/models/report-filter.md +17 -0
- package/docs/sdk/models/report-kind.md +17 -0
- package/docs/sdk/models/report-query-request-compare.md +15 -0
- package/docs/sdk/models/report-query-request-grain.md +15 -0
- package/docs/sdk/models/report-query-request-shape.md +15 -0
- package/docs/sdk/models/report-query-request.md +26 -0
- package/docs/sdk/models/report-sort.md +16 -0
- package/docs/sdk/models/report-value-type.md +17 -0
- package/docs/sdk/models/run-analytics-report-request.md +22 -0
- package/docs/sdk/models/self-billing-checkout-request.md +30 -0
- package/docs/sdk/models/self-billing-checkout-response.md +19 -0
- package/docs/sdk/models/self-billing-invoice.md +22 -0
- package/docs/sdk/models/self-billing-portal-response.md +16 -0
- package/docs/sdk/models/self-billing-status-response.md +16 -0
- package/docs/sdk/models/self-billing-summary-response.md +37 -0
- package/docs/sdk/models/tenant-internal-status.md +17 -0
- package/docs/sdk/models/top-up-wallet-request.md +1 -0
- package/docs/sdk/models/update-analytics-view-request.md +27 -0
- package/docs/sdk/models/view-response.md +9 -6
- package/docs/sdks/analytics/README.md +455 -4
- package/docs/sdks/selfbilling/README.md +517 -0
- package/docs/sdks/tenants/README.md +0 -71
- package/esm/funcs/{tenants-get-tenant-billing-usage.d.ts → analytics-delete-analytics-view.d.ts} +4 -4
- package/esm/funcs/analytics-delete-analytics-view.d.ts.map +1 -0
- package/esm/funcs/analytics-delete-analytics-view.js +91 -0
- package/esm/funcs/analytics-delete-analytics-view.js.map +1 -0
- package/esm/funcs/analytics-get-analytics-view.d.ts +17 -0
- package/esm/funcs/analytics-get-analytics-view.d.ts.map +1 -0
- package/esm/funcs/analytics-get-analytics-view.js +91 -0
- package/esm/funcs/analytics-get-analytics-view.js.map +1 -0
- package/esm/funcs/analytics-list-analytics-reports.d.ts +17 -0
- package/esm/funcs/{tenants-get-tenant-billing-usage.d.ts.map → analytics-list-analytics-reports.d.ts.map} +1 -1
- package/esm/funcs/analytics-list-analytics-reports.js +72 -0
- package/esm/funcs/{tenants-get-tenant-billing-usage.js.map → analytics-list-analytics-reports.js.map} +1 -1
- package/esm/funcs/analytics-list-analytics-views.d.ts +17 -0
- package/esm/funcs/analytics-list-analytics-views.d.ts.map +1 -0
- package/esm/funcs/analytics-list-analytics-views.js +89 -0
- package/esm/funcs/analytics-list-analytics-views.js.map +1 -0
- package/esm/funcs/analytics-run-analytics-report.d.ts +17 -0
- package/esm/funcs/analytics-run-analytics-report.d.ts.map +1 -0
- package/esm/funcs/analytics-run-analytics-report.js +93 -0
- package/esm/funcs/analytics-run-analytics-report.js.map +1 -0
- package/esm/funcs/analytics-update-analytics-view.d.ts +17 -0
- package/esm/funcs/analytics-update-analytics-view.d.ts.map +1 -0
- package/esm/funcs/analytics-update-analytics-view.js +93 -0
- package/esm/funcs/analytics-update-analytics-view.js.map +1 -0
- package/esm/funcs/self-billing-cancel-self-billing-checkout.d.ts +16 -0
- package/esm/funcs/self-billing-cancel-self-billing-checkout.d.ts.map +1 -0
- package/esm/funcs/self-billing-cancel-self-billing-checkout.js +88 -0
- package/esm/funcs/self-billing-cancel-self-billing-checkout.js.map +1 -0
- package/esm/funcs/self-billing-create-self-billing-portal-session.d.ts +17 -0
- package/esm/funcs/self-billing-create-self-billing-portal-session.d.ts.map +1 -0
- package/esm/funcs/{tenants-get-tenant-billing-usage.js → self-billing-create-self-billing-portal-session.js} +8 -8
- package/esm/funcs/self-billing-create-self-billing-portal-session.js.map +1 -0
- package/esm/funcs/self-billing-get-self-billing-status.d.ts +17 -0
- package/esm/funcs/self-billing-get-self-billing-status.d.ts.map +1 -0
- package/esm/funcs/self-billing-get-self-billing-status.js +72 -0
- package/esm/funcs/self-billing-get-self-billing-status.js.map +1 -0
- package/esm/funcs/self-billing-get-self-billing-summary.d.ts +17 -0
- package/esm/funcs/self-billing-get-self-billing-summary.d.ts.map +1 -0
- package/esm/funcs/self-billing-get-self-billing-summary.js +72 -0
- package/esm/funcs/self-billing-get-self-billing-summary.js.map +1 -0
- package/esm/funcs/self-billing-get-tenant-billing-summary.d.ts +17 -0
- package/esm/funcs/self-billing-get-tenant-billing-summary.d.ts.map +1 -0
- package/esm/funcs/self-billing-get-tenant-billing-summary.js +72 -0
- package/esm/funcs/self-billing-get-tenant-billing-summary.js.map +1 -0
- package/esm/funcs/self-billing-poll-self-billing-checkout.d.ts +17 -0
- package/esm/funcs/self-billing-poll-self-billing-checkout.d.ts.map +1 -0
- package/esm/funcs/self-billing-poll-self-billing-checkout.js +91 -0
- package/esm/funcs/self-billing-poll-self-billing-checkout.js.map +1 -0
- package/esm/funcs/self-billing-start-self-billing-checkout.d.ts +17 -0
- package/esm/funcs/self-billing-start-self-billing-checkout.d.ts.map +1 -0
- package/esm/funcs/self-billing-start-self-billing-checkout.js +83 -0
- package/esm/funcs/self-billing-start-self-billing-checkout.js.map +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/sdk/analytics.d.ts +42 -0
- package/esm/sdk/analytics.d.ts.map +1 -1
- package/esm/sdk/analytics.js +60 -0
- package/esm/sdk/analytics.js.map +1 -1
- package/esm/sdk/models/analytics-query-meta.d.ts +4 -0
- package/esm/sdk/models/analytics-query-meta.d.ts.map +1 -1
- package/esm/sdk/models/analytics-query-meta.js +6 -0
- package/esm/sdk/models/analytics-query-meta.js.map +1 -1
- package/esm/sdk/models/analytics-view-definition.d.ts +25 -0
- package/esm/sdk/models/analytics-view-definition.d.ts.map +1 -1
- package/esm/sdk/models/analytics-view-definition.js +25 -0
- package/esm/sdk/models/analytics-view-definition.js.map +1 -1
- package/esm/sdk/models/cancel-self-billing-checkout-op.d.ts +15 -0
- package/esm/sdk/models/cancel-self-billing-checkout-op.d.ts.map +1 -0
- package/esm/sdk/models/cancel-self-billing-checkout-op.js +12 -0
- package/esm/sdk/models/cancel-self-billing-checkout-op.js.map +1 -0
- package/esm/sdk/models/delete-analytics-view-op.d.ts +15 -0
- package/esm/sdk/models/delete-analytics-view-op.d.ts.map +1 -0
- package/esm/sdk/models/delete-analytics-view-op.js +12 -0
- package/esm/sdk/models/delete-analytics-view-op.js.map +1 -0
- package/esm/sdk/models/family.d.ts +1 -0
- package/esm/sdk/models/family.d.ts.map +1 -1
- package/esm/sdk/models/family.js +1 -0
- package/esm/sdk/models/family.js.map +1 -1
- package/esm/sdk/models/get-analytics-view-op.d.ts +15 -0
- package/esm/sdk/models/get-analytics-view-op.d.ts.map +1 -0
- package/esm/sdk/models/get-analytics-view-op.js +12 -0
- package/esm/sdk/models/get-analytics-view-op.js.map +1 -0
- package/esm/sdk/models/improvement-direction.d.ts +10 -0
- package/esm/sdk/models/improvement-direction.d.ts.map +1 -0
- package/esm/sdk/models/improvement-direction.js +11 -0
- package/esm/sdk/models/improvement-direction.js.map +1 -0
- package/esm/sdk/models/index.d.ts +25 -1
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +25 -1
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/invoice-response.d.ts +4 -0
- package/esm/sdk/models/invoice-response.d.ts.map +1 -1
- package/esm/sdk/models/invoice-response.js +2 -0
- package/esm/sdk/models/invoice-response.js.map +1 -1
- package/esm/sdk/models/list-analytics-views-op.d.ts +15 -0
- package/esm/sdk/models/list-analytics-views-op.d.ts.map +1 -0
- package/esm/sdk/models/list-analytics-views-op.js +12 -0
- package/esm/sdk/models/list-analytics-views-op.js.map +1 -0
- package/esm/sdk/models/list-views-response.d.ts +11 -0
- package/esm/sdk/models/list-views-response.d.ts.map +1 -0
- package/esm/sdk/models/list-views-response.js +15 -0
- package/esm/sdk/models/list-views-response.js.map +1 -0
- package/esm/sdk/models/metric.d.ts +12 -0
- package/esm/sdk/models/metric.d.ts.map +1 -1
- package/esm/sdk/models/metric.js +12 -0
- package/esm/sdk/models/metric.js.map +1 -1
- package/esm/sdk/models/poll-self-billing-checkout-op.d.ts +15 -0
- package/esm/sdk/models/poll-self-billing-checkout-op.d.ts.map +1 -0
- package/esm/sdk/models/poll-self-billing-checkout-op.js +12 -0
- package/esm/sdk/models/poll-self-billing-checkout-op.js.map +1 -0
- package/esm/sdk/models/report-catalog-entry.d.ts +54 -0
- package/esm/sdk/models/report-catalog-entry.d.ts.map +1 -0
- package/esm/sdk/models/report-catalog-entry.js +65 -0
- package/esm/sdk/models/report-catalog-entry.js.map +1 -0
- package/esm/sdk/models/report-catalog-response.d.ts +11 -0
- package/esm/sdk/models/report-catalog-response.d.ts.map +1 -0
- package/esm/sdk/models/report-catalog-response.js +15 -0
- package/esm/sdk/models/report-catalog-response.js.map +1 -0
- package/esm/sdk/models/report-category.d.ts +13 -0
- package/esm/sdk/models/report-category.d.ts.map +1 -0
- package/esm/sdk/models/report-category.js +14 -0
- package/esm/sdk/models/report-category.js.map +1 -0
- package/esm/sdk/models/report-dimension.d.ts +11 -0
- package/esm/sdk/models/report-dimension.d.ts.map +1 -0
- package/esm/sdk/models/report-dimension.js +15 -0
- package/esm/sdk/models/report-dimension.js.map +1 -0
- package/esm/sdk/models/report-filter.d.ts +24 -0
- package/esm/sdk/models/report-filter.d.ts.map +1 -0
- package/esm/sdk/models/report-filter.js +20 -0
- package/esm/sdk/models/report-filter.js.map +1 -0
- package/esm/sdk/models/report-kind.d.ts +11 -0
- package/esm/sdk/models/report-kind.d.ts.map +1 -0
- package/esm/sdk/models/report-kind.js +12 -0
- package/esm/sdk/models/report-kind.js.map +1 -0
- package/esm/sdk/models/report-query-request.d.ts +54 -0
- package/esm/sdk/models/report-query-request.d.ts.map +1 -0
- package/esm/sdk/models/report-query-request.js +42 -0
- package/esm/sdk/models/report-query-request.js.map +1 -0
- package/esm/sdk/models/report-sort.d.ts +22 -0
- package/esm/sdk/models/report-sort.d.ts.map +1 -0
- package/esm/sdk/models/report-sort.js +19 -0
- package/esm/sdk/models/report-sort.js.map +1 -0
- package/esm/sdk/models/report-value-type.d.ts +11 -0
- package/esm/sdk/models/report-value-type.d.ts.map +1 -0
- package/esm/sdk/models/report-value-type.js +12 -0
- package/esm/sdk/models/report-value-type.js.map +1 -0
- package/esm/sdk/models/run-analytics-report-op.d.ts +21 -0
- package/esm/sdk/models/run-analytics-report-op.d.ts.map +1 -0
- package/esm/sdk/models/run-analytics-report-op.js +14 -0
- package/esm/sdk/models/run-analytics-report-op.js.map +1 -0
- package/esm/sdk/models/self-billing-checkout-request.d.ts +28 -0
- package/esm/sdk/models/self-billing-checkout-request.d.ts.map +1 -0
- package/esm/sdk/models/self-billing-checkout-request.js +31 -0
- package/esm/sdk/models/self-billing-checkout-request.js.map +1 -0
- package/esm/sdk/models/self-billing-checkout-response.d.ts +16 -0
- package/esm/sdk/models/self-billing-checkout-response.d.ts.map +1 -0
- package/esm/sdk/models/self-billing-checkout-response.js +26 -0
- package/esm/sdk/models/self-billing-checkout-response.js.map +1 -0
- package/esm/sdk/models/self-billing-invoice.d.ts +19 -0
- package/esm/sdk/models/self-billing-invoice.d.ts.map +1 -0
- package/esm/sdk/models/self-billing-invoice.js +30 -0
- package/esm/sdk/models/self-billing-invoice.js.map +1 -0
- package/esm/sdk/models/self-billing-portal-response.d.ts +11 -0
- package/esm/sdk/models/self-billing-portal-response.d.ts.map +1 -0
- package/esm/sdk/models/self-billing-portal-response.js +20 -0
- package/esm/sdk/models/self-billing-portal-response.js.map +1 -0
- package/esm/sdk/models/self-billing-status-response.d.ts +12 -0
- package/esm/sdk/models/self-billing-status-response.d.ts.map +1 -0
- package/esm/sdk/models/self-billing-status-response.js +16 -0
- package/esm/sdk/models/self-billing-status-response.js.map +1 -0
- package/esm/sdk/models/self-billing-summary-response.d.ts +18 -0
- package/esm/sdk/models/self-billing-summary-response.d.ts.map +1 -0
- package/esm/sdk/models/self-billing-summary-response.js +28 -0
- package/esm/sdk/models/self-billing-summary-response.js.map +1 -0
- package/esm/sdk/models/tenant-internal-status.d.ts +11 -0
- package/esm/sdk/models/tenant-internal-status.d.ts.map +1 -0
- package/esm/sdk/models/tenant-internal-status.js +12 -0
- package/esm/sdk/models/tenant-internal-status.js.map +1 -0
- package/esm/sdk/models/top-up-wallet-request.d.ts +8 -0
- package/esm/sdk/models/top-up-wallet-request.d.ts.map +1 -1
- package/esm/sdk/models/top-up-wallet-request.js +2 -0
- package/esm/sdk/models/top-up-wallet-request.js.map +1 -1
- package/esm/sdk/models/update-analytics-view-op.d.ts +21 -0
- package/esm/sdk/models/update-analytics-view-op.d.ts.map +1 -0
- package/esm/sdk/models/update-analytics-view-op.js +14 -0
- package/esm/sdk/models/update-analytics-view-op.js.map +1 -0
- package/esm/sdk/models/view-response.d.ts +3 -0
- package/esm/sdk/models/view-response.d.ts.map +1 -1
- package/esm/sdk/models/view-response.js +12 -2
- package/esm/sdk/models/view-response.js.map +1 -1
- package/esm/sdk/sdk.d.ts +3 -0
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +5 -0
- package/esm/sdk/sdk.js.map +1 -1
- package/esm/sdk/self-billing.d.ts +54 -0
- package/esm/sdk/self-billing.d.ts.map +1 -0
- package/esm/sdk/self-billing.js +78 -0
- package/esm/sdk/self-billing.js.map +1 -0
- package/esm/sdk/tenants.d.ts +0 -7
- package/esm/sdk/tenants.d.ts.map +1 -1
- package/esm/sdk/tenants.js +0 -10
- package/esm/sdk/tenants.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/analytics-delete-analytics-view.ts +181 -0
- package/src/funcs/analytics-get-analytics-view.ts +181 -0
- package/src/funcs/{tenants-get-tenant-billing-usage.ts → analytics-list-analytics-reports.ts} +10 -10
- package/src/funcs/analytics-list-analytics-views.ts +184 -0
- package/src/funcs/analytics-run-analytics-report.ts +186 -0
- package/src/funcs/analytics-update-analytics-view.ts +186 -0
- package/src/funcs/self-billing-cancel-self-billing-checkout.ts +173 -0
- package/src/funcs/self-billing-create-self-billing-portal-session.ts +153 -0
- package/src/funcs/self-billing-get-self-billing-status.ts +152 -0
- package/src/funcs/self-billing-get-self-billing-summary.ts +153 -0
- package/src/funcs/self-billing-get-tenant-billing-summary.ts +153 -0
- package/src/funcs/self-billing-poll-self-billing-checkout.ts +182 -0
- package/src/funcs/self-billing-start-self-billing-checkout.ts +172 -0
- package/src/lib/config.ts +2 -2
- package/src/sdk/analytics.ts +110 -0
- package/src/sdk/models/analytics-query-meta.ts +10 -0
- package/src/sdk/models/analytics-view-definition.ts +46 -0
- package/src/sdk/models/cancel-self-billing-checkout-op.ts +35 -0
- package/src/sdk/models/delete-analytics-view-op.ts +33 -0
- package/src/sdk/models/family.ts +1 -0
- package/src/sdk/models/get-analytics-view-op.ts +33 -0
- package/src/sdk/models/improvement-direction.ts +19 -0
- package/src/sdk/models/index.ts +25 -1
- package/src/sdk/models/invoice-response.ts +6 -0
- package/src/sdk/models/list-analytics-views-op.ts +33 -0
- package/src/sdk/models/list-views-response.ts +32 -0
- package/src/sdk/models/metric.ts +12 -0
- package/src/sdk/models/poll-self-billing-checkout-op.ts +35 -0
- package/src/sdk/models/report-catalog-entry.ts +128 -0
- package/src/sdk/models/report-catalog-response.ts +35 -0
- package/src/sdk/models/report-category.ts +22 -0
- package/src/sdk/models/report-dimension.ts +33 -0
- package/src/sdk/models/report-filter.ts +42 -0
- package/src/sdk/models/report-kind.ts +18 -0
- package/src/sdk/models/report-query-request.ts +106 -0
- package/src/sdk/models/report-sort.ts +39 -0
- package/src/sdk/models/report-value-type.ts +20 -0
- package/src/sdk/models/run-analytics-report-op.ts +44 -0
- package/src/sdk/models/self-billing-checkout-request.ts +68 -0
- package/src/sdk/models/self-billing-checkout-response.ts +56 -0
- package/src/sdk/models/self-billing-invoice.ts +63 -0
- package/src/sdk/models/self-billing-portal-response.ts +41 -0
- package/src/sdk/models/self-billing-status-response.ts +37 -0
- package/src/sdk/models/self-billing-summary-response.ts +64 -0
- package/src/sdk/models/tenant-internal-status.ts +20 -0
- package/src/sdk/models/top-up-wallet-request.ts +12 -0
- package/src/sdk/models/update-analytics-view-op.ts +44 -0
- package/src/sdk/models/view-response.ts +22 -6
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/self-billing.ts +127 -0
- package/src/sdk/tenants.ts +0 -16
- package/docs/sdk/models/tenant-billing-usage.md +0 -144
- package/esm/sdk/models/tenant-billing-usage.d.ts +0 -13
- package/esm/sdk/models/tenant-billing-usage.d.ts.map +0 -1
- package/esm/sdk/models/tenant-billing-usage.js +0 -17
- package/esm/sdk/models/tenant-billing-usage.js.map +0 -1
- package/src/sdk/models/tenant-billing-usage.ts +0 -41
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
11
|
+
|
|
12
|
+
export type SelfBillingPortalResponse = {
|
|
13
|
+
expiresAt?: Date | undefined;
|
|
14
|
+
url?: string | undefined;
|
|
15
|
+
};
|
|
16
|
+
|
|
17
|
+
/** @internal */
|
|
18
|
+
export const SelfBillingPortalResponse$inboundSchema: z.ZodMiniType<
|
|
19
|
+
SelfBillingPortalResponse,
|
|
20
|
+
unknown
|
|
21
|
+
> = z.pipe(
|
|
22
|
+
z.object({
|
|
23
|
+
expires_at: types.optional(types.date()),
|
|
24
|
+
url: types.optional(types.string()),
|
|
25
|
+
}),
|
|
26
|
+
z.transform((v) => {
|
|
27
|
+
return remap$(v, {
|
|
28
|
+
"expires_at": "expiresAt",
|
|
29
|
+
});
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
|
|
33
|
+
export function selfBillingPortalResponseFromJSON(
|
|
34
|
+
jsonString: string,
|
|
35
|
+
): SafeParseResult<SelfBillingPortalResponse, SDKValidationError> {
|
|
36
|
+
return safeParse(
|
|
37
|
+
jsonString,
|
|
38
|
+
(x) => SelfBillingPortalResponse$inboundSchema.parse(JSON.parse(x)),
|
|
39
|
+
`Failed to parse 'SelfBillingPortalResponse' from JSON`,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import * as types from "../../types/primitives.js";
|
|
9
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
10
|
+
import {
|
|
11
|
+
TenantInternalStatus,
|
|
12
|
+
TenantInternalStatus$inboundSchema,
|
|
13
|
+
} from "./tenant-internal-status.js";
|
|
14
|
+
|
|
15
|
+
export type SelfBillingStatusResponse = {
|
|
16
|
+
enabled?: boolean | undefined;
|
|
17
|
+
status?: TenantInternalStatus | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const SelfBillingStatusResponse$inboundSchema: z.ZodMiniType<
|
|
22
|
+
SelfBillingStatusResponse,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.object({
|
|
25
|
+
enabled: types.optional(types.boolean()),
|
|
26
|
+
status: types.optional(TenantInternalStatus$inboundSchema),
|
|
27
|
+
});
|
|
28
|
+
|
|
29
|
+
export function selfBillingStatusResponseFromJSON(
|
|
30
|
+
jsonString: string,
|
|
31
|
+
): SafeParseResult<SelfBillingStatusResponse, SDKValidationError> {
|
|
32
|
+
return safeParse(
|
|
33
|
+
jsonString,
|
|
34
|
+
(x) => SelfBillingStatusResponse$inboundSchema.parse(JSON.parse(x)),
|
|
35
|
+
`Failed to parse 'SelfBillingStatusResponse' from JSON`,
|
|
36
|
+
);
|
|
37
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
9
|
+
import * as types from "../../types/primitives.js";
|
|
10
|
+
import {
|
|
11
|
+
CustomerUsageSummaryResponse,
|
|
12
|
+
CustomerUsageSummaryResponse$inboundSchema,
|
|
13
|
+
} from "./customer-usage-summary-response.js";
|
|
14
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
15
|
+
import {
|
|
16
|
+
SelfBillingInvoice,
|
|
17
|
+
SelfBillingInvoice$inboundSchema,
|
|
18
|
+
} from "./self-billing-invoice.js";
|
|
19
|
+
import {
|
|
20
|
+
SubscriptionStatus,
|
|
21
|
+
SubscriptionStatus$inboundSchema,
|
|
22
|
+
} from "./subscription-status.js";
|
|
23
|
+
import {
|
|
24
|
+
TenantInternalStatus,
|
|
25
|
+
TenantInternalStatus$inboundSchema,
|
|
26
|
+
} from "./tenant-internal-status.js";
|
|
27
|
+
|
|
28
|
+
export type SelfBillingSummaryResponse = {
|
|
29
|
+
invoices?: Array<SelfBillingInvoice> | undefined;
|
|
30
|
+
status?: TenantInternalStatus | undefined;
|
|
31
|
+
subscriptionStatus?: SubscriptionStatus | undefined;
|
|
32
|
+
trialEndsAt?: Date | undefined;
|
|
33
|
+
usage?: CustomerUsageSummaryResponse | undefined;
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** @internal */
|
|
37
|
+
export const SelfBillingSummaryResponse$inboundSchema: z.ZodMiniType<
|
|
38
|
+
SelfBillingSummaryResponse,
|
|
39
|
+
unknown
|
|
40
|
+
> = z.pipe(
|
|
41
|
+
z.object({
|
|
42
|
+
invoices: types.optional(z.array(SelfBillingInvoice$inboundSchema)),
|
|
43
|
+
status: types.optional(TenantInternalStatus$inboundSchema),
|
|
44
|
+
subscription_status: types.optional(SubscriptionStatus$inboundSchema),
|
|
45
|
+
trial_ends_at: types.optional(types.date()),
|
|
46
|
+
usage: types.optional(CustomerUsageSummaryResponse$inboundSchema),
|
|
47
|
+
}),
|
|
48
|
+
z.transform((v) => {
|
|
49
|
+
return remap$(v, {
|
|
50
|
+
"subscription_status": "subscriptionStatus",
|
|
51
|
+
"trial_ends_at": "trialEndsAt",
|
|
52
|
+
});
|
|
53
|
+
}),
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
export function selfBillingSummaryResponseFromJSON(
|
|
57
|
+
jsonString: string,
|
|
58
|
+
): SafeParseResult<SelfBillingSummaryResponse, SDKValidationError> {
|
|
59
|
+
return safeParse(
|
|
60
|
+
jsonString,
|
|
61
|
+
(x) => SelfBillingSummaryResponse$inboundSchema.parse(JSON.parse(x)),
|
|
62
|
+
`Failed to parse 'SelfBillingSummaryResponse' from JSON`,
|
|
63
|
+
);
|
|
64
|
+
}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import * as openEnums from "../../types/enums.js";
|
|
7
|
+
import { OpenEnum } from "../../types/enums.js";
|
|
8
|
+
|
|
9
|
+
export const TenantInternalStatus = {
|
|
10
|
+
Trialing: "trialing",
|
|
11
|
+
Active: "active",
|
|
12
|
+
Suspended: "suspended",
|
|
13
|
+
} as const;
|
|
14
|
+
export type TenantInternalStatus = OpenEnum<typeof TenantInternalStatus>;
|
|
15
|
+
|
|
16
|
+
/** @internal */
|
|
17
|
+
export const TenantInternalStatus$inboundSchema: z.ZodMiniType<
|
|
18
|
+
TenantInternalStatus,
|
|
19
|
+
unknown
|
|
20
|
+
> = openEnums.inboundSchema(TenantInternalStatus);
|
|
@@ -58,6 +58,13 @@ export type TopUpWalletRequest = {
|
|
|
58
58
|
* description to add any specific details about the transaction
|
|
59
59
|
*/
|
|
60
60
|
description?: string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* effective_date is stored as the credit transaction's created_at.
|
|
63
|
+
*
|
|
64
|
+
* @remarks
|
|
65
|
+
* Omit to use the current time. Must not be in the future.
|
|
66
|
+
*/
|
|
67
|
+
effectiveDate?: Date | undefined;
|
|
61
68
|
/**
|
|
62
69
|
* expiry_date_utc is the expiry date in UTC timezone
|
|
63
70
|
*
|
|
@@ -91,6 +98,7 @@ export type TopUpWalletRequest$Outbound = {
|
|
|
91
98
|
coupons?: Array<TopUpCoupon$Outbound> | undefined;
|
|
92
99
|
credits_to_add?: string | undefined;
|
|
93
100
|
description?: string | undefined;
|
|
101
|
+
effective_date?: string | undefined;
|
|
94
102
|
expiry_date_utc?: string | undefined;
|
|
95
103
|
force_sync_invoice?: boolean | undefined;
|
|
96
104
|
idempotency_key?: string | undefined;
|
|
@@ -112,6 +120,9 @@ export const TopUpWalletRequest$outboundSchema: z.ZodMiniType<
|
|
|
112
120
|
coupons: z.optional(z.array(TopUpCoupon$outboundSchema)),
|
|
113
121
|
creditsToAdd: z.optional(z.string()),
|
|
114
122
|
description: z.optional(z.string()),
|
|
123
|
+
effectiveDate: z.optional(
|
|
124
|
+
z.pipe(z.date(), z.transform(v => v.toISOString())),
|
|
125
|
+
),
|
|
115
126
|
expiryDateUtc: z.optional(z.string()),
|
|
116
127
|
forceSyncInvoice: z.optional(z.boolean()),
|
|
117
128
|
idempotencyKey: z.optional(z.string()),
|
|
@@ -124,6 +135,7 @@ export const TopUpWalletRequest$outboundSchema: z.ZodMiniType<
|
|
|
124
135
|
bonusCreditsExpiryDateUtc: "bonus_credits_expiry_date_utc",
|
|
125
136
|
bonusCreditsToAdd: "bonus_credits_to_add",
|
|
126
137
|
creditsToAdd: "credits_to_add",
|
|
138
|
+
effectiveDate: "effective_date",
|
|
127
139
|
expiryDateUtc: "expiry_date_utc",
|
|
128
140
|
forceSyncInvoice: "force_sync_invoice",
|
|
129
141
|
idempotencyKey: "idempotency_key",
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v4-mini";
|
|
6
|
+
import {
|
|
7
|
+
CreateViewRequest,
|
|
8
|
+
CreateViewRequest$Outbound,
|
|
9
|
+
CreateViewRequest$outboundSchema,
|
|
10
|
+
} from "./create-view-request.js";
|
|
11
|
+
|
|
12
|
+
export type UpdateAnalyticsViewRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* View ID
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* View request
|
|
19
|
+
*/
|
|
20
|
+
body: CreateViewRequest;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type UpdateAnalyticsViewRequest$Outbound = {
|
|
25
|
+
id: string;
|
|
26
|
+
body: CreateViewRequest$Outbound;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const UpdateAnalyticsViewRequest$outboundSchema: z.ZodMiniType<
|
|
31
|
+
UpdateAnalyticsViewRequest$Outbound,
|
|
32
|
+
UpdateAnalyticsViewRequest
|
|
33
|
+
> = z.object({
|
|
34
|
+
id: z.string(),
|
|
35
|
+
body: CreateViewRequest$outboundSchema,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export function updateAnalyticsViewRequestToJSON(
|
|
39
|
+
updateAnalyticsViewRequest: UpdateAnalyticsViewRequest,
|
|
40
|
+
): string {
|
|
41
|
+
return JSON.stringify(
|
|
42
|
+
UpdateAnalyticsViewRequest$outboundSchema.parse(updateAnalyticsViewRequest),
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import * as types from "../../types/primitives.js";
|
|
@@ -13,20 +14,35 @@ import {
|
|
|
13
14
|
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
14
15
|
|
|
15
16
|
export type ViewResponse = {
|
|
17
|
+
createdAt?: Date | undefined;
|
|
18
|
+
createdBy?: string | undefined;
|
|
16
19
|
definition?: AnalyticsViewDefinition | undefined;
|
|
17
20
|
id?: string | undefined;
|
|
18
21
|
name?: string | undefined;
|
|
22
|
+
updatedAt?: Date | undefined;
|
|
19
23
|
version?: number | undefined;
|
|
20
24
|
};
|
|
21
25
|
|
|
22
26
|
/** @internal */
|
|
23
27
|
export const ViewResponse$inboundSchema: z.ZodMiniType<ViewResponse, unknown> =
|
|
24
|
-
z.
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
28
|
+
z.pipe(
|
|
29
|
+
z.object({
|
|
30
|
+
created_at: types.optional(types.date()),
|
|
31
|
+
created_by: types.optional(types.string()),
|
|
32
|
+
definition: types.optional(AnalyticsViewDefinition$inboundSchema),
|
|
33
|
+
id: types.optional(types.string()),
|
|
34
|
+
name: types.optional(types.string()),
|
|
35
|
+
updated_at: types.optional(types.date()),
|
|
36
|
+
version: types.optional(types.number()),
|
|
37
|
+
}),
|
|
38
|
+
z.transform((v) => {
|
|
39
|
+
return remap$(v, {
|
|
40
|
+
"created_at": "createdAt",
|
|
41
|
+
"created_by": "createdBy",
|
|
42
|
+
"updated_at": "updatedAt",
|
|
43
|
+
});
|
|
44
|
+
}),
|
|
45
|
+
);
|
|
30
46
|
|
|
31
47
|
export function viewResponseFromJSON(
|
|
32
48
|
jsonString: string,
|
package/src/sdk/sdk.ts
CHANGED
|
@@ -32,6 +32,7 @@ import { Rbac } from "./rbac.js";
|
|
|
32
32
|
import { Refunds } from "./refunds.js";
|
|
33
33
|
import { ScheduledTasks } from "./scheduled-tasks.js";
|
|
34
34
|
import { Secrets } from "./secrets.js";
|
|
35
|
+
import { SelfBilling } from "./self-billing.js";
|
|
35
36
|
import { Subscriptions } from "./subscriptions.js";
|
|
36
37
|
import { Tasks } from "./tasks.js";
|
|
37
38
|
import { TaxAssociations } from "./tax-associations.js";
|
|
@@ -164,6 +165,11 @@ export class Flexprice extends ClientSDK {
|
|
|
164
165
|
return (this._plans ??= new Plans(this._options));
|
|
165
166
|
}
|
|
166
167
|
|
|
168
|
+
private _selfBilling?: SelfBilling;
|
|
169
|
+
get selfBilling(): SelfBilling {
|
|
170
|
+
return (this._selfBilling ??= new SelfBilling(this._options));
|
|
171
|
+
}
|
|
172
|
+
|
|
167
173
|
private _prices?: Prices;
|
|
168
174
|
get prices(): Prices {
|
|
169
175
|
return (this._prices ??= new Prices(this._options));
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import { selfBillingCancelSelfBillingCheckout } from "../funcs/self-billing-cancel-self-billing-checkout.js";
|
|
6
|
+
import { selfBillingCreateSelfBillingPortalSession } from "../funcs/self-billing-create-self-billing-portal-session.js";
|
|
7
|
+
import { selfBillingGetSelfBillingStatus } from "../funcs/self-billing-get-self-billing-status.js";
|
|
8
|
+
import { selfBillingGetSelfBillingSummary } from "../funcs/self-billing-get-self-billing-summary.js";
|
|
9
|
+
import { selfBillingGetTenantBillingSummary } from "../funcs/self-billing-get-tenant-billing-summary.js";
|
|
10
|
+
import { selfBillingPollSelfBillingCheckout } from "../funcs/self-billing-poll-self-billing-checkout.js";
|
|
11
|
+
import { selfBillingStartSelfBillingCheckout } from "../funcs/self-billing-start-self-billing-checkout.js";
|
|
12
|
+
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
13
|
+
import { unwrapAsync } from "../types/fp.js";
|
|
14
|
+
import * as models from "./models/index.js";
|
|
15
|
+
|
|
16
|
+
export class SelfBilling extends ClientSDK {
|
|
17
|
+
/**
|
|
18
|
+
* Start self-billing checkout
|
|
19
|
+
*
|
|
20
|
+
* @remarks
|
|
21
|
+
* Saves the billing details and opens the checkout that ends the caller tenant's trial.
|
|
22
|
+
*/
|
|
23
|
+
async startSelfBillingCheckout(
|
|
24
|
+
request: models.SelfBillingCheckoutRequest,
|
|
25
|
+
options?: RequestOptions,
|
|
26
|
+
): Promise<models.SelfBillingCheckoutResponse> {
|
|
27
|
+
return unwrapAsync(selfBillingStartSelfBillingCheckout(
|
|
28
|
+
this,
|
|
29
|
+
request,
|
|
30
|
+
options,
|
|
31
|
+
));
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
/**
|
|
35
|
+
* Poll self-billing checkout
|
|
36
|
+
*
|
|
37
|
+
* @remarks
|
|
38
|
+
* Reports the caller tenant's checkout and activates the tenant once it is paid.
|
|
39
|
+
*/
|
|
40
|
+
async pollSelfBillingCheckout(
|
|
41
|
+
id: string,
|
|
42
|
+
options?: RequestOptions,
|
|
43
|
+
): Promise<models.SelfBillingCheckoutResponse> {
|
|
44
|
+
return unwrapAsync(selfBillingPollSelfBillingCheckout(
|
|
45
|
+
this,
|
|
46
|
+
id,
|
|
47
|
+
options,
|
|
48
|
+
));
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
/**
|
|
52
|
+
* Cancel self-billing checkout
|
|
53
|
+
*
|
|
54
|
+
* @remarks
|
|
55
|
+
* Cancels the caller tenant's open checkout.
|
|
56
|
+
*/
|
|
57
|
+
async cancelSelfBillingCheckout(
|
|
58
|
+
id: string,
|
|
59
|
+
options?: RequestOptions,
|
|
60
|
+
): Promise<void> {
|
|
61
|
+
return unwrapAsync(selfBillingCancelSelfBillingCheckout(
|
|
62
|
+
this,
|
|
63
|
+
id,
|
|
64
|
+
options,
|
|
65
|
+
));
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/**
|
|
69
|
+
* Create self-billing portal session
|
|
70
|
+
*
|
|
71
|
+
* @remarks
|
|
72
|
+
* Opens a short-lived customer portal session for the caller tenant.
|
|
73
|
+
*/
|
|
74
|
+
async createSelfBillingPortalSession(
|
|
75
|
+
options?: RequestOptions,
|
|
76
|
+
): Promise<models.SelfBillingPortalResponse> {
|
|
77
|
+
return unwrapAsync(selfBillingCreateSelfBillingPortalSession(
|
|
78
|
+
this,
|
|
79
|
+
options,
|
|
80
|
+
));
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Get self-billing status
|
|
85
|
+
*
|
|
86
|
+
* @remarks
|
|
87
|
+
* Reports whether self-billing is enabled and the caller tenant's billing status.
|
|
88
|
+
*/
|
|
89
|
+
async getSelfBillingStatus(
|
|
90
|
+
options?: RequestOptions,
|
|
91
|
+
): Promise<models.SelfBillingStatusResponse> {
|
|
92
|
+
return unwrapAsync(selfBillingGetSelfBillingStatus(
|
|
93
|
+
this,
|
|
94
|
+
options,
|
|
95
|
+
));
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Get self-billing summary
|
|
100
|
+
*
|
|
101
|
+
* @remarks
|
|
102
|
+
* Returns the caller tenant's billing status, subscription, recent invoices and usage.
|
|
103
|
+
*/
|
|
104
|
+
async getSelfBillingSummary(
|
|
105
|
+
options?: RequestOptions,
|
|
106
|
+
): Promise<models.SelfBillingSummaryResponse> {
|
|
107
|
+
return unwrapAsync(selfBillingGetSelfBillingSummary(
|
|
108
|
+
this,
|
|
109
|
+
options,
|
|
110
|
+
));
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
/**
|
|
114
|
+
* Get tenant billing summary
|
|
115
|
+
*
|
|
116
|
+
* @remarks
|
|
117
|
+
* Returns the caller tenant's billing summary; same as /portal/billing/summary.
|
|
118
|
+
*/
|
|
119
|
+
async getTenantBillingSummary(
|
|
120
|
+
options?: RequestOptions,
|
|
121
|
+
): Promise<models.SelfBillingSummaryResponse> {
|
|
122
|
+
return unwrapAsync(selfBillingGetTenantBillingSummary(
|
|
123
|
+
this,
|
|
124
|
+
options,
|
|
125
|
+
));
|
|
126
|
+
}
|
|
127
|
+
}
|
package/src/sdk/tenants.ts
CHANGED
|
@@ -2,7 +2,6 @@
|
|
|
2
2
|
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
|
-
import { tenantsGetTenantBillingUsage } from "../funcs/tenants-get-tenant-billing-usage.js";
|
|
6
5
|
import { tenantsGetTenantById } from "../funcs/tenants-get-tenant-by-id.js";
|
|
7
6
|
import { tenantsUpdateTenant } from "../funcs/tenants-update-tenant.js";
|
|
8
7
|
import { ClientSDK, RequestOptions } from "../lib/sdks.js";
|
|
@@ -10,21 +9,6 @@ import { unwrapAsync } from "../types/fp.js";
|
|
|
10
9
|
import * as models from "./models/index.js";
|
|
11
10
|
|
|
12
11
|
export class Tenants extends ClientSDK {
|
|
13
|
-
/**
|
|
14
|
-
* Get billing usage for the current tenant
|
|
15
|
-
*
|
|
16
|
-
* @remarks
|
|
17
|
-
* Use when showing the current tenant's billing usage (e.g. admin billing page or usage caps). Returns subscription and usage for the tenant.
|
|
18
|
-
*/
|
|
19
|
-
async getTenantBillingUsage(
|
|
20
|
-
options?: RequestOptions,
|
|
21
|
-
): Promise<models.TenantBillingUsage> {
|
|
22
|
-
return unwrapAsync(tenantsGetTenantBillingUsage(
|
|
23
|
-
this,
|
|
24
|
-
options,
|
|
25
|
-
));
|
|
26
|
-
}
|
|
27
|
-
|
|
28
12
|
/**
|
|
29
13
|
* Update a tenant
|
|
30
14
|
*
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
# TenantBillingUsage
|
|
2
|
-
|
|
3
|
-
## Example Usage
|
|
4
|
-
|
|
5
|
-
```typescript
|
|
6
|
-
import { TenantBillingUsage } from "@flexprice/sdk/sdk/models";
|
|
7
|
-
|
|
8
|
-
let value: TenantBillingUsage = {
|
|
9
|
-
subscriptions: [
|
|
10
|
-
{
|
|
11
|
-
couponAssociations: [
|
|
12
|
-
{
|
|
13
|
-
subscriptionLineItem: {
|
|
14
|
-
price: {
|
|
15
|
-
addon: {
|
|
16
|
-
prices: [
|
|
17
|
-
{
|
|
18
|
-
addon: {},
|
|
19
|
-
meter: {
|
|
20
|
-
createdAt: new Date("2024-03-20T15:04:05Z"),
|
|
21
|
-
eventName: "api_request",
|
|
22
|
-
id: "550e8400-e29b-41d4-a716-446655440000",
|
|
23
|
-
name: "API Usage Meter",
|
|
24
|
-
status: "published",
|
|
25
|
-
tenantId: "tenant123",
|
|
26
|
-
updatedAt: new Date("2024-03-20T15:04:05Z"),
|
|
27
|
-
},
|
|
28
|
-
plan: {},
|
|
29
|
-
},
|
|
30
|
-
],
|
|
31
|
-
},
|
|
32
|
-
meter: {
|
|
33
|
-
createdAt: new Date("2024-03-20T15:04:05Z"),
|
|
34
|
-
eventName: "api_request",
|
|
35
|
-
id: "550e8400-e29b-41d4-a716-446655440000",
|
|
36
|
-
name: "API Usage Meter",
|
|
37
|
-
status: "published",
|
|
38
|
-
tenantId: "tenant123",
|
|
39
|
-
updatedAt: new Date("2024-03-20T15:04:05Z"),
|
|
40
|
-
},
|
|
41
|
-
plan: {},
|
|
42
|
-
},
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
entitlements: [
|
|
47
|
-
{
|
|
48
|
-
feature: {
|
|
49
|
-
meter: {
|
|
50
|
-
createdAt: new Date("2024-03-20T15:04:05Z"),
|
|
51
|
-
eventName: "api_request",
|
|
52
|
-
id: "550e8400-e29b-41d4-a716-446655440000",
|
|
53
|
-
name: "API Usage Meter",
|
|
54
|
-
status: "published",
|
|
55
|
-
tenantId: "tenant123",
|
|
56
|
-
updatedAt: new Date("2024-03-20T15:04:05Z"),
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
},
|
|
60
|
-
],
|
|
61
|
-
latestInvoice: {
|
|
62
|
-
subscription: {
|
|
63
|
-
couponAssociations: [
|
|
64
|
-
{
|
|
65
|
-
subscriptionLineItem: {
|
|
66
|
-
price: {
|
|
67
|
-
addon: {
|
|
68
|
-
prices: [
|
|
69
|
-
{
|
|
70
|
-
addon: {},
|
|
71
|
-
meter: {
|
|
72
|
-
createdAt: new Date("2024-03-20T15:04:05Z"),
|
|
73
|
-
eventName: "api_request",
|
|
74
|
-
id: "550e8400-e29b-41d4-a716-446655440000",
|
|
75
|
-
name: "API Usage Meter",
|
|
76
|
-
status: "published",
|
|
77
|
-
tenantId: "tenant123",
|
|
78
|
-
updatedAt: new Date("2024-03-20T15:04:05Z"),
|
|
79
|
-
},
|
|
80
|
-
plan: {},
|
|
81
|
-
},
|
|
82
|
-
],
|
|
83
|
-
},
|
|
84
|
-
meter: {
|
|
85
|
-
createdAt: new Date("2024-03-20T15:04:05Z"),
|
|
86
|
-
eventName: "api_request",
|
|
87
|
-
id: "550e8400-e29b-41d4-a716-446655440000",
|
|
88
|
-
name: "API Usage Meter",
|
|
89
|
-
status: "published",
|
|
90
|
-
tenantId: "tenant123",
|
|
91
|
-
updatedAt: new Date("2024-03-20T15:04:05Z"),
|
|
92
|
-
},
|
|
93
|
-
plan: {},
|
|
94
|
-
},
|
|
95
|
-
},
|
|
96
|
-
},
|
|
97
|
-
],
|
|
98
|
-
entitlements: [
|
|
99
|
-
{
|
|
100
|
-
feature: {
|
|
101
|
-
meter: {
|
|
102
|
-
createdAt: new Date("2024-03-20T15:04:05Z"),
|
|
103
|
-
eventName: "api_request",
|
|
104
|
-
id: "550e8400-e29b-41d4-a716-446655440000",
|
|
105
|
-
name: "API Usage Meter",
|
|
106
|
-
status: "published",
|
|
107
|
-
tenantId: "tenant123",
|
|
108
|
-
updatedAt: new Date("2024-03-20T15:04:05Z"),
|
|
109
|
-
},
|
|
110
|
-
},
|
|
111
|
-
},
|
|
112
|
-
],
|
|
113
|
-
plan: {},
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
plan: {},
|
|
117
|
-
},
|
|
118
|
-
],
|
|
119
|
-
usage: {
|
|
120
|
-
features: [
|
|
121
|
-
{
|
|
122
|
-
feature: {
|
|
123
|
-
meter: {
|
|
124
|
-
createdAt: new Date("2024-03-20T15:04:05Z"),
|
|
125
|
-
eventName: "api_request",
|
|
126
|
-
id: "550e8400-e29b-41d4-a716-446655440000",
|
|
127
|
-
name: "API Usage Meter",
|
|
128
|
-
status: "published",
|
|
129
|
-
tenantId: "tenant123",
|
|
130
|
-
updatedAt: new Date("2024-03-20T15:04:05Z"),
|
|
131
|
-
},
|
|
132
|
-
},
|
|
133
|
-
},
|
|
134
|
-
],
|
|
135
|
-
},
|
|
136
|
-
};
|
|
137
|
-
```
|
|
138
|
-
|
|
139
|
-
## Fields
|
|
140
|
-
|
|
141
|
-
| Field | Type | Required | Description |
|
|
142
|
-
| ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ | ------------------------------------------------------------------------------------------ |
|
|
143
|
-
| `subscriptions` | [models.SubscriptionResponse](../../sdk/models/subscription-response.md)[] | :heavy_minus_sign: | N/A |
|
|
144
|
-
| `usage` | [models.CustomerUsageSummaryResponse](../../sdk/models/customer-usage-summary-response.md) | :heavy_minus_sign: | N/A |
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
import * as z from "zod/v4-mini";
|
|
2
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
3
|
-
import { CustomerUsageSummaryResponse } from "./customer-usage-summary-response.js";
|
|
4
|
-
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
5
|
-
import { SubscriptionResponse } from "./subscription-response.js";
|
|
6
|
-
export type TenantBillingUsage = {
|
|
7
|
-
subscriptions?: Array<SubscriptionResponse> | undefined;
|
|
8
|
-
usage?: CustomerUsageSummaryResponse | undefined;
|
|
9
|
-
};
|
|
10
|
-
/** @internal */
|
|
11
|
-
export declare const TenantBillingUsage$inboundSchema: z.ZodMiniType<TenantBillingUsage, unknown>;
|
|
12
|
-
export declare function tenantBillingUsageFromJSON(jsonString: string): SafeParseResult<TenantBillingUsage, SDKValidationError>;
|
|
13
|
-
//# sourceMappingURL=tenant-billing-usage.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tenant-billing-usage.d.ts","sourceRoot":"","sources":["../../../src/sdk/models/tenant-billing-usage.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AAEjC,OAAO,EAAE,MAAM,IAAI,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EACL,4BAA4B,EAE7B,MAAM,sCAAsC,CAAC;AAC9C,OAAO,EAAE,kBAAkB,EAAE,MAAM,2BAA2B,CAAC;AAC/D,OAAO,EACL,oBAAoB,EAErB,MAAM,4BAA4B,CAAC;AAEpC,MAAM,MAAM,kBAAkB,GAAG;IAC/B,aAAa,CAAC,EAAE,KAAK,CAAC,oBAAoB,CAAC,GAAG,SAAS,CAAC;IACxD,KAAK,CAAC,EAAE,4BAA4B,GAAG,SAAS,CAAC;CAClD,CAAC;AAEF,gBAAgB;AAChB,eAAO,MAAM,gCAAgC,EAAE,CAAC,CAAC,WAAW,CAC1D,kBAAkB,EAClB,OAAO,CAIP,CAAC;AAEH,wBAAgB,0BAA0B,CACxC,UAAU,EAAE,MAAM,GACjB,eAAe,CAAC,kBAAkB,EAAE,kBAAkB,CAAC,CAMzD"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
/*
|
|
2
|
-
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
-
*/
|
|
4
|
-
import * as z from "zod/v4-mini";
|
|
5
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
6
|
-
import * as types from "../../types/primitives.js";
|
|
7
|
-
import { CustomerUsageSummaryResponse$inboundSchema, } from "./customer-usage-summary-response.js";
|
|
8
|
-
import { SubscriptionResponse$inboundSchema, } from "./subscription-response.js";
|
|
9
|
-
/** @internal */
|
|
10
|
-
export const TenantBillingUsage$inboundSchema = z.object({
|
|
11
|
-
subscriptions: types.optional(z.array(SubscriptionResponse$inboundSchema)),
|
|
12
|
-
usage: types.optional(CustomerUsageSummaryResponse$inboundSchema),
|
|
13
|
-
});
|
|
14
|
-
export function tenantBillingUsageFromJSON(jsonString) {
|
|
15
|
-
return safeParse(jsonString, (x) => TenantBillingUsage$inboundSchema.parse(JSON.parse(x)), `Failed to parse 'TenantBillingUsage' from JSON`);
|
|
16
|
-
}
|
|
17
|
-
//# sourceMappingURL=tenant-billing-usage.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"tenant-billing-usage.js","sourceRoot":"","sources":["../../../src/sdk/models/tenant-billing-usage.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,KAAK,CAAC,MAAM,aAAa,CAAC;AACjC,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAEjD,OAAO,KAAK,KAAK,MAAM,2BAA2B,CAAC;AACnD,OAAO,EAEL,0CAA0C,GAC3C,MAAM,sCAAsC,CAAC;AAE9C,OAAO,EAEL,kCAAkC,GACnC,MAAM,4BAA4B,CAAC;AAOpC,gBAAgB;AAChB,MAAM,CAAC,MAAM,gCAAgC,GAGzC,CAAC,CAAC,MAAM,CAAC;IACX,aAAa,EAAE,KAAK,CAAC,QAAQ,CAAC,CAAC,CAAC,KAAK,CAAC,kCAAkC,CAAC,CAAC;IAC1E,KAAK,EAAE,KAAK,CAAC,QAAQ,CAAC,0CAA0C,CAAC;CAClE,CAAC,CAAC;AAEH,MAAM,UAAU,0BAA0B,CACxC,UAAkB,EACuC;IACzD,OAAO,SAAS,CACd,UAAU,EACV,CAAC,CAAC,EAAE,EAAE,CAAC,gCAAgC,CAAC,KAAK,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,EAC5D,gDAAgD,CACjD,CAAC;AAAA,CACH"}
|