@tirdad/sdk 2.1.42 → 2.1.44
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/esm/funcs/commitments-create-commitment.d.ts +17 -0
- package/esm/funcs/commitments-create-commitment.d.ts.map +1 -0
- package/esm/funcs/commitments-create-commitment.js +83 -0
- package/esm/funcs/commitments-create-commitment.js.map +1 -0
- package/esm/funcs/commitments-get-commitment.d.ts +17 -0
- package/esm/funcs/commitments-get-commitment.d.ts.map +1 -0
- package/esm/funcs/commitments-get-commitment.js +91 -0
- package/esm/funcs/commitments-get-commitment.js.map +1 -0
- package/esm/funcs/commitments-preview-commitment.d.ts +17 -0
- package/esm/funcs/commitments-preview-commitment.d.ts.map +1 -0
- package/esm/funcs/commitments-preview-commitment.js +83 -0
- package/esm/funcs/commitments-preview-commitment.js.map +1 -0
- package/esm/funcs/commitments-query-commitment.d.ts +17 -0
- package/esm/funcs/commitments-query-commitment.d.ts.map +1 -0
- package/esm/funcs/commitments-query-commitment.js +83 -0
- package/esm/funcs/commitments-query-commitment.js.map +1 -0
- package/esm/funcs/commitments-terminate-commitment.d.ts +17 -0
- package/esm/funcs/commitments-terminate-commitment.d.ts.map +1 -0
- package/esm/funcs/commitments-terminate-commitment.js +93 -0
- package/esm/funcs/commitments-terminate-commitment.js.map +1 -0
- package/esm/funcs/commitments-update-commitment.d.ts +17 -0
- package/esm/funcs/commitments-update-commitment.d.ts.map +1 -0
- package/esm/funcs/commitments-update-commitment.js +93 -0
- package/esm/funcs/commitments-update-commitment.js.map +1 -0
- package/esm/funcs/events-delete-events.d.ts +17 -0
- package/esm/funcs/events-delete-events.d.ts.map +1 -0
- package/esm/funcs/events-delete-events.js +86 -0
- package/esm/funcs/events-delete-events.js.map +1 -0
- package/esm/funcs/self-billing-get-self-billing-summary.d.ts +1 -1
- package/esm/funcs/self-billing-get-self-billing-summary.js +1 -1
- package/esm/funcs/webhook-events-post-webhook-events-commitment-created.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-commitment-created.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-commitment-created.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-commitment-created.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-commitment-terminated.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-commitment-terminated.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-commitment-terminated.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-commitment-terminated.js.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-commitment-updated.d.ts +17 -0
- package/esm/funcs/webhook-events-post-webhook-events-commitment-updated.d.ts.map +1 -0
- package/esm/funcs/webhook-events-post-webhook-events-commitment-updated.js +69 -0
- package/esm/funcs/webhook-events-post-webhook-events-commitment-updated.js.map +1 -0
- package/esm/lib/config.d.ts +2 -2
- package/esm/lib/config.js +2 -2
- package/esm/sdk/commitments.d.ts +47 -0
- package/esm/sdk/commitments.d.ts.map +1 -0
- package/esm/sdk/commitments.js +68 -0
- package/esm/sdk/commitments.js.map +1 -0
- package/esm/sdk/events.d.ts +7 -0
- package/esm/sdk/events.d.ts.map +1 -1
- package/esm/sdk/events.js +10 -0
- package/esm/sdk/events.js.map +1 -1
- package/esm/sdk/models/active-window.d.ts +20 -0
- package/esm/sdk/models/active-window.d.ts.map +1 -0
- package/esm/sdk/models/active-window.js +24 -0
- package/esm/sdk/models/active-window.js.map +1 -0
- package/esm/sdk/models/add-addon-ref.d.ts +6 -0
- package/esm/sdk/models/add-addon-ref.d.ts.map +1 -1
- package/esm/sdk/models/add-addon-ref.js +3 -0
- package/esm/sdk/models/add-addon-ref.js.map +1 -1
- package/esm/sdk/models/addon-price-override-ref.d.ts +16 -0
- package/esm/sdk/models/addon-price-override-ref.d.ts.map +1 -0
- package/esm/sdk/models/addon-price-override-ref.js +20 -0
- package/esm/sdk/models/addon-price-override-ref.js.map +1 -0
- package/esm/sdk/models/commitment-collection-method.d.ts +12 -0
- package/esm/sdk/models/commitment-collection-method.d.ts.map +1 -0
- package/esm/sdk/models/commitment-collection-method.js +13 -0
- package/esm/sdk/models/commitment-collection-method.js.map +1 -0
- package/esm/sdk/models/commitment-early-termination.d.ts +11 -0
- package/esm/sdk/models/commitment-early-termination.d.ts.map +1 -0
- package/esm/sdk/models/commitment-early-termination.js +12 -0
- package/esm/sdk/models/commitment-early-termination.js.map +1 -0
- package/esm/sdk/models/commitment-filter.d.ts +60 -0
- package/esm/sdk/models/commitment-filter.d.ts.map +1 -0
- package/esm/sdk/models/commitment-filter.js +51 -0
- package/esm/sdk/models/commitment-filter.js.map +1 -0
- package/esm/sdk/models/commitment-measurement.d.ts +12 -0
- package/esm/sdk/models/commitment-measurement.d.ts.map +1 -0
- package/esm/sdk/models/commitment-measurement.js +13 -0
- package/esm/sdk/models/commitment-measurement.js.map +1 -0
- package/esm/sdk/models/commitment-price-input.d.ts +24 -0
- package/esm/sdk/models/commitment-price-input.d.ts.map +1 -0
- package/esm/sdk/models/commitment-price-input.js +27 -0
- package/esm/sdk/models/commitment-price-input.js.map +1 -0
- package/esm/sdk/models/commitment-response.d.ts +56 -0
- package/esm/sdk/models/commitment-response.d.ts.map +1 -0
- package/esm/sdk/models/commitment-response.js +88 -0
- package/esm/sdk/models/commitment-response.js.map +1 -0
- package/esm/sdk/models/commitment-scope-input.d.ts +18 -0
- package/esm/sdk/models/commitment-scope-input.d.ts.map +1 -0
- package/esm/sdk/models/commitment-scope-input.js +20 -0
- package/esm/sdk/models/commitment-scope-input.js.map +1 -0
- package/esm/sdk/models/commitment-scope-type.d.ts +14 -0
- package/esm/sdk/models/commitment-scope-type.d.ts.map +1 -0
- package/esm/sdk/models/commitment-scope-type.js +15 -0
- package/esm/sdk/models/commitment-scope-type.js.map +1 -0
- package/esm/sdk/models/commitment-status.d.ts +13 -0
- package/esm/sdk/models/commitment-status.d.ts.map +1 -0
- package/esm/sdk/models/commitment-status.js +14 -0
- package/esm/sdk/models/commitment-status.js.map +1 -0
- package/esm/sdk/models/commitment-usage-breakdown.d.ts +33 -0
- package/esm/sdk/models/commitment-usage-breakdown.d.ts.map +1 -0
- package/esm/sdk/models/commitment-usage-breakdown.js +37 -0
- package/esm/sdk/models/commitment-usage-breakdown.js.map +1 -0
- package/esm/sdk/models/commitment-usage-value.d.ts +11 -0
- package/esm/sdk/models/commitment-usage-value.d.ts.map +1 -0
- package/esm/sdk/models/commitment-usage-value.js +15 -0
- package/esm/sdk/models/commitment-usage-value.js.map +1 -0
- package/esm/sdk/models/create-commitment-request.d.ts +64 -0
- package/esm/sdk/models/create-commitment-request.d.ts.map +1 -0
- package/esm/sdk/models/create-commitment-request.js +50 -0
- package/esm/sdk/models/create-commitment-request.js.map +1 -0
- package/esm/sdk/models/create-entitlement-request.d.ts +3 -0
- package/esm/sdk/models/create-entitlement-request.d.ts.map +1 -1
- package/esm/sdk/models/create-entitlement-request.js.map +1 -1
- package/esm/sdk/models/create-price-tier.d.ts +3 -0
- package/esm/sdk/models/create-price-tier.d.ts.map +1 -1
- package/esm/sdk/models/create-price-tier.js +3 -0
- package/esm/sdk/models/create-price-tier.js.map +1 -1
- package/esm/sdk/models/create-subscription-request.d.ts +9 -0
- package/esm/sdk/models/create-subscription-request.d.ts.map +1 -1
- package/esm/sdk/models/create-subscription-request.js +2 -0
- package/esm/sdk/models/create-subscription-request.js.map +1 -1
- package/esm/sdk/models/delete-events-op.d.ts +14 -0
- package/esm/sdk/models/delete-events-op.d.ts.map +1 -0
- package/esm/sdk/models/delete-events-op.js +21 -0
- package/esm/sdk/models/delete-events-op.js.map +1 -0
- package/esm/sdk/models/delete-events-request.d.ts +38 -0
- package/esm/sdk/models/delete-events-request.d.ts.map +1 -0
- package/esm/sdk/models/delete-events-request.js +27 -0
- package/esm/sdk/models/delete-events-request.js.map +1 -0
- package/esm/sdk/models/delete-events-response.d.ts +11 -0
- package/esm/sdk/models/delete-events-response.d.ts.map +1 -0
- package/esm/sdk/models/delete-events-response.js +21 -0
- package/esm/sdk/models/delete-events-response.js.map +1 -0
- package/esm/sdk/models/get-commitment-op.d.ts +15 -0
- package/esm/sdk/models/get-commitment-op.d.ts.map +1 -0
- package/esm/sdk/models/get-commitment-op.js +12 -0
- package/esm/sdk/models/get-commitment-op.js.map +1 -0
- package/esm/sdk/models/get-usage-by-subscription-response.d.ts +5 -0
- package/esm/sdk/models/get-usage-by-subscription-response.d.ts.map +1 -1
- package/esm/sdk/models/get-usage-by-subscription-response.js +2 -0
- package/esm/sdk/models/get-usage-by-subscription-response.js.map +1 -1
- package/esm/sdk/models/index.d.ts +29 -0
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +29 -0
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/invoice-filter.d.ts +10 -0
- package/esm/sdk/models/invoice-filter.d.ts.map +1 -1
- package/esm/sdk/models/invoice-filter.js +4 -0
- package/esm/sdk/models/invoice-filter.js.map +1 -1
- package/esm/sdk/models/invoice-line-item-response.d.ts +4 -0
- package/esm/sdk/models/invoice-line-item-response.d.ts.map +1 -1
- package/esm/sdk/models/invoice-line-item-response.js +2 -0
- package/esm/sdk/models/invoice-line-item-response.js.map +1 -1
- package/esm/sdk/models/invoice-sync-settings.d.ts +2 -0
- package/esm/sdk/models/invoice-sync-settings.d.ts.map +1 -1
- package/esm/sdk/models/invoice-sync-settings.js +3 -0
- package/esm/sdk/models/invoice-sync-settings.js.map +1 -1
- package/esm/sdk/models/list-commitments-response.d.ts +13 -0
- package/esm/sdk/models/list-commitments-response.d.ts.map +1 -0
- package/esm/sdk/models/list-commitments-response.js +17 -0
- package/esm/sdk/models/list-commitments-response.js.map +1 -0
- package/esm/sdk/models/price-price-tier.d.ts +2 -0
- package/esm/sdk/models/price-price-tier.d.ts.map +1 -1
- package/esm/sdk/models/price-price-tier.js +3 -0
- package/esm/sdk/models/price-price-tier.js.map +1 -1
- package/esm/sdk/models/price-transform-quantity.d.ts +5 -0
- package/esm/sdk/models/price-transform-quantity.d.ts.map +1 -1
- package/esm/sdk/models/price-transform-quantity.js +15 -1
- package/esm/sdk/models/price-transform-quantity.js.map +1 -1
- package/esm/sdk/models/report-query-request.d.ts +2 -0
- package/esm/sdk/models/report-query-request.d.ts.map +1 -1
- package/esm/sdk/models/report-query-request.js +1 -0
- package/esm/sdk/models/report-query-request.js.map +1 -1
- package/esm/sdk/models/scheduled-task-entity-type.d.ts +1 -0
- package/esm/sdk/models/scheduled-task-entity-type.d.ts.map +1 -1
- package/esm/sdk/models/scheduled-task-entity-type.js +1 -0
- package/esm/sdk/models/scheduled-task-entity-type.js.map +1 -1
- package/esm/sdk/models/self-billing-charge-response.d.ts +45 -0
- package/esm/sdk/models/self-billing-charge-response.d.ts.map +1 -0
- package/esm/sdk/models/self-billing-charge-response.js +63 -0
- package/esm/sdk/models/self-billing-charge-response.js.map +1 -0
- package/esm/sdk/models/self-billing-plan-response.d.ts +14 -0
- package/esm/sdk/models/self-billing-plan-response.d.ts.map +1 -0
- package/esm/sdk/models/self-billing-plan-response.js +18 -0
- package/esm/sdk/models/self-billing-plan-response.js.map +1 -0
- package/esm/sdk/models/self-billing-summary-response.d.ts +2 -0
- package/esm/sdk/models/self-billing-summary-response.d.ts.map +1 -1
- package/esm/sdk/models/self-billing-summary-response.js +2 -0
- package/esm/sdk/models/self-billing-summary-response.js.map +1 -1
- package/esm/sdk/models/subscription-line-item-response.d.ts +5 -0
- package/esm/sdk/models/subscription-line-item-response.d.ts.map +1 -1
- package/esm/sdk/models/subscription-line-item-response.js +4 -0
- package/esm/sdk/models/subscription-line-item-response.js.map +1 -1
- package/esm/sdk/models/subscription-subscription-line-item.d.ts +5 -0
- package/esm/sdk/models/subscription-subscription-line-item.d.ts.map +1 -1
- package/esm/sdk/models/subscription-subscription-line-item.js +4 -0
- package/esm/sdk/models/subscription-subscription-line-item.js.map +1 -1
- package/esm/sdk/models/terminate-commitment-op.d.ts +21 -0
- package/esm/sdk/models/terminate-commitment-op.d.ts.map +1 -0
- package/esm/sdk/models/terminate-commitment-op.js +14 -0
- package/esm/sdk/models/terminate-commitment-op.js.map +1 -0
- package/esm/sdk/models/terminate-commitment-request.d.ts +14 -0
- package/esm/sdk/models/terminate-commitment-request.d.ts.map +1 -0
- package/esm/sdk/models/terminate-commitment-request.js +19 -0
- package/esm/sdk/models/terminate-commitment-request.js.map +1 -0
- package/esm/sdk/models/trigger-force-run-request.d.ts +5 -0
- package/esm/sdk/models/trigger-force-run-request.d.ts.map +1 -1
- package/esm/sdk/models/trigger-force-run-request.js +2 -0
- package/esm/sdk/models/trigger-force-run-request.js.map +1 -1
- package/esm/sdk/models/update-commitment-op.d.ts +21 -0
- package/esm/sdk/models/update-commitment-op.d.ts.map +1 -0
- package/esm/sdk/models/update-commitment-op.js +14 -0
- package/esm/sdk/models/update-commitment-op.js.map +1 -0
- package/esm/sdk/models/update-commitment-request.d.ts +22 -0
- package/esm/sdk/models/update-commitment-request.d.ts.map +1 -0
- package/esm/sdk/models/update-commitment-request.js +21 -0
- package/esm/sdk/models/update-commitment-request.js.map +1 -0
- package/esm/sdk/models/update-entitlement-request.d.ts +3 -0
- package/esm/sdk/models/update-entitlement-request.d.ts.map +1 -1
- package/esm/sdk/models/update-entitlement-request.js.map +1 -1
- package/esm/sdk/models/webhook-dto-commitment-webhook-payload.d.ts +13 -0
- package/esm/sdk/models/webhook-dto-commitment-webhook-payload.d.ts.map +1 -0
- package/esm/sdk/models/webhook-dto-commitment-webhook-payload.js +22 -0
- package/esm/sdk/models/webhook-dto-commitment-webhook-payload.js.map +1 -0
- package/esm/sdk/models/webhook-event-name.d.ts +3 -0
- package/esm/sdk/models/webhook-event-name.d.ts.map +1 -1
- package/esm/sdk/models/webhook-event-name.js +3 -0
- package/esm/sdk/models/webhook-event-name.js.map +1 -1
- package/esm/sdk/models/zoho-pay-pal-payment-method.d.ts +10 -0
- package/esm/sdk/models/zoho-pay-pal-payment-method.d.ts.map +1 -0
- package/esm/sdk/models/zoho-pay-pal-payment-method.js +11 -0
- package/esm/sdk/models/zoho-pay-pal-payment-method.js.map +1 -0
- package/esm/sdk/models/zoho-payment-gateway-settings.d.ts +14 -0
- package/esm/sdk/models/zoho-payment-gateway-settings.d.ts.map +1 -0
- package/esm/sdk/models/zoho-payment-gateway-settings.js +23 -0
- package/esm/sdk/models/zoho-payment-gateway-settings.js.map +1 -0
- package/esm/sdk/models/zoho-payment-gateway.d.ts +15 -0
- package/esm/sdk/models/zoho-payment-gateway.d.ts.map +1 -0
- package/esm/sdk/models/zoho-payment-gateway.js +16 -0
- package/esm/sdk/models/zoho-payment-gateway.js.map +1 -0
- 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 +1 -1
- package/esm/sdk/self-billing.js +1 -1
- package/esm/sdk/webhook-events.d.ts +21 -0
- package/esm/sdk/webhook-events.d.ts.map +1 -1
- package/esm/sdk/webhook-events.js +30 -0
- package/esm/sdk/webhook-events.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/commitments-create-commitment.ts +172 -0
- package/src/funcs/commitments-get-commitment.ts +181 -0
- package/src/funcs/commitments-preview-commitment.ts +172 -0
- package/src/funcs/commitments-query-commitment.ts +172 -0
- package/src/funcs/commitments-terminate-commitment.ts +187 -0
- package/src/funcs/commitments-update-commitment.ts +187 -0
- package/src/funcs/events-delete-events.ts +175 -0
- package/src/funcs/self-billing-get-self-billing-summary.ts +1 -1
- package/src/funcs/webhook-events-post-webhook-events-commitment-created.ts +144 -0
- package/src/funcs/webhook-events-post-webhook-events-commitment-terminated.ts +144 -0
- package/src/funcs/webhook-events-post-webhook-events-commitment-updated.ts +144 -0
- package/src/lib/config.ts +2 -2
- package/src/sdk/commitments.ts +121 -0
- package/src/sdk/events.ts +18 -0
- package/src/sdk/models/active-window.ts +54 -0
- package/src/sdk/models/add-addon-ref.ts +12 -0
- package/src/sdk/models/addon-price-override-ref.ts +45 -0
- package/src/sdk/models/commitment-collection-method.ts +26 -0
- package/src/sdk/models/commitment-early-termination.ts +22 -0
- package/src/sdk/models/commitment-filter.ts +127 -0
- package/src/sdk/models/commitment-measurement.ts +24 -0
- package/src/sdk/models/commitment-price-input.ts +64 -0
- package/src/sdk/models/commitment-response.ts +164 -0
- package/src/sdk/models/commitment-scope-input.ts +49 -0
- package/src/sdk/models/commitment-scope-type.ts +26 -0
- package/src/sdk/models/commitment-status.ts +25 -0
- package/src/sdk/models/commitment-usage-breakdown.ts +86 -0
- package/src/sdk/models/commitment-usage-value.ts +33 -0
- package/src/sdk/models/create-commitment-request.ts +134 -0
- package/src/sdk/models/create-entitlement-request.ts +3 -0
- package/src/sdk/models/create-price-tier.ts +9 -0
- package/src/sdk/models/create-subscription-request.ts +14 -0
- package/src/sdk/models/delete-events-op.ts +45 -0
- package/src/sdk/models/delete-events-request.ts +74 -0
- package/src/sdk/models/delete-events-response.ts +42 -0
- package/src/sdk/models/get-commitment-op.ts +33 -0
- package/src/sdk/models/get-usage-by-subscription-response.ts +11 -0
- package/src/sdk/models/index.ts +29 -0
- package/src/sdk/models/invoice-filter.ts +14 -0
- package/src/sdk/models/invoice-line-item-response.ts +6 -0
- package/src/sdk/models/invoice-sync-settings.ts +7 -0
- package/src/sdk/models/list-commitments-response.ts +41 -0
- package/src/sdk/models/price-price-tier.ts +7 -0
- package/src/sdk/models/price-transform-quantity.ts +33 -1
- package/src/sdk/models/report-query-request.ts +3 -0
- package/src/sdk/models/scheduled-task-entity-type.ts +1 -0
- package/src/sdk/models/self-billing-charge-response.ts +124 -0
- package/src/sdk/models/self-billing-plan-response.ts +41 -0
- package/src/sdk/models/self-billing-summary-response.ts +6 -0
- package/src/sdk/models/subscription-line-item-response.ts +9 -0
- package/src/sdk/models/subscription-subscription-line-item.ts +9 -0
- package/src/sdk/models/terminate-commitment-op.ts +46 -0
- package/src/sdk/models/terminate-commitment-request.ts +44 -0
- package/src/sdk/models/trigger-force-run-request.ts +7 -0
- package/src/sdk/models/update-commitment-op.ts +46 -0
- package/src/sdk/models/update-commitment-request.ts +48 -0
- package/src/sdk/models/update-entitlement-request.ts +3 -0
- package/src/sdk/models/webhook-dto-commitment-webhook-payload.ts +50 -0
- package/src/sdk/models/webhook-event-name.ts +3 -0
- package/src/sdk/models/zoho-pay-pal-payment-method.ts +19 -0
- package/src/sdk/models/zoho-payment-gateway-settings.ts +53 -0
- package/src/sdk/models/zoho-payment-gateway.ts +24 -0
- package/src/sdk/sdk.ts +6 -0
- package/src/sdk/self-billing.ts +1 -1
- package/src/sdk/webhook-events.ts +48 -0
|
@@ -0,0 +1,124 @@
|
|
|
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 { BillingModel, BillingModel$inboundSchema } from "./billing-model.js";
|
|
11
|
+
import {
|
|
12
|
+
BillingPeriod,
|
|
13
|
+
BillingPeriod$inboundSchema,
|
|
14
|
+
} from "./billing-period.js";
|
|
15
|
+
import { BillingTier, BillingTier$inboundSchema } from "./billing-tier.js";
|
|
16
|
+
import {
|
|
17
|
+
InvoiceCadence,
|
|
18
|
+
InvoiceCadence$inboundSchema,
|
|
19
|
+
} from "./invoice-cadence.js";
|
|
20
|
+
import {
|
|
21
|
+
PricePriceTier,
|
|
22
|
+
PricePriceTier$inboundSchema,
|
|
23
|
+
} from "./price-price-tier.js";
|
|
24
|
+
import {
|
|
25
|
+
PriceTransformQuantity,
|
|
26
|
+
PriceTransformQuantity$inboundSchema,
|
|
27
|
+
} from "./price-transform-quantity.js";
|
|
28
|
+
import { PriceType, PriceType$inboundSchema } from "./price-type.js";
|
|
29
|
+
import {
|
|
30
|
+
PriceUnitType,
|
|
31
|
+
PriceUnitType$inboundSchema,
|
|
32
|
+
} from "./price-unit-type.js";
|
|
33
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
34
|
+
import { WindowSize, WindowSize$inboundSchema } from "./window-size.js";
|
|
35
|
+
|
|
36
|
+
export type SelfBillingChargeResponse = {
|
|
37
|
+
/**
|
|
38
|
+
* Amount is a unit rate; tiered charges use tiers instead.
|
|
39
|
+
*/
|
|
40
|
+
amount?: string | undefined;
|
|
41
|
+
billingModel?: BillingModel | undefined;
|
|
42
|
+
billingPeriod?: BillingPeriod | undefined;
|
|
43
|
+
billingPeriodCount?: number | undefined;
|
|
44
|
+
bucketSize?: WindowSize | undefined;
|
|
45
|
+
currency?: string | undefined;
|
|
46
|
+
displayName?: string | undefined;
|
|
47
|
+
invoiceCadence?: InvoiceCadence | undefined;
|
|
48
|
+
lineItemId?: string | undefined;
|
|
49
|
+
meterDisplayName?: string | undefined;
|
|
50
|
+
meterId?: string | undefined;
|
|
51
|
+
priceId?: string | undefined;
|
|
52
|
+
priceUnit?: string | undefined;
|
|
53
|
+
priceUnitAmount?: string | undefined;
|
|
54
|
+
priceUnitTiers?: Array<PricePriceTier> | undefined;
|
|
55
|
+
priceUnitType?: PriceUnitType | undefined;
|
|
56
|
+
/**
|
|
57
|
+
* Quantity is the configured quantity; metered usage is returned in summary.usage.
|
|
58
|
+
*/
|
|
59
|
+
quantity?: string | undefined;
|
|
60
|
+
tierMode?: BillingTier | undefined;
|
|
61
|
+
tiers?: Array<PricePriceTier> | undefined;
|
|
62
|
+
transformQuantity?: PriceTransformQuantity | undefined;
|
|
63
|
+
type?: PriceType | undefined;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/** @internal */
|
|
67
|
+
export const SelfBillingChargeResponse$inboundSchema: z.ZodMiniType<
|
|
68
|
+
SelfBillingChargeResponse,
|
|
69
|
+
unknown
|
|
70
|
+
> = z.pipe(
|
|
71
|
+
z.object({
|
|
72
|
+
amount: types.optional(types.string()),
|
|
73
|
+
billing_model: types.optional(BillingModel$inboundSchema),
|
|
74
|
+
billing_period: types.optional(BillingPeriod$inboundSchema),
|
|
75
|
+
billing_period_count: types.optional(types.number()),
|
|
76
|
+
bucket_size: types.optional(WindowSize$inboundSchema),
|
|
77
|
+
currency: types.optional(types.string()),
|
|
78
|
+
display_name: types.optional(types.string()),
|
|
79
|
+
invoice_cadence: types.optional(InvoiceCadence$inboundSchema),
|
|
80
|
+
line_item_id: types.optional(types.string()),
|
|
81
|
+
meter_display_name: types.optional(types.string()),
|
|
82
|
+
meter_id: types.optional(types.string()),
|
|
83
|
+
price_id: types.optional(types.string()),
|
|
84
|
+
price_unit: types.optional(types.string()),
|
|
85
|
+
price_unit_amount: types.optional(types.string()),
|
|
86
|
+
price_unit_tiers: types.optional(z.array(PricePriceTier$inboundSchema)),
|
|
87
|
+
price_unit_type: types.optional(PriceUnitType$inboundSchema),
|
|
88
|
+
quantity: types.optional(types.string()),
|
|
89
|
+
tier_mode: types.optional(BillingTier$inboundSchema),
|
|
90
|
+
tiers: types.optional(z.array(PricePriceTier$inboundSchema)),
|
|
91
|
+
transform_quantity: types.optional(PriceTransformQuantity$inboundSchema),
|
|
92
|
+
type: types.optional(PriceType$inboundSchema),
|
|
93
|
+
}),
|
|
94
|
+
z.transform((v) => {
|
|
95
|
+
return remap$(v, {
|
|
96
|
+
"billing_model": "billingModel",
|
|
97
|
+
"billing_period": "billingPeriod",
|
|
98
|
+
"billing_period_count": "billingPeriodCount",
|
|
99
|
+
"bucket_size": "bucketSize",
|
|
100
|
+
"display_name": "displayName",
|
|
101
|
+
"invoice_cadence": "invoiceCadence",
|
|
102
|
+
"line_item_id": "lineItemId",
|
|
103
|
+
"meter_display_name": "meterDisplayName",
|
|
104
|
+
"meter_id": "meterId",
|
|
105
|
+
"price_id": "priceId",
|
|
106
|
+
"price_unit": "priceUnit",
|
|
107
|
+
"price_unit_amount": "priceUnitAmount",
|
|
108
|
+
"price_unit_tiers": "priceUnitTiers",
|
|
109
|
+
"price_unit_type": "priceUnitType",
|
|
110
|
+
"tier_mode": "tierMode",
|
|
111
|
+
"transform_quantity": "transformQuantity",
|
|
112
|
+
});
|
|
113
|
+
}),
|
|
114
|
+
);
|
|
115
|
+
|
|
116
|
+
export function selfBillingChargeResponseFromJSON(
|
|
117
|
+
jsonString: string,
|
|
118
|
+
): SafeParseResult<SelfBillingChargeResponse, SDKValidationError> {
|
|
119
|
+
return safeParse(
|
|
120
|
+
jsonString,
|
|
121
|
+
(x) => SelfBillingChargeResponse$inboundSchema.parse(JSON.parse(x)),
|
|
122
|
+
`Failed to parse 'SelfBillingChargeResponse' from JSON`,
|
|
123
|
+
);
|
|
124
|
+
}
|
|
@@ -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 { 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
|
+
SelfBillingChargeResponse,
|
|
12
|
+
SelfBillingChargeResponse$inboundSchema,
|
|
13
|
+
} from "./self-billing-charge-response.js";
|
|
14
|
+
|
|
15
|
+
export type SelfBillingPlanResponse = {
|
|
16
|
+
charges?: Array<SelfBillingChargeResponse> | undefined;
|
|
17
|
+
description?: string | undefined;
|
|
18
|
+
id?: string | undefined;
|
|
19
|
+
name?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const SelfBillingPlanResponse$inboundSchema: z.ZodMiniType<
|
|
24
|
+
SelfBillingPlanResponse,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
charges: types.optional(z.array(SelfBillingChargeResponse$inboundSchema)),
|
|
28
|
+
description: types.optional(types.string()),
|
|
29
|
+
id: types.optional(types.string()),
|
|
30
|
+
name: types.optional(types.string()),
|
|
31
|
+
});
|
|
32
|
+
|
|
33
|
+
export function selfBillingPlanResponseFromJSON(
|
|
34
|
+
jsonString: string,
|
|
35
|
+
): SafeParseResult<SelfBillingPlanResponse, SDKValidationError> {
|
|
36
|
+
return safeParse(
|
|
37
|
+
jsonString,
|
|
38
|
+
(x) => SelfBillingPlanResponse$inboundSchema.parse(JSON.parse(x)),
|
|
39
|
+
`Failed to parse 'SelfBillingPlanResponse' from JSON`,
|
|
40
|
+
);
|
|
41
|
+
}
|
|
@@ -16,6 +16,10 @@ import {
|
|
|
16
16
|
SelfBillingInvoice,
|
|
17
17
|
SelfBillingInvoice$inboundSchema,
|
|
18
18
|
} from "./self-billing-invoice.js";
|
|
19
|
+
import {
|
|
20
|
+
SelfBillingPlanResponse,
|
|
21
|
+
SelfBillingPlanResponse$inboundSchema,
|
|
22
|
+
} from "./self-billing-plan-response.js";
|
|
19
23
|
import {
|
|
20
24
|
SubscriptionStatus,
|
|
21
25
|
SubscriptionStatus$inboundSchema,
|
|
@@ -27,6 +31,7 @@ import {
|
|
|
27
31
|
|
|
28
32
|
export type SelfBillingSummaryResponse = {
|
|
29
33
|
invoices?: Array<SelfBillingInvoice> | undefined;
|
|
34
|
+
plan?: SelfBillingPlanResponse | undefined;
|
|
30
35
|
status?: TenantInternalStatus | undefined;
|
|
31
36
|
subscriptionStatus?: SubscriptionStatus | undefined;
|
|
32
37
|
trialEndsAt?: Date | undefined;
|
|
@@ -40,6 +45,7 @@ export const SelfBillingSummaryResponse$inboundSchema: z.ZodMiniType<
|
|
|
40
45
|
> = z.pipe(
|
|
41
46
|
z.object({
|
|
42
47
|
invoices: types.optional(z.array(SelfBillingInvoice$inboundSchema)),
|
|
48
|
+
plan: types.optional(SelfBillingPlanResponse$inboundSchema),
|
|
43
49
|
status: types.optional(TenantInternalStatus$inboundSchema),
|
|
44
50
|
subscription_status: types.optional(SubscriptionStatus$inboundSchema),
|
|
45
51
|
trial_ends_at: types.optional(types.date()),
|
|
@@ -70,6 +70,10 @@ export type SubscriptionLineItemResponse = {
|
|
|
70
70
|
meterDisplayName?: string | undefined;
|
|
71
71
|
meterId?: string | undefined;
|
|
72
72
|
planDisplayName?: string | undefined;
|
|
73
|
+
/**
|
|
74
|
+
* Version lineage, set by the service when a line item is replaced by a new version
|
|
75
|
+
*/
|
|
76
|
+
predecessorLineItemId?: string | undefined;
|
|
73
77
|
price?: PriceResponse | undefined;
|
|
74
78
|
priceId?: string | undefined;
|
|
75
79
|
priceType?: PriceType | undefined;
|
|
@@ -80,6 +84,7 @@ export type SubscriptionLineItemResponse = {
|
|
|
80
84
|
status?: Status | undefined;
|
|
81
85
|
subscriptionId?: string | undefined;
|
|
82
86
|
subscriptionPhaseId?: string | undefined;
|
|
87
|
+
successorLineItemId?: string | undefined;
|
|
83
88
|
tenantId?: string | undefined;
|
|
84
89
|
updatedAt?: Date | undefined;
|
|
85
90
|
updatedBy?: string | undefined;
|
|
@@ -120,6 +125,7 @@ export const SubscriptionLineItemResponse$inboundSchema: z.ZodMiniType<
|
|
|
120
125
|
meter_display_name: types.optional(types.string()),
|
|
121
126
|
meter_id: types.optional(types.string()),
|
|
122
127
|
plan_display_name: types.optional(types.string()),
|
|
128
|
+
predecessor_line_item_id: types.optional(types.string()),
|
|
123
129
|
price: types.optional(PriceResponse$inboundSchema),
|
|
124
130
|
price_id: types.optional(types.string()),
|
|
125
131
|
price_type: types.optional(PriceType$inboundSchema),
|
|
@@ -130,6 +136,7 @@ export const SubscriptionLineItemResponse$inboundSchema: z.ZodMiniType<
|
|
|
130
136
|
status: types.optional(Status$inboundSchema),
|
|
131
137
|
subscription_id: types.optional(types.string()),
|
|
132
138
|
subscription_phase_id: types.optional(types.string()),
|
|
139
|
+
successor_line_item_id: types.optional(types.string()),
|
|
133
140
|
tenant_id: types.optional(types.string()),
|
|
134
141
|
updated_at: types.optional(types.date()),
|
|
135
142
|
updated_by: types.optional(types.string()),
|
|
@@ -159,6 +166,7 @@ export const SubscriptionLineItemResponse$inboundSchema: z.ZodMiniType<
|
|
|
159
166
|
"meter_display_name": "meterDisplayName",
|
|
160
167
|
"meter_id": "meterId",
|
|
161
168
|
"plan_display_name": "planDisplayName",
|
|
169
|
+
"predecessor_line_item_id": "predecessorLineItemId",
|
|
162
170
|
"price_id": "priceId",
|
|
163
171
|
"price_type": "priceType",
|
|
164
172
|
"price_unit": "priceUnit",
|
|
@@ -166,6 +174,7 @@ export const SubscriptionLineItemResponse$inboundSchema: z.ZodMiniType<
|
|
|
166
174
|
"start_date": "startDate",
|
|
167
175
|
"subscription_id": "subscriptionId",
|
|
168
176
|
"subscription_phase_id": "subscriptionPhaseId",
|
|
177
|
+
"successor_line_item_id": "successorLineItemId",
|
|
169
178
|
"tenant_id": "tenantId",
|
|
170
179
|
"updated_at": "updatedAt",
|
|
171
180
|
"updated_by": "updatedBy",
|
|
@@ -67,6 +67,10 @@ export type SubscriptionSubscriptionLineItem = {
|
|
|
67
67
|
meterDisplayName?: string | undefined;
|
|
68
68
|
meterId?: string | undefined;
|
|
69
69
|
planDisplayName?: string | undefined;
|
|
70
|
+
/**
|
|
71
|
+
* Version lineage, set by the service when a line item is replaced by a new version
|
|
72
|
+
*/
|
|
73
|
+
predecessorLineItemId?: string | undefined;
|
|
70
74
|
price?: PricePrice | undefined;
|
|
71
75
|
priceId?: string | undefined;
|
|
72
76
|
priceType?: PriceType | undefined;
|
|
@@ -77,6 +81,7 @@ export type SubscriptionSubscriptionLineItem = {
|
|
|
77
81
|
status?: Status | undefined;
|
|
78
82
|
subscriptionId?: string | undefined;
|
|
79
83
|
subscriptionPhaseId?: string | undefined;
|
|
84
|
+
successorLineItemId?: string | undefined;
|
|
80
85
|
tenantId?: string | undefined;
|
|
81
86
|
updatedAt?: Date | undefined;
|
|
82
87
|
updatedBy?: string | undefined;
|
|
@@ -117,6 +122,7 @@ export const SubscriptionSubscriptionLineItem$inboundSchema: z.ZodMiniType<
|
|
|
117
122
|
meter_display_name: types.optional(types.string()),
|
|
118
123
|
meter_id: types.optional(types.string()),
|
|
119
124
|
plan_display_name: types.optional(types.string()),
|
|
125
|
+
predecessor_line_item_id: types.optional(types.string()),
|
|
120
126
|
price: types.optional(PricePrice$inboundSchema),
|
|
121
127
|
price_id: types.optional(types.string()),
|
|
122
128
|
price_type: types.optional(PriceType$inboundSchema),
|
|
@@ -127,6 +133,7 @@ export const SubscriptionSubscriptionLineItem$inboundSchema: z.ZodMiniType<
|
|
|
127
133
|
status: types.optional(Status$inboundSchema),
|
|
128
134
|
subscription_id: types.optional(types.string()),
|
|
129
135
|
subscription_phase_id: types.optional(types.string()),
|
|
136
|
+
successor_line_item_id: types.optional(types.string()),
|
|
130
137
|
tenant_id: types.optional(types.string()),
|
|
131
138
|
updated_at: types.optional(types.date()),
|
|
132
139
|
updated_by: types.optional(types.string()),
|
|
@@ -156,6 +163,7 @@ export const SubscriptionSubscriptionLineItem$inboundSchema: z.ZodMiniType<
|
|
|
156
163
|
"meter_display_name": "meterDisplayName",
|
|
157
164
|
"meter_id": "meterId",
|
|
158
165
|
"plan_display_name": "planDisplayName",
|
|
166
|
+
"predecessor_line_item_id": "predecessorLineItemId",
|
|
159
167
|
"price_id": "priceId",
|
|
160
168
|
"price_type": "priceType",
|
|
161
169
|
"price_unit": "priceUnit",
|
|
@@ -163,6 +171,7 @@ export const SubscriptionSubscriptionLineItem$inboundSchema: z.ZodMiniType<
|
|
|
163
171
|
"start_date": "startDate",
|
|
164
172
|
"subscription_id": "subscriptionId",
|
|
165
173
|
"subscription_phase_id": "subscriptionPhaseId",
|
|
174
|
+
"successor_line_item_id": "successorLineItemId",
|
|
166
175
|
"tenant_id": "tenantId",
|
|
167
176
|
"updated_at": "updatedAt",
|
|
168
177
|
"updated_by": "updatedBy",
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
TerminateCommitmentRequest,
|
|
8
|
+
TerminateCommitmentRequest$Outbound,
|
|
9
|
+
TerminateCommitmentRequest$outboundSchema,
|
|
10
|
+
} from "./terminate-commitment-request.js";
|
|
11
|
+
|
|
12
|
+
export type TerminateCommitmentRequestRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* Commitment ID
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* Termination request
|
|
19
|
+
*/
|
|
20
|
+
body?: TerminateCommitmentRequest | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type TerminateCommitmentRequestRequest$Outbound = {
|
|
25
|
+
id: string;
|
|
26
|
+
body?: TerminateCommitmentRequest$Outbound | undefined;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const TerminateCommitmentRequestRequest$outboundSchema: z.ZodMiniType<
|
|
31
|
+
TerminateCommitmentRequestRequest$Outbound,
|
|
32
|
+
TerminateCommitmentRequestRequest
|
|
33
|
+
> = z.object({
|
|
34
|
+
id: z.string(),
|
|
35
|
+
body: z.optional(TerminateCommitmentRequest$outboundSchema),
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export function terminateCommitmentRequestRequestToJSON(
|
|
39
|
+
terminateCommitmentRequestRequest: TerminateCommitmentRequestRequest,
|
|
40
|
+
): string {
|
|
41
|
+
return JSON.stringify(
|
|
42
|
+
TerminateCommitmentRequestRequest$outboundSchema.parse(
|
|
43
|
+
terminateCommitmentRequestRequest,
|
|
44
|
+
),
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -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 { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
|
|
8
|
+
export type TerminateCommitmentRequest = {
|
|
9
|
+
cancellationFee?: string | undefined;
|
|
10
|
+
effectiveAt?: Date | undefined;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/** @internal */
|
|
14
|
+
export type TerminateCommitmentRequest$Outbound = {
|
|
15
|
+
cancellation_fee?: string | undefined;
|
|
16
|
+
effective_at?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const TerminateCommitmentRequest$outboundSchema: z.ZodMiniType<
|
|
21
|
+
TerminateCommitmentRequest$Outbound,
|
|
22
|
+
TerminateCommitmentRequest
|
|
23
|
+
> = z.pipe(
|
|
24
|
+
z.object({
|
|
25
|
+
cancellationFee: z.optional(z.string()),
|
|
26
|
+
effectiveAt: z.optional(
|
|
27
|
+
z.pipe(z.date(), z.transform(v => v.toISOString())),
|
|
28
|
+
),
|
|
29
|
+
}),
|
|
30
|
+
z.transform((v) => {
|
|
31
|
+
return remap$(v, {
|
|
32
|
+
cancellationFee: "cancellation_fee",
|
|
33
|
+
effectiveAt: "effective_at",
|
|
34
|
+
});
|
|
35
|
+
}),
|
|
36
|
+
);
|
|
37
|
+
|
|
38
|
+
export function terminateCommitmentRequestToJSON(
|
|
39
|
+
terminateCommitmentRequest: TerminateCommitmentRequest,
|
|
40
|
+
): string {
|
|
41
|
+
return JSON.stringify(
|
|
42
|
+
TerminateCommitmentRequest$outboundSchema.parse(terminateCommitmentRequest),
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -6,12 +6,17 @@ import * as z from "zod/v4-mini";
|
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
7
|
|
|
8
8
|
export type TriggerForceRunRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* Limits a wallet_ledger export to these customers; empty means every customer.
|
|
11
|
+
*/
|
|
12
|
+
customerExternalIds: Array<string>;
|
|
9
13
|
endTime?: Date | undefined;
|
|
10
14
|
startTime?: Date | undefined;
|
|
11
15
|
};
|
|
12
16
|
|
|
13
17
|
/** @internal */
|
|
14
18
|
export type TriggerForceRunRequest$Outbound = {
|
|
19
|
+
customer_external_ids: Array<string>;
|
|
15
20
|
end_time?: string | undefined;
|
|
16
21
|
start_time?: string | undefined;
|
|
17
22
|
};
|
|
@@ -22,11 +27,13 @@ export const TriggerForceRunRequest$outboundSchema: z.ZodMiniType<
|
|
|
22
27
|
TriggerForceRunRequest
|
|
23
28
|
> = z.pipe(
|
|
24
29
|
z.object({
|
|
30
|
+
customerExternalIds: z.array(z.string()),
|
|
25
31
|
endTime: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
26
32
|
startTime: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
27
33
|
}),
|
|
28
34
|
z.transform((v) => {
|
|
29
35
|
return remap$(v, {
|
|
36
|
+
customerExternalIds: "customer_external_ids",
|
|
30
37
|
endTime: "end_time",
|
|
31
38
|
startTime: "start_time",
|
|
32
39
|
});
|
|
@@ -0,0 +1,46 @@
|
|
|
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
|
+
UpdateCommitmentRequest,
|
|
8
|
+
UpdateCommitmentRequest$Outbound,
|
|
9
|
+
UpdateCommitmentRequest$outboundSchema,
|
|
10
|
+
} from "./update-commitment-request.js";
|
|
11
|
+
|
|
12
|
+
export type UpdateCommitmentRequestRequest = {
|
|
13
|
+
/**
|
|
14
|
+
* Commitment ID
|
|
15
|
+
*/
|
|
16
|
+
id: string;
|
|
17
|
+
/**
|
|
18
|
+
* Commitment update
|
|
19
|
+
*/
|
|
20
|
+
body: UpdateCommitmentRequest;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export type UpdateCommitmentRequestRequest$Outbound = {
|
|
25
|
+
id: string;
|
|
26
|
+
body: UpdateCommitmentRequest$Outbound;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const UpdateCommitmentRequestRequest$outboundSchema: z.ZodMiniType<
|
|
31
|
+
UpdateCommitmentRequestRequest$Outbound,
|
|
32
|
+
UpdateCommitmentRequestRequest
|
|
33
|
+
> = z.object({
|
|
34
|
+
id: z.string(),
|
|
35
|
+
body: UpdateCommitmentRequest$outboundSchema,
|
|
36
|
+
});
|
|
37
|
+
|
|
38
|
+
export function updateCommitmentRequestRequestToJSON(
|
|
39
|
+
updateCommitmentRequestRequest: UpdateCommitmentRequestRequest,
|
|
40
|
+
): string {
|
|
41
|
+
return JSON.stringify(
|
|
42
|
+
UpdateCommitmentRequestRequest$outboundSchema.parse(
|
|
43
|
+
updateCommitmentRequestRequest,
|
|
44
|
+
),
|
|
45
|
+
);
|
|
46
|
+
}
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
|
|
8
|
+
export type UpdateCommitmentRequest = {
|
|
9
|
+
invoiceDescription?: string | undefined;
|
|
10
|
+
invoiceLabel?: string | undefined;
|
|
11
|
+
metadata?: { [k: string]: string } | undefined;
|
|
12
|
+
name?: string | undefined;
|
|
13
|
+
};
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export type UpdateCommitmentRequest$Outbound = {
|
|
17
|
+
invoice_description?: string | undefined;
|
|
18
|
+
invoice_label?: string | undefined;
|
|
19
|
+
metadata?: { [k: string]: string } | undefined;
|
|
20
|
+
name?: string | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const UpdateCommitmentRequest$outboundSchema: z.ZodMiniType<
|
|
25
|
+
UpdateCommitmentRequest$Outbound,
|
|
26
|
+
UpdateCommitmentRequest
|
|
27
|
+
> = z.pipe(
|
|
28
|
+
z.object({
|
|
29
|
+
invoiceDescription: z.optional(z.string()),
|
|
30
|
+
invoiceLabel: z.optional(z.string()),
|
|
31
|
+
metadata: z.optional(z.record(z.string(), z.string())),
|
|
32
|
+
name: z.optional(z.string()),
|
|
33
|
+
}),
|
|
34
|
+
z.transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
invoiceDescription: "invoice_description",
|
|
37
|
+
invoiceLabel: "invoice_label",
|
|
38
|
+
});
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
export function updateCommitmentRequestToJSON(
|
|
43
|
+
updateCommitmentRequest: UpdateCommitmentRequest,
|
|
44
|
+
): string {
|
|
45
|
+
return JSON.stringify(
|
|
46
|
+
UpdateCommitmentRequest$outboundSchema.parse(updateCommitmentRequest),
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -37,6 +37,9 @@ export type UpdateEntitlementRequest = {
|
|
|
37
37
|
isEnabled?: boolean | undefined;
|
|
38
38
|
isSoftLimit?: boolean | undefined;
|
|
39
39
|
staticValue?: string | undefined;
|
|
40
|
+
/**
|
|
41
|
+
* Deprecated: use grant_quota.
|
|
42
|
+
*/
|
|
40
43
|
usageLimit?: number | undefined;
|
|
41
44
|
usageResetPeriod?: EntitlementUsageResetPeriod | undefined;
|
|
42
45
|
};
|
|
@@ -0,0 +1,50 @@
|
|
|
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
|
+
CommitmentResponse,
|
|
12
|
+
CommitmentResponse$inboundSchema,
|
|
13
|
+
} from "./commitment-response.js";
|
|
14
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
15
|
+
import {
|
|
16
|
+
WebhookEventName,
|
|
17
|
+
WebhookEventName$inboundSchema,
|
|
18
|
+
} from "./webhook-event-name.js";
|
|
19
|
+
|
|
20
|
+
export type WebhookDtoCommitmentWebhookPayload = {
|
|
21
|
+
commitment?: CommitmentResponse | undefined;
|
|
22
|
+
eventType?: WebhookEventName | undefined;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const WebhookDtoCommitmentWebhookPayload$inboundSchema: z.ZodMiniType<
|
|
27
|
+
WebhookDtoCommitmentWebhookPayload,
|
|
28
|
+
unknown
|
|
29
|
+
> = z.pipe(
|
|
30
|
+
z.object({
|
|
31
|
+
commitment: types.optional(CommitmentResponse$inboundSchema),
|
|
32
|
+
event_type: types.optional(WebhookEventName$inboundSchema),
|
|
33
|
+
}),
|
|
34
|
+
z.transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
"event_type": "eventType",
|
|
37
|
+
});
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
export function webhookDtoCommitmentWebhookPayloadFromJSON(
|
|
42
|
+
jsonString: string,
|
|
43
|
+
): SafeParseResult<WebhookDtoCommitmentWebhookPayload, SDKValidationError> {
|
|
44
|
+
return safeParse(
|
|
45
|
+
jsonString,
|
|
46
|
+
(x) =>
|
|
47
|
+
WebhookDtoCommitmentWebhookPayload$inboundSchema.parse(JSON.parse(x)),
|
|
48
|
+
`Failed to parse 'WebhookDtoCommitmentWebhookPayload' from JSON`,
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -25,6 +25,9 @@ export const WebhookEventName = {
|
|
|
25
25
|
EntitlementCreated: "entitlement.created",
|
|
26
26
|
EntitlementUpdated: "entitlement.updated",
|
|
27
27
|
EntitlementDeleted: "entitlement.deleted",
|
|
28
|
+
CommitmentCreated: "commitment.created",
|
|
29
|
+
CommitmentUpdated: "commitment.updated",
|
|
30
|
+
CommitmentTerminated: "commitment.terminated",
|
|
28
31
|
WalletCreated: "wallet.created",
|
|
29
32
|
WalletUpdated: "wallet.updated",
|
|
30
33
|
WalletTerminated: "wallet.terminated",
|
|
@@ -0,0 +1,19 @@
|
|
|
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 ZohoPayPalPaymentMethod = {
|
|
10
|
+
Standard: "standard",
|
|
11
|
+
Adaptive: "adaptive",
|
|
12
|
+
} as const;
|
|
13
|
+
export type ZohoPayPalPaymentMethod = OpenEnum<typeof ZohoPayPalPaymentMethod>;
|
|
14
|
+
|
|
15
|
+
/** @internal */
|
|
16
|
+
export const ZohoPayPalPaymentMethod$inboundSchema: z.ZodMiniType<
|
|
17
|
+
ZohoPayPalPaymentMethod,
|
|
18
|
+
unknown
|
|
19
|
+
> = openEnums.inboundSchema(ZohoPayPalPaymentMethod);
|
|
@@ -0,0 +1,53 @@
|
|
|
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
|
+
import {
|
|
12
|
+
ZohoPayPalPaymentMethod,
|
|
13
|
+
ZohoPayPalPaymentMethod$inboundSchema,
|
|
14
|
+
} from "./zoho-pay-pal-payment-method.js";
|
|
15
|
+
import {
|
|
16
|
+
ZohoPaymentGateway,
|
|
17
|
+
ZohoPaymentGateway$inboundSchema,
|
|
18
|
+
} from "./zoho-payment-gateway.js";
|
|
19
|
+
|
|
20
|
+
export type ZohoPaymentGatewaySettings = {
|
|
21
|
+
enabled?: boolean | undefined;
|
|
22
|
+
gateways?: Array<ZohoPaymentGateway> | undefined;
|
|
23
|
+
paypalPaymentMethod?: ZohoPayPalPaymentMethod | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const ZohoPaymentGatewaySettings$inboundSchema: z.ZodMiniType<
|
|
28
|
+
ZohoPaymentGatewaySettings,
|
|
29
|
+
unknown
|
|
30
|
+
> = z.pipe(
|
|
31
|
+
z.object({
|
|
32
|
+
enabled: types.optional(types.boolean()),
|
|
33
|
+
gateways: types.optional(z.array(ZohoPaymentGateway$inboundSchema)),
|
|
34
|
+
paypal_payment_method: types.optional(
|
|
35
|
+
ZohoPayPalPaymentMethod$inboundSchema,
|
|
36
|
+
),
|
|
37
|
+
}),
|
|
38
|
+
z.transform((v) => {
|
|
39
|
+
return remap$(v, {
|
|
40
|
+
"paypal_payment_method": "paypalPaymentMethod",
|
|
41
|
+
});
|
|
42
|
+
}),
|
|
43
|
+
);
|
|
44
|
+
|
|
45
|
+
export function zohoPaymentGatewaySettingsFromJSON(
|
|
46
|
+
jsonString: string,
|
|
47
|
+
): SafeParseResult<ZohoPaymentGatewaySettings, SDKValidationError> {
|
|
48
|
+
return safeParse(
|
|
49
|
+
jsonString,
|
|
50
|
+
(x) => ZohoPaymentGatewaySettings$inboundSchema.parse(JSON.parse(x)),
|
|
51
|
+
`Failed to parse 'ZohoPaymentGatewaySettings' from JSON`,
|
|
52
|
+
);
|
|
53
|
+
}
|
|
@@ -0,0 +1,24 @@
|
|
|
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 ZohoPaymentGateway = {
|
|
10
|
+
Paypal: "paypal",
|
|
11
|
+
Stripe: "stripe",
|
|
12
|
+
AuthorizeNet: "authorize_net",
|
|
13
|
+
PayflowPro: "payflow_pro",
|
|
14
|
+
Twocheckout: "2checkout",
|
|
15
|
+
Braintree: "braintree",
|
|
16
|
+
Razorpay: "razorpay",
|
|
17
|
+
} as const;
|
|
18
|
+
export type ZohoPaymentGateway = OpenEnum<typeof ZohoPaymentGateway>;
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const ZohoPaymentGateway$inboundSchema: z.ZodMiniType<
|
|
22
|
+
ZohoPaymentGateway,
|
|
23
|
+
unknown
|
|
24
|
+
> = openEnums.inboundSchema(ZohoPaymentGateway);
|