lark-billing 0.0.6 → 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 +2 -1
- package/dist/cjs/Client.d.ts +12 -5
- package/dist/cjs/Client.js +23 -13
- package/dist/cjs/api/resources/checkout/client/Client.d.ts +6 -15
- package/dist/cjs/api/resources/checkout/client/Client.js +5 -63
- package/dist/cjs/api/resources/checkout/client/requests/CreateSubscriptionCheckoutSessionRequest.d.ts +3 -2
- package/dist/cjs/api/resources/{featureAccess → customerAccess}/client/Client.d.ts +13 -11
- package/dist/cjs/api/resources/{featureAccess → customerAccess}/client/Client.js +13 -11
- 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/customerPortal/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/customerPortal/index.d.ts +1 -0
- package/dist/cjs/api/resources/customerPortal/index.js +17 -0
- package/dist/cjs/api/resources/index.d.ts +7 -3
- package/dist/cjs/api/resources/index.js +8 -4
- package/dist/cjs/api/resources/pricingMetrics/client/Client.d.ts +64 -0
- package/dist/cjs/api/resources/pricingMetrics/client/Client.js +189 -0
- 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/pricingMetrics/client/requests/index.js +2 -0
- package/dist/cjs/api/resources/pricingMetrics/index.d.ts +2 -0
- package/dist/cjs/api/resources/pricingMetrics/index.js +18 -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 +9 -112
- package/dist/cjs/api/resources/rateCards/client/Client.js +10 -247
- package/dist/cjs/api/resources/rateCards/client/requests/CreateRateCardRequest.d.ts +2 -37
- 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 +6 -5
- package/dist/cjs/api/resources/subjects/client/Client.js +12 -11
- package/dist/cjs/api/resources/subjects/client/requests/CreateSubjectRequest.d.ts +0 -1
- package/dist/cjs/api/resources/subjects/client/requests/{SubjectsListSubjectsRequest.d.ts → 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 +9 -26
- package/dist/cjs/api/resources/subscriptions/client/Client.js +17 -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 +4 -4
- package/dist/cjs/api/resources/usageEvents/client/Client.js +5 -5
- package/dist/cjs/api/resources/usageEvents/client/requests/CreateUsageEventRequest.d.ts +1 -2
- 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/cjs/api/types/CreateCustomerPortalSessionResponse.d.ts +7 -0
- package/dist/cjs/api/types/CreateFixedRateInterface.d.ts +2 -5
- package/dist/cjs/api/types/{PricingMetricInterface.d.ts → CreatePricingMetricResponse.d.ts} +1 -2
- package/dist/cjs/api/types/CreateSimpleUsageBasedRateInterface.d.ts +4 -5
- package/dist/cjs/api/types/CreateSubjectResponse.d.ts +1 -1
- package/dist/cjs/api/types/CreateSubscriptionCheckoutSessionResponse.d.ts +1 -2
- package/dist/cjs/api/types/CreateUsageEventSummaryResponse.d.ts +1 -1
- package/dist/cjs/api/types/{CreditGrantScheduleRateCycleStartResource.d.ts → CustomPricingMetricResource.d.ts} +2 -1
- package/dist/cjs/api/types/FixedRateInterface.d.ts +1 -4
- package/dist/cjs/api/types/{CreatePricingMetricInterface.d.ts → GetPricingMetricResponse.d.ts} +2 -2
- package/dist/cjs/api/types/{MaxAggregationPricingMetricInterface.d.ts → LastAggregationPricingMetricResource.d.ts} +1 -2
- package/dist/{esm/api/types/MaxAggregationPricingMetricInterface.d.mts → cjs/api/types/MaxAggregationPricingMetricResource.d.ts} +1 -2
- 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 +2 -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/{LastAggregationPricingMetricInterface.d.ts → SumAggregationPricingMetricResource.d.ts} +1 -2
- package/dist/cjs/api/types/index.d.ts +9 -86
- package/dist/cjs/api/types/index.js +9 -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 -5
- package/dist/esm/Client.mjs +17 -7
- package/dist/esm/api/resources/checkout/client/Client.d.mts +6 -15
- package/dist/esm/api/resources/checkout/client/Client.mjs +5 -63
- package/dist/esm/api/resources/checkout/client/requests/CreateSubscriptionCheckoutSessionRequest.d.mts +3 -2
- package/dist/esm/api/resources/{featureAccess → customerAccess}/client/Client.d.mts +13 -11
- package/dist/esm/api/resources/{featureAccess → customerAccess}/client/Client.mjs +11 -9
- 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/customerPortal/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/customerPortal/index.d.mts +1 -0
- package/dist/esm/api/resources/customerPortal/index.mjs +1 -0
- package/dist/esm/api/resources/index.d.mts +7 -3
- package/dist/esm/api/resources/index.mjs +7 -3
- 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/pricingMetrics/client/requests/index.mjs +1 -0
- package/dist/esm/api/resources/pricingMetrics/index.d.mts +2 -0
- package/dist/esm/api/resources/pricingMetrics/index.mjs +2 -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 +9 -112
- package/dist/esm/api/resources/rateCards/client/Client.mjs +10 -247
- package/dist/esm/api/resources/rateCards/client/requests/CreateRateCardRequest.d.mts +2 -37
- package/dist/esm/api/resources/rateCards/client/requests/{RateCardsListRateCardsRequest.d.mts → 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 +6 -5
- package/dist/esm/api/resources/subjects/client/Client.mjs +12 -11
- package/dist/esm/api/resources/subjects/client/requests/CreateSubjectRequest.d.mts +0 -1
- package/dist/{cjs/api/resources/rateCards/client/requests/RateCardsListRateCardsRequest.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 +9 -26
- package/dist/esm/api/resources/subscriptions/client/Client.mjs +17 -113
- 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 +4 -4
- package/dist/esm/api/resources/usageEvents/client/Client.mjs +5 -5
- package/dist/esm/api/resources/usageEvents/client/requests/CreateUsageEventRequest.d.mts +1 -2
- 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/esm/api/types/CreateCustomerPortalSessionResponse.d.mts +7 -0
- package/dist/esm/api/types/CreateFixedRateInterface.d.mts +2 -5
- package/dist/esm/api/types/{PricingMetricInterface.d.mts → CreatePricingMetricResponse.d.mts} +1 -2
- package/dist/esm/api/types/CreateSimpleUsageBasedRateInterface.d.mts +4 -5
- package/dist/esm/api/types/CreateSubjectResponse.d.mts +1 -1
- package/dist/esm/api/types/CreateSubscriptionCheckoutSessionResponse.d.mts +1 -2
- package/dist/esm/api/types/CreateUsageEventSummaryResponse.d.mts +1 -1
- package/dist/esm/api/types/{CreditGrantScheduleRateCycleStartResource.d.mts → CustomPricingMetricResource.d.mts} +2 -1
- package/dist/esm/api/types/FixedRateInterface.d.mts +1 -4
- package/dist/esm/api/types/{CreatePricingMetricInterface.d.mts → GetPricingMetricResponse.d.mts} +2 -2
- package/dist/esm/api/types/{LastAggregationPricingMetricInterface.d.mts → LastAggregationPricingMetricResource.d.mts} +1 -2
- package/dist/esm/api/types/MaxAggregationPricingMetricResource.d.mts +6 -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 +2 -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/SumAggregationPricingMetricResource.d.mts +6 -0
- package/dist/esm/api/types/index.d.mts +9 -86
- package/dist/esm/api/types/index.mjs +9 -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 +75 -296
- package/dist/cjs/api/resources/rateCards/client/requests/CreateRateCardVersionRequest.d.ts +0 -63
- 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/CompleteSubscriptionCheckoutResponse.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 -14
- 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/CreatePricingMatrixInterface.js +0 -5
- package/dist/cjs/api/types/CreatePricingMetricInterface.js +0 -5
- package/dist/cjs/api/types/CreatePricingPlanRequest.d.ts +0 -4
- package/dist/cjs/api/types/CreatePricingPlanRequest.js +0 -5
- 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.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.d.ts +0 -7
- 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 -15
- 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/rateCards/client/requests/CreateRateCardVersionRequest.d.mts +0 -63
- 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/CompleteSubscriptionCheckoutResponse.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 -14
- 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/CreatePricingMatrixInterface.mjs +0 -4
- package/dist/esm/api/types/CreatePricingMetricInterface.mjs +0 -4
- package/dist/esm/api/types/CreatePricingPlanRequest.d.mts +0 -4
- package/dist/esm/api/types/CreatePricingPlanRequest.mjs +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.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.d.mts +0 -7
- 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 -15
- 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/{featureAccess → customerAccess}/client/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{featureAccess → customerAccess}/client/index.js +0 -0
- /package/dist/cjs/api/resources/{featureAccess → customerAccess}/index.d.ts +0 -0
- /package/dist/cjs/api/resources/{featureAccess → 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/{rateCards/types/CreateRateCardRequestUsageBasedRatesItem.js → pricingMetrics/client/requests/CreatePricingMetricRequest.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/{CompleteSubscriptionCheckoutResponse.js → CountAggregationPricingMetricResource.js} +0 -0
- /package/dist/cjs/api/types/{CreateCreditGrantInterface.js → CreateCustomerPortalSessionResponse.js} +0 -0
- /package/dist/cjs/api/types/{CreateCreditGrantInterfaceExpiration.js → CreatePricingMetricResponse.js} +0 -0
- /package/dist/cjs/api/types/{CreateCreditPoolRequest.js → CustomPricingMetricResource.js} +0 -0
- /package/dist/cjs/api/types/{CreateDimensionCoordinateInterface.js → GetPricingMetricResponse.js} +0 -0
- /package/dist/cjs/api/types/{CreateDimensionInterface.js → LastAggregationPricingMetricResource.js} +0 -0
- /package/dist/cjs/api/types/{CreateDimensionalUsageBasedRateInterface.js → MaxAggregationPricingMetricResource.js} +0 -0
- /package/dist/cjs/api/types/{CreatePricingMatrixCellInterface.js → SumAggregationPricingMetricResource.js} +0 -0
- /package/dist/esm/api/resources/{featureAccess → customerAccess}/client/index.d.mts +0 -0
- /package/dist/esm/api/resources/{featureAccess → customerAccess}/client/index.mjs +0 -0
- /package/dist/esm/api/resources/{featureAccess → customerAccess}/index.d.mts +0 -0
- /package/dist/esm/api/resources/{featureAccess → 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/{rateCards/types/CreateRateCardRequestUsageBasedRatesItem.mjs → pricingMetrics/client/requests/CreatePricingMetricRequest.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/{CompleteSubscriptionCheckoutResponse.mjs → CountAggregationPricingMetricResource.mjs} +0 -0
- /package/dist/esm/api/types/{CreateCreditGrantInterface.mjs → CreateCustomerPortalSessionResponse.mjs} +0 -0
- /package/dist/esm/api/types/{CreateCreditGrantInterfaceExpiration.mjs → CreatePricingMetricResponse.mjs} +0 -0
- /package/dist/esm/api/types/{CreateCreditPoolRequest.mjs → CustomPricingMetricResource.mjs} +0 -0
- /package/dist/esm/api/types/{CreateDimensionCoordinateInterface.mjs → GetPricingMetricResponse.mjs} +0 -0
- /package/dist/esm/api/types/{CreateDimensionInterface.mjs → LastAggregationPricingMetricResource.mjs} +0 -0
- /package/dist/esm/api/types/{CreateDimensionalUsageBasedRateInterface.mjs → MaxAggregationPricingMetricResource.mjs} +0 -0
- /package/dist/esm/api/types/{CreatePricingMatrixCellInterface.mjs → SumAggregationPricingMetricResource.mjs} +0 -0
package/README.md
CHANGED
|
@@ -22,10 +22,11 @@ Instantiate and use the client with the following:
|
|
|
22
22
|
```typescript
|
|
23
23
|
import { LarkClient } from "lark-billing";
|
|
24
24
|
|
|
25
|
-
const client = new LarkClient({
|
|
25
|
+
const client = new LarkClient({ apiKey: "YOUR_API_KEY" });
|
|
26
26
|
await client.checkout.createSubscriptionCheckoutSession({
|
|
27
27
|
subject_id: "subject_id",
|
|
28
28
|
rate_card_id: "rate_card_id",
|
|
29
|
+
callback_url: "callback_url",
|
|
29
30
|
});
|
|
30
31
|
```
|
|
31
32
|
|
package/dist/cjs/Client.d.ts
CHANGED
|
@@ -1,19 +1,22 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* This file was auto-generated by Fern from our API Definition.
|
|
3
3
|
*/
|
|
4
|
+
import * as environments from "./environments.js";
|
|
4
5
|
import * as core from "./core/index.js";
|
|
5
6
|
import { Checkout } from "./api/resources/checkout/client/Client.js";
|
|
7
|
+
import { CustomerPortal } from "./api/resources/customerPortal/client/Client.js";
|
|
6
8
|
import { RateCards } from "./api/resources/rateCards/client/Client.js";
|
|
7
9
|
import { UsageEvents } from "./api/resources/usageEvents/client/Client.js";
|
|
8
10
|
import { Subscriptions } from "./api/resources/subscriptions/client/Client.js";
|
|
9
|
-
import { FeatureAccess } from "./api/resources/featureAccess/client/Client.js";
|
|
10
11
|
import { Subjects } from "./api/resources/subjects/client/Client.js";
|
|
12
|
+
import { PricingMetrics } from "./api/resources/pricingMetrics/client/Client.js";
|
|
13
|
+
import { CustomerAccess } from "./api/resources/customerAccess/client/Client.js";
|
|
11
14
|
export declare namespace LarkClient {
|
|
12
15
|
interface Options {
|
|
13
|
-
environment
|
|
16
|
+
environment?: core.Supplier<environments.LarkEnvironment | string>;
|
|
14
17
|
/** Specify a custom URL to connect the client to. */
|
|
15
18
|
baseUrl?: core.Supplier<string>;
|
|
16
|
-
apiKey
|
|
19
|
+
apiKey: core.Supplier<string>;
|
|
17
20
|
/** Additional headers to include in requests. */
|
|
18
21
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
19
22
|
}
|
|
@@ -33,16 +36,20 @@ export declare namespace LarkClient {
|
|
|
33
36
|
export declare class LarkClient {
|
|
34
37
|
protected readonly _options: LarkClient.Options;
|
|
35
38
|
protected _checkout: Checkout | undefined;
|
|
39
|
+
protected _customerPortal: CustomerPortal | undefined;
|
|
36
40
|
protected _rateCards: RateCards | undefined;
|
|
37
41
|
protected _usageEvents: UsageEvents | undefined;
|
|
38
42
|
protected _subscriptions: Subscriptions | undefined;
|
|
39
|
-
protected _featureAccess: FeatureAccess | undefined;
|
|
40
43
|
protected _subjects: Subjects | undefined;
|
|
44
|
+
protected _pricingMetrics: PricingMetrics | undefined;
|
|
45
|
+
protected _customerAccess: CustomerAccess | undefined;
|
|
41
46
|
constructor(_options: LarkClient.Options);
|
|
42
47
|
get checkout(): Checkout;
|
|
48
|
+
get customerPortal(): CustomerPortal;
|
|
43
49
|
get rateCards(): RateCards;
|
|
44
50
|
get usageEvents(): UsageEvents;
|
|
45
51
|
get subscriptions(): Subscriptions;
|
|
46
|
-
get featureAccess(): FeatureAccess;
|
|
47
52
|
get subjects(): Subjects;
|
|
53
|
+
get pricingMetrics(): PricingMetrics;
|
|
54
|
+
get customerAccess(): CustomerAccess;
|
|
48
55
|
}
|
package/dist/cjs/Client.js
CHANGED
|
@@ -40,18 +40,20 @@ exports.LarkClient = void 0;
|
|
|
40
40
|
const core = __importStar(require("./core/index.js"));
|
|
41
41
|
const headers_js_1 = require("./core/headers.js");
|
|
42
42
|
const Client_js_1 = require("./api/resources/checkout/client/Client.js");
|
|
43
|
-
const Client_js_2 = require("./api/resources/
|
|
44
|
-
const Client_js_3 = require("./api/resources/
|
|
45
|
-
const Client_js_4 = require("./api/resources/
|
|
46
|
-
const Client_js_5 = require("./api/resources/
|
|
43
|
+
const Client_js_2 = require("./api/resources/customerPortal/client/Client.js");
|
|
44
|
+
const Client_js_3 = require("./api/resources/rateCards/client/Client.js");
|
|
45
|
+
const Client_js_4 = require("./api/resources/usageEvents/client/Client.js");
|
|
46
|
+
const Client_js_5 = require("./api/resources/subscriptions/client/Client.js");
|
|
47
47
|
const Client_js_6 = require("./api/resources/subjects/client/Client.js");
|
|
48
|
+
const Client_js_7 = require("./api/resources/pricingMetrics/client/Client.js");
|
|
49
|
+
const Client_js_8 = require("./api/resources/customerAccess/client/Client.js");
|
|
48
50
|
class LarkClient {
|
|
49
51
|
constructor(_options) {
|
|
50
52
|
this._options = Object.assign(Object.assign({}, _options), { headers: (0, headers_js_1.mergeHeaders)({
|
|
51
53
|
"X-Fern-Language": "JavaScript",
|
|
52
54
|
"X-Fern-SDK-Name": "lark-billing",
|
|
53
|
-
"X-Fern-SDK-Version": "0.0.
|
|
54
|
-
"User-Agent": "lark-billing/0.0.
|
|
55
|
+
"X-Fern-SDK-Version": "0.0.7",
|
|
56
|
+
"User-Agent": "lark-billing/0.0.7",
|
|
55
57
|
"X-Fern-Runtime": core.RUNTIME.type,
|
|
56
58
|
"X-Fern-Runtime-Version": core.RUNTIME.version,
|
|
57
59
|
}, _options === null || _options === void 0 ? void 0 : _options.headers) });
|
|
@@ -60,25 +62,33 @@ class LarkClient {
|
|
|
60
62
|
var _a;
|
|
61
63
|
return ((_a = this._checkout) !== null && _a !== void 0 ? _a : (this._checkout = new Client_js_1.Checkout(this._options)));
|
|
62
64
|
}
|
|
65
|
+
get customerPortal() {
|
|
66
|
+
var _a;
|
|
67
|
+
return ((_a = this._customerPortal) !== null && _a !== void 0 ? _a : (this._customerPortal = new Client_js_2.CustomerPortal(this._options)));
|
|
68
|
+
}
|
|
63
69
|
get rateCards() {
|
|
64
70
|
var _a;
|
|
65
|
-
return ((_a = this._rateCards) !== null && _a !== void 0 ? _a : (this._rateCards = new
|
|
71
|
+
return ((_a = this._rateCards) !== null && _a !== void 0 ? _a : (this._rateCards = new Client_js_3.RateCards(this._options)));
|
|
66
72
|
}
|
|
67
73
|
get usageEvents() {
|
|
68
74
|
var _a;
|
|
69
|
-
return ((_a = this._usageEvents) !== null && _a !== void 0 ? _a : (this._usageEvents = new
|
|
75
|
+
return ((_a = this._usageEvents) !== null && _a !== void 0 ? _a : (this._usageEvents = new Client_js_4.UsageEvents(this._options)));
|
|
70
76
|
}
|
|
71
77
|
get subscriptions() {
|
|
72
78
|
var _a;
|
|
73
|
-
return ((_a = this._subscriptions) !== null && _a !== void 0 ? _a : (this._subscriptions = new
|
|
74
|
-
}
|
|
75
|
-
get featureAccess() {
|
|
76
|
-
var _a;
|
|
77
|
-
return ((_a = this._featureAccess) !== null && _a !== void 0 ? _a : (this._featureAccess = new Client_js_5.FeatureAccess(this._options)));
|
|
79
|
+
return ((_a = this._subscriptions) !== null && _a !== void 0 ? _a : (this._subscriptions = new Client_js_5.Subscriptions(this._options)));
|
|
78
80
|
}
|
|
79
81
|
get subjects() {
|
|
80
82
|
var _a;
|
|
81
83
|
return ((_a = this._subjects) !== null && _a !== void 0 ? _a : (this._subjects = new Client_js_6.Subjects(this._options)));
|
|
82
84
|
}
|
|
85
|
+
get pricingMetrics() {
|
|
86
|
+
var _a;
|
|
87
|
+
return ((_a = this._pricingMetrics) !== null && _a !== void 0 ? _a : (this._pricingMetrics = new Client_js_7.PricingMetrics(this._options)));
|
|
88
|
+
}
|
|
89
|
+
get customerAccess() {
|
|
90
|
+
var _a;
|
|
91
|
+
return ((_a = this._customerAccess) !== null && _a !== void 0 ? _a : (this._customerAccess = new Client_js_8.CustomerAccess(this._options)));
|
|
92
|
+
}
|
|
83
93
|
}
|
|
84
94
|
exports.LarkClient = LarkClient;
|
|
@@ -1,14 +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.js";
|
|
4
5
|
import * as core from "../../../../core/index.js";
|
|
5
6
|
import * as Lark from "../../../index.js";
|
|
6
7
|
export declare namespace Checkout {
|
|
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>;
|
|
11
|
-
apiKey
|
|
12
|
+
apiKey: core.Supplier<string>;
|
|
12
13
|
/** Additional headers to include in requests. */
|
|
13
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
14
15
|
}
|
|
@@ -37,23 +38,13 @@ export declare class Checkout {
|
|
|
37
38
|
* @example
|
|
38
39
|
* await client.checkout.createSubscriptionCheckoutSession({
|
|
39
40
|
* subject_id: "subject_id",
|
|
40
|
-
* rate_card_id: "rate_card_id"
|
|
41
|
+
* rate_card_id: "rate_card_id",
|
|
42
|
+
* callback_url: "callback_url"
|
|
41
43
|
* })
|
|
42
44
|
*/
|
|
43
45
|
createSubscriptionCheckoutSession(request: Lark.CreateSubscriptionCheckoutSessionRequest, requestOptions?: Checkout.RequestOptions): core.HttpResponsePromise<Lark.CreateSubscriptionCheckoutSessionResponse>;
|
|
44
46
|
private __createSubscriptionCheckoutSession;
|
|
45
|
-
/**
|
|
46
|
-
* @param {string} checkoutId
|
|
47
|
-
* @param {Checkout.RequestOptions} requestOptions - Request-specific configuration.
|
|
48
|
-
*
|
|
49
|
-
* @throws {@link Lark.UnprocessableEntityError}
|
|
50
|
-
*
|
|
51
|
-
* @example
|
|
52
|
-
* await client.checkout.completeSubscriptionCheckout("checkout_id")
|
|
53
|
-
*/
|
|
54
|
-
completeSubscriptionCheckout(checkoutId: string, requestOptions?: Checkout.RequestOptions): core.HttpResponsePromise<Lark.CompleteSubscriptionCheckoutResponse>;
|
|
55
|
-
private __completeSubscriptionCheckout;
|
|
56
47
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
57
|
-
"X-API-Key": string
|
|
48
|
+
"X-API-Key": string;
|
|
58
49
|
}>;
|
|
59
50
|
}
|
|
@@ -46,6 +46,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
48
|
exports.Checkout = void 0;
|
|
49
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
49
50
|
const core = __importStar(require("../../../../core/index.js"));
|
|
50
51
|
const Lark = __importStar(require("../../../index.js"));
|
|
51
52
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
@@ -63,7 +64,8 @@ class Checkout {
|
|
|
63
64
|
* @example
|
|
64
65
|
* await client.checkout.createSubscriptionCheckoutSession({
|
|
65
66
|
* subject_id: "subject_id",
|
|
66
|
-
* rate_card_id: "rate_card_id"
|
|
67
|
+
* rate_card_id: "rate_card_id",
|
|
68
|
+
* callback_url: "callback_url"
|
|
67
69
|
* })
|
|
68
70
|
*/
|
|
69
71
|
createSubscriptionCheckoutSession(request, requestOptions) {
|
|
@@ -71,10 +73,10 @@ class Checkout {
|
|
|
71
73
|
}
|
|
72
74
|
__createSubscriptionCheckoutSession(request, requestOptions) {
|
|
73
75
|
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
-
var _a, _b;
|
|
76
|
+
var _a, _b, _c;
|
|
75
77
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
76
78
|
const _response = yield core.fetcher({
|
|
77
|
-
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), "checkout"),
|
|
79
|
+
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, "checkout"),
|
|
78
80
|
method: "POST",
|
|
79
81
|
headers: _headers,
|
|
80
82
|
contentType: "application/json",
|
|
@@ -120,66 +122,6 @@ class Checkout {
|
|
|
120
122
|
}
|
|
121
123
|
});
|
|
122
124
|
}
|
|
123
|
-
/**
|
|
124
|
-
* @param {string} checkoutId
|
|
125
|
-
* @param {Checkout.RequestOptions} requestOptions - Request-specific configuration.
|
|
126
|
-
*
|
|
127
|
-
* @throws {@link Lark.UnprocessableEntityError}
|
|
128
|
-
*
|
|
129
|
-
* @example
|
|
130
|
-
* await client.checkout.completeSubscriptionCheckout("checkout_id")
|
|
131
|
-
*/
|
|
132
|
-
completeSubscriptionCheckout(checkoutId, requestOptions) {
|
|
133
|
-
return core.HttpResponsePromise.fromPromise(this.__completeSubscriptionCheckout(checkoutId, requestOptions));
|
|
134
|
-
}
|
|
135
|
-
__completeSubscriptionCheckout(checkoutId, requestOptions) {
|
|
136
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
137
|
-
var _a, _b;
|
|
138
|
-
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
139
|
-
const _response = yield core.fetcher({
|
|
140
|
-
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)), `checkout/${encodeURIComponent(checkoutId)}/complete`),
|
|
141
|
-
method: "POST",
|
|
142
|
-
headers: _headers,
|
|
143
|
-
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
144
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
145
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
146
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
147
|
-
});
|
|
148
|
-
if (_response.ok) {
|
|
149
|
-
return {
|
|
150
|
-
data: _response.body,
|
|
151
|
-
rawResponse: _response.rawResponse,
|
|
152
|
-
};
|
|
153
|
-
}
|
|
154
|
-
if (_response.error.reason === "status-code") {
|
|
155
|
-
switch (_response.error.statusCode) {
|
|
156
|
-
case 422:
|
|
157
|
-
throw new Lark.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
158
|
-
default:
|
|
159
|
-
throw new errors.LarkError({
|
|
160
|
-
statusCode: _response.error.statusCode,
|
|
161
|
-
body: _response.error.body,
|
|
162
|
-
rawResponse: _response.rawResponse,
|
|
163
|
-
});
|
|
164
|
-
}
|
|
165
|
-
}
|
|
166
|
-
switch (_response.error.reason) {
|
|
167
|
-
case "non-json":
|
|
168
|
-
throw new errors.LarkError({
|
|
169
|
-
statusCode: _response.error.statusCode,
|
|
170
|
-
body: _response.error.rawBody,
|
|
171
|
-
rawResponse: _response.rawResponse,
|
|
172
|
-
});
|
|
173
|
-
case "timeout":
|
|
174
|
-
throw new errors.LarkTimeoutError("Timeout exceeded when calling POST /checkout/{checkout_id}/complete.");
|
|
175
|
-
case "unknown":
|
|
176
|
-
throw new errors.LarkError({
|
|
177
|
-
message: _response.error.errorMessage,
|
|
178
|
-
rawResponse: _response.rawResponse,
|
|
179
|
-
});
|
|
180
|
-
}
|
|
181
|
-
});
|
|
182
|
-
}
|
|
183
125
|
_getCustomAuthorizationHeaders() {
|
|
184
126
|
return __awaiter(this, void 0, void 0, function* () {
|
|
185
127
|
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
@@ -5,11 +5,12 @@
|
|
|
5
5
|
* @example
|
|
6
6
|
* {
|
|
7
7
|
* subject_id: "subject_id",
|
|
8
|
-
* rate_card_id: "rate_card_id"
|
|
8
|
+
* rate_card_id: "rate_card_id",
|
|
9
|
+
* callback_url: "callback_url"
|
|
9
10
|
* }
|
|
10
11
|
*/
|
|
11
12
|
export interface CreateSubscriptionCheckoutSessionRequest {
|
|
12
13
|
subject_id: string;
|
|
13
14
|
rate_card_id: string;
|
|
14
|
-
|
|
15
|
+
callback_url: string;
|
|
15
16
|
}
|
|
@@ -1,14 +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.js";
|
|
4
5
|
import * as core from "../../../../core/index.js";
|
|
5
6
|
import * as Lark from "../../../index.js";
|
|
6
|
-
export declare namespace
|
|
7
|
+
export declare namespace CustomerAccess {
|
|
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>;
|
|
11
|
-
apiKey
|
|
12
|
+
apiKey: core.Supplier<string>;
|
|
12
13
|
/** Additional headers to include in requests. */
|
|
13
14
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
14
15
|
}
|
|
@@ -25,20 +26,21 @@ export declare namespace FeatureAccess {
|
|
|
25
26
|
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
26
27
|
}
|
|
27
28
|
}
|
|
28
|
-
export declare class
|
|
29
|
-
protected readonly _options:
|
|
30
|
-
constructor(_options:
|
|
29
|
+
export declare class CustomerAccess {
|
|
30
|
+
protected readonly _options: CustomerAccess.Options;
|
|
31
|
+
constructor(_options: CustomerAccess.Options);
|
|
31
32
|
/**
|
|
32
|
-
* @param {
|
|
33
|
+
* @param {string} subjectId
|
|
34
|
+
* @param {CustomerAccess.RequestOptions} requestOptions - Request-specific configuration.
|
|
33
35
|
*
|
|
34
36
|
* @throws {@link Lark.UnprocessableEntityError}
|
|
35
37
|
*
|
|
36
38
|
* @example
|
|
37
|
-
* await client.
|
|
39
|
+
* await client.customerAccess.getBillingState("subject_id")
|
|
38
40
|
*/
|
|
39
|
-
|
|
40
|
-
private
|
|
41
|
+
getBillingState(subjectId: string, requestOptions?: CustomerAccess.RequestOptions): core.HttpResponsePromise<Lark.BillingStateResponse>;
|
|
42
|
+
private __getBillingState;
|
|
41
43
|
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
42
|
-
"X-API-Key": string
|
|
44
|
+
"X-API-Key": string;
|
|
43
45
|
}>;
|
|
44
46
|
}
|
|
@@ -45,32 +45,34 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
45
45
|
});
|
|
46
46
|
};
|
|
47
47
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
-
exports.
|
|
48
|
+
exports.CustomerAccess = void 0;
|
|
49
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
49
50
|
const core = __importStar(require("../../../../core/index.js"));
|
|
50
51
|
const Lark = __importStar(require("../../../index.js"));
|
|
51
52
|
const headers_js_1 = require("../../../../core/headers.js");
|
|
52
53
|
const errors = __importStar(require("../../../../errors/index.js"));
|
|
53
|
-
class
|
|
54
|
+
class CustomerAccess {
|
|
54
55
|
constructor(_options) {
|
|
55
56
|
this._options = _options;
|
|
56
57
|
}
|
|
57
58
|
/**
|
|
58
|
-
* @param {
|
|
59
|
+
* @param {string} subjectId
|
|
60
|
+
* @param {CustomerAccess.RequestOptions} requestOptions - Request-specific configuration.
|
|
59
61
|
*
|
|
60
62
|
* @throws {@link Lark.UnprocessableEntityError}
|
|
61
63
|
*
|
|
62
64
|
* @example
|
|
63
|
-
* await client.
|
|
65
|
+
* await client.customerAccess.getBillingState("subject_id")
|
|
64
66
|
*/
|
|
65
|
-
|
|
66
|
-
return core.HttpResponsePromise.fromPromise(this.
|
|
67
|
+
getBillingState(subjectId, requestOptions) {
|
|
68
|
+
return core.HttpResponsePromise.fromPromise(this.__getBillingState(subjectId, requestOptions));
|
|
67
69
|
}
|
|
68
|
-
|
|
70
|
+
__getBillingState(subjectId, requestOptions) {
|
|
69
71
|
return __awaiter(this, void 0, void 0, function* () {
|
|
70
|
-
var _a, _b;
|
|
72
|
+
var _a, _b, _c;
|
|
71
73
|
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
72
74
|
const _response = yield core.fetcher({
|
|
73
|
-
url: core.url.join((_b = (yield core.Supplier.get(this._options.baseUrl))) !== null && _b !== void 0 ? _b : (yield core.Supplier.get(this._options.environment)),
|
|
75
|
+
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, `customer-access/${encodeURIComponent(subjectId)}/billing-state`),
|
|
74
76
|
method: "GET",
|
|
75
77
|
headers: _headers,
|
|
76
78
|
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
@@ -101,7 +103,7 @@ class FeatureAccess {
|
|
|
101
103
|
rawResponse: _response.rawResponse,
|
|
102
104
|
});
|
|
103
105
|
case "timeout":
|
|
104
|
-
throw new errors.LarkTimeoutError("Timeout exceeded when calling GET /
|
|
106
|
+
throw new errors.LarkTimeoutError("Timeout exceeded when calling GET /customer-access/{subject_id}/billing-state.");
|
|
105
107
|
case "unknown":
|
|
106
108
|
throw new errors.LarkError({
|
|
107
109
|
message: _response.error.errorMessage,
|
|
@@ -117,4 +119,4 @@ class FeatureAccess {
|
|
|
117
119
|
});
|
|
118
120
|
}
|
|
119
121
|
}
|
|
120
|
-
exports.
|
|
122
|
+
exports.CustomerAccess = CustomerAccess;
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
3
|
+
*/
|
|
4
|
+
import * as environments from "../../../../environments.js";
|
|
5
|
+
import * as core from "../../../../core/index.js";
|
|
6
|
+
import * as Lark from "../../../index.js";
|
|
7
|
+
export declare namespace CustomerPortal {
|
|
8
|
+
interface Options {
|
|
9
|
+
environment?: core.Supplier<environments.LarkEnvironment | string>;
|
|
10
|
+
/** Specify a custom URL to connect the client to. */
|
|
11
|
+
baseUrl?: core.Supplier<string>;
|
|
12
|
+
apiKey: core.Supplier<string>;
|
|
13
|
+
/** Additional headers to include in requests. */
|
|
14
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
15
|
+
}
|
|
16
|
+
interface RequestOptions {
|
|
17
|
+
/** The maximum time to wait for a response in seconds. */
|
|
18
|
+
timeoutInSeconds?: number;
|
|
19
|
+
/** The number of times to retry the request. Defaults to 2. */
|
|
20
|
+
maxRetries?: number;
|
|
21
|
+
/** A hook to abort the request. */
|
|
22
|
+
abortSignal?: AbortSignal;
|
|
23
|
+
/** Additional query string parameters to include in the request. */
|
|
24
|
+
queryParams?: Record<string, unknown>;
|
|
25
|
+
/** Additional headers to include in the request. */
|
|
26
|
+
headers?: Record<string, string | core.Supplier<string | null | undefined> | null | undefined>;
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
export declare class CustomerPortal {
|
|
30
|
+
protected readonly _options: CustomerPortal.Options;
|
|
31
|
+
constructor(_options: CustomerPortal.Options);
|
|
32
|
+
/**
|
|
33
|
+
* @param {Lark.CreateCustomerPortalSessionRequest} request
|
|
34
|
+
* @param {CustomerPortal.RequestOptions} requestOptions - Request-specific configuration.
|
|
35
|
+
*
|
|
36
|
+
* @throws {@link Lark.UnprocessableEntityError}
|
|
37
|
+
*
|
|
38
|
+
* @example
|
|
39
|
+
* await client.customerPortal.createCustomerPortalSession({
|
|
40
|
+
* subject_id: "subject_id"
|
|
41
|
+
* })
|
|
42
|
+
*/
|
|
43
|
+
createCustomerPortalSession(request: Lark.CreateCustomerPortalSessionRequest, requestOptions?: CustomerPortal.RequestOptions): core.HttpResponsePromise<Lark.CreateCustomerPortalSessionResponse>;
|
|
44
|
+
private __createCustomerPortalSession;
|
|
45
|
+
protected _getCustomAuthorizationHeaders(): Promise<{
|
|
46
|
+
"X-API-Key": string;
|
|
47
|
+
}>;
|
|
48
|
+
}
|
|
@@ -0,0 +1,130 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* This file was auto-generated by Fern from our API Definition.
|
|
4
|
+
*/
|
|
5
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
6
|
+
if (k2 === undefined) k2 = k;
|
|
7
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
8
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
9
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
10
|
+
}
|
|
11
|
+
Object.defineProperty(o, k2, desc);
|
|
12
|
+
}) : (function(o, m, k, k2) {
|
|
13
|
+
if (k2 === undefined) k2 = k;
|
|
14
|
+
o[k2] = m[k];
|
|
15
|
+
}));
|
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
|
18
|
+
}) : function(o, v) {
|
|
19
|
+
o["default"] = v;
|
|
20
|
+
});
|
|
21
|
+
var __importStar = (this && this.__importStar) || (function () {
|
|
22
|
+
var ownKeys = function(o) {
|
|
23
|
+
ownKeys = Object.getOwnPropertyNames || function (o) {
|
|
24
|
+
var ar = [];
|
|
25
|
+
for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;
|
|
26
|
+
return ar;
|
|
27
|
+
};
|
|
28
|
+
return ownKeys(o);
|
|
29
|
+
};
|
|
30
|
+
return function (mod) {
|
|
31
|
+
if (mod && mod.__esModule) return mod;
|
|
32
|
+
var result = {};
|
|
33
|
+
if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== "default") __createBinding(result, mod, k[i]);
|
|
34
|
+
__setModuleDefault(result, mod);
|
|
35
|
+
return result;
|
|
36
|
+
};
|
|
37
|
+
})();
|
|
38
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
39
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
40
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
41
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
42
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
43
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
44
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
45
|
+
});
|
|
46
|
+
};
|
|
47
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
48
|
+
exports.CustomerPortal = void 0;
|
|
49
|
+
const environments = __importStar(require("../../../../environments.js"));
|
|
50
|
+
const core = __importStar(require("../../../../core/index.js"));
|
|
51
|
+
const Lark = __importStar(require("../../../index.js"));
|
|
52
|
+
const headers_js_1 = require("../../../../core/headers.js");
|
|
53
|
+
const errors = __importStar(require("../../../../errors/index.js"));
|
|
54
|
+
class CustomerPortal {
|
|
55
|
+
constructor(_options) {
|
|
56
|
+
this._options = _options;
|
|
57
|
+
}
|
|
58
|
+
/**
|
|
59
|
+
* @param {Lark.CreateCustomerPortalSessionRequest} request
|
|
60
|
+
* @param {CustomerPortal.RequestOptions} requestOptions - Request-specific configuration.
|
|
61
|
+
*
|
|
62
|
+
* @throws {@link Lark.UnprocessableEntityError}
|
|
63
|
+
*
|
|
64
|
+
* @example
|
|
65
|
+
* await client.customerPortal.createCustomerPortalSession({
|
|
66
|
+
* subject_id: "subject_id"
|
|
67
|
+
* })
|
|
68
|
+
*/
|
|
69
|
+
createCustomerPortalSession(request, requestOptions) {
|
|
70
|
+
return core.HttpResponsePromise.fromPromise(this.__createCustomerPortalSession(request, requestOptions));
|
|
71
|
+
}
|
|
72
|
+
__createCustomerPortalSession(request, requestOptions) {
|
|
73
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
74
|
+
var _a, _b, _c;
|
|
75
|
+
let _headers = (0, headers_js_1.mergeHeaders)((_a = this._options) === null || _a === void 0 ? void 0 : _a.headers, (0, headers_js_1.mergeOnlyDefinedHeaders)(Object.assign({}, (yield this._getCustomAuthorizationHeaders()))), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers);
|
|
76
|
+
const _response = yield core.fetcher({
|
|
77
|
+
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, "customer-portal/sessions"),
|
|
78
|
+
method: "POST",
|
|
79
|
+
headers: _headers,
|
|
80
|
+
contentType: "application/json",
|
|
81
|
+
queryParameters: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.queryParams,
|
|
82
|
+
requestType: "json",
|
|
83
|
+
body: request,
|
|
84
|
+
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
85
|
+
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
86
|
+
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
87
|
+
});
|
|
88
|
+
if (_response.ok) {
|
|
89
|
+
return {
|
|
90
|
+
data: _response.body,
|
|
91
|
+
rawResponse: _response.rawResponse,
|
|
92
|
+
};
|
|
93
|
+
}
|
|
94
|
+
if (_response.error.reason === "status-code") {
|
|
95
|
+
switch (_response.error.statusCode) {
|
|
96
|
+
case 422:
|
|
97
|
+
throw new Lark.UnprocessableEntityError(_response.error.body, _response.rawResponse);
|
|
98
|
+
default:
|
|
99
|
+
throw new errors.LarkError({
|
|
100
|
+
statusCode: _response.error.statusCode,
|
|
101
|
+
body: _response.error.body,
|
|
102
|
+
rawResponse: _response.rawResponse,
|
|
103
|
+
});
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
switch (_response.error.reason) {
|
|
107
|
+
case "non-json":
|
|
108
|
+
throw new errors.LarkError({
|
|
109
|
+
statusCode: _response.error.statusCode,
|
|
110
|
+
body: _response.error.rawBody,
|
|
111
|
+
rawResponse: _response.rawResponse,
|
|
112
|
+
});
|
|
113
|
+
case "timeout":
|
|
114
|
+
throw new errors.LarkTimeoutError("Timeout exceeded when calling POST /customer-portal/sessions.");
|
|
115
|
+
case "unknown":
|
|
116
|
+
throw new errors.LarkError({
|
|
117
|
+
message: _response.error.errorMessage,
|
|
118
|
+
rawResponse: _response.rawResponse,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
}
|
|
123
|
+
_getCustomAuthorizationHeaders() {
|
|
124
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
125
|
+
const apiKeyValue = yield core.Supplier.get(this._options.apiKey);
|
|
126
|
+
return { "X-API-Key": apiKeyValue };
|
|
127
|
+
});
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
exports.CustomerPortal = CustomerPortal;
|
|
@@ -14,5 +14,4 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
14
14
|
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
-
__exportStar(require("./
|
|
18
|
-
__exportStar(require("./CreateRateCardVersionRequestUsageBasedRatesItem.js"), exports);
|
|
17
|
+
__exportStar(require("./requests/index.js"), exports);
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { type CreateCustomerPortalSessionRequest } from "./CreateCustomerPortalSessionRequest.js";
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "./client/index.js";
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
+
if (k2 === undefined) k2 = k;
|
|
4
|
+
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
5
|
+
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
|
|
6
|
+
desc = { enumerable: true, get: function() { return m[k]; } };
|
|
7
|
+
}
|
|
8
|
+
Object.defineProperty(o, k2, desc);
|
|
9
|
+
}) : (function(o, m, k, k2) {
|
|
10
|
+
if (k2 === undefined) k2 = k;
|
|
11
|
+
o[k2] = m[k];
|
|
12
|
+
}));
|
|
13
|
+
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
14
|
+
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
15
|
+
};
|
|
16
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
|
+
__exportStar(require("./client/index.js"), exports);
|