lark-billing 0.0.5 → 0.0.7
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 +11 -10
- package/dist/cjs/Client.d.ts +12 -10
- package/dist/cjs/Client.js +19 -19
- package/dist/cjs/api/resources/checkout/client/Client.d.ts +12 -6
- package/dist/cjs/api/resources/checkout/client/Client.js +22 -11
- package/dist/cjs/api/resources/checkout/client/requests/{CreateRateCardCheckoutRequest.d.ts → CreateSubscriptionCheckoutSessionRequest.d.ts} +4 -3
- package/dist/cjs/api/resources/checkout/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/{featureAccess → customerAccess}/client/Client.d.ts +15 -9
- package/dist/cjs/api/resources/{featureAccess → customerAccess}/client/Client.js +20 -12
- package/dist/cjs/api/resources/customerPortal/client/Client.d.ts +48 -0
- package/dist/cjs/api/resources/customerPortal/client/Client.js +130 -0
- package/dist/cjs/api/resources/customerPortal/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/{rateCards/types → customerPortal/client}/index.js +1 -2
- package/dist/cjs/api/resources/customerPortal/client/requests/CreateCustomerPortalSessionRequest.d.ts +12 -0
- package/dist/cjs/api/resources/customerPortal/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/index.d.ts +7 -5
- package/dist/cjs/api/resources/index.js +8 -6
- package/dist/cjs/api/resources/pricingMetrics/client/Client.d.ts +64 -0
- package/dist/cjs/api/resources/{creditPools → pricingMetrics}/client/Client.js +66 -81
- package/dist/cjs/api/resources/pricingMetrics/client/index.d.ts +2 -0
- package/dist/cjs/api/resources/pricingMetrics/client/index.js +17 -0
- package/dist/cjs/api/resources/pricingMetrics/client/requests/CreatePricingMetricRequest.d.ts +22 -0
- package/dist/cjs/api/resources/pricingMetrics/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/resources/{pricingPlans → pricingMetrics}/index.d.ts +1 -0
- package/dist/cjs/api/resources/{pricingPlans → pricingMetrics}/index.js +1 -0
- package/dist/cjs/api/resources/pricingMetrics/types/PricingMetricAggregation.d.ts +13 -0
- package/dist/cjs/api/resources/pricingMetrics/types/index.d.ts +1 -0
- package/dist/cjs/api/resources/pricingMetrics/types/index.js +17 -0
- package/dist/cjs/api/resources/rateCards/client/Client.d.ts +11 -106
- package/dist/cjs/api/resources/rateCards/client/Client.js +16 -243
- package/dist/cjs/api/resources/rateCards/client/requests/CreateRateCardRequest.d.ts +2 -36
- package/dist/{esm/api/resources/subjects/client/requests/SubjectsListSubjectsRequest.d.mts → cjs/api/resources/rateCards/client/requests/ListRateCardsRateCardsGetRequest.d.ts} +2 -4
- package/dist/cjs/api/resources/rateCards/client/requests/index.d.ts +1 -2
- package/dist/cjs/api/resources/rateCards/index.d.ts +0 -1
- package/dist/cjs/api/resources/rateCards/index.js +0 -1
- package/dist/cjs/api/resources/subjects/client/Client.d.ts +8 -3
- package/dist/cjs/api/resources/subjects/client/Client.js +23 -16
- package/dist/cjs/api/resources/subjects/client/requests/CreateSubjectRequest.d.ts +0 -1
- package/dist/{esm/api/resources/rateCards/client/requests/RateCardsListRateCardsRequest.d.mts → cjs/api/resources/subjects/client/requests/ListSubjectsSubjectsGetRequest.d.ts} +1 -1
- package/dist/cjs/api/resources/subjects/client/requests/UpdateSubjectRequest.d.ts +0 -1
- package/dist/cjs/api/resources/subjects/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/subscriptions/client/Client.d.ts +11 -24
- package/dist/cjs/api/resources/subscriptions/client/Client.js +23 -113
- package/dist/cjs/api/resources/subscriptions/client/requests/CreateSubscriptionRequest.d.ts +1 -4
- package/dist/cjs/api/resources/subscriptions/client/requests/ListSubscriptionsSubscriptionsGetRequest.d.ts +18 -0
- package/dist/cjs/api/resources/subscriptions/client/requests/index.d.ts +1 -1
- package/dist/cjs/api/resources/usageEvents/client/Client.d.ts +25 -2
- package/dist/cjs/api/resources/usageEvents/client/Client.js +78 -4
- package/dist/cjs/api/resources/usageEvents/client/requests/CreateUsageEventRequest.d.ts +2 -3
- package/dist/cjs/api/resources/usageEvents/client/requests/CreateUsageEventSummaryRequest.d.ts +30 -0
- package/dist/cjs/api/resources/usageEvents/client/requests/CreateUsageEventSummaryRequest.js +14 -0
- package/dist/cjs/api/resources/usageEvents/client/requests/index.d.ts +1 -0
- package/dist/cjs/api/types/Aggregation.d.ts +5 -5
- package/dist/cjs/api/types/Amount.d.ts +2 -1
- package/dist/cjs/api/types/BillingStateResponse.d.ts +7 -0
- package/dist/cjs/api/types/{CreditGrantScheduleOneTimeResource.d.ts → CountAggregationPricingMetricResource.d.ts} +1 -1
- package/dist/{esm/api/types/CreateRateCardCheckoutResponse.d.mts → cjs/api/types/CreateCustomerPortalSessionResponse.d.ts} +2 -1
- package/dist/cjs/api/types/CreateFixedRateInterface.d.ts +2 -4
- package/dist/cjs/api/types/{CreatePricingMetricInterface.d.ts → CreatePricingMetricResponse.d.ts} +2 -1
- package/dist/cjs/api/types/CreateSimpleUsageBasedRateInterface.d.ts +4 -3
- package/dist/cjs/api/types/CreateSubjectResponse.d.ts +1 -1
- package/dist/cjs/api/types/CreateSubscriptionCheckoutSessionResponse.d.ts +9 -0
- package/dist/cjs/api/types/CreateUsageEventSummaryResponse.d.ts +10 -0
- package/dist/{esm/api/types/CustomAggregationPricingMetricInterface.d.mts → cjs/api/types/CustomPricingMetricResource.d.ts} +1 -1
- package/dist/cjs/api/types/FixedRateInterface.d.ts +2 -3
- package/dist/cjs/api/types/{PricingMetricInterface.d.ts → GetPricingMetricResponse.d.ts} +2 -1
- package/dist/cjs/api/types/{MaxAggregationPricingMetricInterface.d.ts → LastAggregationPricingMetricResource.d.ts} +1 -1
- package/dist/{esm/api/types/MaxAggregationPricingMetricInterface.d.mts → cjs/api/types/MaxAggregationPricingMetricResource.d.ts} +1 -1
- package/dist/cjs/api/types/Period.d.ts +9 -0
- package/dist/cjs/api/types/Price.d.ts +10 -1
- package/dist/cjs/api/types/RateCardResource.d.ts +0 -4
- package/dist/cjs/api/types/RateCardResourceUsageBasedRatesItem.d.ts +1 -4
- package/dist/cjs/api/types/SimpleUsageBasedRateInterface.d.ts +5 -2
- package/dist/cjs/api/types/SubjectResource.d.ts +1 -1
- package/dist/cjs/api/types/SubscriptionResource.d.ts +1 -3
- package/dist/cjs/api/types/SubscriptionResource.js +0 -1
- package/dist/cjs/api/types/SumAggregationPricingMetricInterface.d.ts +1 -0
- package/dist/cjs/api/types/{LastAggregationPricingMetricInterface.d.ts → SumAggregationPricingMetricResource.d.ts} +1 -1
- package/dist/cjs/api/types/index.d.ts +12 -86
- package/dist/cjs/api/types/index.js +12 -86
- package/dist/cjs/environments.d.ts +7 -0
- package/dist/cjs/environments.js +9 -0
- package/dist/cjs/index.d.ts +1 -0
- package/dist/cjs/index.js +3 -1
- package/dist/cjs/version.d.ts +1 -1
- package/dist/cjs/version.js +1 -1
- package/dist/esm/Client.d.mts +12 -10
- package/dist/esm/Client.mjs +13 -13
- package/dist/esm/api/resources/checkout/client/Client.d.mts +12 -6
- package/dist/esm/api/resources/checkout/client/Client.mjs +23 -12
- package/dist/esm/api/resources/checkout/client/requests/{CreateRateCardCheckoutRequest.d.mts → CreateSubscriptionCheckoutSessionRequest.d.mts} +4 -3
- package/dist/esm/api/resources/checkout/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/{featureAccess → customerAccess}/client/Client.d.mts +15 -9
- package/dist/esm/api/resources/{featureAccess → customerAccess}/client/Client.mjs +19 -11
- package/dist/esm/api/resources/customerPortal/client/Client.d.mts +48 -0
- package/dist/esm/api/resources/customerPortal/client/Client.mjs +93 -0
- package/dist/esm/api/resources/customerPortal/client/index.d.mts +2 -0
- package/dist/esm/api/resources/customerPortal/client/index.mjs +1 -0
- package/dist/esm/api/resources/customerPortal/client/requests/CreateCustomerPortalSessionRequest.d.mts +12 -0
- package/dist/esm/api/resources/customerPortal/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/index.d.mts +7 -5
- package/dist/esm/api/resources/index.mjs +7 -5
- package/dist/esm/api/resources/pricingMetrics/client/Client.d.mts +64 -0
- package/dist/esm/api/resources/pricingMetrics/client/Client.mjs +152 -0
- package/dist/esm/api/resources/pricingMetrics/client/index.d.mts +2 -0
- package/dist/esm/api/resources/pricingMetrics/client/index.mjs +1 -0
- package/dist/esm/api/resources/pricingMetrics/client/requests/CreatePricingMetricRequest.d.mts +22 -0
- package/dist/esm/api/resources/pricingMetrics/client/requests/index.d.mts +1 -0
- package/dist/esm/api/resources/{pricingPlans → pricingMetrics}/index.d.mts +1 -0
- package/dist/esm/api/resources/{pricingPlans → pricingMetrics}/index.mjs +1 -0
- package/dist/esm/api/resources/pricingMetrics/types/PricingMetricAggregation.d.mts +13 -0
- package/dist/esm/api/resources/pricingMetrics/types/index.d.mts +1 -0
- package/dist/esm/api/resources/pricingMetrics/types/index.mjs +1 -0
- package/dist/esm/api/resources/rateCards/client/Client.d.mts +11 -106
- package/dist/esm/api/resources/rateCards/client/Client.mjs +17 -244
- package/dist/esm/api/resources/rateCards/client/requests/CreateRateCardRequest.d.mts +2 -36
- package/dist/{cjs/api/resources/rateCards/client/requests/RateCardsListRateCardsRequest.d.ts → esm/api/resources/rateCards/client/requests/ListRateCardsRateCardsGetRequest.d.mts} +2 -4
- package/dist/esm/api/resources/rateCards/client/requests/index.d.mts +1 -2
- package/dist/esm/api/resources/rateCards/index.d.mts +0 -1
- package/dist/esm/api/resources/rateCards/index.mjs +0 -1
- package/dist/esm/api/resources/subjects/client/Client.d.mts +8 -3
- package/dist/esm/api/resources/subjects/client/Client.mjs +24 -17
- package/dist/esm/api/resources/subjects/client/requests/CreateSubjectRequest.d.mts +0 -1
- package/dist/{cjs/api/resources/subjects/client/requests/SubjectsListSubjectsRequest.d.ts → esm/api/resources/subjects/client/requests/ListSubjectsSubjectsGetRequest.d.mts} +1 -1
- package/dist/esm/api/resources/subjects/client/requests/UpdateSubjectRequest.d.mts +0 -1
- package/dist/esm/api/resources/subjects/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/subscriptions/client/Client.d.mts +11 -24
- package/dist/esm/api/resources/subscriptions/client/Client.mjs +24 -114
- package/dist/esm/api/resources/subscriptions/client/requests/CreateSubscriptionRequest.d.mts +1 -4
- package/dist/esm/api/resources/subscriptions/client/requests/ListSubscriptionsSubscriptionsGetRequest.d.mts +18 -0
- package/dist/esm/api/resources/subscriptions/client/requests/index.d.mts +1 -1
- package/dist/esm/api/resources/usageEvents/client/Client.d.mts +25 -2
- package/dist/esm/api/resources/usageEvents/client/Client.mjs +79 -5
- package/dist/esm/api/resources/usageEvents/client/requests/CreateUsageEventRequest.d.mts +2 -3
- package/dist/esm/api/resources/usageEvents/client/requests/CreateUsageEventSummaryRequest.d.mts +30 -0
- package/dist/esm/api/resources/usageEvents/client/requests/CreateUsageEventSummaryRequest.mjs +11 -0
- package/dist/esm/api/resources/usageEvents/client/requests/index.d.mts +1 -0
- package/dist/esm/api/types/Aggregation.d.mts +5 -5
- package/dist/esm/api/types/Amount.d.mts +2 -1
- package/dist/esm/api/types/BillingStateResponse.d.mts +7 -0
- package/dist/esm/api/types/{CreditGrantScheduleOneTimeResource.d.mts → CountAggregationPricingMetricResource.d.mts} +1 -1
- package/dist/{cjs/api/types/CreateRateCardCheckoutResponse.d.ts → esm/api/types/CreateCustomerPortalSessionResponse.d.mts} +2 -1
- package/dist/esm/api/types/CreateFixedRateInterface.d.mts +2 -4
- package/dist/esm/api/types/{PricingMetricInterface.d.mts → CreatePricingMetricResponse.d.mts} +2 -1
- package/dist/esm/api/types/CreateSimpleUsageBasedRateInterface.d.mts +4 -3
- package/dist/esm/api/types/CreateSubjectResponse.d.mts +1 -1
- package/dist/esm/api/types/CreateSubscriptionCheckoutSessionResponse.d.mts +9 -0
- package/dist/esm/api/types/CreateUsageEventSummaryResponse.d.mts +10 -0
- package/dist/{cjs/api/types/CustomAggregationPricingMetricInterface.d.ts → esm/api/types/CustomPricingMetricResource.d.mts} +1 -1
- package/dist/esm/api/types/FixedRateInterface.d.mts +2 -3
- package/dist/esm/api/types/{CreatePricingMetricInterface.d.mts → GetPricingMetricResponse.d.mts} +2 -1
- package/dist/esm/api/types/{LastAggregationPricingMetricInterface.d.mts → LastAggregationPricingMetricResource.d.mts} +1 -1
- package/dist/esm/api/types/MaxAggregationPricingMetricResource.d.mts +6 -0
- package/dist/esm/api/types/Period.d.mts +9 -0
- package/dist/esm/api/types/Price.d.mts +10 -1
- package/dist/esm/api/types/RateCardResource.d.mts +0 -4
- package/dist/esm/api/types/RateCardResourceUsageBasedRatesItem.d.mts +1 -4
- package/dist/esm/api/types/SimpleUsageBasedRateInterface.d.mts +5 -2
- package/dist/esm/api/types/SubjectResource.d.mts +1 -1
- package/dist/esm/api/types/SubscriptionResource.d.mts +1 -3
- package/dist/esm/api/types/SubscriptionResource.mjs +0 -1
- package/dist/esm/api/types/SumAggregationPricingMetricInterface.d.mts +1 -0
- package/dist/esm/api/types/SumAggregationPricingMetricResource.d.mts +6 -0
- package/dist/esm/api/types/index.d.mts +12 -86
- package/dist/esm/api/types/index.mjs +12 -86
- package/dist/esm/environments.d.mts +7 -0
- package/dist/esm/environments.mjs +6 -0
- package/dist/esm/index.d.mts +1 -0
- package/dist/esm/index.mjs +1 -0
- package/dist/esm/version.d.mts +1 -1
- package/dist/esm/version.mjs +1 -1
- package/package.json +1 -1
- package/reference.md +67 -528
- package/dist/cjs/api/resources/creditPools/client/Client.d.ts +0 -53
- package/dist/cjs/api/resources/featureAccess/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/pricingPlans/client/Client.d.ts +0 -72
- package/dist/cjs/api/resources/pricingPlans/client/Client.js +0 -305
- package/dist/cjs/api/resources/pricingPlans/client/index.d.ts +0 -1
- package/dist/cjs/api/resources/rateCards/client/requests/CreateRateCardVersionRequest.d.ts +0 -60
- package/dist/cjs/api/resources/rateCards/client/requests/CreateRateCardVersionRequest.js +0 -13
- package/dist/cjs/api/resources/rateCards/types/CreateRateCardRequestUsageBasedRatesItem.d.ts +0 -13
- package/dist/cjs/api/resources/rateCards/types/CreateRateCardVersionRequestUsageBasedRatesItem.d.ts +0 -13
- package/dist/cjs/api/resources/rateCards/types/index.d.ts +0 -2
- package/dist/cjs/api/resources/subscriptions/client/requests/SubscriptionsListSubscriptionsRequest.d.ts +0 -14
- package/dist/cjs/api/types/CheckFeatureAccessRequest.d.ts +0 -8
- package/dist/cjs/api/types/CheckFeatureAccessResponse.d.ts +0 -8
- package/dist/cjs/api/types/CreateCreditGrantInterface.d.ts +0 -12
- package/dist/cjs/api/types/CreateCreditGrantInterfaceExpiration.d.ts +0 -10
- package/dist/cjs/api/types/CreateCreditPoolRequest.d.ts +0 -4
- package/dist/cjs/api/types/CreateDimensionCoordinateInterface.d.ts +0 -7
- package/dist/cjs/api/types/CreateDimensionInterface.d.ts +0 -7
- package/dist/cjs/api/types/CreateDimensionalUsageBasedRateInterface.d.ts +0 -12
- package/dist/cjs/api/types/CreatePricingMatrixCellInterface.d.ts +0 -8
- package/dist/cjs/api/types/CreatePricingMatrixInterface.d.ts +0 -7
- package/dist/cjs/api/types/CreatePricingPlanRequest.d.ts +0 -4
- package/dist/cjs/api/types/CreateRateCardResponse.d.ts +0 -26
- package/dist/cjs/api/types/CreateRateCardResponse.js +0 -13
- package/dist/cjs/api/types/CreateRateCardResponseUsageBasedRatesItem.d.ts +0 -13
- package/dist/cjs/api/types/CreateRateCardResponseUsageBasedRatesItem.js +0 -5
- package/dist/cjs/api/types/CreateRateCardVersionResponse.d.ts +0 -26
- package/dist/cjs/api/types/CreateRateCardVersionResponse.js +0 -13
- package/dist/cjs/api/types/CreateRateCardVersionResponseUsageBasedRatesItem.d.ts +0 -13
- package/dist/cjs/api/types/CreateRateCardVersionResponseUsageBasedRatesItem.js +0 -5
- package/dist/cjs/api/types/CreditGrant.d.ts +0 -4
- package/dist/cjs/api/types/CreditGrant.js +0 -5
- package/dist/cjs/api/types/CreditGrantDateTimeExpirationInterface.d.ts +0 -6
- package/dist/cjs/api/types/CreditGrantDateTimeExpirationInterface.js +0 -5
- package/dist/cjs/api/types/CreditGrantDateTimeExpirationResource.d.ts +0 -6
- package/dist/cjs/api/types/CreditGrantDateTimeExpirationResource.js +0 -5
- package/dist/cjs/api/types/CreditGrantDurationExpirationInterface.d.ts +0 -17
- package/dist/cjs/api/types/CreditGrantDurationExpirationInterface.js +0 -16
- package/dist/cjs/api/types/CreditGrantDurationExpirationResource.d.ts +0 -17
- package/dist/cjs/api/types/CreditGrantDurationExpirationResource.js +0 -16
- package/dist/cjs/api/types/CreditGrantInterface.d.ts +0 -12
- package/dist/cjs/api/types/CreditGrantInterface.js +0 -5
- package/dist/cjs/api/types/CreditGrantInterfaceInputExpiration.d.ts +0 -10
- package/dist/cjs/api/types/CreditGrantInterfaceInputExpiration.js +0 -5
- package/dist/cjs/api/types/CreditGrantInterfaceOutputExpiration.d.ts +0 -13
- package/dist/cjs/api/types/CreditGrantInterfaceOutputExpiration.js +0 -5
- package/dist/cjs/api/types/CreditGrantInterfaceOutputSchedule.d.ts +0 -13
- package/dist/cjs/api/types/CreditGrantInterfaceOutputSchedule.js +0 -5
- package/dist/cjs/api/types/CreditGrantResource.d.ts +0 -12
- package/dist/cjs/api/types/CreditGrantResource.js +0 -5
- package/dist/cjs/api/types/CreditGrantResourceInputExpiration.d.ts +0 -10
- package/dist/cjs/api/types/CreditGrantResourceInputExpiration.js +0 -5
- package/dist/cjs/api/types/CreditGrantResourceInputSchedule.d.ts +0 -13
- package/dist/cjs/api/types/CreditGrantResourceInputSchedule.js +0 -5
- package/dist/cjs/api/types/CreditGrantResourceOutputExpiration.d.ts +0 -13
- package/dist/cjs/api/types/CreditGrantResourceOutputExpiration.js +0 -5
- package/dist/cjs/api/types/CreditGrantResourceOutputSchedule.d.ts +0 -13
- package/dist/cjs/api/types/CreditGrantResourceOutputSchedule.js +0 -5
- package/dist/cjs/api/types/CreditGrantSchedule.d.ts +0 -4
- package/dist/cjs/api/types/CreditGrantSchedule.js +0 -5
- package/dist/cjs/api/types/CreditGrantScheduleOneTimeInterface.d.ts +0 -6
- package/dist/cjs/api/types/CreditGrantScheduleOneTimeInterface.js +0 -5
- package/dist/cjs/api/types/CreditGrantScheduleOneTimeResource.js +0 -5
- package/dist/cjs/api/types/CreditGrantScheduleRateCycleStartInterface.d.ts +0 -6
- package/dist/cjs/api/types/CreditGrantScheduleRateCycleStartInterface.js +0 -5
- package/dist/cjs/api/types/CreditGrantScheduleRateCycleStartResource.d.ts +0 -5
- package/dist/cjs/api/types/CreditGrantScheduleRateCycleStartResource.js +0 -5
- package/dist/cjs/api/types/CreditGrantSubjectGrantingConfigInterface.d.ts +0 -7
- package/dist/cjs/api/types/CreditGrantSubjectGrantingConfigInterface.js +0 -5
- package/dist/cjs/api/types/CreditPool.d.ts +0 -4
- package/dist/cjs/api/types/CreditPool.js +0 -5
- package/dist/cjs/api/types/CreditPoolRolloverConfig.d.ts +0 -4
- package/dist/cjs/api/types/CreditPoolRolloverConfig.js +0 -5
- package/dist/cjs/api/types/CustomAggregationPricingMetricInterface.js +0 -5
- package/dist/cjs/api/types/CustomPricingMetric.d.ts +0 -4
- package/dist/cjs/api/types/CustomPricingMetric.js +0 -5
- package/dist/cjs/api/types/CustomUnit.d.ts +0 -4
- package/dist/cjs/api/types/CustomUnit.js +0 -5
- package/dist/cjs/api/types/CustomUnitAmount.d.ts +0 -4
- package/dist/cjs/api/types/CustomUnitAmount.js +0 -5
- package/dist/cjs/api/types/Dimension.d.ts +0 -4
- package/dist/cjs/api/types/Dimension.js +0 -5
- package/dist/cjs/api/types/DimensionCoordinate.d.ts +0 -4
- package/dist/cjs/api/types/DimensionCoordinate.js +0 -5
- package/dist/cjs/api/types/DimensionCoordinateInterface.d.ts +0 -7
- package/dist/cjs/api/types/DimensionCoordinateInterface.js +0 -5
- package/dist/cjs/api/types/DimensionCoordinateSet.d.ts +0 -4
- package/dist/cjs/api/types/DimensionCoordinateSet.js +0 -5
- package/dist/cjs/api/types/DimensionInterface.d.ts +0 -7
- package/dist/cjs/api/types/DimensionInterface.js +0 -5
- package/dist/cjs/api/types/DimensionalRateMatrix.d.ts +0 -4
- package/dist/cjs/api/types/DimensionalRateMatrix.js +0 -5
- package/dist/cjs/api/types/DimensionalRateMatrixCell.d.ts +0 -4
- package/dist/cjs/api/types/DimensionalRateMatrixCell.js +0 -5
- package/dist/cjs/api/types/DimensionalUsageBasedRate.d.ts +0 -4
- package/dist/cjs/api/types/DimensionalUsageBasedRate.js +0 -5
- package/dist/cjs/api/types/DimensionalUsageBasedRateInput.d.ts +0 -4
- package/dist/cjs/api/types/DimensionalUsageBasedRateInput.js +0 -5
- package/dist/cjs/api/types/DimensionalUsageBasedRateInterface.d.ts +0 -12
- package/dist/cjs/api/types/DimensionalUsageBasedRateInterface.js +0 -5
- package/dist/cjs/api/types/FeatureAccessResource.d.ts +0 -8
- package/dist/cjs/api/types/FeatureAccessResource.js +0 -5
- package/dist/cjs/api/types/GetRateCardResponse.d.ts +0 -26
- package/dist/cjs/api/types/GetRateCardResponse.js +0 -13
- package/dist/cjs/api/types/GetRateCardResponseUsageBasedRatesItem.d.ts +0 -13
- package/dist/cjs/api/types/GetRateCardResponseUsageBasedRatesItem.js +0 -5
- package/dist/cjs/api/types/GrantCreditsRequest.d.ts +0 -4
- package/dist/cjs/api/types/GrantCreditsRequest.js +0 -5
- package/dist/cjs/api/types/LastAggregationPricingMetricInterface.js +0 -5
- package/dist/cjs/api/types/LicenseBasedRate.d.ts +0 -4
- package/dist/cjs/api/types/LicenseBasedRate.js +0 -5
- package/dist/cjs/api/types/LicenseBasedRateInput.d.ts +0 -4
- package/dist/cjs/api/types/LicenseBasedRateInput.js +0 -5
- package/dist/cjs/api/types/MaxAggregationPricingMetricInterface.js +0 -5
- package/dist/cjs/api/types/MonetaryAmount.d.ts +0 -4
- package/dist/cjs/api/types/MonetaryAmount.js +0 -5
- package/dist/cjs/api/types/PackagePriceWrapper.d.ts +0 -4
- package/dist/cjs/api/types/PackagePriceWrapper.js +0 -5
- package/dist/cjs/api/types/PricingMatrixCellInterface.d.ts +0 -8
- package/dist/cjs/api/types/PricingMatrixCellInterface.js +0 -5
- package/dist/cjs/api/types/PricingMatrixInterface.d.ts +0 -7
- package/dist/cjs/api/types/PricingMatrixInterface.js +0 -5
- package/dist/cjs/api/types/PricingMetric.d.ts +0 -4
- package/dist/cjs/api/types/PricingMetric.js +0 -5
- package/dist/cjs/api/types/PricingMetricInterface.js +0 -5
- package/dist/cjs/api/types/PricingPlan.d.ts +0 -4
- package/dist/cjs/api/types/PricingPlan.js +0 -5
- package/dist/cjs/api/types/PricingPlanSubscription.d.ts +0 -4
- package/dist/cjs/api/types/PricingPlanSubscription.js +0 -5
- package/dist/cjs/api/types/PricingTier.d.ts +0 -4
- package/dist/cjs/api/types/PricingTier.js +0 -5
- package/dist/cjs/api/types/RateCard.d.ts +0 -4
- package/dist/cjs/api/types/RateCard.js +0 -5
- package/dist/cjs/api/types/RateCardVersion.d.ts +0 -4
- package/dist/cjs/api/types/RateCardVersion.js +0 -5
- package/dist/cjs/api/types/RateCardVersionInput.d.ts +0 -4
- package/dist/cjs/api/types/RateCardVersionInput.js +0 -5
- package/dist/cjs/api/types/SimpleUsageBasedRate.d.ts +0 -4
- package/dist/cjs/api/types/SimpleUsageBasedRate.js +0 -5
- package/dist/cjs/api/types/SimpleUsageBasedRateInput.d.ts +0 -4
- package/dist/cjs/api/types/SimpleUsageBasedRateInput.js +0 -5
- package/dist/cjs/api/types/Subject.d.ts +0 -4
- package/dist/cjs/api/types/Subject.js +0 -5
- package/dist/cjs/api/types/SubjectGrantingConfig.d.ts +0 -4
- package/dist/cjs/api/types/SubjectGrantingConfig.js +0 -5
- package/dist/cjs/api/types/SubjectGrantingConfigResource.d.ts +0 -7
- package/dist/cjs/api/types/SubjectGrantingConfigResource.js +0 -5
- package/dist/cjs/api/types/TieredPrice.d.ts +0 -4
- package/dist/cjs/api/types/TieredPrice.js +0 -5
- package/dist/cjs/api/types/TieredPriceWrapper.d.ts +0 -4
- package/dist/cjs/api/types/TieredPriceWrapper.js +0 -5
- package/dist/cjs/api/types/UpdatePricingPlanRequest.d.ts +0 -4
- package/dist/cjs/api/types/UpdatePricingPlanRequest.js +0 -5
- package/dist/cjs/api/types/UpdateRateCardRequest.d.ts +0 -4
- package/dist/cjs/api/types/UpdateRateCardRequest.js +0 -5
- package/dist/cjs/api/types/UpdateSubscriptionRequest.d.ts +0 -4
- package/dist/cjs/api/types/UpdateSubscriptionRequest.js +0 -5
- package/dist/cjs/api/types/UsageBasedRate.d.ts +0 -4
- package/dist/cjs/api/types/UsageBasedRate.js +0 -5
- package/dist/cjs/api/types/UsageBasedRateInput.d.ts +0 -4
- package/dist/cjs/api/types/UsageBasedRateInput.js +0 -5
- package/dist/cjs/api/types/UsageUnit.d.ts +0 -4
- package/dist/cjs/api/types/UsageUnit.js +0 -5
- package/dist/esm/api/resources/creditPools/client/Client.d.mts +0 -53
- package/dist/esm/api/resources/creditPools/client/Client.mjs +0 -167
- package/dist/esm/api/resources/featureAccess/client/index.d.mts +0 -1
- package/dist/esm/api/resources/pricingPlans/client/Client.d.mts +0 -72
- package/dist/esm/api/resources/pricingPlans/client/Client.mjs +0 -268
- package/dist/esm/api/resources/pricingPlans/client/index.d.mts +0 -1
- package/dist/esm/api/resources/rateCards/client/requests/CreateRateCardVersionRequest.d.mts +0 -60
- package/dist/esm/api/resources/rateCards/client/requests/CreateRateCardVersionRequest.mjs +0 -10
- package/dist/esm/api/resources/rateCards/types/CreateRateCardRequestUsageBasedRatesItem.d.mts +0 -13
- package/dist/esm/api/resources/rateCards/types/CreateRateCardVersionRequestUsageBasedRatesItem.d.mts +0 -13
- package/dist/esm/api/resources/rateCards/types/index.d.mts +0 -2
- package/dist/esm/api/resources/rateCards/types/index.mjs +0 -2
- package/dist/esm/api/resources/subscriptions/client/requests/SubscriptionsListSubscriptionsRequest.d.mts +0 -14
- package/dist/esm/api/types/CheckFeatureAccessRequest.d.mts +0 -8
- package/dist/esm/api/types/CheckFeatureAccessResponse.d.mts +0 -8
- package/dist/esm/api/types/CreateCreditGrantInterface.d.mts +0 -12
- package/dist/esm/api/types/CreateCreditGrantInterfaceExpiration.d.mts +0 -10
- package/dist/esm/api/types/CreateCreditPoolRequest.d.mts +0 -4
- package/dist/esm/api/types/CreateDimensionCoordinateInterface.d.mts +0 -7
- package/dist/esm/api/types/CreateDimensionInterface.d.mts +0 -7
- package/dist/esm/api/types/CreateDimensionalUsageBasedRateInterface.d.mts +0 -12
- package/dist/esm/api/types/CreatePricingMatrixCellInterface.d.mts +0 -8
- package/dist/esm/api/types/CreatePricingMatrixInterface.d.mts +0 -7
- package/dist/esm/api/types/CreatePricingPlanRequest.d.mts +0 -4
- package/dist/esm/api/types/CreateRateCardResponse.d.mts +0 -26
- package/dist/esm/api/types/CreateRateCardResponse.mjs +0 -10
- package/dist/esm/api/types/CreateRateCardResponseUsageBasedRatesItem.d.mts +0 -13
- package/dist/esm/api/types/CreateRateCardResponseUsageBasedRatesItem.mjs +0 -4
- package/dist/esm/api/types/CreateRateCardVersionResponse.d.mts +0 -26
- package/dist/esm/api/types/CreateRateCardVersionResponse.mjs +0 -10
- package/dist/esm/api/types/CreateRateCardVersionResponseUsageBasedRatesItem.d.mts +0 -13
- package/dist/esm/api/types/CreateRateCardVersionResponseUsageBasedRatesItem.mjs +0 -4
- package/dist/esm/api/types/CreditGrant.d.mts +0 -4
- package/dist/esm/api/types/CreditGrant.mjs +0 -4
- package/dist/esm/api/types/CreditGrantDateTimeExpirationInterface.d.mts +0 -6
- package/dist/esm/api/types/CreditGrantDateTimeExpirationInterface.mjs +0 -4
- package/dist/esm/api/types/CreditGrantDateTimeExpirationResource.d.mts +0 -6
- package/dist/esm/api/types/CreditGrantDateTimeExpirationResource.mjs +0 -4
- package/dist/esm/api/types/CreditGrantDurationExpirationInterface.d.mts +0 -17
- package/dist/esm/api/types/CreditGrantDurationExpirationInterface.mjs +0 -13
- package/dist/esm/api/types/CreditGrantDurationExpirationResource.d.mts +0 -17
- package/dist/esm/api/types/CreditGrantDurationExpirationResource.mjs +0 -13
- package/dist/esm/api/types/CreditGrantInterface.d.mts +0 -12
- package/dist/esm/api/types/CreditGrantInterface.mjs +0 -4
- package/dist/esm/api/types/CreditGrantInterfaceInputExpiration.d.mts +0 -10
- package/dist/esm/api/types/CreditGrantInterfaceInputExpiration.mjs +0 -4
- package/dist/esm/api/types/CreditGrantInterfaceOutputExpiration.d.mts +0 -13
- package/dist/esm/api/types/CreditGrantInterfaceOutputExpiration.mjs +0 -4
- package/dist/esm/api/types/CreditGrantInterfaceOutputSchedule.d.mts +0 -13
- package/dist/esm/api/types/CreditGrantInterfaceOutputSchedule.mjs +0 -4
- package/dist/esm/api/types/CreditGrantResource.d.mts +0 -12
- package/dist/esm/api/types/CreditGrantResource.mjs +0 -4
- package/dist/esm/api/types/CreditGrantResourceInputExpiration.d.mts +0 -10
- package/dist/esm/api/types/CreditGrantResourceInputExpiration.mjs +0 -4
- package/dist/esm/api/types/CreditGrantResourceInputSchedule.d.mts +0 -13
- package/dist/esm/api/types/CreditGrantResourceInputSchedule.mjs +0 -4
- package/dist/esm/api/types/CreditGrantResourceOutputExpiration.d.mts +0 -13
- package/dist/esm/api/types/CreditGrantResourceOutputExpiration.mjs +0 -4
- package/dist/esm/api/types/CreditGrantResourceOutputSchedule.d.mts +0 -13
- package/dist/esm/api/types/CreditGrantResourceOutputSchedule.mjs +0 -4
- package/dist/esm/api/types/CreditGrantSchedule.d.mts +0 -4
- package/dist/esm/api/types/CreditGrantSchedule.mjs +0 -4
- package/dist/esm/api/types/CreditGrantScheduleOneTimeInterface.d.mts +0 -6
- package/dist/esm/api/types/CreditGrantScheduleOneTimeInterface.mjs +0 -4
- package/dist/esm/api/types/CreditGrantScheduleOneTimeResource.mjs +0 -4
- package/dist/esm/api/types/CreditGrantScheduleRateCycleStartInterface.d.mts +0 -6
- package/dist/esm/api/types/CreditGrantScheduleRateCycleStartInterface.mjs +0 -4
- package/dist/esm/api/types/CreditGrantScheduleRateCycleStartResource.d.mts +0 -5
- package/dist/esm/api/types/CreditGrantScheduleRateCycleStartResource.mjs +0 -4
- package/dist/esm/api/types/CreditGrantSubjectGrantingConfigInterface.d.mts +0 -7
- package/dist/esm/api/types/CreditGrantSubjectGrantingConfigInterface.mjs +0 -4
- package/dist/esm/api/types/CreditPool.d.mts +0 -4
- package/dist/esm/api/types/CreditPool.mjs +0 -4
- package/dist/esm/api/types/CreditPoolRolloverConfig.d.mts +0 -4
- package/dist/esm/api/types/CreditPoolRolloverConfig.mjs +0 -4
- package/dist/esm/api/types/CustomAggregationPricingMetricInterface.mjs +0 -4
- package/dist/esm/api/types/CustomPricingMetric.d.mts +0 -4
- package/dist/esm/api/types/CustomPricingMetric.mjs +0 -4
- package/dist/esm/api/types/CustomUnit.d.mts +0 -4
- package/dist/esm/api/types/CustomUnit.mjs +0 -4
- package/dist/esm/api/types/CustomUnitAmount.d.mts +0 -4
- package/dist/esm/api/types/CustomUnitAmount.mjs +0 -4
- package/dist/esm/api/types/Dimension.d.mts +0 -4
- package/dist/esm/api/types/Dimension.mjs +0 -4
- package/dist/esm/api/types/DimensionCoordinate.d.mts +0 -4
- package/dist/esm/api/types/DimensionCoordinate.mjs +0 -4
- package/dist/esm/api/types/DimensionCoordinateInterface.d.mts +0 -7
- package/dist/esm/api/types/DimensionCoordinateInterface.mjs +0 -4
- package/dist/esm/api/types/DimensionCoordinateSet.d.mts +0 -4
- package/dist/esm/api/types/DimensionCoordinateSet.mjs +0 -4
- package/dist/esm/api/types/DimensionInterface.d.mts +0 -7
- package/dist/esm/api/types/DimensionInterface.mjs +0 -4
- package/dist/esm/api/types/DimensionalRateMatrix.d.mts +0 -4
- package/dist/esm/api/types/DimensionalRateMatrix.mjs +0 -4
- package/dist/esm/api/types/DimensionalRateMatrixCell.d.mts +0 -4
- package/dist/esm/api/types/DimensionalRateMatrixCell.mjs +0 -4
- package/dist/esm/api/types/DimensionalUsageBasedRate.d.mts +0 -4
- package/dist/esm/api/types/DimensionalUsageBasedRate.mjs +0 -4
- package/dist/esm/api/types/DimensionalUsageBasedRateInput.d.mts +0 -4
- package/dist/esm/api/types/DimensionalUsageBasedRateInput.mjs +0 -4
- package/dist/esm/api/types/DimensionalUsageBasedRateInterface.d.mts +0 -12
- package/dist/esm/api/types/DimensionalUsageBasedRateInterface.mjs +0 -4
- package/dist/esm/api/types/FeatureAccessResource.d.mts +0 -8
- package/dist/esm/api/types/FeatureAccessResource.mjs +0 -4
- package/dist/esm/api/types/GetRateCardResponse.d.mts +0 -26
- package/dist/esm/api/types/GetRateCardResponse.mjs +0 -10
- package/dist/esm/api/types/GetRateCardResponseUsageBasedRatesItem.d.mts +0 -13
- package/dist/esm/api/types/GetRateCardResponseUsageBasedRatesItem.mjs +0 -4
- package/dist/esm/api/types/GrantCreditsRequest.d.mts +0 -4
- package/dist/esm/api/types/GrantCreditsRequest.mjs +0 -4
- package/dist/esm/api/types/LastAggregationPricingMetricInterface.mjs +0 -4
- package/dist/esm/api/types/LicenseBasedRate.d.mts +0 -4
- package/dist/esm/api/types/LicenseBasedRate.mjs +0 -4
- package/dist/esm/api/types/LicenseBasedRateInput.d.mts +0 -4
- package/dist/esm/api/types/LicenseBasedRateInput.mjs +0 -4
- package/dist/esm/api/types/MaxAggregationPricingMetricInterface.mjs +0 -4
- package/dist/esm/api/types/MonetaryAmount.d.mts +0 -4
- package/dist/esm/api/types/MonetaryAmount.mjs +0 -4
- package/dist/esm/api/types/PackagePriceWrapper.d.mts +0 -4
- package/dist/esm/api/types/PackagePriceWrapper.mjs +0 -4
- package/dist/esm/api/types/PricingMatrixCellInterface.d.mts +0 -8
- package/dist/esm/api/types/PricingMatrixCellInterface.mjs +0 -4
- package/dist/esm/api/types/PricingMatrixInterface.d.mts +0 -7
- package/dist/esm/api/types/PricingMatrixInterface.mjs +0 -4
- package/dist/esm/api/types/PricingMetric.d.mts +0 -4
- package/dist/esm/api/types/PricingMetric.mjs +0 -4
- package/dist/esm/api/types/PricingMetricInterface.mjs +0 -4
- package/dist/esm/api/types/PricingPlan.d.mts +0 -4
- package/dist/esm/api/types/PricingPlan.mjs +0 -4
- package/dist/esm/api/types/PricingPlanSubscription.d.mts +0 -4
- package/dist/esm/api/types/PricingPlanSubscription.mjs +0 -4
- package/dist/esm/api/types/PricingTier.d.mts +0 -4
- package/dist/esm/api/types/PricingTier.mjs +0 -4
- package/dist/esm/api/types/RateCard.d.mts +0 -4
- package/dist/esm/api/types/RateCard.mjs +0 -4
- package/dist/esm/api/types/RateCardVersion.d.mts +0 -4
- package/dist/esm/api/types/RateCardVersion.mjs +0 -4
- package/dist/esm/api/types/RateCardVersionInput.d.mts +0 -4
- package/dist/esm/api/types/RateCardVersionInput.mjs +0 -4
- package/dist/esm/api/types/SimpleUsageBasedRate.d.mts +0 -4
- package/dist/esm/api/types/SimpleUsageBasedRate.mjs +0 -4
- package/dist/esm/api/types/SimpleUsageBasedRateInput.d.mts +0 -4
- package/dist/esm/api/types/SimpleUsageBasedRateInput.mjs +0 -4
- package/dist/esm/api/types/Subject.d.mts +0 -4
- package/dist/esm/api/types/Subject.mjs +0 -4
- package/dist/esm/api/types/SubjectGrantingConfig.d.mts +0 -4
- package/dist/esm/api/types/SubjectGrantingConfig.mjs +0 -4
- package/dist/esm/api/types/SubjectGrantingConfigResource.d.mts +0 -7
- package/dist/esm/api/types/SubjectGrantingConfigResource.mjs +0 -4
- package/dist/esm/api/types/TieredPrice.d.mts +0 -4
- package/dist/esm/api/types/TieredPrice.mjs +0 -4
- package/dist/esm/api/types/TieredPriceWrapper.d.mts +0 -4
- package/dist/esm/api/types/TieredPriceWrapper.mjs +0 -4
- package/dist/esm/api/types/UpdatePricingPlanRequest.d.mts +0 -4
- package/dist/esm/api/types/UpdatePricingPlanRequest.mjs +0 -4
- package/dist/esm/api/types/UpdateRateCardRequest.d.mts +0 -4
- package/dist/esm/api/types/UpdateRateCardRequest.mjs +0 -4
- package/dist/esm/api/types/UpdateSubscriptionRequest.d.mts +0 -4
- package/dist/esm/api/types/UpdateSubscriptionRequest.mjs +0 -4
- package/dist/esm/api/types/UsageBasedRate.d.mts +0 -4
- package/dist/esm/api/types/UsageBasedRate.mjs +0 -4
- package/dist/esm/api/types/UsageBasedRateInput.d.mts +0 -4
- package/dist/esm/api/types/UsageBasedRateInput.mjs +0 -4
- package/dist/esm/api/types/UsageUnit.d.mts +0 -4
- package/dist/esm/api/types/UsageUnit.mjs +0 -4
- /package/dist/cjs/api/resources/checkout/client/requests/{CreateRateCardCheckoutRequest.js → CreateSubscriptionCheckoutSessionRequest.js} +0 -0
- /package/dist/cjs/api/resources/{creditPools → customerAccess}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{creditPools → customerAccess}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{creditPools → customerAccess}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{creditPools → customerAccess}/index.js +0 -0
- /package/dist/cjs/api/resources/{rateCards/client/requests/RateCardsListRateCardsRequest.js → customerPortal/client/requests/CreateCustomerPortalSessionRequest.js} +0 -0
- /package/dist/cjs/api/resources/{featureAccess/client → customerPortal/client/requests}/index.js +0 -0
- /package/dist/cjs/api/resources/{featureAccess → customerPortal}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{featureAccess → customerPortal}/index.js +0 -0
- /package/dist/cjs/api/resources/{rateCards/types/CreateRateCardRequestUsageBasedRatesItem.js → pricingMetrics/client/requests/CreatePricingMetricRequest.js} +0 -0
- /package/dist/cjs/api/resources/{pricingPlans/client → pricingMetrics/client/requests}/index.js +0 -0
- /package/dist/cjs/api/resources/{rateCards/types/CreateRateCardVersionRequestUsageBasedRatesItem.js → pricingMetrics/types/PricingMetricAggregation.js} +0 -0
- /package/dist/cjs/api/resources/{subjects/client/requests/SubjectsListSubjectsRequest.js → rateCards/client/requests/ListRateCardsRateCardsGetRequest.js} +0 -0
- /package/dist/cjs/api/resources/{subscriptions/client/requests/SubscriptionsListSubscriptionsRequest.js → subjects/client/requests/ListSubjectsSubjectsGetRequest.js} +0 -0
- /package/dist/cjs/api/{types/CheckFeatureAccessRequest.js → resources/subscriptions/client/requests/ListSubscriptionsSubscriptionsGetRequest.js} +0 -0
- /package/dist/cjs/api/types/{CheckFeatureAccessResponse.js → BillingStateResponse.js} +0 -0
- /package/dist/cjs/api/types/{CreateCreditGrantInterface.js → CountAggregationPricingMetricResource.js} +0 -0
- /package/dist/cjs/api/types/{CreateCreditGrantInterfaceExpiration.js → CreateCustomerPortalSessionResponse.js} +0 -0
- /package/dist/cjs/api/types/{CreateCreditPoolRequest.js → CreatePricingMetricResponse.js} +0 -0
- /package/dist/cjs/api/types/{CreateDimensionCoordinateInterface.js → CreateSubscriptionCheckoutSessionResponse.js} +0 -0
- /package/dist/cjs/api/types/{CreateDimensionInterface.js → CreateUsageEventSummaryResponse.js} +0 -0
- /package/dist/cjs/api/types/{CreateDimensionalUsageBasedRateInterface.js → CustomPricingMetricResource.js} +0 -0
- /package/dist/cjs/api/types/{CreatePricingMatrixCellInterface.js → GetPricingMetricResponse.js} +0 -0
- /package/dist/cjs/api/types/{CreatePricingMatrixInterface.js → LastAggregationPricingMetricResource.js} +0 -0
- /package/dist/cjs/api/types/{CreatePricingMetricInterface.js → MaxAggregationPricingMetricResource.js} +0 -0
- /package/dist/cjs/api/types/{CreatePricingPlanRequest.js → Period.js} +0 -0
- /package/dist/cjs/api/types/{CreateRateCardCheckoutResponse.js → SumAggregationPricingMetricResource.js} +0 -0
- /package/dist/esm/api/resources/checkout/client/requests/{CreateRateCardCheckoutRequest.mjs → CreateSubscriptionCheckoutSessionRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{creditPools → customerAccess}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{creditPools → customerAccess}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{creditPools → customerAccess}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{creditPools → customerAccess}/index.mjs +0 -0
- /package/dist/esm/api/resources/{rateCards/client/requests/RateCardsListRateCardsRequest.mjs → customerPortal/client/requests/CreateCustomerPortalSessionRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{featureAccess/client → customerPortal/client/requests}/index.mjs +0 -0
- /package/dist/esm/api/resources/{featureAccess → customerPortal}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{featureAccess → customerPortal}/index.mjs +0 -0
- /package/dist/esm/api/resources/{rateCards/types/CreateRateCardRequestUsageBasedRatesItem.mjs → pricingMetrics/client/requests/CreatePricingMetricRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{pricingPlans/client → pricingMetrics/client/requests}/index.mjs +0 -0
- /package/dist/esm/api/resources/{rateCards/types/CreateRateCardVersionRequestUsageBasedRatesItem.mjs → pricingMetrics/types/PricingMetricAggregation.mjs} +0 -0
- /package/dist/esm/api/resources/{subjects/client/requests/SubjectsListSubjectsRequest.mjs → rateCards/client/requests/ListRateCardsRateCardsGetRequest.mjs} +0 -0
- /package/dist/esm/api/resources/{subscriptions/client/requests/SubscriptionsListSubscriptionsRequest.mjs → subjects/client/requests/ListSubjectsSubjectsGetRequest.mjs} +0 -0
- /package/dist/esm/api/{types/CheckFeatureAccessRequest.mjs → resources/subscriptions/client/requests/ListSubscriptionsSubscriptionsGetRequest.mjs} +0 -0
- /package/dist/esm/api/types/{CheckFeatureAccessResponse.mjs → BillingStateResponse.mjs} +0 -0
- /package/dist/esm/api/types/{CreateCreditGrantInterface.mjs → CountAggregationPricingMetricResource.mjs} +0 -0
- /package/dist/esm/api/types/{CreateCreditGrantInterfaceExpiration.mjs → CreateCustomerPortalSessionResponse.mjs} +0 -0
- /package/dist/esm/api/types/{CreateCreditPoolRequest.mjs → CreatePricingMetricResponse.mjs} +0 -0
- /package/dist/esm/api/types/{CreateDimensionCoordinateInterface.mjs → CreateSubscriptionCheckoutSessionResponse.mjs} +0 -0
- /package/dist/esm/api/types/{CreateDimensionInterface.mjs → CreateUsageEventSummaryResponse.mjs} +0 -0
- /package/dist/esm/api/types/{CreateDimensionalUsageBasedRateInterface.mjs → CustomPricingMetricResource.mjs} +0 -0
- /package/dist/esm/api/types/{CreatePricingMatrixCellInterface.mjs → GetPricingMetricResponse.mjs} +0 -0
- /package/dist/esm/api/types/{CreatePricingMatrixInterface.mjs → LastAggregationPricingMetricResource.mjs} +0 -0
- /package/dist/esm/api/types/{CreatePricingMetricInterface.mjs → MaxAggregationPricingMetricResource.mjs} +0 -0
- /package/dist/esm/api/types/{CreatePricingPlanRequest.mjs → Period.mjs} +0 -0
- /package/dist/esm/api/types/{CreateRateCardCheckoutResponse.mjs → SumAggregationPricingMetricResource.mjs} +0 -0
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments.mjs";
|
|
4
5
|
import * as core from "../../../../core/index.mjs";
|
|
5
6
|
import * as Lark from "../../../index.mjs";
|
|
6
7
|
export declare namespace Subscriptions {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.LarkEnvironment | string>;
|
|
9
10
|
/** Specify a custom URL to connect the client to. */
|
|
10
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
+
apiKey: core.Supplier<string>;
|
|
11
13
|
/** Additional headers to include in requests. */
|
|
12
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
13
15
|
}
|
|
@@ -28,7 +30,7 @@ export declare class Subscriptions {
|
|
|
28
30
|
protected readonly _options: Subscriptions.Options;
|
|
29
31
|
constructor(_options: Subscriptions.Options);
|
|
30
32
|
/**
|
|
31
|
-
* @param {Lark.
|
|
33
|
+
* @param {Lark.ListSubscriptionsSubscriptionsGetRequest} request
|
|
32
34
|
* @param {Subscriptions.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
35
|
*
|
|
34
36
|
* @throws {@link Lark.UnprocessableEntityError}
|
|
@@ -36,10 +38,11 @@ export declare class Subscriptions {
|
|
|
36
38
|
* @example
|
|
37
39
|
* await client.subscriptions.listSubscriptions({
|
|
38
40
|
* limit: 1,
|
|
39
|
-
*
|
|
41
|
+
* subject_id: "subject_id",
|
|
42
|
+
* rate_card_id: "rate_card_id"
|
|
40
43
|
* })
|
|
41
44
|
*/
|
|
42
|
-
listSubscriptions(request?: Lark.
|
|
45
|
+
listSubscriptions(request?: Lark.ListSubscriptionsSubscriptionsGetRequest, requestOptions?: Subscriptions.RequestOptions): core.HttpResponsePromise<Lark.ListSubscriptionsResponse>;
|
|
43
46
|
private __listSubscriptions;
|
|
44
47
|
/**
|
|
45
48
|
* @param {Lark.CreateSubscriptionRequest} request
|
|
@@ -50,8 +53,7 @@ export declare class Subscriptions {
|
|
|
50
53
|
* @example
|
|
51
54
|
* await client.subscriptions.createSubscription({
|
|
52
55
|
* rate_card_id: "rate_card_id",
|
|
53
|
-
* subject_id: "subject_id"
|
|
54
|
-
* effective_at: "2024-01-15T09:30:00Z"
|
|
56
|
+
* subject_id: "subject_id"
|
|
55
57
|
* })
|
|
56
58
|
*/
|
|
57
59
|
createSubscription(request: Lark.CreateSubscriptionRequest, requestOptions?: Subscriptions.RequestOptions): core.HttpResponsePromise<Lark.SubscriptionResource>;
|
|
@@ -67,22 +69,7 @@ export declare class Subscriptions {
|
|
|
67
69
|
*/
|
|
68
70
|
getSubscription(subscriptionId: string, requestOptions?: Subscriptions.RequestOptions): core.HttpResponsePromise<Lark.SubscriptionResource>;
|
|
69
71
|
private __getSubscription;
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
*
|
|
74
|
-
* @example
|
|
75
|
-
* await client.subscriptions.cancelSubscription("subscription_id")
|
|
76
|
-
*/
|
|
77
|
-
cancelSubscription(subscriptionId: string, requestOptions?: Subscriptions.RequestOptions): core.HttpResponsePromise<void>;
|
|
78
|
-
private __cancelSubscription;
|
|
79
|
-
/**
|
|
80
|
-
* @param {string} subscriptionId
|
|
81
|
-
* @param {Subscriptions.RequestOptions} requestOptions - Request-specific configuration.
|
|
82
|
-
*
|
|
83
|
-
* @example
|
|
84
|
-
* await client.subscriptions.updateSubscription("subscription_id")
|
|
85
|
-
*/
|
|
86
|
-
updateSubscription(subscriptionId: string, requestOptions?: Subscriptions.RequestOptions): core.HttpResponsePromise<void>;
|
|
87
|
-
private __updateSubscription;
|
|
72
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
73
|
+
"X-API-Key": string;
|
|
74
|
+
}>;
|
|
88
75
|
}
|
|
@@ -10,16 +10,17 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
|
+
import * as environments from "../../../../environments.mjs";
|
|
13
14
|
import * as core from "../../../../core/index.mjs";
|
|
14
15
|
import * as Lark from "../../../index.mjs";
|
|
15
|
-
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
16
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
16
17
|
import * as errors from "../../../../errors/index.mjs";
|
|
17
18
|
export class Subscriptions {
|
|
18
19
|
constructor(_options) {
|
|
19
20
|
this._options = _options;
|
|
20
21
|
}
|
|
21
22
|
/**
|
|
22
|
-
* @param {Lark.
|
|
23
|
+
* @param {Lark.ListSubscriptionsSubscriptionsGetRequest} request
|
|
23
24
|
* @param {Subscriptions.RequestOptions} requestOptions - Request-specific configuration.
|
|
24
25
|
*
|
|
25
26
|
* @throws {@link Lark.UnprocessableEntityError}
|
|
@@ -27,7 +28,8 @@ export class Subscriptions {
|
|
|
27
28
|
* @example
|
|
28
29
|
* await client.subscriptions.listSubscriptions({
|
|
29
30
|
* limit: 1,
|
|
30
|
-
*
|
|
31
|
+
* subject_id: "subject_id",
|
|
32
|
+
* rate_card_id: "rate_card_id"
|
|
31
33
|
* })
|
|
32
34
|
*/
|
|
33
35
|
listSubscriptions(request = {}, requestOptions) {
|
|
@@ -35,18 +37,21 @@ export class Subscriptions {
|
|
|
35
37
|
}
|
|
36
38
|
__listSubscriptions() {
|
|
37
39
|
return __awaiter(this, arguments, void 0, function* (request = {}, requestOptions) {
|
|
38
|
-
var _a, _b;
|
|
39
|
-
const { limit,
|
|
40
|
+
var _a, _b, _c;
|
|
41
|
+
const { limit, subject_id: subjectId, rate_card_id: rateCardId } = request;
|
|
40
42
|
const _queryParams = {};
|
|
41
43
|
if (limit != null) {
|
|
42
44
|
_queryParams["limit"] = limit.toString();
|
|
43
45
|
}
|
|
44
|
-
if (
|
|
45
|
-
_queryParams["
|
|
46
|
+
if (subjectId != null) {
|
|
47
|
+
_queryParams["subject_id"] = subjectId;
|
|
48
|
+
}
|
|
49
|
+
if (rateCardId != null) {
|
|
50
|
+
_queryParams["rate_card_id"] = rateCardId;
|
|
46
51
|
}
|
|
47
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
52
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
48
53
|
const _response = yield core.fetcher({
|
|
49
|
-
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "subscriptions"),
|
|
54
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LarkEnvironment.Default, "subscriptions"),
|
|
50
55
|
method: "GET",
|
|
51
56
|
headers: _headers,
|
|
52
57
|
queryParameters: Object.assign(Object.assign({}, _queryParams), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams),
|
|
@@ -95,8 +100,7 @@ export class Subscriptions {
|
|
|
95
100
|
* @example
|
|
96
101
|
* await client.subscriptions.createSubscription({
|
|
97
102
|
* rate_card_id: "rate_card_id",
|
|
98
|
-
* subject_id: "subject_id"
|
|
99
|
-
* effective_at: "2024-01-15T09:30:00Z"
|
|
103
|
+
* subject_id: "subject_id"
|
|
100
104
|
* })
|
|
101
105
|
*/
|
|
102
106
|
createSubscription(request, requestOptions) {
|
|
@@ -104,10 +108,10 @@ export class Subscriptions {
|
|
|
104
108
|
}
|
|
105
109
|
__createSubscription(request, requestOptions) {
|
|
106
110
|
return __awaiter(this, void 0, void 0, function* () {
|
|
107
|
-
var _a, _b;
|
|
108
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
111
|
+
var _a, _b, _c;
|
|
112
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
109
113
|
const _response = yield core.fetcher({
|
|
110
|
-
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "subscriptions"),
|
|
114
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LarkEnvironment.Default, "subscriptions"),
|
|
111
115
|
method: "POST",
|
|
112
116
|
headers: _headers,
|
|
113
117
|
contentType: "application/json",
|
|
@@ -164,10 +168,10 @@ export class Subscriptions {
|
|
|
164
168
|
}
|
|
165
169
|
__getSubscription(subscriptionId, requestOptions) {
|
|
166
170
|
return __awaiter(this, void 0, void 0, function* () {
|
|
167
|
-
var _a, _b;
|
|
168
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
171
|
+
var _a, _b, _c;
|
|
172
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
169
173
|
const _response = yield core.fetcher({
|
|
170
|
-
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `subscriptions/${encodeURIComponent(subscriptionId)}`),
|
|
174
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LarkEnvironment.Default, `subscriptions/${encodeURIComponent(subscriptionId)}`),
|
|
171
175
|
method: "GET",
|
|
172
176
|
headers: _headers,
|
|
173
177
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -207,104 +211,10 @@ export class Subscriptions {
|
|
|
207
211
|
}
|
|
208
212
|
});
|
|
209
213
|
}
|
|
210
|
-
|
|
211
|
-
* @param {string} subscriptionId
|
|
212
|
-
* @param {Subscriptions.RequestOptions} requestOptions - Request-specific configuration.
|
|
213
|
-
*
|
|
214
|
-
* @example
|
|
215
|
-
* await client.subscriptions.cancelSubscription("subscription_id")
|
|
216
|
-
*/
|
|
217
|
-
cancelSubscription(subscriptionId, requestOptions) {
|
|
218
|
-
return core.HttpResponsePromise.fromPromise(this.__cancelSubscription(subscriptionId, requestOptions));
|
|
219
|
-
}
|
|
220
|
-
__cancelSubscription(subscriptionId, requestOptions) {
|
|
221
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
222
|
-
var _a, _b;
|
|
223
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
224
|
-
const _response = yield core.fetcher({
|
|
225
|
-
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `subscriptions/${encodeURIComponent(subscriptionId)}`),
|
|
226
|
-
method: "DELETE",
|
|
227
|
-
headers: _headers,
|
|
228
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
229
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
230
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
231
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
232
|
-
});
|
|
233
|
-
if (_response.ok) {
|
|
234
|
-
return { data: undefined, rawResponse: _response.rawResponse };
|
|
235
|
-
}
|
|
236
|
-
if (_response.error.reason === "status-code") {
|
|
237
|
-
throw new errors.LarkError({
|
|
238
|
-
statusCode: _response.error.statusCode,
|
|
239
|
-
body: _response.error.body,
|
|
240
|
-
rawResponse: _response.rawResponse,
|
|
241
|
-
});
|
|
242
|
-
}
|
|
243
|
-
switch (_response.error.reason) {
|
|
244
|
-
case "non-json":
|
|
245
|
-
throw new errors.LarkError({
|
|
246
|
-
statusCode: _response.error.statusCode,
|
|
247
|
-
body: _response.error.rawBody,
|
|
248
|
-
rawResponse: _response.rawResponse,
|
|
249
|
-
});
|
|
250
|
-
case "timeout":
|
|
251
|
-
throw new errors.LarkTimeoutError("Timeout exceeded when calling DELETE /subscriptions/{subscription_id}.");
|
|
252
|
-
case "unknown":
|
|
253
|
-
throw new errors.LarkError({
|
|
254
|
-
message: _response.error.errorMessage,
|
|
255
|
-
rawResponse: _response.rawResponse,
|
|
256
|
-
});
|
|
257
|
-
}
|
|
258
|
-
});
|
|
259
|
-
}
|
|
260
|
-
/**
|
|
261
|
-
* @param {string} subscriptionId
|
|
262
|
-
* @param {Subscriptions.RequestOptions} requestOptions - Request-specific configuration.
|
|
263
|
-
*
|
|
264
|
-
* @example
|
|
265
|
-
* await client.subscriptions.updateSubscription("subscription_id")
|
|
266
|
-
*/
|
|
267
|
-
updateSubscription(subscriptionId, requestOptions) {
|
|
268
|
-
return core.HttpResponsePromise.fromPromise(this.__updateSubscription(subscriptionId, requestOptions));
|
|
269
|
-
}
|
|
270
|
-
__updateSubscription(subscriptionId, requestOptions) {
|
|
214
|
+
_getCustomAuthorizationHeaders() {
|
|
271
215
|
return __awaiter(this, void 0, void 0, function* () {
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
const _response = yield core.fetcher({
|
|
275
|
-
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `subscriptions/${encodeURIComponent(subscriptionId)}`),
|
|
276
|
-
method: "PATCH",
|
|
277
|
-
headers: _headers,
|
|
278
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
279
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
280
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
281
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
282
|
-
});
|
|
283
|
-
if (_response.ok) {
|
|
284
|
-
return { data: undefined, rawResponse: _response.rawResponse };
|
|
285
|
-
}
|
|
286
|
-
if (_response.error.reason === "status-code") {
|
|
287
|
-
throw new errors.LarkError({
|
|
288
|
-
statusCode: _response.error.statusCode,
|
|
289
|
-
body: _response.error.body,
|
|
290
|
-
rawResponse: _response.rawResponse,
|
|
291
|
-
});
|
|
292
|
-
}
|
|
293
|
-
switch (_response.error.reason) {
|
|
294
|
-
case "non-json":
|
|
295
|
-
throw new errors.LarkError({
|
|
296
|
-
statusCode: _response.error.statusCode,
|
|
297
|
-
body: _response.error.rawBody,
|
|
298
|
-
rawResponse: _response.rawResponse,
|
|
299
|
-
});
|
|
300
|
-
case "timeout":
|
|
301
|
-
throw new errors.LarkTimeoutError("Timeout exceeded when calling PATCH /subscriptions/{subscription_id}.");
|
|
302
|
-
case "unknown":
|
|
303
|
-
throw new errors.LarkError({
|
|
304
|
-
message: _response.error.errorMessage,
|
|
305
|
-
rawResponse: _response.rawResponse,
|
|
306
|
-
});
|
|
307
|
-
}
|
|
216
|
+
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
217
|
+
return { "X-API-Key": apiKeyValue };
|
|
308
218
|
});
|
|
309
219
|
}
|
|
310
220
|
}
|
package/dist/esm/api/resources/subscriptions/client/requests/CreateSubscriptionRequest.d.mts
CHANGED
|
@@ -5,14 +5,11 @@
|
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
7
|
* rate_card_id: "rate_card_id",
|
|
8
|
-
* subject_id: "subject_id"
|
|
9
|
-
* effective_at: "2024-01-15T09:30:00Z"
|
|
8
|
+
* subject_id: "subject_id"
|
|
10
9
|
* }
|
|
11
10
|
*/
|
|
12
11
|
export interface CreateSubscriptionRequest {
|
|
13
12
|
rate_card_id: string;
|
|
14
13
|
subject_id: string;
|
|
15
|
-
effective_at: string;
|
|
16
|
-
variables?: Record<string, string | undefined>;
|
|
17
14
|
metadata?: Record<string, string | undefined>;
|
|
18
15
|
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* @example
|
|
6
|
+
* {
|
|
7
|
+
* limit: 1,
|
|
8
|
+
* subject_id: "subject_id",
|
|
9
|
+
* rate_card_id: "rate_card_id"
|
|
10
|
+
* }
|
|
11
|
+
*/
|
|
12
|
+
export interface ListSubscriptionsSubscriptionsGetRequest {
|
|
13
|
+
limit?: number;
|
|
14
|
+
/** The ID of the subject to list subscriptions for. Cannot be used with rate_card_id. */
|
|
15
|
+
subject_id?: string;
|
|
16
|
+
/** The ID of the rate card to list subscriptions for. Cannot be used with subject_id. */
|
|
17
|
+
rate_card_id?: string;
|
|
18
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { type
|
|
1
|
+
export { type ListSubscriptionsSubscriptionsGetRequest } from "./ListSubscriptionsSubscriptionsGetRequest.mjs";
|
|
2
2
|
export { type CreateSubscriptionRequest } from "./CreateSubscriptionRequest.mjs";
|
|
@@ -1,13 +1,15 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "../../../../environments.mjs";
|
|
4
5
|
import * as core from "../../../../core/index.mjs";
|
|
5
6
|
import * as Lark from "../../../index.mjs";
|
|
6
7
|
export declare namespace UsageEvents {
|
|
7
8
|
interface Options {
|
|
8
|
-
environment
|
|
9
|
+
environment?: core.Supplier<environments.LarkEnvironment | string>;
|
|
9
10
|
/** Specify a custom URL to connect the client to. */
|
|
10
11
|
baseUrl?: core.Supplier<string>;
|
|
12
|
+
apiKey: core.Supplier<string>;
|
|
11
13
|
/** Additional headers to include in requests. */
|
|
12
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
13
15
|
}
|
|
@@ -38,7 +40,6 @@ export declare class UsageEvents {
|
|
|
38
40
|
* idempotency_key: "idempotency_key",
|
|
39
41
|
* event_name: "event_name",
|
|
40
42
|
* subject_id: "subject_id",
|
|
41
|
-
* timestamp: "2024-01-15T09:30:00Z",
|
|
42
43
|
* data: {
|
|
43
44
|
* "key": "value"
|
|
44
45
|
* }
|
|
@@ -46,4 +47,26 @@ export declare class UsageEvents {
|
|
|
46
47
|
*/
|
|
47
48
|
createUsageEvent(request: Lark.CreateUsageEventRequest, requestOptions?: UsageEvents.RequestOptions): core.HttpResponsePromise<unknown>;
|
|
48
49
|
private __createUsageEvent;
|
|
50
|
+
/**
|
|
51
|
+
* @param {Lark.CreateUsageEventSummaryRequest} request
|
|
52
|
+
* @param {UsageEvents.RequestOptions} requestOptions - Request-specific configuration.
|
|
53
|
+
*
|
|
54
|
+
* @throws {@link Lark.UnprocessableEntityError}
|
|
55
|
+
*
|
|
56
|
+
* @example
|
|
57
|
+
* await client.usageEvents.createUsageEventSummary({
|
|
58
|
+
* event_name: "event_name",
|
|
59
|
+
* subject_id: "subject_id",
|
|
60
|
+
* period: {
|
|
61
|
+
* start: "2024-01-15T09:30:00Z",
|
|
62
|
+
* end: "2024-01-15T09:30:00Z"
|
|
63
|
+
* },
|
|
64
|
+
* aggregation_type: "sum"
|
|
65
|
+
* })
|
|
66
|
+
*/
|
|
67
|
+
createUsageEventSummary(request: Lark.CreateUsageEventSummaryRequest, requestOptions?: UsageEvents.RequestOptions): core.HttpResponsePromise<Lark.CreateUsageEventSummaryResponse>;
|
|
68
|
+
private __createUsageEventSummary;
|
|
69
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
70
|
+
"X-API-Key": string;
|
|
71
|
+
}>;
|
|
49
72
|
}
|
|
@@ -10,9 +10,10 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
11
11
|
});
|
|
12
12
|
};
|
|
13
|
+
import * as environments from "../../../../environments.mjs";
|
|
13
14
|
import * as core from "../../../../core/index.mjs";
|
|
14
15
|
import * as Lark from "../../../index.mjs";
|
|
15
|
-
import { mergeHeaders } from "../../../../core/headers.mjs";
|
|
16
|
+
import { mergeHeaders, mergeOnlyDefinedHeaders } from "../../../../core/headers.mjs";
|
|
16
17
|
import * as errors from "../../../../errors/index.mjs";
|
|
17
18
|
export class UsageEvents {
|
|
18
19
|
constructor(_options) {
|
|
@@ -29,7 +30,6 @@ export class UsageEvents {
|
|
|
29
30
|
* idempotency_key: "idempotency_key",
|
|
30
31
|
* event_name: "event_name",
|
|
31
32
|
* subject_id: "subject_id",
|
|
32
|
-
* timestamp: "2024-01-15T09:30:00Z",
|
|
33
33
|
* data: {
|
|
34
34
|
* "key": "value"
|
|
35
35
|
* }
|
|
@@ -40,10 +40,10 @@ export class UsageEvents {
|
|
|
40
40
|
}
|
|
41
41
|
__createUsageEvent(request, requestOptions) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function* () {
|
|
43
|
-
var _a, _b;
|
|
44
|
-
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
43
|
+
var _a, _b, _c;
|
|
44
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
45
45
|
const _response = yield core.fetcher({
|
|
46
|
-
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "usage-events"),
|
|
46
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LarkEnvironment.Default, "usage-events"),
|
|
47
47
|
method: "POST",
|
|
48
48
|
headers: _headers,
|
|
49
49
|
contentType: "application/json",
|
|
@@ -86,4 +86,78 @@ export class UsageEvents {
|
|
|
86
86
|
}
|
|
87
87
|
});
|
|
88
88
|
}
|
|
89
|
+
/**
|
|
90
|
+
* @param {Lark.CreateUsageEventSummaryRequest} request
|
|
91
|
+
* @param {UsageEvents.RequestOptions} requestOptions - Request-specific configuration.
|
|
92
|
+
*
|
|
93
|
+
* @throws {@link Lark.UnprocessableEntityError}
|
|
94
|
+
*
|
|
95
|
+
* @example
|
|
96
|
+
* await client.usageEvents.createUsageEventSummary({
|
|
97
|
+
* event_name: "event_name",
|
|
98
|
+
* subject_id: "subject_id",
|
|
99
|
+
* period: {
|
|
100
|
+
* start: "2024-01-15T09:30:00Z",
|
|
101
|
+
* end: "2024-01-15T09:30:00Z"
|
|
102
|
+
* },
|
|
103
|
+
* aggregation_type: "sum"
|
|
104
|
+
* })
|
|
105
|
+
*/
|
|
106
|
+
createUsageEventSummary(request, requestOptions) {
|
|
107
|
+
return core.HttpResponsePromise.fromPromise(this.__createUsageEventSummary(request, requestOptions));
|
|
108
|
+
}
|
|
109
|
+
__createUsageEventSummary(request, requestOptions) {
|
|
110
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
111
|
+
var _a, _b, _c;
|
|
112
|
+
let _headers = mergeHeaders((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, mergeOnlyDefinedHeaders(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
113
|
+
const _response = yield core.fetcher({
|
|
114
|
+
url: core.url.join((_c = (_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment))) !== null && _c !== void 0 ? _c : environments.LarkEnvironment.Default, "usage-events/summary"),
|
|
115
|
+
method: "POST",
|
|
116
|
+
headers: _headers,
|
|
117
|
+
contentType: "application/json",
|
|
118
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
119
|
+
requestType: "json",
|
|
120
|
+
body: request,
|
|
121
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
122
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
123
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
124
|
+
});
|
|
125
|
+
if (_response.ok) {
|
|
126
|
+
return { data: _response.body, rawResponse: _response.rawResponse };
|
|
127
|
+
}
|
|
128
|
+
if (_response.error.reason === "status-code") {
|
|
129
|
+
switch (_response.error.statusCode) {
|
|
130
|
+
case 422:
|
|
131
|
+
throw new Lark.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
132
|
+
default:
|
|
133
|
+
throw new errors.LarkError({
|
|
134
|
+
statusCode: _response.error.statusCode,
|
|
135
|
+
body: _response.error.body,
|
|
136
|
+
rawResponse: _response.rawResponse,
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
switch (_response.error.reason) {
|
|
141
|
+
case "non-json":
|
|
142
|
+
throw new errors.LarkError({
|
|
143
|
+
statusCode: _response.error.statusCode,
|
|
144
|
+
body: _response.error.rawBody,
|
|
145
|
+
rawResponse: _response.rawResponse,
|
|
146
|
+
});
|
|
147
|
+
case "timeout":
|
|
148
|
+
throw new errors.LarkTimeoutError("Timeout exceeded when calling POST /usage-events/summary.");
|
|
149
|
+
case "unknown":
|
|
150
|
+
throw new errors.LarkError({
|
|
151
|
+
message: _response.error.errorMessage,
|
|
152
|
+
rawResponse: _response.rawResponse,
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
});
|
|
156
|
+
}
|
|
157
|
+
_getCustomAuthorizationHeaders() {
|
|
158
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
159
|
+
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
160
|
+
return { "X-API-Key": apiKeyValue };
|
|
161
|
+
});
|
|
162
|
+
}
|
|
89
163
|
}
|
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* idempotency_key: "idempotency_key",
|
|
8
8
|
* event_name: "event_name",
|
|
9
9
|
* subject_id: "subject_id",
|
|
10
|
-
* timestamp: "2024-01-15T09:30:00Z",
|
|
11
10
|
* data: {
|
|
12
11
|
* "key": "value"
|
|
13
12
|
* }
|
|
@@ -17,6 +16,6 @@ export interface CreateUsageEventRequest {
|
|
|
17
16
|
idempotency_key: string;
|
|
18
17
|
event_name: string;
|
|
19
18
|
subject_id: string;
|
|
20
|
-
timestamp
|
|
21
|
-
data: Record<string,
|
|
19
|
+
timestamp?: string;
|
|
20
|
+
data: Record<string, unknown>;
|
|
22
21
|
}
|
package/dist/esm/api/resources/usageEvents/client/requests/CreateUsageEventSummaryRequest.d.mts
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as Lark from "../../../../index.mjs";
|
|
5
|
+
/**
|
|
6
|
+
* @example
|
|
7
|
+
* {
|
|
8
|
+
* event_name: "event_name",
|
|
9
|
+
* subject_id: "subject_id",
|
|
10
|
+
* period: {
|
|
11
|
+
* start: "2024-01-15T09:30:00Z",
|
|
12
|
+
* end: "2024-01-15T09:30:00Z"
|
|
13
|
+
* },
|
|
14
|
+
* aggregation_type: "sum"
|
|
15
|
+
* }
|
|
16
|
+
*/
|
|
17
|
+
export interface CreateUsageEventSummaryRequest {
|
|
18
|
+
event_name: string;
|
|
19
|
+
subject_id: string;
|
|
20
|
+
period: Lark.Period;
|
|
21
|
+
aggregation_type: CreateUsageEventSummaryRequest.AggregationType;
|
|
22
|
+
}
|
|
23
|
+
export declare namespace CreateUsageEventSummaryRequest {
|
|
24
|
+
type AggregationType = "sum" | "count" | "max";
|
|
25
|
+
const AggregationType: {
|
|
26
|
+
readonly Sum: "sum";
|
|
27
|
+
readonly Count: "count";
|
|
28
|
+
readonly Max: "max";
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
export var CreateUsageEventSummaryRequest;
|
|
5
|
+
(function (CreateUsageEventSummaryRequest) {
|
|
6
|
+
CreateUsageEventSummaryRequest.AggregationType = {
|
|
7
|
+
Sum: "sum",
|
|
8
|
+
Count: "count",
|
|
9
|
+
Max: "max",
|
|
10
|
+
};
|
|
11
|
+
})(CreateUsageEventSummaryRequest || (CreateUsageEventSummaryRequest = {}));
|
|
@@ -4,19 +4,19 @@
|
|
|
4
4
|
import * as Lark from "../index.mjs";
|
|
5
5
|
export type Aggregation = Lark.Aggregation.Count | Lark.Aggregation.Custom | Lark.Aggregation.Last | Lark.Aggregation.Max | Lark.Aggregation.Sum;
|
|
6
6
|
export declare namespace Aggregation {
|
|
7
|
-
interface Count extends Lark.
|
|
7
|
+
interface Count extends Lark.CountAggregationPricingMetricResource {
|
|
8
8
|
aggregation_type: "count";
|
|
9
9
|
}
|
|
10
|
-
interface Custom extends Lark.
|
|
10
|
+
interface Custom extends Lark.CustomPricingMetricResource {
|
|
11
11
|
aggregation_type: "custom";
|
|
12
12
|
}
|
|
13
|
-
interface Last extends Lark.
|
|
13
|
+
interface Last extends Lark.LastAggregationPricingMetricResource {
|
|
14
14
|
aggregation_type: "last";
|
|
15
15
|
}
|
|
16
|
-
interface Max extends Lark.
|
|
16
|
+
interface Max extends Lark.MaxAggregationPricingMetricResource {
|
|
17
17
|
aggregation_type: "max";
|
|
18
18
|
}
|
|
19
|
-
interface Sum extends Lark.
|
|
19
|
+
interface Sum extends Lark.SumAggregationPricingMetricResource {
|
|
20
20
|
aggregation_type: "sum";
|
|
21
21
|
}
|
|
22
22
|
}
|
|
@@ -3,9 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Lark from "../index.mjs";
|
|
5
5
|
export interface CreateFixedRateInterface {
|
|
6
|
-
name
|
|
6
|
+
name?: string;
|
|
7
7
|
description?: string;
|
|
8
|
-
price
|
|
9
|
-
credit_grants?: Lark.CreateCreditGrantInterface[];
|
|
10
|
-
quantity_code?: string;
|
|
8
|
+
price: Lark.Price;
|
|
11
9
|
}
|
package/dist/esm/api/types/{PricingMetricInterface.d.mts → CreatePricingMetricResponse.d.mts}
RENAMED
|
@@ -2,7 +2,8 @@
|
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
4
|
import * as Lark from "../index.mjs";
|
|
5
|
-
export interface
|
|
5
|
+
export interface CreatePricingMetricResponse {
|
|
6
|
+
id: string;
|
|
6
7
|
name: string;
|
|
7
8
|
event_name: string;
|
|
8
9
|
aggregation: Lark.Aggregation;
|
|
@@ -3,9 +3,10 @@
|
|
|
3
3
|
*/
|
|
4
4
|
import * as Lark from "../index.mjs";
|
|
5
5
|
export interface CreateSimpleUsageBasedRateInterface {
|
|
6
|
-
|
|
6
|
+
usage_based_rate_type?: "simple";
|
|
7
|
+
name?: string;
|
|
7
8
|
description?: string;
|
|
8
|
-
price
|
|
9
|
+
price: Lark.Price;
|
|
9
10
|
included_units?: number;
|
|
10
|
-
|
|
11
|
+
pricing_metric_id: string;
|
|
11
12
|
}
|