@paygentic/sdk 0.9.13 → 0.9.15
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/README.md +13 -5
- package/dist/commonjs/funcs/costsGetCostReport.js +1 -0
- package/dist/commonjs/funcs/costsGetCostReport.js.map +1 -1
- package/dist/commonjs/funcs/profitabilityGetProfitability.js +2 -1
- package/dist/commonjs/funcs/profitabilityGetProfitability.js.map +1 -1
- package/dist/commonjs/funcs/revenueGet.js +1 -0
- package/dist/commonjs/funcs/revenueGet.js.map +1 -1
- package/dist/commonjs/funcs/subscriptionsEditSubscriptionIntervals.d.ts +19 -0
- package/dist/commonjs/funcs/subscriptionsEditSubscriptionIntervals.d.ts.map +1 -0
- package/dist/commonjs/funcs/subscriptionsEditSubscriptionIntervals.js +127 -0
- package/dist/commonjs/funcs/subscriptionsEditSubscriptionIntervals.js.map +1 -0
- package/dist/commonjs/funcs/subscriptionsGetSubscriptionIntervals.d.ts +19 -0
- package/dist/commonjs/funcs/subscriptionsGetSubscriptionIntervals.d.ts.map +1 -0
- package/dist/commonjs/funcs/subscriptionsGetSubscriptionIntervals.js +124 -0
- package/dist/commonjs/funcs/subscriptionsGetSubscriptionIntervals.js.map +1 -0
- package/dist/commonjs/funcs/subscriptionsListIntervalChanges.d.ts +19 -0
- package/dist/commonjs/funcs/subscriptionsListIntervalChanges.d.ts.map +1 -0
- package/dist/commonjs/funcs/subscriptionsListIntervalChanges.js +126 -0
- package/dist/commonjs/funcs/subscriptionsListIntervalChanges.js.map +1 -0
- package/dist/commonjs/funcs/subscriptionsListSubscriptionIntervalChanges.d.ts +19 -0
- package/dist/commonjs/funcs/subscriptionsListSubscriptionIntervalChanges.d.ts.map +1 -0
- package/dist/commonjs/funcs/subscriptionsListSubscriptionIntervalChanges.js +129 -0
- package/dist/commonjs/funcs/subscriptionsListSubscriptionIntervalChanges.js.map +1 -0
- package/dist/commonjs/lib/config.d.ts +2 -2
- package/dist/commonjs/lib/config.js +2 -2
- package/dist/commonjs/models/changereason.d.ts +20 -0
- package/dist/commonjs/models/changereason.d.ts.map +1 -0
- package/dist/commonjs/models/changereason.js +54 -0
- package/dist/commonjs/models/changereason.js.map +1 -0
- package/dist/commonjs/models/costreportresponse.d.ts +8 -0
- package/dist/commonjs/models/costreportresponse.d.ts.map +1 -1
- package/dist/commonjs/models/costreportresponse.js +2 -0
- package/dist/commonjs/models/costreportresponse.js.map +1 -1
- package/dist/commonjs/models/editsubscriptionintervalsrequestunion.d.ts +142 -0
- package/dist/commonjs/models/editsubscriptionintervalsrequestunion.d.ts.map +1 -0
- package/dist/commonjs/models/editsubscriptionintervalsrequestunion.js +95 -0
- package/dist/commonjs/models/editsubscriptionintervalsrequestunion.js.map +1 -0
- package/dist/commonjs/models/editsubscriptionintervalsresponse.d.ts +41 -0
- package/dist/commonjs/models/editsubscriptionintervalsresponse.d.ts.map +1 -0
- package/dist/commonjs/models/editsubscriptionintervalsresponse.js +65 -0
- package/dist/commonjs/models/editsubscriptionintervalsresponse.js.map +1 -0
- package/dist/commonjs/models/index.d.ts +14 -1
- package/dist/commonjs/models/index.d.ts.map +1 -1
- package/dist/commonjs/models/index.js +14 -1
- package/dist/commonjs/models/index.js.map +1 -1
- package/dist/commonjs/models/intervalchangemetadata.d.ts +13 -0
- package/dist/commonjs/models/intervalchangemetadata.d.ts.map +1 -0
- package/dist/commonjs/models/intervalchangemetadata.js +54 -0
- package/dist/commonjs/models/intervalchangemetadata.js.map +1 -0
- package/dist/commonjs/models/invoice.d.ts +4 -0
- package/dist/commonjs/models/invoice.d.ts.map +1 -1
- package/dist/commonjs/models/invoice.js +1 -0
- package/dist/commonjs/models/invoice.js.map +1 -1
- package/dist/commonjs/models/operations/createsubscription.d.ts +24 -0
- package/dist/commonjs/models/operations/createsubscription.d.ts.map +1 -1
- package/dist/commonjs/models/operations/createsubscription.js +5 -0
- package/dist/commonjs/models/operations/createsubscription.js.map +1 -1
- package/dist/commonjs/models/operations/editsubscriptionintervals.d.ts +18 -0
- package/dist/commonjs/models/operations/editsubscriptionintervals.d.ts.map +1 -0
- package/dist/commonjs/models/operations/editsubscriptionintervals.js +56 -0
- package/dist/commonjs/models/operations/editsubscriptionintervals.js.map +1 -0
- package/dist/commonjs/models/operations/getcostreport.d.ts +5 -0
- package/dist/commonjs/models/operations/getcostreport.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getcostreport.js +1 -0
- package/dist/commonjs/models/operations/getcostreport.js.map +1 -1
- package/dist/commonjs/models/operations/getprofitability.d.ts +8 -18
- package/dist/commonjs/models/operations/getprofitability.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getprofitability.js +3 -12
- package/dist/commonjs/models/operations/getprofitability.js.map +1 -1
- package/dist/commonjs/models/operations/getrevenue.d.ts +18 -0
- package/dist/commonjs/models/operations/getrevenue.d.ts.map +1 -1
- package/dist/commonjs/models/operations/getrevenue.js +12 -1
- package/dist/commonjs/models/operations/getrevenue.js.map +1 -1
- package/dist/commonjs/models/operations/getsubscriptionintervals.d.ts +15 -0
- package/dist/commonjs/models/operations/getsubscriptionintervals.d.ts.map +1 -0
- package/dist/commonjs/models/{profitabilitytrend.js → operations/getsubscriptionintervals.js} +7 -9
- package/dist/commonjs/models/operations/getsubscriptionintervals.js.map +1 -0
- package/dist/commonjs/models/operations/index.d.ts +4 -0
- package/dist/commonjs/models/operations/index.d.ts.map +1 -1
- package/dist/commonjs/models/operations/index.js +4 -0
- package/dist/commonjs/models/operations/index.js.map +1 -1
- package/dist/commonjs/models/operations/listintervalchanges.d.ts +36 -0
- package/dist/commonjs/models/operations/listintervalchanges.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listintervalchanges.js +54 -0
- package/dist/commonjs/models/operations/listintervalchanges.js.map +1 -0
- package/dist/commonjs/models/operations/listsubscriptionintervalchanges.d.ts +25 -0
- package/dist/commonjs/models/operations/listsubscriptionintervalchanges.d.ts.map +1 -0
- package/dist/commonjs/models/operations/listsubscriptionintervalchanges.js +51 -0
- package/dist/commonjs/models/operations/listsubscriptionintervalchanges.js.map +1 -0
- package/dist/commonjs/models/operations/terminatesubscription.d.ts +6 -0
- package/dist/commonjs/models/operations/terminatesubscription.d.ts.map +1 -1
- package/dist/commonjs/models/operations/terminatesubscription.js +2 -0
- package/dist/commonjs/models/operations/terminatesubscription.js.map +1 -1
- package/dist/commonjs/models/operations/updatesubscription.d.ts +6 -0
- package/dist/commonjs/models/operations/updatesubscription.d.ts.map +1 -1
- package/dist/commonjs/models/operations/updatesubscription.js +2 -0
- package/dist/commonjs/models/operations/updatesubscription.js.map +1 -1
- package/dist/commonjs/models/profitabilityrow.d.ts +0 -5
- package/dist/commonjs/models/profitabilityrow.d.ts.map +1 -1
- package/dist/commonjs/models/profitabilityrow.js +0 -2
- package/dist/commonjs/models/profitabilityrow.js.map +1 -1
- package/dist/commonjs/models/profitabilitysummaryresponse.d.ts +17 -1
- package/dist/commonjs/models/profitabilitysummaryresponse.d.ts.map +1 -1
- package/dist/commonjs/models/profitabilitysummaryresponse.js +4 -0
- package/dist/commonjs/models/profitabilitysummaryresponse.js.map +1 -1
- package/dist/commonjs/models/subscription.d.ts +25 -1
- package/dist/commonjs/models/subscription.d.ts.map +1 -1
- package/dist/commonjs/models/subscription.js +17 -1
- package/dist/commonjs/models/subscription.js.map +1 -1
- package/dist/commonjs/models/subscriptioninterval.d.ts +80 -0
- package/dist/commonjs/models/subscriptioninterval.d.ts.map +1 -0
- package/dist/commonjs/models/subscriptioninterval.js +86 -0
- package/dist/commonjs/models/subscriptioninterval.js.map +1 -0
- package/dist/commonjs/models/subscriptionintervaladdop.d.ts +85 -0
- package/dist/commonjs/models/subscriptionintervaladdop.d.ts.map +1 -0
- package/dist/commonjs/models/subscriptionintervaladdop.js +74 -0
- package/dist/commonjs/models/subscriptionintervaladdop.js.map +1 -0
- package/dist/commonjs/models/subscriptionintervalchange.d.ts +34 -0
- package/dist/commonjs/models/subscriptionintervalchange.d.ts.map +1 -0
- package/dist/commonjs/models/subscriptionintervalchange.js +60 -0
- package/dist/commonjs/models/subscriptionintervalchange.js.map +1 -0
- package/dist/commonjs/models/subscriptionintervalchangecopy.d.ts +54 -0
- package/dist/commonjs/models/subscriptionintervalchangecopy.d.ts.map +1 -0
- package/dist/commonjs/models/subscriptionintervalchangecopy.js +77 -0
- package/dist/commonjs/models/subscriptionintervalchangecopy.js.map +1 -0
- package/dist/commonjs/models/subscriptionintervalchangeentry.d.ts +22 -0
- package/dist/commonjs/models/subscriptionintervalchangeentry.d.ts.map +1 -0
- package/dist/commonjs/models/subscriptionintervalchangeentry.js +53 -0
- package/dist/commonjs/models/subscriptionintervalchangeentry.js.map +1 -0
- package/dist/commonjs/models/subscriptionintervalchangesresponse.d.ts +16 -0
- package/dist/commonjs/models/subscriptionintervalchangesresponse.d.ts.map +1 -0
- package/dist/commonjs/models/subscriptionintervalchangesresponse.js +53 -0
- package/dist/commonjs/models/subscriptionintervalchangesresponse.js.map +1 -0
- package/dist/commonjs/models/subscriptionintervaleditop.d.ts +102 -0
- package/dist/commonjs/models/subscriptionintervaleditop.d.ts.map +1 -0
- package/dist/commonjs/models/subscriptionintervaleditop.js +78 -0
- package/dist/commonjs/models/subscriptionintervaleditop.js.map +1 -0
- package/dist/commonjs/models/subscriptionintervalremoveop.d.ts +15 -0
- package/dist/commonjs/models/subscriptionintervalremoveop.d.ts.map +1 -0
- package/dist/commonjs/models/subscriptionintervalremoveop.js +49 -0
- package/dist/commonjs/models/subscriptionintervalremoveop.js.map +1 -0
- package/dist/commonjs/models/subscriptionintervalsresponse.d.ts +14 -0
- package/dist/commonjs/models/subscriptionintervalsresponse.d.ts.map +1 -0
- package/dist/commonjs/models/subscriptionintervalsresponse.js +51 -0
- package/dist/commonjs/models/subscriptionintervalsresponse.js.map +1 -0
- package/dist/commonjs/models/subscriptionversionpolicy.d.ts +18 -0
- package/dist/commonjs/models/subscriptionversionpolicy.d.ts.map +1 -0
- package/dist/commonjs/models/subscriptionversionpolicy.js +52 -0
- package/dist/commonjs/models/subscriptionversionpolicy.js.map +1 -0
- package/dist/commonjs/sdk/subscriptions.d.ts +28 -0
- package/dist/commonjs/sdk/subscriptions.d.ts.map +1 -1
- package/dist/commonjs/sdk/subscriptions.js +40 -0
- package/dist/commonjs/sdk/subscriptions.js.map +1 -1
- package/dist/esm/funcs/costsGetCostReport.js +1 -0
- package/dist/esm/funcs/costsGetCostReport.js.map +1 -1
- package/dist/esm/funcs/profitabilityGetProfitability.js +2 -1
- package/dist/esm/funcs/profitabilityGetProfitability.js.map +1 -1
- package/dist/esm/funcs/revenueGet.js +1 -0
- package/dist/esm/funcs/revenueGet.js.map +1 -1
- package/dist/esm/funcs/subscriptionsEditSubscriptionIntervals.d.ts +19 -0
- package/dist/esm/funcs/subscriptionsEditSubscriptionIntervals.d.ts.map +1 -0
- package/dist/esm/funcs/subscriptionsEditSubscriptionIntervals.js +91 -0
- package/dist/esm/funcs/subscriptionsEditSubscriptionIntervals.js.map +1 -0
- package/dist/esm/funcs/subscriptionsGetSubscriptionIntervals.d.ts +19 -0
- package/dist/esm/funcs/subscriptionsGetSubscriptionIntervals.d.ts.map +1 -0
- package/dist/esm/funcs/subscriptionsGetSubscriptionIntervals.js +88 -0
- package/dist/esm/funcs/subscriptionsGetSubscriptionIntervals.js.map +1 -0
- package/dist/esm/funcs/subscriptionsListIntervalChanges.d.ts +19 -0
- package/dist/esm/funcs/subscriptionsListIntervalChanges.d.ts.map +1 -0
- package/dist/esm/funcs/subscriptionsListIntervalChanges.js +90 -0
- package/dist/esm/funcs/subscriptionsListIntervalChanges.js.map +1 -0
- package/dist/esm/funcs/subscriptionsListSubscriptionIntervalChanges.d.ts +19 -0
- package/dist/esm/funcs/subscriptionsListSubscriptionIntervalChanges.d.ts.map +1 -0
- package/dist/esm/funcs/subscriptionsListSubscriptionIntervalChanges.js +93 -0
- package/dist/esm/funcs/subscriptionsListSubscriptionIntervalChanges.js.map +1 -0
- package/dist/esm/lib/config.d.ts +2 -2
- package/dist/esm/lib/config.js +2 -2
- package/dist/esm/models/changereason.d.ts +20 -0
- package/dist/esm/models/changereason.d.ts.map +1 -0
- package/dist/esm/models/changereason.js +18 -0
- package/dist/esm/models/changereason.js.map +1 -0
- package/dist/esm/models/costreportresponse.d.ts +8 -0
- package/dist/esm/models/costreportresponse.d.ts.map +1 -1
- package/dist/esm/models/costreportresponse.js +2 -0
- package/dist/esm/models/costreportresponse.js.map +1 -1
- package/dist/esm/models/editsubscriptionintervalsrequestunion.d.ts +142 -0
- package/dist/esm/models/editsubscriptionintervalsrequestunion.d.ts.map +1 -0
- package/dist/esm/models/editsubscriptionintervalsrequestunion.js +55 -0
- package/dist/esm/models/editsubscriptionintervalsrequestunion.js.map +1 -0
- package/dist/esm/models/editsubscriptionintervalsresponse.d.ts +41 -0
- package/dist/esm/models/editsubscriptionintervalsresponse.d.ts.map +1 -0
- package/dist/esm/models/editsubscriptionintervalsresponse.js +27 -0
- package/dist/esm/models/editsubscriptionintervalsresponse.js.map +1 -0
- package/dist/esm/models/index.d.ts +14 -1
- package/dist/esm/models/index.d.ts.map +1 -1
- package/dist/esm/models/index.js +14 -1
- package/dist/esm/models/index.js.map +1 -1
- package/dist/esm/models/intervalchangemetadata.d.ts +13 -0
- package/dist/esm/models/intervalchangemetadata.d.ts.map +1 -0
- package/dist/esm/models/intervalchangemetadata.js +16 -0
- package/dist/esm/models/intervalchangemetadata.js.map +1 -0
- package/dist/esm/models/invoice.d.ts +4 -0
- package/dist/esm/models/invoice.d.ts.map +1 -1
- package/dist/esm/models/invoice.js +1 -0
- package/dist/esm/models/invoice.js.map +1 -1
- package/dist/esm/models/operations/createsubscription.d.ts +24 -0
- package/dist/esm/models/operations/createsubscription.d.ts.map +1 -1
- package/dist/esm/models/operations/createsubscription.js +5 -0
- package/dist/esm/models/operations/createsubscription.js.map +1 -1
- package/dist/esm/models/operations/editsubscriptionintervals.d.ts +18 -0
- package/dist/esm/models/operations/editsubscriptionintervals.d.ts.map +1 -0
- package/dist/esm/models/operations/editsubscriptionintervals.js +19 -0
- package/dist/esm/models/operations/editsubscriptionintervals.js.map +1 -0
- package/dist/esm/models/operations/getcostreport.d.ts +5 -0
- package/dist/esm/models/operations/getcostreport.d.ts.map +1 -1
- package/dist/esm/models/operations/getcostreport.js +1 -0
- package/dist/esm/models/operations/getcostreport.js.map +1 -1
- package/dist/esm/models/operations/getprofitability.d.ts +8 -18
- package/dist/esm/models/operations/getprofitability.d.ts.map +1 -1
- package/dist/esm/models/operations/getprofitability.js +2 -11
- package/dist/esm/models/operations/getprofitability.js.map +1 -1
- package/dist/esm/models/operations/getrevenue.d.ts +18 -0
- package/dist/esm/models/operations/getrevenue.d.ts.map +1 -1
- package/dist/esm/models/operations/getrevenue.js +11 -0
- package/dist/esm/models/operations/getrevenue.js.map +1 -1
- package/dist/esm/models/operations/getsubscriptionintervals.d.ts +15 -0
- package/dist/esm/models/operations/getsubscriptionintervals.d.ts.map +1 -0
- package/dist/esm/models/operations/getsubscriptionintervals.js +12 -0
- package/dist/esm/models/operations/getsubscriptionintervals.js.map +1 -0
- package/dist/esm/models/operations/index.d.ts +4 -0
- package/dist/esm/models/operations/index.d.ts.map +1 -1
- package/dist/esm/models/operations/index.js +4 -0
- package/dist/esm/models/operations/index.js.map +1 -1
- package/dist/esm/models/operations/listintervalchanges.d.ts +36 -0
- package/dist/esm/models/operations/listintervalchanges.d.ts.map +1 -0
- package/dist/esm/models/operations/listintervalchanges.js +17 -0
- package/dist/esm/models/operations/listintervalchanges.js.map +1 -0
- package/dist/esm/models/operations/listsubscriptionintervalchanges.d.ts +25 -0
- package/dist/esm/models/operations/listsubscriptionintervalchanges.d.ts.map +1 -0
- package/dist/esm/models/operations/listsubscriptionintervalchanges.js +14 -0
- package/dist/esm/models/operations/listsubscriptionintervalchanges.js.map +1 -0
- package/dist/esm/models/operations/terminatesubscription.d.ts +6 -0
- package/dist/esm/models/operations/terminatesubscription.d.ts.map +1 -1
- package/dist/esm/models/operations/terminatesubscription.js +2 -0
- package/dist/esm/models/operations/terminatesubscription.js.map +1 -1
- package/dist/esm/models/operations/updatesubscription.d.ts +6 -0
- package/dist/esm/models/operations/updatesubscription.d.ts.map +1 -1
- package/dist/esm/models/operations/updatesubscription.js +2 -0
- package/dist/esm/models/operations/updatesubscription.js.map +1 -1
- package/dist/esm/models/profitabilityrow.d.ts +0 -5
- package/dist/esm/models/profitabilityrow.d.ts.map +1 -1
- package/dist/esm/models/profitabilityrow.js +0 -2
- package/dist/esm/models/profitabilityrow.js.map +1 -1
- package/dist/esm/models/profitabilitysummaryresponse.d.ts +17 -1
- package/dist/esm/models/profitabilitysummaryresponse.d.ts.map +1 -1
- package/dist/esm/models/profitabilitysummaryresponse.js +4 -0
- package/dist/esm/models/profitabilitysummaryresponse.js.map +1 -1
- package/dist/esm/models/subscription.d.ts +25 -1
- package/dist/esm/models/subscription.d.ts.map +1 -1
- package/dist/esm/models/subscription.js +16 -0
- package/dist/esm/models/subscription.js.map +1 -1
- package/dist/esm/models/subscriptioninterval.d.ts +80 -0
- package/dist/esm/models/subscriptioninterval.d.ts.map +1 -0
- package/dist/esm/models/subscriptioninterval.js +48 -0
- package/dist/esm/models/subscriptioninterval.js.map +1 -0
- package/dist/esm/models/subscriptionintervaladdop.d.ts +85 -0
- package/dist/esm/models/subscriptionintervaladdop.d.ts.map +1 -0
- package/dist/esm/models/subscriptionintervaladdop.js +36 -0
- package/dist/esm/models/subscriptionintervaladdop.js.map +1 -0
- package/dist/esm/models/subscriptionintervalchange.d.ts +34 -0
- package/dist/esm/models/subscriptionintervalchange.d.ts.map +1 -0
- package/dist/esm/models/subscriptionintervalchange.js +23 -0
- package/dist/esm/models/subscriptionintervalchange.js.map +1 -0
- package/dist/esm/models/subscriptionintervalchangecopy.d.ts +54 -0
- package/dist/esm/models/subscriptionintervalchangecopy.d.ts.map +1 -0
- package/dist/esm/models/subscriptionintervalchangecopy.js +39 -0
- package/dist/esm/models/subscriptionintervalchangecopy.js.map +1 -0
- package/dist/esm/models/subscriptionintervalchangeentry.d.ts +22 -0
- package/dist/esm/models/subscriptionintervalchangeentry.d.ts.map +1 -0
- package/dist/esm/models/subscriptionintervalchangeentry.js +16 -0
- package/dist/esm/models/subscriptionintervalchangeentry.js.map +1 -0
- package/dist/esm/models/subscriptionintervalchangesresponse.d.ts +16 -0
- package/dist/esm/models/subscriptionintervalchangesresponse.d.ts.map +1 -0
- package/dist/esm/models/subscriptionintervalchangesresponse.js +16 -0
- package/dist/esm/models/subscriptionintervalchangesresponse.js.map +1 -0
- package/dist/esm/models/subscriptionintervaleditop.d.ts +102 -0
- package/dist/esm/models/subscriptionintervaleditop.d.ts.map +1 -0
- package/dist/esm/models/subscriptionintervaleditop.js +40 -0
- package/dist/esm/models/subscriptionintervaleditop.js.map +1 -0
- package/dist/esm/models/subscriptionintervalremoveop.d.ts +15 -0
- package/dist/esm/models/subscriptionintervalremoveop.d.ts.map +1 -0
- package/dist/esm/models/subscriptionintervalremoveop.js +12 -0
- package/dist/esm/models/subscriptionintervalremoveop.js.map +1 -0
- package/dist/esm/models/subscriptionintervalsresponse.d.ts +14 -0
- package/dist/esm/models/subscriptionintervalsresponse.d.ts.map +1 -0
- package/dist/esm/models/subscriptionintervalsresponse.js +14 -0
- package/dist/esm/models/subscriptionintervalsresponse.js.map +1 -0
- package/dist/esm/models/subscriptionversionpolicy.d.ts +18 -0
- package/dist/esm/models/subscriptionversionpolicy.d.ts.map +1 -0
- package/dist/esm/models/subscriptionversionpolicy.js +16 -0
- package/dist/esm/models/subscriptionversionpolicy.js.map +1 -0
- package/dist/esm/sdk/subscriptions.d.ts +28 -0
- package/dist/esm/sdk/subscriptions.d.ts.map +1 -1
- package/dist/esm/sdk/subscriptions.js +40 -0
- package/dist/esm/sdk/subscriptions.js.map +1 -1
- package/jsr.json +1 -1
- package/package.json +1 -1
- package/src/funcs/costsGetCostReport.ts +1 -0
- package/src/funcs/profitabilityGetProfitability.ts +2 -1
- package/src/funcs/revenueGet.ts +1 -0
- package/src/funcs/subscriptionsEditSubscriptionIntervals.ts +184 -0
- package/src/funcs/subscriptionsGetSubscriptionIntervals.ts +177 -0
- package/src/funcs/subscriptionsListIntervalChanges.ts +186 -0
- package/src/funcs/subscriptionsListSubscriptionIntervalChanges.ts +185 -0
- package/src/lib/config.ts +2 -2
- package/src/models/changereason.ts +34 -0
- package/src/models/costreportresponse.ts +10 -0
- package/src/models/editsubscriptionintervalsrequestunion.ts +244 -0
- package/src/models/editsubscriptionintervalsresponse.ts +96 -0
- package/src/models/index.ts +14 -1
- package/src/models/intervalchangemetadata.ts +43 -0
- package/src/models/invoice.ts +7 -0
- package/src/models/operations/createsubscription.ts +27 -0
- package/src/models/operations/editsubscriptionintervals.ts +48 -0
- package/src/models/operations/getcostreport.ts +6 -0
- package/src/models/operations/getprofitability.ts +10 -25
- package/src/models/operations/getrevenue.ts +22 -0
- package/src/models/operations/getsubscriptionintervals.ts +36 -0
- package/src/models/operations/index.ts +4 -0
- package/src/models/operations/listintervalchanges.ts +59 -0
- package/src/models/operations/listsubscriptionintervalchanges.ts +49 -0
- package/src/models/operations/terminatesubscription.ts +7 -0
- package/src/models/operations/updatesubscription.ts +7 -0
- package/src/models/profitabilityrow.ts +0 -9
- package/src/models/profitabilitysummaryresponse.ts +21 -1
- package/src/models/subscription.ts +38 -1
- package/src/models/subscriptioninterval.ts +152 -0
- package/src/models/subscriptionintervaladdop.ts +148 -0
- package/src/models/subscriptionintervalchange.ts +66 -0
- package/src/models/subscriptionintervalchangecopy.ts +130 -0
- package/src/models/subscriptionintervalchangeentry.ts +48 -0
- package/src/models/subscriptionintervalchangesresponse.ts +45 -0
- package/src/models/subscriptionintervaleditop.ts +166 -0
- package/src/models/subscriptionintervalremoveop.ts +36 -0
- package/src/models/subscriptionintervalsresponse.ts +38 -0
- package/src/models/subscriptionversionpolicy.ts +29 -0
- package/src/sdk/subscriptions.ts +72 -0
- package/dist/commonjs/models/profitabilitytrend.d.ts +0 -17
- package/dist/commonjs/models/profitabilitytrend.d.ts.map +0 -1
- package/dist/commonjs/models/profitabilitytrend.js.map +0 -1
- package/dist/esm/models/profitabilitytrend.d.ts +0 -17
- package/dist/esm/models/profitabilitytrend.d.ts.map +0 -1
- package/dist/esm/models/profitabilitytrend.js +0 -14
- package/dist/esm/models/profitabilitytrend.js.map +0 -1
- package/src/models/profitabilitytrend.ts +0 -39
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
import {
|
|
10
|
+
SubscriptionInterval,
|
|
11
|
+
SubscriptionInterval$inboundSchema,
|
|
12
|
+
} from "./subscriptioninterval.js";
|
|
13
|
+
import {
|
|
14
|
+
SubscriptionIntervalChange,
|
|
15
|
+
SubscriptionIntervalChange$inboundSchema,
|
|
16
|
+
} from "./subscriptionintervalchange.js";
|
|
17
|
+
|
|
18
|
+
export type EditSubscriptionIntervalsResponseLineItems = {
|
|
19
|
+
/**
|
|
20
|
+
* Number of distinct prices that gained a line item as this timeline edit was re-derived into billing.
|
|
21
|
+
*/
|
|
22
|
+
created: number;
|
|
23
|
+
/**
|
|
24
|
+
* Number of distinct prices whose future/uninvoiced line items were removed as this timeline edit was re-derived into billing.
|
|
25
|
+
*/
|
|
26
|
+
removed: number;
|
|
27
|
+
/**
|
|
28
|
+
* True when the timeline edit was saved but the line-item re-derive failed. The edit is not rolled back, and the re-derive is retried automatically. Resubmitting the same request retries it sooner.
|
|
29
|
+
*/
|
|
30
|
+
syncFailed?: boolean | undefined;
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
export type EditSubscriptionIntervalsResponse = {
|
|
34
|
+
/**
|
|
35
|
+
* The timeline's effective price intervals after applying the op set, ordered by start date.
|
|
36
|
+
*/
|
|
37
|
+
intervals: Array<SubscriptionInterval>;
|
|
38
|
+
/**
|
|
39
|
+
* True when the op set resolved to no change and nothing was written.
|
|
40
|
+
*/
|
|
41
|
+
unchanged: boolean;
|
|
42
|
+
lineItems: EditSubscriptionIntervalsResponseLineItems;
|
|
43
|
+
/**
|
|
44
|
+
* The record this edit wrote. Null when the edit changed nothing.
|
|
45
|
+
*/
|
|
46
|
+
intervalChange: SubscriptionIntervalChange | null;
|
|
47
|
+
};
|
|
48
|
+
|
|
49
|
+
/** @internal */
|
|
50
|
+
export const EditSubscriptionIntervalsResponseLineItems$inboundSchema:
|
|
51
|
+
z.ZodType<EditSubscriptionIntervalsResponseLineItems, z.ZodTypeDef, unknown> =
|
|
52
|
+
z.object({
|
|
53
|
+
created: z.number().int(),
|
|
54
|
+
removed: z.number().int(),
|
|
55
|
+
syncFailed: z.boolean().optional(),
|
|
56
|
+
});
|
|
57
|
+
|
|
58
|
+
export function editSubscriptionIntervalsResponseLineItemsFromJSON(
|
|
59
|
+
jsonString: string,
|
|
60
|
+
): SafeParseResult<
|
|
61
|
+
EditSubscriptionIntervalsResponseLineItems,
|
|
62
|
+
SDKValidationError
|
|
63
|
+
> {
|
|
64
|
+
return safeParse(
|
|
65
|
+
jsonString,
|
|
66
|
+
(x) =>
|
|
67
|
+
EditSubscriptionIntervalsResponseLineItems$inboundSchema.parse(
|
|
68
|
+
JSON.parse(x),
|
|
69
|
+
),
|
|
70
|
+
`Failed to parse 'EditSubscriptionIntervalsResponseLineItems' from JSON`,
|
|
71
|
+
);
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
/** @internal */
|
|
75
|
+
export const EditSubscriptionIntervalsResponse$inboundSchema: z.ZodType<
|
|
76
|
+
EditSubscriptionIntervalsResponse,
|
|
77
|
+
z.ZodTypeDef,
|
|
78
|
+
unknown
|
|
79
|
+
> = z.object({
|
|
80
|
+
intervals: z.array(SubscriptionInterval$inboundSchema),
|
|
81
|
+
unchanged: z.boolean(),
|
|
82
|
+
lineItems: z.lazy(() =>
|
|
83
|
+
EditSubscriptionIntervalsResponseLineItems$inboundSchema
|
|
84
|
+
),
|
|
85
|
+
intervalChange: z.nullable(SubscriptionIntervalChange$inboundSchema),
|
|
86
|
+
});
|
|
87
|
+
|
|
88
|
+
export function editSubscriptionIntervalsResponseFromJSON(
|
|
89
|
+
jsonString: string,
|
|
90
|
+
): SafeParseResult<EditSubscriptionIntervalsResponse, SDKValidationError> {
|
|
91
|
+
return safeParse(
|
|
92
|
+
jsonString,
|
|
93
|
+
(x) => EditSubscriptionIntervalsResponse$inboundSchema.parse(JSON.parse(x)),
|
|
94
|
+
`Failed to parse 'EditSubscriptionIntervalsResponse' from JSON`,
|
|
95
|
+
);
|
|
96
|
+
}
|
package/src/models/index.ts
CHANGED
|
@@ -9,6 +9,7 @@ export * from "./billablemetric.js";
|
|
|
9
9
|
export * from "./billingschedule.js";
|
|
10
10
|
export * from "./booleanentitlementdetail.js";
|
|
11
11
|
export * from "./booleanentitlementlistitem.js";
|
|
12
|
+
export * from "./changereason.js";
|
|
12
13
|
export * from "./cost.js";
|
|
13
14
|
export * from "./costreportgroup.js";
|
|
14
15
|
export * from "./costreportresponse.js";
|
|
@@ -30,6 +31,8 @@ export * from "./createusagediscountadjustment.js";
|
|
|
30
31
|
export * from "./currencybreakdownentry.js";
|
|
31
32
|
export * from "./customer.js";
|
|
32
33
|
export * from "./customerpaymentsession.js";
|
|
34
|
+
export * from "./editsubscriptionintervalsrequestunion.js";
|
|
35
|
+
export * from "./editsubscriptionintervalsresponse.js";
|
|
33
36
|
export * from "./entitlementdetail.js";
|
|
34
37
|
export * from "./entitlementlistitem.js";
|
|
35
38
|
export * from "./entitlementstatus.js";
|
|
@@ -42,6 +45,7 @@ export * from "./fee.js";
|
|
|
42
45
|
export * from "./grant.js";
|
|
43
46
|
export * from "./groupinvoicesummary.js";
|
|
44
47
|
export * from "./grouptrendentry.js";
|
|
48
|
+
export * from "./intervalchangemetadata.js";
|
|
45
49
|
export * from "./invoice.js";
|
|
46
50
|
export * from "./invoicecategorysummary.js";
|
|
47
51
|
export * from "./invoicelineitem.js";
|
|
@@ -93,7 +97,6 @@ export * from "./pricetax.js";
|
|
|
93
97
|
export * from "./product.js";
|
|
94
98
|
export * from "./profitabilityrow.js";
|
|
95
99
|
export * from "./profitabilitysummaryresponse.js";
|
|
96
|
-
export * from "./profitabilitytrend.js";
|
|
97
100
|
export * from "./purchasegrantrequest.js";
|
|
98
101
|
export * from "./purchasegrantresponse.js";
|
|
99
102
|
export * from "./ratetype.js";
|
|
@@ -117,9 +120,19 @@ export * from "./staticentitlementlistitem.js";
|
|
|
117
120
|
export * from "./subscription.js";
|
|
118
121
|
export * from "./subscriptionadjustment.js";
|
|
119
122
|
export * from "./subscriptionadjustmentsresponse.js";
|
|
123
|
+
export * from "./subscriptioninterval.js";
|
|
124
|
+
export * from "./subscriptionintervaladdop.js";
|
|
125
|
+
export * from "./subscriptionintervalchange.js";
|
|
126
|
+
export * from "./subscriptionintervalchangecopy.js";
|
|
127
|
+
export * from "./subscriptionintervalchangeentry.js";
|
|
128
|
+
export * from "./subscriptionintervalchangesresponse.js";
|
|
129
|
+
export * from "./subscriptionintervaleditop.js";
|
|
130
|
+
export * from "./subscriptionintervalremoveop.js";
|
|
131
|
+
export * from "./subscriptionintervalsresponse.js";
|
|
120
132
|
export * from "./subscriptionmetadata.js";
|
|
121
133
|
export * from "./subscriptionportal.js";
|
|
122
134
|
export * from "./subscriptionreconciliation.js";
|
|
135
|
+
export * from "./subscriptionversionpolicy.js";
|
|
123
136
|
export * from "./testclock.js";
|
|
124
137
|
export * from "./transitionplanversionrequest.js";
|
|
125
138
|
export * from "./updateapprovalrequest.js";
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { safeParse } from "../lib/schemas.js";
|
|
7
|
+
import { Result as SafeParseResult } from "../types/fp.js";
|
|
8
|
+
import { SDKValidationError } from "./errors/sdkvalidationerror.js";
|
|
9
|
+
|
|
10
|
+
export type IntervalChangeMetadata = string | number | boolean;
|
|
11
|
+
|
|
12
|
+
/** @internal */
|
|
13
|
+
export const IntervalChangeMetadata$inboundSchema: z.ZodType<
|
|
14
|
+
IntervalChangeMetadata,
|
|
15
|
+
z.ZodTypeDef,
|
|
16
|
+
unknown
|
|
17
|
+
> = z.union([z.string(), z.number(), z.boolean()]);
|
|
18
|
+
/** @internal */
|
|
19
|
+
export type IntervalChangeMetadata$Outbound = string | number | boolean;
|
|
20
|
+
|
|
21
|
+
/** @internal */
|
|
22
|
+
export const IntervalChangeMetadata$outboundSchema: z.ZodType<
|
|
23
|
+
IntervalChangeMetadata$Outbound,
|
|
24
|
+
z.ZodTypeDef,
|
|
25
|
+
IntervalChangeMetadata
|
|
26
|
+
> = z.union([z.string(), z.number(), z.boolean()]);
|
|
27
|
+
|
|
28
|
+
export function intervalChangeMetadataToJSON(
|
|
29
|
+
intervalChangeMetadata: IntervalChangeMetadata,
|
|
30
|
+
): string {
|
|
31
|
+
return JSON.stringify(
|
|
32
|
+
IntervalChangeMetadata$outboundSchema.parse(intervalChangeMetadata),
|
|
33
|
+
);
|
|
34
|
+
}
|
|
35
|
+
export function intervalChangeMetadataFromJSON(
|
|
36
|
+
jsonString: string,
|
|
37
|
+
): SafeParseResult<IntervalChangeMetadata, SDKValidationError> {
|
|
38
|
+
return safeParse(
|
|
39
|
+
jsonString,
|
|
40
|
+
(x) => IntervalChangeMetadata$inboundSchema.parse(JSON.parse(x)),
|
|
41
|
+
`Failed to parse 'IntervalChangeMetadata' from JSON`,
|
|
42
|
+
);
|
|
43
|
+
}
|
package/src/models/invoice.ts
CHANGED
|
@@ -210,6 +210,10 @@ export type Invoice = {
|
|
|
210
210
|
* When the invoice was paid (null if not yet paid)
|
|
211
211
|
*/
|
|
212
212
|
paidAt?: Date | null | undefined;
|
|
213
|
+
/**
|
|
214
|
+
* When the invoice was issued, in the subscription's effective time (test-clock time on a test clock). Revenue and profitability windows count the invoice by this instant. Null until the invoice is issued.
|
|
215
|
+
*/
|
|
216
|
+
issuedAt?: Date | null | undefined;
|
|
213
217
|
/**
|
|
214
218
|
* Payment due date snapshotted at invoice-create time as the issue date + subscription.paymentTermDays, anchored to midnight UTC. Null only for invoices created before this feature shipped (no backfill).
|
|
215
219
|
*/
|
|
@@ -381,6 +385,9 @@ export const Invoice$inboundSchema: z.ZodType<Invoice, z.ZodTypeDef, unknown> =
|
|
|
381
385
|
paidAt: z.nullable(
|
|
382
386
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
383
387
|
).optional(),
|
|
388
|
+
issuedAt: z.nullable(
|
|
389
|
+
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
390
|
+
).optional(),
|
|
384
391
|
dueAt: z.nullable(
|
|
385
392
|
z.string().datetime({ offset: true }).transform(v => new Date(v)),
|
|
386
393
|
).optional(),
|
|
@@ -117,10 +117,26 @@ export type CreateSubscriptionRequest = {
|
|
|
117
117
|
* Number of minutes until the payment session expires. Defaults to 240 minutes (4 hours) if not provided.
|
|
118
118
|
*/
|
|
119
119
|
sessionExpiryMinutes?: number | undefined;
|
|
120
|
+
/**
|
|
121
|
+
* How the subscription follows new versions of its plan. `floating` follows the plan's default version: when the default changes, the subscription bills from the new default from its next billing period. `pinned` keeps the plan version that the subscription holds. A subscription created without a value is `floating`. A change to this value does not change a billing period that has already started.
|
|
122
|
+
*/
|
|
123
|
+
versionPolicy?: models.SubscriptionVersionPolicy | undefined;
|
|
120
124
|
/**
|
|
121
125
|
* Free-form merchant metadata to attach to the subscription. Values must be strings, numbers, or booleans.
|
|
122
126
|
*/
|
|
123
127
|
metadata?: { [k: string]: models.SubscriptionMetadata } | undefined;
|
|
128
|
+
/**
|
|
129
|
+
* Why a change was made. `correction` fixes data to match what was agreed; `migration` moves a contract from another system; `commercial` is a real change to the deal. Defaults to `unspecified`.
|
|
130
|
+
*/
|
|
131
|
+
changeReason?: models.ChangeReason | undefined;
|
|
132
|
+
/**
|
|
133
|
+
* A free-text note on why these intervals are changing.
|
|
134
|
+
*/
|
|
135
|
+
changeDescription?: string | undefined;
|
|
136
|
+
/**
|
|
137
|
+
* Your own key-value data about the change, such as a CRM deal ID.
|
|
138
|
+
*/
|
|
139
|
+
changeMetadata?: { [k: string]: models.IntervalChangeMetadata } | undefined;
|
|
124
140
|
};
|
|
125
141
|
|
|
126
142
|
/** @internal */
|
|
@@ -215,7 +231,13 @@ export type CreateSubscriptionRequest$Outbound = {
|
|
|
215
231
|
renewalReminderDays?: number | null | undefined;
|
|
216
232
|
paymentTermDays?: number | undefined;
|
|
217
233
|
sessionExpiryMinutes?: number | undefined;
|
|
234
|
+
versionPolicy?: string | undefined;
|
|
218
235
|
metadata?: { [k: string]: models.SubscriptionMetadata$Outbound } | undefined;
|
|
236
|
+
changeReason?: string | undefined;
|
|
237
|
+
changeDescription?: string | undefined;
|
|
238
|
+
changeMetadata?:
|
|
239
|
+
| { [k: string]: models.IntervalChangeMetadata$Outbound }
|
|
240
|
+
| undefined;
|
|
219
241
|
};
|
|
220
242
|
|
|
221
243
|
/** @internal */
|
|
@@ -240,7 +262,12 @@ export const CreateSubscriptionRequest$outboundSchema: z.ZodType<
|
|
|
240
262
|
renewalReminderDays: z.nullable(z.number().int()).optional(),
|
|
241
263
|
paymentTermDays: z.number().int().optional(),
|
|
242
264
|
sessionExpiryMinutes: z.number().optional(),
|
|
265
|
+
versionPolicy: models.SubscriptionVersionPolicy$outboundSchema.optional(),
|
|
243
266
|
metadata: z.record(models.SubscriptionMetadata$outboundSchema).optional(),
|
|
267
|
+
changeReason: models.ChangeReason$outboundSchema.optional(),
|
|
268
|
+
changeDescription: z.string().optional(),
|
|
269
|
+
changeMetadata: z.record(models.IntervalChangeMetadata$outboundSchema)
|
|
270
|
+
.optional(),
|
|
244
271
|
});
|
|
245
272
|
|
|
246
273
|
export function createSubscriptionRequestToJSON(
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
8
|
+
|
|
9
|
+
export type EditSubscriptionIntervalsRequest = {
|
|
10
|
+
/**
|
|
11
|
+
* The subscription ID
|
|
12
|
+
*/
|
|
13
|
+
id: string;
|
|
14
|
+
editSubscriptionIntervalsRequest:
|
|
15
|
+
models.EditSubscriptionIntervalsRequestUnion;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
/** @internal */
|
|
19
|
+
export type EditSubscriptionIntervalsRequest$Outbound = {
|
|
20
|
+
id: string;
|
|
21
|
+
EditSubscriptionIntervalsRequest:
|
|
22
|
+
models.EditSubscriptionIntervalsRequestUnion$Outbound;
|
|
23
|
+
};
|
|
24
|
+
|
|
25
|
+
/** @internal */
|
|
26
|
+
export const EditSubscriptionIntervalsRequest$outboundSchema: z.ZodType<
|
|
27
|
+
EditSubscriptionIntervalsRequest$Outbound,
|
|
28
|
+
z.ZodTypeDef,
|
|
29
|
+
EditSubscriptionIntervalsRequest
|
|
30
|
+
> = z.object({
|
|
31
|
+
id: z.string(),
|
|
32
|
+
editSubscriptionIntervalsRequest:
|
|
33
|
+
models.EditSubscriptionIntervalsRequestUnion$outboundSchema,
|
|
34
|
+
}).transform((v) => {
|
|
35
|
+
return remap$(v, {
|
|
36
|
+
editSubscriptionIntervalsRequest: "EditSubscriptionIntervalsRequest",
|
|
37
|
+
});
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export function editSubscriptionIntervalsRequestToJSON(
|
|
41
|
+
editSubscriptionIntervalsRequest: EditSubscriptionIntervalsRequest,
|
|
42
|
+
): string {
|
|
43
|
+
return JSON.stringify(
|
|
44
|
+
EditSubscriptionIntervalsRequest$outboundSchema.parse(
|
|
45
|
+
editSubscriptionIntervalsRequest,
|
|
46
|
+
),
|
|
47
|
+
);
|
|
48
|
+
}
|
|
@@ -81,6 +81,10 @@ export type GetCostReportRequest = {
|
|
|
81
81
|
* When true, include prior-period comparison data in each group.
|
|
82
82
|
*/
|
|
83
83
|
comparePriorPeriod?: boolean | undefined;
|
|
84
|
+
/**
|
|
85
|
+
* When true, leave out groups with neither cost nor usage in the period. They are dropped before ranking, so they take no top-N slot, do not appear in the 'Other' bucket and are not counted in `pagination.total`. `emptyGroupCount` says how many were left out.
|
|
86
|
+
*/
|
|
87
|
+
excludeEmpty?: boolean | undefined;
|
|
84
88
|
/**
|
|
85
89
|
* Time window granularity for the time-series breakdown.
|
|
86
90
|
*/
|
|
@@ -132,6 +136,7 @@ export type GetCostReportRequest$Outbound = {
|
|
|
132
136
|
filterGroupBy?: string | undefined;
|
|
133
137
|
topN: number;
|
|
134
138
|
comparePriorPeriod: boolean;
|
|
139
|
+
excludeEmpty: boolean;
|
|
135
140
|
windowSize?: string | undefined;
|
|
136
141
|
sort: string;
|
|
137
142
|
sortDir: string;
|
|
@@ -155,6 +160,7 @@ export const GetCostReportRequest$outboundSchema: z.ZodType<
|
|
|
155
160
|
filterGroupBy: z.string().optional(),
|
|
156
161
|
topN: z.number().int().default(9),
|
|
157
162
|
comparePriorPeriod: z.boolean().default(false),
|
|
163
|
+
excludeEmpty: z.boolean().default(false),
|
|
158
164
|
windowSize: GetCostReportWindowSize$outboundSchema.optional(),
|
|
159
165
|
sort: Sort$outboundSchema.default("totalCost"),
|
|
160
166
|
sortDir: SortDir$outboundSchema.default("desc"),
|
|
@@ -3,22 +3,6 @@
|
|
|
3
3
|
*/
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
|
-
import { ClosedEnum } from "../../types/enums.js";
|
|
7
|
-
|
|
8
|
-
/**
|
|
9
|
-
* Time bucket granularity for the per-customer revenue trend. When omitted, the server picks a reasonable bucket from the window length.
|
|
10
|
-
*/
|
|
11
|
-
export const GetProfitabilityBucketWidth = {
|
|
12
|
-
Hour: "hour",
|
|
13
|
-
Day: "day",
|
|
14
|
-
Week: "week",
|
|
15
|
-
} as const;
|
|
16
|
-
/**
|
|
17
|
-
* Time bucket granularity for the per-customer revenue trend. When omitted, the server picks a reasonable bucket from the window length.
|
|
18
|
-
*/
|
|
19
|
-
export type GetProfitabilityBucketWidth = ClosedEnum<
|
|
20
|
-
typeof GetProfitabilityBucketWidth
|
|
21
|
-
>;
|
|
22
6
|
|
|
23
7
|
export type GetProfitabilityRequest = {
|
|
24
8
|
/**
|
|
@@ -42,16 +26,15 @@ export type GetProfitabilityRequest = {
|
|
|
42
26
|
*/
|
|
43
27
|
currency?: string | undefined;
|
|
44
28
|
/**
|
|
45
|
-
*
|
|
29
|
+
* When true, leave customers with neither revenue nor cost in the period out of `rows`. They are dropped before ranking, so they take no top-N slot and are not folded into the 'Other' row. `emptyCustomerCount` says how many there are either way.
|
|
46
30
|
*/
|
|
47
|
-
|
|
31
|
+
excludeEmpty?: boolean | undefined;
|
|
32
|
+
/**
|
|
33
|
+
* When true, also return in `emptyCustomers` the customers counted in `emptyCustomerCount` that `rows` does not carry, so a caller can show the complete customer list.
|
|
34
|
+
*/
|
|
35
|
+
includeEmpty?: boolean | undefined;
|
|
48
36
|
};
|
|
49
37
|
|
|
50
|
-
/** @internal */
|
|
51
|
-
export const GetProfitabilityBucketWidth$outboundSchema: z.ZodNativeEnum<
|
|
52
|
-
typeof GetProfitabilityBucketWidth
|
|
53
|
-
> = z.nativeEnum(GetProfitabilityBucketWidth);
|
|
54
|
-
|
|
55
38
|
/** @internal */
|
|
56
39
|
export type GetProfitabilityRequest$Outbound = {
|
|
57
40
|
merchantId: string;
|
|
@@ -59,7 +42,8 @@ export type GetProfitabilityRequest$Outbound = {
|
|
|
59
42
|
to: string;
|
|
60
43
|
topN: number;
|
|
61
44
|
currency?: string | undefined;
|
|
62
|
-
|
|
45
|
+
excludeEmpty: boolean;
|
|
46
|
+
includeEmpty: boolean;
|
|
63
47
|
};
|
|
64
48
|
|
|
65
49
|
/** @internal */
|
|
@@ -73,7 +57,8 @@ export const GetProfitabilityRequest$outboundSchema: z.ZodType<
|
|
|
73
57
|
to: z.date().transform(v => v.toISOString()),
|
|
74
58
|
topN: z.number().int().default(10),
|
|
75
59
|
currency: z.string().optional(),
|
|
76
|
-
|
|
60
|
+
excludeEmpty: z.boolean().default(false),
|
|
61
|
+
includeEmpty: z.boolean().default(false),
|
|
77
62
|
});
|
|
78
63
|
|
|
79
64
|
export function getProfitabilityRequestToJSON(
|
|
@@ -31,6 +31,18 @@ export const GroupBy = {
|
|
|
31
31
|
*/
|
|
32
32
|
export type GroupBy = ClosedEnum<typeof GroupBy>;
|
|
33
33
|
|
|
34
|
+
/**
|
|
35
|
+
* Which date places revenue inside the window. 'issued' (default) counts whole invoices by their issue date, the basis revenue is recognised on. 'billingPeriod' counts invoice lines by the start of the period each line bills, so a window covering one billing period returns that period's charges, whichever invoices carry them: this month's advance fee and this month's arrears usage. Paid, outstanding and written-off follow each line's invoice; a refund splits across its invoice's lines by subtotal; payments not tied to an invoice are excluded because they bill no period.
|
|
36
|
+
*/
|
|
37
|
+
export const PeriodBasis = {
|
|
38
|
+
Issued: "issued",
|
|
39
|
+
BillingPeriod: "billingPeriod",
|
|
40
|
+
} as const;
|
|
41
|
+
/**
|
|
42
|
+
* Which date places revenue inside the window. 'issued' (default) counts whole invoices by their issue date, the basis revenue is recognised on. 'billingPeriod' counts invoice lines by the start of the period each line bills, so a window covering one billing period returns that period's charges, whichever invoices carry them: this month's advance fee and this month's arrears usage. Paid, outstanding and written-off follow each line's invoice; a refund splits across its invoice's lines by subtotal; payments not tied to an invoice are excluded because they bill no period.
|
|
43
|
+
*/
|
|
44
|
+
export type PeriodBasis = ClosedEnum<typeof PeriodBasis>;
|
|
45
|
+
|
|
34
46
|
export type GetRevenueRequest = {
|
|
35
47
|
/**
|
|
36
48
|
* Start of the time range (ISO 8601 format)
|
|
@@ -64,6 +76,10 @@ export type GetRevenueRequest = {
|
|
|
64
76
|
* Group invoice data by dimension. Allowed values: 'plan' (max 5 groups, top 4 + 'other' when exceeding), 'customer' (max 25 groups, top 24 + 'other' when exceeding, sorted by revenue descending), 'currency' (one entry per currency, primary currency first then alphabetical). Note: groupBy values are mutually exclusive — combining them returns a 400 error. When groupBy=currency is active, top-level netRevenue, invoices, and payments fields are omitted; currencyBreakdown is the sole data source.
|
|
65
77
|
*/
|
|
66
78
|
groupBy?: GroupBy | undefined;
|
|
79
|
+
/**
|
|
80
|
+
* Which date places revenue inside the window. 'issued' (default) counts whole invoices by their issue date, the basis revenue is recognised on. 'billingPeriod' counts invoice lines by the start of the period each line bills, so a window covering one billing period returns that period's charges, whichever invoices carry them: this month's advance fee and this month's arrears usage. Paid, outstanding and written-off follow each line's invoice; a refund splits across its invoice's lines by subtotal; payments not tied to an invoice are excluded because they bill no period.
|
|
81
|
+
*/
|
|
82
|
+
periodBasis?: PeriodBasis | undefined;
|
|
67
83
|
};
|
|
68
84
|
|
|
69
85
|
/** @internal */
|
|
@@ -75,6 +91,10 @@ export const GetRevenueBucketWidth$outboundSchema: z.ZodNativeEnum<
|
|
|
75
91
|
export const GroupBy$outboundSchema: z.ZodNativeEnum<typeof GroupBy> = z
|
|
76
92
|
.nativeEnum(GroupBy);
|
|
77
93
|
|
|
94
|
+
/** @internal */
|
|
95
|
+
export const PeriodBasis$outboundSchema: z.ZodNativeEnum<typeof PeriodBasis> = z
|
|
96
|
+
.nativeEnum(PeriodBasis);
|
|
97
|
+
|
|
78
98
|
/** @internal */
|
|
79
99
|
export type GetRevenueRequest$Outbound = {
|
|
80
100
|
startTime: string;
|
|
@@ -85,6 +105,7 @@ export type GetRevenueRequest$Outbound = {
|
|
|
85
105
|
subscriptionIds?: Array<string> | undefined;
|
|
86
106
|
currency?: string | undefined;
|
|
87
107
|
groupBy?: string | undefined;
|
|
108
|
+
periodBasis: string;
|
|
88
109
|
};
|
|
89
110
|
|
|
90
111
|
/** @internal */
|
|
@@ -101,6 +122,7 @@ export const GetRevenueRequest$outboundSchema: z.ZodType<
|
|
|
101
122
|
subscriptionIds: z.array(z.string()).optional(),
|
|
102
123
|
currency: z.string().optional(),
|
|
103
124
|
groupBy: GroupBy$outboundSchema.optional(),
|
|
125
|
+
periodBasis: PeriodBasis$outboundSchema.default("issued"),
|
|
104
126
|
});
|
|
105
127
|
|
|
106
128
|
export function getRevenueRequestToJSON(
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type GetSubscriptionIntervalsRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The subscription ID
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/** @internal */
|
|
15
|
+
export type GetSubscriptionIntervalsRequest$Outbound = {
|
|
16
|
+
id: string;
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
/** @internal */
|
|
20
|
+
export const GetSubscriptionIntervalsRequest$outboundSchema: z.ZodType<
|
|
21
|
+
GetSubscriptionIntervalsRequest$Outbound,
|
|
22
|
+
z.ZodTypeDef,
|
|
23
|
+
GetSubscriptionIntervalsRequest
|
|
24
|
+
> = z.object({
|
|
25
|
+
id: z.string(),
|
|
26
|
+
});
|
|
27
|
+
|
|
28
|
+
export function getSubscriptionIntervalsRequestToJSON(
|
|
29
|
+
getSubscriptionIntervalsRequest: GetSubscriptionIntervalsRequest,
|
|
30
|
+
): string {
|
|
31
|
+
return JSON.stringify(
|
|
32
|
+
GetSubscriptionIntervalsRequest$outboundSchema.parse(
|
|
33
|
+
getSubscriptionIntervalsRequest,
|
|
34
|
+
),
|
|
35
|
+
);
|
|
36
|
+
}
|
|
@@ -41,6 +41,7 @@ export * from "./deletesubscriptionadjustment.js";
|
|
|
41
41
|
export * from "./deletetestclock.js";
|
|
42
42
|
export * from "./disconnectmerchantintegration.js";
|
|
43
43
|
export * from "./downloadinvoicepdf.js";
|
|
44
|
+
export * from "./editsubscriptionintervals.js";
|
|
44
45
|
export * from "./generateportallink.js";
|
|
45
46
|
export * from "./generatescheduleinvoices.js";
|
|
46
47
|
export * from "./getapproval.js";
|
|
@@ -71,6 +72,7 @@ export * from "./getrevenue.js";
|
|
|
71
72
|
export * from "./getsource.js";
|
|
72
73
|
export * from "./getsourcerule.js";
|
|
73
74
|
export * from "./getsubscription.js";
|
|
75
|
+
export * from "./getsubscriptionintervals.js";
|
|
74
76
|
export * from "./gettestclock.js";
|
|
75
77
|
export * from "./getuser.js";
|
|
76
78
|
export * from "./ingestevent.js";
|
|
@@ -87,6 +89,7 @@ export * from "./listentitlements.js";
|
|
|
87
89
|
export * from "./listexternalreferences.js";
|
|
88
90
|
export * from "./listfeatures.js";
|
|
89
91
|
export * from "./listfees.js";
|
|
92
|
+
export * from "./listintervalchanges.js";
|
|
90
93
|
export * from "./listinvoicerefunds.js";
|
|
91
94
|
export * from "./listinvoices.js";
|
|
92
95
|
export * from "./listitems.js";
|
|
@@ -106,6 +109,7 @@ export * from "./listsourceevents.js";
|
|
|
106
109
|
export * from "./listsourcerules.js";
|
|
107
110
|
export * from "./listsources.js";
|
|
108
111
|
export * from "./listsubscriptionadjustments.js";
|
|
112
|
+
export * from "./listsubscriptionintervalchanges.js";
|
|
109
113
|
export * from "./listsubscriptions.js";
|
|
110
114
|
export * from "./listtestclocks.js";
|
|
111
115
|
export * from "./mintplanversion.js";
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
import * as models from "../index.js";
|
|
7
|
+
|
|
8
|
+
export type ListIntervalChangesRequest = {
|
|
9
|
+
/**
|
|
10
|
+
* Number of interval changes to return
|
|
11
|
+
*/
|
|
12
|
+
limit?: string | undefined;
|
|
13
|
+
/**
|
|
14
|
+
* Number of interval changes to skip
|
|
15
|
+
*/
|
|
16
|
+
offset?: string | undefined;
|
|
17
|
+
/**
|
|
18
|
+
* Only return changes recorded at or after this time
|
|
19
|
+
*/
|
|
20
|
+
from?: Date | undefined;
|
|
21
|
+
/**
|
|
22
|
+
* Only return changes recorded before this time
|
|
23
|
+
*/
|
|
24
|
+
to?: Date | undefined;
|
|
25
|
+
/**
|
|
26
|
+
* Only return changes with this reason.
|
|
27
|
+
*/
|
|
28
|
+
changeReason?: models.ChangeReason | undefined;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/** @internal */
|
|
32
|
+
export type ListIntervalChangesRequest$Outbound = {
|
|
33
|
+
limit: string;
|
|
34
|
+
offset: string;
|
|
35
|
+
from?: string | undefined;
|
|
36
|
+
to?: string | undefined;
|
|
37
|
+
changeReason?: string | undefined;
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
/** @internal */
|
|
41
|
+
export const ListIntervalChangesRequest$outboundSchema: z.ZodType<
|
|
42
|
+
ListIntervalChangesRequest$Outbound,
|
|
43
|
+
z.ZodTypeDef,
|
|
44
|
+
ListIntervalChangesRequest
|
|
45
|
+
> = z.object({
|
|
46
|
+
limit: z.string().default("10"),
|
|
47
|
+
offset: z.string().default("0"),
|
|
48
|
+
from: z.date().transform(v => v.toISOString()).optional(),
|
|
49
|
+
to: z.date().transform(v => v.toISOString()).optional(),
|
|
50
|
+
changeReason: models.ChangeReason$outboundSchema.optional(),
|
|
51
|
+
});
|
|
52
|
+
|
|
53
|
+
export function listIntervalChangesRequestToJSON(
|
|
54
|
+
listIntervalChangesRequest: ListIntervalChangesRequest,
|
|
55
|
+
): string {
|
|
56
|
+
return JSON.stringify(
|
|
57
|
+
ListIntervalChangesRequest$outboundSchema.parse(listIntervalChangesRequest),
|
|
58
|
+
);
|
|
59
|
+
}
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Code generated by Speakeasy (https://speakeasy.com). DO NOT EDIT.
|
|
3
|
+
*/
|
|
4
|
+
|
|
5
|
+
import * as z from "zod/v3";
|
|
6
|
+
|
|
7
|
+
export type ListSubscriptionIntervalChangesRequest = {
|
|
8
|
+
/**
|
|
9
|
+
* The subscription ID
|
|
10
|
+
*/
|
|
11
|
+
id: string;
|
|
12
|
+
/**
|
|
13
|
+
* Number of interval changes to return
|
|
14
|
+
*/
|
|
15
|
+
limit?: string | undefined;
|
|
16
|
+
/**
|
|
17
|
+
* Number of interval changes to skip
|
|
18
|
+
*/
|
|
19
|
+
offset?: string | undefined;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
/** @internal */
|
|
23
|
+
export type ListSubscriptionIntervalChangesRequest$Outbound = {
|
|
24
|
+
id: string;
|
|
25
|
+
limit: string;
|
|
26
|
+
offset: string;
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/** @internal */
|
|
30
|
+
export const ListSubscriptionIntervalChangesRequest$outboundSchema: z.ZodType<
|
|
31
|
+
ListSubscriptionIntervalChangesRequest$Outbound,
|
|
32
|
+
z.ZodTypeDef,
|
|
33
|
+
ListSubscriptionIntervalChangesRequest
|
|
34
|
+
> = z.object({
|
|
35
|
+
id: z.string(),
|
|
36
|
+
limit: z.string().default("10"),
|
|
37
|
+
offset: z.string().default("0"),
|
|
38
|
+
});
|
|
39
|
+
|
|
40
|
+
export function listSubscriptionIntervalChangesRequestToJSON(
|
|
41
|
+
listSubscriptionIntervalChangesRequest:
|
|
42
|
+
ListSubscriptionIntervalChangesRequest,
|
|
43
|
+
): string {
|
|
44
|
+
return JSON.stringify(
|
|
45
|
+
ListSubscriptionIntervalChangesRequest$outboundSchema.parse(
|
|
46
|
+
listSubscriptionIntervalChangesRequest,
|
|
47
|
+
),
|
|
48
|
+
);
|
|
49
|
+
}
|
|
@@ -4,12 +4,17 @@
|
|
|
4
4
|
|
|
5
5
|
import * as z from "zod/v3";
|
|
6
6
|
import { remap as remap$ } from "../../lib/primitives.js";
|
|
7
|
+
import * as models from "../index.js";
|
|
7
8
|
|
|
8
9
|
export type TerminateSubscriptionRequestBody = {
|
|
9
10
|
/**
|
|
10
11
|
* Cancellation explanation text. Sample values: 'Customer requested cancellation', 'Payment failure', 'Service migration', 'Contract expiration'
|
|
11
12
|
*/
|
|
12
13
|
reason: string;
|
|
14
|
+
/**
|
|
15
|
+
* Why a change was made. `correction` fixes data to match what was agreed; `migration` moves a contract from another system; `commercial` is a real change to the deal. Defaults to `unspecified`.
|
|
16
|
+
*/
|
|
17
|
+
changeReason?: models.ChangeReason | undefined;
|
|
13
18
|
};
|
|
14
19
|
|
|
15
20
|
export type TerminateSubscriptionRequest = {
|
|
@@ -23,6 +28,7 @@ export type TerminateSubscriptionRequest = {
|
|
|
23
28
|
/** @internal */
|
|
24
29
|
export type TerminateSubscriptionRequestBody$Outbound = {
|
|
25
30
|
reason: string;
|
|
31
|
+
changeReason?: string | undefined;
|
|
26
32
|
};
|
|
27
33
|
|
|
28
34
|
/** @internal */
|
|
@@ -32,6 +38,7 @@ export const TerminateSubscriptionRequestBody$outboundSchema: z.ZodType<
|
|
|
32
38
|
TerminateSubscriptionRequestBody
|
|
33
39
|
> = z.object({
|
|
34
40
|
reason: z.string(),
|
|
41
|
+
changeReason: models.ChangeReason$outboundSchema.optional(),
|
|
35
42
|
});
|
|
36
43
|
|
|
37
44
|
export function terminateSubscriptionRequestBodyToJSON(
|