@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
package/src/sdk/invoices.ts
CHANGED
|
@@ -9,7 +9,6 @@ import { invoicesGetCustomerInvoiceSummary } from "../funcs/invoices-get-custome
|
|
|
9
9
|
import { invoicesGetInvoicePdf } from "../funcs/invoices-get-invoice-pdf.js";
|
|
10
10
|
import { invoicesGetInvoicePreview } from "../funcs/invoices-get-invoice-preview.js";
|
|
11
11
|
import { invoicesGetInvoice } from "../funcs/invoices-get-invoice.js";
|
|
12
|
-
import { invoicesGetMeterUsagePreviewInvoice } from "../funcs/invoices-get-meter-usage-preview-invoice.js";
|
|
13
12
|
import { invoicesQueryInvoice } from "../funcs/invoices-query-invoice.js";
|
|
14
13
|
import { invoicesRecalculateInvoiceV2 } from "../funcs/invoices-recalculate-invoice-v2.js";
|
|
15
14
|
import { invoicesRecalculateInvoice } from "../funcs/invoices-recalculate-invoice.js";
|
|
@@ -56,23 +55,6 @@ export class Invoices extends ClientSDK {
|
|
|
56
55
|
));
|
|
57
56
|
}
|
|
58
57
|
|
|
59
|
-
/**
|
|
60
|
-
* Get invoice preview using meter_usage data
|
|
61
|
-
*
|
|
62
|
-
* @remarks
|
|
63
|
-
* Preview invoice using the meter_usage table for usage data instead of feature_usage.
|
|
64
|
-
*/
|
|
65
|
-
async getMeterUsagePreviewInvoice(
|
|
66
|
-
request: models.GetPreviewInvoiceRequest,
|
|
67
|
-
options?: RequestOptions,
|
|
68
|
-
): Promise<models.InvoiceResponse> {
|
|
69
|
-
return unwrapAsync(invoicesGetMeterUsagePreviewInvoice(
|
|
70
|
-
this,
|
|
71
|
-
request,
|
|
72
|
-
options,
|
|
73
|
-
));
|
|
74
|
-
}
|
|
75
|
-
|
|
76
58
|
/**
|
|
77
59
|
* Get invoice preview
|
|
78
60
|
*
|
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
6
7
|
import { safeParse } from "../../lib/schemas.js";
|
|
7
8
|
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
8
9
|
import * as types from "../../types/primitives.js";
|
|
@@ -21,19 +22,31 @@ export type ChangedSubscription = {
|
|
|
21
22
|
* created | updated
|
|
22
23
|
*/
|
|
23
24
|
action?: ChangedSubscriptionAction | undefined;
|
|
25
|
+
currentPeriodEnd?: Date | undefined;
|
|
24
26
|
id?: string | undefined;
|
|
25
27
|
status?: SubscriptionStatus | undefined;
|
|
28
|
+
trialEnd?: Date | undefined;
|
|
26
29
|
};
|
|
27
30
|
|
|
28
31
|
/** @internal */
|
|
29
32
|
export const ChangedSubscription$inboundSchema: z.ZodMiniType<
|
|
30
33
|
ChangedSubscription,
|
|
31
34
|
unknown
|
|
32
|
-
> = z.
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
35
|
+
> = z.pipe(
|
|
36
|
+
z.object({
|
|
37
|
+
action: types.optional(ChangedSubscriptionAction$inboundSchema),
|
|
38
|
+
current_period_end: types.optional(types.date()),
|
|
39
|
+
id: types.optional(types.string()),
|
|
40
|
+
status: types.optional(SubscriptionStatus$inboundSchema),
|
|
41
|
+
trial_end: types.optional(types.date()),
|
|
42
|
+
}),
|
|
43
|
+
z.transform((v) => {
|
|
44
|
+
return remap$(v, {
|
|
45
|
+
"current_period_end": "currentPeriodEnd",
|
|
46
|
+
"trial_end": "trialEnd",
|
|
47
|
+
});
|
|
48
|
+
}),
|
|
49
|
+
);
|
|
37
50
|
|
|
38
51
|
export function changedSubscriptionFromJSON(
|
|
39
52
|
jsonString: string,
|
|
@@ -11,6 +11,10 @@ import {
|
|
|
11
11
|
} from "./commitment-info.js";
|
|
12
12
|
|
|
13
13
|
export type CreateInvoiceLineItemRequest = {
|
|
14
|
+
/**
|
|
15
|
+
* adjusted_entitlement_quantity is the entitlement-covered units deducted from raw usage.
|
|
16
|
+
*/
|
|
17
|
+
adjustedEntitlementQuantity?: string | undefined;
|
|
14
18
|
/**
|
|
15
19
|
* amount is the monetary amount for this line item
|
|
16
20
|
*/
|
|
@@ -88,10 +92,22 @@ export type CreateInvoiceLineItemRequest = {
|
|
|
88
92
|
* quantity is the quantity of units for this line item
|
|
89
93
|
*/
|
|
90
94
|
quantity: string;
|
|
95
|
+
/**
|
|
96
|
+
* subscription_id overrides the invoice's subscription_id for this specific line item.
|
|
97
|
+
*
|
|
98
|
+
* @remarks
|
|
99
|
+
* Used for grouped invoicing where child line items belong to child subscriptions.
|
|
100
|
+
*/
|
|
101
|
+
subscriptionId?: string | undefined;
|
|
102
|
+
/**
|
|
103
|
+
* sub_line_item_id links this line item to the subscription_line_item that generated it.
|
|
104
|
+
*/
|
|
105
|
+
subscriptionLineItemId?: string | undefined;
|
|
91
106
|
};
|
|
92
107
|
|
|
93
108
|
/** @internal */
|
|
94
109
|
export type CreateInvoiceLineItemRequest$Outbound = {
|
|
110
|
+
adjusted_entitlement_quantity?: string | undefined;
|
|
95
111
|
amount: string;
|
|
96
112
|
commitment_info?: CommitmentInfo$Outbound | undefined;
|
|
97
113
|
display_name?: string | undefined;
|
|
@@ -112,6 +128,8 @@ export type CreateInvoiceLineItemRequest$Outbound = {
|
|
|
112
128
|
price_unit?: string | undefined;
|
|
113
129
|
price_unit_amount?: string | undefined;
|
|
114
130
|
quantity: string;
|
|
131
|
+
subscription_id?: string | undefined;
|
|
132
|
+
subscription_line_item_id?: string | undefined;
|
|
115
133
|
};
|
|
116
134
|
|
|
117
135
|
/** @internal */
|
|
@@ -120,6 +138,7 @@ export const CreateInvoiceLineItemRequest$outboundSchema: z.ZodMiniType<
|
|
|
120
138
|
CreateInvoiceLineItemRequest
|
|
121
139
|
> = z.pipe(
|
|
122
140
|
z.object({
|
|
141
|
+
adjustedEntitlementQuantity: z.optional(z.string()),
|
|
123
142
|
amount: z.string(),
|
|
124
143
|
commitmentInfo: z.optional(CommitmentInfo$outboundSchema),
|
|
125
144
|
displayName: z.optional(z.string()),
|
|
@@ -142,9 +161,12 @@ export const CreateInvoiceLineItemRequest$outboundSchema: z.ZodMiniType<
|
|
|
142
161
|
priceUnit: z.optional(z.string()),
|
|
143
162
|
priceUnitAmount: z.optional(z.string()),
|
|
144
163
|
quantity: z.string(),
|
|
164
|
+
subscriptionId: z.optional(z.string()),
|
|
165
|
+
subscriptionLineItemId: z.optional(z.string()),
|
|
145
166
|
}),
|
|
146
167
|
z.transform((v) => {
|
|
147
168
|
return remap$(v, {
|
|
169
|
+
adjustedEntitlementQuantity: "adjusted_entitlement_quantity",
|
|
148
170
|
commitmentInfo: "commitment_info",
|
|
149
171
|
displayName: "display_name",
|
|
150
172
|
entityId: "entity_id",
|
|
@@ -162,6 +184,8 @@ export const CreateInvoiceLineItemRequest$outboundSchema: z.ZodMiniType<
|
|
|
162
184
|
priceType: "price_type",
|
|
163
185
|
priceUnit: "price_unit",
|
|
164
186
|
priceUnitAmount: "price_unit_amount",
|
|
187
|
+
subscriptionId: "subscription_id",
|
|
188
|
+
subscriptionLineItemId: "subscription_line_item_id",
|
|
165
189
|
});
|
|
166
190
|
}),
|
|
167
191
|
);
|
|
@@ -95,6 +95,13 @@ export type CreateInvoiceRequest = {
|
|
|
95
95
|
invoicePdfUrl?: string | undefined;
|
|
96
96
|
invoiceStatus?: InvoiceStatus | undefined;
|
|
97
97
|
invoiceType?: InvoiceType | undefined;
|
|
98
|
+
/**
|
|
99
|
+
* issue_date overrides the user-facing date of the invoice.
|
|
100
|
+
*
|
|
101
|
+
* @remarks
|
|
102
|
+
* Defaults to created_at if not provided.
|
|
103
|
+
*/
|
|
104
|
+
issueDate?: Date | undefined;
|
|
98
105
|
/**
|
|
99
106
|
* Invoice Line Item Coupons
|
|
100
107
|
*/
|
|
@@ -160,6 +167,7 @@ export type CreateInvoiceRequest$Outbound = {
|
|
|
160
167
|
invoice_pdf_url?: string | undefined;
|
|
161
168
|
invoice_status?: string | undefined;
|
|
162
169
|
invoice_type?: string | undefined;
|
|
170
|
+
issue_date?: string | undefined;
|
|
163
171
|
line_item_coupons?: Array<InvoiceLineItemCoupon$Outbound> | undefined;
|
|
164
172
|
line_items?: Array<CreateInvoiceLineItemRequest$Outbound> | undefined;
|
|
165
173
|
metadata?: { [k: string]: string } | undefined;
|
|
@@ -196,6 +204,7 @@ export const CreateInvoiceRequest$outboundSchema: z.ZodMiniType<
|
|
|
196
204
|
invoicePdfUrl: z.optional(z.string()),
|
|
197
205
|
invoiceStatus: z.optional(InvoiceStatus$outboundSchema),
|
|
198
206
|
invoiceType: z.optional(InvoiceType$outboundSchema),
|
|
207
|
+
issueDate: z.optional(z.pipe(z.date(), z.transform(v => v.toISOString()))),
|
|
199
208
|
lineItemCoupons: z.optional(z.array(InvoiceLineItemCoupon$outboundSchema)),
|
|
200
209
|
lineItems: z.optional(z.array(CreateInvoiceLineItemRequest$outboundSchema)),
|
|
201
210
|
metadata: z.optional(z.record(z.string(), z.string())),
|
|
@@ -226,6 +235,7 @@ export const CreateInvoiceRequest$outboundSchema: z.ZodMiniType<
|
|
|
226
235
|
invoicePdfUrl: "invoice_pdf_url",
|
|
227
236
|
invoiceStatus: "invoice_status",
|
|
228
237
|
invoiceType: "invoice_type",
|
|
238
|
+
issueDate: "issue_date",
|
|
229
239
|
lineItemCoupons: "line_item_coupons",
|
|
230
240
|
lineItems: "line_items",
|
|
231
241
|
paymentStatus: "payment_status",
|
|
@@ -19,6 +19,7 @@ export type CreateUserResponse = {
|
|
|
19
19
|
*/
|
|
20
20
|
email?: string | undefined;
|
|
21
21
|
id?: string | undefined;
|
|
22
|
+
metadata?: { [k: string]: string } | undefined;
|
|
22
23
|
password?: string | undefined;
|
|
23
24
|
roles?: Array<string> | undefined;
|
|
24
25
|
tenant?: TenantResponse | undefined;
|
|
@@ -32,6 +33,7 @@ export const CreateUserResponse$inboundSchema: z.ZodMiniType<
|
|
|
32
33
|
> = z.object({
|
|
33
34
|
email: types.optional(types.string()),
|
|
34
35
|
id: types.optional(types.string()),
|
|
36
|
+
metadata: types.optional(z.record(z.string(), types.string())),
|
|
35
37
|
password: types.optional(types.string()),
|
|
36
38
|
roles: types.optional(z.array(types.string())),
|
|
37
39
|
tenant: types.optional(TenantResponse$inboundSchema),
|
|
@@ -21,6 +21,7 @@ export type EntityIntegrationMappingResponse = {
|
|
|
21
21
|
entityType?: IntegrationEntityType | undefined;
|
|
22
22
|
environmentId?: string | undefined;
|
|
23
23
|
id?: string | undefined;
|
|
24
|
+
metadata?: { [k: string]: any } | undefined;
|
|
24
25
|
providerEntityId?: string | undefined;
|
|
25
26
|
providerType?: string | undefined;
|
|
26
27
|
status?: Status | undefined;
|
|
@@ -41,6 +42,7 @@ export const EntityIntegrationMappingResponse$inboundSchema: z.ZodMiniType<
|
|
|
41
42
|
entity_type: types.optional(IntegrationEntityType$inboundSchema),
|
|
42
43
|
environment_id: types.optional(types.string()),
|
|
43
44
|
id: types.optional(types.string()),
|
|
45
|
+
metadata: types.optional(z.record(z.string(), z.any())),
|
|
44
46
|
provider_entity_id: types.optional(types.string()),
|
|
45
47
|
provider_type: types.optional(types.string()),
|
|
46
48
|
status: types.optional(Status$inboundSchema),
|
|
@@ -0,0 +1,39 @@
|
|
|
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
|
+
|
|
11
|
+
export type EntitySyncConfig = {
|
|
12
|
+
/**
|
|
13
|
+
* Inbound from external provider to FlexPrice
|
|
14
|
+
*/
|
|
15
|
+
inbound?: boolean | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Outbound from FlexPrice to external provider
|
|
18
|
+
*/
|
|
19
|
+
outbound?: boolean | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export const EntitySyncConfig$inboundSchema: z.ZodMiniType<
|
|
24
|
+
EntitySyncConfig,
|
|
25
|
+
unknown
|
|
26
|
+
> = z.object({
|
|
27
|
+
inbound: types.optional(types.boolean()),
|
|
28
|
+
outbound: types.optional(types.boolean()),
|
|
29
|
+
});
|
|
30
|
+
|
|
31
|
+
export function entitySyncConfigFromJSON(
|
|
32
|
+
jsonString: string,
|
|
33
|
+
): SafeParseResult<EntitySyncConfig, SDKValidationError> {
|
|
34
|
+
return safeParse(
|
|
35
|
+
jsonString,
|
|
36
|
+
(x) => EntitySyncConfig$inboundSchema.parse(JSON.parse(x)),
|
|
37
|
+
`Failed to parse 'EntitySyncConfig' from JSON`,
|
|
38
|
+
);
|
|
39
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
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 ErrorCode = {
|
|
10
|
+
HttpClientError: "http_client_error",
|
|
11
|
+
SystemError: "system_error",
|
|
12
|
+
InternalError: "internal_error",
|
|
13
|
+
NotFound: "not_found",
|
|
14
|
+
AlreadyExists: "already_exists",
|
|
15
|
+
VersionConflict: "version_conflict",
|
|
16
|
+
ValidationError: "validation_error",
|
|
17
|
+
InvalidOperation: "invalid_operation",
|
|
18
|
+
PermissionDenied: "permission_denied",
|
|
19
|
+
DatabaseError: "database_error",
|
|
20
|
+
ServiceUnavailable: "service_unavailable",
|
|
21
|
+
TooManyRequests: "too_many_requests",
|
|
22
|
+
} as const;
|
|
23
|
+
export type ErrorCode = OpenEnum<typeof ErrorCode>;
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const ErrorCode$inboundSchema: z.ZodMiniType<ErrorCode, unknown> =
|
|
27
|
+
openEnums.inboundSchema(ErrorCode);
|
|
@@ -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
|
+
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 { ErrorCode, ErrorCode$inboundSchema } from "./error-code.js";
|
|
11
|
+
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
12
|
+
|
|
13
|
+
export type ErrorResponse = {
|
|
14
|
+
code?: ErrorCode | undefined;
|
|
15
|
+
httpStatusCode?: number | undefined;
|
|
16
|
+
message?: string | undefined;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const ErrorResponse$inboundSchema: z.ZodMiniType<
|
|
21
|
+
ErrorResponse,
|
|
22
|
+
unknown
|
|
23
|
+
> = z.pipe(
|
|
24
|
+
z.object({
|
|
25
|
+
code: types.optional(ErrorCode$inboundSchema),
|
|
26
|
+
http_status_code: types.optional(types.number()),
|
|
27
|
+
message: types.optional(types.string()),
|
|
28
|
+
}),
|
|
29
|
+
z.transform((v) => {
|
|
30
|
+
return remap$(v, {
|
|
31
|
+
"http_status_code": "httpStatusCode",
|
|
32
|
+
});
|
|
33
|
+
}),
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
export function errorResponseFromJSON(
|
|
37
|
+
jsonString: string,
|
|
38
|
+
): SafeParseResult<ErrorResponse, SDKValidationError> {
|
|
39
|
+
return safeParse(
|
|
40
|
+
jsonString,
|
|
41
|
+
(x) => ErrorResponse$inboundSchema.parse(JSON.parse(x)),
|
|
42
|
+
`Failed to parse 'ErrorResponse' from JSON`,
|
|
43
|
+
);
|
|
44
|
+
}
|
|
@@ -4,41 +4,18 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v4-mini";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
-
import { safeParse } from "../../lib/schemas.js";
|
|
8
|
-
import * as openEnums from "../../types/enums.js";
|
|
9
|
-
import { OpenEnum } from "../../types/enums.js";
|
|
10
|
-
import { Result as SafeParseResult } from "../../types/fp.js";
|
|
11
7
|
import * as types from "../../types/primitives.js";
|
|
8
|
+
import { ErrorCode, ErrorCode$inboundSchema } from "./error-code.js";
|
|
12
9
|
import { FlexPriceError } from "./flex-price-error.js";
|
|
13
|
-
import { SDKValidationError } from "./sdk-validation-error.js";
|
|
14
|
-
|
|
15
|
-
export const Code = {
|
|
16
|
-
NotFound: "not_found",
|
|
17
|
-
AlreadyExists: "already_exists",
|
|
18
|
-
VersionConflict: "version_conflict",
|
|
19
|
-
ValidationError: "validation_error",
|
|
20
|
-
InvalidOperation: "invalid_operation",
|
|
21
|
-
PermissionDenied: "permission_denied",
|
|
22
|
-
HttpClientError: "http_client_error",
|
|
23
|
-
DatabaseError: "database_error",
|
|
24
|
-
SystemError: "system_error",
|
|
25
|
-
InternalError: "internal_error",
|
|
26
|
-
ServiceUnavailable: "service_unavailable",
|
|
27
|
-
} as const;
|
|
28
|
-
export type Code = OpenEnum<typeof Code>;
|
|
29
|
-
|
|
30
|
-
export type Details = {};
|
|
31
10
|
|
|
32
11
|
export type ErrorsErrorResponseData = {
|
|
33
|
-
code?:
|
|
34
|
-
details?: { [k: string]: Details } | undefined;
|
|
12
|
+
code?: ErrorCode | undefined;
|
|
35
13
|
httpStatusCode?: number | undefined;
|
|
36
14
|
message?: string | undefined;
|
|
37
15
|
};
|
|
38
16
|
|
|
39
17
|
export class ErrorsErrorResponse extends FlexPriceError {
|
|
40
|
-
code?:
|
|
41
|
-
details?: { [k: string]: Details } | undefined;
|
|
18
|
+
code?: ErrorCode | undefined;
|
|
42
19
|
httpStatusCode?: number | undefined;
|
|
43
20
|
|
|
44
21
|
/** The original data that was passed to this error instance. */
|
|
@@ -52,49 +29,19 @@ export class ErrorsErrorResponse extends FlexPriceError {
|
|
|
52
29
|
super(message, httpMeta);
|
|
53
30
|
this.data$ = err;
|
|
54
31
|
if (err.code != null) this.code = err.code;
|
|
55
|
-
if (err.details != null) this.details = err.details;
|
|
56
32
|
if (err.httpStatusCode != null) this.httpStatusCode = err.httpStatusCode;
|
|
57
33
|
|
|
58
34
|
this.name = "ErrorsErrorResponse";
|
|
59
35
|
}
|
|
60
36
|
}
|
|
61
37
|
|
|
62
|
-
export type ErrorResponse = {
|
|
63
|
-
code?: Code | undefined;
|
|
64
|
-
details?: { [k: string]: Details } | undefined;
|
|
65
|
-
httpStatusCode?: number | undefined;
|
|
66
|
-
message?: string | undefined;
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
/** @internal */
|
|
70
|
-
export const Code$inboundSchema: z.ZodMiniType<Code, unknown> = openEnums
|
|
71
|
-
.inboundSchema(Code);
|
|
72
|
-
|
|
73
|
-
/** @internal */
|
|
74
|
-
export const Details$inboundSchema: z.ZodMiniType<Details, unknown> = z.object(
|
|
75
|
-
{},
|
|
76
|
-
);
|
|
77
|
-
|
|
78
|
-
export function detailsFromJSON(
|
|
79
|
-
jsonString: string,
|
|
80
|
-
): SafeParseResult<Details, SDKValidationError> {
|
|
81
|
-
return safeParse(
|
|
82
|
-
jsonString,
|
|
83
|
-
(x) => Details$inboundSchema.parse(JSON.parse(x)),
|
|
84
|
-
`Failed to parse 'Details' from JSON`,
|
|
85
|
-
);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
38
|
/** @internal */
|
|
89
39
|
export const ErrorsErrorResponse$inboundSchema: z.ZodMiniType<
|
|
90
40
|
ErrorsErrorResponse,
|
|
91
41
|
unknown
|
|
92
42
|
> = z.pipe(
|
|
93
43
|
z.object({
|
|
94
|
-
code: types.optional(
|
|
95
|
-
details: types.optional(
|
|
96
|
-
z.record(z.string(), z.lazy(() => Details$inboundSchema)),
|
|
97
|
-
),
|
|
44
|
+
code: types.optional(ErrorCode$inboundSchema),
|
|
98
45
|
http_status_code: types.optional(types.number()),
|
|
99
46
|
message: types.optional(types.string()),
|
|
100
47
|
request$: z.custom<Request>(x => x instanceof Request),
|
|
@@ -113,33 +60,3 @@ export const ErrorsErrorResponse$inboundSchema: z.ZodMiniType<
|
|
|
113
60
|
});
|
|
114
61
|
}),
|
|
115
62
|
);
|
|
116
|
-
|
|
117
|
-
/** @internal */
|
|
118
|
-
export const ErrorResponse$inboundSchema: z.ZodMiniType<
|
|
119
|
-
ErrorResponse,
|
|
120
|
-
unknown
|
|
121
|
-
> = z.pipe(
|
|
122
|
-
z.object({
|
|
123
|
-
code: types.optional(Code$inboundSchema),
|
|
124
|
-
details: types.optional(
|
|
125
|
-
z.record(z.string(), z.lazy(() => Details$inboundSchema)),
|
|
126
|
-
),
|
|
127
|
-
http_status_code: types.optional(types.number()),
|
|
128
|
-
message: types.optional(types.string()),
|
|
129
|
-
}),
|
|
130
|
-
z.transform((v) => {
|
|
131
|
-
return remap$(v, {
|
|
132
|
-
"http_status_code": "httpStatusCode",
|
|
133
|
-
});
|
|
134
|
-
}),
|
|
135
|
-
);
|
|
136
|
-
|
|
137
|
-
export function errorResponseFromJSON(
|
|
138
|
-
jsonString: string,
|
|
139
|
-
): SafeParseResult<ErrorResponse, SDKValidationError> {
|
|
140
|
-
return safeParse(
|
|
141
|
-
jsonString,
|
|
142
|
-
(x) => ErrorResponse$inboundSchema.parse(JSON.parse(x)),
|
|
143
|
-
`Failed to parse 'ErrorResponse' from JSON`,
|
|
144
|
-
);
|
|
145
|
-
}
|
|
@@ -19,6 +19,11 @@ import {
|
|
|
19
19
|
SubModifyQuantityChangeRequest$Outbound,
|
|
20
20
|
SubModifyQuantityChangeRequest$outboundSchema,
|
|
21
21
|
} from "./sub-modify-quantity-change-request.js";
|
|
22
|
+
import {
|
|
23
|
+
SubModifyTrialEndRequest,
|
|
24
|
+
SubModifyTrialEndRequest$Outbound,
|
|
25
|
+
SubModifyTrialEndRequest$outboundSchema,
|
|
26
|
+
} from "./sub-modify-trial-end-request.js";
|
|
22
27
|
import {
|
|
23
28
|
SubscriptionModifyType,
|
|
24
29
|
SubscriptionModifyType$outboundSchema,
|
|
@@ -28,6 +33,7 @@ export type ExecuteSubscriptionModifyRequest = {
|
|
|
28
33
|
groupedInvoicingParams?: SubModifyGroupedInvoicingParams | undefined;
|
|
29
34
|
inheritanceParams?: SubModifyInheritanceRequest | undefined;
|
|
30
35
|
quantityChangeParams?: SubModifyQuantityChangeRequest | undefined;
|
|
36
|
+
trialEndParams?: SubModifyTrialEndRequest | undefined;
|
|
31
37
|
type: SubscriptionModifyType;
|
|
32
38
|
};
|
|
33
39
|
|
|
@@ -38,6 +44,7 @@ export type ExecuteSubscriptionModifyRequest$Outbound = {
|
|
|
38
44
|
| undefined;
|
|
39
45
|
inheritance_params?: SubModifyInheritanceRequest$Outbound | undefined;
|
|
40
46
|
quantity_change_params?: SubModifyQuantityChangeRequest$Outbound | undefined;
|
|
47
|
+
trial_end_params?: SubModifyTrialEndRequest$Outbound | undefined;
|
|
41
48
|
type: string;
|
|
42
49
|
};
|
|
43
50
|
|
|
@@ -54,6 +61,7 @@ export const ExecuteSubscriptionModifyRequest$outboundSchema: z.ZodMiniType<
|
|
|
54
61
|
quantityChangeParams: z.optional(
|
|
55
62
|
SubModifyQuantityChangeRequest$outboundSchema,
|
|
56
63
|
),
|
|
64
|
+
trialEndParams: z.optional(SubModifyTrialEndRequest$outboundSchema),
|
|
57
65
|
type: SubscriptionModifyType$outboundSchema,
|
|
58
66
|
}),
|
|
59
67
|
z.transform((v) => {
|
|
@@ -61,6 +69,7 @@ export const ExecuteSubscriptionModifyRequest$outboundSchema: z.ZodMiniType<
|
|
|
61
69
|
groupedInvoicingParams: "grouped_invoicing_params",
|
|
62
70
|
inheritanceParams: "inheritance_params",
|
|
63
71
|
quantityChangeParams: "quantity_change_params",
|
|
72
|
+
trialEndParams: "trial_end_params",
|
|
64
73
|
});
|
|
65
74
|
}),
|
|
66
75
|
);
|
|
@@ -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
|
+
|
|
8
|
+
export type GetEntityIntegrationMappingsRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* Entity type (customer, plan, invoice, subscription, payment, credit_note, addon, item, item_price, price)
|
|
11
|
+
*/
|
|
12
|
+
entityType: string;
|
|
13
|
+
/**
|
|
14
|
+
* Entity ID
|
|
15
|
+
*/
|
|
16
|
+
entityId: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export type GetEntityIntegrationMappingsRequest$Outbound = {
|
|
21
|
+
entity_type: string;
|
|
22
|
+
entity_id: string;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const GetEntityIntegrationMappingsRequest$outboundSchema: z.ZodMiniType<
|
|
27
|
+
GetEntityIntegrationMappingsRequest$Outbound,
|
|
28
|
+
GetEntityIntegrationMappingsRequest
|
|
29
|
+
> = z.pipe(
|
|
30
|
+
z.object({
|
|
31
|
+
entityType: z.string(),
|
|
32
|
+
entityId: z.string(),
|
|
33
|
+
}),
|
|
34
|
+
z.transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
entityType: "entity_type",
|
|
37
|
+
entityId: "entity_id",
|
|
38
|
+
});
|
|
39
|
+
}),
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
export function getEntityIntegrationMappingsRequestToJSON(
|
|
43
|
+
getEntityIntegrationMappingsRequest: GetEntityIntegrationMappingsRequest,
|
|
44
|
+
): string {
|
|
45
|
+
return JSON.stringify(
|
|
46
|
+
GetEntityIntegrationMappingsRequest$outboundSchema.parse(
|
|
47
|
+
getEntityIntegrationMappingsRequest,
|
|
48
|
+
),
|
|
49
|
+
);
|
|
50
|
+
}
|
package/src/sdk/models/index.ts
CHANGED
|
@@ -166,8 +166,11 @@ export * from "./entitlement-source-entity-type.js";
|
|
|
166
166
|
export * from "./entitlement-source.js";
|
|
167
167
|
export * from "./entitlement-usage-reset-period.js";
|
|
168
168
|
export * from "./entity-integration-mapping-response.js";
|
|
169
|
+
export * from "./entity-sync-config.js";
|
|
169
170
|
export * from "./entity-type.js";
|
|
170
171
|
export * from "./environment-type.js";
|
|
172
|
+
export * from "./error-code.js";
|
|
173
|
+
export * from "./error-response.js";
|
|
171
174
|
export * from "./errors-error-response.js";
|
|
172
175
|
export * from "./event-cost-info.js";
|
|
173
176
|
export * from "./event-processing-status-type.js";
|
|
@@ -208,6 +211,7 @@ export * from "./get-customer-usage-summary-op.js";
|
|
|
208
211
|
export * from "./get-customer-wallets-op.js";
|
|
209
212
|
export * from "./get-detailed-cost-analytics-response.js";
|
|
210
213
|
export * from "./get-entitlement-op.js";
|
|
214
|
+
export * from "./get-entity-integration-mappings-op.js";
|
|
211
215
|
export * from "./get-event-by-id-response.js";
|
|
212
216
|
export * from "./get-event-op.js";
|
|
213
217
|
export * from "./get-events-request.js";
|
|
@@ -258,6 +262,8 @@ export * from "./group-response.js";
|
|
|
258
262
|
export * from "./grouped-invoicing-action.js";
|
|
259
263
|
export * from "./http-client-errors.js";
|
|
260
264
|
export * from "./ingest-event-request.js";
|
|
265
|
+
export * from "./integration-config-entry.js";
|
|
266
|
+
export * from "./integration-config-response.js";
|
|
261
267
|
export * from "./integration-entity-type.js";
|
|
262
268
|
export * from "./invoice-billing-reason.js";
|
|
263
269
|
export * from "./invoice-cadence.js";
|
|
@@ -269,6 +275,7 @@ export * from "./invoice-line-item-response.js";
|
|
|
269
275
|
export * from "./invoice-preview.js";
|
|
270
276
|
export * from "./invoice-response.js";
|
|
271
277
|
export * from "./invoice-status.js";
|
|
278
|
+
export * from "./invoice-sync-settings.js";
|
|
272
279
|
export * from "./invoice-type.js";
|
|
273
280
|
export * from "./line-item-commitment-config.js";
|
|
274
281
|
export * from "./line-item-quantity-change.js";
|
|
@@ -284,6 +291,7 @@ export * from "./list-credit-grant-applications-response.js";
|
|
|
284
291
|
export * from "./list-credit-grants-response.js";
|
|
285
292
|
export * from "./list-customers-response.js";
|
|
286
293
|
export * from "./list-entitlements-response.js";
|
|
294
|
+
export * from "./list-entity-integration-mappings-response.js";
|
|
287
295
|
export * from "./list-features-response.js";
|
|
288
296
|
export * from "./list-groups-response.js";
|
|
289
297
|
export * from "./list-invoices-response.js";
|
|
@@ -315,11 +323,6 @@ export * from "./meter-filter.js";
|
|
|
315
323
|
export * from "./meter-matching-result.js";
|
|
316
324
|
export * from "./meter-meter.js";
|
|
317
325
|
export * from "./meter-response.js";
|
|
318
|
-
export * from "./meter-usage-analytics-request.js";
|
|
319
|
-
export * from "./meter-usage-analytics-response.js";
|
|
320
|
-
export * from "./meter-usage-point.js";
|
|
321
|
-
export * from "./meter-usage-query-request.js";
|
|
322
|
-
export * from "./meter-usage-query-response.js";
|
|
323
326
|
export * from "./models-temporal-workflow-result.js";
|
|
324
327
|
export * from "./override-entitlement-request.js";
|
|
325
328
|
export * from "./override-line-item-request.js";
|
|
@@ -369,6 +372,7 @@ export * from "./resume-mode.js";
|
|
|
369
372
|
export * from "./round-type.js";
|
|
370
373
|
export * from "./s3-compression-type.js";
|
|
371
374
|
export * from "./s3-encryption-type.js";
|
|
375
|
+
export * from "./s3-export-config.js";
|
|
372
376
|
export * from "./s3-job-config.js";
|
|
373
377
|
export * from "./schedule-draft-finalization-op.js";
|
|
374
378
|
export * from "./schedule-status.js";
|
|
@@ -390,6 +394,7 @@ export * from "./status.js";
|
|
|
390
394
|
export * from "./sub-modify-grouped-invoicing-params.js";
|
|
391
395
|
export * from "./sub-modify-inheritance-request.js";
|
|
392
396
|
export * from "./sub-modify-quantity-change-request.js";
|
|
397
|
+
export * from "./sub-modify-trial-end-request.js";
|
|
393
398
|
export * from "./subscription-change-execute-response.js";
|
|
394
399
|
export * from "./subscription-change-preview-response.js";
|
|
395
400
|
export * from "./subscription-change-request.js";
|
|
@@ -417,6 +422,7 @@ export * from "./subscription-summary.js";
|
|
|
417
422
|
export * from "./subscription-type.js";
|
|
418
423
|
export * from "./subscription-usage-by-meters-response.js";
|
|
419
424
|
export * from "./success-response.js";
|
|
425
|
+
export * from "./sync-config.js";
|
|
420
426
|
export * from "./sync-plan-prices-op.js";
|
|
421
427
|
export * from "./task-response.js";
|
|
422
428
|
export * from "./task-status.js";
|
|
@@ -441,6 +447,7 @@ export * from "./top-up-wallet-response.js";
|
|
|
441
447
|
export * from "./transaction-reason.js";
|
|
442
448
|
export * from "./transaction-status.js";
|
|
443
449
|
export * from "./transaction-type.js";
|
|
450
|
+
export * from "./trial-end-action.js";
|
|
444
451
|
export * from "./trigger-force-run-request.js";
|
|
445
452
|
export * from "./trigger-force-run-response.js";
|
|
446
453
|
export * from "./trigger-invoice-comms-webhook-op.js";
|
|
@@ -484,6 +491,8 @@ export * from "./update-tax-association-op.js";
|
|
|
484
491
|
export * from "./update-tax-rate-op.js";
|
|
485
492
|
export * from "./update-tax-rate-request.js";
|
|
486
493
|
export * from "./update-tenant-request.js";
|
|
494
|
+
export * from "./update-user-request.js";
|
|
495
|
+
export * from "./update-user-response.js";
|
|
487
496
|
export * from "./update-wallet-op.js";
|
|
488
497
|
export * from "./update-wallet-request.js";
|
|
489
498
|
export * from "./usage-analytic-item.js";
|