@flexprice/sdk 2.1.10 → 2.1.17
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/changed-subscription.md +7 -5
- package/docs/sdk/models/create-invoice-line-item-request.md +25 -22
- package/docs/sdk/models/create-invoice-request.md +1 -0
- package/docs/sdk/models/create-user-response.md +1 -0
- package/docs/sdk/models/entity-integration-mapping-response.md +1 -0
- package/docs/sdk/models/entity-sync-config.md +16 -0
- package/docs/sdk/models/error-code.md +17 -0
- package/docs/sdk/models/error-response.md +5 -6
- package/docs/sdk/models/errors-error-response.md +5 -6
- package/docs/sdk/models/execute-subscription-modify-request-request.md +1 -1
- package/docs/sdk/models/execute-subscription-modify-request.md +1 -0
- package/docs/sdk/models/get-entity-integration-mappings-request.md +19 -0
- package/docs/sdk/models/integration-config-entry.md +17 -0
- package/docs/sdk/models/integration-config-response.md +15 -0
- package/docs/sdk/models/invoice-billing-reason.md +1 -1
- package/docs/sdk/models/invoice-filter.md +2 -0
- package/docs/sdk/models/invoice-line-item-response.md +38 -36
- package/docs/sdk/models/invoice-response.md +1 -0
- package/docs/sdk/models/invoice-sync-settings.md +15 -0
- package/docs/sdk/models/list-entity-integration-mappings-response.md +16 -0
- package/docs/sdk/models/payment-gateway-type.md +1 -1
- package/docs/sdk/models/preview-subscription-modify-request.md +1 -1
- package/docs/sdk/models/price-price.md +43 -42
- package/docs/sdk/models/price-response.md +48 -47
- package/docs/sdk/models/s3-export-config.md +20 -0
- package/docs/sdk/models/secret-provider.md +1 -1
- package/docs/sdk/models/sub-modify-trial-end-request.md +18 -0
- package/docs/sdk/models/subscription-modify-type.md +2 -2
- package/docs/sdk/models/subscription-response-v2.md +2 -0
- package/docs/sdk/models/subscription-response.md +1 -0
- package/docs/sdk/models/sync-config.md +23 -0
- package/docs/sdk/models/trial-end-action.md +15 -0
- package/docs/sdk/models/update-user-request.md +15 -0
- package/docs/sdk/models/update-user-response.md +20 -0
- package/docs/sdk/models/user-response.md +1 -0
- package/docs/sdk/models/window-size.md +2 -2
- package/docs/sdks/integrations/README.md +143 -0
- package/docs/sdks/invoices/README.md +0 -76
- package/docs/sdks/subscriptions/README.md +2 -2
- package/docs/sdks/users/README.md +72 -0
- package/esm/funcs/{invoices-get-meter-usage-preview-invoice.d.ts → integrations-get-entity-integration-mappings.d.ts} +4 -4
- package/esm/funcs/integrations-get-entity-integration-mappings.d.ts.map +1 -0
- package/esm/funcs/{invoices-get-meter-usage-preview-invoice.js → integrations-get-entity-integration-mappings.js} +22 -14
- package/esm/funcs/integrations-get-entity-integration-mappings.js.map +1 -0
- package/esm/funcs/{meter-usage-get-meter-usage-analytics.d.ts → integrations-get-integration-config.d.ts} +4 -4
- package/esm/funcs/integrations-get-integration-config.d.ts.map +1 -0
- package/esm/funcs/{meter-usage-get-meter-usage-analytics.js → integrations-get-integration-config.js} +10 -21
- package/esm/funcs/integrations-get-integration-config.js.map +1 -0
- package/esm/funcs/{meter-usage-query-meter-usage.d.ts → users-update-user.d.ts} +4 -4
- package/esm/funcs/users-update-user.d.ts.map +1 -0
- package/esm/funcs/{meter-usage-query-meter-usage.js → users-update-user.js} +9 -9
- package/esm/funcs/users-update-user.js.map +1 -0
- package/esm/lib/config.d.ts +3 -3
- package/esm/lib/config.js +3 -3
- package/esm/sdk/integrations.d.ts +14 -0
- package/esm/sdk/integrations.d.ts.map +1 -1
- package/esm/sdk/integrations.js +20 -0
- package/esm/sdk/integrations.js.map +1 -1
- package/esm/sdk/invoices.d.ts +0 -7
- package/esm/sdk/invoices.d.ts.map +1 -1
- package/esm/sdk/invoices.js +0 -10
- package/esm/sdk/invoices.js.map +1 -1
- package/esm/sdk/models/changed-subscription.d.ts +2 -0
- package/esm/sdk/models/changed-subscription.d.ts.map +1 -1
- package/esm/sdk/models/changed-subscription.js +10 -2
- package/esm/sdk/models/changed-subscription.js.map +1 -1
- package/esm/sdk/models/create-invoice-line-item-request.d.ts +18 -0
- package/esm/sdk/models/create-invoice-line-item-request.d.ts.map +1 -1
- package/esm/sdk/models/create-invoice-line-item-request.js +6 -0
- package/esm/sdk/models/create-invoice-line-item-request.js.map +1 -1
- package/esm/sdk/models/create-invoice-request.d.ts +8 -0
- package/esm/sdk/models/create-invoice-request.d.ts.map +1 -1
- package/esm/sdk/models/create-invoice-request.js +2 -0
- package/esm/sdk/models/create-invoice-request.js.map +1 -1
- package/esm/sdk/models/create-user-response.d.ts +3 -0
- package/esm/sdk/models/create-user-response.d.ts.map +1 -1
- package/esm/sdk/models/create-user-response.js +1 -0
- package/esm/sdk/models/create-user-response.js.map +1 -1
- package/esm/sdk/models/customer-lookup-result.d.ts +1 -1
- package/esm/sdk/models/customer-lookup-result.d.ts.map +1 -1
- package/esm/sdk/models/customer-lookup-result.js +1 -1
- package/esm/sdk/models/customer-lookup-result.js.map +1 -1
- package/esm/sdk/models/entity-integration-mapping-response.d.ts +3 -0
- package/esm/sdk/models/entity-integration-mapping-response.d.ts.map +1 -1
- package/esm/sdk/models/entity-integration-mapping-response.js +1 -0
- package/esm/sdk/models/entity-integration-mapping-response.js.map +1 -1
- package/esm/sdk/models/entity-sync-config.d.ts +17 -0
- package/esm/sdk/models/entity-sync-config.d.ts.map +1 -0
- package/esm/sdk/models/entity-sync-config.js +15 -0
- package/esm/sdk/models/entity-sync-config.js.map +1 -0
- package/esm/sdk/models/error-code.d.ts +20 -0
- package/esm/sdk/models/error-code.d.ts.map +1 -0
- package/esm/sdk/models/error-code.js +21 -0
- package/esm/sdk/models/error-code.js.map +1 -0
- package/esm/sdk/models/error-response.d.ts +13 -0
- package/esm/sdk/models/error-response.d.ts.map +1 -0
- package/esm/sdk/models/error-response.js +22 -0
- package/esm/sdk/models/error-response.js.map +1 -0
- package/esm/sdk/models/errors-error-response.d.ts +3 -42
- package/esm/sdk/models/errors-error-response.d.ts.map +1 -1
- package/esm/sdk/models/errors-error-response.js +2 -42
- package/esm/sdk/models/errors-error-response.js.map +1 -1
- package/esm/sdk/models/execute-subscription-modify-request.d.ts +3 -0
- package/esm/sdk/models/execute-subscription-modify-request.d.ts.map +1 -1
- package/esm/sdk/models/execute-subscription-modify-request.js +3 -0
- package/esm/sdk/models/execute-subscription-modify-request.js.map +1 -1
- package/esm/sdk/models/failure-point.d.ts +1 -1
- package/esm/sdk/models/failure-point.d.ts.map +1 -1
- package/esm/sdk/models/failure-point.js +1 -1
- package/esm/sdk/models/failure-point.js.map +1 -1
- package/esm/sdk/models/get-entity-integration-mappings-op.d.ts +20 -0
- package/esm/sdk/models/get-entity-integration-mappings-op.d.ts.map +1 -0
- package/esm/sdk/models/get-entity-integration-mappings-op.js +19 -0
- package/esm/sdk/models/get-entity-integration-mappings-op.js.map +1 -0
- package/esm/sdk/models/index.d.ts +14 -5
- package/esm/sdk/models/index.d.ts.map +1 -1
- package/esm/sdk/models/index.js +14 -5
- package/esm/sdk/models/index.js.map +1 -1
- package/esm/sdk/models/integration-config-entry.d.ts +14 -0
- package/esm/sdk/models/integration-config-entry.d.ts.map +1 -0
- package/esm/sdk/models/integration-config-entry.js +24 -0
- package/esm/sdk/models/integration-config-entry.js.map +1 -0
- package/esm/sdk/models/integration-config-response.d.ts +11 -0
- package/esm/sdk/models/integration-config-response.d.ts.map +1 -0
- package/esm/sdk/models/integration-config-response.js +15 -0
- package/esm/sdk/models/integration-config-response.js.map +1 -0
- package/esm/sdk/models/invoice-billing-reason.d.ts +1 -0
- package/esm/sdk/models/invoice-billing-reason.d.ts.map +1 -1
- package/esm/sdk/models/invoice-billing-reason.js +1 -0
- package/esm/sdk/models/invoice-billing-reason.js.map +1 -1
- package/esm/sdk/models/invoice-filter.d.ts +11 -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 +11 -0
- package/esm/sdk/models/invoice-line-item-response.d.ts.map +1 -1
- package/esm/sdk/models/invoice-line-item-response.js +4 -0
- package/esm/sdk/models/invoice-line-item-response.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/invoice-sync-settings.d.ts +11 -0
- package/esm/sdk/models/invoice-sync-settings.d.ts.map +1 -0
- package/esm/sdk/models/invoice-sync-settings.js +20 -0
- package/esm/sdk/models/invoice-sync-settings.js.map +1 -0
- package/esm/sdk/models/list-entity-integration-mappings-response.d.ts +13 -0
- package/esm/sdk/models/list-entity-integration-mappings-response.d.ts.map +1 -0
- package/esm/sdk/models/list-entity-integration-mappings-response.js +17 -0
- package/esm/sdk/models/list-entity-integration-mappings-response.js.map +1 -0
- package/esm/sdk/models/meter-matching-result.d.ts +1 -1
- package/esm/sdk/models/meter-matching-result.d.ts.map +1 -1
- package/esm/sdk/models/meter-matching-result.js +1 -1
- package/esm/sdk/models/meter-matching-result.js.map +1 -1
- package/esm/sdk/models/payment-gateway-type.d.ts +1 -0
- package/esm/sdk/models/payment-gateway-type.d.ts.map +1 -1
- package/esm/sdk/models/payment-gateway-type.js +1 -0
- package/esm/sdk/models/payment-gateway-type.js.map +1 -1
- package/esm/sdk/models/price-lookup-result.d.ts +1 -1
- package/esm/sdk/models/price-lookup-result.d.ts.map +1 -1
- package/esm/sdk/models/price-lookup-result.js +1 -1
- package/esm/sdk/models/price-lookup-result.js.map +1 -1
- package/esm/sdk/models/price-price.d.ts +9 -0
- package/esm/sdk/models/price-price.d.ts.map +1 -1
- package/esm/sdk/models/price-price.js +1 -0
- package/esm/sdk/models/price-price.js.map +1 -1
- package/esm/sdk/models/price-response.d.ts +9 -0
- package/esm/sdk/models/price-response.d.ts.map +1 -1
- package/esm/sdk/models/price-response.js +1 -0
- package/esm/sdk/models/price-response.js.map +1 -1
- package/esm/sdk/models/s3-export-config.d.ts +29 -0
- package/esm/sdk/models/s3-export-config.d.ts.map +1 -0
- package/esm/sdk/models/s3-export-config.js +27 -0
- package/esm/sdk/models/s3-export-config.js.map +1 -0
- package/esm/sdk/models/secret-provider.d.ts +1 -0
- package/esm/sdk/models/secret-provider.d.ts.map +1 -1
- package/esm/sdk/models/secret-provider.js +1 -0
- package/esm/sdk/models/secret-provider.js.map +1 -1
- package/esm/sdk/models/sub-modify-trial-end-request.d.ts +18 -0
- package/esm/sdk/models/sub-modify-trial-end-request.d.ts.map +1 -0
- package/esm/sdk/models/sub-modify-trial-end-request.js +19 -0
- package/esm/sdk/models/sub-modify-trial-end-request.js.map +1 -0
- package/esm/sdk/models/subscription-line-item-lookup-result.d.ts +1 -1
- package/esm/sdk/models/subscription-line-item-lookup-result.d.ts.map +1 -1
- package/esm/sdk/models/subscription-line-item-lookup-result.js +1 -1
- package/esm/sdk/models/subscription-line-item-lookup-result.js.map +1 -1
- package/esm/sdk/models/subscription-modify-type.d.ts +1 -0
- package/esm/sdk/models/subscription-modify-type.d.ts.map +1 -1
- package/esm/sdk/models/subscription-modify-type.js +1 -0
- package/esm/sdk/models/subscription-modify-type.js.map +1 -1
- package/esm/sdk/models/subscription-response-v2.d.ts +16 -0
- package/esm/sdk/models/subscription-response-v2.d.ts.map +1 -1
- package/esm/sdk/models/subscription-response-v2.js +4 -0
- package/esm/sdk/models/subscription-response-v2.js.map +1 -1
- package/esm/sdk/models/subscription-response.d.ts +8 -0
- package/esm/sdk/models/subscription-response.d.ts.map +1 -1
- package/esm/sdk/models/subscription-response.js +2 -0
- package/esm/sdk/models/subscription-response.js.map +1 -1
- package/esm/sdk/models/sync-config.d.ts +21 -0
- package/esm/sdk/models/sync-config.d.ts.map +1 -0
- package/esm/sdk/models/sync-config.js +31 -0
- package/esm/sdk/models/sync-config.js.map +1 -0
- package/esm/sdk/models/trial-end-action.d.ts +10 -0
- package/esm/sdk/models/trial-end-action.d.ts.map +1 -0
- package/esm/sdk/models/trial-end-action.js +11 -0
- package/esm/sdk/models/trial-end-action.js.map +1 -0
- package/esm/sdk/models/update-user-request.d.ts +16 -0
- package/esm/sdk/models/update-user-request.d.ts.map +1 -0
- package/esm/sdk/models/update-user-request.js +12 -0
- package/esm/sdk/models/update-user-request.js.map +1 -0
- package/esm/sdk/models/update-user-response.d.ts +22 -0
- package/esm/sdk/models/update-user-response.d.ts.map +1 -0
- package/esm/sdk/models/update-user-response.js +21 -0
- package/esm/sdk/models/update-user-response.js.map +1 -0
- package/esm/sdk/models/user-response.d.ts +3 -0
- package/esm/sdk/models/user-response.d.ts.map +1 -1
- package/esm/sdk/models/user-response.js +1 -0
- package/esm/sdk/models/user-response.js.map +1 -1
- package/esm/sdk/models/window-size.d.ts +1 -1
- package/esm/sdk/models/window-size.js +1 -1
- package/esm/sdk/models/window-size.js.map +1 -1
- package/esm/sdk/sdk.d.ts +0 -3
- package/esm/sdk/sdk.d.ts.map +1 -1
- package/esm/sdk/sdk.js +0 -5
- package/esm/sdk/sdk.js.map +1 -1
- package/esm/sdk/users.d.ts +7 -0
- package/esm/sdk/users.d.ts.map +1 -1
- package/esm/sdk/users.js +10 -0
- package/esm/sdk/users.js.map +1 -1
- package/esm/types/async.d.ts.map +1 -1
- package/esm/types/async.js +6 -6
- package/esm/types/async.js.map +1 -1
- package/esm/types/primitives.d.ts +0 -2
- package/esm/types/primitives.d.ts.map +1 -1
- package/esm/types/primitives.js +0 -22
- package/esm/types/primitives.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/{meter-usage-get-meter-usage-analytics.ts → integrations-get-entity-integration-mappings.ts} +32 -18
- package/src/funcs/{invoices-get-meter-usage-preview-invoice.ts → integrations-get-integration-config.ts} +10 -30
- package/src/funcs/{meter-usage-query-meter-usage.ts → users-update-user.ts} +13 -13
- package/src/lib/config.ts +3 -3
- package/src/sdk/integrations.ts +36 -0
- package/src/sdk/invoices.ts +0 -18
- package/src/sdk/models/changed-subscription.ts +18 -5
- package/src/sdk/models/create-invoice-line-item-request.ts +24 -0
- package/src/sdk/models/create-invoice-request.ts +10 -0
- package/src/sdk/models/create-user-response.ts +2 -0
- package/src/sdk/models/customer-lookup-result.ts +1 -1
- package/src/sdk/models/entity-integration-mapping-response.ts +2 -0
- package/src/sdk/models/entity-sync-config.ts +39 -0
- package/src/sdk/models/error-code.ts +27 -0
- package/src/sdk/models/error-response.ts +44 -0
- package/src/sdk/models/errors-error-response.ts +4 -87
- package/src/sdk/models/execute-subscription-modify-request.ts +9 -0
- package/src/sdk/models/failure-point.ts +1 -1
- package/src/sdk/models/get-entity-integration-mappings-op.ts +50 -0
- package/src/sdk/models/index.ts +14 -5
- package/src/sdk/models/integration-config-entry.ts +49 -0
- package/src/sdk/models/integration-config-response.ts +35 -0
- package/src/sdk/models/invoice-billing-reason.ts +1 -0
- package/src/sdk/models/invoice-filter.ts +17 -0
- package/src/sdk/models/invoice-line-item-response.ts +15 -0
- package/src/sdk/models/invoice-response.ts +6 -0
- package/src/sdk/models/invoice-sync-settings.ts +43 -0
- package/src/sdk/models/list-entity-integration-mappings-response.ts +44 -0
- package/src/sdk/models/meter-matching-result.ts +1 -1
- package/src/sdk/models/payment-gateway-type.ts +1 -0
- package/src/sdk/models/price-lookup-result.ts +1 -1
- package/src/sdk/models/price-price.ts +10 -0
- package/src/sdk/models/price-response.ts +10 -0
- package/src/sdk/models/s3-export-config.ts +70 -0
- package/src/sdk/models/secret-provider.ts +1 -0
- package/src/sdk/models/sub-modify-trial-end-request.ts +50 -0
- package/src/sdk/models/subscription-line-item-lookup-result.ts +1 -1
- package/src/sdk/models/subscription-modify-type.ts +1 -0
- package/src/sdk/models/subscription-response-v2.ts +20 -0
- package/src/sdk/models/subscription-response.ts +10 -0
- package/src/sdk/models/sync-config.ts +65 -0
- package/src/sdk/models/trial-end-action.ts +17 -0
- package/src/sdk/models/update-user-request.ts +30 -0
- package/src/sdk/models/update-user-response.ts +49 -0
- package/src/sdk/models/user-response.ts +2 -0
- package/src/sdk/models/window-size.ts +1 -1
- package/src/sdk/sdk.ts +0 -6
- package/src/sdk/users.ts +18 -0
- package/src/types/async.ts +8 -7
- package/src/types/primitives.ts +0 -26
- package/docs/sdk/models/code.md +0 -17
- package/docs/sdk/models/details.md +0 -14
- package/docs/sdk/models/meter-usage-analytics-request.md +0 -30
- package/docs/sdk/models/meter-usage-analytics-response.md +0 -30
- package/docs/sdk/models/meter-usage-point.md +0 -21
- package/docs/sdk/models/meter-usage-query-request.md +0 -28
- package/docs/sdk/models/meter-usage-query-response.md +0 -30
- package/docs/sdks/meterusage/README.md +0 -182
- package/esm/funcs/invoices-get-meter-usage-preview-invoice.d.ts.map +0 -1
- package/esm/funcs/invoices-get-meter-usage-preview-invoice.js.map +0 -1
- package/esm/funcs/meter-usage-get-meter-usage-analytics.d.ts.map +0 -1
- package/esm/funcs/meter-usage-get-meter-usage-analytics.js.map +0 -1
- package/esm/funcs/meter-usage-query-meter-usage.d.ts.map +0 -1
- package/esm/funcs/meter-usage-query-meter-usage.js.map +0 -1
- package/esm/sdk/meter-usage.d.ts +0 -19
- package/esm/sdk/meter-usage.d.ts.map +0 -1
- package/esm/sdk/meter-usage.js +0 -28
- package/esm/sdk/meter-usage.js.map +0 -1
- package/esm/sdk/models/meter-usage-analytics-request.d.ts +0 -26
- package/esm/sdk/models/meter-usage-analytics-request.d.ts.map +0 -1
- package/esm/sdk/models/meter-usage-analytics-request.js +0 -31
- package/esm/sdk/models/meter-usage-analytics-request.js.map +0 -1
- package/esm/sdk/models/meter-usage-analytics-response.d.ts +0 -11
- package/esm/sdk/models/meter-usage-analytics-response.d.ts.map +0 -1
- package/esm/sdk/models/meter-usage-analytics-response.js +0 -15
- package/esm/sdk/models/meter-usage-analytics-response.js.map +0 -1
- package/esm/sdk/models/meter-usage-point.d.ts +0 -12
- package/esm/sdk/models/meter-usage-point.d.ts.map +0 -1
- package/esm/sdk/models/meter-usage-point.js +0 -21
- package/esm/sdk/models/meter-usage-point.js.map +0 -1
- package/esm/sdk/models/meter-usage-query-request.d.ts +0 -26
- package/esm/sdk/models/meter-usage-query-request.d.ts.map +0 -1
- package/esm/sdk/models/meter-usage-query-request.js +0 -31
- package/esm/sdk/models/meter-usage-query-request.js.map +0 -1
- package/esm/sdk/models/meter-usage-query-response.d.ts +0 -16
- package/esm/sdk/models/meter-usage-query-response.d.ts.map +0 -1
- package/esm/sdk/models/meter-usage-query-response.js +0 -28
- package/esm/sdk/models/meter-usage-query-response.js.map +0 -1
- package/src/sdk/meter-usage.ts +0 -45
- package/src/sdk/models/meter-usage-analytics-request.ts +0 -69
- package/src/sdk/models/meter-usage-analytics-response.ts +0 -35
- package/src/sdk/models/meter-usage-point.ts +0 -43
- package/src/sdk/models/meter-usage-query-request.ts +0 -69
- package/src/sdk/models/meter-usage-query-response.ts +0 -58
|
@@ -0,0 +1,49 @@
|
|
|
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
|
+
SecretProvider,
|
|
13
|
+
SecretProvider$inboundSchema,
|
|
14
|
+
} from "./secret-provider.js";
|
|
15
|
+
import { SyncConfig, SyncConfig$inboundSchema } from "./sync-config.js";
|
|
16
|
+
|
|
17
|
+
export type IntegrationConfigEntry = {
|
|
18
|
+
baseConfig?: SyncConfig | undefined;
|
|
19
|
+
currentConfig?: SyncConfig | undefined;
|
|
20
|
+
provider?: SecretProvider | undefined;
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
/** @internal */
|
|
24
|
+
export const IntegrationConfigEntry$inboundSchema: z.ZodMiniType<
|
|
25
|
+
IntegrationConfigEntry,
|
|
26
|
+
unknown
|
|
27
|
+
> = z.pipe(
|
|
28
|
+
z.object({
|
|
29
|
+
base_config: types.optional(SyncConfig$inboundSchema),
|
|
30
|
+
current_config: types.optional(SyncConfig$inboundSchema),
|
|
31
|
+
provider: types.optional(SecretProvider$inboundSchema),
|
|
32
|
+
}),
|
|
33
|
+
z.transform((v) => {
|
|
34
|
+
return remap$(v, {
|
|
35
|
+
"base_config": "baseConfig",
|
|
36
|
+
"current_config": "currentConfig",
|
|
37
|
+
});
|
|
38
|
+
}),
|
|
39
|
+
);
|
|
40
|
+
|
|
41
|
+
export function integrationConfigEntryFromJSON(
|
|
42
|
+
jsonString: string,
|
|
43
|
+
): SafeParseResult<IntegrationConfigEntry, SDKValidationError> {
|
|
44
|
+
return safeParse(
|
|
45
|
+
jsonString,
|
|
46
|
+
(x) => IntegrationConfigEntry$inboundSchema.parse(JSON.parse(x)),
|
|
47
|
+
`Failed to parse 'IntegrationConfigEntry' from JSON`,
|
|
48
|
+
);
|
|
49
|
+
}
|
|
@@ -0,0 +1,35 @@
|
|
|
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 {
|
|
10
|
+
IntegrationConfigEntry,
|
|
11
|
+
IntegrationConfigEntry$inboundSchema,
|
|
12
|
+
} from "./integration-config-entry.js";
|
|
13
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
14
|
+
|
|
15
|
+
export type IntegrationConfigResponse = {
|
|
16
|
+
integrations?: Array<IntegrationConfigEntry> | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const IntegrationConfigResponse$inboundSchema: z.ZodMiniType<
|
|
21
|
+
IntegrationConfigResponse,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.object({
|
|
24
|
+
integrations: types.optional(z.array(IntegrationConfigEntry$inboundSchema)),
|
|
25
|
+
});
|
|
26
|
+
|
|
27
|
+
export function integrationConfigResponseFromJSON(
|
|
28
|
+
jsonString: string,
|
|
29
|
+
): SafeParseResult<IntegrationConfigResponse, SDKValidationError> {
|
|
30
|
+
return safeParse(
|
|
31
|
+
jsonString,
|
|
32
|
+
(x) => IntegrationConfigResponse$inboundSchema.parse(JSON.parse(x)),
|
|
33
|
+
`Failed to parse 'IntegrationConfigResponse' from JSON`,
|
|
34
|
+
);
|
|
35
|
+
}
|
|
@@ -14,6 +14,7 @@ export const InvoiceBillingReason = {
|
|
|
14
14
|
Proration: "PRORATION",
|
|
15
15
|
Manual: "MANUAL",
|
|
16
16
|
AutoInvoiceThreshold: "AUTO_INVOICE_THRESHOLD",
|
|
17
|
+
WalletAutoTopup: "WALLET_AUTO_TOPUP",
|
|
17
18
|
} as const;
|
|
18
19
|
export type InvoiceBillingReason = ClosedEnum<typeof InvoiceBillingReason>;
|
|
19
20
|
|
|
@@ -10,6 +10,10 @@ import {
|
|
|
10
10
|
FilterCondition$Outbound,
|
|
11
11
|
FilterCondition$outboundSchema,
|
|
12
12
|
} from "./filter-condition.js";
|
|
13
|
+
import {
|
|
14
|
+
InvoiceBillingReason,
|
|
15
|
+
InvoiceBillingReason$outboundSchema,
|
|
16
|
+
} from "./invoice-billing-reason.js";
|
|
13
17
|
import {
|
|
14
18
|
InvoiceStatus,
|
|
15
19
|
InvoiceStatus$outboundSchema,
|
|
@@ -47,6 +51,14 @@ export type InvoiceFilter = {
|
|
|
47
51
|
* Useful for finding invoices that still have significant unpaid amounts
|
|
48
52
|
*/
|
|
49
53
|
amountRemainingGt?: number | undefined;
|
|
54
|
+
billingReason?: InvoiceBillingReason | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* currency filters invoices by their currency (ISO 4217 code, e.g. "usd", "eur").
|
|
57
|
+
*
|
|
58
|
+
* @remarks
|
|
59
|
+
* Matches on the invoices.currency column exactly.
|
|
60
|
+
*/
|
|
61
|
+
currency?: string | undefined;
|
|
50
62
|
/**
|
|
51
63
|
* customer_id filters invoices for a specific customer using FlexPrice's internal customer ID
|
|
52
64
|
*
|
|
@@ -134,6 +146,8 @@ export const InvoiceFilterOrder$outboundSchema: z.ZodMiniEnum<
|
|
|
134
146
|
export type InvoiceFilter$Outbound = {
|
|
135
147
|
amount_due_gt?: number | undefined;
|
|
136
148
|
amount_remaining_gt?: number | undefined;
|
|
149
|
+
billing_reason?: string | undefined;
|
|
150
|
+
currency?: string | undefined;
|
|
137
151
|
customer_id?: string | undefined;
|
|
138
152
|
end_time?: string | undefined;
|
|
139
153
|
expand?: string | undefined;
|
|
@@ -166,6 +180,8 @@ export const InvoiceFilter$outboundSchema: z.ZodMiniType<
|
|
|
166
180
|
z.object({
|
|
167
181
|
amountDueGt: z.optional(z.number()),
|
|
168
182
|
amountRemainingGt: z.optional(z.number()),
|
|
183
|
+
billingReason: z.optional(InvoiceBillingReason$outboundSchema),
|
|
184
|
+
currency: z.optional(z.string()),
|
|
169
185
|
customerId: z.optional(z.string()),
|
|
170
186
|
endTime: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
171
187
|
expand: z.optional(z.string()),
|
|
@@ -193,6 +209,7 @@ export const InvoiceFilter$outboundSchema: z.ZodMiniType<
|
|
|
193
209
|
return remap$(v, {
|
|
194
210
|
amountDueGt: "amount_due_gt",
|
|
195
211
|
amountRemainingGt: "amount_remaining_gt",
|
|
212
|
+
billingReason: "billing_reason",
|
|
196
213
|
customerId: "customer_id",
|
|
197
214
|
endTime: "end_time",
|
|
198
215
|
externalCustomerId: "external_customer_id",
|
|
@@ -23,6 +23,13 @@ import {
|
|
|
23
23
|
} from "./usage-breakdown-item.js";
|
|
24
24
|
|
|
25
25
|
export type InvoiceLineItemResponse = {
|
|
26
|
+
/**
|
|
27
|
+
* adjusted_entitlement_quantity is the entitlement-covered portion deducted from raw usage.
|
|
28
|
+
*
|
|
29
|
+
* @remarks
|
|
30
|
+
* Nil when no entitlement was applied. Raw usage = Quantity + AdjustedEntitlementQuantity.
|
|
31
|
+
*/
|
|
32
|
+
adjustedEntitlementQuantity?: string | undefined;
|
|
26
33
|
amount?: string | undefined;
|
|
27
34
|
commitmentInfo?: CommitmentInfo | undefined;
|
|
28
35
|
createdAt?: Date | undefined;
|
|
@@ -61,6 +68,10 @@ export type InvoiceLineItemResponse = {
|
|
|
61
68
|
quantity?: string | undefined;
|
|
62
69
|
status?: Status | undefined;
|
|
63
70
|
subscriptionId?: string | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* sub_line_item_id links this invoice line item to the subscription_line_item that generated it.
|
|
73
|
+
*/
|
|
74
|
+
subscriptionLineItemId?: string | undefined;
|
|
64
75
|
tenantId?: string | undefined;
|
|
65
76
|
updatedAt?: Date | undefined;
|
|
66
77
|
updatedBy?: string | undefined;
|
|
@@ -80,6 +91,7 @@ export const InvoiceLineItemResponse$inboundSchema: z.ZodMiniType<
|
|
|
80
91
|
unknown
|
|
81
92
|
> = z.pipe(
|
|
82
93
|
z.object({
|
|
94
|
+
adjusted_entitlement_quantity: types.optional(types.string()),
|
|
83
95
|
amount: types.optional(types.string()),
|
|
84
96
|
commitment_info: types.optional(CommitmentInfo$inboundSchema),
|
|
85
97
|
created_at: types.optional(types.date()),
|
|
@@ -109,6 +121,7 @@ export const InvoiceLineItemResponse$inboundSchema: z.ZodMiniType<
|
|
|
109
121
|
quantity: types.optional(types.string()),
|
|
110
122
|
status: types.optional(Status$inboundSchema),
|
|
111
123
|
subscription_id: types.optional(types.string()),
|
|
124
|
+
subscription_line_item_id: types.optional(types.string()),
|
|
112
125
|
tenant_id: types.optional(types.string()),
|
|
113
126
|
updated_at: types.optional(types.date()),
|
|
114
127
|
updated_by: types.optional(types.string()),
|
|
@@ -117,6 +130,7 @@ export const InvoiceLineItemResponse$inboundSchema: z.ZodMiniType<
|
|
|
117
130
|
}),
|
|
118
131
|
z.transform((v) => {
|
|
119
132
|
return remap$(v, {
|
|
133
|
+
"adjusted_entitlement_quantity": "adjustedEntitlementQuantity",
|
|
120
134
|
"commitment_info": "commitmentInfo",
|
|
121
135
|
"created_at": "createdAt",
|
|
122
136
|
"created_by": "createdBy",
|
|
@@ -140,6 +154,7 @@ export const InvoiceLineItemResponse$inboundSchema: z.ZodMiniType<
|
|
|
140
154
|
"price_unit_amount": "priceUnitAmount",
|
|
141
155
|
"price_unit_id": "priceUnitId",
|
|
142
156
|
"subscription_id": "subscriptionId",
|
|
157
|
+
"subscription_line_item_id": "subscriptionLineItemId",
|
|
143
158
|
"tenant_id": "tenantId",
|
|
144
159
|
"updated_at": "updatedAt",
|
|
145
160
|
"updated_by": "updatedBy",
|
|
@@ -123,6 +123,10 @@ export type InvoiceResponse = {
|
|
|
123
123
|
invoicePdfUrl?: string | undefined;
|
|
124
124
|
invoiceStatus?: InvoiceStatus | undefined;
|
|
125
125
|
invoiceType?: InvoiceType | undefined;
|
|
126
|
+
/**
|
|
127
|
+
* issue_date is the user-facing date of the invoice. Defaults to created_at if not set.
|
|
128
|
+
*/
|
|
129
|
+
issueDate?: Date | undefined;
|
|
126
130
|
/**
|
|
127
131
|
* last_computed_at is the timestamp when this invoice was last computed by ComputeInvoice
|
|
128
132
|
*/
|
|
@@ -244,6 +248,7 @@ export const InvoiceResponse$inboundSchema: z.ZodMiniType<
|
|
|
244
248
|
invoice_pdf_url: types.optional(types.string()),
|
|
245
249
|
invoice_status: types.optional(InvoiceStatus$inboundSchema),
|
|
246
250
|
invoice_type: types.optional(InvoiceType$inboundSchema),
|
|
251
|
+
issue_date: types.optional(types.date()),
|
|
247
252
|
last_computed_at: types.optional(types.date()),
|
|
248
253
|
line_items: types.optional(z.array(InvoiceLineItemResponse$inboundSchema)),
|
|
249
254
|
metadata: types.optional(z.record(z.string(), types.string())),
|
|
@@ -293,6 +298,7 @@ export const InvoiceResponse$inboundSchema: z.ZodMiniType<
|
|
|
293
298
|
"invoice_pdf_url": "invoicePdfUrl",
|
|
294
299
|
"invoice_status": "invoiceStatus",
|
|
295
300
|
"invoice_type": "invoiceType",
|
|
301
|
+
"issue_date": "issueDate",
|
|
296
302
|
"last_computed_at": "lastComputedAt",
|
|
297
303
|
"line_items": "lineItems",
|
|
298
304
|
"overpaid_amount": "overpaidAmount",
|
|
@@ -0,0 +1,43 @@
|
|
|
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
|
+
BillingPeriod,
|
|
12
|
+
BillingPeriod$inboundSchema,
|
|
13
|
+
} from "./billing-period.js";
|
|
14
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
15
|
+
|
|
16
|
+
export type InvoiceSyncSettings = {
|
|
17
|
+
normalizeFixedTo?: BillingPeriod | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export const InvoiceSyncSettings$inboundSchema: z.ZodMiniType<
|
|
22
|
+
InvoiceSyncSettings,
|
|
23
|
+
unknown
|
|
24
|
+
> = z.pipe(
|
|
25
|
+
z.object({
|
|
26
|
+
normalize_fixed_to: types.optional(BillingPeriod$inboundSchema),
|
|
27
|
+
}),
|
|
28
|
+
z.transform((v) => {
|
|
29
|
+
return remap$(v, {
|
|
30
|
+
"normalize_fixed_to": "normalizeFixedTo",
|
|
31
|
+
});
|
|
32
|
+
}),
|
|
33
|
+
);
|
|
34
|
+
|
|
35
|
+
export function invoiceSyncSettingsFromJSON(
|
|
36
|
+
jsonString: string,
|
|
37
|
+
): SafeParseResult<InvoiceSyncSettings, SDKValidationError> {
|
|
38
|
+
return safeParse(
|
|
39
|
+
jsonString,
|
|
40
|
+
(x) => InvoiceSyncSettings$inboundSchema.parse(JSON.parse(x)),
|
|
41
|
+
`Failed to parse 'InvoiceSyncSettings' from JSON`,
|
|
42
|
+
);
|
|
43
|
+
}
|
|
@@ -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 { safeParse } from "../../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
|
+
import * as types from "../../types/primitives.js";
|
|
9
|
+
import {
|
|
10
|
+
EntityIntegrationMappingResponse,
|
|
11
|
+
EntityIntegrationMappingResponse$inboundSchema,
|
|
12
|
+
} from "./entity-integration-mapping-response.js";
|
|
13
|
+
import {
|
|
14
|
+
PaginationResponse,
|
|
15
|
+
PaginationResponse$inboundSchema,
|
|
16
|
+
} from "./pagination-response.js";
|
|
17
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
18
|
+
|
|
19
|
+
export type ListEntityIntegrationMappingsResponse = {
|
|
20
|
+
items?: Array<EntityIntegrationMappingResponse> | undefined;
|
|
21
|
+
pagination?: PaginationResponse | undefined;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
/** @internal */
|
|
25
|
+
export const ListEntityIntegrationMappingsResponse$inboundSchema: z.ZodMiniType<
|
|
26
|
+
ListEntityIntegrationMappingsResponse,
|
|
27
|
+
unknown
|
|
28
|
+
> = z.object({
|
|
29
|
+
items: types.optional(
|
|
30
|
+
z.array(EntityIntegrationMappingResponse$inboundSchema),
|
|
31
|
+
),
|
|
32
|
+
pagination: types.optional(PaginationResponse$inboundSchema),
|
|
33
|
+
});
|
|
34
|
+
|
|
35
|
+
export function listEntityIntegrationMappingsResponseFromJSON(
|
|
36
|
+
jsonString: string,
|
|
37
|
+
): SafeParseResult<ListEntityIntegrationMappingsResponse, SDKValidationError> {
|
|
38
|
+
return safeParse(
|
|
39
|
+
jsonString,
|
|
40
|
+
(x) =>
|
|
41
|
+
ListEntityIntegrationMappingsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
42
|
+
`Failed to parse 'ListEntityIntegrationMappingsResponse' from JSON`,
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
ErrorResponse,
|
|
16
16
|
ErrorResponse$inboundSchema,
|
|
17
|
-
} from "./
|
|
17
|
+
} from "./error-response.js";
|
|
18
18
|
import { MatchedMeter, MatchedMeter$inboundSchema } from "./matched-meter.js";
|
|
19
19
|
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
20
20
|
|
|
@@ -14,7 +14,7 @@ import {
|
|
|
14
14
|
import {
|
|
15
15
|
ErrorResponse,
|
|
16
16
|
ErrorResponse$inboundSchema,
|
|
17
|
-
} from "./
|
|
17
|
+
} from "./error-response.js";
|
|
18
18
|
import { MatchedPrice, MatchedPrice$inboundSchema } from "./matched-price.js";
|
|
19
19
|
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
20
20
|
|
|
@@ -141,6 +141,15 @@ export type PricePrice = {
|
|
|
141
141
|
*/
|
|
142
142
|
priceUnitTiers?: Array<PricePriceTier> | undefined;
|
|
143
143
|
priceUnitType?: PriceUnitType | undefined;
|
|
144
|
+
/**
|
|
145
|
+
* Sequence is the monotonic stamp bumped on every state change that
|
|
146
|
+
*
|
|
147
|
+
* @remarks
|
|
148
|
+
* subscription line items need to react to. Read by the plan-price sync;
|
|
149
|
+
* set by the database (DEFAULT nextval) on create and by the price
|
|
150
|
+
* repository on termination / compatibility-affecting edits.
|
|
151
|
+
*/
|
|
152
|
+
sequence?: number | undefined;
|
|
144
153
|
/**
|
|
145
154
|
* StartDate is the start date of the price
|
|
146
155
|
*/
|
|
@@ -196,6 +205,7 @@ export const PricePrice$inboundSchema: z.ZodMiniType<PricePrice, unknown> = z
|
|
|
196
205
|
price_unit_id: types.optional(types.string()),
|
|
197
206
|
price_unit_tiers: types.optional(z.array(PricePriceTier$inboundSchema)),
|
|
198
207
|
price_unit_type: types.optional(PriceUnitType$inboundSchema),
|
|
208
|
+
sequence: types.optional(types.number()),
|
|
199
209
|
start_date: types.optional(types.date()),
|
|
200
210
|
status: types.optional(Status$inboundSchema),
|
|
201
211
|
tenant_id: types.optional(types.string()),
|
|
@@ -163,6 +163,15 @@ export type PriceResponse = {
|
|
|
163
163
|
priceUnitTiers?: Array<PricePriceTier> | undefined;
|
|
164
164
|
priceUnitType?: PriceUnitType | undefined;
|
|
165
165
|
pricingUnit?: PriceUnitResponse | undefined;
|
|
166
|
+
/**
|
|
167
|
+
* Sequence is the monotonic stamp bumped on every state change that
|
|
168
|
+
*
|
|
169
|
+
* @remarks
|
|
170
|
+
* subscription line items need to react to. Read by the plan-price sync;
|
|
171
|
+
* set by the database (DEFAULT nextval) on create and by the price
|
|
172
|
+
* repository on termination / compatibility-affecting edits.
|
|
173
|
+
*/
|
|
174
|
+
sequence?: number | undefined;
|
|
166
175
|
/**
|
|
167
176
|
* StartDate is the start date of the price
|
|
168
177
|
*/
|
|
@@ -225,6 +234,7 @@ export const PriceResponse$inboundSchema: z.ZodMiniType<
|
|
|
225
234
|
price_unit_tiers: types.optional(z.array(PricePriceTier$inboundSchema)),
|
|
226
235
|
price_unit_type: types.optional(PriceUnitType$inboundSchema),
|
|
227
236
|
pricing_unit: types.optional(PriceUnitResponse$inboundSchema),
|
|
237
|
+
sequence: types.optional(types.number()),
|
|
228
238
|
start_date: types.optional(types.date()),
|
|
229
239
|
status: types.optional(Status$inboundSchema),
|
|
230
240
|
tenant_id: types.optional(types.string()),
|
|
@@ -0,0 +1,70 @@
|
|
|
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
|
+
S3CompressionType,
|
|
12
|
+
S3CompressionType$inboundSchema,
|
|
13
|
+
} from "./s3-compression-type.js";
|
|
14
|
+
import {
|
|
15
|
+
S3EncryptionType,
|
|
16
|
+
S3EncryptionType$inboundSchema,
|
|
17
|
+
} from "./s3-encryption-type.js";
|
|
18
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
19
|
+
|
|
20
|
+
export type S3ExportConfig = {
|
|
21
|
+
/**
|
|
22
|
+
* S3 bucket name
|
|
23
|
+
*/
|
|
24
|
+
bucket?: string | undefined;
|
|
25
|
+
compression?: S3CompressionType | undefined;
|
|
26
|
+
encryption?: S3EncryptionType | undefined;
|
|
27
|
+
/**
|
|
28
|
+
* If true, use Flexprice-managed S3 credentials instead of user-provided
|
|
29
|
+
*/
|
|
30
|
+
isFlexpriceManaged?: boolean | undefined;
|
|
31
|
+
/**
|
|
32
|
+
* Optional prefix for S3 keys (e.g., "flexprice-exports/")
|
|
33
|
+
*/
|
|
34
|
+
keyPrefix?: string | undefined;
|
|
35
|
+
/**
|
|
36
|
+
* AWS region (e.g., "us-west-2")
|
|
37
|
+
*/
|
|
38
|
+
region?: string | undefined;
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** @internal */
|
|
42
|
+
export const S3ExportConfig$inboundSchema: z.ZodMiniType<
|
|
43
|
+
S3ExportConfig,
|
|
44
|
+
unknown
|
|
45
|
+
> = z.pipe(
|
|
46
|
+
z.object({
|
|
47
|
+
bucket: types.optional(types.string()),
|
|
48
|
+
compression: types.optional(S3CompressionType$inboundSchema),
|
|
49
|
+
encryption: types.optional(S3EncryptionType$inboundSchema),
|
|
50
|
+
is_flexprice_managed: types.optional(types.boolean()),
|
|
51
|
+
key_prefix: types.optional(types.string()),
|
|
52
|
+
region: types.optional(types.string()),
|
|
53
|
+
}),
|
|
54
|
+
z.transform((v) => {
|
|
55
|
+
return remap$(v, {
|
|
56
|
+
"is_flexprice_managed": "isFlexpriceManaged",
|
|
57
|
+
"key_prefix": "keyPrefix",
|
|
58
|
+
});
|
|
59
|
+
}),
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
export function s3ExportConfigFromJSON(
|
|
63
|
+
jsonString: string,
|
|
64
|
+
): SafeParseResult<S3ExportConfig, SDKValidationError> {
|
|
65
|
+
return safeParse(
|
|
66
|
+
jsonString,
|
|
67
|
+
(x) => S3ExportConfig$inboundSchema.parse(JSON.parse(x)),
|
|
68
|
+
`Failed to parse 'S3ExportConfig' from JSON`,
|
|
69
|
+
);
|
|
70
|
+
}
|
|
@@ -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 {
|
|
8
|
+
TrialEndAction,
|
|
9
|
+
TrialEndAction$outboundSchema,
|
|
10
|
+
} from "./trial-end-action.js";
|
|
11
|
+
|
|
12
|
+
export type SubModifyTrialEndRequest = {
|
|
13
|
+
action: TrialEndAction;
|
|
14
|
+
/**
|
|
15
|
+
* NewTrialEnd is the new trial end date. Required when action is "scheduled_date".
|
|
16
|
+
*/
|
|
17
|
+
newTrialEnd?: Date | undefined;
|
|
18
|
+
};
|
|
19
|
+
|
|
20
|
+
/** @internal */
|
|
21
|
+
export type SubModifyTrialEndRequest$Outbound = {
|
|
22
|
+
action: string;
|
|
23
|
+
new_trial_end?: string | undefined;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
/** @internal */
|
|
27
|
+
export const SubModifyTrialEndRequest$outboundSchema: z.ZodMiniType<
|
|
28
|
+
SubModifyTrialEndRequest$Outbound,
|
|
29
|
+
SubModifyTrialEndRequest
|
|
30
|
+
> = z.pipe(
|
|
31
|
+
z.object({
|
|
32
|
+
action: TrialEndAction$outboundSchema,
|
|
33
|
+
newTrialEnd: z.optional(
|
|
34
|
+
z.pipe(z.date(), z.transform(v => v.toISOString())),
|
|
35
|
+
),
|
|
36
|
+
}),
|
|
37
|
+
z.transform((v) => {
|
|
38
|
+
return remap$(v, {
|
|
39
|
+
newTrialEnd: "new_trial_end",
|
|
40
|
+
});
|
|
41
|
+
}),
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
export function subModifyTrialEndRequestToJSON(
|
|
45
|
+
subModifyTrialEndRequest: SubModifyTrialEndRequest,
|
|
46
|
+
): string {
|
|
47
|
+
return JSON.stringify(
|
|
48
|
+
SubModifyTrialEndRequest$outboundSchema.parse(subModifyTrialEndRequest),
|
|
49
|
+
);
|
|
50
|
+
}
|
|
@@ -9,6 +9,7 @@ export const SubscriptionModifyType = {
|
|
|
9
9
|
Inheritance: "inheritance",
|
|
10
10
|
QuantityChange: "quantity_change",
|
|
11
11
|
GroupedInvoicing: "grouped_invoicing",
|
|
12
|
+
TrialEnd: "trial_end",
|
|
12
13
|
} as const;
|
|
13
14
|
export type SubscriptionModifyType = ClosedEnum<typeof SubscriptionModifyType>;
|
|
14
15
|
|
|
@@ -210,6 +210,14 @@ export type SubscriptionResponseV2 = {
|
|
|
210
210
|
* PlanID is the identifier for the plan in our system
|
|
211
211
|
*/
|
|
212
212
|
planId?: string | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* PlanPricesOutOfSync is true when the subscription's synced_price_sequence
|
|
215
|
+
*
|
|
216
|
+
* @remarks
|
|
217
|
+
* is behind the plan's current max prices.sequence — i.e. plan-price
|
|
218
|
+
* changes have not yet been reconciled into this subscription's line items.
|
|
219
|
+
*/
|
|
220
|
+
planPricesOutOfSync?: boolean | undefined;
|
|
213
221
|
prorationBehavior?: ProrationBehavior | undefined;
|
|
214
222
|
/**
|
|
215
223
|
* StartDate is the start date of the subscription
|
|
@@ -218,6 +226,14 @@ export type SubscriptionResponseV2 = {
|
|
|
218
226
|
status?: Status | undefined;
|
|
219
227
|
subscriptionStatus?: SubscriptionStatus | undefined;
|
|
220
228
|
subscriptionType?: SubscriptionType | undefined;
|
|
229
|
+
/**
|
|
230
|
+
* SyncedPriceSequence is the plan-price sequence up to which this
|
|
231
|
+
*
|
|
232
|
+
* @remarks
|
|
233
|
+
* subscription's line items have been reconciled. Bumped by the
|
|
234
|
+
* plan-price sync after a successful pass.
|
|
235
|
+
*/
|
|
236
|
+
syncedPriceSequence?: number | undefined;
|
|
221
237
|
tenantId?: string | undefined;
|
|
222
238
|
/**
|
|
223
239
|
* TrialEnd is the end date of the trial period
|
|
@@ -288,11 +304,13 @@ export const SubscriptionResponseV2$inboundSchema: z.ZodMiniType<
|
|
|
288
304
|
phases: types.optional(z.array(SubscriptionPhaseResponse$inboundSchema)),
|
|
289
305
|
plan: types.optional(PlanResponse$inboundSchema),
|
|
290
306
|
plan_id: types.optional(types.string()),
|
|
307
|
+
plan_prices_out_of_sync: types.optional(types.boolean()),
|
|
291
308
|
proration_behavior: types.optional(ProrationBehavior$inboundSchema),
|
|
292
309
|
start_date: types.optional(types.date()),
|
|
293
310
|
status: types.optional(Status$inboundSchema),
|
|
294
311
|
subscription_status: types.optional(SubscriptionStatus$inboundSchema),
|
|
295
312
|
subscription_type: types.optional(SubscriptionType$inboundSchema),
|
|
313
|
+
synced_price_sequence: types.optional(types.number()),
|
|
296
314
|
tenant_id: types.optional(types.string()),
|
|
297
315
|
trial_end: types.optional(types.date()),
|
|
298
316
|
trial_start: types.optional(types.date()),
|
|
@@ -336,10 +354,12 @@ export const SubscriptionResponseV2$inboundSchema: z.ZodMiniType<
|
|
|
336
354
|
"payment_behavior": "paymentBehavior",
|
|
337
355
|
"payment_terms": "paymentTerms",
|
|
338
356
|
"plan_id": "planId",
|
|
357
|
+
"plan_prices_out_of_sync": "planPricesOutOfSync",
|
|
339
358
|
"proration_behavior": "prorationBehavior",
|
|
340
359
|
"start_date": "startDate",
|
|
341
360
|
"subscription_status": "subscriptionStatus",
|
|
342
361
|
"subscription_type": "subscriptionType",
|
|
362
|
+
"synced_price_sequence": "syncedPriceSequence",
|
|
343
363
|
"tenant_id": "tenantId",
|
|
344
364
|
"trial_end": "trialEnd",
|
|
345
365
|
"trial_start": "trialStart",
|
|
@@ -214,6 +214,14 @@ export type SubscriptionResponse = {
|
|
|
214
214
|
status?: Status | undefined;
|
|
215
215
|
subscriptionStatus?: SubscriptionStatus | undefined;
|
|
216
216
|
subscriptionType?: SubscriptionType | undefined;
|
|
217
|
+
/**
|
|
218
|
+
* SyncedPriceSequence is the plan-price sequence up to which this
|
|
219
|
+
*
|
|
220
|
+
* @remarks
|
|
221
|
+
* subscription's line items have been reconciled. Bumped by the
|
|
222
|
+
* plan-price sync after a successful pass.
|
|
223
|
+
*/
|
|
224
|
+
syncedPriceSequence?: number | undefined;
|
|
217
225
|
tenantId?: string | undefined;
|
|
218
226
|
/**
|
|
219
227
|
* TrialEnd is the end date of the trial period
|
|
@@ -290,6 +298,7 @@ export const SubscriptionResponse$inboundSchema: z.ZodMiniType<
|
|
|
290
298
|
status: types.optional(Status$inboundSchema),
|
|
291
299
|
subscription_status: types.optional(SubscriptionStatus$inboundSchema),
|
|
292
300
|
subscription_type: types.optional(SubscriptionType$inboundSchema),
|
|
301
|
+
synced_price_sequence: types.optional(types.number()),
|
|
293
302
|
tenant_id: types.optional(types.string()),
|
|
294
303
|
trial_end: types.optional(types.date()),
|
|
295
304
|
trial_start: types.optional(types.date()),
|
|
@@ -338,6 +347,7 @@ export const SubscriptionResponse$inboundSchema: z.ZodMiniType<
|
|
|
338
347
|
"start_date": "startDate",
|
|
339
348
|
"subscription_status": "subscriptionStatus",
|
|
340
349
|
"subscription_type": "subscriptionType",
|
|
350
|
+
"synced_price_sequence": "syncedPriceSequence",
|
|
341
351
|
"tenant_id": "tenantId",
|
|
342
352
|
"trial_end": "trialEnd",
|
|
343
353
|
"trial_start": "trialStart",
|