@openmeter/sdk 1.0.0-beta.220 → 1.0.0-beta.222
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/dist/cjs/src/client/customers.cjs +188 -2
- package/dist/cjs/src/client/customers.d.cts +363 -1
- package/dist/cjs/src/client/customers.js.map +1 -1
- package/dist/cjs/src/client/entitlements.cjs +92 -1
- package/dist/cjs/src/client/entitlements.d.cts +139 -28
- package/dist/cjs/src/client/entitlements.js.map +1 -1
- package/dist/cjs/src/client/events.d.cts +1 -0
- package/dist/cjs/src/client/index.cjs +3 -1
- package/dist/cjs/src/client/index.d.cts +3 -2
- package/dist/cjs/src/client/index.js.map +1 -1
- package/dist/cjs/src/client/schemas.d.cts +2532 -1707
- package/dist/cjs/src/zod/index.cjs +1808 -1522
- package/dist/cjs/src/zod/index.d.cts +2352 -2172
- package/dist/cjs/src/zod/index.js.map +1 -1
- package/dist/cjs/{tsconfig.ed1bfe74.tsbuildinfo → tsconfig.58b58bc1.tsbuildinfo} +1 -1
- package/dist/cjs/{tsconfig.f862b9eb.tsbuildinfo → tsconfig.7bcc7f9f.tsbuildinfo} +1 -1
- package/dist/src/client/customers.d.ts +363 -1
- package/dist/src/client/customers.js +186 -1
- package/dist/src/client/customers.js.map +1 -1
- package/dist/src/client/entitlements.d.ts +139 -28
- package/dist/src/client/entitlements.js +89 -0
- package/dist/src/client/entitlements.js.map +1 -1
- package/dist/src/client/events.d.ts +1 -0
- package/dist/src/client/index.d.ts +3 -2
- package/dist/src/client/index.js +4 -2
- package/dist/src/client/index.js.map +1 -1
- package/dist/src/client/schemas.d.ts +2532 -1707
- package/dist/src/zod/index.d.ts +2352 -2172
- package/dist/src/zod/index.js +1791 -1506
- package/dist/src/zod/index.js.map +1 -1
- package/dist/tsconfig.tsbuildinfo +1 -1
- package/package.json +1 -1
|
@@ -9,22 +9,23 @@ exports.getInvoiceParams = exports.getInvoicePathInvoiceIdRegExp = exports.invoi
|
|
|
9
9
|
exports.updateInvoiceBodyLinesItemRateCardPriceMinimumAmountRegExpOne = exports.updateInvoiceBodyLinesItemRateCardPriceAmountRegExpThree = exports.updateInvoiceBodyLinesItemRateCardPricePaymentTermDefault = exports.updateInvoiceBodyLinesItemRateCardPriceAmountRegExpOne = exports.updateInvoiceBodyLinesItemRateCardTaxConfigStripeCodeRegExp = exports.updateInvoiceBodyLinesItemRateCardFeatureKeyRegExp = exports.updateInvoiceBodyLinesItemRateCardFeatureKeyMax = exports.updateInvoiceBodyLinesItemFeatureKeyRegExp = exports.updateInvoiceBodyLinesItemFeatureKeyMax = exports.updateInvoiceBodyLinesItemPriceMaximumAmountRegExpSeven = exports.updateInvoiceBodyLinesItemPriceMinimumAmountRegExpSeven = exports.updateInvoiceBodyLinesItemPriceQuantityPerPackageRegExpOne = exports.updateInvoiceBodyLinesItemPriceAmountRegExpFive = exports.updateInvoiceBodyLinesItemPriceMaximumAmountRegExpFive = exports.updateInvoiceBodyLinesItemPriceMinimumAmountRegExpFive = exports.updateInvoiceBodyLinesItemPriceMultiplierDefault = exports.updateInvoiceBodyLinesItemPriceMultiplierRegExpOne = exports.updateInvoiceBodyLinesItemPriceMaximumAmountRegExpThree = exports.updateInvoiceBodyLinesItemPriceMinimumAmountRegExpThree = exports.updateInvoiceBodyLinesItemPriceTiersItemUnitPriceAmountRegExpOne = exports.updateInvoiceBodyLinesItemPriceTiersItemFlatPriceAmountRegExpOne = exports.updateInvoiceBodyLinesItemPriceTiersItemUpToAmountRegExpOne = exports.updateInvoiceBodyLinesItemPriceMaximumAmountRegExpOne = exports.updateInvoiceBodyLinesItemPriceMinimumAmountRegExpOne = exports.updateInvoiceBodyLinesItemPriceAmountRegExpThree = exports.updateInvoiceBodyLinesItemPricePaymentTermDefault = exports.updateInvoiceBodyLinesItemPriceAmountRegExpOne = exports.updateInvoiceBodyLinesItemTaxConfigStripeCodeRegExp = exports.updateInvoiceBodyLinesItemDescriptionMax = exports.updateInvoiceBodyLinesItemNameMax = exports.updateInvoiceBodyCustomerAddressesMax = exports.updateInvoiceBodyCustomerAddressesItemCountryRegExpOne = exports.updateInvoiceBodyCustomerAddressesItemCountryMaxOne = exports.updateInvoiceBodyCustomerAddressesItemCountryMinOne = exports.updateInvoiceBodyCustomerTaxIdCodeMaxOne = exports.updateInvoiceBodyCustomerKeyMax = exports.updateInvoiceBodySupplierAddressesMax = exports.updateInvoiceBodySupplierAddressesItemCountryRegExpOne = exports.updateInvoiceBodySupplierAddressesItemCountryMaxOne = exports.updateInvoiceBodySupplierAddressesItemCountryMinOne = exports.updateInvoiceBodySupplierTaxIdCodeMaxOne = exports.updateInvoiceBodySupplierKeyMax = exports.updateInvoiceBodyDescriptionMax = exports.updateInvoiceParams = exports.updateInvoicePathInvoiceIdRegExp = exports.deleteInvoiceParams = exports.deleteInvoicePathInvoiceIdRegExp = exports.getInvoiceQueryParams = exports.getInvoiceQueryIncludeDeletedLinesDefault = exports.getInvoiceQueryExpandDefault = void 0;
|
|
10
10
|
exports.createBillingProfileBodySupplierAddressesItemCountryRegExpOne = exports.createBillingProfileBodySupplierAddressesItemCountryMaxOne = exports.createBillingProfileBodySupplierAddressesItemCountryMinOne = exports.createBillingProfileBodySupplierTaxIdCodeMaxOne = exports.createBillingProfileBodySupplierKeyMax = exports.createBillingProfileBodyDescriptionMax = exports.createBillingProfileBodyNameMax = exports.listBillingProfilesQueryParams = exports.listBillingProfilesQueryPageSizeMax = exports.listBillingProfilesQueryPageSizeDefault = exports.listBillingProfilesQueryPageDefault = exports.listBillingProfilesQueryIncludeArchivedDefault = exports.voidInvoiceActionBody = exports.voidInvoiceActionBodyOverridesItemLineIdRegExp = exports.voidInvoiceActionParams = exports.voidInvoiceActionPathInvoiceIdRegExp = exports.recalculateInvoiceTaxActionParams = exports.recalculateInvoiceTaxActionPathInvoiceIdRegExp = exports.snapshotQuantitiesInvoiceActionParams = exports.snapshotQuantitiesInvoiceActionPathInvoiceIdRegExp = exports.retryInvoiceActionParams = exports.retryInvoiceActionPathInvoiceIdRegExp = exports.approveInvoiceActionParams = exports.approveInvoiceActionPathInvoiceIdRegExp = exports.advanceInvoiceActionParams = exports.advanceInvoiceActionPathInvoiceIdRegExp = exports.updateInvoiceBody = exports.updateInvoiceBodyWorkflowWorkflowPaymentCollectionMethodDefault = exports.updateInvoiceBodyWorkflowWorkflowInvoicingDefaultTaxConfigStripeCodeRegExp = exports.updateInvoiceBodyWorkflowWorkflowInvoicingDueAfterDefault = exports.updateInvoiceBodyWorkflowWorkflowInvoicingDraftPeriodDefault = exports.updateInvoiceBodyWorkflowWorkflowInvoicingAutoAdvanceDefault = exports.updateInvoiceBodyLinesItemIdRegExp = exports.updateInvoiceBodyLinesItemRateCardDiscountsUsageCorrelationIdRegExp = exports.updateInvoiceBodyLinesItemRateCardDiscountsUsageQuantityRegExpOne = exports.updateInvoiceBodyLinesItemRateCardDiscountsPercentageCorrelationIdRegExp = exports.updateInvoiceBodyLinesItemRateCardPriceMaximumAmountRegExpSeven = exports.updateInvoiceBodyLinesItemRateCardPriceMinimumAmountRegExpSeven = exports.updateInvoiceBodyLinesItemRateCardPriceQuantityPerPackageRegExpOne = exports.updateInvoiceBodyLinesItemRateCardPriceAmountRegExpFive = exports.updateInvoiceBodyLinesItemRateCardPriceMaximumAmountRegExpFive = exports.updateInvoiceBodyLinesItemRateCardPriceMinimumAmountRegExpFive = exports.updateInvoiceBodyLinesItemRateCardPriceMultiplierDefault = exports.updateInvoiceBodyLinesItemRateCardPriceMultiplierRegExpOne = exports.updateInvoiceBodyLinesItemRateCardPriceMaximumAmountRegExpThree = exports.updateInvoiceBodyLinesItemRateCardPriceMinimumAmountRegExpThree = exports.updateInvoiceBodyLinesItemRateCardPriceTiersItemUnitPriceAmountRegExpOne = exports.updateInvoiceBodyLinesItemRateCardPriceTiersItemFlatPriceAmountRegExpOne = exports.updateInvoiceBodyLinesItemRateCardPriceTiersItemUpToAmountRegExpOne = exports.updateInvoiceBodyLinesItemRateCardPriceMaximumAmountRegExpOne = void 0;
|
|
11
11
|
exports.createCustomerBodyBillingAddressCountryMaxOne = exports.createCustomerBodyBillingAddressCountryMinOne = exports.createCustomerBodyCurrencyRegExpOne = exports.createCustomerBodyCurrencyMaxOne = exports.createCustomerBodyCurrencyMinOne = exports.createCustomerBodyUsageAttributionSubjectKeysMax = exports.createCustomerBodyKeyMax = exports.createCustomerBodyDescriptionMax = exports.createCustomerBodyNameMax = exports.updateBillingProfileBody = exports.updateBillingProfileBodyWorkflowTaxEnforcedDefault = exports.updateBillingProfileBodyWorkflowTaxEnabledDefault = exports.updateBillingProfileBodyWorkflowPaymentCollectionMethodDefault = exports.updateBillingProfileBodyWorkflowInvoicingDefaultTaxConfigStripeCodeRegExp = exports.updateBillingProfileBodyWorkflowInvoicingProgressiveBillingDefault = exports.updateBillingProfileBodyWorkflowInvoicingDueAfterDefault = exports.updateBillingProfileBodyWorkflowInvoicingDraftPeriodDefault = exports.updateBillingProfileBodyWorkflowInvoicingAutoAdvanceDefault = exports.updateBillingProfileBodyWorkflowCollectionIntervalDefault = exports.updateBillingProfileBodyWorkflowCollectionAlignmentDefault = exports.updateBillingProfileBodySupplierAddressesMax = exports.updateBillingProfileBodySupplierAddressesItemCountryRegExpOne = exports.updateBillingProfileBodySupplierAddressesItemCountryMaxOne = exports.updateBillingProfileBodySupplierAddressesItemCountryMinOne = exports.updateBillingProfileBodySupplierTaxIdCodeMaxOne = exports.updateBillingProfileBodySupplierKeyMax = exports.updateBillingProfileBodyDescriptionMax = exports.updateBillingProfileBodyNameMax = exports.updateBillingProfileParams = exports.updateBillingProfilePathIdRegExp = exports.getBillingProfileQueryParams = exports.getBillingProfileParams = exports.getBillingProfilePathIdRegExp = exports.deleteBillingProfileParams = exports.deleteBillingProfilePathIdRegExp = exports.createBillingProfileBody = exports.createBillingProfileBodyAppsPaymentRegExp = exports.createBillingProfileBodyAppsInvoicingRegExp = exports.createBillingProfileBodyAppsTaxRegExp = exports.createBillingProfileBodyWorkflowTaxEnforcedDefault = exports.createBillingProfileBodyWorkflowTaxEnabledDefault = exports.createBillingProfileBodyWorkflowPaymentCollectionMethodDefault = exports.createBillingProfileBodyWorkflowInvoicingDefaultTaxConfigStripeCodeRegExp = exports.createBillingProfileBodyWorkflowInvoicingProgressiveBillingDefault = exports.createBillingProfileBodyWorkflowInvoicingDueAfterDefault = exports.createBillingProfileBodyWorkflowInvoicingDraftPeriodDefault = exports.createBillingProfileBodyWorkflowInvoicingAutoAdvanceDefault = exports.createBillingProfileBodyWorkflowCollectionIntervalDefault = exports.createBillingProfileBodyWorkflowCollectionAlignmentDefault = exports.createBillingProfileBodySupplierAddressesMax = void 0;
|
|
12
|
-
exports.
|
|
13
|
-
exports.
|
|
14
|
-
exports.
|
|
15
|
-
exports.
|
|
16
|
-
exports.
|
|
17
|
-
exports.
|
|
18
|
-
exports.
|
|
19
|
-
exports.
|
|
20
|
-
exports.
|
|
21
|
-
exports.
|
|
22
|
-
exports.
|
|
23
|
-
exports.
|
|
24
|
-
exports.
|
|
25
|
-
exports.
|
|
26
|
-
exports.
|
|
27
|
-
exports.
|
|
12
|
+
exports.getCustomerEntitlementValueQueryParams = exports.getCustomerEntitlementValueParams = exports.getCustomerEntitlementValuePathFeatureKeyRegExp = exports.getCustomerEntitlementValuePathFeatureKeyMax = exports.deleteCustomerAppDataParams = exports.deleteCustomerAppDataPathAppIdRegExp = exports.upsertCustomerAppDataBody = exports.upsertCustomerAppDataBodyItem = exports.upsertCustomerAppDataBodyIdRegExpTwo = exports.upsertCustomerAppDataBodyAppListingCapabilitiesItemKeyRegExpOne = exports.upsertCustomerAppDataBodyAppListingCapabilitiesItemKeyMaxOne = exports.upsertCustomerAppDataBodyAppDescriptionMaxOne = exports.upsertCustomerAppDataBodyAppNameMaxOne = exports.upsertCustomerAppDataBodyAppIdRegExpOne = exports.upsertCustomerAppDataBodyIdRegExpOne = exports.upsertCustomerAppDataBodyAppListingCapabilitiesItemKeyRegExp = exports.upsertCustomerAppDataBodyAppListingCapabilitiesItemKeyMax = exports.upsertCustomerAppDataBodyAppDescriptionMax = exports.upsertCustomerAppDataBodyAppNameMax = exports.upsertCustomerAppDataBodyAppIdRegExp = exports.upsertCustomerAppDataBodyIdRegExp = exports.upsertCustomerAppDataParams = exports.listCustomerAppDataQueryParams = exports.listCustomerAppDataQueryPageSizeMax = exports.listCustomerAppDataQueryPageSizeDefault = exports.listCustomerAppDataQueryPageDefault = exports.listCustomerAppDataParams = exports.getCustomerAccessParams = exports.deleteCustomerParams = exports.updateCustomerBody = exports.updateCustomerBodyBillingAddressCountryRegExpOne = exports.updateCustomerBodyBillingAddressCountryMaxOne = exports.updateCustomerBodyBillingAddressCountryMinOne = exports.updateCustomerBodyCurrencyRegExpOne = exports.updateCustomerBodyCurrencyMaxOne = exports.updateCustomerBodyCurrencyMinOne = exports.updateCustomerBodyUsageAttributionSubjectKeysMax = exports.updateCustomerBodyKeyMax = exports.updateCustomerBodyDescriptionMax = exports.updateCustomerBodyNameMax = exports.updateCustomerParams = exports.getCustomerQueryParams = exports.getCustomerParams = exports.listCustomersQueryParams = exports.listCustomersQueryIncludeDeletedDefault = exports.listCustomersQueryPageSizeMax = exports.listCustomersQueryPageSizeDefault = exports.listCustomersQueryPageDefault = exports.createCustomerBody = exports.createCustomerBodyBillingAddressCountryRegExpOne = void 0;
|
|
13
|
+
exports.listGrantsQueryOffsetDefault = exports.listGrantsQueryPageSizeMax = exports.listGrantsQueryPageSizeDefault = exports.listGrantsQueryPageDefault = exports.listGrantsQueryIncludeDeletedDefault = exports.deleteFeatureParams = exports.getFeatureParams = exports.createFeatureBody = exports.createFeatureBodyMeterSlugRegExp = exports.createFeatureBodyMeterSlugMax = exports.createFeatureBodyKeyRegExp = exports.createFeatureBodyKeyMax = exports.listFeaturesQueryParams = exports.listFeaturesQueryLimitMax = exports.listFeaturesQueryLimitDefault = exports.listFeaturesQueryOffsetMin = exports.listFeaturesQueryOffsetDefault = exports.listFeaturesQueryPageSizeMax = exports.listFeaturesQueryPageSizeDefault = exports.listFeaturesQueryPageDefault = exports.listFeaturesQueryIncludeArchivedDefault = exports.ingestEventsBody = exports.ingestEventsBodyItemSpecversionDefault = exports.ingestEventsBodySpecversionDefault = exports.listEventsQueryParams = exports.listEventsQueryLimitMax = exports.listEventsQueryLimitDefault = exports.listEventsQueryCustomerIdItemRegExp = exports.listEventsQueryClientIdMax = exports.getEntitlementByIdParams = exports.getEntitlementByIdPathEntitlementIdRegExp = exports.listEntitlementsQueryParams = exports.listEntitlementsQueryLimitMax = exports.listEntitlementsQueryLimitDefault = exports.listEntitlementsQueryOffsetMin = exports.listEntitlementsQueryOffsetDefault = exports.listEntitlementsQueryPageSizeMax = exports.listEntitlementsQueryPageSizeDefault = exports.listEntitlementsQueryPageDefault = exports.listEntitlementsQueryExcludeInactiveDefault = exports.listCustomerSubscriptionsQueryParams = exports.listCustomerSubscriptionsQueryPageSizeMax = exports.listCustomerSubscriptionsQueryPageSizeDefault = exports.listCustomerSubscriptionsQueryPageDefault = exports.listCustomerSubscriptionsParams = exports.createCustomerStripePortalSessionBody = exports.createCustomerStripePortalSessionParams = exports.upsertCustomerStripeAppDataBody = exports.upsertCustomerStripeAppDataParams = exports.getCustomerStripeAppDataParams = void 0;
|
|
14
|
+
exports.queryMeterPostPathMeterIdOrSlugMax = exports.queryMeterQueryParams = exports.queryMeterQueryFilterCustomerIdMax = exports.queryMeterQueryWindowTimeZoneDefault = exports.queryMeterQueryClientIdMax = exports.queryMeterParams = exports.queryMeterPathMeterIdOrSlugRegExp = exports.queryMeterPathMeterIdOrSlugMax = exports.deleteMeterParams = exports.deleteMeterPathMeterIdOrSlugRegExp = exports.deleteMeterPathMeterIdOrSlugMax = exports.updateMeterBody = exports.updateMeterBodyNameMax = exports.updateMeterBodyDescriptionMax = exports.updateMeterParams = exports.updateMeterPathMeterIdOrSlugRegExp = exports.updateMeterPathMeterIdOrSlugMax = exports.getMeterParams = exports.getMeterPathMeterIdOrSlugRegExp = exports.getMeterPathMeterIdOrSlugMax = exports.createMeterBody = exports.createMeterBodySlugRegExp = exports.createMeterBodySlugMax = exports.createMeterBodyNameMax = exports.createMeterBodyDescriptionMax = exports.listMetersQueryParams = exports.listMetersQueryIncludeDeletedDefault = exports.listMetersQueryPageSizeMax = exports.listMetersQueryPageSizeDefault = exports.listMetersQueryPageDefault = exports.marketplaceOAuth2InstallAuthorizeQueryParams = exports.marketplaceOAuth2InstallAuthorizeParams = exports.marketplaceOAuth2InstallGetURLParams = exports.marketplaceAppAPIKeyInstallBody = exports.marketplaceAppAPIKeyInstallBodyCreateBillingProfileDefault = exports.marketplaceAppAPIKeyInstallParams = exports.marketplaceAppInstallBody = exports.marketplaceAppInstallBodyCreateBillingProfileDefault = exports.marketplaceAppInstallParams = exports.getMarketplaceListingParams = exports.listMarketplaceListingsQueryParams = exports.listMarketplaceListingsQueryPageSizeMax = exports.listMarketplaceListingsQueryPageSizeDefault = exports.listMarketplaceListingsQueryPageDefault = exports.getProgressParams = exports.voidGrantParams = exports.listGrantsQueryParams = exports.listGrantsQueryLimitMax = exports.listGrantsQueryLimitDefault = exports.listGrantsQueryOffsetMin = void 0;
|
|
15
|
+
exports.createNotificationRuleBodyDisabledDefaultOne = exports.createNotificationRuleBodyFeaturesItemRegExp = exports.createNotificationRuleBodyFeaturesItemMax = exports.createNotificationRuleBodyChannelsItemRegExp = exports.createNotificationRuleBodyThresholdsMax = exports.createNotificationRuleBodyDisabledDefault = exports.listNotificationRulesQueryParams = exports.listNotificationRulesQueryPageSizeMax = exports.listNotificationRulesQueryPageSizeDefault = exports.listNotificationRulesQueryPageDefault = exports.listNotificationRulesQueryFeatureItemRegExp = exports.listNotificationRulesQueryFeatureItemMax = exports.listNotificationRulesQueryIncludeDisabledDefault = exports.listNotificationRulesQueryIncludeDeletedDefault = exports.getNotificationEventParams = exports.listNotificationEventsQueryParams = exports.listNotificationEventsQueryPageSizeMax = exports.listNotificationEventsQueryPageSizeDefault = exports.listNotificationEventsQueryPageDefault = exports.listNotificationEventsQueryChannelItemRegExp = exports.listNotificationEventsQueryRuleItemRegExp = exports.deleteNotificationChannelParams = exports.deleteNotificationChannelPathChannelIdRegExp = exports.getNotificationChannelParams = exports.getNotificationChannelPathChannelIdRegExp = exports.updateNotificationChannelBody = exports.updateNotificationChannelBodySigningSecretRegExp = exports.updateNotificationChannelBodyDisabledDefault = exports.updateNotificationChannelParams = exports.updateNotificationChannelPathChannelIdRegExp = exports.createNotificationChannelBody = exports.createNotificationChannelBodySigningSecretRegExp = exports.createNotificationChannelBodyDisabledDefault = exports.listNotificationChannelsQueryParams = exports.listNotificationChannelsQueryPageSizeMax = exports.listNotificationChannelsQueryPageSizeDefault = exports.listNotificationChannelsQueryPageDefault = exports.listNotificationChannelsQueryIncludeDisabledDefault = exports.listNotificationChannelsQueryIncludeDeletedDefault = exports.listMeterSubjectsParams = exports.listMeterSubjectsPathMeterIdOrSlugRegExp = exports.listMeterSubjectsPathMeterIdOrSlugMax = exports.queryMeterPostBody = exports.queryMeterPostBodyGroupByMax = exports.queryMeterPostBodyFilterCustomerIdMax = exports.queryMeterPostBodySubjectMax = exports.queryMeterPostBodyWindowTimeZoneDefault = exports.queryMeterPostBodyClientIdMax = exports.queryMeterPostParams = exports.queryMeterPostPathMeterIdOrSlugRegExp = void 0;
|
|
16
|
+
exports.createPlanBodyProRatingConfigEnabledDefault = exports.createPlanBodyCurrencyDefault = exports.createPlanBodyCurrencyRegExpOne = exports.createPlanBodyCurrencyMaxOne = exports.createPlanBodyCurrencyMinOne = exports.createPlanBodyKeyRegExp = exports.createPlanBodyKeyMax = exports.createPlanBodyDescriptionMax = exports.createPlanBodyNameMax = exports.listPlansQueryParams = exports.listPlansQueryPageSizeMax = exports.listPlansQueryPageSizeDefault = exports.listPlansQueryPageDefault = exports.listPlansQueryCurrencyItemRegExp = exports.listPlansQueryCurrencyItemMax = exports.listPlansQueryCurrencyItemMin = exports.listPlansQueryKeyItemRegExp = exports.listPlansQueryKeyItemMax = exports.listPlansQueryIdItemRegExp = exports.listPlansQueryIncludeDeletedDefault = exports.testNotificationRuleParams = exports.testNotificationRulePathRuleIdRegExp = exports.deleteNotificationRuleParams = exports.deleteNotificationRulePathRuleIdRegExp = exports.getNotificationRuleParams = exports.getNotificationRulePathRuleIdRegExp = exports.updateNotificationRuleBody = exports.updateNotificationRuleBodyChannelsItemRegExpThree = exports.updateNotificationRuleBodyDisabledDefaultThree = exports.updateNotificationRuleBodyChannelsItemRegExpTwo = exports.updateNotificationRuleBodyDisabledDefaultTwo = exports.updateNotificationRuleBodyFeaturesItemRegExpOne = exports.updateNotificationRuleBodyFeaturesItemMaxOne = exports.updateNotificationRuleBodyChannelsItemRegExpOne = exports.updateNotificationRuleBodyDisabledDefaultOne = exports.updateNotificationRuleBodyFeaturesItemRegExp = exports.updateNotificationRuleBodyFeaturesItemMax = exports.updateNotificationRuleBodyChannelsItemRegExp = exports.updateNotificationRuleBodyThresholdsMax = exports.updateNotificationRuleBodyDisabledDefault = exports.updateNotificationRuleParams = exports.updateNotificationRulePathRuleIdRegExp = exports.createNotificationRuleBody = exports.createNotificationRuleBodyChannelsItemRegExpThree = exports.createNotificationRuleBodyDisabledDefaultThree = exports.createNotificationRuleBodyChannelsItemRegExpTwo = exports.createNotificationRuleBodyDisabledDefaultTwo = exports.createNotificationRuleBodyFeaturesItemRegExpOne = exports.createNotificationRuleBodyFeaturesItemMaxOne = exports.createNotificationRuleBodyChannelsItemRegExpOne = void 0;
|
|
17
|
+
exports.createPlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpSeven = exports.createPlanBodyPhasesItemRateCardsItemPriceQuantityPerPackageRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPriceAmountRegExpSeven = exports.createPlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpFive = exports.createPlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpFive = exports.createPlanBodyPhasesItemRateCardsItemPriceMultiplierDefault = exports.createPlanBodyPhasesItemRateCardsItemPriceMultiplierRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpThree = exports.createPlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpThree = exports.createPlanBodyPhasesItemRateCardsItemPriceTiersItemUnitPriceAmountRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPriceTiersItemFlatPriceAmountRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPriceTiersItemUpToAmountRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPriceAmountRegExpFive = exports.createPlanBodyPhasesItemRateCardsItemPricePaymentTermDefaultTwo = exports.createPlanBodyPhasesItemRateCardsItemPriceAmountRegExpThree = exports.createPlanBodyPhasesItemRateCardsItemTaxConfigStripeCodeRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefaultOne = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMaxOne = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefaultOne = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMinOne = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefaultOne = exports.createPlanBodyPhasesItemRateCardsItemFeatureKeyRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemFeatureKeyMaxOne = exports.createPlanBodyPhasesItemRateCardsItemDescriptionMaxOne = exports.createPlanBodyPhasesItemRateCardsItemNameMaxOne = exports.createPlanBodyPhasesItemRateCardsItemKeyRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemKeyMaxOne = exports.createPlanBodyPhasesItemRateCardsItemDiscountsUsageQuantityRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemPricePaymentTermDefault = exports.createPlanBodyPhasesItemRateCardsItemPriceAmountRegExpOne = exports.createPlanBodyPhasesItemRateCardsItemTaxConfigStripeCodeRegExp = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefault = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMax = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefault = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMin = exports.createPlanBodyPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefault = exports.createPlanBodyPhasesItemRateCardsItemFeatureKeyRegExp = exports.createPlanBodyPhasesItemRateCardsItemFeatureKeyMax = exports.createPlanBodyPhasesItemRateCardsItemDescriptionMax = exports.createPlanBodyPhasesItemRateCardsItemNameMax = exports.createPlanBodyPhasesItemRateCardsItemKeyRegExp = exports.createPlanBodyPhasesItemRateCardsItemKeyMax = exports.createPlanBodyPhasesItemDescriptionMax = exports.createPlanBodyPhasesItemNameMax = exports.createPlanBodyPhasesItemKeyRegExp = exports.createPlanBodyPhasesItemKeyMax = exports.createPlanBodyProRatingConfigDefault = exports.createPlanBodyProRatingConfigModeDefault = void 0;
|
|
18
|
+
exports.updatePlanBodyPhasesItemRateCardsItemPriceTiersItemUpToAmountRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemPriceAmountRegExpFive = exports.updatePlanBodyPhasesItemRateCardsItemPricePaymentTermDefaultTwo = exports.updatePlanBodyPhasesItemRateCardsItemPriceAmountRegExpThree = exports.updatePlanBodyPhasesItemRateCardsItemTaxConfigStripeCodeRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefaultOne = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMaxOne = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefaultOne = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMinOne = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefaultOne = exports.updatePlanBodyPhasesItemRateCardsItemFeatureKeyRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemFeatureKeyMaxOne = exports.updatePlanBodyPhasesItemRateCardsItemDescriptionMaxOne = exports.updatePlanBodyPhasesItemRateCardsItemNameMaxOne = exports.updatePlanBodyPhasesItemRateCardsItemKeyRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemKeyMaxOne = exports.updatePlanBodyPhasesItemRateCardsItemDiscountsUsageQuantityRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemPricePaymentTermDefault = exports.updatePlanBodyPhasesItemRateCardsItemPriceAmountRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemTaxConfigStripeCodeRegExp = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefault = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMax = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefault = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMin = exports.updatePlanBodyPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefault = exports.updatePlanBodyPhasesItemRateCardsItemFeatureKeyRegExp = exports.updatePlanBodyPhasesItemRateCardsItemFeatureKeyMax = exports.updatePlanBodyPhasesItemRateCardsItemDescriptionMax = exports.updatePlanBodyPhasesItemRateCardsItemNameMax = exports.updatePlanBodyPhasesItemRateCardsItemKeyRegExp = exports.updatePlanBodyPhasesItemRateCardsItemKeyMax = exports.updatePlanBodyPhasesItemDescriptionMax = exports.updatePlanBodyPhasesItemNameMax = exports.updatePlanBodyPhasesItemKeyRegExp = exports.updatePlanBodyPhasesItemKeyMax = exports.updatePlanBodyProRatingConfigDefault = exports.updatePlanBodyProRatingConfigModeDefault = exports.updatePlanBodyProRatingConfigEnabledDefault = exports.updatePlanBodyDescriptionMax = exports.updatePlanBodyNameMax = exports.updatePlanParams = exports.updatePlanPathPlanIdRegExp = exports.nextPlanParams = exports.nextPlanPathPlanIdOrKeyRegExp = exports.nextPlanPathPlanIdOrKeyMax = exports.createPlanBody = exports.createPlanBodyPhasesItemRateCardsItemDiscountsUsageQuantityRegExpThree = exports.createPlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpSeven = void 0;
|
|
19
|
+
exports.archivePlanParams = exports.archivePlanPathPlanIdRegExp = exports.deletePlanAddonParams = exports.deletePlanAddonPathPlanAddonIdRegExp = exports.deletePlanAddonPathPlanIdRegExp = exports.getPlanAddonParams = exports.getPlanAddonPathPlanAddonIdRegExp = exports.getPlanAddonPathPlanAddonIdMax = exports.getPlanAddonPathPlanIdRegExp = exports.getPlanAddonPathPlanIdMax = exports.updatePlanAddonBody = exports.updatePlanAddonParams = exports.updatePlanAddonPathPlanAddonIdRegExp = exports.updatePlanAddonPathPlanIdRegExp = exports.createPlanAddonBody = exports.createPlanAddonBodyAddonIdRegExp = exports.createPlanAddonParams = exports.createPlanAddonPathPlanIdRegExp = exports.listPlanAddonsQueryParams = exports.listPlanAddonsQueryPageSizeMax = exports.listPlanAddonsQueryPageSizeDefault = exports.listPlanAddonsQueryPageDefault = exports.listPlanAddonsQueryKeyItemRegExp = exports.listPlanAddonsQueryKeyItemMax = exports.listPlanAddonsQueryIdItemRegExp = exports.listPlanAddonsQueryIncludeDeletedDefault = exports.listPlanAddonsParams = exports.listPlanAddonsPathPlanIdRegExp = exports.listPlanAddonsPathPlanIdMax = exports.deletePlanParams = exports.deletePlanPathPlanIdRegExp = exports.getPlanQueryParams = exports.getPlanQueryIncludeLatestDefault = exports.getPlanParams = exports.getPlanPathPlanIdRegExp = exports.getPlanPathPlanIdMax = exports.updatePlanBody = exports.updatePlanBodyPhasesItemRateCardsItemDiscountsUsageQuantityRegExpThree = exports.updatePlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpSeven = exports.updatePlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpSeven = exports.updatePlanBodyPhasesItemRateCardsItemPriceQuantityPerPackageRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemPriceAmountRegExpSeven = exports.updatePlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpFive = exports.updatePlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpFive = exports.updatePlanBodyPhasesItemRateCardsItemPriceMultiplierDefault = exports.updatePlanBodyPhasesItemRateCardsItemPriceMultiplierRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemPriceMaximumAmountRegExpThree = exports.updatePlanBodyPhasesItemRateCardsItemPriceMinimumAmountRegExpThree = exports.updatePlanBodyPhasesItemRateCardsItemPriceTiersItemUnitPriceAmountRegExpOne = exports.updatePlanBodyPhasesItemRateCardsItemPriceTiersItemFlatPriceAmountRegExpOne = void 0;
|
|
20
|
+
exports.createEntitlementBodyFeatureKeyRegExpOne = exports.createEntitlementBodyFeatureKeyMaxOne = exports.createEntitlementBodyPreserveOverageAtResetDefault = exports.createEntitlementBodyIssueAfterResetPriorityMax = exports.createEntitlementBodyIssueAfterResetPriorityDefault = exports.createEntitlementBodyIssueAfterResetMin = exports.createEntitlementBodyIsUnlimitedDefault = exports.createEntitlementBodyIsSoftLimitDefault = exports.createEntitlementBodyFeatureIdRegExp = exports.createEntitlementBodyFeatureKeyRegExp = exports.createEntitlementBodyFeatureKeyMax = exports.createEntitlementParams = exports.deleteSubjectParams = exports.getSubjectParams = exports.upsertSubjectBody = exports.upsertSubjectBodyItem = exports.createStripeCheckoutSessionBody = exports.createStripeCheckoutSessionBodyOptionsCustomTextTermsOfServiceAcceptanceMessageMax = exports.createStripeCheckoutSessionBodyOptionsCustomTextSubmitMessageMax = exports.createStripeCheckoutSessionBodyOptionsCustomTextShippingAddressMessageMax = exports.createStripeCheckoutSessionBodyOptionsCustomTextAfterSubmitMessageMax = exports.createStripeCheckoutSessionBodyOptionsCurrencyRegExpOne = exports.createStripeCheckoutSessionBodyOptionsCurrencyMaxOne = exports.createStripeCheckoutSessionBodyOptionsCurrencyMinOne = exports.createStripeCheckoutSessionBodyCustomerBillingAddressCountryRegExpOne = exports.createStripeCheckoutSessionBodyCustomerBillingAddressCountryMaxOne = exports.createStripeCheckoutSessionBodyCustomerBillingAddressCountryMinOne = exports.createStripeCheckoutSessionBodyCustomerCurrencyRegExpOne = exports.createStripeCheckoutSessionBodyCustomerCurrencyMaxOne = exports.createStripeCheckoutSessionBodyCustomerCurrencyMinOne = exports.createStripeCheckoutSessionBodyCustomerUsageAttributionSubjectKeysMax = exports.createStripeCheckoutSessionBodyCustomerKeyMaxOne = exports.createStripeCheckoutSessionBodyCustomerDescriptionMax = exports.createStripeCheckoutSessionBodyCustomerNameMax = exports.createStripeCheckoutSessionBodyCustomerIdRegExp = exports.createStripeCheckoutSessionBodyAppIdRegExp = exports.invalidatePortalTokensBody = exports.listPortalTokensQueryParams = exports.listPortalTokensQueryLimitMax = exports.listPortalTokensQueryLimitDefault = exports.createPortalTokenBody = exports.queryPortalMeterQueryParams = exports.queryPortalMeterQueryFilterCustomerIdMax = exports.queryPortalMeterQueryWindowTimeZoneDefault = exports.queryPortalMeterQueryClientIdMax = exports.queryPortalMeterParams = exports.queryPortalMeterPathMeterSlugRegExp = exports.queryPortalMeterPathMeterSlugMax = exports.publishPlanParams = exports.publishPlanPathPlanIdRegExp = void 0;
|
|
21
|
+
exports.createSubscriptionBodyCustomPlanNameMax = exports.createSubscriptionBodyCustomerKeyMax = exports.createSubscriptionBodyCustomerIdRegExp = exports.createSubscriptionBodyTimingDefault = exports.createSubscriptionBodyPlanKeyRegExp = exports.createSubscriptionBodyPlanKeyMax = exports.resetEntitlementUsageBody = exports.resetEntitlementUsageParams = exports.getEntitlementHistoryQueryParams = exports.getEntitlementHistoryQueryWindowTimeZoneDefault = exports.getEntitlementHistoryParams = exports.deleteEntitlementParams = exports.getEntitlementParams = exports.getEntitlementValueQueryParams = exports.getEntitlementValueParams = exports.overrideEntitlementBody = exports.overrideEntitlementBodyFeatureIdRegExpTwo = exports.overrideEntitlementBodyFeatureKeyRegExpTwo = exports.overrideEntitlementBodyFeatureKeyMaxTwo = exports.overrideEntitlementBodyFeatureIdRegExpOne = exports.overrideEntitlementBodyFeatureKeyRegExpOne = exports.overrideEntitlementBodyFeatureKeyMaxOne = exports.overrideEntitlementBodyPreserveOverageAtResetDefault = exports.overrideEntitlementBodyIssueAfterResetPriorityMax = exports.overrideEntitlementBodyIssueAfterResetPriorityDefault = exports.overrideEntitlementBodyIssueAfterResetMin = exports.overrideEntitlementBodyIsUnlimitedDefault = exports.overrideEntitlementBodyIsSoftLimitDefault = exports.overrideEntitlementBodyFeatureIdRegExp = exports.overrideEntitlementBodyFeatureKeyRegExp = exports.overrideEntitlementBodyFeatureKeyMax = exports.overrideEntitlementParams = exports.createGrantBody = exports.createGrantBodyMinRolloverAmountDefault = exports.createGrantBodyMaxRolloverAmountDefault = exports.createGrantBodyExpirationCountMax = exports.createGrantBodyPriorityMax = exports.createGrantBodyAmountMin = exports.createGrantParams = exports.listEntitlementGrantsQueryParams = exports.listEntitlementGrantsQueryIncludeDeletedDefault = exports.listEntitlementGrantsParams = exports.listSubjectEntitlementsQueryParams = exports.listSubjectEntitlementsQueryIncludeDeletedDefault = exports.listSubjectEntitlementsParams = exports.createEntitlementBody = exports.createEntitlementBodyFeatureIdRegExpTwo = exports.createEntitlementBodyFeatureKeyRegExpTwo = exports.createEntitlementBodyFeatureKeyMaxTwo = exports.createEntitlementBodyFeatureIdRegExpOne = void 0;
|
|
22
|
+
exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMultiplierRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpThree = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpThree = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceTiersItemUnitPriceAmountRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceTiersItemFlatPriceAmountRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceTiersItemUpToAmountRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpFive = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPricePaymentTermDefaultTwo = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpThree = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemTaxConfigStripeCodeRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefaultOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMaxOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefaultOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMinOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefaultOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyMaxOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemDescriptionMaxOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemNameMaxOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyMaxOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemDiscountsUsageQuantityRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPricePaymentTermDefault = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemTaxConfigStripeCodeRegExp = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefault = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMax = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefault = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMin = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefault = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyRegExp = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyMax = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemDescriptionMax = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemNameMax = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyRegExp = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyMax = exports.createSubscriptionBodyCustomPlanPhasesItemDescriptionMax = exports.createSubscriptionBodyCustomPlanPhasesItemNameMax = exports.createSubscriptionBodyCustomPlanPhasesItemKeyRegExp = exports.createSubscriptionBodyCustomPlanPhasesItemKeyMax = exports.createSubscriptionBodyCustomPlanProRatingConfigDefault = exports.createSubscriptionBodyCustomPlanProRatingConfigModeDefault = exports.createSubscriptionBodyCustomPlanProRatingConfigEnabledDefault = exports.createSubscriptionBodyCustomPlanCurrencyDefault = exports.createSubscriptionBodyCustomPlanCurrencyRegExpOne = exports.createSubscriptionBodyCustomPlanCurrencyMaxOne = exports.createSubscriptionBodyCustomPlanCurrencyMinOne = exports.createSubscriptionBodyCustomPlanDescriptionMax = void 0;
|
|
23
|
+
exports.editSubscriptionBodyCustomizationsItemRateCardPriceTiersItemUpToAmountRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMaximumAmountRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMinimumAmountRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardPriceAmountRegExpFive = exports.editSubscriptionBodyCustomizationsItemRateCardPricePaymentTermDefaultTwo = exports.editSubscriptionBodyCustomizationsItemRateCardPriceAmountRegExpThree = exports.editSubscriptionBodyCustomizationsItemRateCardTaxConfigStripeCodeRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplatePreserveOverageAtResetDefaultOne = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIssueAfterResetPriorityMaxOne = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIssueAfterResetPriorityDefaultOne = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIssueAfterResetMinOne = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIsSoftLimitDefaultOne = exports.editSubscriptionBodyCustomizationsItemRateCardFeatureKeyRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardFeatureKeyMaxOne = exports.editSubscriptionBodyCustomizationsItemRateCardDescriptionMaxOne = exports.editSubscriptionBodyCustomizationsItemRateCardNameMaxOne = exports.editSubscriptionBodyCustomizationsItemRateCardKeyRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardKeyMaxOne = exports.editSubscriptionBodyCustomizationsItemRateCardDiscountsUsageQuantityRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardPricePaymentTermDefault = exports.editSubscriptionBodyCustomizationsItemRateCardPriceAmountRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardTaxConfigStripeCodeRegExp = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplatePreserveOverageAtResetDefault = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIssueAfterResetPriorityMax = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIssueAfterResetPriorityDefault = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIssueAfterResetMin = exports.editSubscriptionBodyCustomizationsItemRateCardEntitlementTemplateIsSoftLimitDefault = exports.editSubscriptionBodyCustomizationsItemRateCardFeatureKeyRegExp = exports.editSubscriptionBodyCustomizationsItemRateCardFeatureKeyMax = exports.editSubscriptionBodyCustomizationsItemRateCardDescriptionMax = exports.editSubscriptionBodyCustomizationsItemRateCardNameMax = exports.editSubscriptionBodyCustomizationsItemRateCardKeyRegExp = exports.editSubscriptionBodyCustomizationsItemRateCardKeyMax = exports.editSubscriptionParams = exports.editSubscriptionPathSubscriptionIdRegExp = exports.getSubscriptionQueryParams = exports.getSubscriptionParams = exports.getSubscriptionPathSubscriptionIdRegExp = exports.createSubscriptionBody = exports.createSubscriptionBodyCustomerKeyMaxOne = exports.createSubscriptionBodyCustomerIdRegExpOne = exports.createSubscriptionBodyTimingDefaultFour = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemDiscountsUsageQuantityRegExpThree = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpSeven = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpSeven = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceQuantityPerPackageRegExpOne = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpSeven = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpFive = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpFive = exports.createSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMultiplierDefault = void 0;
|
|
24
|
+
exports.changeSubscriptionBodyCustomPlanCurrencyMaxOne = exports.changeSubscriptionBodyCustomPlanCurrencyMinOne = exports.changeSubscriptionBodyCustomPlanDescriptionMax = exports.changeSubscriptionBodyCustomPlanNameMax = exports.changeSubscriptionBodyPlanKeyRegExp = exports.changeSubscriptionBodyPlanKeyMax = exports.changeSubscriptionParams = exports.changeSubscriptionPathSubscriptionIdRegExp = exports.cancelSubscriptionBody = exports.cancelSubscriptionParams = exports.cancelSubscriptionPathSubscriptionIdRegExp = exports.updateSubscriptionAddonBody = exports.updateSubscriptionAddonBodyQuantityMin = exports.updateSubscriptionAddonBodyDescriptionMax = exports.updateSubscriptionAddonBodyNameMax = exports.updateSubscriptionAddonParams = exports.updateSubscriptionAddonPathSubscriptionAddonIdRegExp = exports.updateSubscriptionAddonPathSubscriptionIdRegExp = exports.getSubscriptionAddonParams = exports.getSubscriptionAddonPathSubscriptionAddonIdRegExp = exports.getSubscriptionAddonPathSubscriptionIdRegExp = exports.listSubscriptionAddonsParams = exports.listSubscriptionAddonsPathSubscriptionIdRegExp = exports.createSubscriptionAddonBody = exports.createSubscriptionAddonBodyAddonIdRegExp = exports.createSubscriptionAddonBodyQuantityMin = exports.createSubscriptionAddonBodyDescriptionMax = exports.createSubscriptionAddonBodyNameMax = exports.createSubscriptionAddonParams = exports.createSubscriptionAddonPathSubscriptionIdRegExp = exports.deleteSubscriptionParams = exports.deleteSubscriptionPathSubscriptionIdRegExp = exports.editSubscriptionBody = exports.editSubscriptionBodyCustomizationsMax = exports.editSubscriptionBodyCustomizationsItemPhaseKeyRegExpTwo = exports.editSubscriptionBodyCustomizationsItemPhaseKeyMaxTwo = exports.editSubscriptionBodyCustomizationsItemPhaseDiscountsUsageQuantityRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardDiscountsUsageQuantityRegExpThree = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMaximumAmountRegExpSeven = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMinimumAmountRegExpSeven = exports.editSubscriptionBodyCustomizationsItemRateCardPriceQuantityPerPackageRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardPriceAmountRegExpSeven = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMaximumAmountRegExpFive = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMinimumAmountRegExpFive = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMultiplierDefault = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMultiplierRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMaximumAmountRegExpThree = exports.editSubscriptionBodyCustomizationsItemRateCardPriceMinimumAmountRegExpThree = exports.editSubscriptionBodyCustomizationsItemRateCardPriceTiersItemUnitPriceAmountRegExpOne = exports.editSubscriptionBodyCustomizationsItemRateCardPriceTiersItemFlatPriceAmountRegExpOne = void 0;
|
|
25
|
+
exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpFive = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpFive = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMultiplierDefault = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMultiplierRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpThree = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpThree = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceTiersItemUnitPriceAmountRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceTiersItemFlatPriceAmountRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceTiersItemUpToAmountRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpFive = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPricePaymentTermDefaultTwo = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpThree = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemTaxConfigStripeCodeRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefaultOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMaxOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefaultOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMinOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefaultOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyMaxOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemDescriptionMaxOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemNameMaxOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyMaxOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemDiscountsUsageQuantityRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPricePaymentTermDefault = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemTaxConfigStripeCodeRegExp = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplatePreserveOverageAtResetDefault = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityMax = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetPriorityDefault = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIssueAfterResetMin = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemEntitlementTemplateIsSoftLimitDefault = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyRegExp = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemFeatureKeyMax = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemDescriptionMax = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemNameMax = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyRegExp = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemKeyMax = exports.changeSubscriptionBodyCustomPlanPhasesItemDescriptionMax = exports.changeSubscriptionBodyCustomPlanPhasesItemNameMax = exports.changeSubscriptionBodyCustomPlanPhasesItemKeyRegExp = exports.changeSubscriptionBodyCustomPlanPhasesItemKeyMax = exports.changeSubscriptionBodyCustomPlanProRatingConfigDefault = exports.changeSubscriptionBodyCustomPlanProRatingConfigModeDefault = exports.changeSubscriptionBodyCustomPlanProRatingConfigEnabledDefault = exports.changeSubscriptionBodyCustomPlanCurrencyDefault = exports.changeSubscriptionBodyCustomPlanCurrencyRegExpOne = void 0;
|
|
26
|
+
exports.listCustomerEntitlementGrantsV2Params = exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyRegExp = exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyMax = exports.deleteCustomerEntitlementV2Params = exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp = exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax = exports.getCustomerEntitlementV2Params = exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp = exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax = exports.listCustomerEntitlementsV2QueryParams = exports.listCustomerEntitlementsV2QueryLimitMax = exports.listCustomerEntitlementsV2QueryLimitDefault = exports.listCustomerEntitlementsV2QueryOffsetMin = exports.listCustomerEntitlementsV2QueryOffsetDefault = exports.listCustomerEntitlementsV2QueryPageSizeMax = exports.listCustomerEntitlementsV2QueryPageSizeDefault = exports.listCustomerEntitlementsV2QueryPageDefault = exports.listCustomerEntitlementsV2QueryIncludeDeletedDefault = exports.listCustomerEntitlementsV2Params = exports.createCustomerEntitlementV2Body = exports.createCustomerEntitlementV2BodyFeatureIdRegExpTwo = exports.createCustomerEntitlementV2BodyFeatureKeyRegExpTwo = exports.createCustomerEntitlementV2BodyFeatureKeyMaxTwo = exports.createCustomerEntitlementV2BodyFeatureIdRegExpOne = exports.createCustomerEntitlementV2BodyFeatureKeyRegExpOne = exports.createCustomerEntitlementV2BodyFeatureKeyMaxOne = exports.createCustomerEntitlementV2BodyPreserveOverageAtResetDefault = exports.createCustomerEntitlementV2BodyIssueAfterResetPriorityMax = exports.createCustomerEntitlementV2BodyIssueAfterResetPriorityDefault = exports.createCustomerEntitlementV2BodyIssueAfterResetMin = exports.createCustomerEntitlementV2BodyIsUnlimitedDefault = exports.createCustomerEntitlementV2BodyIsSoftLimitDefault = exports.createCustomerEntitlementV2BodyFeatureIdRegExp = exports.createCustomerEntitlementV2BodyFeatureKeyRegExp = exports.createCustomerEntitlementV2BodyFeatureKeyMax = exports.createCustomerEntitlementV2Params = exports.unscheduleCancelationParams = exports.unscheduleCancelationPathSubscriptionIdRegExp = exports.restoreSubscriptionParams = exports.restoreSubscriptionPathSubscriptionIdRegExp = exports.migrateSubscriptionBody = exports.migrateSubscriptionBodyTimingDefault = exports.migrateSubscriptionParams = exports.migrateSubscriptionPathSubscriptionIdRegExp = exports.changeSubscriptionBody = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemDiscountsUsageQuantityRegExpThree = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMaximumAmountRegExpSeven = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceMinimumAmountRegExpSeven = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceQuantityPerPackageRegExpOne = exports.changeSubscriptionBodyCustomPlanPhasesItemRateCardsItemPriceAmountRegExpSeven = void 0;
|
|
27
|
+
exports.listEntitlementsV2QueryPageDefault = exports.listEntitlementsV2QueryExcludeInactiveDefault = exports.getCustomerEntitlementValueV2QueryParams = exports.getCustomerEntitlementValueV2Params = exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyRegExp = exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyMax = exports.resetCustomerEntitlementUsageV2Body = exports.resetCustomerEntitlementUsageV2Params = exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyRegExp = exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyMax = exports.overrideCustomerEntitlementV2Body = exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpTwo = exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpTwo = exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxTwo = exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpOne = exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpOne = exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxOne = exports.overrideCustomerEntitlementV2BodyPreserveOverageAtResetDefault = exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityMax = exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityDefault = exports.overrideCustomerEntitlementV2BodyIssueAfterResetMin = exports.overrideCustomerEntitlementV2BodyIsUnlimitedDefault = exports.overrideCustomerEntitlementV2BodyIsSoftLimitDefault = exports.overrideCustomerEntitlementV2BodyFeatureIdRegExp = exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExp = exports.overrideCustomerEntitlementV2BodyFeatureKeyMax = exports.overrideCustomerEntitlementV2Params = exports.getCustomerEntitlementHistoryV2QueryParams = exports.getCustomerEntitlementHistoryV2QueryWindowTimeZoneDefault = exports.getCustomerEntitlementHistoryV2Params = exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyRegExp = exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyMax = exports.createCustomerEntitlementGrantV2Body = exports.createCustomerEntitlementGrantV2BodyMinRolloverAmountDefault = exports.createCustomerEntitlementGrantV2BodyMaxRolloverAmountDefault = exports.createCustomerEntitlementGrantV2BodyExpirationCountMax = exports.createCustomerEntitlementGrantV2BodyPriorityMax = exports.createCustomerEntitlementGrantV2BodyAmountMin = exports.createCustomerEntitlementGrantV2Params = exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyRegExp = exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyMax = exports.listCustomerEntitlementGrantsV2QueryParams = exports.listCustomerEntitlementGrantsV2QueryLimitMax = exports.listCustomerEntitlementGrantsV2QueryLimitDefault = exports.listCustomerEntitlementGrantsV2QueryOffsetMin = exports.listCustomerEntitlementGrantsV2QueryOffsetDefault = exports.listCustomerEntitlementGrantsV2QueryPageSizeMax = exports.listCustomerEntitlementGrantsV2QueryPageSizeDefault = exports.listCustomerEntitlementGrantsV2QueryPageDefault = exports.listCustomerEntitlementGrantsV2QueryIncludeDeletedDefault = void 0;
|
|
28
|
+
exports.listGrantsV2QueryParams = exports.listGrantsV2QueryLimitMax = exports.listGrantsV2QueryLimitDefault = exports.listGrantsV2QueryOffsetMin = exports.listGrantsV2QueryOffsetDefault = exports.listGrantsV2QueryPageSizeMax = exports.listGrantsV2QueryPageSizeDefault = exports.listGrantsV2QueryPageDefault = exports.listGrantsV2QueryIncludeDeletedDefault = exports.listEventsV2QueryParams = exports.listEventsV2QueryClientIdMax = exports.listEventsV2QueryLimitMax = exports.listEventsV2QueryLimitDefault = exports.getEntitlementByIdV2Params = exports.getEntitlementByIdV2PathEntitlementIdRegExp = exports.listEntitlementsV2QueryParams = exports.listEntitlementsV2QueryLimitMax = exports.listEntitlementsV2QueryLimitDefault = exports.listEntitlementsV2QueryOffsetMin = exports.listEntitlementsV2QueryOffsetDefault = exports.listEntitlementsV2QueryPageSizeMax = exports.listEntitlementsV2QueryPageSizeDefault = void 0;
|
|
28
29
|
/* eslint-disable no-useless-escape */
|
|
29
30
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
30
31
|
// @ts-nocheck
|
|
@@ -4525,7 +4526,7 @@ exports.listCustomersQueryParams = zod_1.z.object({
|
|
|
4525
4526
|
key: zod_1.z.coerce
|
|
4526
4527
|
.string()
|
|
4527
4528
|
.optional()
|
|
4528
|
-
.describe('Filter customers by key.\nCase-
|
|
4529
|
+
.describe('Filter customers by key.\nCase-insensitive partial match.'),
|
|
4529
4530
|
name: zod_1.z.coerce
|
|
4530
4531
|
.string()
|
|
4531
4532
|
.optional()
|
|
@@ -5038,900 +5039,510 @@ exports.deleteCustomerAppDataParams = zod_1.z.object({
|
|
|
5038
5039
|
]),
|
|
5039
5040
|
});
|
|
5040
5041
|
/**
|
|
5041
|
-
*
|
|
5042
|
-
|
|
5043
|
-
- Boolean entitlements define static feature access, e.g. "Can use SSO authentication".
|
|
5044
|
-
- Static entitlements let you pass along a configuration while granting access, e.g. "Using this feature with X Y settings" (passed in the config).
|
|
5045
|
-
- Metered entitlements have many use cases, from setting up usage-based access to implementing complex credit systems. Example: The customer can use 10000 AI tokens during the usage period of the entitlement.
|
|
5046
|
-
|
|
5047
|
-
A given customer can only have one active (non-deleted) entitlement per featureKey. If you try to create a new entitlement for a featureKey that already has an active entitlement, the request will fail with a 409 error.
|
|
5048
|
-
|
|
5049
|
-
Once an entitlement is created you cannot modify it, only delete it.
|
|
5050
|
-
* @summary Create a customer entitlement
|
|
5042
|
+
* Checks customer access to a given feature (by key). All entitlement types share the hasAccess property in their value response, but multiple other properties are returned based on the entitlement type.
|
|
5043
|
+
* @summary Get customer entitlement value
|
|
5051
5044
|
*/
|
|
5052
|
-
exports.
|
|
5045
|
+
exports.getCustomerEntitlementValuePathFeatureKeyMax = 64;
|
|
5046
|
+
exports.getCustomerEntitlementValuePathFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5047
|
+
exports.getCustomerEntitlementValueParams = zod_1.z.object({
|
|
5053
5048
|
customerIdOrKey: zod_1.z.union([
|
|
5054
5049
|
zod_1.z.coerce
|
|
5055
5050
|
.string()
|
|
5056
|
-
.regex(
|
|
5051
|
+
.regex(getCustomerEntitlementValuePathCustomerIdOrKeyRegExpOne)
|
|
5057
5052
|
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
5058
5053
|
zod_1.z.coerce
|
|
5059
5054
|
.string()
|
|
5060
5055
|
.min(1)
|
|
5061
|
-
.max(
|
|
5056
|
+
.max(getCustomerEntitlementValuePathCustomerIdOrKeyMaxTwo)
|
|
5062
5057
|
.describe('ExternalKey is a looser version of key.'),
|
|
5063
5058
|
]),
|
|
5059
|
+
featureKey: zod_1.z.coerce
|
|
5060
|
+
.string()
|
|
5061
|
+
.min(1)
|
|
5062
|
+
.max(exports.getCustomerEntitlementValuePathFeatureKeyMax)
|
|
5063
|
+
.regex(exports.getCustomerEntitlementValuePathFeatureKeyRegExp),
|
|
5064
|
+
});
|
|
5065
|
+
exports.getCustomerEntitlementValueQueryParams = zod_1.z.object({
|
|
5066
|
+
time: zod_1.z.coerce.date().optional(),
|
|
5064
5067
|
});
|
|
5065
|
-
exports.createCustomerEntitlementBodyFeatureKeyMax = 64;
|
|
5066
|
-
exports.createCustomerEntitlementBodyFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5067
|
-
exports.createCustomerEntitlementBodyFeatureIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
5068
|
-
exports.createCustomerEntitlementBodyIsSoftLimitDefault = false;
|
|
5069
|
-
exports.createCustomerEntitlementBodyIsUnlimitedDefault = false;
|
|
5070
|
-
exports.createCustomerEntitlementBodyIssueAfterResetMin = 0;
|
|
5071
|
-
exports.createCustomerEntitlementBodyIssueAfterResetPriorityDefault = 1;
|
|
5072
|
-
exports.createCustomerEntitlementBodyIssueAfterResetPriorityMax = 255;
|
|
5073
|
-
exports.createCustomerEntitlementBodyPreserveOverageAtResetDefault = false;
|
|
5074
|
-
exports.createCustomerEntitlementBodyFeatureKeyMaxOne = 64;
|
|
5075
|
-
exports.createCustomerEntitlementBodyFeatureKeyRegExpOne = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5076
|
-
exports.createCustomerEntitlementBodyFeatureIdRegExpOne = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
5077
|
-
exports.createCustomerEntitlementBodyFeatureKeyMaxTwo = 64;
|
|
5078
|
-
exports.createCustomerEntitlementBodyFeatureKeyRegExpTwo = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5079
|
-
exports.createCustomerEntitlementBodyFeatureIdRegExpTwo = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
5080
|
-
exports.createCustomerEntitlementBody = zod_1.z
|
|
5081
|
-
.union([
|
|
5082
|
-
zod_1.z
|
|
5083
|
-
.object({
|
|
5084
|
-
featureId: zod_1.z.coerce
|
|
5085
|
-
.string()
|
|
5086
|
-
.regex(exports.createCustomerEntitlementBodyFeatureIdRegExp)
|
|
5087
|
-
.optional()
|
|
5088
|
-
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
5089
|
-
featureKey: zod_1.z.coerce
|
|
5090
|
-
.string()
|
|
5091
|
-
.min(1)
|
|
5092
|
-
.max(exports.createCustomerEntitlementBodyFeatureKeyMax)
|
|
5093
|
-
.regex(exports.createCustomerEntitlementBodyFeatureKeyRegExp)
|
|
5094
|
-
.optional()
|
|
5095
|
-
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
5096
|
-
isSoftLimit: zod_1.z.coerce
|
|
5097
|
-
.boolean()
|
|
5098
|
-
.optional()
|
|
5099
|
-
.describe('If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.'),
|
|
5100
|
-
issueAfterReset: zod_1.z.coerce
|
|
5101
|
-
.number()
|
|
5102
|
-
.min(exports.createCustomerEntitlementBodyIssueAfterResetMin)
|
|
5103
|
-
.optional()
|
|
5104
|
-
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the \"amount\", \"minRolloverAmount\", and \"maxRolloverAmount\" fields all be the same.'),
|
|
5105
|
-
issueAfterResetPriority: zod_1.z.coerce
|
|
5106
|
-
.number()
|
|
5107
|
-
.min(1)
|
|
5108
|
-
.max(exports.createCustomerEntitlementBodyIssueAfterResetPriorityMax)
|
|
5109
|
-
.default(exports.createCustomerEntitlementBodyIssueAfterResetPriorityDefault)
|
|
5110
|
-
.describe('Defines the grant priority for the default grant.'),
|
|
5111
|
-
isUnlimited: zod_1.z.coerce
|
|
5112
|
-
.boolean()
|
|
5113
|
-
.optional()
|
|
5114
|
-
.describe('Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future.'),
|
|
5115
|
-
measureUsageFrom: zod_1.z
|
|
5116
|
-
.union([
|
|
5117
|
-
zod_1.z
|
|
5118
|
-
.enum(['CURRENT_PERIOD_START', 'NOW'])
|
|
5119
|
-
.describe('Start of measurement options'),
|
|
5120
|
-
zod_1.z.coerce
|
|
5121
|
-
.date()
|
|
5122
|
-
.describe('[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.'),
|
|
5123
|
-
])
|
|
5124
|
-
.describe('Measure usage from')
|
|
5125
|
-
.optional()
|
|
5126
|
-
.describe('Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time.'),
|
|
5127
|
-
metadata: zod_1.z
|
|
5128
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
5129
|
-
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
5130
|
-
.optional()
|
|
5131
|
-
.describe('Additional metadata for the feature.'),
|
|
5132
|
-
preserveOverageAtReset: zod_1.z.coerce
|
|
5133
|
-
.boolean()
|
|
5134
|
-
.optional()
|
|
5135
|
-
.describe('If true, the overage is preserved at reset. If false, the usage is reset to 0.'),
|
|
5136
|
-
type: zod_1.z.enum(['metered']),
|
|
5137
|
-
usagePeriod: zod_1.z
|
|
5138
|
-
.object({
|
|
5139
|
-
anchor: zod_1.z.coerce
|
|
5140
|
-
.date()
|
|
5141
|
-
.optional()
|
|
5142
|
-
.describe('A date-time anchor to base the recurring period on.'),
|
|
5143
|
-
interval: zod_1.z
|
|
5144
|
-
.union([
|
|
5145
|
-
zod_1.z.coerce.string(),
|
|
5146
|
-
zod_1.z
|
|
5147
|
-
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
5148
|
-
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
5149
|
-
])
|
|
5150
|
-
.describe('Period duration for the recurrence')
|
|
5151
|
-
.describe('The unit of time for the interval.'),
|
|
5152
|
-
})
|
|
5153
|
-
.describe('Recurring period with an interval and an anchor.')
|
|
5154
|
-
.describe('The usage period associated with the entitlement.'),
|
|
5155
|
-
})
|
|
5156
|
-
.describe('Create inpurs for metered entitlement'),
|
|
5157
|
-
zod_1.z
|
|
5158
|
-
.object({
|
|
5159
|
-
config: zod_1.z.coerce
|
|
5160
|
-
.string()
|
|
5161
|
-
.describe('The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.'),
|
|
5162
|
-
featureId: zod_1.z.coerce
|
|
5163
|
-
.string()
|
|
5164
|
-
.regex(exports.createCustomerEntitlementBodyFeatureIdRegExpOne)
|
|
5165
|
-
.optional()
|
|
5166
|
-
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
5167
|
-
featureKey: zod_1.z.coerce
|
|
5168
|
-
.string()
|
|
5169
|
-
.min(1)
|
|
5170
|
-
.max(exports.createCustomerEntitlementBodyFeatureKeyMaxOne)
|
|
5171
|
-
.regex(exports.createCustomerEntitlementBodyFeatureKeyRegExpOne)
|
|
5172
|
-
.optional()
|
|
5173
|
-
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
5174
|
-
metadata: zod_1.z
|
|
5175
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
5176
|
-
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
5177
|
-
.optional()
|
|
5178
|
-
.describe('Additional metadata for the feature.'),
|
|
5179
|
-
type: zod_1.z.enum(['static']),
|
|
5180
|
-
usagePeriod: zod_1.z
|
|
5181
|
-
.object({
|
|
5182
|
-
anchor: zod_1.z.coerce
|
|
5183
|
-
.date()
|
|
5184
|
-
.optional()
|
|
5185
|
-
.describe('A date-time anchor to base the recurring period on.'),
|
|
5186
|
-
interval: zod_1.z
|
|
5187
|
-
.union([
|
|
5188
|
-
zod_1.z.coerce.string(),
|
|
5189
|
-
zod_1.z
|
|
5190
|
-
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
5191
|
-
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
5192
|
-
])
|
|
5193
|
-
.describe('Period duration for the recurrence')
|
|
5194
|
-
.describe('The unit of time for the interval.'),
|
|
5195
|
-
})
|
|
5196
|
-
.describe('Recurring period with an interval and an anchor.')
|
|
5197
|
-
.optional()
|
|
5198
|
-
.describe('The usage period associated with the entitlement.'),
|
|
5199
|
-
})
|
|
5200
|
-
.describe('Create inputs for static entitlement'),
|
|
5201
|
-
zod_1.z
|
|
5202
|
-
.object({
|
|
5203
|
-
featureId: zod_1.z.coerce
|
|
5204
|
-
.string()
|
|
5205
|
-
.regex(exports.createCustomerEntitlementBodyFeatureIdRegExpTwo)
|
|
5206
|
-
.optional()
|
|
5207
|
-
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
5208
|
-
featureKey: zod_1.z.coerce
|
|
5209
|
-
.string()
|
|
5210
|
-
.min(1)
|
|
5211
|
-
.max(exports.createCustomerEntitlementBodyFeatureKeyMaxTwo)
|
|
5212
|
-
.regex(exports.createCustomerEntitlementBodyFeatureKeyRegExpTwo)
|
|
5213
|
-
.optional()
|
|
5214
|
-
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
5215
|
-
metadata: zod_1.z
|
|
5216
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
5217
|
-
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
5218
|
-
.optional()
|
|
5219
|
-
.describe('Additional metadata for the feature.'),
|
|
5220
|
-
type: zod_1.z.enum(['boolean']),
|
|
5221
|
-
usagePeriod: zod_1.z
|
|
5222
|
-
.object({
|
|
5223
|
-
anchor: zod_1.z.coerce
|
|
5224
|
-
.date()
|
|
5225
|
-
.optional()
|
|
5226
|
-
.describe('A date-time anchor to base the recurring period on.'),
|
|
5227
|
-
interval: zod_1.z
|
|
5228
|
-
.union([
|
|
5229
|
-
zod_1.z.coerce.string(),
|
|
5230
|
-
zod_1.z
|
|
5231
|
-
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
5232
|
-
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
5233
|
-
])
|
|
5234
|
-
.describe('Period duration for the recurrence')
|
|
5235
|
-
.describe('The unit of time for the interval.'),
|
|
5236
|
-
})
|
|
5237
|
-
.describe('Recurring period with an interval and an anchor.')
|
|
5238
|
-
.optional()
|
|
5239
|
-
.describe('The usage period associated with the entitlement.'),
|
|
5240
|
-
})
|
|
5241
|
-
.describe('Create inputs for boolean entitlement'),
|
|
5242
|
-
])
|
|
5243
|
-
.describe('Create inputs for entitlement');
|
|
5244
5068
|
/**
|
|
5245
|
-
*
|
|
5246
|
-
|
|
5069
|
+
* Get stripe app data for a customer.
|
|
5070
|
+
Only returns data if the customer billing profile is linked to a stripe app.
|
|
5071
|
+
* @summary Get customer stripe app data
|
|
5247
5072
|
*/
|
|
5248
|
-
exports.
|
|
5073
|
+
exports.getCustomerStripeAppDataParams = zod_1.z.object({
|
|
5249
5074
|
customerIdOrKey: zod_1.z.union([
|
|
5250
5075
|
zod_1.z.coerce
|
|
5251
5076
|
.string()
|
|
5252
|
-
.regex(
|
|
5077
|
+
.regex(getCustomerStripeAppDataPathCustomerIdOrKeyRegExpOne)
|
|
5253
5078
|
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
5254
5079
|
zod_1.z.coerce
|
|
5255
5080
|
.string()
|
|
5256
5081
|
.min(1)
|
|
5257
|
-
.max(
|
|
5082
|
+
.max(getCustomerStripeAppDataPathCustomerIdOrKeyMaxTwo)
|
|
5258
5083
|
.describe('ExternalKey is a looser version of key.'),
|
|
5259
5084
|
]),
|
|
5260
5085
|
});
|
|
5261
|
-
exports.listCustomerEntitlementsQueryIncludeDeletedDefault = false;
|
|
5262
|
-
exports.listCustomerEntitlementsQueryParams = zod_1.z.object({
|
|
5263
|
-
includeDeleted: zod_1.z.coerce.boolean().optional(),
|
|
5264
|
-
});
|
|
5265
5086
|
/**
|
|
5266
|
-
*
|
|
5267
|
-
|
|
5087
|
+
* Upsert stripe app data for a customer.
|
|
5088
|
+
Only updates data if the customer billing profile is linked to a stripe app.
|
|
5089
|
+
* @summary Upsert customer stripe app data
|
|
5268
5090
|
*/
|
|
5269
|
-
exports.
|
|
5270
|
-
exports.getCustomerEntitlementPathFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5271
|
-
exports.getCustomerEntitlementParams = zod_1.z.object({
|
|
5091
|
+
exports.upsertCustomerStripeAppDataParams = zod_1.z.object({
|
|
5272
5092
|
customerIdOrKey: zod_1.z.union([
|
|
5273
5093
|
zod_1.z.coerce
|
|
5274
5094
|
.string()
|
|
5275
|
-
.regex(
|
|
5095
|
+
.regex(upsertCustomerStripeAppDataPathCustomerIdOrKeyRegExpOne)
|
|
5276
5096
|
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
5277
5097
|
zod_1.z.coerce
|
|
5278
5098
|
.string()
|
|
5279
5099
|
.min(1)
|
|
5280
|
-
.max(
|
|
5100
|
+
.max(upsertCustomerStripeAppDataPathCustomerIdOrKeyMaxTwo)
|
|
5281
5101
|
.describe('ExternalKey is a looser version of key.'),
|
|
5282
5102
|
]),
|
|
5283
|
-
featureKey: zod_1.z.coerce
|
|
5284
|
-
.string()
|
|
5285
|
-
.min(1)
|
|
5286
|
-
.max(exports.getCustomerEntitlementPathFeatureKeyMax)
|
|
5287
|
-
.regex(exports.getCustomerEntitlementPathFeatureKeyRegExp),
|
|
5288
5103
|
});
|
|
5104
|
+
exports.upsertCustomerStripeAppDataBody = zod_1.z
|
|
5105
|
+
.object({
|
|
5106
|
+
stripeCustomerId: zod_1.z.coerce.string().describe('The Stripe customer ID.'),
|
|
5107
|
+
stripeDefaultPaymentMethodId: zod_1.z.coerce
|
|
5108
|
+
.string()
|
|
5109
|
+
.optional()
|
|
5110
|
+
.describe('The Stripe default payment method ID.'),
|
|
5111
|
+
})
|
|
5112
|
+
.describe('Stripe Customer App Data Base.');
|
|
5289
5113
|
/**
|
|
5290
|
-
*
|
|
5291
|
-
|
|
5292
|
-
|
|
5114
|
+
* Create Stripe customer portal session.
|
|
5115
|
+
Only returns URL if the customer billing profile is linked to a stripe app and customer.
|
|
5116
|
+
|
|
5117
|
+
Useful to redirect the customer to the Stripe customer portal to manage their payment methods,
|
|
5118
|
+
change their billing address and access their invoice history.
|
|
5119
|
+
* @summary Create Stripe customer portal session
|
|
5293
5120
|
*/
|
|
5294
|
-
exports.
|
|
5295
|
-
exports.deleteCustomerEntitlementPathFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5296
|
-
exports.deleteCustomerEntitlementParams = zod_1.z.object({
|
|
5121
|
+
exports.createCustomerStripePortalSessionParams = zod_1.z.object({
|
|
5297
5122
|
customerIdOrKey: zod_1.z.union([
|
|
5298
5123
|
zod_1.z.coerce
|
|
5299
5124
|
.string()
|
|
5300
|
-
.regex(
|
|
5125
|
+
.regex(createCustomerStripePortalSessionPathCustomerIdOrKeyRegExpOne)
|
|
5301
5126
|
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
5302
5127
|
zod_1.z.coerce
|
|
5303
5128
|
.string()
|
|
5304
5129
|
.min(1)
|
|
5305
|
-
.max(
|
|
5130
|
+
.max(createCustomerStripePortalSessionPathCustomerIdOrKeyMaxTwo)
|
|
5306
5131
|
.describe('ExternalKey is a looser version of key.'),
|
|
5307
5132
|
]),
|
|
5308
|
-
featureKey: zod_1.z.coerce
|
|
5309
|
-
.string()
|
|
5310
|
-
.min(1)
|
|
5311
|
-
.max(exports.deleteCustomerEntitlementPathFeatureKeyMax)
|
|
5312
|
-
.regex(exports.deleteCustomerEntitlementPathFeatureKeyRegExp),
|
|
5313
5133
|
});
|
|
5134
|
+
exports.createCustomerStripePortalSessionBody = zod_1.z
|
|
5135
|
+
.object({
|
|
5136
|
+
configurationId: zod_1.z.coerce
|
|
5137
|
+
.string()
|
|
5138
|
+
.optional()
|
|
5139
|
+
.describe('The ID of an existing configuration to use for this session,\ndescribing its functionality and features.\nIf not specified, the session uses the default configuration.\n\nSee https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-configuration'),
|
|
5140
|
+
locale: zod_1.z.coerce
|
|
5141
|
+
.string()
|
|
5142
|
+
.optional()
|
|
5143
|
+
.describe('The IETF language tag of the locale customer portal is displayed in.\nIf blank or auto, the customer’s preferred_locales or browser’s locale is used.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-locale'),
|
|
5144
|
+
returnUrl: zod_1.z.coerce
|
|
5145
|
+
.string()
|
|
5146
|
+
.optional()
|
|
5147
|
+
.describe('The URL to redirect the customer to after they have completed\ntheir requested actions.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url'),
|
|
5148
|
+
})
|
|
5149
|
+
.describe('Stripe customer portal request params.');
|
|
5314
5150
|
/**
|
|
5315
|
-
*
|
|
5316
|
-
* @summary List customer
|
|
5151
|
+
* Lists all subscriptions for a customer.
|
|
5152
|
+
* @summary List customer subscriptions
|
|
5317
5153
|
*/
|
|
5318
|
-
exports.
|
|
5319
|
-
exports.listCustomerEntitlementGrantsPathFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5320
|
-
exports.listCustomerEntitlementGrantsParams = zod_1.z.object({
|
|
5154
|
+
exports.listCustomerSubscriptionsParams = zod_1.z.object({
|
|
5321
5155
|
customerIdOrKey: zod_1.z.union([
|
|
5322
5156
|
zod_1.z.coerce
|
|
5323
5157
|
.string()
|
|
5324
|
-
.regex(
|
|
5158
|
+
.regex(listCustomerSubscriptionsPathCustomerIdOrKeyRegExpOne)
|
|
5325
5159
|
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
5326
5160
|
zod_1.z.coerce
|
|
5327
5161
|
.string()
|
|
5328
5162
|
.min(1)
|
|
5329
|
-
.max(
|
|
5163
|
+
.max(listCustomerSubscriptionsPathCustomerIdOrKeyMaxTwo)
|
|
5330
5164
|
.describe('ExternalKey is a looser version of key.'),
|
|
5331
5165
|
]),
|
|
5332
|
-
featureKey: zod_1.z.coerce
|
|
5333
|
-
.string()
|
|
5334
|
-
.min(1)
|
|
5335
|
-
.max(exports.listCustomerEntitlementGrantsPathFeatureKeyMax)
|
|
5336
|
-
.regex(exports.listCustomerEntitlementGrantsPathFeatureKeyRegExp),
|
|
5337
5166
|
});
|
|
5338
|
-
exports.
|
|
5339
|
-
exports.
|
|
5340
|
-
|
|
5341
|
-
|
|
5342
|
-
|
|
5343
|
-
/**
|
|
5344
|
-
* Grants define a behavior of granting usage for a metered entitlement. They can have complicated recurrence and rollover rules, thanks to which you can define a wide range of access patterns with a single grant, in most cases you don't have to periodically create new grants. You can only issue grants for active metered entitlements.
|
|
5345
|
-
|
|
5346
|
-
A grant defines a given amount of usage that can be consumed for the entitlement. The grant is in effect between its effective date and its expiration date. Specifying both is mandatory for new grants.
|
|
5347
|
-
|
|
5348
|
-
Grants have a priority setting that determines their order of use. Lower numbers have higher priority, with 0 being the highest priority.
|
|
5349
|
-
|
|
5350
|
-
Grants can have a recurrence setting intended to automate the manual reissuing of grants. For example, a daily recurrence is equal to reissuing that same grant every day (ignoring rollover settings).
|
|
5351
|
-
|
|
5352
|
-
Rollover settings define what happens to the remaining balance of a grant at a reset. Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
|
|
5353
|
-
|
|
5354
|
-
Grants cannot be changed once created, only deleted. This is to ensure that balance is deterministic regardless of when it is queried.
|
|
5355
|
-
* @summary Create customer entitlement grant
|
|
5356
|
-
*/
|
|
5357
|
-
exports.createCustomerEntitlementGrantPathFeatureKeyMax = 64;
|
|
5358
|
-
exports.createCustomerEntitlementGrantPathFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5359
|
-
exports.createCustomerEntitlementGrantParams = zod_1.z.object({
|
|
5360
|
-
customerIdOrKey: zod_1.z.union([
|
|
5361
|
-
zod_1.z.coerce
|
|
5362
|
-
.string()
|
|
5363
|
-
.regex(createCustomerEntitlementGrantPathCustomerIdOrKeyRegExpOne)
|
|
5364
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
5365
|
-
zod_1.z.coerce
|
|
5366
|
-
.string()
|
|
5367
|
-
.min(1)
|
|
5368
|
-
.max(createCustomerEntitlementGrantPathCustomerIdOrKeyMaxTwo)
|
|
5369
|
-
.describe('ExternalKey is a looser version of key.'),
|
|
5370
|
-
]),
|
|
5371
|
-
featureKey: zod_1.z.coerce
|
|
5372
|
-
.string()
|
|
5373
|
-
.min(1)
|
|
5374
|
-
.max(exports.createCustomerEntitlementGrantPathFeatureKeyMax)
|
|
5375
|
-
.regex(exports.createCustomerEntitlementGrantPathFeatureKeyRegExp),
|
|
5376
|
-
});
|
|
5377
|
-
exports.createCustomerEntitlementGrantBodyAmountMin = 0;
|
|
5378
|
-
exports.createCustomerEntitlementGrantBodyPriorityMax = 255;
|
|
5379
|
-
exports.createCustomerEntitlementGrantBodyExpirationCountMax = 1000;
|
|
5380
|
-
exports.createCustomerEntitlementGrantBodyMaxRolloverAmountDefault = 0;
|
|
5381
|
-
exports.createCustomerEntitlementGrantBodyMinRolloverAmountDefault = 0;
|
|
5382
|
-
exports.createCustomerEntitlementGrantBody = zod_1.z
|
|
5383
|
-
.object({
|
|
5384
|
-
amount: zod_1.z.coerce
|
|
5167
|
+
exports.listCustomerSubscriptionsQueryPageDefault = 1;
|
|
5168
|
+
exports.listCustomerSubscriptionsQueryPageSizeDefault = 100;
|
|
5169
|
+
exports.listCustomerSubscriptionsQueryPageSizeMax = 1000;
|
|
5170
|
+
exports.listCustomerSubscriptionsQueryParams = zod_1.z.object({
|
|
5171
|
+
page: zod_1.z.coerce
|
|
5385
5172
|
.number()
|
|
5386
|
-
.min(
|
|
5387
|
-
.
|
|
5388
|
-
|
|
5389
|
-
|
|
5390
|
-
.describe('Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).'),
|
|
5391
|
-
expiration: zod_1.z
|
|
5392
|
-
.object({
|
|
5393
|
-
count: zod_1.z.coerce
|
|
5394
|
-
.number()
|
|
5395
|
-
.min(1)
|
|
5396
|
-
.max(exports.createCustomerEntitlementGrantBodyExpirationCountMax)
|
|
5397
|
-
.describe('The number of time units in the expiration period.'),
|
|
5398
|
-
duration: zod_1.z
|
|
5399
|
-
.enum(['HOUR', 'DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
5400
|
-
.describe('The expiration duration enum')
|
|
5401
|
-
.describe('The unit of time for the expiration period.'),
|
|
5402
|
-
})
|
|
5403
|
-
.describe('The grant expiration definition')
|
|
5404
|
-
.describe('The grant expiration definition'),
|
|
5405
|
-
maxRolloverAmount: zod_1.z.coerce
|
|
5173
|
+
.min(1)
|
|
5174
|
+
.default(exports.listCustomerSubscriptionsQueryPageDefault)
|
|
5175
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
5176
|
+
pageSize: zod_1.z.coerce
|
|
5406
5177
|
.number()
|
|
5178
|
+
.min(1)
|
|
5179
|
+
.max(exports.listCustomerSubscriptionsQueryPageSizeMax)
|
|
5180
|
+
.default(exports.listCustomerSubscriptionsQueryPageSizeDefault)
|
|
5181
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
5182
|
+
});
|
|
5183
|
+
/**
|
|
5184
|
+
* List all entitlements for all the subjects and features. This endpoint is intended for administrative purposes only.
|
|
5185
|
+
To fetch the entitlements of a specific subject please use the /api/v1/subjects/{subjectKeyOrID}/entitlements endpoint.
|
|
5186
|
+
If page is provided that takes precedence and the paginated response is returned.
|
|
5187
|
+
* @summary List all entitlements
|
|
5188
|
+
*/
|
|
5189
|
+
exports.listEntitlementsQueryExcludeInactiveDefault = false;
|
|
5190
|
+
exports.listEntitlementsQueryPageDefault = 1;
|
|
5191
|
+
exports.listEntitlementsQueryPageSizeDefault = 100;
|
|
5192
|
+
exports.listEntitlementsQueryPageSizeMax = 1000;
|
|
5193
|
+
exports.listEntitlementsQueryOffsetDefault = 0;
|
|
5194
|
+
exports.listEntitlementsQueryOffsetMin = 0;
|
|
5195
|
+
exports.listEntitlementsQueryLimitDefault = 100;
|
|
5196
|
+
exports.listEntitlementsQueryLimitMax = 1000;
|
|
5197
|
+
exports.listEntitlementsQueryParams = zod_1.z.object({
|
|
5198
|
+
entitlementType: zod_1.z
|
|
5199
|
+
.array(zod_1.z
|
|
5200
|
+
.enum(['metered', 'boolean', 'static'])
|
|
5201
|
+
.describe('Type of the entitlement.'))
|
|
5407
5202
|
.optional()
|
|
5408
|
-
.describe('
|
|
5409
|
-
|
|
5410
|
-
.
|
|
5411
|
-
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
5203
|
+
.describe('Filtering by multiple entitlement types.\n\nUsage: `?entitlementType=metered&entitlementType=boolean`'),
|
|
5204
|
+
excludeInactive: zod_1.z.coerce
|
|
5205
|
+
.boolean()
|
|
5412
5206
|
.optional()
|
|
5413
|
-
.describe('
|
|
5414
|
-
|
|
5415
|
-
.
|
|
5207
|
+
.describe('Exclude inactive entitlements in the response (those scheduled for later or earlier)'),
|
|
5208
|
+
feature: zod_1.z
|
|
5209
|
+
.array(zod_1.z.coerce.string())
|
|
5416
5210
|
.optional()
|
|
5417
|
-
.describe('
|
|
5418
|
-
|
|
5211
|
+
.describe('Filtering by multiple features.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
5212
|
+
limit: zod_1.z.coerce
|
|
5419
5213
|
.number()
|
|
5420
5214
|
.min(1)
|
|
5421
|
-
.max(exports.
|
|
5215
|
+
.max(exports.listEntitlementsQueryLimitMax)
|
|
5216
|
+
.default(exports.listEntitlementsQueryLimitDefault)
|
|
5217
|
+
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
5218
|
+
offset: zod_1.z.coerce
|
|
5219
|
+
.number()
|
|
5220
|
+
.min(exports.listEntitlementsQueryOffsetMin)
|
|
5422
5221
|
.optional()
|
|
5423
|
-
.describe('
|
|
5424
|
-
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
.date()
|
|
5428
|
-
.optional()
|
|
5429
|
-
.describe('A date-time anchor to base the recurring period on.'),
|
|
5430
|
-
interval: zod_1.z
|
|
5431
|
-
.union([
|
|
5432
|
-
zod_1.z.coerce.string(),
|
|
5433
|
-
zod_1.z
|
|
5434
|
-
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
5435
|
-
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
5436
|
-
])
|
|
5437
|
-
.describe('Period duration for the recurrence')
|
|
5438
|
-
.describe('The unit of time for the interval.'),
|
|
5439
|
-
})
|
|
5440
|
-
.describe('Recurring period with an interval and an anchor.')
|
|
5222
|
+
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
5223
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
5224
|
+
orderBy: zod_1.z
|
|
5225
|
+
.enum(['createdAt', 'updatedAt'])
|
|
5441
5226
|
.optional()
|
|
5442
|
-
.describe('The
|
|
5443
|
-
|
|
5444
|
-
|
|
5227
|
+
.describe('The order by field.'),
|
|
5228
|
+
page: zod_1.z.coerce
|
|
5229
|
+
.number()
|
|
5230
|
+
.min(1)
|
|
5231
|
+
.default(exports.listEntitlementsQueryPageDefault)
|
|
5232
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
5233
|
+
pageSize: zod_1.z.coerce
|
|
5234
|
+
.number()
|
|
5235
|
+
.min(1)
|
|
5236
|
+
.max(exports.listEntitlementsQueryPageSizeMax)
|
|
5237
|
+
.default(exports.listEntitlementsQueryPageSizeDefault)
|
|
5238
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
5239
|
+
subject: zod_1.z
|
|
5240
|
+
.array(zod_1.z.coerce.string())
|
|
5241
|
+
.optional()
|
|
5242
|
+
.describe('Filtering by multiple subjects.\n\nUsage: `?subject=customer-1&subject=customer-2`'),
|
|
5243
|
+
});
|
|
5445
5244
|
/**
|
|
5446
|
-
*
|
|
5447
|
-
|
|
5448
|
-
|
|
5245
|
+
* Get entitlement by id.
|
|
5246
|
+
* @summary Get entitlement by id
|
|
5247
|
+
*/
|
|
5248
|
+
exports.getEntitlementByIdPathEntitlementIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
5249
|
+
exports.getEntitlementByIdParams = zod_1.z.object({
|
|
5250
|
+
entitlementId: zod_1.z.coerce
|
|
5251
|
+
.string()
|
|
5252
|
+
.regex(exports.getEntitlementByIdPathEntitlementIdRegExp),
|
|
5253
|
+
});
|
|
5254
|
+
/**
|
|
5255
|
+
* List ingested events within a time range.
|
|
5449
5256
|
|
|
5450
|
-
|
|
5451
|
-
* @summary
|
|
5257
|
+
If the from query param is not provided it defaults to last 72 hours.
|
|
5258
|
+
* @summary List ingested events
|
|
5452
5259
|
*/
|
|
5453
|
-
exports.
|
|
5454
|
-
exports.
|
|
5455
|
-
exports.
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
|
|
5459
|
-
.regex(getCustomerEntitlementHistoryPathCustomerIdOrKeyRegExpOne)
|
|
5460
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
5461
|
-
zod_1.z.coerce
|
|
5462
|
-
.string()
|
|
5463
|
-
.min(1)
|
|
5464
|
-
.max(getCustomerEntitlementHistoryPathCustomerIdOrKeyMaxTwo)
|
|
5465
|
-
.describe('ExternalKey is a looser version of key.'),
|
|
5466
|
-
]),
|
|
5467
|
-
featureKey: zod_1.z.coerce
|
|
5260
|
+
exports.listEventsQueryClientIdMax = 36;
|
|
5261
|
+
exports.listEventsQueryCustomerIdItemRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
5262
|
+
exports.listEventsQueryLimitDefault = 100;
|
|
5263
|
+
exports.listEventsQueryLimitMax = 100;
|
|
5264
|
+
exports.listEventsQueryParams = zod_1.z.object({
|
|
5265
|
+
clientId: zod_1.z.coerce
|
|
5468
5266
|
.string()
|
|
5469
5267
|
.min(1)
|
|
5470
|
-
.max(exports.
|
|
5471
|
-
.
|
|
5472
|
-
|
|
5473
|
-
|
|
5474
|
-
|
|
5268
|
+
.max(exports.listEventsQueryClientIdMax)
|
|
5269
|
+
.optional()
|
|
5270
|
+
.describe('Client ID\nUseful to track progress of a query.'),
|
|
5271
|
+
customerId: zod_1.z
|
|
5272
|
+
.array(zod_1.z.coerce
|
|
5273
|
+
.string()
|
|
5274
|
+
.regex(exports.listEventsQueryCustomerIdItemRegExp)
|
|
5275
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
5276
|
+
.optional()
|
|
5277
|
+
.describe('The event customer ID.'),
|
|
5475
5278
|
from: zod_1.z.coerce
|
|
5476
5279
|
.date()
|
|
5477
5280
|
.optional()
|
|
5478
|
-
.describe('Start
|
|
5479
|
-
|
|
5281
|
+
.describe('Start date-time in RFC 3339 format.\n\nInclusive.'),
|
|
5282
|
+
id: zod_1.z.coerce
|
|
5283
|
+
.string()
|
|
5284
|
+
.optional()
|
|
5285
|
+
.describe('The event ID.\n\nAccepts partial ID.'),
|
|
5286
|
+
ingestedAtFrom: zod_1.z.coerce
|
|
5480
5287
|
.date()
|
|
5481
5288
|
.optional()
|
|
5482
|
-
.describe('
|
|
5483
|
-
|
|
5484
|
-
.
|
|
5485
|
-
.
|
|
5486
|
-
|
|
5289
|
+
.describe('Start date-time in RFC 3339 format.\n\nInclusive.'),
|
|
5290
|
+
ingestedAtTo: zod_1.z.coerce
|
|
5291
|
+
.date()
|
|
5292
|
+
.optional()
|
|
5293
|
+
.describe('End date-time in RFC 3339 format.\n\nInclusive.'),
|
|
5294
|
+
limit: zod_1.z.coerce
|
|
5295
|
+
.number()
|
|
5296
|
+
.min(1)
|
|
5297
|
+
.max(exports.listEventsQueryLimitMax)
|
|
5298
|
+
.default(exports.listEventsQueryLimitDefault)
|
|
5299
|
+
.describe('Number of events to return.'),
|
|
5300
|
+
subject: zod_1.z.coerce
|
|
5487
5301
|
.string()
|
|
5488
|
-
.
|
|
5489
|
-
.describe('The
|
|
5302
|
+
.optional()
|
|
5303
|
+
.describe('The event subject.\n\nAccepts partial subject.'),
|
|
5304
|
+
to: zod_1.z.coerce
|
|
5305
|
+
.date()
|
|
5306
|
+
.optional()
|
|
5307
|
+
.describe('End date-time in RFC 3339 format.\n\nInclusive.'),
|
|
5490
5308
|
});
|
|
5491
5309
|
/**
|
|
5492
|
-
*
|
|
5493
|
-
|
|
5494
|
-
This endpoint is useful for upgrades, downgrades, or other changes to entitlements that require a new entitlement to be created with zero downtime.
|
|
5495
|
-
* @summary Override customer entitlement
|
|
5310
|
+
* Ingests an event or batch of events following the CloudEvents specification.
|
|
5311
|
+
* @summary Ingest events
|
|
5496
5312
|
*/
|
|
5497
|
-
exports.
|
|
5498
|
-
exports.
|
|
5499
|
-
exports.
|
|
5500
|
-
customerIdOrKey: zod_1.z.union([
|
|
5501
|
-
zod_1.z.coerce
|
|
5502
|
-
.string()
|
|
5503
|
-
.regex(overrideCustomerEntitlementPathCustomerIdOrKeyRegExpOne)
|
|
5504
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
5505
|
-
zod_1.z.coerce
|
|
5506
|
-
.string()
|
|
5507
|
-
.min(1)
|
|
5508
|
-
.max(overrideCustomerEntitlementPathCustomerIdOrKeyMaxTwo)
|
|
5509
|
-
.describe('ExternalKey is a looser version of key.'),
|
|
5510
|
-
]),
|
|
5511
|
-
featureKey: zod_1.z.coerce
|
|
5512
|
-
.string()
|
|
5513
|
-
.min(1)
|
|
5514
|
-
.max(exports.overrideCustomerEntitlementPathFeatureKeyMax)
|
|
5515
|
-
.regex(exports.overrideCustomerEntitlementPathFeatureKeyRegExp),
|
|
5516
|
-
});
|
|
5517
|
-
exports.overrideCustomerEntitlementBodyFeatureKeyMax = 64;
|
|
5518
|
-
exports.overrideCustomerEntitlementBodyFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5519
|
-
exports.overrideCustomerEntitlementBodyFeatureIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
5520
|
-
exports.overrideCustomerEntitlementBodyIsSoftLimitDefault = false;
|
|
5521
|
-
exports.overrideCustomerEntitlementBodyIsUnlimitedDefault = false;
|
|
5522
|
-
exports.overrideCustomerEntitlementBodyIssueAfterResetMin = 0;
|
|
5523
|
-
exports.overrideCustomerEntitlementBodyIssueAfterResetPriorityDefault = 1;
|
|
5524
|
-
exports.overrideCustomerEntitlementBodyIssueAfterResetPriorityMax = 255;
|
|
5525
|
-
exports.overrideCustomerEntitlementBodyPreserveOverageAtResetDefault = false;
|
|
5526
|
-
exports.overrideCustomerEntitlementBodyFeatureKeyMaxOne = 64;
|
|
5527
|
-
exports.overrideCustomerEntitlementBodyFeatureKeyRegExpOne = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5528
|
-
exports.overrideCustomerEntitlementBodyFeatureIdRegExpOne = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
5529
|
-
exports.overrideCustomerEntitlementBodyFeatureKeyMaxTwo = 64;
|
|
5530
|
-
exports.overrideCustomerEntitlementBodyFeatureKeyRegExpTwo = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5531
|
-
exports.overrideCustomerEntitlementBodyFeatureIdRegExpTwo = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
5532
|
-
exports.overrideCustomerEntitlementBody = zod_1.z
|
|
5313
|
+
exports.ingestEventsBodySpecversionDefault = '1.0';
|
|
5314
|
+
exports.ingestEventsBodyItemSpecversionDefault = '1.0';
|
|
5315
|
+
exports.ingestEventsBody = zod_1.z
|
|
5533
5316
|
.union([
|
|
5534
5317
|
zod_1.z
|
|
5535
5318
|
.object({
|
|
5536
|
-
|
|
5319
|
+
data: zod_1.z
|
|
5320
|
+
.record(zod_1.z.string(), zod_1.z.any())
|
|
5321
|
+
.nullish()
|
|
5322
|
+
.describe('The event payload.\nOptional, if present it must be a JSON object.'),
|
|
5323
|
+
datacontenttype: zod_1.z
|
|
5324
|
+
.enum(['application/json'])
|
|
5325
|
+
.nullish()
|
|
5326
|
+
.describe('Content type of the CloudEvents data value. Only the value \"application/json\" is allowed over HTTP.'),
|
|
5327
|
+
dataschema: zod_1.z.coerce
|
|
5537
5328
|
.string()
|
|
5538
|
-
.
|
|
5539
|
-
.
|
|
5540
|
-
.
|
|
5541
|
-
|
|
5329
|
+
.url()
|
|
5330
|
+
.min(1)
|
|
5331
|
+
.nullish()
|
|
5332
|
+
.describe('Identifies the schema that data adheres to.'),
|
|
5333
|
+
id: zod_1.z.coerce.string().min(1).describe('Identifies the event.'),
|
|
5334
|
+
source: zod_1.z.coerce
|
|
5542
5335
|
.string()
|
|
5543
5336
|
.min(1)
|
|
5544
|
-
.
|
|
5545
|
-
|
|
5546
|
-
.
|
|
5547
|
-
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
5548
|
-
isSoftLimit: zod_1.z.coerce
|
|
5549
|
-
.boolean()
|
|
5550
|
-
.optional()
|
|
5551
|
-
.describe('If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.'),
|
|
5552
|
-
issueAfterReset: zod_1.z.coerce
|
|
5553
|
-
.number()
|
|
5554
|
-
.min(exports.overrideCustomerEntitlementBodyIssueAfterResetMin)
|
|
5555
|
-
.optional()
|
|
5556
|
-
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the \"amount\", \"minRolloverAmount\", and \"maxRolloverAmount\" fields all be the same.'),
|
|
5557
|
-
issueAfterResetPriority: zod_1.z.coerce
|
|
5558
|
-
.number()
|
|
5337
|
+
.describe('Identifies the context in which an event happened.'),
|
|
5338
|
+
specversion: zod_1.z.coerce
|
|
5339
|
+
.string()
|
|
5559
5340
|
.min(1)
|
|
5560
|
-
.
|
|
5561
|
-
|
|
5562
|
-
.
|
|
5563
|
-
|
|
5564
|
-
.
|
|
5565
|
-
|
|
5566
|
-
.
|
|
5567
|
-
|
|
5568
|
-
.
|
|
5569
|
-
|
|
5570
|
-
|
|
5571
|
-
|
|
5572
|
-
|
|
5573
|
-
.date()
|
|
5574
|
-
.describe('[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.'),
|
|
5575
|
-
])
|
|
5576
|
-
.describe('Measure usage from')
|
|
5577
|
-
.optional()
|
|
5578
|
-
.describe('Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time.'),
|
|
5579
|
-
metadata: zod_1.z
|
|
5580
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
5581
|
-
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
5582
|
-
.optional()
|
|
5583
|
-
.describe('Additional metadata for the feature.'),
|
|
5584
|
-
preserveOverageAtReset: zod_1.z.coerce
|
|
5585
|
-
.boolean()
|
|
5586
|
-
.optional()
|
|
5587
|
-
.describe('If true, the overage is preserved at reset. If false, the usage is reset to 0.'),
|
|
5588
|
-
type: zod_1.z.enum(['metered']),
|
|
5589
|
-
usagePeriod: zod_1.z
|
|
5590
|
-
.object({
|
|
5591
|
-
anchor: zod_1.z.coerce
|
|
5592
|
-
.date()
|
|
5593
|
-
.optional()
|
|
5594
|
-
.describe('A date-time anchor to base the recurring period on.'),
|
|
5595
|
-
interval: zod_1.z
|
|
5596
|
-
.union([
|
|
5597
|
-
zod_1.z.coerce.string(),
|
|
5598
|
-
zod_1.z
|
|
5599
|
-
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
5600
|
-
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
5601
|
-
])
|
|
5602
|
-
.describe('Period duration for the recurrence')
|
|
5603
|
-
.describe('The unit of time for the interval.'),
|
|
5604
|
-
})
|
|
5605
|
-
.describe('Recurring period with an interval and an anchor.')
|
|
5606
|
-
.describe('The usage period associated with the entitlement.'),
|
|
5341
|
+
.describe('The version of the CloudEvents specification which the event uses.'),
|
|
5342
|
+
subject: zod_1.z.coerce
|
|
5343
|
+
.string()
|
|
5344
|
+
.min(1)
|
|
5345
|
+
.describe('Describes the subject of the event in the context of the event producer (identified by source).'),
|
|
5346
|
+
time: zod_1.z.coerce
|
|
5347
|
+
.date()
|
|
5348
|
+
.nullish()
|
|
5349
|
+
.describe('Timestamp of when the occurrence happened. Must adhere to RFC 3339.'),
|
|
5350
|
+
type: zod_1.z.coerce
|
|
5351
|
+
.string()
|
|
5352
|
+
.min(1)
|
|
5353
|
+
.describe('Contains a value describing the type of event related to the originating occurrence.'),
|
|
5607
5354
|
})
|
|
5608
|
-
.describe('
|
|
5609
|
-
zod_1.z
|
|
5355
|
+
.describe('CloudEvents Specification JSON Schema\n\nOptional properties are nullable according to the CloudEvents specification:\nOPTIONAL not omitted attributes MAY be represented as a null JSON value.'),
|
|
5356
|
+
zod_1.z.array(zod_1.z
|
|
5610
5357
|
.object({
|
|
5611
|
-
|
|
5358
|
+
data: zod_1.z
|
|
5359
|
+
.record(zod_1.z.string(), zod_1.z.any())
|
|
5360
|
+
.nullish()
|
|
5361
|
+
.describe('The event payload.\nOptional, if present it must be a JSON object.'),
|
|
5362
|
+
datacontenttype: zod_1.z
|
|
5363
|
+
.enum(['application/json'])
|
|
5364
|
+
.nullish()
|
|
5365
|
+
.describe('Content type of the CloudEvents data value. Only the value \"application/json\" is allowed over HTTP.'),
|
|
5366
|
+
dataschema: zod_1.z.coerce
|
|
5612
5367
|
.string()
|
|
5613
|
-
.
|
|
5614
|
-
|
|
5368
|
+
.url()
|
|
5369
|
+
.min(1)
|
|
5370
|
+
.nullish()
|
|
5371
|
+
.describe('Identifies the schema that data adheres to.'),
|
|
5372
|
+
id: zod_1.z.coerce.string().min(1).describe('Identifies the event.'),
|
|
5373
|
+
source: zod_1.z.coerce
|
|
5615
5374
|
.string()
|
|
5616
|
-
.
|
|
5617
|
-
.
|
|
5618
|
-
|
|
5619
|
-
featureKey: zod_1.z.coerce
|
|
5375
|
+
.min(1)
|
|
5376
|
+
.describe('Identifies the context in which an event happened.'),
|
|
5377
|
+
specversion: zod_1.z.coerce
|
|
5620
5378
|
.string()
|
|
5621
5379
|
.min(1)
|
|
5622
|
-
.
|
|
5623
|
-
|
|
5624
|
-
.optional()
|
|
5625
|
-
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
5626
|
-
metadata: zod_1.z
|
|
5627
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
5628
|
-
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
5629
|
-
.optional()
|
|
5630
|
-
.describe('Additional metadata for the feature.'),
|
|
5631
|
-
type: zod_1.z.enum(['static']),
|
|
5632
|
-
usagePeriod: zod_1.z
|
|
5633
|
-
.object({
|
|
5634
|
-
anchor: zod_1.z.coerce
|
|
5635
|
-
.date()
|
|
5636
|
-
.optional()
|
|
5637
|
-
.describe('A date-time anchor to base the recurring period on.'),
|
|
5638
|
-
interval: zod_1.z
|
|
5639
|
-
.union([
|
|
5640
|
-
zod_1.z.coerce.string(),
|
|
5641
|
-
zod_1.z
|
|
5642
|
-
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
5643
|
-
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
5644
|
-
])
|
|
5645
|
-
.describe('Period duration for the recurrence')
|
|
5646
|
-
.describe('The unit of time for the interval.'),
|
|
5647
|
-
})
|
|
5648
|
-
.describe('Recurring period with an interval and an anchor.')
|
|
5649
|
-
.optional()
|
|
5650
|
-
.describe('The usage period associated with the entitlement.'),
|
|
5651
|
-
})
|
|
5652
|
-
.describe('Create inputs for static entitlement'),
|
|
5653
|
-
zod_1.z
|
|
5654
|
-
.object({
|
|
5655
|
-
featureId: zod_1.z.coerce
|
|
5380
|
+
.describe('The version of the CloudEvents specification which the event uses.'),
|
|
5381
|
+
subject: zod_1.z.coerce
|
|
5656
5382
|
.string()
|
|
5657
|
-
.
|
|
5658
|
-
.
|
|
5659
|
-
|
|
5660
|
-
|
|
5383
|
+
.min(1)
|
|
5384
|
+
.describe('Describes the subject of the event in the context of the event producer (identified by source).'),
|
|
5385
|
+
time: zod_1.z.coerce
|
|
5386
|
+
.date()
|
|
5387
|
+
.nullish()
|
|
5388
|
+
.describe('Timestamp of when the occurrence happened. Must adhere to RFC 3339.'),
|
|
5389
|
+
type: zod_1.z.coerce
|
|
5661
5390
|
.string()
|
|
5662
5391
|
.min(1)
|
|
5663
|
-
.
|
|
5664
|
-
.regex(exports.overrideCustomerEntitlementBodyFeatureKeyRegExpTwo)
|
|
5665
|
-
.optional()
|
|
5666
|
-
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
5667
|
-
metadata: zod_1.z
|
|
5668
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
5669
|
-
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
5670
|
-
.optional()
|
|
5671
|
-
.describe('Additional metadata for the feature.'),
|
|
5672
|
-
type: zod_1.z.enum(['boolean']),
|
|
5673
|
-
usagePeriod: zod_1.z
|
|
5674
|
-
.object({
|
|
5675
|
-
anchor: zod_1.z.coerce
|
|
5676
|
-
.date()
|
|
5677
|
-
.optional()
|
|
5678
|
-
.describe('A date-time anchor to base the recurring period on.'),
|
|
5679
|
-
interval: zod_1.z
|
|
5680
|
-
.union([
|
|
5681
|
-
zod_1.z.coerce.string(),
|
|
5682
|
-
zod_1.z
|
|
5683
|
-
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
5684
|
-
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
5685
|
-
])
|
|
5686
|
-
.describe('Period duration for the recurrence')
|
|
5687
|
-
.describe('The unit of time for the interval.'),
|
|
5688
|
-
})
|
|
5689
|
-
.describe('Recurring period with an interval and an anchor.')
|
|
5690
|
-
.optional()
|
|
5691
|
-
.describe('The usage period associated with the entitlement.'),
|
|
5392
|
+
.describe('Contains a value describing the type of event related to the originating occurrence.'),
|
|
5692
5393
|
})
|
|
5693
|
-
.describe('
|
|
5394
|
+
.describe('CloudEvents Specification JSON Schema\n\nOptional properties are nullable according to the CloudEvents specification:\nOPTIONAL not omitted attributes MAY be represented as a null JSON value.')),
|
|
5694
5395
|
])
|
|
5695
|
-
.describe('
|
|
5396
|
+
.describe('The body of the events request.\nEither a single event or a batch of events.');
|
|
5696
5397
|
/**
|
|
5697
|
-
*
|
|
5698
|
-
|
|
5699
|
-
Usage is automatically reset for metered entitlements based on their usage period, but this endpoint allows to manually reset it at any time. When doing so the period anchor of the entitlement can be changed if needed.
|
|
5700
|
-
* @summary Reset customer entitlement
|
|
5398
|
+
* List features.
|
|
5399
|
+
* @summary List features
|
|
5701
5400
|
*/
|
|
5702
|
-
exports.
|
|
5703
|
-
exports.
|
|
5704
|
-
exports.
|
|
5705
|
-
|
|
5706
|
-
|
|
5707
|
-
|
|
5708
|
-
|
|
5709
|
-
|
|
5710
|
-
|
|
5711
|
-
|
|
5712
|
-
|
|
5713
|
-
|
|
5714
|
-
|
|
5715
|
-
|
|
5716
|
-
|
|
5717
|
-
.string()
|
|
5401
|
+
exports.listFeaturesQueryIncludeArchivedDefault = false;
|
|
5402
|
+
exports.listFeaturesQueryPageDefault = 1;
|
|
5403
|
+
exports.listFeaturesQueryPageSizeDefault = 100;
|
|
5404
|
+
exports.listFeaturesQueryPageSizeMax = 1000;
|
|
5405
|
+
exports.listFeaturesQueryOffsetDefault = 0;
|
|
5406
|
+
exports.listFeaturesQueryOffsetMin = 0;
|
|
5407
|
+
exports.listFeaturesQueryLimitDefault = 100;
|
|
5408
|
+
exports.listFeaturesQueryLimitMax = 1000;
|
|
5409
|
+
exports.listFeaturesQueryParams = zod_1.z.object({
|
|
5410
|
+
includeArchived: zod_1.z.coerce
|
|
5411
|
+
.boolean()
|
|
5412
|
+
.optional()
|
|
5413
|
+
.describe('Filter by meterGroupByFilters'),
|
|
5414
|
+
limit: zod_1.z.coerce
|
|
5415
|
+
.number()
|
|
5718
5416
|
.min(1)
|
|
5719
|
-
.max(exports.
|
|
5720
|
-
.
|
|
5721
|
-
|
|
5722
|
-
|
|
5723
|
-
|
|
5724
|
-
effectiveAt: zod_1.z.coerce
|
|
5725
|
-
.date()
|
|
5417
|
+
.max(exports.listFeaturesQueryLimitMax)
|
|
5418
|
+
.default(exports.listFeaturesQueryLimitDefault)
|
|
5419
|
+
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
5420
|
+
meterSlug: zod_1.z
|
|
5421
|
+
.array(zod_1.z.coerce.string())
|
|
5726
5422
|
.optional()
|
|
5727
|
-
.describe('
|
|
5728
|
-
|
|
5729
|
-
.
|
|
5423
|
+
.describe('Filter by meterSlug'),
|
|
5424
|
+
offset: zod_1.z.coerce
|
|
5425
|
+
.number()
|
|
5426
|
+
.min(exports.listFeaturesQueryOffsetMin)
|
|
5730
5427
|
.optional()
|
|
5731
|
-
.describe(
|
|
5732
|
-
|
|
5733
|
-
|
|
5428
|
+
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
5429
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
5430
|
+
orderBy: zod_1.z
|
|
5431
|
+
.enum(['id', 'key', 'name', 'createdAt', 'updatedAt'])
|
|
5734
5432
|
.optional()
|
|
5735
|
-
.describe('
|
|
5736
|
-
|
|
5737
|
-
|
|
5433
|
+
.describe('The order by field.'),
|
|
5434
|
+
page: zod_1.z.coerce
|
|
5435
|
+
.number()
|
|
5436
|
+
.min(1)
|
|
5437
|
+
.default(exports.listFeaturesQueryPageDefault)
|
|
5438
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
5439
|
+
pageSize: zod_1.z.coerce
|
|
5440
|
+
.number()
|
|
5441
|
+
.min(1)
|
|
5442
|
+
.max(exports.listFeaturesQueryPageSizeMax)
|
|
5443
|
+
.default(exports.listFeaturesQueryPageSizeDefault)
|
|
5444
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
5445
|
+
});
|
|
5738
5446
|
/**
|
|
5739
|
-
*
|
|
5740
|
-
|
|
5447
|
+
* Features are either metered or static. A feature is metered if meterSlug is provided at creation.
|
|
5448
|
+
For metered features you can pass additional filters that will be applied when calculating feature usage, based on the meter's groupBy fields.
|
|
5449
|
+
Only meters with SUM and COUNT aggregation are supported for features.
|
|
5450
|
+
Features cannot be updated later, only archived.
|
|
5451
|
+
* @summary Create feature
|
|
5741
5452
|
*/
|
|
5742
|
-
exports.
|
|
5743
|
-
exports.
|
|
5744
|
-
exports.
|
|
5745
|
-
|
|
5746
|
-
|
|
5747
|
-
|
|
5748
|
-
|
|
5749
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
5750
|
-
zod_1.z.coerce
|
|
5751
|
-
.string()
|
|
5752
|
-
.min(1)
|
|
5753
|
-
.max(getCustomerEntitlementValuePathCustomerIdOrKeyMaxTwo)
|
|
5754
|
-
.describe('ExternalKey is a looser version of key.'),
|
|
5755
|
-
]),
|
|
5756
|
-
featureKey: zod_1.z.coerce
|
|
5453
|
+
exports.createFeatureBodyKeyMax = 64;
|
|
5454
|
+
exports.createFeatureBodyKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5455
|
+
exports.createFeatureBodyMeterSlugMax = 64;
|
|
5456
|
+
exports.createFeatureBodyMeterSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5457
|
+
exports.createFeatureBody = zod_1.z
|
|
5458
|
+
.object({
|
|
5459
|
+
key: zod_1.z.coerce
|
|
5757
5460
|
.string()
|
|
5758
5461
|
.min(1)
|
|
5759
|
-
.max(exports.
|
|
5760
|
-
.regex(exports.
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5766
|
-
|
|
5767
|
-
|
|
5768
|
-
|
|
5769
|
-
|
|
5770
|
-
|
|
5771
|
-
customerIdOrKey: zod_1.z.union([
|
|
5772
|
-
zod_1.z.coerce
|
|
5773
|
-
.string()
|
|
5774
|
-
.regex(getCustomerStripeAppDataPathCustomerIdOrKeyRegExpOne)
|
|
5775
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
5776
|
-
zod_1.z.coerce
|
|
5777
|
-
.string()
|
|
5778
|
-
.min(1)
|
|
5779
|
-
.max(getCustomerStripeAppDataPathCustomerIdOrKeyMaxTwo)
|
|
5780
|
-
.describe('ExternalKey is a looser version of key.'),
|
|
5781
|
-
]),
|
|
5782
|
-
});
|
|
5783
|
-
/**
|
|
5784
|
-
* Upsert stripe app data for a customer.
|
|
5785
|
-
Only updates data if the customer billing profile is linked to a stripe app.
|
|
5786
|
-
* @summary Upsert customer stripe app data
|
|
5787
|
-
*/
|
|
5788
|
-
exports.upsertCustomerStripeAppDataParams = zod_1.z.object({
|
|
5789
|
-
customerIdOrKey: zod_1.z.union([
|
|
5790
|
-
zod_1.z.coerce
|
|
5791
|
-
.string()
|
|
5792
|
-
.regex(upsertCustomerStripeAppDataPathCustomerIdOrKeyRegExpOne)
|
|
5793
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
5794
|
-
zod_1.z.coerce
|
|
5795
|
-
.string()
|
|
5796
|
-
.min(1)
|
|
5797
|
-
.max(upsertCustomerStripeAppDataPathCustomerIdOrKeyMaxTwo)
|
|
5798
|
-
.describe('ExternalKey is a looser version of key.'),
|
|
5799
|
-
]),
|
|
5800
|
-
});
|
|
5801
|
-
exports.upsertCustomerStripeAppDataBody = zod_1.z
|
|
5802
|
-
.object({
|
|
5803
|
-
stripeCustomerId: zod_1.z.coerce.string().describe('The Stripe customer ID.'),
|
|
5804
|
-
stripeDefaultPaymentMethodId: zod_1.z.coerce
|
|
5462
|
+
.max(exports.createFeatureBodyKeyMax)
|
|
5463
|
+
.regex(exports.createFeatureBodyKeyRegExp)
|
|
5464
|
+
.describe('A key is a unique string that is used to identify a resource.'),
|
|
5465
|
+
metadata: zod_1.z
|
|
5466
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
5467
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
5468
|
+
.optional(),
|
|
5469
|
+
meterGroupByFilters: zod_1.z
|
|
5470
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
5471
|
+
.optional()
|
|
5472
|
+
.describe('Optional meter group by filters.\nUseful if the meter scope is broader than what feature tracks.\nExample scenario would be a meter tracking all token use with groupBy fields for the model,\nthen the feature could filter for model=gpt-4.'),
|
|
5473
|
+
meterSlug: zod_1.z.coerce
|
|
5805
5474
|
.string()
|
|
5475
|
+
.min(1)
|
|
5476
|
+
.max(exports.createFeatureBodyMeterSlugMax)
|
|
5477
|
+
.regex(exports.createFeatureBodyMeterSlugRegExp)
|
|
5806
5478
|
.optional()
|
|
5807
|
-
.describe('
|
|
5479
|
+
.describe('A key is a unique string that is used to identify a resource.'),
|
|
5480
|
+
name: zod_1.z.coerce.string(),
|
|
5808
5481
|
})
|
|
5809
|
-
.describe('
|
|
5482
|
+
.describe('Represents a feature that can be enabled or disabled for a plan.\nUsed both for product catalog and entitlements.');
|
|
5810
5483
|
/**
|
|
5811
|
-
*
|
|
5812
|
-
|
|
5813
|
-
|
|
5814
|
-
Useful to redirect the customer to the Stripe customer portal to manage their payment methods,
|
|
5815
|
-
change their billing address and access their invoice history.
|
|
5816
|
-
* @summary Create Stripe customer portal session
|
|
5484
|
+
* Get a feature by ID.
|
|
5485
|
+
* @summary Get feature
|
|
5817
5486
|
*/
|
|
5818
|
-
exports.
|
|
5819
|
-
|
|
5820
|
-
zod_1.z.coerce
|
|
5821
|
-
.string()
|
|
5822
|
-
.regex(createCustomerStripePortalSessionPathCustomerIdOrKeyRegExpOne)
|
|
5823
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
5824
|
-
zod_1.z.coerce
|
|
5825
|
-
.string()
|
|
5826
|
-
.min(1)
|
|
5827
|
-
.max(createCustomerStripePortalSessionPathCustomerIdOrKeyMaxTwo)
|
|
5828
|
-
.describe('ExternalKey is a looser version of key.'),
|
|
5829
|
-
]),
|
|
5487
|
+
exports.getFeatureParams = zod_1.z.object({
|
|
5488
|
+
featureId: zod_1.z.coerce.string(),
|
|
5830
5489
|
});
|
|
5831
|
-
exports.createCustomerStripePortalSessionBody = zod_1.z
|
|
5832
|
-
.object({
|
|
5833
|
-
configurationId: zod_1.z.coerce
|
|
5834
|
-
.string()
|
|
5835
|
-
.optional()
|
|
5836
|
-
.describe('The ID of an existing configuration to use for this session,\ndescribing its functionality and features.\nIf not specified, the session uses the default configuration.\n\nSee https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-configuration'),
|
|
5837
|
-
locale: zod_1.z.coerce
|
|
5838
|
-
.string()
|
|
5839
|
-
.optional()
|
|
5840
|
-
.describe('The IETF language tag of the locale customer portal is displayed in.\nIf blank or auto, the customer’s preferred_locales or browser’s locale is used.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-locale'),
|
|
5841
|
-
returnUrl: zod_1.z.coerce
|
|
5842
|
-
.string()
|
|
5843
|
-
.optional()
|
|
5844
|
-
.describe('The URL to redirect the customer to after they have completed\ntheir requested actions.\n\nSee: https://docs.stripe.com/api/customer_portal/sessions/create#create_portal_session-return_url'),
|
|
5845
|
-
})
|
|
5846
|
-
.describe('Stripe customer portal request params.');
|
|
5847
5490
|
/**
|
|
5848
|
-
*
|
|
5849
|
-
|
|
5491
|
+
* Archive a feature by ID.
|
|
5492
|
+
|
|
5493
|
+
Once a feature is archived it cannot be unarchived. If a feature is archived, new entitlements cannot be created for it, but archiving the feature does not affect existing entitlements.
|
|
5494
|
+
This means, if you want to create a new feature with the same key, and then create entitlements for it, the previous entitlements have to be deleted first on a per subject basis.
|
|
5495
|
+
* @summary Delete feature
|
|
5850
5496
|
*/
|
|
5851
|
-
exports.
|
|
5852
|
-
|
|
5853
|
-
zod_1.z.coerce
|
|
5854
|
-
.string()
|
|
5855
|
-
.regex(listCustomerSubscriptionsPathCustomerIdOrKeyRegExpOne)
|
|
5856
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
5857
|
-
zod_1.z.coerce
|
|
5858
|
-
.string()
|
|
5859
|
-
.min(1)
|
|
5860
|
-
.max(listCustomerSubscriptionsPathCustomerIdOrKeyMaxTwo)
|
|
5861
|
-
.describe('ExternalKey is a looser version of key.'),
|
|
5862
|
-
]),
|
|
5863
|
-
});
|
|
5864
|
-
exports.listCustomerSubscriptionsQueryPageDefault = 1;
|
|
5865
|
-
exports.listCustomerSubscriptionsQueryPageSizeDefault = 100;
|
|
5866
|
-
exports.listCustomerSubscriptionsQueryPageSizeMax = 1000;
|
|
5867
|
-
exports.listCustomerSubscriptionsQueryParams = zod_1.z.object({
|
|
5868
|
-
page: zod_1.z.coerce
|
|
5869
|
-
.number()
|
|
5870
|
-
.min(1)
|
|
5871
|
-
.default(exports.listCustomerSubscriptionsQueryPageDefault)
|
|
5872
|
-
.describe('Page index.\n\nDefault is 1.'),
|
|
5873
|
-
pageSize: zod_1.z.coerce
|
|
5874
|
-
.number()
|
|
5875
|
-
.min(1)
|
|
5876
|
-
.max(exports.listCustomerSubscriptionsQueryPageSizeMax)
|
|
5877
|
-
.default(exports.listCustomerSubscriptionsQueryPageSizeDefault)
|
|
5878
|
-
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
5497
|
+
exports.deleteFeatureParams = zod_1.z.object({
|
|
5498
|
+
featureId: zod_1.z.coerce.string(),
|
|
5879
5499
|
});
|
|
5880
5500
|
/**
|
|
5881
|
-
* List all
|
|
5882
|
-
To fetch the
|
|
5501
|
+
* List all grants for all the subjects and entitlements. This endpoint is intended for administrative purposes only.
|
|
5502
|
+
To fetch the grants of a specific entitlement please use the /api/v1/subjects/{subjectKeyOrID}/entitlements/{entitlementOrFeatureID}/grants endpoint.
|
|
5883
5503
|
If page is provided that takes precedence and the paginated response is returned.
|
|
5884
|
-
* @summary List
|
|
5504
|
+
* @summary List grants
|
|
5885
5505
|
*/
|
|
5886
|
-
exports.
|
|
5887
|
-
exports.
|
|
5888
|
-
exports.
|
|
5889
|
-
exports.
|
|
5890
|
-
exports.
|
|
5891
|
-
exports.
|
|
5892
|
-
exports.
|
|
5893
|
-
exports.
|
|
5894
|
-
exports.
|
|
5895
|
-
entitlementType: zod_1.z
|
|
5896
|
-
.array(zod_1.z
|
|
5897
|
-
.enum(['metered', 'boolean', 'static'])
|
|
5898
|
-
.describe('Type of the entitlement.'))
|
|
5899
|
-
.optional()
|
|
5900
|
-
.describe('Filtering by multiple entitlement types.\n\nUsage: `?entitlementType=metered&entitlementType=boolean`'),
|
|
5901
|
-
excludeInactive: zod_1.z.coerce
|
|
5902
|
-
.boolean()
|
|
5903
|
-
.optional()
|
|
5904
|
-
.describe('Exclude inactive entitlements in the response (those scheduled for later or earlier)'),
|
|
5506
|
+
exports.listGrantsQueryIncludeDeletedDefault = false;
|
|
5507
|
+
exports.listGrantsQueryPageDefault = 1;
|
|
5508
|
+
exports.listGrantsQueryPageSizeDefault = 100;
|
|
5509
|
+
exports.listGrantsQueryPageSizeMax = 1000;
|
|
5510
|
+
exports.listGrantsQueryOffsetDefault = 0;
|
|
5511
|
+
exports.listGrantsQueryOffsetMin = 0;
|
|
5512
|
+
exports.listGrantsQueryLimitDefault = 100;
|
|
5513
|
+
exports.listGrantsQueryLimitMax = 1000;
|
|
5514
|
+
exports.listGrantsQueryParams = zod_1.z.object({
|
|
5905
5515
|
feature: zod_1.z
|
|
5906
5516
|
.array(zod_1.z.coerce.string())
|
|
5907
5517
|
.optional()
|
|
5908
5518
|
.describe('Filtering by multiple features.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
5519
|
+
includeDeleted: zod_1.z.coerce.boolean().optional().describe('Include deleted'),
|
|
5909
5520
|
limit: zod_1.z.coerce
|
|
5910
5521
|
.number()
|
|
5911
5522
|
.min(1)
|
|
5912
|
-
.max(exports.
|
|
5913
|
-
.default(exports.
|
|
5523
|
+
.max(exports.listGrantsQueryLimitMax)
|
|
5524
|
+
.default(exports.listGrantsQueryLimitDefault)
|
|
5914
5525
|
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
5915
5526
|
offset: zod_1.z.coerce
|
|
5916
5527
|
.number()
|
|
5917
|
-
.min(exports.
|
|
5528
|
+
.min(exports.listGrantsQueryOffsetMin)
|
|
5918
5529
|
.optional()
|
|
5919
5530
|
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
5920
5531
|
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
5921
5532
|
orderBy: zod_1.z
|
|
5922
|
-
.enum(['createdAt', 'updatedAt'])
|
|
5533
|
+
.enum(['id', 'createdAt', 'updatedAt'])
|
|
5923
5534
|
.optional()
|
|
5924
5535
|
.describe('The order by field.'),
|
|
5925
5536
|
page: zod_1.z.coerce
|
|
5926
5537
|
.number()
|
|
5927
5538
|
.min(1)
|
|
5928
|
-
.default(exports.
|
|
5539
|
+
.default(exports.listGrantsQueryPageDefault)
|
|
5929
5540
|
.describe('Page index.\n\nDefault is 1.'),
|
|
5930
5541
|
pageSize: zod_1.z.coerce
|
|
5931
5542
|
.number()
|
|
5932
5543
|
.min(1)
|
|
5933
|
-
.max(exports.
|
|
5934
|
-
.default(exports.
|
|
5544
|
+
.max(exports.listGrantsQueryPageSizeMax)
|
|
5545
|
+
.default(exports.listGrantsQueryPageSizeDefault)
|
|
5935
5546
|
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
5936
5547
|
subject: zod_1.z
|
|
5937
5548
|
.array(zod_1.z.coerce.string())
|
|
@@ -5939,796 +5550,496 @@ exports.listEntitlementsQueryParams = zod_1.z.object({
|
|
|
5939
5550
|
.describe('Filtering by multiple subjects.\n\nUsage: `?subject=customer-1&subject=customer-2`'),
|
|
5940
5551
|
});
|
|
5941
5552
|
/**
|
|
5942
|
-
*
|
|
5943
|
-
|
|
5553
|
+
* Voiding a grant means it is no longer valid, it doesn't take part in further balance calculations. Voiding a grant does not retroactively take effect, meaning any usage that has already been attributed to the grant will remain, but future usage cannot be burnt down from the grant.
|
|
5554
|
+
For example, if you have a single grant for your metered entitlement with an initial amount of 100, and so far 60 usage has been metered, the grant (and the entitlement itself) would have a balance of 40. If you then void that grant, balance becomes 0, but the 60 previous usage will not be affected.
|
|
5555
|
+
* @summary Void grant
|
|
5944
5556
|
*/
|
|
5945
|
-
exports.
|
|
5946
|
-
|
|
5947
|
-
entitlementId: zod_1.z.coerce
|
|
5948
|
-
.string()
|
|
5949
|
-
.regex(exports.getEntitlementByIdPathEntitlementIdRegExp),
|
|
5557
|
+
exports.voidGrantParams = zod_1.z.object({
|
|
5558
|
+
grantId: zod_1.z.coerce.string(),
|
|
5950
5559
|
});
|
|
5951
5560
|
/**
|
|
5952
|
-
*
|
|
5953
|
-
|
|
5954
|
-
If the from query param is not provided it defaults to last 72 hours.
|
|
5955
|
-
* @summary List ingested events
|
|
5561
|
+
* Get progress
|
|
5562
|
+
* @summary Get progress
|
|
5956
5563
|
*/
|
|
5957
|
-
exports.
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5564
|
+
exports.getProgressParams = zod_1.z.object({
|
|
5565
|
+
id: zod_1.z.coerce.string(),
|
|
5566
|
+
});
|
|
5567
|
+
/**
|
|
5568
|
+
* List available apps of the app marketplace.
|
|
5569
|
+
* @summary List available apps
|
|
5570
|
+
*/
|
|
5571
|
+
exports.listMarketplaceListingsQueryPageDefault = 1;
|
|
5572
|
+
exports.listMarketplaceListingsQueryPageSizeDefault = 100;
|
|
5573
|
+
exports.listMarketplaceListingsQueryPageSizeMax = 1000;
|
|
5574
|
+
exports.listMarketplaceListingsQueryParams = zod_1.z.object({
|
|
5575
|
+
page: zod_1.z.coerce
|
|
5576
|
+
.number()
|
|
5963
5577
|
.min(1)
|
|
5964
|
-
.
|
|
5965
|
-
.
|
|
5966
|
-
|
|
5967
|
-
from: zod_1.z.coerce
|
|
5968
|
-
.date()
|
|
5969
|
-
.optional()
|
|
5970
|
-
.describe('Start date-time in RFC 3339 format.\n\nInclusive.'),
|
|
5971
|
-
id: zod_1.z.coerce
|
|
5972
|
-
.string()
|
|
5973
|
-
.optional()
|
|
5974
|
-
.describe('The event ID.\n\nAccepts partial ID.'),
|
|
5975
|
-
ingestedAtFrom: zod_1.z.coerce
|
|
5976
|
-
.date()
|
|
5977
|
-
.optional()
|
|
5978
|
-
.describe('Start date-time in RFC 3339 format.\n\nInclusive.'),
|
|
5979
|
-
ingestedAtTo: zod_1.z.coerce
|
|
5980
|
-
.date()
|
|
5981
|
-
.optional()
|
|
5982
|
-
.describe('End date-time in RFC 3339 format.\n\nInclusive.'),
|
|
5983
|
-
limit: zod_1.z.coerce
|
|
5578
|
+
.default(exports.listMarketplaceListingsQueryPageDefault)
|
|
5579
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
5580
|
+
pageSize: zod_1.z.coerce
|
|
5984
5581
|
.number()
|
|
5985
5582
|
.min(1)
|
|
5986
|
-
.max(exports.
|
|
5987
|
-
.default(exports.
|
|
5988
|
-
.describe('
|
|
5989
|
-
|
|
5583
|
+
.max(exports.listMarketplaceListingsQueryPageSizeMax)
|
|
5584
|
+
.default(exports.listMarketplaceListingsQueryPageSizeDefault)
|
|
5585
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
5586
|
+
});
|
|
5587
|
+
/**
|
|
5588
|
+
* Get a marketplace listing by type.
|
|
5589
|
+
* @summary Get app details by type
|
|
5590
|
+
*/
|
|
5591
|
+
exports.getMarketplaceListingParams = zod_1.z.object({
|
|
5592
|
+
type: zod_1.z.enum(['stripe', 'sandbox', 'custom_invoicing']),
|
|
5593
|
+
});
|
|
5594
|
+
/**
|
|
5595
|
+
* Install an app from the marketplace.
|
|
5596
|
+
* @summary Install app
|
|
5597
|
+
*/
|
|
5598
|
+
exports.marketplaceAppInstallParams = zod_1.z.object({
|
|
5599
|
+
type: zod_1.z
|
|
5600
|
+
.enum(['stripe', 'sandbox', 'custom_invoicing'])
|
|
5601
|
+
.describe('The type of the app to install.'),
|
|
5602
|
+
});
|
|
5603
|
+
exports.marketplaceAppInstallBodyCreateBillingProfileDefault = true;
|
|
5604
|
+
exports.marketplaceAppInstallBody = zod_1.z
|
|
5605
|
+
.object({
|
|
5606
|
+
createBillingProfile: zod_1.z.coerce
|
|
5607
|
+
.boolean()
|
|
5608
|
+
.default(exports.marketplaceAppInstallBodyCreateBillingProfileDefault)
|
|
5609
|
+
.describe('If true, a billing profile will be created for the app.\nThe Stripe app will be also set as the default billing profile if the current default is a Sandbox app.'),
|
|
5610
|
+
name: zod_1.z.coerce
|
|
5990
5611
|
.string()
|
|
5991
5612
|
.optional()
|
|
5992
|
-
.describe(
|
|
5993
|
-
|
|
5994
|
-
|
|
5613
|
+
.describe("Name of the application to install.\n\nIf name is not provided defaults to the marketplace listing's name."),
|
|
5614
|
+
})
|
|
5615
|
+
.describe('Marketplace install request payload.');
|
|
5616
|
+
/**
|
|
5617
|
+
* Install an marketplace app via API Key.
|
|
5618
|
+
* @summary Install app via API key
|
|
5619
|
+
*/
|
|
5620
|
+
exports.marketplaceAppAPIKeyInstallParams = zod_1.z.object({
|
|
5621
|
+
type: zod_1.z
|
|
5622
|
+
.enum(['stripe', 'sandbox', 'custom_invoicing'])
|
|
5623
|
+
.describe('The type of the app to install.'),
|
|
5624
|
+
});
|
|
5625
|
+
exports.marketplaceAppAPIKeyInstallBodyCreateBillingProfileDefault = true;
|
|
5626
|
+
exports.marketplaceAppAPIKeyInstallBody = zod_1.z.object({
|
|
5627
|
+
apiKey: zod_1.z.coerce
|
|
5628
|
+
.string()
|
|
5629
|
+
.describe('The API key for the provider.\nFor example, the Stripe API key.'),
|
|
5630
|
+
createBillingProfile: zod_1.z.coerce
|
|
5631
|
+
.boolean()
|
|
5632
|
+
.default(exports.marketplaceAppAPIKeyInstallBodyCreateBillingProfileDefault)
|
|
5633
|
+
.describe('If true, a billing profile will be created for the app.\nThe Stripe app will be also set as the default billing profile if the current default is a Sandbox app.'),
|
|
5634
|
+
name: zod_1.z.coerce
|
|
5635
|
+
.string()
|
|
5995
5636
|
.optional()
|
|
5996
|
-
.describe(
|
|
5637
|
+
.describe("Name of the application to install.\n\nIf name is not provided defaults to the marketplace listing's name."),
|
|
5997
5638
|
});
|
|
5998
5639
|
/**
|
|
5999
|
-
*
|
|
6000
|
-
|
|
5640
|
+
* Install an app via OAuth.
|
|
5641
|
+
Returns a URL to start the OAuth 2.0 flow.
|
|
5642
|
+
* @summary Get OAuth2 install URL
|
|
6001
5643
|
*/
|
|
6002
|
-
exports.
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
.union([
|
|
6006
|
-
zod_1.z
|
|
6007
|
-
.object({
|
|
6008
|
-
data: zod_1.z
|
|
6009
|
-
.record(zod_1.z.string(), zod_1.z.any())
|
|
6010
|
-
.nullish()
|
|
6011
|
-
.describe('The event payload.\nOptional, if present it must be a JSON object.'),
|
|
6012
|
-
datacontenttype: zod_1.z
|
|
6013
|
-
.enum(['application/json'])
|
|
6014
|
-
.nullish()
|
|
6015
|
-
.describe('Content type of the CloudEvents data value. Only the value \"application/json\" is allowed over HTTP.'),
|
|
6016
|
-
dataschema: zod_1.z.coerce
|
|
6017
|
-
.string()
|
|
6018
|
-
.url()
|
|
6019
|
-
.min(1)
|
|
6020
|
-
.nullish()
|
|
6021
|
-
.describe('Identifies the schema that data adheres to.'),
|
|
6022
|
-
id: zod_1.z.coerce.string().min(1).describe('Identifies the event.'),
|
|
6023
|
-
source: zod_1.z.coerce
|
|
6024
|
-
.string()
|
|
6025
|
-
.min(1)
|
|
6026
|
-
.describe('Identifies the context in which an event happened.'),
|
|
6027
|
-
specversion: zod_1.z.coerce
|
|
6028
|
-
.string()
|
|
6029
|
-
.min(1)
|
|
6030
|
-
.describe('The version of the CloudEvents specification which the event uses.'),
|
|
6031
|
-
subject: zod_1.z.coerce
|
|
6032
|
-
.string()
|
|
6033
|
-
.min(1)
|
|
6034
|
-
.describe('Describes the subject of the event in the context of the event producer (identified by source).'),
|
|
6035
|
-
time: zod_1.z.coerce
|
|
6036
|
-
.date()
|
|
6037
|
-
.nullish()
|
|
6038
|
-
.describe('Timestamp of when the occurrence happened. Must adhere to RFC 3339.'),
|
|
6039
|
-
type: zod_1.z.coerce
|
|
6040
|
-
.string()
|
|
6041
|
-
.min(1)
|
|
6042
|
-
.describe('Contains a value describing the type of event related to the originating occurrence.'),
|
|
6043
|
-
})
|
|
6044
|
-
.describe('CloudEvents Specification JSON Schema\n\nOptional properties are nullable according to the CloudEvents specification:\nOPTIONAL not omitted attributes MAY be represented as a null JSON value.'),
|
|
6045
|
-
zod_1.z.array(zod_1.z
|
|
6046
|
-
.object({
|
|
6047
|
-
data: zod_1.z
|
|
6048
|
-
.record(zod_1.z.string(), zod_1.z.any())
|
|
6049
|
-
.nullish()
|
|
6050
|
-
.describe('The event payload.\nOptional, if present it must be a JSON object.'),
|
|
6051
|
-
datacontenttype: zod_1.z
|
|
6052
|
-
.enum(['application/json'])
|
|
6053
|
-
.nullish()
|
|
6054
|
-
.describe('Content type of the CloudEvents data value. Only the value \"application/json\" is allowed over HTTP.'),
|
|
6055
|
-
dataschema: zod_1.z.coerce
|
|
6056
|
-
.string()
|
|
6057
|
-
.url()
|
|
6058
|
-
.min(1)
|
|
6059
|
-
.nullish()
|
|
6060
|
-
.describe('Identifies the schema that data adheres to.'),
|
|
6061
|
-
id: zod_1.z.coerce.string().min(1).describe('Identifies the event.'),
|
|
6062
|
-
source: zod_1.z.coerce
|
|
6063
|
-
.string()
|
|
6064
|
-
.min(1)
|
|
6065
|
-
.describe('Identifies the context in which an event happened.'),
|
|
6066
|
-
specversion: zod_1.z.coerce
|
|
6067
|
-
.string()
|
|
6068
|
-
.min(1)
|
|
6069
|
-
.describe('The version of the CloudEvents specification which the event uses.'),
|
|
6070
|
-
subject: zod_1.z.coerce
|
|
6071
|
-
.string()
|
|
6072
|
-
.min(1)
|
|
6073
|
-
.describe('Describes the subject of the event in the context of the event producer (identified by source).'),
|
|
6074
|
-
time: zod_1.z.coerce
|
|
6075
|
-
.date()
|
|
6076
|
-
.nullish()
|
|
6077
|
-
.describe('Timestamp of when the occurrence happened. Must adhere to RFC 3339.'),
|
|
6078
|
-
type: zod_1.z.coerce
|
|
6079
|
-
.string()
|
|
6080
|
-
.min(1)
|
|
6081
|
-
.describe('Contains a value describing the type of event related to the originating occurrence.'),
|
|
6082
|
-
})
|
|
6083
|
-
.describe('CloudEvents Specification JSON Schema\n\nOptional properties are nullable according to the CloudEvents specification:\nOPTIONAL not omitted attributes MAY be represented as a null JSON value.')),
|
|
6084
|
-
])
|
|
6085
|
-
.describe('The body of the events request.\nEither a single event or a batch of events.');
|
|
5644
|
+
exports.marketplaceOAuth2InstallGetURLParams = zod_1.z.object({
|
|
5645
|
+
type: zod_1.z.enum(['stripe', 'sandbox', 'custom_invoicing']),
|
|
5646
|
+
});
|
|
6086
5647
|
/**
|
|
6087
|
-
*
|
|
6088
|
-
|
|
5648
|
+
* Authorize OAuth2 code.
|
|
5649
|
+
Verifies the OAuth code and exchanges it for a token and refresh token
|
|
5650
|
+
* @summary Install app via OAuth2
|
|
6089
5651
|
*/
|
|
6090
|
-
exports.
|
|
6091
|
-
|
|
6092
|
-
|
|
6093
|
-
|
|
6094
|
-
|
|
6095
|
-
exports.
|
|
6096
|
-
|
|
6097
|
-
|
|
6098
|
-
exports.listFeaturesQueryParams = zod_1.z.object({
|
|
6099
|
-
includeArchived: zod_1.z.coerce
|
|
6100
|
-
.boolean()
|
|
5652
|
+
exports.marketplaceOAuth2InstallAuthorizeParams = zod_1.z.object({
|
|
5653
|
+
type: zod_1.z
|
|
5654
|
+
.enum(['stripe', 'sandbox', 'custom_invoicing'])
|
|
5655
|
+
.describe('The type of the app to install.'),
|
|
5656
|
+
});
|
|
5657
|
+
exports.marketplaceOAuth2InstallAuthorizeQueryParams = zod_1.z.object({
|
|
5658
|
+
code: zod_1.z.coerce
|
|
5659
|
+
.string()
|
|
6101
5660
|
.optional()
|
|
6102
|
-
.describe('
|
|
6103
|
-
|
|
6104
|
-
.
|
|
6105
|
-
|
|
6106
|
-
|
|
6107
|
-
|
|
6108
|
-
|
|
6109
|
-
|
|
6110
|
-
|
|
5661
|
+
.describe('Authorization code which the client will later exchange for an access token.\nRequired with the success response.'),
|
|
5662
|
+
error: zod_1.z
|
|
5663
|
+
.enum([
|
|
5664
|
+
'invalid_request',
|
|
5665
|
+
'unauthorized_client',
|
|
5666
|
+
'access_denied',
|
|
5667
|
+
'unsupported_response_type',
|
|
5668
|
+
'invalid_scope',
|
|
5669
|
+
'server_error',
|
|
5670
|
+
'temporarily_unavailable',
|
|
5671
|
+
])
|
|
6111
5672
|
.optional()
|
|
6112
|
-
.describe('
|
|
6113
|
-
|
|
6114
|
-
.
|
|
6115
|
-
.min(exports.listFeaturesQueryOffsetMin)
|
|
5673
|
+
.describe('Error code.\nRequired with the error response.'),
|
|
5674
|
+
error_description: zod_1.z.coerce
|
|
5675
|
+
.string()
|
|
6116
5676
|
.optional()
|
|
6117
|
-
.describe('
|
|
5677
|
+
.describe('Optional human-readable text providing additional information,\nused to assist the client developer in understanding the error that occurred.'),
|
|
5678
|
+
error_uri: zod_1.z.coerce
|
|
5679
|
+
.string()
|
|
5680
|
+
.optional()
|
|
5681
|
+
.describe('Optional uri identifying a human-readable web page with\ninformation about the error, used to provide the client\ndeveloper with additional information about the error'),
|
|
5682
|
+
state: zod_1.z.coerce
|
|
5683
|
+
.string()
|
|
5684
|
+
.optional()
|
|
5685
|
+
.describe('Required if the \"state\" parameter was present in the client authorization request.\nThe exact value received from the client:\n\nUnique, randomly generated, opaque, and non-guessable string that is sent\nwhen starting an authentication request and validated when processing the response.'),
|
|
5686
|
+
});
|
|
5687
|
+
/**
|
|
5688
|
+
* List meters.
|
|
5689
|
+
* @summary List meters
|
|
5690
|
+
*/
|
|
5691
|
+
exports.listMetersQueryPageDefault = 1;
|
|
5692
|
+
exports.listMetersQueryPageSizeDefault = 100;
|
|
5693
|
+
exports.listMetersQueryPageSizeMax = 1000;
|
|
5694
|
+
exports.listMetersQueryIncludeDeletedDefault = false;
|
|
5695
|
+
exports.listMetersQueryParams = zod_1.z.object({
|
|
5696
|
+
includeDeleted: zod_1.z.coerce
|
|
5697
|
+
.boolean()
|
|
5698
|
+
.optional()
|
|
5699
|
+
.describe('Include deleted meters.'),
|
|
6118
5700
|
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
6119
5701
|
orderBy: zod_1.z
|
|
6120
|
-
.enum(['
|
|
5702
|
+
.enum(['key', 'name', 'aggregation', 'createdAt', 'updatedAt'])
|
|
6121
5703
|
.optional()
|
|
6122
5704
|
.describe('The order by field.'),
|
|
6123
5705
|
page: zod_1.z.coerce
|
|
6124
5706
|
.number()
|
|
6125
5707
|
.min(1)
|
|
6126
|
-
.default(exports.
|
|
5708
|
+
.default(exports.listMetersQueryPageDefault)
|
|
6127
5709
|
.describe('Page index.\n\nDefault is 1.'),
|
|
6128
5710
|
pageSize: zod_1.z.coerce
|
|
6129
5711
|
.number()
|
|
6130
5712
|
.min(1)
|
|
6131
|
-
.max(exports.
|
|
6132
|
-
.default(exports.
|
|
5713
|
+
.max(exports.listMetersQueryPageSizeMax)
|
|
5714
|
+
.default(exports.listMetersQueryPageSizeDefault)
|
|
6133
5715
|
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
6134
5716
|
});
|
|
6135
5717
|
/**
|
|
6136
|
-
*
|
|
6137
|
-
|
|
6138
|
-
Only meters with SUM and COUNT aggregation are supported for features.
|
|
6139
|
-
Features cannot be updated later, only archived.
|
|
6140
|
-
* @summary Create feature
|
|
5718
|
+
* Create a meter.
|
|
5719
|
+
* @summary Create meter
|
|
6141
5720
|
*/
|
|
6142
|
-
exports.
|
|
6143
|
-
exports.
|
|
6144
|
-
exports.
|
|
6145
|
-
exports.
|
|
6146
|
-
exports.
|
|
5721
|
+
exports.createMeterBodyDescriptionMax = 1024;
|
|
5722
|
+
exports.createMeterBodyNameMax = 256;
|
|
5723
|
+
exports.createMeterBodySlugMax = 64;
|
|
5724
|
+
exports.createMeterBodySlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
5725
|
+
exports.createMeterBody = zod_1.z
|
|
6147
5726
|
.object({
|
|
6148
|
-
|
|
5727
|
+
aggregation: zod_1.z
|
|
5728
|
+
.enum(['SUM', 'COUNT', 'UNIQUE_COUNT', 'AVG', 'MIN', 'MAX', 'LATEST'])
|
|
5729
|
+
.describe('The aggregation type to use for the meter.')
|
|
5730
|
+
.describe('The aggregation type to use for the meter.'),
|
|
5731
|
+
description: zod_1.z.coerce
|
|
5732
|
+
.string()
|
|
5733
|
+
.max(exports.createMeterBodyDescriptionMax)
|
|
5734
|
+
.optional()
|
|
5735
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
5736
|
+
eventFrom: zod_1.z.coerce
|
|
5737
|
+
.date()
|
|
5738
|
+
.optional()
|
|
5739
|
+
.describe('The date since the meter should include events.\nUseful to skip old events.\nIf not specified, all historical events are included.'),
|
|
5740
|
+
eventType: zod_1.z.coerce
|
|
6149
5741
|
.string()
|
|
6150
5742
|
.min(1)
|
|
6151
|
-
.
|
|
6152
|
-
|
|
6153
|
-
.
|
|
5743
|
+
.describe('The event type to aggregate.'),
|
|
5744
|
+
groupBy: zod_1.z
|
|
5745
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
5746
|
+
.optional()
|
|
5747
|
+
.describe('Named JSONPath expressions to extract the group by values from the event data.\n\nKeys must be unique and consist only alphanumeric and underscore characters.'),
|
|
6154
5748
|
metadata: zod_1.z
|
|
6155
5749
|
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6156
5750
|
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
6157
|
-
.
|
|
6158
|
-
|
|
6159
|
-
|
|
5751
|
+
.nullish()
|
|
5752
|
+
.describe('Additional metadata for the resource.'),
|
|
5753
|
+
name: zod_1.z.coerce
|
|
5754
|
+
.string()
|
|
5755
|
+
.min(1)
|
|
5756
|
+
.max(exports.createMeterBodyNameMax)
|
|
6160
5757
|
.optional()
|
|
6161
|
-
.describe('
|
|
6162
|
-
|
|
5758
|
+
.describe('Human-readable name for the resource. Between 1 and 256 characters.\nDefaults to the slug if not specified.'),
|
|
5759
|
+
slug: zod_1.z.coerce
|
|
5760
|
+
.string()
|
|
5761
|
+
.min(1)
|
|
5762
|
+
.max(exports.createMeterBodySlugMax)
|
|
5763
|
+
.regex(exports.createMeterBodySlugRegExp)
|
|
5764
|
+
.describe('A unique, human-readable identifier for the meter.\nMust consist only alphanumeric and underscore characters.'),
|
|
5765
|
+
valueProperty: zod_1.z.coerce
|
|
6163
5766
|
.string()
|
|
6164
5767
|
.min(1)
|
|
6165
|
-
.max(exports.createFeatureBodyMeterSlugMax)
|
|
6166
|
-
.regex(exports.createFeatureBodyMeterSlugRegExp)
|
|
6167
5768
|
.optional()
|
|
6168
|
-
.describe('
|
|
6169
|
-
name: zod_1.z.coerce.string(),
|
|
5769
|
+
.describe("JSONPath expression to extract the value from the ingested event's data property.\n\nThe ingested value for SUM, AVG, MIN, and MAX aggregations is a number or a string that can be parsed to a number.\n\nFor UNIQUE_COUNT aggregation, the ingested value must be a string. For COUNT aggregation the valueProperty is ignored."),
|
|
6170
5770
|
})
|
|
6171
|
-
.describe('
|
|
6172
|
-
/**
|
|
6173
|
-
* Get a feature by ID.
|
|
6174
|
-
* @summary Get feature
|
|
6175
|
-
*/
|
|
6176
|
-
exports.getFeatureParams = zod_1.z.object({
|
|
6177
|
-
featureId: zod_1.z.coerce.string(),
|
|
6178
|
-
});
|
|
5771
|
+
.describe('A meter create model.');
|
|
6179
5772
|
/**
|
|
6180
|
-
*
|
|
6181
|
-
|
|
6182
|
-
Once a feature is archived it cannot be unarchived. If a feature is archived, new entitlements cannot be created for it, but archiving the feature does not affect existing entitlements.
|
|
6183
|
-
This means, if you want to create a new feature with the same key, and then create entitlements for it, the previous entitlements have to be deleted first on a per subject basis.
|
|
6184
|
-
* @summary Delete feature
|
|
5773
|
+
* Get a meter by ID or slug.
|
|
5774
|
+
* @summary Get meter
|
|
6185
5775
|
*/
|
|
6186
|
-
exports.
|
|
6187
|
-
|
|
5776
|
+
exports.getMeterPathMeterIdOrSlugMax = 64;
|
|
5777
|
+
exports.getMeterPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
5778
|
+
exports.getMeterParams = zod_1.z.object({
|
|
5779
|
+
meterIdOrSlug: zod_1.z.coerce
|
|
5780
|
+
.string()
|
|
5781
|
+
.min(1)
|
|
5782
|
+
.max(exports.getMeterPathMeterIdOrSlugMax)
|
|
5783
|
+
.regex(exports.getMeterPathMeterIdOrSlugRegExp),
|
|
6188
5784
|
});
|
|
6189
5785
|
/**
|
|
6190
|
-
*
|
|
6191
|
-
|
|
6192
|
-
If page is provided that takes precedence and the paginated response is returned.
|
|
6193
|
-
* @summary List grants
|
|
5786
|
+
* Update a meter.
|
|
5787
|
+
* @summary Update meter
|
|
6194
5788
|
*/
|
|
6195
|
-
exports.
|
|
6196
|
-
exports.
|
|
6197
|
-
exports.
|
|
6198
|
-
|
|
6199
|
-
|
|
6200
|
-
exports.listGrantsQueryOffsetMin = 0;
|
|
6201
|
-
exports.listGrantsQueryLimitDefault = 100;
|
|
6202
|
-
exports.listGrantsQueryLimitMax = 1000;
|
|
6203
|
-
exports.listGrantsQueryParams = zod_1.z.object({
|
|
6204
|
-
feature: zod_1.z
|
|
6205
|
-
.array(zod_1.z.coerce.string())
|
|
6206
|
-
.optional()
|
|
6207
|
-
.describe('Filtering by multiple features.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
6208
|
-
includeDeleted: zod_1.z.coerce.boolean().optional().describe('Include deleted'),
|
|
6209
|
-
limit: zod_1.z.coerce
|
|
6210
|
-
.number()
|
|
5789
|
+
exports.updateMeterPathMeterIdOrSlugMax = 64;
|
|
5790
|
+
exports.updateMeterPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
5791
|
+
exports.updateMeterParams = zod_1.z.object({
|
|
5792
|
+
meterIdOrSlug: zod_1.z.coerce
|
|
5793
|
+
.string()
|
|
6211
5794
|
.min(1)
|
|
6212
|
-
.max(exports.
|
|
6213
|
-
.
|
|
6214
|
-
|
|
6215
|
-
|
|
6216
|
-
|
|
6217
|
-
|
|
5795
|
+
.max(exports.updateMeterPathMeterIdOrSlugMax)
|
|
5796
|
+
.regex(exports.updateMeterPathMeterIdOrSlugRegExp),
|
|
5797
|
+
});
|
|
5798
|
+
exports.updateMeterBodyDescriptionMax = 1024;
|
|
5799
|
+
exports.updateMeterBodyNameMax = 256;
|
|
5800
|
+
exports.updateMeterBody = zod_1.z
|
|
5801
|
+
.object({
|
|
5802
|
+
description: zod_1.z.coerce
|
|
5803
|
+
.string()
|
|
5804
|
+
.max(exports.updateMeterBodyDescriptionMax)
|
|
6218
5805
|
.optional()
|
|
6219
|
-
.describe('
|
|
6220
|
-
|
|
6221
|
-
|
|
6222
|
-
.enum(['id', 'createdAt', 'updatedAt'])
|
|
5806
|
+
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
5807
|
+
groupBy: zod_1.z
|
|
5808
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6223
5809
|
.optional()
|
|
6224
|
-
.describe('
|
|
6225
|
-
|
|
6226
|
-
.
|
|
6227
|
-
.
|
|
6228
|
-
.
|
|
6229
|
-
.describe('
|
|
6230
|
-
|
|
6231
|
-
.
|
|
5810
|
+
.describe('Named JSONPath expressions to extract the group by values from the event data.\n\nKeys must be unique and consist only alphanumeric and underscore characters.'),
|
|
5811
|
+
metadata: zod_1.z
|
|
5812
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
5813
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
5814
|
+
.nullish()
|
|
5815
|
+
.describe('Additional metadata for the resource.'),
|
|
5816
|
+
name: zod_1.z.coerce
|
|
5817
|
+
.string()
|
|
6232
5818
|
.min(1)
|
|
6233
|
-
.max(exports.
|
|
6234
|
-
.default(exports.listGrantsQueryPageSizeDefault)
|
|
6235
|
-
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
6236
|
-
subject: zod_1.z
|
|
6237
|
-
.array(zod_1.z.coerce.string())
|
|
5819
|
+
.max(exports.updateMeterBodyNameMax)
|
|
6238
5820
|
.optional()
|
|
6239
|
-
.describe('
|
|
6240
|
-
})
|
|
6241
|
-
|
|
6242
|
-
* Voiding a grant means it is no longer valid, it doesn't take part in further balance calculations. Voiding a grant does not retroactively take effect, meaning any usage that has already been attributed to the grant will remain, but future usage cannot be burnt down from the grant.
|
|
6243
|
-
For example, if you have a single grant for your metered entitlement with an initial amount of 100, and so far 60 usage has been metered, the grant (and the entitlement itself) would have a balance of 40. If you then void that grant, balance becomes 0, but the 60 previous usage will not be affected.
|
|
6244
|
-
* @summary Void grant
|
|
6245
|
-
*/
|
|
6246
|
-
exports.voidGrantParams = zod_1.z.object({
|
|
6247
|
-
grantId: zod_1.z.coerce.string(),
|
|
6248
|
-
});
|
|
5821
|
+
.describe('Human-readable name for the resource. Between 1 and 256 characters.\nDefaults to the slug if not specified.'),
|
|
5822
|
+
})
|
|
5823
|
+
.describe('A meter update model.\n\nOnly the properties that can be updated are included.\nFor example, the slug and aggregation cannot be updated.');
|
|
6249
5824
|
/**
|
|
6250
|
-
*
|
|
6251
|
-
* @summary
|
|
5825
|
+
* Delete a meter.
|
|
5826
|
+
* @summary Delete meter
|
|
6252
5827
|
*/
|
|
6253
|
-
exports.
|
|
6254
|
-
|
|
5828
|
+
exports.deleteMeterPathMeterIdOrSlugMax = 64;
|
|
5829
|
+
exports.deleteMeterPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
5830
|
+
exports.deleteMeterParams = zod_1.z.object({
|
|
5831
|
+
meterIdOrSlug: zod_1.z.coerce
|
|
5832
|
+
.string()
|
|
5833
|
+
.min(1)
|
|
5834
|
+
.max(exports.deleteMeterPathMeterIdOrSlugMax)
|
|
5835
|
+
.regex(exports.deleteMeterPathMeterIdOrSlugRegExp),
|
|
6255
5836
|
});
|
|
6256
5837
|
/**
|
|
6257
|
-
*
|
|
6258
|
-
* @summary
|
|
5838
|
+
* Query meter for usage.
|
|
5839
|
+
* @summary Query meter
|
|
6259
5840
|
*/
|
|
6260
|
-
exports.
|
|
6261
|
-
exports.
|
|
6262
|
-
exports.
|
|
6263
|
-
|
|
6264
|
-
|
|
6265
|
-
.number()
|
|
5841
|
+
exports.queryMeterPathMeterIdOrSlugMax = 64;
|
|
5842
|
+
exports.queryMeterPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
5843
|
+
exports.queryMeterParams = zod_1.z.object({
|
|
5844
|
+
meterIdOrSlug: zod_1.z.coerce
|
|
5845
|
+
.string()
|
|
6266
5846
|
.min(1)
|
|
6267
|
-
.
|
|
6268
|
-
.
|
|
6269
|
-
|
|
6270
|
-
|
|
5847
|
+
.max(exports.queryMeterPathMeterIdOrSlugMax)
|
|
5848
|
+
.regex(exports.queryMeterPathMeterIdOrSlugRegExp),
|
|
5849
|
+
});
|
|
5850
|
+
exports.queryMeterQueryClientIdMax = 36;
|
|
5851
|
+
exports.queryMeterQueryWindowTimeZoneDefault = 'UTC';
|
|
5852
|
+
exports.queryMeterQueryFilterCustomerIdMax = 100;
|
|
5853
|
+
exports.queryMeterQueryParams = zod_1.z.object({
|
|
5854
|
+
clientId: zod_1.z.coerce
|
|
5855
|
+
.string()
|
|
6271
5856
|
.min(1)
|
|
6272
|
-
.max(exports.
|
|
6273
|
-
.
|
|
6274
|
-
.describe('
|
|
5857
|
+
.max(exports.queryMeterQueryClientIdMax)
|
|
5858
|
+
.optional()
|
|
5859
|
+
.describe('Client ID\nUseful to track progress of a query.'),
|
|
5860
|
+
filterCustomerId: zod_1.z
|
|
5861
|
+
.array(zod_1.z.coerce.string())
|
|
5862
|
+
.max(exports.queryMeterQueryFilterCustomerIdMax)
|
|
5863
|
+
.optional()
|
|
5864
|
+
.describe('Filtering by multiple customers.\n\nFor example: ?filterCustomerId=customer-1&filterCustomerId=customer-2'),
|
|
5865
|
+
filterGroupBy: zod_1.z
|
|
5866
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
5867
|
+
.optional()
|
|
5868
|
+
.describe('Simple filter for group bys with exact match.\n\nFor example: ?filterGroupBy[vendor]=openai&filterGroupBy[model]=gpt-4-turbo'),
|
|
5869
|
+
from: zod_1.z.coerce
|
|
5870
|
+
.date()
|
|
5871
|
+
.optional()
|
|
5872
|
+
.describe('Start date-time in RFC 3339 format.\n\nInclusive.\n\nFor example: ?from=2025-01-01T00%3A00%3A00.000Z'),
|
|
5873
|
+
groupBy: zod_1.z
|
|
5874
|
+
.array(zod_1.z.coerce.string())
|
|
5875
|
+
.optional()
|
|
5876
|
+
.describe('If not specified a single aggregate will be returned for each subject and time window.\n`subject` is a reserved group by value.\n\nFor example: ?groupBy=subject&groupBy=model'),
|
|
5877
|
+
subject: zod_1.z
|
|
5878
|
+
.array(zod_1.z.coerce.string())
|
|
5879
|
+
.optional()
|
|
5880
|
+
.describe('Filtering by multiple subjects.\n\nFor example: ?subject=subject-1&subject=subject-2'),
|
|
5881
|
+
to: zod_1.z.coerce
|
|
5882
|
+
.date()
|
|
5883
|
+
.optional()
|
|
5884
|
+
.describe('End date-time in RFC 3339 format.\n\nInclusive.\n\nFor example: ?to=2025-02-01T00%3A00%3A00.000Z'),
|
|
5885
|
+
windowSize: zod_1.z
|
|
5886
|
+
.enum(['MINUTE', 'HOUR', 'DAY', 'MONTH'])
|
|
5887
|
+
.optional()
|
|
5888
|
+
.describe('If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.\n\nFor example: ?windowSize=DAY'),
|
|
5889
|
+
windowTimeZone: zod_1.z.coerce
|
|
5890
|
+
.string()
|
|
5891
|
+
.default(exports.queryMeterQueryWindowTimeZoneDefault)
|
|
5892
|
+
.describe('The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).\nIf not specified, the UTC timezone will be used.\n\nFor example: ?windowTimeZone=UTC'),
|
|
6275
5893
|
});
|
|
6276
5894
|
/**
|
|
6277
|
-
*
|
|
6278
|
-
* @summary Get app details by type
|
|
5895
|
+
* @summary Query meter
|
|
6279
5896
|
*/
|
|
6280
|
-
exports.
|
|
6281
|
-
|
|
5897
|
+
exports.queryMeterPostPathMeterIdOrSlugMax = 64;
|
|
5898
|
+
exports.queryMeterPostPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
5899
|
+
exports.queryMeterPostParams = zod_1.z.object({
|
|
5900
|
+
meterIdOrSlug: zod_1.z.coerce
|
|
5901
|
+
.string()
|
|
5902
|
+
.min(1)
|
|
5903
|
+
.max(exports.queryMeterPostPathMeterIdOrSlugMax)
|
|
5904
|
+
.regex(exports.queryMeterPostPathMeterIdOrSlugRegExp),
|
|
6282
5905
|
});
|
|
6283
|
-
|
|
6284
|
-
|
|
6285
|
-
|
|
6286
|
-
|
|
6287
|
-
exports.
|
|
6288
|
-
|
|
6289
|
-
.enum(['stripe', 'sandbox', 'custom_invoicing'])
|
|
6290
|
-
.describe('The type of the app to install.'),
|
|
6291
|
-
});
|
|
6292
|
-
exports.marketplaceAppInstallBodyCreateBillingProfileDefault = true;
|
|
6293
|
-
exports.marketplaceAppInstallBody = zod_1.z
|
|
5906
|
+
exports.queryMeterPostBodyClientIdMax = 36;
|
|
5907
|
+
exports.queryMeterPostBodyWindowTimeZoneDefault = 'UTC';
|
|
5908
|
+
exports.queryMeterPostBodySubjectMax = 100;
|
|
5909
|
+
exports.queryMeterPostBodyFilterCustomerIdMax = 100;
|
|
5910
|
+
exports.queryMeterPostBodyGroupByMax = 100;
|
|
5911
|
+
exports.queryMeterPostBody = zod_1.z
|
|
6294
5912
|
.object({
|
|
6295
|
-
|
|
6296
|
-
.boolean()
|
|
6297
|
-
.default(exports.marketplaceAppInstallBodyCreateBillingProfileDefault)
|
|
6298
|
-
.describe('If true, a billing profile will be created for the app.\nThe Stripe app will be also set as the default billing profile if the current default is a Sandbox app.'),
|
|
6299
|
-
name: zod_1.z.coerce
|
|
5913
|
+
clientId: zod_1.z.coerce
|
|
6300
5914
|
.string()
|
|
5915
|
+
.min(1)
|
|
5916
|
+
.max(exports.queryMeterPostBodyClientIdMax)
|
|
6301
5917
|
.optional()
|
|
6302
|
-
.describe(
|
|
6303
|
-
|
|
6304
|
-
|
|
6305
|
-
|
|
6306
|
-
* Install an marketplace app via API Key.
|
|
6307
|
-
* @summary Install app via API key
|
|
6308
|
-
*/
|
|
6309
|
-
exports.marketplaceAppAPIKeyInstallParams = zod_1.z.object({
|
|
6310
|
-
type: zod_1.z
|
|
6311
|
-
.enum(['stripe', 'sandbox', 'custom_invoicing'])
|
|
6312
|
-
.describe('The type of the app to install.'),
|
|
6313
|
-
});
|
|
6314
|
-
exports.marketplaceAppAPIKeyInstallBodyCreateBillingProfileDefault = true;
|
|
6315
|
-
exports.marketplaceAppAPIKeyInstallBody = zod_1.z.object({
|
|
6316
|
-
apiKey: zod_1.z.coerce
|
|
6317
|
-
.string()
|
|
6318
|
-
.describe('The API key for the provider.\nFor example, the Stripe API key.'),
|
|
6319
|
-
createBillingProfile: zod_1.z.coerce
|
|
6320
|
-
.boolean()
|
|
6321
|
-
.default(exports.marketplaceAppAPIKeyInstallBodyCreateBillingProfileDefault)
|
|
6322
|
-
.describe('If true, a billing profile will be created for the app.\nThe Stripe app will be also set as the default billing profile if the current default is a Sandbox app.'),
|
|
6323
|
-
name: zod_1.z.coerce
|
|
6324
|
-
.string()
|
|
5918
|
+
.describe('Client ID\nUseful to track progress of a query.'),
|
|
5919
|
+
filterCustomerId: zod_1.z
|
|
5920
|
+
.array(zod_1.z.coerce.string())
|
|
5921
|
+
.max(exports.queryMeterPostBodyFilterCustomerIdMax)
|
|
6325
5922
|
.optional()
|
|
6326
|
-
.describe(
|
|
6327
|
-
|
|
6328
|
-
|
|
6329
|
-
* Install an app via OAuth.
|
|
6330
|
-
Returns a URL to start the OAuth 2.0 flow.
|
|
6331
|
-
* @summary Get OAuth2 install URL
|
|
6332
|
-
*/
|
|
6333
|
-
exports.marketplaceOAuth2InstallGetURLParams = zod_1.z.object({
|
|
6334
|
-
type: zod_1.z.enum(['stripe', 'sandbox', 'custom_invoicing']),
|
|
6335
|
-
});
|
|
6336
|
-
/**
|
|
6337
|
-
* Authorize OAuth2 code.
|
|
6338
|
-
Verifies the OAuth code and exchanges it for a token and refresh token
|
|
6339
|
-
* @summary Install app via OAuth2
|
|
6340
|
-
*/
|
|
6341
|
-
exports.marketplaceOAuth2InstallAuthorizeParams = zod_1.z.object({
|
|
6342
|
-
type: zod_1.z
|
|
6343
|
-
.enum(['stripe', 'sandbox', 'custom_invoicing'])
|
|
6344
|
-
.describe('The type of the app to install.'),
|
|
6345
|
-
});
|
|
6346
|
-
exports.marketplaceOAuth2InstallAuthorizeQueryParams = zod_1.z.object({
|
|
6347
|
-
code: zod_1.z.coerce
|
|
6348
|
-
.string()
|
|
5923
|
+
.describe('Filtering by multiple customers.'),
|
|
5924
|
+
filterGroupBy: zod_1.z
|
|
5925
|
+
.record(zod_1.z.string(), zod_1.z.array(zod_1.z.coerce.string()))
|
|
6349
5926
|
.optional()
|
|
6350
|
-
.describe('
|
|
6351
|
-
|
|
6352
|
-
.
|
|
6353
|
-
'invalid_request',
|
|
6354
|
-
'unauthorized_client',
|
|
6355
|
-
'access_denied',
|
|
6356
|
-
'unsupported_response_type',
|
|
6357
|
-
'invalid_scope',
|
|
6358
|
-
'server_error',
|
|
6359
|
-
'temporarily_unavailable',
|
|
6360
|
-
])
|
|
5927
|
+
.describe('Simple filter for group bys with exact match.'),
|
|
5928
|
+
from: zod_1.z.coerce
|
|
5929
|
+
.date()
|
|
6361
5930
|
.optional()
|
|
6362
|
-
.describe('
|
|
6363
|
-
|
|
6364
|
-
.string()
|
|
5931
|
+
.describe('Start date-time in RFC 3339 format.\n\nInclusive.'),
|
|
5932
|
+
groupBy: zod_1.z
|
|
5933
|
+
.array(zod_1.z.coerce.string())
|
|
5934
|
+
.max(exports.queryMeterPostBodyGroupByMax)
|
|
6365
5935
|
.optional()
|
|
6366
|
-
.describe('
|
|
6367
|
-
|
|
6368
|
-
.string()
|
|
5936
|
+
.describe('If not specified a single aggregate will be returned for each subject and time window.\n`subject` is a reserved group by value.'),
|
|
5937
|
+
subject: zod_1.z
|
|
5938
|
+
.array(zod_1.z.coerce.string())
|
|
5939
|
+
.max(exports.queryMeterPostBodySubjectMax)
|
|
6369
5940
|
.optional()
|
|
6370
|
-
.describe('
|
|
6371
|
-
|
|
6372
|
-
.
|
|
5941
|
+
.describe('Filtering by multiple subjects.'),
|
|
5942
|
+
to: zod_1.z.coerce
|
|
5943
|
+
.date()
|
|
6373
5944
|
.optional()
|
|
6374
|
-
.describe('
|
|
5945
|
+
.describe('End date-time in RFC 3339 format.\n\nInclusive.'),
|
|
5946
|
+
windowSize: zod_1.z
|
|
5947
|
+
.enum(['MINUTE', 'HOUR', 'DAY', 'MONTH'])
|
|
5948
|
+
.describe('Aggregation window size.')
|
|
5949
|
+
.optional()
|
|
5950
|
+
.describe('If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.'),
|
|
5951
|
+
windowTimeZone: zod_1.z.coerce
|
|
5952
|
+
.string()
|
|
5953
|
+
.default(exports.queryMeterPostBodyWindowTimeZoneDefault)
|
|
5954
|
+
.describe('The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).\nIf not specified, the UTC timezone will be used.'),
|
|
5955
|
+
})
|
|
5956
|
+
.describe('A meter query request.');
|
|
5957
|
+
/**
|
|
5958
|
+
* List subjects for a meter.
|
|
5959
|
+
* @summary List meter subjects
|
|
5960
|
+
*/
|
|
5961
|
+
exports.listMeterSubjectsPathMeterIdOrSlugMax = 64;
|
|
5962
|
+
exports.listMeterSubjectsPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
5963
|
+
exports.listMeterSubjectsParams = zod_1.z.object({
|
|
5964
|
+
meterIdOrSlug: zod_1.z.coerce
|
|
5965
|
+
.string()
|
|
5966
|
+
.min(1)
|
|
5967
|
+
.max(exports.listMeterSubjectsPathMeterIdOrSlugMax)
|
|
5968
|
+
.regex(exports.listMeterSubjectsPathMeterIdOrSlugRegExp),
|
|
6375
5969
|
});
|
|
6376
5970
|
/**
|
|
6377
|
-
* List
|
|
6378
|
-
* @summary List
|
|
5971
|
+
* List all notification channels.
|
|
5972
|
+
* @summary List notification channels
|
|
6379
5973
|
*/
|
|
6380
|
-
exports.
|
|
6381
|
-
exports.
|
|
6382
|
-
exports.
|
|
6383
|
-
exports.
|
|
6384
|
-
exports.
|
|
5974
|
+
exports.listNotificationChannelsQueryIncludeDeletedDefault = false;
|
|
5975
|
+
exports.listNotificationChannelsQueryIncludeDisabledDefault = false;
|
|
5976
|
+
exports.listNotificationChannelsQueryPageDefault = 1;
|
|
5977
|
+
exports.listNotificationChannelsQueryPageSizeDefault = 100;
|
|
5978
|
+
exports.listNotificationChannelsQueryPageSizeMax = 1000;
|
|
5979
|
+
exports.listNotificationChannelsQueryParams = zod_1.z.object({
|
|
6385
5980
|
includeDeleted: zod_1.z.coerce
|
|
6386
5981
|
.boolean()
|
|
6387
5982
|
.optional()
|
|
6388
|
-
.describe('Include deleted
|
|
5983
|
+
.describe('Include deleted notification channels in response.\n\nUsage: `?includeDeleted=true`'),
|
|
5984
|
+
includeDisabled: zod_1.z.coerce
|
|
5985
|
+
.boolean()
|
|
5986
|
+
.optional()
|
|
5987
|
+
.describe('Include disabled notification channels in response.\n\nUsage: `?includeDisabled=false`'),
|
|
6389
5988
|
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
6390
5989
|
orderBy: zod_1.z
|
|
6391
|
-
.enum(['
|
|
5990
|
+
.enum(['id', 'type', 'createdAt', 'updatedAt'])
|
|
6392
5991
|
.optional()
|
|
6393
5992
|
.describe('The order by field.'),
|
|
6394
5993
|
page: zod_1.z.coerce
|
|
6395
5994
|
.number()
|
|
6396
5995
|
.min(1)
|
|
6397
|
-
.default(exports.
|
|
5996
|
+
.default(exports.listNotificationChannelsQueryPageDefault)
|
|
6398
5997
|
.describe('Page index.\n\nDefault is 1.'),
|
|
6399
5998
|
pageSize: zod_1.z.coerce
|
|
6400
5999
|
.number()
|
|
6401
6000
|
.min(1)
|
|
6402
|
-
.max(exports.
|
|
6403
|
-
.default(exports.
|
|
6001
|
+
.max(exports.listNotificationChannelsQueryPageSizeMax)
|
|
6002
|
+
.default(exports.listNotificationChannelsQueryPageSizeDefault)
|
|
6404
6003
|
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
6405
6004
|
});
|
|
6406
6005
|
/**
|
|
6407
|
-
* Create a
|
|
6408
|
-
* @summary Create
|
|
6006
|
+
* Create a new notification channel.
|
|
6007
|
+
* @summary Create a notification channel
|
|
6409
6008
|
*/
|
|
6410
|
-
exports.
|
|
6411
|
-
exports.
|
|
6412
|
-
exports.
|
|
6413
|
-
exports.createMeterBodySlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
6414
|
-
exports.createMeterBody = zod_1.z
|
|
6009
|
+
exports.createNotificationChannelBodyDisabledDefault = false;
|
|
6010
|
+
exports.createNotificationChannelBodySigningSecretRegExp = new RegExp('^(whsec_)?[a-zA-Z0-9+/=]{32,100}$');
|
|
6011
|
+
exports.createNotificationChannelBody = zod_1.z
|
|
6415
6012
|
.object({
|
|
6416
|
-
|
|
6417
|
-
.enum(['SUM', 'COUNT', 'UNIQUE_COUNT', 'AVG', 'MIN', 'MAX', 'LATEST'])
|
|
6418
|
-
.describe('The aggregation type to use for the meter.')
|
|
6419
|
-
.describe('The aggregation type to use for the meter.'),
|
|
6420
|
-
description: zod_1.z.coerce
|
|
6421
|
-
.string()
|
|
6422
|
-
.max(exports.createMeterBodyDescriptionMax)
|
|
6423
|
-
.optional()
|
|
6424
|
-
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
6425
|
-
eventFrom: zod_1.z.coerce
|
|
6426
|
-
.date()
|
|
6427
|
-
.optional()
|
|
6428
|
-
.describe('The date since the meter should include events.\nUseful to skip old events.\nIf not specified, all historical events are included.'),
|
|
6429
|
-
eventType: zod_1.z.coerce
|
|
6430
|
-
.string()
|
|
6431
|
-
.min(1)
|
|
6432
|
-
.describe('The event type to aggregate.'),
|
|
6433
|
-
groupBy: zod_1.z
|
|
6013
|
+
customHeaders: zod_1.z
|
|
6434
6014
|
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6435
6015
|
.optional()
|
|
6436
|
-
.describe('
|
|
6437
|
-
|
|
6438
|
-
.
|
|
6439
|
-
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
6440
|
-
.nullish()
|
|
6441
|
-
.describe('Additional metadata for the resource.'),
|
|
6442
|
-
name: zod_1.z.coerce
|
|
6443
|
-
.string()
|
|
6444
|
-
.min(1)
|
|
6445
|
-
.max(exports.createMeterBodyNameMax)
|
|
6016
|
+
.describe('Custom HTTP headers sent as part of the webhook request.'),
|
|
6017
|
+
disabled: zod_1.z.coerce
|
|
6018
|
+
.boolean()
|
|
6446
6019
|
.optional()
|
|
6447
|
-
.describe('
|
|
6448
|
-
|
|
6449
|
-
|
|
6450
|
-
.min(1)
|
|
6451
|
-
.max(exports.createMeterBodySlugMax)
|
|
6452
|
-
.regex(exports.createMeterBodySlugRegExp)
|
|
6453
|
-
.describe('A unique, human-readable identifier for the meter.\nMust consist only alphanumeric and underscore characters.'),
|
|
6454
|
-
valueProperty: zod_1.z.coerce
|
|
6020
|
+
.describe('Whether the channel is disabled or not.'),
|
|
6021
|
+
name: zod_1.z.coerce.string().describe('User friendly name of the channel.'),
|
|
6022
|
+
signingSecret: zod_1.z.coerce
|
|
6455
6023
|
.string()
|
|
6456
|
-
.
|
|
6024
|
+
.regex(exports.createNotificationChannelBodySigningSecretRegExp)
|
|
6457
6025
|
.optional()
|
|
6458
|
-
.describe(
|
|
6459
|
-
|
|
6460
|
-
|
|
6461
|
-
/**
|
|
6462
|
-
* Get a meter by ID or slug.
|
|
6463
|
-
* @summary Get meter
|
|
6464
|
-
*/
|
|
6465
|
-
exports.getMeterPathMeterIdOrSlugMax = 64;
|
|
6466
|
-
exports.getMeterPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6467
|
-
exports.getMeterParams = zod_1.z.object({
|
|
6468
|
-
meterIdOrSlug: zod_1.z.coerce
|
|
6026
|
+
.describe('Signing secret used for webhook request validation on the receiving end.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24'),
|
|
6027
|
+
type: zod_1.z.enum(['WEBHOOK']).describe('Notification channel type.'),
|
|
6028
|
+
url: zod_1.z.coerce
|
|
6469
6029
|
.string()
|
|
6470
|
-
.
|
|
6471
|
-
|
|
6472
|
-
|
|
6473
|
-
|
|
6030
|
+
.describe('Webhook URL where the notification is sent.'),
|
|
6031
|
+
})
|
|
6032
|
+
.describe('Request with input parameters for creating new notification channel with webhook type.')
|
|
6033
|
+
.describe('Union type for requests creating new notification channel with certain type.');
|
|
6474
6034
|
/**
|
|
6475
|
-
* Update
|
|
6476
|
-
* @summary Update
|
|
6035
|
+
* Update notification channel.
|
|
6036
|
+
* @summary Update a notification channel
|
|
6477
6037
|
*/
|
|
6478
|
-
exports.
|
|
6479
|
-
exports.
|
|
6480
|
-
|
|
6481
|
-
meterIdOrSlug: zod_1.z.coerce
|
|
6038
|
+
exports.updateNotificationChannelPathChannelIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6039
|
+
exports.updateNotificationChannelParams = zod_1.z.object({
|
|
6040
|
+
channelId: zod_1.z.coerce
|
|
6482
6041
|
.string()
|
|
6483
|
-
.
|
|
6484
|
-
.max(exports.updateMeterPathMeterIdOrSlugMax)
|
|
6485
|
-
.regex(exports.updateMeterPathMeterIdOrSlugRegExp),
|
|
6486
|
-
});
|
|
6487
|
-
exports.updateMeterBodyDescriptionMax = 1024;
|
|
6488
|
-
exports.updateMeterBodyNameMax = 256;
|
|
6489
|
-
exports.updateMeterBody = zod_1.z
|
|
6490
|
-
.object({
|
|
6491
|
-
description: zod_1.z.coerce
|
|
6492
|
-
.string()
|
|
6493
|
-
.max(exports.updateMeterBodyDescriptionMax)
|
|
6494
|
-
.optional()
|
|
6495
|
-
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
6496
|
-
groupBy: zod_1.z
|
|
6497
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6498
|
-
.optional()
|
|
6499
|
-
.describe('Named JSONPath expressions to extract the group by values from the event data.\n\nKeys must be unique and consist only alphanumeric and underscore characters.'),
|
|
6500
|
-
metadata: zod_1.z
|
|
6501
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6502
|
-
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
6503
|
-
.nullish()
|
|
6504
|
-
.describe('Additional metadata for the resource.'),
|
|
6505
|
-
name: zod_1.z.coerce
|
|
6506
|
-
.string()
|
|
6507
|
-
.min(1)
|
|
6508
|
-
.max(exports.updateMeterBodyNameMax)
|
|
6509
|
-
.optional()
|
|
6510
|
-
.describe('Human-readable name for the resource. Between 1 and 256 characters.\nDefaults to the slug if not specified.'),
|
|
6511
|
-
})
|
|
6512
|
-
.describe('A meter update model.\n\nOnly the properties that can be updated are included.\nFor example, the slug and aggregation cannot be updated.');
|
|
6513
|
-
/**
|
|
6514
|
-
* Delete a meter.
|
|
6515
|
-
* @summary Delete meter
|
|
6516
|
-
*/
|
|
6517
|
-
exports.deleteMeterPathMeterIdOrSlugMax = 64;
|
|
6518
|
-
exports.deleteMeterPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6519
|
-
exports.deleteMeterParams = zod_1.z.object({
|
|
6520
|
-
meterIdOrSlug: zod_1.z.coerce
|
|
6521
|
-
.string()
|
|
6522
|
-
.min(1)
|
|
6523
|
-
.max(exports.deleteMeterPathMeterIdOrSlugMax)
|
|
6524
|
-
.regex(exports.deleteMeterPathMeterIdOrSlugRegExp),
|
|
6525
|
-
});
|
|
6526
|
-
/**
|
|
6527
|
-
* Query meter for usage.
|
|
6528
|
-
* @summary Query meter
|
|
6529
|
-
*/
|
|
6530
|
-
exports.queryMeterPathMeterIdOrSlugMax = 64;
|
|
6531
|
-
exports.queryMeterPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6532
|
-
exports.queryMeterParams = zod_1.z.object({
|
|
6533
|
-
meterIdOrSlug: zod_1.z.coerce
|
|
6534
|
-
.string()
|
|
6535
|
-
.min(1)
|
|
6536
|
-
.max(exports.queryMeterPathMeterIdOrSlugMax)
|
|
6537
|
-
.regex(exports.queryMeterPathMeterIdOrSlugRegExp),
|
|
6538
|
-
});
|
|
6539
|
-
exports.queryMeterQueryClientIdMax = 36;
|
|
6540
|
-
exports.queryMeterQueryWindowTimeZoneDefault = 'UTC';
|
|
6541
|
-
exports.queryMeterQueryFilterCustomerIdMax = 100;
|
|
6542
|
-
exports.queryMeterQueryParams = zod_1.z.object({
|
|
6543
|
-
clientId: zod_1.z.coerce
|
|
6544
|
-
.string()
|
|
6545
|
-
.min(1)
|
|
6546
|
-
.max(exports.queryMeterQueryClientIdMax)
|
|
6547
|
-
.optional()
|
|
6548
|
-
.describe('Client ID\nUseful to track progress of a query.'),
|
|
6549
|
-
filterCustomerId: zod_1.z
|
|
6550
|
-
.array(zod_1.z.coerce.string())
|
|
6551
|
-
.max(exports.queryMeterQueryFilterCustomerIdMax)
|
|
6552
|
-
.optional()
|
|
6553
|
-
.describe('Filtering by multiple customers.\n\nFor example: ?filterCustomerId=customer-1&filterCustomerId=customer-2'),
|
|
6554
|
-
filterGroupBy: zod_1.z
|
|
6555
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6556
|
-
.optional()
|
|
6557
|
-
.describe('Simple filter for group bys with exact match.\n\nFor example: ?filterGroupBy[vendor]=openai&filterGroupBy[model]=gpt-4-turbo'),
|
|
6558
|
-
from: zod_1.z.coerce
|
|
6559
|
-
.date()
|
|
6560
|
-
.optional()
|
|
6561
|
-
.describe('Start date-time in RFC 3339 format.\n\nInclusive.\n\nFor example: ?from=2025-01-01T00%3A00%3A00.000Z'),
|
|
6562
|
-
groupBy: zod_1.z
|
|
6563
|
-
.array(zod_1.z.coerce.string())
|
|
6564
|
-
.optional()
|
|
6565
|
-
.describe('If not specified a single aggregate will be returned for each subject and time window.\n`subject` is a reserved group by value.\n\nFor example: ?groupBy=subject&groupBy=model'),
|
|
6566
|
-
subject: zod_1.z
|
|
6567
|
-
.array(zod_1.z.coerce.string())
|
|
6568
|
-
.optional()
|
|
6569
|
-
.describe('Filtering by multiple subjects.\n\nFor example: ?subject=subject-1&subject=subject-2'),
|
|
6570
|
-
to: zod_1.z.coerce
|
|
6571
|
-
.date()
|
|
6572
|
-
.optional()
|
|
6573
|
-
.describe('End date-time in RFC 3339 format.\n\nInclusive.\n\nFor example: ?to=2025-02-01T00%3A00%3A00.000Z'),
|
|
6574
|
-
windowSize: zod_1.z
|
|
6575
|
-
.enum(['MINUTE', 'HOUR', 'DAY', 'MONTH'])
|
|
6576
|
-
.optional()
|
|
6577
|
-
.describe('If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.\n\nFor example: ?windowSize=DAY'),
|
|
6578
|
-
windowTimeZone: zod_1.z.coerce
|
|
6579
|
-
.string()
|
|
6580
|
-
.default(exports.queryMeterQueryWindowTimeZoneDefault)
|
|
6581
|
-
.describe('The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).\nIf not specified, the UTC timezone will be used.\n\nFor example: ?windowTimeZone=UTC'),
|
|
6582
|
-
});
|
|
6583
|
-
/**
|
|
6584
|
-
* @summary Query meter
|
|
6585
|
-
*/
|
|
6586
|
-
exports.queryMeterPostPathMeterIdOrSlugMax = 64;
|
|
6587
|
-
exports.queryMeterPostPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6588
|
-
exports.queryMeterPostParams = zod_1.z.object({
|
|
6589
|
-
meterIdOrSlug: zod_1.z.coerce
|
|
6590
|
-
.string()
|
|
6591
|
-
.min(1)
|
|
6592
|
-
.max(exports.queryMeterPostPathMeterIdOrSlugMax)
|
|
6593
|
-
.regex(exports.queryMeterPostPathMeterIdOrSlugRegExp),
|
|
6594
|
-
});
|
|
6595
|
-
exports.queryMeterPostBodyClientIdMax = 36;
|
|
6596
|
-
exports.queryMeterPostBodyWindowTimeZoneDefault = 'UTC';
|
|
6597
|
-
exports.queryMeterPostBodySubjectMax = 100;
|
|
6598
|
-
exports.queryMeterPostBodyFilterCustomerIdMax = 100;
|
|
6599
|
-
exports.queryMeterPostBodyGroupByMax = 100;
|
|
6600
|
-
exports.queryMeterPostBody = zod_1.z
|
|
6601
|
-
.object({
|
|
6602
|
-
clientId: zod_1.z.coerce
|
|
6603
|
-
.string()
|
|
6604
|
-
.min(1)
|
|
6605
|
-
.max(exports.queryMeterPostBodyClientIdMax)
|
|
6606
|
-
.optional()
|
|
6607
|
-
.describe('Client ID\nUseful to track progress of a query.'),
|
|
6608
|
-
filterCustomerId: zod_1.z
|
|
6609
|
-
.array(zod_1.z.coerce.string())
|
|
6610
|
-
.max(exports.queryMeterPostBodyFilterCustomerIdMax)
|
|
6611
|
-
.optional()
|
|
6612
|
-
.describe('Filtering by multiple customers.'),
|
|
6613
|
-
filterGroupBy: zod_1.z
|
|
6614
|
-
.record(zod_1.z.string(), zod_1.z.array(zod_1.z.coerce.string()))
|
|
6615
|
-
.optional()
|
|
6616
|
-
.describe('Simple filter for group bys with exact match.'),
|
|
6617
|
-
from: zod_1.z.coerce
|
|
6618
|
-
.date()
|
|
6619
|
-
.optional()
|
|
6620
|
-
.describe('Start date-time in RFC 3339 format.\n\nInclusive.'),
|
|
6621
|
-
groupBy: zod_1.z
|
|
6622
|
-
.array(zod_1.z.coerce.string())
|
|
6623
|
-
.max(exports.queryMeterPostBodyGroupByMax)
|
|
6624
|
-
.optional()
|
|
6625
|
-
.describe('If not specified a single aggregate will be returned for each subject and time window.\n`subject` is a reserved group by value.'),
|
|
6626
|
-
subject: zod_1.z
|
|
6627
|
-
.array(zod_1.z.coerce.string())
|
|
6628
|
-
.max(exports.queryMeterPostBodySubjectMax)
|
|
6629
|
-
.optional()
|
|
6630
|
-
.describe('Filtering by multiple subjects.'),
|
|
6631
|
-
to: zod_1.z.coerce
|
|
6632
|
-
.date()
|
|
6633
|
-
.optional()
|
|
6634
|
-
.describe('End date-time in RFC 3339 format.\n\nInclusive.'),
|
|
6635
|
-
windowSize: zod_1.z
|
|
6636
|
-
.enum(['MINUTE', 'HOUR', 'DAY', 'MONTH'])
|
|
6637
|
-
.describe('Aggregation window size.')
|
|
6638
|
-
.optional()
|
|
6639
|
-
.describe('If not specified, a single usage aggregate will be returned for the entirety of the specified period for each subject and group.'),
|
|
6640
|
-
windowTimeZone: zod_1.z.coerce
|
|
6641
|
-
.string()
|
|
6642
|
-
.default(exports.queryMeterPostBodyWindowTimeZoneDefault)
|
|
6643
|
-
.describe('The value is the name of the time zone as defined in the IANA Time Zone Database (http://www.iana.org/time-zones).\nIf not specified, the UTC timezone will be used.'),
|
|
6644
|
-
})
|
|
6645
|
-
.describe('A meter query request.');
|
|
6646
|
-
/**
|
|
6647
|
-
* List subjects for a meter.
|
|
6648
|
-
* @summary List meter subjects
|
|
6649
|
-
*/
|
|
6650
|
-
exports.listMeterSubjectsPathMeterIdOrSlugMax = 64;
|
|
6651
|
-
exports.listMeterSubjectsPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6652
|
-
exports.listMeterSubjectsParams = zod_1.z.object({
|
|
6653
|
-
meterIdOrSlug: zod_1.z.coerce
|
|
6654
|
-
.string()
|
|
6655
|
-
.min(1)
|
|
6656
|
-
.max(exports.listMeterSubjectsPathMeterIdOrSlugMax)
|
|
6657
|
-
.regex(exports.listMeterSubjectsPathMeterIdOrSlugRegExp),
|
|
6658
|
-
});
|
|
6659
|
-
/**
|
|
6660
|
-
* List all notification channels.
|
|
6661
|
-
* @summary List notification channels
|
|
6662
|
-
*/
|
|
6663
|
-
exports.listNotificationChannelsQueryIncludeDeletedDefault = false;
|
|
6664
|
-
exports.listNotificationChannelsQueryIncludeDisabledDefault = false;
|
|
6665
|
-
exports.listNotificationChannelsQueryPageDefault = 1;
|
|
6666
|
-
exports.listNotificationChannelsQueryPageSizeDefault = 100;
|
|
6667
|
-
exports.listNotificationChannelsQueryPageSizeMax = 1000;
|
|
6668
|
-
exports.listNotificationChannelsQueryParams = zod_1.z.object({
|
|
6669
|
-
includeDeleted: zod_1.z.coerce
|
|
6670
|
-
.boolean()
|
|
6671
|
-
.optional()
|
|
6672
|
-
.describe('Include deleted notification channels in response.\n\nUsage: `?includeDeleted=true`'),
|
|
6673
|
-
includeDisabled: zod_1.z.coerce
|
|
6674
|
-
.boolean()
|
|
6675
|
-
.optional()
|
|
6676
|
-
.describe('Include disabled notification channels in response.\n\nUsage: `?includeDisabled=false`'),
|
|
6677
|
-
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
6678
|
-
orderBy: zod_1.z
|
|
6679
|
-
.enum(['id', 'type', 'createdAt', 'updatedAt'])
|
|
6680
|
-
.optional()
|
|
6681
|
-
.describe('The order by field.'),
|
|
6682
|
-
page: zod_1.z.coerce
|
|
6683
|
-
.number()
|
|
6684
|
-
.min(1)
|
|
6685
|
-
.default(exports.listNotificationChannelsQueryPageDefault)
|
|
6686
|
-
.describe('Page index.\n\nDefault is 1.'),
|
|
6687
|
-
pageSize: zod_1.z.coerce
|
|
6688
|
-
.number()
|
|
6689
|
-
.min(1)
|
|
6690
|
-
.max(exports.listNotificationChannelsQueryPageSizeMax)
|
|
6691
|
-
.default(exports.listNotificationChannelsQueryPageSizeDefault)
|
|
6692
|
-
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
6693
|
-
});
|
|
6694
|
-
/**
|
|
6695
|
-
* Create a new notification channel.
|
|
6696
|
-
* @summary Create a notification channel
|
|
6697
|
-
*/
|
|
6698
|
-
exports.createNotificationChannelBodyDisabledDefault = false;
|
|
6699
|
-
exports.createNotificationChannelBodySigningSecretRegExp = new RegExp('^(whsec_)?[a-zA-Z0-9+/=]{32,100}$');
|
|
6700
|
-
exports.createNotificationChannelBody = zod_1.z
|
|
6701
|
-
.object({
|
|
6702
|
-
customHeaders: zod_1.z
|
|
6703
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6704
|
-
.optional()
|
|
6705
|
-
.describe('Custom HTTP headers sent as part of the webhook request.'),
|
|
6706
|
-
disabled: zod_1.z.coerce
|
|
6707
|
-
.boolean()
|
|
6708
|
-
.optional()
|
|
6709
|
-
.describe('Whether the channel is disabled or not.'),
|
|
6710
|
-
name: zod_1.z.coerce.string().describe('User friendly name of the channel.'),
|
|
6711
|
-
signingSecret: zod_1.z.coerce
|
|
6712
|
-
.string()
|
|
6713
|
-
.regex(exports.createNotificationChannelBodySigningSecretRegExp)
|
|
6714
|
-
.optional()
|
|
6715
|
-
.describe('Signing secret used for webhook request validation on the receiving end.\n\nFormat: `base64` encoded random bytes optionally prefixed with `whsec_`. Recommended size: 24'),
|
|
6716
|
-
type: zod_1.z.enum(['WEBHOOK']).describe('Notification channel type.'),
|
|
6717
|
-
url: zod_1.z.coerce
|
|
6718
|
-
.string()
|
|
6719
|
-
.describe('Webhook URL where the notification is sent.'),
|
|
6720
|
-
})
|
|
6721
|
-
.describe('Request with input parameters for creating new notification channel with webhook type.')
|
|
6722
|
-
.describe('Union type for requests creating new notification channel with certain type.');
|
|
6723
|
-
/**
|
|
6724
|
-
* Update notification channel.
|
|
6725
|
-
* @summary Update a notification channel
|
|
6726
|
-
*/
|
|
6727
|
-
exports.updateNotificationChannelPathChannelIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6728
|
-
exports.updateNotificationChannelParams = zod_1.z.object({
|
|
6729
|
-
channelId: zod_1.z.coerce
|
|
6730
|
-
.string()
|
|
6731
|
-
.regex(exports.updateNotificationChannelPathChannelIdRegExp),
|
|
6042
|
+
.regex(exports.updateNotificationChannelPathChannelIdRegExp),
|
|
6732
6043
|
});
|
|
6733
6044
|
exports.updateNotificationChannelBodyDisabledDefault = false;
|
|
6734
6045
|
exports.updateNotificationChannelBodySigningSecretRegExp = new RegExp('^(whsec_)?[a-zA-Z0-9+/=]{32,100}$');
|
|
@@ -6940,8 +6251,14 @@ exports.createNotificationRuleBody = zod_1.z
|
|
|
6940
6251
|
.array(zod_1.z
|
|
6941
6252
|
.object({
|
|
6942
6253
|
type: zod_1.z
|
|
6943
|
-
.enum([
|
|
6944
|
-
|
|
6254
|
+
.enum([
|
|
6255
|
+
'PERCENT',
|
|
6256
|
+
'NUMBER',
|
|
6257
|
+
'balance_value',
|
|
6258
|
+
'usage_percentage',
|
|
6259
|
+
'usage_value',
|
|
6260
|
+
])
|
|
6261
|
+
.describe('Type of the rule in the balance threshold specification:\n* `balance_value`: threshold defined by the remaining balance value based on usage and the total of grants in the current usage period\n* `usage_percentage`: threshold defined by the usage percentage compared to the total of grants in the current usage period\n* `usage_value`: threshold defined by the usage value in the current usage period\n* `NUMBER` (**deprecated**): see `usage_value`\n* `PERCENT` (**deprecated**): see `usage_percentage`')
|
|
6945
6262
|
.describe('Type of the threshold.'),
|
|
6946
6263
|
value: zod_1.z.coerce.number().describe('Value of the threshold.'),
|
|
6947
6264
|
})
|
|
@@ -7074,8 +6391,14 @@ exports.updateNotificationRuleBody = zod_1.z
|
|
|
7074
6391
|
.array(zod_1.z
|
|
7075
6392
|
.object({
|
|
7076
6393
|
type: zod_1.z
|
|
7077
|
-
.enum([
|
|
7078
|
-
|
|
6394
|
+
.enum([
|
|
6395
|
+
'PERCENT',
|
|
6396
|
+
'NUMBER',
|
|
6397
|
+
'balance_value',
|
|
6398
|
+
'usage_percentage',
|
|
6399
|
+
'usage_value',
|
|
6400
|
+
])
|
|
6401
|
+
.describe('Type of the rule in the balance threshold specification:\n* `balance_value`: threshold defined by the remaining balance value based on usage and the total of grants in the current usage period\n* `usage_percentage`: threshold defined by the usage percentage compared to the total of grants in the current usage period\n* `usage_value`: threshold defined by the usage value in the current usage period\n* `NUMBER` (**deprecated**): see `usage_value`\n* `PERCENT` (**deprecated**): see `usage_percentage`')
|
|
7079
6402
|
.describe('Type of the threshold.'),
|
|
7080
6403
|
value: zod_1.z.coerce.number().describe('Value of the threshold.'),
|
|
7081
6404
|
})
|
|
@@ -9273,7 +8596,9 @@ exports.createEntitlementBody = zod_1.z
|
|
|
9273
8596
|
.describe('A date-time anchor to base the recurring period on.'),
|
|
9274
8597
|
interval: zod_1.z
|
|
9275
8598
|
.union([
|
|
9276
|
-
zod_1.z.coerce
|
|
8599
|
+
zod_1.z.coerce
|
|
8600
|
+
.string()
|
|
8601
|
+
.regex(createEntitlementBodyUsagePeriodIntervalRegExpTwo),
|
|
9277
8602
|
zod_1.z
|
|
9278
8603
|
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
9279
8604
|
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
@@ -9316,7 +8641,9 @@ exports.createEntitlementBody = zod_1.z
|
|
|
9316
8641
|
.describe('A date-time anchor to base the recurring period on.'),
|
|
9317
8642
|
interval: zod_1.z
|
|
9318
8643
|
.union([
|
|
9319
|
-
zod_1.z.coerce
|
|
8644
|
+
zod_1.z.coerce
|
|
8645
|
+
.string()
|
|
8646
|
+
.regex(createEntitlementBodyUsagePeriodIntervalRegExpSix),
|
|
9320
8647
|
zod_1.z
|
|
9321
8648
|
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
9322
8649
|
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
@@ -9357,7 +8684,9 @@ exports.createEntitlementBody = zod_1.z
|
|
|
9357
8684
|
.describe('A date-time anchor to base the recurring period on.'),
|
|
9358
8685
|
interval: zod_1.z
|
|
9359
8686
|
.union([
|
|
9360
|
-
zod_1.z.coerce
|
|
8687
|
+
zod_1.z.coerce
|
|
8688
|
+
.string()
|
|
8689
|
+
.regex(createEntitlementBodyUsagePeriodIntervalRegExpOnezero),
|
|
9361
8690
|
zod_1.z
|
|
9362
8691
|
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
9363
8692
|
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
@@ -9469,7 +8798,9 @@ exports.createGrantBody = zod_1.z
|
|
|
9469
8798
|
.describe('A date-time anchor to base the recurring period on.'),
|
|
9470
8799
|
interval: zod_1.z
|
|
9471
8800
|
.union([
|
|
9472
|
-
zod_1.z.coerce
|
|
8801
|
+
zod_1.z.coerce
|
|
8802
|
+
.string()
|
|
8803
|
+
.regex(createGrantBodyRecurrenceIntervalRegExpTwo),
|
|
9473
8804
|
zod_1.z
|
|
9474
8805
|
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
9475
8806
|
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
@@ -9572,7 +8903,9 @@ exports.overrideEntitlementBody = zod_1.z
|
|
|
9572
8903
|
.describe('A date-time anchor to base the recurring period on.'),
|
|
9573
8904
|
interval: zod_1.z
|
|
9574
8905
|
.union([
|
|
9575
|
-
zod_1.z.coerce
|
|
8906
|
+
zod_1.z.coerce
|
|
8907
|
+
.string()
|
|
8908
|
+
.regex(overrideEntitlementBodyUsagePeriodIntervalRegExpTwo),
|
|
9576
8909
|
zod_1.z
|
|
9577
8910
|
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
9578
8911
|
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
@@ -9615,7 +8948,9 @@ exports.overrideEntitlementBody = zod_1.z
|
|
|
9615
8948
|
.describe('A date-time anchor to base the recurring period on.'),
|
|
9616
8949
|
interval: zod_1.z
|
|
9617
8950
|
.union([
|
|
9618
|
-
zod_1.z.coerce
|
|
8951
|
+
zod_1.z.coerce
|
|
8952
|
+
.string()
|
|
8953
|
+
.regex(overrideEntitlementBodyUsagePeriodIntervalRegExpSix),
|
|
9619
8954
|
zod_1.z
|
|
9620
8955
|
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
9621
8956
|
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
@@ -9656,7 +8991,9 @@ exports.overrideEntitlementBody = zod_1.z
|
|
|
9656
8991
|
.describe('A date-time anchor to base the recurring period on.'),
|
|
9657
8992
|
interval: zod_1.z
|
|
9658
8993
|
.union([
|
|
9659
|
-
zod_1.z.coerce
|
|
8994
|
+
zod_1.z.coerce
|
|
8995
|
+
.string()
|
|
8996
|
+
.regex(overrideEntitlementBodyUsagePeriodIntervalRegExpOnezero),
|
|
9660
8997
|
zod_1.z
|
|
9661
8998
|
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
9662
8999
|
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
@@ -12077,85 +11414,970 @@ exports.changeSubscriptionBody = zod_1.z
|
|
|
12077
11414
|
.default(exports.changeSubscriptionBodyCustomPlanProRatingConfigDefault)
|
|
12078
11415
|
.describe('Default pro-rating configuration for subscriptions using this plan.'),
|
|
12079
11416
|
})
|
|
12080
|
-
.describe('The template for omitting properties.')
|
|
12081
|
-
.describe('Plan input for custom subscription creation (without key and version).')
|
|
12082
|
-
.describe('The custom plan description which defines the Subscription.'),
|
|
12083
|
-
timing: zod_1.z
|
|
12084
|
-
.union([
|
|
12085
|
-
zod_1.z
|
|
12086
|
-
.enum(['immediate', 'next_billing_cycle'])
|
|
12087
|
-
.describe('Subscription edit timing.\nWhen immediate, the requested changes take effect immediately.\nWhen nextBillingCycle, the requested changes take effect at the next billing cycle.'),
|
|
12088
|
-
zod_1.z.coerce
|
|
11417
|
+
.describe('The template for omitting properties.')
|
|
11418
|
+
.describe('Plan input for custom subscription creation (without key and version).')
|
|
11419
|
+
.describe('The custom plan description which defines the Subscription.'),
|
|
11420
|
+
timing: zod_1.z
|
|
11421
|
+
.union([
|
|
11422
|
+
zod_1.z
|
|
11423
|
+
.enum(['immediate', 'next_billing_cycle'])
|
|
11424
|
+
.describe('Subscription edit timing.\nWhen immediate, the requested changes take effect immediately.\nWhen nextBillingCycle, the requested changes take effect at the next billing cycle.'),
|
|
11425
|
+
zod_1.z.coerce
|
|
11426
|
+
.date()
|
|
11427
|
+
.describe('[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.'),
|
|
11428
|
+
])
|
|
11429
|
+
.describe('Subscription edit timing defined when the changes should take effect.\nIf the provided configuration is not supported by the subscription, an error will be returned.')
|
|
11430
|
+
.describe('Timing configuration for the change, when the change should take effect.\nFor changing a subscription, the accepted values depend on the subscription configuration.'),
|
|
11431
|
+
})
|
|
11432
|
+
.describe('Change a custom subscription.'),
|
|
11433
|
+
])
|
|
11434
|
+
.describe('Change a subscription.');
|
|
11435
|
+
/**
|
|
11436
|
+
* Migrates the subscripiton to the provided version of the current plan.
|
|
11437
|
+
If possible, the migration will be done immediately.
|
|
11438
|
+
If not, the migration will be scheduled to the end of the current billing period.
|
|
11439
|
+
* @summary Migrate subscription
|
|
11440
|
+
*/
|
|
11441
|
+
exports.migrateSubscriptionPathSubscriptionIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11442
|
+
exports.migrateSubscriptionParams = zod_1.z.object({
|
|
11443
|
+
subscriptionId: zod_1.z.coerce
|
|
11444
|
+
.string()
|
|
11445
|
+
.regex(exports.migrateSubscriptionPathSubscriptionIdRegExp),
|
|
11446
|
+
});
|
|
11447
|
+
exports.migrateSubscriptionBodyTimingDefault = 'immediate';
|
|
11448
|
+
exports.migrateSubscriptionBody = zod_1.z.object({
|
|
11449
|
+
billingAnchor: zod_1.z.coerce
|
|
11450
|
+
.date()
|
|
11451
|
+
.optional()
|
|
11452
|
+
.describe('The billing anchor of the subscription. The provided date will be normalized according to the billing cadence to the nearest recurrence before start time. If not provided, the previous subscription billing anchor will be used.'),
|
|
11453
|
+
startingPhase: zod_1.z.coerce
|
|
11454
|
+
.string()
|
|
11455
|
+
.min(1)
|
|
11456
|
+
.optional()
|
|
11457
|
+
.describe('The key of the phase to start the subscription in.\nIf not provided, the subscription will start in the first phase of the plan.'),
|
|
11458
|
+
targetVersion: zod_1.z.coerce
|
|
11459
|
+
.number()
|
|
11460
|
+
.min(1)
|
|
11461
|
+
.optional()
|
|
11462
|
+
.describe('The version of the plan to migrate to.\nIf not provided, the subscription will migrate to the latest version of the current plan.'),
|
|
11463
|
+
timing: zod_1.z
|
|
11464
|
+
.union([
|
|
11465
|
+
zod_1.z
|
|
11466
|
+
.enum(['immediate', 'next_billing_cycle'])
|
|
11467
|
+
.describe('Subscription edit timing.\nWhen immediate, the requested changes take effect immediately.\nWhen nextBillingCycle, the requested changes take effect at the next billing cycle.'),
|
|
11468
|
+
zod_1.z.coerce
|
|
11469
|
+
.date()
|
|
11470
|
+
.describe('[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.'),
|
|
11471
|
+
])
|
|
11472
|
+
.describe('Subscription edit timing defined when the changes should take effect.\nIf the provided configuration is not supported by the subscription, an error will be returned.')
|
|
11473
|
+
.default(exports.migrateSubscriptionBodyTimingDefault)
|
|
11474
|
+
.describe('Timing configuration for the migration, when the migration should take effect.\nIf not supported by the subscription, 400 will be returned.'),
|
|
11475
|
+
});
|
|
11476
|
+
/**
|
|
11477
|
+
* Restores a canceled subscription.
|
|
11478
|
+
Any subscription scheduled to start later will be deleted and this subscription will be continued indefinitely.
|
|
11479
|
+
* @summary Restore subscription
|
|
11480
|
+
*/
|
|
11481
|
+
exports.restoreSubscriptionPathSubscriptionIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11482
|
+
exports.restoreSubscriptionParams = zod_1.z.object({
|
|
11483
|
+
subscriptionId: zod_1.z.coerce
|
|
11484
|
+
.string()
|
|
11485
|
+
.regex(exports.restoreSubscriptionPathSubscriptionIdRegExp),
|
|
11486
|
+
});
|
|
11487
|
+
/**
|
|
11488
|
+
* Cancels the scheduled cancelation.
|
|
11489
|
+
* @summary Unschedule cancelation
|
|
11490
|
+
*/
|
|
11491
|
+
exports.unscheduleCancelationPathSubscriptionIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11492
|
+
exports.unscheduleCancelationParams = zod_1.z.object({
|
|
11493
|
+
subscriptionId: zod_1.z.coerce
|
|
11494
|
+
.string()
|
|
11495
|
+
.regex(exports.unscheduleCancelationPathSubscriptionIdRegExp),
|
|
11496
|
+
});
|
|
11497
|
+
/**
|
|
11498
|
+
* OpenMeter has three types of entitlements: metered, boolean, and static. The type property determines the type of entitlement. The underlying feature has to be compatible with the entitlement type specified in the request (e.g., a metered entitlement needs a feature associated with a meter).
|
|
11499
|
+
|
|
11500
|
+
- Boolean entitlements define static feature access, e.g. "Can use SSO authentication".
|
|
11501
|
+
- Static entitlements let you pass along a configuration while granting access, e.g. "Using this feature with X Y settings" (passed in the config).
|
|
11502
|
+
- Metered entitlements have many use cases, from setting up usage-based access to implementing complex credit systems. Example: The customer can use 10000 AI tokens during the usage period of the entitlement.
|
|
11503
|
+
|
|
11504
|
+
A given customer can only have one active (non-deleted) entitlement per featureKey. If you try to create a new entitlement for a featureKey that already has an active entitlement, the request will fail with a 409 error.
|
|
11505
|
+
|
|
11506
|
+
Once an entitlement is created you cannot modify it, only delete it.
|
|
11507
|
+
* @summary Create a customer entitlement
|
|
11508
|
+
*/
|
|
11509
|
+
exports.createCustomerEntitlementV2Params = zod_1.z.object({
|
|
11510
|
+
customerIdOrKey: zod_1.z.union([
|
|
11511
|
+
zod_1.z.coerce
|
|
11512
|
+
.string()
|
|
11513
|
+
.regex(createCustomerEntitlementV2PathCustomerIdOrKeyRegExpOne)
|
|
11514
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11515
|
+
zod_1.z.coerce
|
|
11516
|
+
.string()
|
|
11517
|
+
.min(1)
|
|
11518
|
+
.max(createCustomerEntitlementV2PathCustomerIdOrKeyMaxTwo)
|
|
11519
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11520
|
+
]),
|
|
11521
|
+
});
|
|
11522
|
+
exports.createCustomerEntitlementV2BodyFeatureKeyMax = 64;
|
|
11523
|
+
exports.createCustomerEntitlementV2BodyFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
11524
|
+
exports.createCustomerEntitlementV2BodyFeatureIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11525
|
+
exports.createCustomerEntitlementV2BodyIsSoftLimitDefault = false;
|
|
11526
|
+
exports.createCustomerEntitlementV2BodyIsUnlimitedDefault = false;
|
|
11527
|
+
exports.createCustomerEntitlementV2BodyIssueAfterResetMin = 0;
|
|
11528
|
+
exports.createCustomerEntitlementV2BodyIssueAfterResetPriorityDefault = 1;
|
|
11529
|
+
exports.createCustomerEntitlementV2BodyIssueAfterResetPriorityMax = 255;
|
|
11530
|
+
exports.createCustomerEntitlementV2BodyPreserveOverageAtResetDefault = false;
|
|
11531
|
+
exports.createCustomerEntitlementV2BodyFeatureKeyMaxOne = 64;
|
|
11532
|
+
exports.createCustomerEntitlementV2BodyFeatureKeyRegExpOne = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
11533
|
+
exports.createCustomerEntitlementV2BodyFeatureIdRegExpOne = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11534
|
+
exports.createCustomerEntitlementV2BodyFeatureKeyMaxTwo = 64;
|
|
11535
|
+
exports.createCustomerEntitlementV2BodyFeatureKeyRegExpTwo = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
11536
|
+
exports.createCustomerEntitlementV2BodyFeatureIdRegExpTwo = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11537
|
+
exports.createCustomerEntitlementV2Body = zod_1.z
|
|
11538
|
+
.union([
|
|
11539
|
+
zod_1.z
|
|
11540
|
+
.object({
|
|
11541
|
+
featureId: zod_1.z.coerce
|
|
11542
|
+
.string()
|
|
11543
|
+
.regex(exports.createCustomerEntitlementV2BodyFeatureIdRegExp)
|
|
11544
|
+
.optional()
|
|
11545
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
11546
|
+
featureKey: zod_1.z.coerce
|
|
11547
|
+
.string()
|
|
11548
|
+
.min(1)
|
|
11549
|
+
.max(exports.createCustomerEntitlementV2BodyFeatureKeyMax)
|
|
11550
|
+
.regex(exports.createCustomerEntitlementV2BodyFeatureKeyRegExp)
|
|
11551
|
+
.optional()
|
|
11552
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
11553
|
+
isSoftLimit: zod_1.z.coerce
|
|
11554
|
+
.boolean()
|
|
11555
|
+
.optional()
|
|
11556
|
+
.describe('If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.'),
|
|
11557
|
+
issueAfterReset: zod_1.z.coerce
|
|
11558
|
+
.number()
|
|
11559
|
+
.min(exports.createCustomerEntitlementV2BodyIssueAfterResetMin)
|
|
11560
|
+
.optional()
|
|
11561
|
+
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the \"amount\", \"minRolloverAmount\", and \"maxRolloverAmount\" fields all be the same.'),
|
|
11562
|
+
issueAfterResetPriority: zod_1.z.coerce
|
|
11563
|
+
.number()
|
|
11564
|
+
.min(1)
|
|
11565
|
+
.max(exports.createCustomerEntitlementV2BodyIssueAfterResetPriorityMax)
|
|
11566
|
+
.default(exports.createCustomerEntitlementV2BodyIssueAfterResetPriorityDefault)
|
|
11567
|
+
.describe('Defines the grant priority for the default grant.'),
|
|
11568
|
+
isUnlimited: zod_1.z.coerce
|
|
11569
|
+
.boolean()
|
|
11570
|
+
.optional()
|
|
11571
|
+
.describe('Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future.'),
|
|
11572
|
+
measureUsageFrom: zod_1.z
|
|
11573
|
+
.union([
|
|
11574
|
+
zod_1.z
|
|
11575
|
+
.enum(['CURRENT_PERIOD_START', 'NOW'])
|
|
11576
|
+
.describe('Start of measurement options'),
|
|
11577
|
+
zod_1.z.coerce
|
|
11578
|
+
.date()
|
|
11579
|
+
.describe('[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.'),
|
|
11580
|
+
])
|
|
11581
|
+
.describe('Measure usage from')
|
|
11582
|
+
.optional()
|
|
11583
|
+
.describe('Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time.'),
|
|
11584
|
+
metadata: zod_1.z
|
|
11585
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
11586
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
11587
|
+
.optional()
|
|
11588
|
+
.describe('Additional metadata for the feature.'),
|
|
11589
|
+
preserveOverageAtReset: zod_1.z.coerce
|
|
11590
|
+
.boolean()
|
|
11591
|
+
.optional()
|
|
11592
|
+
.describe('If true, the overage is preserved at reset. If false, the usage is reset to 0.'),
|
|
11593
|
+
type: zod_1.z.enum(['metered']),
|
|
11594
|
+
usagePeriod: zod_1.z
|
|
11595
|
+
.object({
|
|
11596
|
+
anchor: zod_1.z.coerce
|
|
11597
|
+
.date()
|
|
11598
|
+
.optional()
|
|
11599
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
11600
|
+
interval: zod_1.z
|
|
11601
|
+
.union([
|
|
11602
|
+
zod_1.z.coerce
|
|
11603
|
+
.string()
|
|
11604
|
+
.regex(createCustomerEntitlementV2BodyUsagePeriodIntervalRegExpTwo),
|
|
11605
|
+
zod_1.z
|
|
11606
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
11607
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
11608
|
+
])
|
|
11609
|
+
.describe('Period duration for the recurrence')
|
|
11610
|
+
.describe('The unit of time for the interval.'),
|
|
11611
|
+
})
|
|
11612
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
11613
|
+
.describe('The usage period associated with the entitlement.'),
|
|
11614
|
+
})
|
|
11615
|
+
.describe('Create inpurs for metered entitlement'),
|
|
11616
|
+
zod_1.z
|
|
11617
|
+
.object({
|
|
11618
|
+
config: zod_1.z.coerce
|
|
11619
|
+
.string()
|
|
11620
|
+
.describe('The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.'),
|
|
11621
|
+
featureId: zod_1.z.coerce
|
|
11622
|
+
.string()
|
|
11623
|
+
.regex(exports.createCustomerEntitlementV2BodyFeatureIdRegExpOne)
|
|
11624
|
+
.optional()
|
|
11625
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
11626
|
+
featureKey: zod_1.z.coerce
|
|
11627
|
+
.string()
|
|
11628
|
+
.min(1)
|
|
11629
|
+
.max(exports.createCustomerEntitlementV2BodyFeatureKeyMaxOne)
|
|
11630
|
+
.regex(exports.createCustomerEntitlementV2BodyFeatureKeyRegExpOne)
|
|
11631
|
+
.optional()
|
|
11632
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
11633
|
+
metadata: zod_1.z
|
|
11634
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
11635
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
11636
|
+
.optional()
|
|
11637
|
+
.describe('Additional metadata for the feature.'),
|
|
11638
|
+
type: zod_1.z.enum(['static']),
|
|
11639
|
+
usagePeriod: zod_1.z
|
|
11640
|
+
.object({
|
|
11641
|
+
anchor: zod_1.z.coerce
|
|
11642
|
+
.date()
|
|
11643
|
+
.optional()
|
|
11644
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
11645
|
+
interval: zod_1.z
|
|
11646
|
+
.union([
|
|
11647
|
+
zod_1.z.coerce
|
|
11648
|
+
.string()
|
|
11649
|
+
.regex(createCustomerEntitlementV2BodyUsagePeriodIntervalRegExpSix),
|
|
11650
|
+
zod_1.z
|
|
11651
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
11652
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
11653
|
+
])
|
|
11654
|
+
.describe('Period duration for the recurrence')
|
|
11655
|
+
.describe('The unit of time for the interval.'),
|
|
11656
|
+
})
|
|
11657
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
11658
|
+
.optional()
|
|
11659
|
+
.describe('The usage period associated with the entitlement.'),
|
|
11660
|
+
})
|
|
11661
|
+
.describe('Create inputs for static entitlement'),
|
|
11662
|
+
zod_1.z
|
|
11663
|
+
.object({
|
|
11664
|
+
featureId: zod_1.z.coerce
|
|
11665
|
+
.string()
|
|
11666
|
+
.regex(exports.createCustomerEntitlementV2BodyFeatureIdRegExpTwo)
|
|
11667
|
+
.optional()
|
|
11668
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
11669
|
+
featureKey: zod_1.z.coerce
|
|
11670
|
+
.string()
|
|
11671
|
+
.min(1)
|
|
11672
|
+
.max(exports.createCustomerEntitlementV2BodyFeatureKeyMaxTwo)
|
|
11673
|
+
.regex(exports.createCustomerEntitlementV2BodyFeatureKeyRegExpTwo)
|
|
11674
|
+
.optional()
|
|
11675
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
11676
|
+
metadata: zod_1.z
|
|
11677
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
11678
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
11679
|
+
.optional()
|
|
11680
|
+
.describe('Additional metadata for the feature.'),
|
|
11681
|
+
type: zod_1.z.enum(['boolean']),
|
|
11682
|
+
usagePeriod: zod_1.z
|
|
11683
|
+
.object({
|
|
11684
|
+
anchor: zod_1.z.coerce
|
|
11685
|
+
.date()
|
|
11686
|
+
.optional()
|
|
11687
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
11688
|
+
interval: zod_1.z
|
|
11689
|
+
.union([
|
|
11690
|
+
zod_1.z.coerce
|
|
11691
|
+
.string()
|
|
11692
|
+
.regex(createCustomerEntitlementV2BodyUsagePeriodIntervalRegExpOnezero),
|
|
11693
|
+
zod_1.z
|
|
11694
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
11695
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
11696
|
+
])
|
|
11697
|
+
.describe('Period duration for the recurrence')
|
|
11698
|
+
.describe('The unit of time for the interval.'),
|
|
11699
|
+
})
|
|
11700
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
11701
|
+
.optional()
|
|
11702
|
+
.describe('The usage period associated with the entitlement.'),
|
|
11703
|
+
})
|
|
11704
|
+
.describe('Create inputs for boolean entitlement'),
|
|
11705
|
+
])
|
|
11706
|
+
.describe('Create inputs for entitlement');
|
|
11707
|
+
/**
|
|
11708
|
+
* List all entitlements for a customer. For checking entitlement access, use the /value endpoint instead.
|
|
11709
|
+
* @summary List customer entitlements
|
|
11710
|
+
*/
|
|
11711
|
+
exports.listCustomerEntitlementsV2Params = zod_1.z.object({
|
|
11712
|
+
customerIdOrKey: zod_1.z.union([
|
|
11713
|
+
zod_1.z.coerce
|
|
11714
|
+
.string()
|
|
11715
|
+
.regex(listCustomerEntitlementsV2PathCustomerIdOrKeyRegExpOne)
|
|
11716
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11717
|
+
zod_1.z.coerce
|
|
11718
|
+
.string()
|
|
11719
|
+
.min(1)
|
|
11720
|
+
.max(listCustomerEntitlementsV2PathCustomerIdOrKeyMaxTwo)
|
|
11721
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11722
|
+
]),
|
|
11723
|
+
});
|
|
11724
|
+
exports.listCustomerEntitlementsV2QueryIncludeDeletedDefault = false;
|
|
11725
|
+
exports.listCustomerEntitlementsV2QueryPageDefault = 1;
|
|
11726
|
+
exports.listCustomerEntitlementsV2QueryPageSizeDefault = 100;
|
|
11727
|
+
exports.listCustomerEntitlementsV2QueryPageSizeMax = 1000;
|
|
11728
|
+
exports.listCustomerEntitlementsV2QueryOffsetDefault = 0;
|
|
11729
|
+
exports.listCustomerEntitlementsV2QueryOffsetMin = 0;
|
|
11730
|
+
exports.listCustomerEntitlementsV2QueryLimitDefault = 100;
|
|
11731
|
+
exports.listCustomerEntitlementsV2QueryLimitMax = 1000;
|
|
11732
|
+
exports.listCustomerEntitlementsV2QueryParams = zod_1.z.object({
|
|
11733
|
+
includeDeleted: zod_1.z.coerce.boolean().optional(),
|
|
11734
|
+
limit: zod_1.z.coerce
|
|
11735
|
+
.number()
|
|
11736
|
+
.min(1)
|
|
11737
|
+
.max(exports.listCustomerEntitlementsV2QueryLimitMax)
|
|
11738
|
+
.default(exports.listCustomerEntitlementsV2QueryLimitDefault)
|
|
11739
|
+
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
11740
|
+
offset: zod_1.z.coerce
|
|
11741
|
+
.number()
|
|
11742
|
+
.min(exports.listCustomerEntitlementsV2QueryOffsetMin)
|
|
11743
|
+
.optional()
|
|
11744
|
+
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
11745
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
11746
|
+
orderBy: zod_1.z
|
|
11747
|
+
.enum(['createdAt', 'updatedAt'])
|
|
11748
|
+
.optional()
|
|
11749
|
+
.describe('The order by field.'),
|
|
11750
|
+
page: zod_1.z.coerce
|
|
11751
|
+
.number()
|
|
11752
|
+
.min(1)
|
|
11753
|
+
.default(exports.listCustomerEntitlementsV2QueryPageDefault)
|
|
11754
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
11755
|
+
pageSize: zod_1.z.coerce
|
|
11756
|
+
.number()
|
|
11757
|
+
.min(1)
|
|
11758
|
+
.max(exports.listCustomerEntitlementsV2QueryPageSizeMax)
|
|
11759
|
+
.default(exports.listCustomerEntitlementsV2QueryPageSizeDefault)
|
|
11760
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
11761
|
+
});
|
|
11762
|
+
/**
|
|
11763
|
+
* Get entitlement by feature key. For checking entitlement access, use the /value endpoint instead.
|
|
11764
|
+
If featureKey is used, the entitlement is resolved for the current timestamp.
|
|
11765
|
+
* @summary Get customer entitlement
|
|
11766
|
+
*/
|
|
11767
|
+
exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11768
|
+
exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11769
|
+
exports.getCustomerEntitlementV2Params = zod_1.z.object({
|
|
11770
|
+
customerIdOrKey: zod_1.z.union([
|
|
11771
|
+
zod_1.z.coerce
|
|
11772
|
+
.string()
|
|
11773
|
+
.regex(getCustomerEntitlementV2PathCustomerIdOrKeyRegExpOne)
|
|
11774
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11775
|
+
zod_1.z.coerce
|
|
11776
|
+
.string()
|
|
11777
|
+
.min(1)
|
|
11778
|
+
.max(getCustomerEntitlementV2PathCustomerIdOrKeyMaxTwo)
|
|
11779
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11780
|
+
]),
|
|
11781
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
11782
|
+
.string()
|
|
11783
|
+
.min(1)
|
|
11784
|
+
.max(exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax)
|
|
11785
|
+
.regex(exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
11786
|
+
});
|
|
11787
|
+
/**
|
|
11788
|
+
* Deleting an entitlement revokes access to the associated feature. As a single customer can only have one entitlement per featureKey, when "migrating" features you have to delete the old entitlements as well.
|
|
11789
|
+
As access and status checks can be historical queries, deleting an entitlement populates the deletedAt timestamp. When queried for a time before that, the entitlement is still considered active, you cannot have retroactive changes to access, which is important for, among other things, auditing.
|
|
11790
|
+
* @summary Delete customer entitlement
|
|
11791
|
+
*/
|
|
11792
|
+
exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11793
|
+
exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11794
|
+
exports.deleteCustomerEntitlementV2Params = zod_1.z.object({
|
|
11795
|
+
customerIdOrKey: zod_1.z.union([
|
|
11796
|
+
zod_1.z.coerce
|
|
11797
|
+
.string()
|
|
11798
|
+
.regex(deleteCustomerEntitlementV2PathCustomerIdOrKeyRegExpOne)
|
|
11799
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11800
|
+
zod_1.z.coerce
|
|
11801
|
+
.string()
|
|
11802
|
+
.min(1)
|
|
11803
|
+
.max(deleteCustomerEntitlementV2PathCustomerIdOrKeyMaxTwo)
|
|
11804
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11805
|
+
]),
|
|
11806
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
11807
|
+
.string()
|
|
11808
|
+
.min(1)
|
|
11809
|
+
.max(exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax)
|
|
11810
|
+
.regex(exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
11811
|
+
});
|
|
11812
|
+
/**
|
|
11813
|
+
* List all grants issued for an entitlement. The entitlement can be defined either by its id or featureKey.
|
|
11814
|
+
* @summary List customer entitlement grants
|
|
11815
|
+
*/
|
|
11816
|
+
exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11817
|
+
exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11818
|
+
exports.listCustomerEntitlementGrantsV2Params = zod_1.z.object({
|
|
11819
|
+
customerIdOrKey: zod_1.z.union([
|
|
11820
|
+
zod_1.z.coerce
|
|
11821
|
+
.string()
|
|
11822
|
+
.regex(listCustomerEntitlementGrantsV2PathCustomerIdOrKeyRegExpOne)
|
|
11823
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11824
|
+
zod_1.z.coerce
|
|
11825
|
+
.string()
|
|
11826
|
+
.min(1)
|
|
11827
|
+
.max(listCustomerEntitlementGrantsV2PathCustomerIdOrKeyMaxTwo)
|
|
11828
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11829
|
+
]),
|
|
11830
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
11831
|
+
.string()
|
|
11832
|
+
.min(1)
|
|
11833
|
+
.max(exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyMax)
|
|
11834
|
+
.regex(exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
11835
|
+
});
|
|
11836
|
+
exports.listCustomerEntitlementGrantsV2QueryIncludeDeletedDefault = false;
|
|
11837
|
+
exports.listCustomerEntitlementGrantsV2QueryPageDefault = 1;
|
|
11838
|
+
exports.listCustomerEntitlementGrantsV2QueryPageSizeDefault = 100;
|
|
11839
|
+
exports.listCustomerEntitlementGrantsV2QueryPageSizeMax = 1000;
|
|
11840
|
+
exports.listCustomerEntitlementGrantsV2QueryOffsetDefault = 0;
|
|
11841
|
+
exports.listCustomerEntitlementGrantsV2QueryOffsetMin = 0;
|
|
11842
|
+
exports.listCustomerEntitlementGrantsV2QueryLimitDefault = 100;
|
|
11843
|
+
exports.listCustomerEntitlementGrantsV2QueryLimitMax = 1000;
|
|
11844
|
+
exports.listCustomerEntitlementGrantsV2QueryParams = zod_1.z.object({
|
|
11845
|
+
includeDeleted: zod_1.z.coerce.boolean().optional(),
|
|
11846
|
+
limit: zod_1.z.coerce
|
|
11847
|
+
.number()
|
|
11848
|
+
.min(1)
|
|
11849
|
+
.max(exports.listCustomerEntitlementGrantsV2QueryLimitMax)
|
|
11850
|
+
.default(exports.listCustomerEntitlementGrantsV2QueryLimitDefault)
|
|
11851
|
+
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
11852
|
+
offset: zod_1.z.coerce
|
|
11853
|
+
.number()
|
|
11854
|
+
.min(exports.listCustomerEntitlementGrantsV2QueryOffsetMin)
|
|
11855
|
+
.optional()
|
|
11856
|
+
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
11857
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
11858
|
+
orderBy: zod_1.z
|
|
11859
|
+
.enum(['id', 'createdAt', 'updatedAt'])
|
|
11860
|
+
.optional()
|
|
11861
|
+
.describe('The order by field.'),
|
|
11862
|
+
page: zod_1.z.coerce
|
|
11863
|
+
.number()
|
|
11864
|
+
.min(1)
|
|
11865
|
+
.default(exports.listCustomerEntitlementGrantsV2QueryPageDefault)
|
|
11866
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
11867
|
+
pageSize: zod_1.z.coerce
|
|
11868
|
+
.number()
|
|
11869
|
+
.min(1)
|
|
11870
|
+
.max(exports.listCustomerEntitlementGrantsV2QueryPageSizeMax)
|
|
11871
|
+
.default(exports.listCustomerEntitlementGrantsV2QueryPageSizeDefault)
|
|
11872
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
11873
|
+
});
|
|
11874
|
+
/**
|
|
11875
|
+
* Grants define a behavior of granting usage for a metered entitlement. They can have complicated recurrence and rollover rules, thanks to which you can define a wide range of access patterns with a single grant, in most cases you don't have to periodically create new grants. You can only issue grants for active metered entitlements.
|
|
11876
|
+
|
|
11877
|
+
A grant defines a given amount of usage that can be consumed for the entitlement. The grant is in effect between its effective date and its expiration date. Specifying both is mandatory for new grants.
|
|
11878
|
+
|
|
11879
|
+
Grants have a priority setting that determines their order of use. Lower numbers have higher priority, with 0 being the highest priority.
|
|
11880
|
+
|
|
11881
|
+
Grants can have a recurrence setting intended to automate the manual reissuing of grants. For example, a daily recurrence is equal to reissuing that same grant every day (ignoring rollover settings).
|
|
11882
|
+
|
|
11883
|
+
Rollover settings define what happens to the remaining balance of a grant at a reset. Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))
|
|
11884
|
+
|
|
11885
|
+
Grants cannot be changed once created, only deleted. This is to ensure that balance is deterministic regardless of when it is queried.
|
|
11886
|
+
* @summary Create customer entitlement grant
|
|
11887
|
+
*/
|
|
11888
|
+
exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11889
|
+
exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11890
|
+
exports.createCustomerEntitlementGrantV2Params = zod_1.z.object({
|
|
11891
|
+
customerIdOrKey: zod_1.z.union([
|
|
11892
|
+
zod_1.z.coerce
|
|
11893
|
+
.string()
|
|
11894
|
+
.regex(createCustomerEntitlementGrantV2PathCustomerIdOrKeyRegExpOne)
|
|
11895
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11896
|
+
zod_1.z.coerce
|
|
11897
|
+
.string()
|
|
11898
|
+
.min(1)
|
|
11899
|
+
.max(createCustomerEntitlementGrantV2PathCustomerIdOrKeyMaxTwo)
|
|
11900
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11901
|
+
]),
|
|
11902
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
11903
|
+
.string()
|
|
11904
|
+
.min(1)
|
|
11905
|
+
.max(exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyMax)
|
|
11906
|
+
.regex(exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
11907
|
+
});
|
|
11908
|
+
exports.createCustomerEntitlementGrantV2BodyAmountMin = 0;
|
|
11909
|
+
exports.createCustomerEntitlementGrantV2BodyPriorityMax = 255;
|
|
11910
|
+
exports.createCustomerEntitlementGrantV2BodyExpirationCountMax = 1000;
|
|
11911
|
+
exports.createCustomerEntitlementGrantV2BodyMaxRolloverAmountDefault = 0;
|
|
11912
|
+
exports.createCustomerEntitlementGrantV2BodyMinRolloverAmountDefault = 0;
|
|
11913
|
+
exports.createCustomerEntitlementGrantV2Body = zod_1.z
|
|
11914
|
+
.object({
|
|
11915
|
+
amount: zod_1.z.coerce
|
|
11916
|
+
.number()
|
|
11917
|
+
.min(exports.createCustomerEntitlementGrantV2BodyAmountMin)
|
|
11918
|
+
.describe('The amount to grant. Should be a positive number.'),
|
|
11919
|
+
effectiveAt: zod_1.z.coerce
|
|
11920
|
+
.date()
|
|
11921
|
+
.describe('Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).'),
|
|
11922
|
+
expiration: zod_1.z
|
|
11923
|
+
.object({
|
|
11924
|
+
count: zod_1.z.coerce
|
|
11925
|
+
.number()
|
|
11926
|
+
.min(1)
|
|
11927
|
+
.max(exports.createCustomerEntitlementGrantV2BodyExpirationCountMax)
|
|
11928
|
+
.describe('The number of time units in the expiration period.'),
|
|
11929
|
+
duration: zod_1.z
|
|
11930
|
+
.enum(['HOUR', 'DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
11931
|
+
.describe('The expiration duration enum')
|
|
11932
|
+
.describe('The unit of time for the expiration period.'),
|
|
11933
|
+
})
|
|
11934
|
+
.describe('The grant expiration definition')
|
|
11935
|
+
.describe('The grant expiration definition'),
|
|
11936
|
+
maxRolloverAmount: zod_1.z.coerce
|
|
11937
|
+
.number()
|
|
11938
|
+
.optional()
|
|
11939
|
+
.describe('Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))'),
|
|
11940
|
+
metadata: zod_1.z
|
|
11941
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
11942
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
11943
|
+
.optional()
|
|
11944
|
+
.describe('The grant metadata.'),
|
|
11945
|
+
minRolloverAmount: zod_1.z.coerce
|
|
11946
|
+
.number()
|
|
11947
|
+
.optional()
|
|
11948
|
+
.describe('Grants are rolled over at reset, after which they can have a different balance compared to what they had before the reset.\nBalance after the reset is calculated as: Balance_After_Reset = MIN(MaxRolloverAmount, MAX(Balance_Before_Reset, MinRolloverAmount))'),
|
|
11949
|
+
priority: zod_1.z.coerce
|
|
11950
|
+
.number()
|
|
11951
|
+
.min(1)
|
|
11952
|
+
.max(exports.createCustomerEntitlementGrantV2BodyPriorityMax)
|
|
11953
|
+
.optional()
|
|
11954
|
+
.describe('The priority of the grant. Grants with higher priority are applied first.\nPriority is a positive decimal numbers. With lower numbers indicating higher importance.\nFor example, a priority of 1 is more urgent than a priority of 2.\nWhen there are several grants available for the same subject, the system selects the grant with the highest priority.\nIn cases where grants share the same priority level, the grant closest to its expiration will be used first.\nIn the case of two grants have identical priorities and expiration dates, the system will use the grant that was created first.'),
|
|
11955
|
+
recurrence: zod_1.z
|
|
11956
|
+
.object({
|
|
11957
|
+
anchor: zod_1.z.coerce
|
|
11958
|
+
.date()
|
|
11959
|
+
.optional()
|
|
11960
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
11961
|
+
interval: zod_1.z
|
|
11962
|
+
.union([
|
|
11963
|
+
zod_1.z.coerce
|
|
11964
|
+
.string()
|
|
11965
|
+
.regex(createCustomerEntitlementGrantV2BodyRecurrenceIntervalRegExpTwo),
|
|
11966
|
+
zod_1.z
|
|
11967
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
11968
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
11969
|
+
])
|
|
11970
|
+
.describe('Period duration for the recurrence')
|
|
11971
|
+
.describe('The unit of time for the interval.'),
|
|
11972
|
+
})
|
|
11973
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
11974
|
+
.optional()
|
|
11975
|
+
.describe('The subject of the grant.'),
|
|
11976
|
+
})
|
|
11977
|
+
.describe('The grant creation input.');
|
|
11978
|
+
/**
|
|
11979
|
+
* Returns historical balance and usage data for the entitlement. The queried history can span accross multiple reset events.
|
|
11980
|
+
|
|
11981
|
+
BurndownHistory returns a continous history of segments, where the segments are seperated by events that changed either the grant burndown priority or the usage period.
|
|
11982
|
+
|
|
11983
|
+
WindowedHistory returns windowed usage data for the period enriched with balance information and the list of grants that were being burnt down in that window.
|
|
11984
|
+
* @summary Get customer entitlement history
|
|
11985
|
+
*/
|
|
11986
|
+
exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11987
|
+
exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11988
|
+
exports.getCustomerEntitlementHistoryV2Params = zod_1.z.object({
|
|
11989
|
+
customerIdOrKey: zod_1.z.union([
|
|
11990
|
+
zod_1.z.coerce
|
|
11991
|
+
.string()
|
|
11992
|
+
.regex(getCustomerEntitlementHistoryV2PathCustomerIdOrKeyRegExpOne)
|
|
11993
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11994
|
+
zod_1.z.coerce
|
|
11995
|
+
.string()
|
|
11996
|
+
.min(1)
|
|
11997
|
+
.max(getCustomerEntitlementHistoryV2PathCustomerIdOrKeyMaxTwo)
|
|
11998
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11999
|
+
]),
|
|
12000
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
12001
|
+
.string()
|
|
12002
|
+
.min(1)
|
|
12003
|
+
.max(exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyMax)
|
|
12004
|
+
.regex(exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
12005
|
+
});
|
|
12006
|
+
exports.getCustomerEntitlementHistoryV2QueryWindowTimeZoneDefault = 'UTC';
|
|
12007
|
+
exports.getCustomerEntitlementHistoryV2QueryParams = zod_1.z.object({
|
|
12008
|
+
from: zod_1.z.coerce
|
|
12009
|
+
.date()
|
|
12010
|
+
.optional()
|
|
12011
|
+
.describe('Start of time range to query entitlement: date-time in RFC 3339 format. Defaults to the last reset. Gets truncated to the granularity of the underlying meter.'),
|
|
12012
|
+
to: zod_1.z.coerce
|
|
12013
|
+
.date()
|
|
12014
|
+
.optional()
|
|
12015
|
+
.describe('End of time range to query entitlement: date-time in RFC 3339 format. Defaults to now.\nIf not now then gets truncated to the granularity of the underlying meter.'),
|
|
12016
|
+
windowSize: zod_1.z
|
|
12017
|
+
.enum(['MINUTE', 'HOUR', 'DAY', 'MONTH'])
|
|
12018
|
+
.describe('Windowsize'),
|
|
12019
|
+
windowTimeZone: zod_1.z.coerce
|
|
12020
|
+
.string()
|
|
12021
|
+
.default(exports.getCustomerEntitlementHistoryV2QueryWindowTimeZoneDefault)
|
|
12022
|
+
.describe('The timezone used when calculating the windows.'),
|
|
12023
|
+
});
|
|
12024
|
+
/**
|
|
12025
|
+
* Overriding an entitlement creates a new entitlement from the provided inputs and soft deletes the previous entitlement for the provided customer-feature pair. If the previous entitlement is already deleted or otherwise doesnt exist, the override will fail.
|
|
12026
|
+
|
|
12027
|
+
This endpoint is useful for upgrades, downgrades, or other changes to entitlements that require a new entitlement to be created with zero downtime.
|
|
12028
|
+
* @summary Override customer entitlement
|
|
12029
|
+
*/
|
|
12030
|
+
exports.overrideCustomerEntitlementV2Params = zod_1.z.object({
|
|
12031
|
+
customerIdOrKey: zod_1.z.union([
|
|
12032
|
+
zod_1.z.coerce
|
|
12033
|
+
.string()
|
|
12034
|
+
.regex(overrideCustomerEntitlementV2PathCustomerIdOrKeyRegExpOne)
|
|
12035
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12036
|
+
zod_1.z.coerce
|
|
12037
|
+
.string()
|
|
12038
|
+
.min(1)
|
|
12039
|
+
.max(overrideCustomerEntitlementV2PathCustomerIdOrKeyMaxTwo)
|
|
12040
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12041
|
+
]),
|
|
12042
|
+
entitlementIdOrFeatureKey: zod_1.z.union([
|
|
12043
|
+
zod_1.z.coerce
|
|
12044
|
+
.string()
|
|
12045
|
+
.regex(overrideCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExpOne)
|
|
12046
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12047
|
+
zod_1.z.coerce
|
|
12048
|
+
.string()
|
|
12049
|
+
.min(1)
|
|
12050
|
+
.max(overrideCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMaxTwo)
|
|
12051
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12052
|
+
]),
|
|
12053
|
+
});
|
|
12054
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyMax = 64;
|
|
12055
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
12056
|
+
exports.overrideCustomerEntitlementV2BodyFeatureIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12057
|
+
exports.overrideCustomerEntitlementV2BodyIsSoftLimitDefault = false;
|
|
12058
|
+
exports.overrideCustomerEntitlementV2BodyIsUnlimitedDefault = false;
|
|
12059
|
+
exports.overrideCustomerEntitlementV2BodyIssueAfterResetMin = 0;
|
|
12060
|
+
exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityDefault = 1;
|
|
12061
|
+
exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityMax = 255;
|
|
12062
|
+
exports.overrideCustomerEntitlementV2BodyPreserveOverageAtResetDefault = false;
|
|
12063
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxOne = 64;
|
|
12064
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpOne = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
12065
|
+
exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpOne = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12066
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxTwo = 64;
|
|
12067
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpTwo = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
12068
|
+
exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpTwo = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12069
|
+
exports.overrideCustomerEntitlementV2Body = zod_1.z
|
|
12070
|
+
.union([
|
|
12071
|
+
zod_1.z
|
|
12072
|
+
.object({
|
|
12073
|
+
featureId: zod_1.z.coerce
|
|
12074
|
+
.string()
|
|
12075
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureIdRegExp)
|
|
12076
|
+
.optional()
|
|
12077
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12078
|
+
featureKey: zod_1.z.coerce
|
|
12079
|
+
.string()
|
|
12080
|
+
.min(1)
|
|
12081
|
+
.max(exports.overrideCustomerEntitlementV2BodyFeatureKeyMax)
|
|
12082
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExp)
|
|
12083
|
+
.optional()
|
|
12084
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12085
|
+
isSoftLimit: zod_1.z.coerce
|
|
12086
|
+
.boolean()
|
|
12087
|
+
.optional()
|
|
12088
|
+
.describe('If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.'),
|
|
12089
|
+
issueAfterReset: zod_1.z.coerce
|
|
12090
|
+
.number()
|
|
12091
|
+
.min(exports.overrideCustomerEntitlementV2BodyIssueAfterResetMin)
|
|
12092
|
+
.optional()
|
|
12093
|
+
.describe('You can grant usage automatically alongside the entitlement, the example scenario would be creating a starting balance.\nIf an amount is specified here, a grant will be created alongside the entitlement with the specified amount.\nThat grant will have it\'s rollover settings configured in a way that after each reset operation, the balance will return the original amount specified here.\nManually creating such a grant would mean having the \"amount\", \"minRolloverAmount\", and \"maxRolloverAmount\" fields all be the same.'),
|
|
12094
|
+
issueAfterResetPriority: zod_1.z.coerce
|
|
12095
|
+
.number()
|
|
12096
|
+
.min(1)
|
|
12097
|
+
.max(exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityMax)
|
|
12098
|
+
.default(exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityDefault)
|
|
12099
|
+
.describe('Defines the grant priority for the default grant.'),
|
|
12100
|
+
isUnlimited: zod_1.z.coerce
|
|
12101
|
+
.boolean()
|
|
12102
|
+
.optional()
|
|
12103
|
+
.describe('Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future.'),
|
|
12104
|
+
measureUsageFrom: zod_1.z
|
|
12105
|
+
.union([
|
|
12106
|
+
zod_1.z
|
|
12107
|
+
.enum(['CURRENT_PERIOD_START', 'NOW'])
|
|
12108
|
+
.describe('Start of measurement options'),
|
|
12109
|
+
zod_1.z.coerce
|
|
12110
|
+
.date()
|
|
12111
|
+
.describe('[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.'),
|
|
12112
|
+
])
|
|
12113
|
+
.describe('Measure usage from')
|
|
12114
|
+
.optional()
|
|
12115
|
+
.describe('Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time.'),
|
|
12116
|
+
metadata: zod_1.z
|
|
12117
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
12118
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
12119
|
+
.optional()
|
|
12120
|
+
.describe('Additional metadata for the feature.'),
|
|
12121
|
+
preserveOverageAtReset: zod_1.z.coerce
|
|
12122
|
+
.boolean()
|
|
12123
|
+
.optional()
|
|
12124
|
+
.describe('If true, the overage is preserved at reset. If false, the usage is reset to 0.'),
|
|
12125
|
+
type: zod_1.z.enum(['metered']),
|
|
12126
|
+
usagePeriod: zod_1.z
|
|
12127
|
+
.object({
|
|
12128
|
+
anchor: zod_1.z.coerce
|
|
12129
|
+
.date()
|
|
12130
|
+
.optional()
|
|
12131
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
12132
|
+
interval: zod_1.z
|
|
12133
|
+
.union([
|
|
12134
|
+
zod_1.z.coerce
|
|
12135
|
+
.string()
|
|
12136
|
+
.regex(overrideCustomerEntitlementV2BodyUsagePeriodIntervalRegExpTwo),
|
|
12137
|
+
zod_1.z
|
|
12138
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
12139
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
12140
|
+
])
|
|
12141
|
+
.describe('Period duration for the recurrence')
|
|
12142
|
+
.describe('The unit of time for the interval.'),
|
|
12143
|
+
})
|
|
12144
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
12145
|
+
.describe('The usage period associated with the entitlement.'),
|
|
12146
|
+
})
|
|
12147
|
+
.describe('Create inpurs for metered entitlement'),
|
|
12148
|
+
zod_1.z
|
|
12149
|
+
.object({
|
|
12150
|
+
config: zod_1.z.coerce
|
|
12151
|
+
.string()
|
|
12152
|
+
.describe('The JSON parsable config of the entitlement. This value is also returned when checking entitlement access and it is useful for configuring fine-grained access settings to the feature, implemented in your own system. Has to be an object.'),
|
|
12153
|
+
featureId: zod_1.z.coerce
|
|
12154
|
+
.string()
|
|
12155
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpOne)
|
|
12156
|
+
.optional()
|
|
12157
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12158
|
+
featureKey: zod_1.z.coerce
|
|
12159
|
+
.string()
|
|
12160
|
+
.min(1)
|
|
12161
|
+
.max(exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxOne)
|
|
12162
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpOne)
|
|
12163
|
+
.optional()
|
|
12164
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12165
|
+
metadata: zod_1.z
|
|
12166
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
12167
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
12168
|
+
.optional()
|
|
12169
|
+
.describe('Additional metadata for the feature.'),
|
|
12170
|
+
type: zod_1.z.enum(['static']),
|
|
12171
|
+
usagePeriod: zod_1.z
|
|
12172
|
+
.object({
|
|
12173
|
+
anchor: zod_1.z.coerce
|
|
12174
|
+
.date()
|
|
12175
|
+
.optional()
|
|
12176
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
12177
|
+
interval: zod_1.z
|
|
12178
|
+
.union([
|
|
12179
|
+
zod_1.z.coerce
|
|
12180
|
+
.string()
|
|
12181
|
+
.regex(overrideCustomerEntitlementV2BodyUsagePeriodIntervalRegExpSix),
|
|
12182
|
+
zod_1.z
|
|
12183
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
12184
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
12185
|
+
])
|
|
12186
|
+
.describe('Period duration for the recurrence')
|
|
12187
|
+
.describe('The unit of time for the interval.'),
|
|
12188
|
+
})
|
|
12189
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
12190
|
+
.optional()
|
|
12191
|
+
.describe('The usage period associated with the entitlement.'),
|
|
12192
|
+
})
|
|
12193
|
+
.describe('Create inputs for static entitlement'),
|
|
12194
|
+
zod_1.z
|
|
12195
|
+
.object({
|
|
12196
|
+
featureId: zod_1.z.coerce
|
|
12197
|
+
.string()
|
|
12198
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpTwo)
|
|
12199
|
+
.optional()
|
|
12200
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12201
|
+
featureKey: zod_1.z.coerce
|
|
12202
|
+
.string()
|
|
12203
|
+
.min(1)
|
|
12204
|
+
.max(exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxTwo)
|
|
12205
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpTwo)
|
|
12206
|
+
.optional()
|
|
12207
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12208
|
+
metadata: zod_1.z
|
|
12209
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
12210
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
12211
|
+
.optional()
|
|
12212
|
+
.describe('Additional metadata for the feature.'),
|
|
12213
|
+
type: zod_1.z.enum(['boolean']),
|
|
12214
|
+
usagePeriod: zod_1.z
|
|
12215
|
+
.object({
|
|
12216
|
+
anchor: zod_1.z.coerce
|
|
12089
12217
|
.date()
|
|
12090
|
-
.
|
|
12091
|
-
|
|
12092
|
-
|
|
12093
|
-
|
|
12218
|
+
.optional()
|
|
12219
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
12220
|
+
interval: zod_1.z
|
|
12221
|
+
.union([
|
|
12222
|
+
zod_1.z.coerce
|
|
12223
|
+
.string()
|
|
12224
|
+
.regex(overrideCustomerEntitlementV2BodyUsagePeriodIntervalRegExpOnezero),
|
|
12225
|
+
zod_1.z
|
|
12226
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
12227
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
12228
|
+
])
|
|
12229
|
+
.describe('Period duration for the recurrence')
|
|
12230
|
+
.describe('The unit of time for the interval.'),
|
|
12231
|
+
})
|
|
12232
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
12233
|
+
.optional()
|
|
12234
|
+
.describe('The usage period associated with the entitlement.'),
|
|
12094
12235
|
})
|
|
12095
|
-
.describe('
|
|
12236
|
+
.describe('Create inputs for boolean entitlement'),
|
|
12096
12237
|
])
|
|
12097
|
-
.describe('
|
|
12238
|
+
.describe('Create inputs for entitlement');
|
|
12098
12239
|
/**
|
|
12099
|
-
*
|
|
12100
|
-
|
|
12101
|
-
|
|
12102
|
-
* @summary
|
|
12240
|
+
* Reset marks the start of a new usage period for the entitlement and initiates grant rollover. At the start of a period usage is zerod out and grants are rolled over based on their rollover settings. It would typically be synced with the customers billing period to enforce usage based on their subscription.
|
|
12241
|
+
|
|
12242
|
+
Usage is automatically reset for metered entitlements based on their usage period, but this endpoint allows to manually reset it at any time. When doing so the period anchor of the entitlement can be changed if needed.
|
|
12243
|
+
* @summary Reset customer entitlement
|
|
12103
12244
|
*/
|
|
12104
|
-
exports.
|
|
12105
|
-
exports.
|
|
12106
|
-
|
|
12245
|
+
exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
12246
|
+
exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12247
|
+
exports.resetCustomerEntitlementUsageV2Params = zod_1.z.object({
|
|
12248
|
+
customerIdOrKey: zod_1.z.union([
|
|
12249
|
+
zod_1.z.coerce
|
|
12250
|
+
.string()
|
|
12251
|
+
.regex(resetCustomerEntitlementUsageV2PathCustomerIdOrKeyRegExpOne)
|
|
12252
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12253
|
+
zod_1.z.coerce
|
|
12254
|
+
.string()
|
|
12255
|
+
.min(1)
|
|
12256
|
+
.max(resetCustomerEntitlementUsageV2PathCustomerIdOrKeyMaxTwo)
|
|
12257
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12258
|
+
]),
|
|
12259
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
12107
12260
|
.string()
|
|
12108
|
-
.
|
|
12261
|
+
.min(1)
|
|
12262
|
+
.max(exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyMax)
|
|
12263
|
+
.regex(exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
12109
12264
|
});
|
|
12110
|
-
exports.
|
|
12111
|
-
|
|
12112
|
-
|
|
12265
|
+
exports.resetCustomerEntitlementUsageV2Body = zod_1.z
|
|
12266
|
+
.object({
|
|
12267
|
+
effectiveAt: zod_1.z.coerce
|
|
12113
12268
|
.date()
|
|
12114
12269
|
.optional()
|
|
12115
|
-
.describe('The
|
|
12116
|
-
|
|
12117
|
-
.
|
|
12118
|
-
.min(1)
|
|
12270
|
+
.describe('The time at which the reset takes effect, defaults to now. The reset cannot be in the future. The provided value is truncated to the minute due to how historical meter data is stored.'),
|
|
12271
|
+
preserveOverage: zod_1.z.coerce
|
|
12272
|
+
.boolean()
|
|
12119
12273
|
.optional()
|
|
12120
|
-
.describe(
|
|
12121
|
-
|
|
12122
|
-
.
|
|
12123
|
-
.min(1)
|
|
12274
|
+
.describe("Determines whether the overage is preserved or forgiven, overriding the entitlement's default behavior.\n- If true, the overage is preserved.\n- If false, the overage is forgiven."),
|
|
12275
|
+
retainAnchor: zod_1.z.coerce
|
|
12276
|
+
.boolean()
|
|
12124
12277
|
.optional()
|
|
12125
|
-
.describe('
|
|
12126
|
-
|
|
12127
|
-
|
|
12128
|
-
|
|
12129
|
-
|
|
12130
|
-
|
|
12278
|
+
.describe('Determines whether the usage period anchor is retained or reset to the effectiveAt time.\n- If true, the usage period anchor is retained.\n- If false, the usage period anchor is reset to the effectiveAt time.'),
|
|
12279
|
+
})
|
|
12280
|
+
.describe('Reset parameters');
|
|
12281
|
+
/**
|
|
12282
|
+
* Checks customer access to a given feature (by key). All entitlement types share the hasAccess property in their value response, but multiple other properties are returned based on the entitlement type.
|
|
12283
|
+
* @summary Get customer entitlement value
|
|
12284
|
+
*/
|
|
12285
|
+
exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
12286
|
+
exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12287
|
+
exports.getCustomerEntitlementValueV2Params = zod_1.z.object({
|
|
12288
|
+
customerIdOrKey: zod_1.z.union([
|
|
12131
12289
|
zod_1.z.coerce
|
|
12132
|
-
.
|
|
12133
|
-
.
|
|
12134
|
-
|
|
12135
|
-
.
|
|
12136
|
-
|
|
12137
|
-
|
|
12290
|
+
.string()
|
|
12291
|
+
.regex(getCustomerEntitlementValueV2PathCustomerIdOrKeyRegExpOne)
|
|
12292
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12293
|
+
zod_1.z.coerce
|
|
12294
|
+
.string()
|
|
12295
|
+
.min(1)
|
|
12296
|
+
.max(getCustomerEntitlementValueV2PathCustomerIdOrKeyMaxTwo)
|
|
12297
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12298
|
+
]),
|
|
12299
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
12300
|
+
.string()
|
|
12301
|
+
.min(1)
|
|
12302
|
+
.max(exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyMax)
|
|
12303
|
+
.regex(exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
12304
|
+
});
|
|
12305
|
+
exports.getCustomerEntitlementValueV2QueryParams = zod_1.z.object({
|
|
12306
|
+
time: zod_1.z.coerce.date().optional(),
|
|
12138
12307
|
});
|
|
12139
12308
|
/**
|
|
12140
|
-
*
|
|
12141
|
-
|
|
12142
|
-
* @summary
|
|
12309
|
+
* List all entitlements for all the customers and features. This endpoint is intended for administrative purposes only.
|
|
12310
|
+
To fetch the entitlements of a specific subject please use the /api/v2/customers/{customerIdOrKey}/entitlements endpoint.
|
|
12311
|
+
* @summary List all entitlements
|
|
12143
12312
|
*/
|
|
12144
|
-
exports.
|
|
12145
|
-
exports.
|
|
12146
|
-
|
|
12147
|
-
|
|
12148
|
-
|
|
12313
|
+
exports.listEntitlementsV2QueryExcludeInactiveDefault = false;
|
|
12314
|
+
exports.listEntitlementsV2QueryPageDefault = 1;
|
|
12315
|
+
exports.listEntitlementsV2QueryPageSizeDefault = 100;
|
|
12316
|
+
exports.listEntitlementsV2QueryPageSizeMax = 1000;
|
|
12317
|
+
exports.listEntitlementsV2QueryOffsetDefault = 0;
|
|
12318
|
+
exports.listEntitlementsV2QueryOffsetMin = 0;
|
|
12319
|
+
exports.listEntitlementsV2QueryLimitDefault = 100;
|
|
12320
|
+
exports.listEntitlementsV2QueryLimitMax = 1000;
|
|
12321
|
+
exports.listEntitlementsV2QueryParams = zod_1.z.object({
|
|
12322
|
+
customerIds: zod_1.z
|
|
12323
|
+
.array(zod_1.z.coerce.string())
|
|
12324
|
+
.optional()
|
|
12325
|
+
.describe('Filtering by multiple customers.\n\nUsage: `?customerIds=01K4WAQ0J99ZZ0MD75HXR112H8&customerIds=01K4WAQ0J99ZZ0MD75HXR112H9`'),
|
|
12326
|
+
customerKeys: zod_1.z
|
|
12327
|
+
.array(zod_1.z.coerce.string())
|
|
12328
|
+
.optional()
|
|
12329
|
+
.describe('Filtering by multiple customers.\n\nUsage: `?customerKeys=customer-1&customerKeys=customer-3`'),
|
|
12330
|
+
entitlementType: zod_1.z
|
|
12331
|
+
.array(zod_1.z
|
|
12332
|
+
.enum(['metered', 'boolean', 'static'])
|
|
12333
|
+
.describe('Type of the entitlement.'))
|
|
12334
|
+
.optional()
|
|
12335
|
+
.describe('Filtering by multiple entitlement types.\n\nUsage: `?entitlementType=metered&entitlementType=boolean`'),
|
|
12336
|
+
excludeInactive: zod_1.z.coerce
|
|
12337
|
+
.boolean()
|
|
12338
|
+
.optional()
|
|
12339
|
+
.describe('Exclude inactive entitlements in the response (those scheduled for later or earlier)'),
|
|
12340
|
+
feature: zod_1.z
|
|
12341
|
+
.array(zod_1.z.coerce.string())
|
|
12342
|
+
.optional()
|
|
12343
|
+
.describe('Filtering by multiple features.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
12344
|
+
limit: zod_1.z.coerce
|
|
12345
|
+
.number()
|
|
12346
|
+
.min(1)
|
|
12347
|
+
.max(exports.listEntitlementsV2QueryLimitMax)
|
|
12348
|
+
.default(exports.listEntitlementsV2QueryLimitDefault)
|
|
12349
|
+
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
12350
|
+
offset: zod_1.z.coerce
|
|
12351
|
+
.number()
|
|
12352
|
+
.min(exports.listEntitlementsV2QueryOffsetMin)
|
|
12353
|
+
.optional()
|
|
12354
|
+
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
12355
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
12356
|
+
orderBy: zod_1.z
|
|
12357
|
+
.enum(['createdAt', 'updatedAt'])
|
|
12358
|
+
.optional()
|
|
12359
|
+
.describe('The order by field.'),
|
|
12360
|
+
page: zod_1.z.coerce
|
|
12361
|
+
.number()
|
|
12362
|
+
.min(1)
|
|
12363
|
+
.default(exports.listEntitlementsV2QueryPageDefault)
|
|
12364
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
12365
|
+
pageSize: zod_1.z.coerce
|
|
12366
|
+
.number()
|
|
12367
|
+
.min(1)
|
|
12368
|
+
.max(exports.listEntitlementsV2QueryPageSizeMax)
|
|
12369
|
+
.default(exports.listEntitlementsV2QueryPageSizeDefault)
|
|
12370
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
12149
12371
|
});
|
|
12150
12372
|
/**
|
|
12151
|
-
*
|
|
12152
|
-
* @summary
|
|
12373
|
+
* Get entitlement by id.
|
|
12374
|
+
* @summary Get entitlement by id
|
|
12153
12375
|
*/
|
|
12154
|
-
exports.
|
|
12155
|
-
exports.
|
|
12156
|
-
|
|
12376
|
+
exports.getEntitlementByIdV2PathEntitlementIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12377
|
+
exports.getEntitlementByIdV2Params = zod_1.z.object({
|
|
12378
|
+
entitlementId: zod_1.z.coerce
|
|
12157
12379
|
.string()
|
|
12158
|
-
.regex(exports.
|
|
12380
|
+
.regex(exports.getEntitlementByIdV2PathEntitlementIdRegExp),
|
|
12159
12381
|
});
|
|
12160
12382
|
/**
|
|
12161
12383
|
* List ingested events with advanced filtering and cursor pagination.
|
|
@@ -12182,4 +12404,68 @@ exports.listEventsV2QueryParams = zod_1.z.object({
|
|
|
12182
12404
|
.default(exports.listEventsV2QueryLimitDefault)
|
|
12183
12405
|
.describe('The limit of the pagination.'),
|
|
12184
12406
|
});
|
|
12407
|
+
/**
|
|
12408
|
+
* List all grants for all the customers and entitlements. This endpoint is intended for administrative purposes only.
|
|
12409
|
+
To fetch the grants of a specific entitlement please use the /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants endpoint.
|
|
12410
|
+
If page is provided that takes precedence and the paginated response is returned.
|
|
12411
|
+
* @summary List grants
|
|
12412
|
+
*/
|
|
12413
|
+
exports.listGrantsV2QueryIncludeDeletedDefault = false;
|
|
12414
|
+
exports.listGrantsV2QueryPageDefault = 1;
|
|
12415
|
+
exports.listGrantsV2QueryPageSizeDefault = 100;
|
|
12416
|
+
exports.listGrantsV2QueryPageSizeMax = 1000;
|
|
12417
|
+
exports.listGrantsV2QueryOffsetDefault = 0;
|
|
12418
|
+
exports.listGrantsV2QueryOffsetMin = 0;
|
|
12419
|
+
exports.listGrantsV2QueryLimitDefault = 100;
|
|
12420
|
+
exports.listGrantsV2QueryLimitMax = 1000;
|
|
12421
|
+
exports.listGrantsV2QueryParams = zod_1.z.object({
|
|
12422
|
+
customer: zod_1.z
|
|
12423
|
+
.array(zod_1.z
|
|
12424
|
+
.union([
|
|
12425
|
+
zod_1.z.coerce
|
|
12426
|
+
.string()
|
|
12427
|
+
.regex(listGrantsV2QueryCustomerItemRegExpOne)
|
|
12428
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12429
|
+
zod_1.z.coerce
|
|
12430
|
+
.string()
|
|
12431
|
+
.min(1)
|
|
12432
|
+
.max(listGrantsV2QueryCustomerItemMaxTwo)
|
|
12433
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12434
|
+
])
|
|
12435
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier) or external unique key.'))
|
|
12436
|
+
.optional()
|
|
12437
|
+
.describe('Filtering by multiple customers (either by ID or key).\n\nUsage: `?customer=customer-1&customer=customer-2`'),
|
|
12438
|
+
feature: zod_1.z
|
|
12439
|
+
.array(zod_1.z.coerce.string())
|
|
12440
|
+
.optional()
|
|
12441
|
+
.describe('Filtering by multiple features.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
12442
|
+
includeDeleted: zod_1.z.coerce.boolean().optional().describe('Include deleted'),
|
|
12443
|
+
limit: zod_1.z.coerce
|
|
12444
|
+
.number()
|
|
12445
|
+
.min(1)
|
|
12446
|
+
.max(exports.listGrantsV2QueryLimitMax)
|
|
12447
|
+
.default(exports.listGrantsV2QueryLimitDefault)
|
|
12448
|
+
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
12449
|
+
offset: zod_1.z.coerce
|
|
12450
|
+
.number()
|
|
12451
|
+
.min(exports.listGrantsV2QueryOffsetMin)
|
|
12452
|
+
.optional()
|
|
12453
|
+
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
12454
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
12455
|
+
orderBy: zod_1.z
|
|
12456
|
+
.enum(['id', 'createdAt', 'updatedAt'])
|
|
12457
|
+
.optional()
|
|
12458
|
+
.describe('The order by field.'),
|
|
12459
|
+
page: zod_1.z.coerce
|
|
12460
|
+
.number()
|
|
12461
|
+
.min(1)
|
|
12462
|
+
.default(exports.listGrantsV2QueryPageDefault)
|
|
12463
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
12464
|
+
pageSize: zod_1.z.coerce
|
|
12465
|
+
.number()
|
|
12466
|
+
.min(1)
|
|
12467
|
+
.max(exports.listGrantsV2QueryPageSizeMax)
|
|
12468
|
+
.default(exports.listGrantsV2QueryPageSizeDefault)
|
|
12469
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
12470
|
+
});
|
|
12185
12471
|
//# sourceMappingURL=index.js.map
|