@openmeter/sdk 1.0.0-beta.221 → 1.0.0-beta.223
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/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 +2551 -1738
- package/dist/cjs/src/client/subjects.d.cts +9 -0
- package/dist/cjs/src/zod/index.cjs +1890 -1639
- package/dist/cjs/src/zod/index.d.cts +1751 -1585
- package/dist/cjs/src/zod/index.js.map +1 -1
- package/dist/cjs/{tsconfig.0bedc47d.tsbuildinfo → tsconfig.07c9b9a6.tsbuildinfo} +1 -1
- package/dist/cjs/{tsconfig.c449a50f.tsbuildinfo → tsconfig.5c5dbdc6.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/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 +2551 -1738
- package/dist/src/client/subjects.d.ts +9 -0
- package/dist/src/zod/index.d.ts +1751 -1585
- package/dist/src/zod/index.js +1873 -1623
- 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.listCustomerEntitlementGrantsV2QueryPageSizeMax = exports.listCustomerEntitlementGrantsV2QueryPageSizeDefault = exports.listCustomerEntitlementGrantsV2QueryPageDefault = exports.listCustomerEntitlementGrantsV2QueryIncludeDeletedDefault = exports.listCustomerEntitlementGrantsV2Params = exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyRegExp = exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyMax = exports.deleteCustomerEntitlementV2Params = exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp = exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax = exports.getCustomerEntitlementV2Params = exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp = exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax = exports.listCustomerEntitlementsV2QueryParams = 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.listEntitlementsV2QueryOffsetMin = exports.listEntitlementsV2QueryOffsetDefault = exports.listEntitlementsV2QueryPageSizeMax = exports.listEntitlementsV2QueryPageSizeDefault = 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 = 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 = void 0;
|
|
28
29
|
/* eslint-disable no-useless-escape */
|
|
29
30
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
30
31
|
// @ts-nocheck
|
|
@@ -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,956 +5550,648 @@ 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
|
-
|
|
5963
|
-
|
|
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()
|
|
5964
5577
|
.min(1)
|
|
5965
|
-
.
|
|
5966
|
-
.
|
|
5967
|
-
|
|
5968
|
-
customerId: zod_1.z
|
|
5969
|
-
.array(zod_1.z.coerce
|
|
5970
|
-
.string()
|
|
5971
|
-
.regex(exports.listEventsQueryCustomerIdItemRegExp)
|
|
5972
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
5973
|
-
.optional()
|
|
5974
|
-
.describe('The event customer ID.'),
|
|
5975
|
-
from: zod_1.z.coerce
|
|
5976
|
-
.date()
|
|
5977
|
-
.optional()
|
|
5978
|
-
.describe('Start date-time in RFC 3339 format.\n\nInclusive.'),
|
|
5979
|
-
id: zod_1.z.coerce
|
|
5980
|
-
.string()
|
|
5981
|
-
.optional()
|
|
5982
|
-
.describe('The event ID.\n\nAccepts partial ID.'),
|
|
5983
|
-
ingestedAtFrom: zod_1.z.coerce
|
|
5984
|
-
.date()
|
|
5985
|
-
.optional()
|
|
5986
|
-
.describe('Start date-time in RFC 3339 format.\n\nInclusive.'),
|
|
5987
|
-
ingestedAtTo: zod_1.z.coerce
|
|
5988
|
-
.date()
|
|
5989
|
-
.optional()
|
|
5990
|
-
.describe('End date-time in RFC 3339 format.\n\nInclusive.'),
|
|
5991
|
-
limit: zod_1.z.coerce
|
|
5578
|
+
.default(exports.listMarketplaceListingsQueryPageDefault)
|
|
5579
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
5580
|
+
pageSize: zod_1.z.coerce
|
|
5992
5581
|
.number()
|
|
5993
5582
|
.min(1)
|
|
5994
|
-
.max(exports.
|
|
5995
|
-
.default(exports.
|
|
5996
|
-
.describe('
|
|
5997
|
-
|
|
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
|
|
5998
5611
|
.string()
|
|
5999
5612
|
.optional()
|
|
6000
|
-
.describe(
|
|
6001
|
-
|
|
6002
|
-
|
|
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()
|
|
6003
5636
|
.optional()
|
|
6004
|
-
.describe(
|
|
5637
|
+
.describe("Name of the application to install.\n\nIf name is not provided defaults to the marketplace listing's name."),
|
|
6005
5638
|
});
|
|
6006
5639
|
/**
|
|
6007
|
-
*
|
|
6008
|
-
|
|
5640
|
+
* Install an app via OAuth.
|
|
5641
|
+
Returns a URL to start the OAuth 2.0 flow.
|
|
5642
|
+
* @summary Get OAuth2 install URL
|
|
6009
5643
|
*/
|
|
6010
|
-
exports.
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
.union([
|
|
6014
|
-
zod_1.z
|
|
6015
|
-
.object({
|
|
6016
|
-
data: zod_1.z
|
|
6017
|
-
.record(zod_1.z.string(), zod_1.z.any())
|
|
6018
|
-
.nullish()
|
|
6019
|
-
.describe('The event payload.\nOptional, if present it must be a JSON object.'),
|
|
6020
|
-
datacontenttype: zod_1.z
|
|
6021
|
-
.enum(['application/json'])
|
|
6022
|
-
.nullish()
|
|
6023
|
-
.describe('Content type of the CloudEvents data value. Only the value \"application/json\" is allowed over HTTP.'),
|
|
6024
|
-
dataschema: zod_1.z.coerce
|
|
6025
|
-
.string()
|
|
6026
|
-
.url()
|
|
6027
|
-
.min(1)
|
|
6028
|
-
.nullish()
|
|
6029
|
-
.describe('Identifies the schema that data adheres to.'),
|
|
6030
|
-
id: zod_1.z.coerce.string().min(1).describe('Identifies the event.'),
|
|
6031
|
-
source: zod_1.z.coerce
|
|
6032
|
-
.string()
|
|
6033
|
-
.min(1)
|
|
6034
|
-
.describe('Identifies the context in which an event happened.'),
|
|
6035
|
-
specversion: zod_1.z.coerce
|
|
6036
|
-
.string()
|
|
6037
|
-
.min(1)
|
|
6038
|
-
.describe('The version of the CloudEvents specification which the event uses.'),
|
|
6039
|
-
subject: zod_1.z.coerce
|
|
6040
|
-
.string()
|
|
6041
|
-
.min(1)
|
|
6042
|
-
.describe('Describes the subject of the event in the context of the event producer (identified by source).'),
|
|
6043
|
-
time: zod_1.z.coerce
|
|
6044
|
-
.date()
|
|
6045
|
-
.nullish()
|
|
6046
|
-
.describe('Timestamp of when the occurrence happened. Must adhere to RFC 3339.'),
|
|
6047
|
-
type: zod_1.z.coerce
|
|
6048
|
-
.string()
|
|
6049
|
-
.min(1)
|
|
6050
|
-
.describe('Contains a value describing the type of event related to the originating occurrence.'),
|
|
6051
|
-
})
|
|
6052
|
-
.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.'),
|
|
6053
|
-
zod_1.z.array(zod_1.z
|
|
6054
|
-
.object({
|
|
6055
|
-
data: zod_1.z
|
|
6056
|
-
.record(zod_1.z.string(), zod_1.z.any())
|
|
6057
|
-
.nullish()
|
|
6058
|
-
.describe('The event payload.\nOptional, if present it must be a JSON object.'),
|
|
6059
|
-
datacontenttype: zod_1.z
|
|
6060
|
-
.enum(['application/json'])
|
|
6061
|
-
.nullish()
|
|
6062
|
-
.describe('Content type of the CloudEvents data value. Only the value \"application/json\" is allowed over HTTP.'),
|
|
6063
|
-
dataschema: zod_1.z.coerce
|
|
6064
|
-
.string()
|
|
6065
|
-
.url()
|
|
6066
|
-
.min(1)
|
|
6067
|
-
.nullish()
|
|
6068
|
-
.describe('Identifies the schema that data adheres to.'),
|
|
6069
|
-
id: zod_1.z.coerce.string().min(1).describe('Identifies the event.'),
|
|
6070
|
-
source: zod_1.z.coerce
|
|
6071
|
-
.string()
|
|
6072
|
-
.min(1)
|
|
6073
|
-
.describe('Identifies the context in which an event happened.'),
|
|
6074
|
-
specversion: zod_1.z.coerce
|
|
6075
|
-
.string()
|
|
6076
|
-
.min(1)
|
|
6077
|
-
.describe('The version of the CloudEvents specification which the event uses.'),
|
|
6078
|
-
subject: zod_1.z.coerce
|
|
6079
|
-
.string()
|
|
6080
|
-
.min(1)
|
|
6081
|
-
.describe('Describes the subject of the event in the context of the event producer (identified by source).'),
|
|
6082
|
-
time: zod_1.z.coerce
|
|
6083
|
-
.date()
|
|
6084
|
-
.nullish()
|
|
6085
|
-
.describe('Timestamp of when the occurrence happened. Must adhere to RFC 3339.'),
|
|
6086
|
-
type: zod_1.z.coerce
|
|
6087
|
-
.string()
|
|
6088
|
-
.min(1)
|
|
6089
|
-
.describe('Contains a value describing the type of event related to the originating occurrence.'),
|
|
6090
|
-
})
|
|
6091
|
-
.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.')),
|
|
6092
|
-
])
|
|
6093
|
-
.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
|
+
});
|
|
6094
5647
|
/**
|
|
6095
|
-
*
|
|
6096
|
-
|
|
5648
|
+
* Authorize OAuth2 code.
|
|
5649
|
+
Verifies the OAuth code and exchanges it for a token and refresh token
|
|
5650
|
+
* @summary Install app via OAuth2
|
|
6097
5651
|
*/
|
|
6098
|
-
exports.
|
|
6099
|
-
|
|
6100
|
-
|
|
6101
|
-
|
|
6102
|
-
|
|
6103
|
-
exports.
|
|
6104
|
-
|
|
6105
|
-
|
|
6106
|
-
exports.listFeaturesQueryParams = zod_1.z.object({
|
|
6107
|
-
includeArchived: zod_1.z.coerce
|
|
6108
|
-
.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()
|
|
6109
5660
|
.optional()
|
|
6110
|
-
.describe('
|
|
6111
|
-
|
|
6112
|
-
.
|
|
6113
|
-
|
|
6114
|
-
|
|
6115
|
-
|
|
6116
|
-
|
|
6117
|
-
|
|
6118
|
-
|
|
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
|
+
])
|
|
6119
5672
|
.optional()
|
|
6120
|
-
.describe('
|
|
6121
|
-
|
|
6122
|
-
.
|
|
6123
|
-
.min(exports.listFeaturesQueryOffsetMin)
|
|
5673
|
+
.describe('Error code.\nRequired with the error response.'),
|
|
5674
|
+
error_description: zod_1.z.coerce
|
|
5675
|
+
.string()
|
|
6124
5676
|
.optional()
|
|
6125
|
-
.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.'),
|
|
6126
5700
|
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
6127
5701
|
orderBy: zod_1.z
|
|
6128
|
-
.enum(['
|
|
5702
|
+
.enum(['key', 'name', 'aggregation', 'createdAt', 'updatedAt'])
|
|
6129
5703
|
.optional()
|
|
6130
5704
|
.describe('The order by field.'),
|
|
6131
5705
|
page: zod_1.z.coerce
|
|
6132
5706
|
.number()
|
|
6133
5707
|
.min(1)
|
|
6134
|
-
.default(exports.
|
|
5708
|
+
.default(exports.listMetersQueryPageDefault)
|
|
6135
5709
|
.describe('Page index.\n\nDefault is 1.'),
|
|
6136
5710
|
pageSize: zod_1.z.coerce
|
|
6137
5711
|
.number()
|
|
6138
5712
|
.min(1)
|
|
6139
|
-
.max(exports.
|
|
6140
|
-
.default(exports.
|
|
5713
|
+
.max(exports.listMetersQueryPageSizeMax)
|
|
5714
|
+
.default(exports.listMetersQueryPageSizeDefault)
|
|
6141
5715
|
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
6142
5716
|
});
|
|
6143
5717
|
/**
|
|
6144
|
-
*
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
|
|
6149
|
-
|
|
6150
|
-
exports.
|
|
6151
|
-
exports.
|
|
6152
|
-
exports.createFeatureBodyMeterSlugMax = 64;
|
|
6153
|
-
exports.createFeatureBodyMeterSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
6154
|
-
exports.createFeatureBody = zod_1.z
|
|
5718
|
+
* Create a meter.
|
|
5719
|
+
* @summary Create meter
|
|
5720
|
+
*/
|
|
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
|
|
6155
5726
|
.object({
|
|
6156
|
-
|
|
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
|
|
6157
5741
|
.string()
|
|
6158
5742
|
.min(1)
|
|
6159
|
-
.
|
|
6160
|
-
|
|
6161
|
-
.
|
|
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.'),
|
|
6162
5748
|
metadata: zod_1.z
|
|
6163
5749
|
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6164
5750
|
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
6165
|
-
.
|
|
6166
|
-
|
|
6167
|
-
|
|
5751
|
+
.nullish()
|
|
5752
|
+
.describe('Additional metadata for the resource.'),
|
|
5753
|
+
name: zod_1.z.coerce
|
|
5754
|
+
.string()
|
|
5755
|
+
.min(1)
|
|
5756
|
+
.max(exports.createMeterBodyNameMax)
|
|
6168
5757
|
.optional()
|
|
6169
|
-
.describe('
|
|
6170
|
-
|
|
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
|
|
6171
5766
|
.string()
|
|
6172
5767
|
.min(1)
|
|
6173
|
-
.max(exports.createFeatureBodyMeterSlugMax)
|
|
6174
|
-
.regex(exports.createFeatureBodyMeterSlugRegExp)
|
|
6175
5768
|
.optional()
|
|
6176
|
-
.describe('
|
|
6177
|
-
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."),
|
|
6178
5770
|
})
|
|
6179
|
-
.describe('
|
|
6180
|
-
/**
|
|
6181
|
-
* Get a feature by ID.
|
|
6182
|
-
* @summary Get feature
|
|
6183
|
-
*/
|
|
6184
|
-
exports.getFeatureParams = zod_1.z.object({
|
|
6185
|
-
featureId: zod_1.z.coerce.string(),
|
|
6186
|
-
});
|
|
5771
|
+
.describe('A meter create model.');
|
|
6187
5772
|
/**
|
|
6188
|
-
*
|
|
6189
|
-
|
|
6190
|
-
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.
|
|
6191
|
-
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.
|
|
6192
|
-
* @summary Delete feature
|
|
5773
|
+
* Get a meter by ID or slug.
|
|
5774
|
+
* @summary Get meter
|
|
6193
5775
|
*/
|
|
6194
|
-
exports.
|
|
6195
|
-
|
|
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),
|
|
6196
5784
|
});
|
|
6197
5785
|
/**
|
|
6198
|
-
*
|
|
6199
|
-
|
|
6200
|
-
If page is provided that takes precedence and the paginated response is returned.
|
|
6201
|
-
* @summary List grants
|
|
5786
|
+
* Update a meter.
|
|
5787
|
+
* @summary Update meter
|
|
6202
5788
|
*/
|
|
6203
|
-
exports.
|
|
6204
|
-
exports.
|
|
6205
|
-
exports.
|
|
6206
|
-
|
|
6207
|
-
|
|
6208
|
-
exports.listGrantsQueryOffsetMin = 0;
|
|
6209
|
-
exports.listGrantsQueryLimitDefault = 100;
|
|
6210
|
-
exports.listGrantsQueryLimitMax = 1000;
|
|
6211
|
-
exports.listGrantsQueryParams = zod_1.z.object({
|
|
6212
|
-
feature: zod_1.z
|
|
6213
|
-
.array(zod_1.z.coerce.string())
|
|
6214
|
-
.optional()
|
|
6215
|
-
.describe('Filtering by multiple features.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
6216
|
-
includeDeleted: zod_1.z.coerce.boolean().optional().describe('Include deleted'),
|
|
6217
|
-
limit: zod_1.z.coerce
|
|
6218
|
-
.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()
|
|
6219
5794
|
.min(1)
|
|
6220
|
-
.max(exports.
|
|
6221
|
-
.
|
|
6222
|
-
|
|
6223
|
-
|
|
6224
|
-
|
|
6225
|
-
|
|
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)
|
|
6226
5805
|
.optional()
|
|
6227
|
-
.describe('
|
|
6228
|
-
|
|
6229
|
-
|
|
6230
|
-
.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())
|
|
6231
5809
|
.optional()
|
|
6232
|
-
.describe('
|
|
6233
|
-
|
|
6234
|
-
.
|
|
6235
|
-
.
|
|
6236
|
-
.
|
|
6237
|
-
.describe('
|
|
6238
|
-
|
|
6239
|
-
.
|
|
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()
|
|
6240
5818
|
.min(1)
|
|
6241
|
-
.max(exports.
|
|
6242
|
-
.default(exports.listGrantsQueryPageSizeDefault)
|
|
6243
|
-
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
6244
|
-
subject: zod_1.z
|
|
6245
|
-
.array(zod_1.z.coerce.string())
|
|
5819
|
+
.max(exports.updateMeterBodyNameMax)
|
|
6246
5820
|
.optional()
|
|
6247
|
-
.describe('
|
|
6248
|
-
})
|
|
6249
|
-
|
|
6250
|
-
* 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.
|
|
6251
|
-
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.
|
|
6252
|
-
* @summary Void grant
|
|
6253
|
-
*/
|
|
6254
|
-
exports.voidGrantParams = zod_1.z.object({
|
|
6255
|
-
grantId: zod_1.z.coerce.string(),
|
|
6256
|
-
});
|
|
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.');
|
|
6257
5824
|
/**
|
|
6258
|
-
*
|
|
6259
|
-
* @summary
|
|
5825
|
+
* Delete a meter.
|
|
5826
|
+
* @summary Delete meter
|
|
6260
5827
|
*/
|
|
6261
|
-
exports.
|
|
6262
|
-
|
|
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),
|
|
6263
5836
|
});
|
|
6264
5837
|
/**
|
|
6265
|
-
*
|
|
6266
|
-
* @summary
|
|
5838
|
+
* Query meter for usage.
|
|
5839
|
+
* @summary Query meter
|
|
6267
5840
|
*/
|
|
6268
|
-
exports.
|
|
6269
|
-
exports.
|
|
6270
|
-
exports.
|
|
6271
|
-
|
|
6272
|
-
|
|
6273
|
-
.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()
|
|
6274
5846
|
.min(1)
|
|
6275
|
-
.
|
|
6276
|
-
.
|
|
6277
|
-
|
|
6278
|
-
|
|
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()
|
|
6279
5856
|
.min(1)
|
|
6280
|
-
.max(exports.
|
|
6281
|
-
.
|
|
6282
|
-
.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'),
|
|
6283
5893
|
});
|
|
6284
5894
|
/**
|
|
6285
|
-
*
|
|
6286
|
-
* @summary Get app details by type
|
|
5895
|
+
* @summary Query meter
|
|
6287
5896
|
*/
|
|
6288
|
-
exports.
|
|
6289
|
-
|
|
6290
|
-
|
|
6291
|
-
|
|
6292
|
-
|
|
6293
|
-
|
|
6294
|
-
|
|
6295
|
-
exports.
|
|
6296
|
-
type: zod_1.z
|
|
6297
|
-
.enum(['stripe', 'sandbox', 'custom_invoicing'])
|
|
6298
|
-
.describe('The type of the app to install.'),
|
|
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),
|
|
6299
5905
|
});
|
|
6300
|
-
exports.
|
|
6301
|
-
exports.
|
|
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
|
|
6302
5912
|
.object({
|
|
6303
|
-
|
|
6304
|
-
.boolean()
|
|
6305
|
-
.default(exports.marketplaceAppInstallBodyCreateBillingProfileDefault)
|
|
6306
|
-
.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.'),
|
|
6307
|
-
name: zod_1.z.coerce
|
|
5913
|
+
clientId: zod_1.z.coerce
|
|
6308
5914
|
.string()
|
|
5915
|
+
.min(1)
|
|
5916
|
+
.max(exports.queryMeterPostBodyClientIdMax)
|
|
6309
5917
|
.optional()
|
|
6310
|
-
.describe(
|
|
6311
|
-
|
|
6312
|
-
|
|
6313
|
-
|
|
6314
|
-
* Install an marketplace app via API Key.
|
|
6315
|
-
* @summary Install app via API key
|
|
6316
|
-
*/
|
|
6317
|
-
exports.marketplaceAppAPIKeyInstallParams = zod_1.z.object({
|
|
6318
|
-
type: zod_1.z
|
|
6319
|
-
.enum(['stripe', 'sandbox', 'custom_invoicing'])
|
|
6320
|
-
.describe('The type of the app to install.'),
|
|
6321
|
-
});
|
|
6322
|
-
exports.marketplaceAppAPIKeyInstallBodyCreateBillingProfileDefault = true;
|
|
6323
|
-
exports.marketplaceAppAPIKeyInstallBody = zod_1.z.object({
|
|
6324
|
-
apiKey: zod_1.z.coerce
|
|
6325
|
-
.string()
|
|
6326
|
-
.describe('The API key for the provider.\nFor example, the Stripe API key.'),
|
|
6327
|
-
createBillingProfile: zod_1.z.coerce
|
|
6328
|
-
.boolean()
|
|
6329
|
-
.default(exports.marketplaceAppAPIKeyInstallBodyCreateBillingProfileDefault)
|
|
6330
|
-
.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.'),
|
|
6331
|
-
name: zod_1.z.coerce
|
|
6332
|
-
.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)
|
|
6333
5922
|
.optional()
|
|
6334
|
-
.describe(
|
|
6335
|
-
|
|
6336
|
-
|
|
6337
|
-
* Install an app via OAuth.
|
|
6338
|
-
Returns a URL to start the OAuth 2.0 flow.
|
|
6339
|
-
* @summary Get OAuth2 install URL
|
|
6340
|
-
*/
|
|
6341
|
-
exports.marketplaceOAuth2InstallGetURLParams = zod_1.z.object({
|
|
6342
|
-
type: zod_1.z.enum(['stripe', 'sandbox', 'custom_invoicing']),
|
|
6343
|
-
});
|
|
6344
|
-
/**
|
|
6345
|
-
* Authorize OAuth2 code.
|
|
6346
|
-
Verifies the OAuth code and exchanges it for a token and refresh token
|
|
6347
|
-
* @summary Install app via OAuth2
|
|
6348
|
-
*/
|
|
6349
|
-
exports.marketplaceOAuth2InstallAuthorizeParams = zod_1.z.object({
|
|
6350
|
-
type: zod_1.z
|
|
6351
|
-
.enum(['stripe', 'sandbox', 'custom_invoicing'])
|
|
6352
|
-
.describe('The type of the app to install.'),
|
|
6353
|
-
});
|
|
6354
|
-
exports.marketplaceOAuth2InstallAuthorizeQueryParams = zod_1.z.object({
|
|
6355
|
-
code: zod_1.z.coerce
|
|
6356
|
-
.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()))
|
|
6357
5926
|
.optional()
|
|
6358
|
-
.describe('
|
|
6359
|
-
|
|
6360
|
-
.
|
|
6361
|
-
'invalid_request',
|
|
6362
|
-
'unauthorized_client',
|
|
6363
|
-
'access_denied',
|
|
6364
|
-
'unsupported_response_type',
|
|
6365
|
-
'invalid_scope',
|
|
6366
|
-
'server_error',
|
|
6367
|
-
'temporarily_unavailable',
|
|
6368
|
-
])
|
|
5927
|
+
.describe('Simple filter for group bys with exact match.'),
|
|
5928
|
+
from: zod_1.z.coerce
|
|
5929
|
+
.date()
|
|
6369
5930
|
.optional()
|
|
6370
|
-
.describe('
|
|
6371
|
-
|
|
6372
|
-
.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)
|
|
6373
5935
|
.optional()
|
|
6374
|
-
.describe('
|
|
6375
|
-
|
|
6376
|
-
.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)
|
|
6377
5940
|
.optional()
|
|
6378
|
-
.describe('
|
|
6379
|
-
|
|
6380
|
-
.
|
|
5941
|
+
.describe('Filtering by multiple subjects.'),
|
|
5942
|
+
to: zod_1.z.coerce
|
|
5943
|
+
.date()
|
|
6381
5944
|
.optional()
|
|
6382
|
-
.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),
|
|
6383
5969
|
});
|
|
6384
5970
|
/**
|
|
6385
|
-
* List
|
|
6386
|
-
* @summary List
|
|
5971
|
+
* List all notification channels.
|
|
5972
|
+
* @summary List notification channels
|
|
6387
5973
|
*/
|
|
6388
|
-
exports.
|
|
6389
|
-
exports.
|
|
6390
|
-
exports.
|
|
6391
|
-
exports.
|
|
6392
|
-
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({
|
|
6393
5980
|
includeDeleted: zod_1.z.coerce
|
|
6394
5981
|
.boolean()
|
|
6395
5982
|
.optional()
|
|
6396
|
-
.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`'),
|
|
6397
5988
|
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
6398
5989
|
orderBy: zod_1.z
|
|
6399
|
-
.enum(['
|
|
5990
|
+
.enum(['id', 'type', 'createdAt', 'updatedAt'])
|
|
6400
5991
|
.optional()
|
|
6401
5992
|
.describe('The order by field.'),
|
|
6402
5993
|
page: zod_1.z.coerce
|
|
6403
5994
|
.number()
|
|
6404
5995
|
.min(1)
|
|
6405
|
-
.default(exports.
|
|
5996
|
+
.default(exports.listNotificationChannelsQueryPageDefault)
|
|
6406
5997
|
.describe('Page index.\n\nDefault is 1.'),
|
|
6407
5998
|
pageSize: zod_1.z.coerce
|
|
6408
5999
|
.number()
|
|
6409
6000
|
.min(1)
|
|
6410
|
-
.max(exports.
|
|
6411
|
-
.default(exports.
|
|
6001
|
+
.max(exports.listNotificationChannelsQueryPageSizeMax)
|
|
6002
|
+
.default(exports.listNotificationChannelsQueryPageSizeDefault)
|
|
6412
6003
|
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
6413
6004
|
});
|
|
6414
6005
|
/**
|
|
6415
|
-
* Create a
|
|
6416
|
-
* @summary Create
|
|
6006
|
+
* Create a new notification channel.
|
|
6007
|
+
* @summary Create a notification channel
|
|
6417
6008
|
*/
|
|
6418
|
-
exports.
|
|
6419
|
-
exports.
|
|
6420
|
-
exports.
|
|
6421
|
-
exports.createMeterBodySlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
6422
|
-
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
|
|
6423
6012
|
.object({
|
|
6424
|
-
|
|
6425
|
-
.enum(['SUM', 'COUNT', 'UNIQUE_COUNT', 'AVG', 'MIN', 'MAX', 'LATEST'])
|
|
6426
|
-
.describe('The aggregation type to use for the meter.')
|
|
6427
|
-
.describe('The aggregation type to use for the meter.'),
|
|
6428
|
-
description: zod_1.z.coerce
|
|
6429
|
-
.string()
|
|
6430
|
-
.max(exports.createMeterBodyDescriptionMax)
|
|
6431
|
-
.optional()
|
|
6432
|
-
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
6433
|
-
eventFrom: zod_1.z.coerce
|
|
6434
|
-
.date()
|
|
6435
|
-
.optional()
|
|
6436
|
-
.describe('The date since the meter should include events.\nUseful to skip old events.\nIf not specified, all historical events are included.'),
|
|
6437
|
-
eventType: zod_1.z.coerce
|
|
6438
|
-
.string()
|
|
6439
|
-
.min(1)
|
|
6440
|
-
.describe('The event type to aggregate.'),
|
|
6441
|
-
groupBy: zod_1.z
|
|
6013
|
+
customHeaders: zod_1.z
|
|
6442
6014
|
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6443
6015
|
.optional()
|
|
6444
|
-
.describe('
|
|
6445
|
-
|
|
6446
|
-
.
|
|
6447
|
-
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
6448
|
-
.nullish()
|
|
6449
|
-
.describe('Additional metadata for the resource.'),
|
|
6450
|
-
name: zod_1.z.coerce
|
|
6451
|
-
.string()
|
|
6452
|
-
.min(1)
|
|
6453
|
-
.max(exports.createMeterBodyNameMax)
|
|
6016
|
+
.describe('Custom HTTP headers sent as part of the webhook request.'),
|
|
6017
|
+
disabled: zod_1.z.coerce
|
|
6018
|
+
.boolean()
|
|
6454
6019
|
.optional()
|
|
6455
|
-
.describe('
|
|
6456
|
-
|
|
6457
|
-
|
|
6458
|
-
.min(1)
|
|
6459
|
-
.max(exports.createMeterBodySlugMax)
|
|
6460
|
-
.regex(exports.createMeterBodySlugRegExp)
|
|
6461
|
-
.describe('A unique, human-readable identifier for the meter.\nMust consist only alphanumeric and underscore characters.'),
|
|
6462
|
-
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
|
|
6463
6023
|
.string()
|
|
6464
|
-
.
|
|
6024
|
+
.regex(exports.createNotificationChannelBodySigningSecretRegExp)
|
|
6465
6025
|
.optional()
|
|
6466
|
-
.describe(
|
|
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
|
|
6029
|
+
.string()
|
|
6030
|
+
.describe('Webhook URL where the notification is sent.'),
|
|
6467
6031
|
})
|
|
6468
|
-
.describe('
|
|
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.');
|
|
6469
6034
|
/**
|
|
6470
|
-
*
|
|
6471
|
-
* @summary
|
|
6035
|
+
* Update notification channel.
|
|
6036
|
+
* @summary Update a notification channel
|
|
6472
6037
|
*/
|
|
6473
|
-
exports.
|
|
6474
|
-
exports.
|
|
6475
|
-
|
|
6476
|
-
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
|
|
6477
6041
|
.string()
|
|
6478
|
-
.
|
|
6479
|
-
.max(exports.getMeterPathMeterIdOrSlugMax)
|
|
6480
|
-
.regex(exports.getMeterPathMeterIdOrSlugRegExp),
|
|
6042
|
+
.regex(exports.updateNotificationChannelPathChannelIdRegExp),
|
|
6481
6043
|
});
|
|
6482
|
-
|
|
6483
|
-
|
|
6484
|
-
|
|
6485
|
-
*/
|
|
6486
|
-
exports.updateMeterPathMeterIdOrSlugMax = 64;
|
|
6487
|
-
exports.updateMeterPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6488
|
-
exports.updateMeterParams = zod_1.z.object({
|
|
6489
|
-
meterIdOrSlug: zod_1.z.coerce
|
|
6490
|
-
.string()
|
|
6491
|
-
.min(1)
|
|
6492
|
-
.max(exports.updateMeterPathMeterIdOrSlugMax)
|
|
6493
|
-
.regex(exports.updateMeterPathMeterIdOrSlugRegExp),
|
|
6494
|
-
});
|
|
6495
|
-
exports.updateMeterBodyDescriptionMax = 1024;
|
|
6496
|
-
exports.updateMeterBodyNameMax = 256;
|
|
6497
|
-
exports.updateMeterBody = zod_1.z
|
|
6044
|
+
exports.updateNotificationChannelBodyDisabledDefault = false;
|
|
6045
|
+
exports.updateNotificationChannelBodySigningSecretRegExp = new RegExp('^(whsec_)?[a-zA-Z0-9+/=]{32,100}$');
|
|
6046
|
+
exports.updateNotificationChannelBody = zod_1.z
|
|
6498
6047
|
.object({
|
|
6499
|
-
|
|
6500
|
-
.string()
|
|
6501
|
-
.max(exports.updateMeterBodyDescriptionMax)
|
|
6502
|
-
.optional()
|
|
6503
|
-
.describe('Optional description of the resource. Maximum 1024 characters.'),
|
|
6504
|
-
groupBy: zod_1.z
|
|
6048
|
+
customHeaders: zod_1.z
|
|
6505
6049
|
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6506
6050
|
.optional()
|
|
6507
|
-
.describe('
|
|
6508
|
-
|
|
6509
|
-
.
|
|
6510
|
-
.
|
|
6511
|
-
.
|
|
6512
|
-
|
|
6513
|
-
|
|
6051
|
+
.describe('Custom HTTP headers sent as part of the webhook request.'),
|
|
6052
|
+
disabled: zod_1.z.coerce
|
|
6053
|
+
.boolean()
|
|
6054
|
+
.optional()
|
|
6055
|
+
.describe('Whether the channel is disabled or not.'),
|
|
6056
|
+
name: zod_1.z.coerce.string().describe('User friendly name of the channel.'),
|
|
6057
|
+
signingSecret: zod_1.z.coerce
|
|
6514
6058
|
.string()
|
|
6515
|
-
.
|
|
6516
|
-
.max(exports.updateMeterBodyNameMax)
|
|
6059
|
+
.regex(exports.updateNotificationChannelBodySigningSecretRegExp)
|
|
6517
6060
|
.optional()
|
|
6518
|
-
.describe('
|
|
6061
|
+
.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'),
|
|
6062
|
+
type: zod_1.z.enum(['WEBHOOK']).describe('Notification channel type.'),
|
|
6063
|
+
url: zod_1.z.coerce
|
|
6064
|
+
.string()
|
|
6065
|
+
.describe('Webhook URL where the notification is sent.'),
|
|
6519
6066
|
})
|
|
6520
|
-
.describe('
|
|
6067
|
+
.describe('Request with input parameters for creating new notification channel with webhook type.')
|
|
6068
|
+
.describe('Union type for requests creating new notification channel with certain type.');
|
|
6521
6069
|
/**
|
|
6522
|
-
*
|
|
6523
|
-
* @summary
|
|
6070
|
+
* Get a notification channel by id.
|
|
6071
|
+
* @summary Get notification channel
|
|
6524
6072
|
*/
|
|
6525
|
-
exports.
|
|
6526
|
-
exports.
|
|
6527
|
-
|
|
6528
|
-
meterIdOrSlug: zod_1.z.coerce
|
|
6073
|
+
exports.getNotificationChannelPathChannelIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6074
|
+
exports.getNotificationChannelParams = zod_1.z.object({
|
|
6075
|
+
channelId: zod_1.z.coerce
|
|
6529
6076
|
.string()
|
|
6530
|
-
.
|
|
6531
|
-
.max(exports.deleteMeterPathMeterIdOrSlugMax)
|
|
6532
|
-
.regex(exports.deleteMeterPathMeterIdOrSlugRegExp),
|
|
6077
|
+
.regex(exports.getNotificationChannelPathChannelIdRegExp),
|
|
6533
6078
|
});
|
|
6534
6079
|
/**
|
|
6535
|
-
*
|
|
6536
|
-
|
|
6080
|
+
* Soft delete notification channel by id.
|
|
6081
|
+
|
|
6082
|
+
Once a notification channel is deleted it cannot be undeleted.
|
|
6083
|
+
* @summary Delete a notification channel
|
|
6537
6084
|
*/
|
|
6538
|
-
exports.
|
|
6539
|
-
exports.
|
|
6540
|
-
|
|
6541
|
-
meterIdOrSlug: zod_1.z.coerce
|
|
6085
|
+
exports.deleteNotificationChannelPathChannelIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6086
|
+
exports.deleteNotificationChannelParams = zod_1.z.object({
|
|
6087
|
+
channelId: zod_1.z.coerce
|
|
6542
6088
|
.string()
|
|
6543
|
-
.
|
|
6544
|
-
.max(exports.queryMeterPathMeterIdOrSlugMax)
|
|
6545
|
-
.regex(exports.queryMeterPathMeterIdOrSlugRegExp),
|
|
6089
|
+
.regex(exports.deleteNotificationChannelPathChannelIdRegExp),
|
|
6546
6090
|
});
|
|
6547
|
-
|
|
6548
|
-
|
|
6549
|
-
|
|
6550
|
-
|
|
6551
|
-
|
|
6091
|
+
/**
|
|
6092
|
+
* List all notification events.
|
|
6093
|
+
* @summary List notification events
|
|
6094
|
+
*/
|
|
6095
|
+
exports.listNotificationEventsQueryRuleItemRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6096
|
+
exports.listNotificationEventsQueryChannelItemRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6097
|
+
exports.listNotificationEventsQueryPageDefault = 1;
|
|
6098
|
+
exports.listNotificationEventsQueryPageSizeDefault = 100;
|
|
6099
|
+
exports.listNotificationEventsQueryPageSizeMax = 1000;
|
|
6100
|
+
exports.listNotificationEventsQueryParams = zod_1.z.object({
|
|
6101
|
+
channel: zod_1.z
|
|
6102
|
+
.array(zod_1.z.coerce
|
|
6552
6103
|
.string()
|
|
6553
|
-
.
|
|
6554
|
-
.
|
|
6104
|
+
.regex(exports.listNotificationEventsQueryChannelItemRegExp)
|
|
6105
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
6555
6106
|
.optional()
|
|
6556
|
-
.describe('
|
|
6557
|
-
|
|
6107
|
+
.describe('Filtering by multiple channel ids.\n\nUsage: `?channel=01J8J4RXH778XB056JS088PCYT&channel=01J8J4S1R1G9EVN62RG23A9M6J`'),
|
|
6108
|
+
feature: zod_1.z
|
|
6558
6109
|
.array(zod_1.z.coerce.string())
|
|
6559
|
-
.max(exports.queryMeterQueryFilterCustomerIdMax)
|
|
6560
|
-
.optional()
|
|
6561
|
-
.describe('Filtering by multiple customers.\n\nFor example: ?filterCustomerId=customer-1&filterCustomerId=customer-2'),
|
|
6562
|
-
filterGroupBy: zod_1.z
|
|
6563
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6564
6110
|
.optional()
|
|
6565
|
-
.describe('
|
|
6111
|
+
.describe('Filtering by multiple feature ids or keys.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
6566
6112
|
from: zod_1.z.coerce
|
|
6567
6113
|
.date()
|
|
6568
6114
|
.optional()
|
|
6569
|
-
.describe('Start date-time in RFC 3339 format.\
|
|
6570
|
-
|
|
6571
|
-
|
|
6115
|
+
.describe('Start date-time in RFC 3339 format.\nInclusive.'),
|
|
6116
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
6117
|
+
orderBy: zod_1.z
|
|
6118
|
+
.enum(['id', 'createdAt'])
|
|
6572
6119
|
.optional()
|
|
6573
|
-
.describe('
|
|
6120
|
+
.describe('The order by field.'),
|
|
6121
|
+
page: zod_1.z.coerce
|
|
6122
|
+
.number()
|
|
6123
|
+
.min(1)
|
|
6124
|
+
.default(exports.listNotificationEventsQueryPageDefault)
|
|
6125
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
6126
|
+
pageSize: zod_1.z.coerce
|
|
6127
|
+
.number()
|
|
6128
|
+
.min(1)
|
|
6129
|
+
.max(exports.listNotificationEventsQueryPageSizeMax)
|
|
6130
|
+
.default(exports.listNotificationEventsQueryPageSizeDefault)
|
|
6131
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
6132
|
+
rule: zod_1.z
|
|
6133
|
+
.array(zod_1.z.coerce
|
|
6134
|
+
.string()
|
|
6135
|
+
.regex(exports.listNotificationEventsQueryRuleItemRegExp)
|
|
6136
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
6137
|
+
.optional()
|
|
6138
|
+
.describe('Filtering by multiple rule ids.\n\nUsage: `?rule=01J8J2XYZ2N5WBYK09EDZFBSZM&rule=01J8J4R4VZH180KRKQ63NB2VA5`'),
|
|
6574
6139
|
subject: zod_1.z
|
|
6575
6140
|
.array(zod_1.z.coerce.string())
|
|
6576
6141
|
.optional()
|
|
6577
|
-
.describe('Filtering by multiple
|
|
6142
|
+
.describe('Filtering by multiple subject ids or keys.\n\nUsage: `?subject=subject-1&subject=subject-2`'),
|
|
6578
6143
|
to: zod_1.z.coerce
|
|
6579
6144
|
.date()
|
|
6580
6145
|
.optional()
|
|
6581
|
-
.describe('End date-time in RFC 3339 format.\
|
|
6582
|
-
windowSize: zod_1.z
|
|
6583
|
-
.enum(['MINUTE', 'HOUR', 'DAY', 'MONTH'])
|
|
6584
|
-
.optional()
|
|
6585
|
-
.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'),
|
|
6586
|
-
windowTimeZone: zod_1.z.coerce
|
|
6587
|
-
.string()
|
|
6588
|
-
.default(exports.queryMeterQueryWindowTimeZoneDefault)
|
|
6589
|
-
.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'),
|
|
6146
|
+
.describe('End date-time in RFC 3339 format.\nInclusive.'),
|
|
6590
6147
|
});
|
|
6591
6148
|
/**
|
|
6592
|
-
*
|
|
6149
|
+
* Get a notification event by id.
|
|
6150
|
+
* @summary Get notification event
|
|
6593
6151
|
*/
|
|
6594
|
-
exports.
|
|
6595
|
-
|
|
6596
|
-
exports.queryMeterPostParams = zod_1.z.object({
|
|
6597
|
-
meterIdOrSlug: zod_1.z.coerce
|
|
6598
|
-
.string()
|
|
6599
|
-
.min(1)
|
|
6600
|
-
.max(exports.queryMeterPostPathMeterIdOrSlugMax)
|
|
6601
|
-
.regex(exports.queryMeterPostPathMeterIdOrSlugRegExp),
|
|
6152
|
+
exports.getNotificationEventParams = zod_1.z.object({
|
|
6153
|
+
eventId: zod_1.z.coerce.string(),
|
|
6602
6154
|
});
|
|
6603
|
-
|
|
6604
|
-
|
|
6605
|
-
|
|
6606
|
-
|
|
6607
|
-
exports.
|
|
6608
|
-
exports.
|
|
6609
|
-
|
|
6610
|
-
|
|
6611
|
-
|
|
6612
|
-
|
|
6613
|
-
|
|
6614
|
-
|
|
6615
|
-
|
|
6616
|
-
filterCustomerId: zod_1.z
|
|
6155
|
+
/**
|
|
6156
|
+
* List all notification rules.
|
|
6157
|
+
* @summary List notification rules
|
|
6158
|
+
*/
|
|
6159
|
+
exports.listNotificationRulesQueryIncludeDeletedDefault = false;
|
|
6160
|
+
exports.listNotificationRulesQueryIncludeDisabledDefault = false;
|
|
6161
|
+
exports.listNotificationRulesQueryFeatureItemMax = 64;
|
|
6162
|
+
exports.listNotificationRulesQueryFeatureItemRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6163
|
+
exports.listNotificationRulesQueryPageDefault = 1;
|
|
6164
|
+
exports.listNotificationRulesQueryPageSizeDefault = 100;
|
|
6165
|
+
exports.listNotificationRulesQueryPageSizeMax = 1000;
|
|
6166
|
+
exports.listNotificationRulesQueryParams = zod_1.z.object({
|
|
6167
|
+
channel: zod_1.z
|
|
6617
6168
|
.array(zod_1.z.coerce.string())
|
|
6618
|
-
.max(exports.queryMeterPostBodyFilterCustomerIdMax)
|
|
6619
|
-
.optional()
|
|
6620
|
-
.describe('Filtering by multiple customers.'),
|
|
6621
|
-
filterGroupBy: zod_1.z
|
|
6622
|
-
.record(zod_1.z.string(), zod_1.z.array(zod_1.z.coerce.string()))
|
|
6623
6169
|
.optional()
|
|
6624
|
-
.describe('
|
|
6625
|
-
|
|
6626
|
-
.
|
|
6627
|
-
.
|
|
6628
|
-
.
|
|
6629
|
-
|
|
6630
|
-
.
|
|
6631
|
-
.
|
|
6170
|
+
.describe('Filtering by multiple notifiaction channel ids.\n\nUsage: `?channel=01ARZ3NDEKTSV4RRFFQ69G5FAV&channel=01J8J2Y5X4NNGQS32CF81W95E3`'),
|
|
6171
|
+
feature: zod_1.z
|
|
6172
|
+
.array(zod_1.z.coerce
|
|
6173
|
+
.string()
|
|
6174
|
+
.min(1)
|
|
6175
|
+
.max(exports.listNotificationRulesQueryFeatureItemMax)
|
|
6176
|
+
.regex(exports.listNotificationRulesQueryFeatureItemRegExp)
|
|
6177
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).\nA key is a unique string that is used to identify a resource.\n\nTODO: this is a temporary solution to support both ULID and Key in the same spec for codegen.'))
|
|
6632
6178
|
.optional()
|
|
6633
|
-
.describe('
|
|
6634
|
-
|
|
6635
|
-
.
|
|
6636
|
-
.max(exports.queryMeterPostBodySubjectMax)
|
|
6179
|
+
.describe('Filtering by multiple feature ids/keys.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
6180
|
+
includeDeleted: zod_1.z.coerce
|
|
6181
|
+
.boolean()
|
|
6637
6182
|
.optional()
|
|
6638
|
-
.describe('
|
|
6639
|
-
|
|
6640
|
-
.
|
|
6183
|
+
.describe('Include deleted notification rules in response.\n\nUsage: `?includeDeleted=true`'),
|
|
6184
|
+
includeDisabled: zod_1.z.coerce
|
|
6185
|
+
.boolean()
|
|
6641
6186
|
.optional()
|
|
6642
|
-
.describe('
|
|
6643
|
-
|
|
6644
|
-
|
|
6645
|
-
.
|
|
6187
|
+
.describe('Include disabled notification rules in response.\n\nUsage: `?includeDisabled=false`'),
|
|
6188
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
6189
|
+
orderBy: zod_1.z
|
|
6190
|
+
.enum(['id', 'type', 'createdAt', 'updatedAt'])
|
|
6646
6191
|
.optional()
|
|
6647
|
-
.describe('
|
|
6648
|
-
|
|
6649
|
-
.
|
|
6650
|
-
.default(exports.queryMeterPostBodyWindowTimeZoneDefault)
|
|
6651
|
-
.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.'),
|
|
6652
|
-
})
|
|
6653
|
-
.describe('A meter query request.');
|
|
6654
|
-
/**
|
|
6655
|
-
* List subjects for a meter.
|
|
6656
|
-
* @summary List meter subjects
|
|
6657
|
-
*/
|
|
6658
|
-
exports.listMeterSubjectsPathMeterIdOrSlugMax = 64;
|
|
6659
|
-
exports.listMeterSubjectsPathMeterIdOrSlugRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6660
|
-
exports.listMeterSubjectsParams = zod_1.z.object({
|
|
6661
|
-
meterIdOrSlug: zod_1.z.coerce
|
|
6662
|
-
.string()
|
|
6663
|
-
.min(1)
|
|
6664
|
-
.max(exports.listMeterSubjectsPathMeterIdOrSlugMax)
|
|
6665
|
-
.regex(exports.listMeterSubjectsPathMeterIdOrSlugRegExp),
|
|
6666
|
-
});
|
|
6667
|
-
/**
|
|
6668
|
-
* List all notification channels.
|
|
6669
|
-
* @summary List notification channels
|
|
6670
|
-
*/
|
|
6671
|
-
exports.listNotificationChannelsQueryIncludeDeletedDefault = false;
|
|
6672
|
-
exports.listNotificationChannelsQueryIncludeDisabledDefault = false;
|
|
6673
|
-
exports.listNotificationChannelsQueryPageDefault = 1;
|
|
6674
|
-
exports.listNotificationChannelsQueryPageSizeDefault = 100;
|
|
6675
|
-
exports.listNotificationChannelsQueryPageSizeMax = 1000;
|
|
6676
|
-
exports.listNotificationChannelsQueryParams = zod_1.z.object({
|
|
6677
|
-
includeDeleted: zod_1.z.coerce
|
|
6678
|
-
.boolean()
|
|
6679
|
-
.optional()
|
|
6680
|
-
.describe('Include deleted notification channels in response.\n\nUsage: `?includeDeleted=true`'),
|
|
6681
|
-
includeDisabled: zod_1.z.coerce
|
|
6682
|
-
.boolean()
|
|
6683
|
-
.optional()
|
|
6684
|
-
.describe('Include disabled notification channels in response.\n\nUsage: `?includeDisabled=false`'),
|
|
6685
|
-
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
6686
|
-
orderBy: zod_1.z
|
|
6687
|
-
.enum(['id', 'type', 'createdAt', 'updatedAt'])
|
|
6688
|
-
.optional()
|
|
6689
|
-
.describe('The order by field.'),
|
|
6690
|
-
page: zod_1.z.coerce
|
|
6691
|
-
.number()
|
|
6692
|
-
.min(1)
|
|
6693
|
-
.default(exports.listNotificationChannelsQueryPageDefault)
|
|
6694
|
-
.describe('Page index.\n\nDefault is 1.'),
|
|
6695
|
-
pageSize: zod_1.z.coerce
|
|
6696
|
-
.number()
|
|
6697
|
-
.min(1)
|
|
6698
|
-
.max(exports.listNotificationChannelsQueryPageSizeMax)
|
|
6699
|
-
.default(exports.listNotificationChannelsQueryPageSizeDefault)
|
|
6700
|
-
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
6701
|
-
});
|
|
6702
|
-
/**
|
|
6703
|
-
* Create a new notification channel.
|
|
6704
|
-
* @summary Create a notification channel
|
|
6705
|
-
*/
|
|
6706
|
-
exports.createNotificationChannelBodyDisabledDefault = false;
|
|
6707
|
-
exports.createNotificationChannelBodySigningSecretRegExp = new RegExp('^(whsec_)?[a-zA-Z0-9+/=]{32,100}$');
|
|
6708
|
-
exports.createNotificationChannelBody = zod_1.z
|
|
6709
|
-
.object({
|
|
6710
|
-
customHeaders: zod_1.z
|
|
6711
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6712
|
-
.optional()
|
|
6713
|
-
.describe('Custom HTTP headers sent as part of the webhook request.'),
|
|
6714
|
-
disabled: zod_1.z.coerce
|
|
6715
|
-
.boolean()
|
|
6716
|
-
.optional()
|
|
6717
|
-
.describe('Whether the channel is disabled or not.'),
|
|
6718
|
-
name: zod_1.z.coerce.string().describe('User friendly name of the channel.'),
|
|
6719
|
-
signingSecret: zod_1.z.coerce
|
|
6720
|
-
.string()
|
|
6721
|
-
.regex(exports.createNotificationChannelBodySigningSecretRegExp)
|
|
6722
|
-
.optional()
|
|
6723
|
-
.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'),
|
|
6724
|
-
type: zod_1.z.enum(['WEBHOOK']).describe('Notification channel type.'),
|
|
6725
|
-
url: zod_1.z.coerce
|
|
6726
|
-
.string()
|
|
6727
|
-
.describe('Webhook URL where the notification is sent.'),
|
|
6728
|
-
})
|
|
6729
|
-
.describe('Request with input parameters for creating new notification channel with webhook type.')
|
|
6730
|
-
.describe('Union type for requests creating new notification channel with certain type.');
|
|
6731
|
-
/**
|
|
6732
|
-
* Update notification channel.
|
|
6733
|
-
* @summary Update a notification channel
|
|
6734
|
-
*/
|
|
6735
|
-
exports.updateNotificationChannelPathChannelIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6736
|
-
exports.updateNotificationChannelParams = zod_1.z.object({
|
|
6737
|
-
channelId: zod_1.z.coerce
|
|
6738
|
-
.string()
|
|
6739
|
-
.regex(exports.updateNotificationChannelPathChannelIdRegExp),
|
|
6740
|
-
});
|
|
6741
|
-
exports.updateNotificationChannelBodyDisabledDefault = false;
|
|
6742
|
-
exports.updateNotificationChannelBodySigningSecretRegExp = new RegExp('^(whsec_)?[a-zA-Z0-9+/=]{32,100}$');
|
|
6743
|
-
exports.updateNotificationChannelBody = zod_1.z
|
|
6744
|
-
.object({
|
|
6745
|
-
customHeaders: zod_1.z
|
|
6746
|
-
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
6747
|
-
.optional()
|
|
6748
|
-
.describe('Custom HTTP headers sent as part of the webhook request.'),
|
|
6749
|
-
disabled: zod_1.z.coerce
|
|
6750
|
-
.boolean()
|
|
6751
|
-
.optional()
|
|
6752
|
-
.describe('Whether the channel is disabled or not.'),
|
|
6753
|
-
name: zod_1.z.coerce.string().describe('User friendly name of the channel.'),
|
|
6754
|
-
signingSecret: zod_1.z.coerce
|
|
6755
|
-
.string()
|
|
6756
|
-
.regex(exports.updateNotificationChannelBodySigningSecretRegExp)
|
|
6757
|
-
.optional()
|
|
6758
|
-
.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'),
|
|
6759
|
-
type: zod_1.z.enum(['WEBHOOK']).describe('Notification channel type.'),
|
|
6760
|
-
url: zod_1.z.coerce
|
|
6761
|
-
.string()
|
|
6762
|
-
.describe('Webhook URL where the notification is sent.'),
|
|
6763
|
-
})
|
|
6764
|
-
.describe('Request with input parameters for creating new notification channel with webhook type.')
|
|
6765
|
-
.describe('Union type for requests creating new notification channel with certain type.');
|
|
6766
|
-
/**
|
|
6767
|
-
* Get a notification channel by id.
|
|
6768
|
-
* @summary Get notification channel
|
|
6769
|
-
*/
|
|
6770
|
-
exports.getNotificationChannelPathChannelIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6771
|
-
exports.getNotificationChannelParams = zod_1.z.object({
|
|
6772
|
-
channelId: zod_1.z.coerce
|
|
6773
|
-
.string()
|
|
6774
|
-
.regex(exports.getNotificationChannelPathChannelIdRegExp),
|
|
6775
|
-
});
|
|
6776
|
-
/**
|
|
6777
|
-
* Soft delete notification channel by id.
|
|
6778
|
-
|
|
6779
|
-
Once a notification channel is deleted it cannot be undeleted.
|
|
6780
|
-
* @summary Delete a notification channel
|
|
6781
|
-
*/
|
|
6782
|
-
exports.deleteNotificationChannelPathChannelIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6783
|
-
exports.deleteNotificationChannelParams = zod_1.z.object({
|
|
6784
|
-
channelId: zod_1.z.coerce
|
|
6785
|
-
.string()
|
|
6786
|
-
.regex(exports.deleteNotificationChannelPathChannelIdRegExp),
|
|
6787
|
-
});
|
|
6788
|
-
/**
|
|
6789
|
-
* List all notification events.
|
|
6790
|
-
* @summary List notification events
|
|
6791
|
-
*/
|
|
6792
|
-
exports.listNotificationEventsQueryRuleItemRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6793
|
-
exports.listNotificationEventsQueryChannelItemRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6794
|
-
exports.listNotificationEventsQueryPageDefault = 1;
|
|
6795
|
-
exports.listNotificationEventsQueryPageSizeDefault = 100;
|
|
6796
|
-
exports.listNotificationEventsQueryPageSizeMax = 1000;
|
|
6797
|
-
exports.listNotificationEventsQueryParams = zod_1.z.object({
|
|
6798
|
-
channel: zod_1.z
|
|
6799
|
-
.array(zod_1.z.coerce
|
|
6800
|
-
.string()
|
|
6801
|
-
.regex(exports.listNotificationEventsQueryChannelItemRegExp)
|
|
6802
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
6803
|
-
.optional()
|
|
6804
|
-
.describe('Filtering by multiple channel ids.\n\nUsage: `?channel=01J8J4RXH778XB056JS088PCYT&channel=01J8J4S1R1G9EVN62RG23A9M6J`'),
|
|
6805
|
-
feature: zod_1.z
|
|
6806
|
-
.array(zod_1.z.coerce.string())
|
|
6807
|
-
.optional()
|
|
6808
|
-
.describe('Filtering by multiple feature ids or keys.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
6809
|
-
from: zod_1.z.coerce
|
|
6810
|
-
.date()
|
|
6811
|
-
.optional()
|
|
6812
|
-
.describe('Start date-time in RFC 3339 format.\nInclusive.'),
|
|
6813
|
-
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
6814
|
-
orderBy: zod_1.z
|
|
6815
|
-
.enum(['id', 'createdAt'])
|
|
6816
|
-
.optional()
|
|
6817
|
-
.describe('The order by field.'),
|
|
6818
|
-
page: zod_1.z.coerce
|
|
6819
|
-
.number()
|
|
6820
|
-
.min(1)
|
|
6821
|
-
.default(exports.listNotificationEventsQueryPageDefault)
|
|
6822
|
-
.describe('Page index.\n\nDefault is 1.'),
|
|
6823
|
-
pageSize: zod_1.z.coerce
|
|
6824
|
-
.number()
|
|
6825
|
-
.min(1)
|
|
6826
|
-
.max(exports.listNotificationEventsQueryPageSizeMax)
|
|
6827
|
-
.default(exports.listNotificationEventsQueryPageSizeDefault)
|
|
6828
|
-
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
6829
|
-
rule: zod_1.z
|
|
6830
|
-
.array(zod_1.z.coerce
|
|
6831
|
-
.string()
|
|
6832
|
-
.regex(exports.listNotificationEventsQueryRuleItemRegExp)
|
|
6833
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'))
|
|
6834
|
-
.optional()
|
|
6835
|
-
.describe('Filtering by multiple rule ids.\n\nUsage: `?rule=01J8J2XYZ2N5WBYK09EDZFBSZM&rule=01J8J4R4VZH180KRKQ63NB2VA5`'),
|
|
6836
|
-
subject: zod_1.z
|
|
6837
|
-
.array(zod_1.z.coerce.string())
|
|
6838
|
-
.optional()
|
|
6839
|
-
.describe('Filtering by multiple subject ids or keys.\n\nUsage: `?subject=subject-1&subject=subject-2`'),
|
|
6840
|
-
to: zod_1.z.coerce
|
|
6841
|
-
.date()
|
|
6842
|
-
.optional()
|
|
6843
|
-
.describe('End date-time in RFC 3339 format.\nInclusive.'),
|
|
6844
|
-
});
|
|
6845
|
-
/**
|
|
6846
|
-
* Get a notification event by id.
|
|
6847
|
-
* @summary Get notification event
|
|
6848
|
-
*/
|
|
6849
|
-
exports.getNotificationEventParams = zod_1.z.object({
|
|
6850
|
-
eventId: zod_1.z.coerce.string(),
|
|
6851
|
-
});
|
|
6852
|
-
/**
|
|
6853
|
-
* List all notification rules.
|
|
6854
|
-
* @summary List notification rules
|
|
6855
|
-
*/
|
|
6856
|
-
exports.listNotificationRulesQueryIncludeDeletedDefault = false;
|
|
6857
|
-
exports.listNotificationRulesQueryIncludeDisabledDefault = false;
|
|
6858
|
-
exports.listNotificationRulesQueryFeatureItemMax = 64;
|
|
6859
|
-
exports.listNotificationRulesQueryFeatureItemRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
6860
|
-
exports.listNotificationRulesQueryPageDefault = 1;
|
|
6861
|
-
exports.listNotificationRulesQueryPageSizeDefault = 100;
|
|
6862
|
-
exports.listNotificationRulesQueryPageSizeMax = 1000;
|
|
6863
|
-
exports.listNotificationRulesQueryParams = zod_1.z.object({
|
|
6864
|
-
channel: zod_1.z
|
|
6865
|
-
.array(zod_1.z.coerce.string())
|
|
6866
|
-
.optional()
|
|
6867
|
-
.describe('Filtering by multiple notifiaction channel ids.\n\nUsage: `?channel=01ARZ3NDEKTSV4RRFFQ69G5FAV&channel=01J8J2Y5X4NNGQS32CF81W95E3`'),
|
|
6868
|
-
feature: zod_1.z
|
|
6869
|
-
.array(zod_1.z.coerce
|
|
6870
|
-
.string()
|
|
6871
|
-
.min(1)
|
|
6872
|
-
.max(exports.listNotificationRulesQueryFeatureItemMax)
|
|
6873
|
-
.regex(exports.listNotificationRulesQueryFeatureItemRegExp)
|
|
6874
|
-
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).\nA key is a unique string that is used to identify a resource.\n\nTODO: this is a temporary solution to support both ULID and Key in the same spec for codegen.'))
|
|
6875
|
-
.optional()
|
|
6876
|
-
.describe('Filtering by multiple feature ids/keys.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
6877
|
-
includeDeleted: zod_1.z.coerce
|
|
6878
|
-
.boolean()
|
|
6879
|
-
.optional()
|
|
6880
|
-
.describe('Include deleted notification rules in response.\n\nUsage: `?includeDeleted=true`'),
|
|
6881
|
-
includeDisabled: zod_1.z.coerce
|
|
6882
|
-
.boolean()
|
|
6883
|
-
.optional()
|
|
6884
|
-
.describe('Include disabled notification rules in response.\n\nUsage: `?includeDisabled=false`'),
|
|
6885
|
-
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
6886
|
-
orderBy: zod_1.z
|
|
6887
|
-
.enum(['id', 'type', 'createdAt', 'updatedAt'])
|
|
6888
|
-
.optional()
|
|
6889
|
-
.describe('The order by field.'),
|
|
6890
|
-
page: zod_1.z.coerce
|
|
6891
|
-
.number()
|
|
6192
|
+
.describe('The order by field.'),
|
|
6193
|
+
page: zod_1.z.coerce
|
|
6194
|
+
.number()
|
|
6892
6195
|
.min(1)
|
|
6893
6196
|
.default(exports.listNotificationRulesQueryPageDefault)
|
|
6894
6197
|
.describe('Page index.\n\nDefault is 1.'),
|
|
@@ -9293,7 +8596,9 @@ exports.createEntitlementBody = zod_1.z
|
|
|
9293
8596
|
.describe('A date-time anchor to base the recurring period on.'),
|
|
9294
8597
|
interval: zod_1.z
|
|
9295
8598
|
.union([
|
|
9296
|
-
zod_1.z.coerce
|
|
8599
|
+
zod_1.z.coerce
|
|
8600
|
+
.string()
|
|
8601
|
+
.regex(createEntitlementBodyUsagePeriodIntervalRegExpTwo),
|
|
9297
8602
|
zod_1.z
|
|
9298
8603
|
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
9299
8604
|
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
@@ -9336,7 +8641,9 @@ exports.createEntitlementBody = zod_1.z
|
|
|
9336
8641
|
.describe('A date-time anchor to base the recurring period on.'),
|
|
9337
8642
|
interval: zod_1.z
|
|
9338
8643
|
.union([
|
|
9339
|
-
zod_1.z.coerce
|
|
8644
|
+
zod_1.z.coerce
|
|
8645
|
+
.string()
|
|
8646
|
+
.regex(createEntitlementBodyUsagePeriodIntervalRegExpSix),
|
|
9340
8647
|
zod_1.z
|
|
9341
8648
|
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
9342
8649
|
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
@@ -9377,7 +8684,9 @@ exports.createEntitlementBody = zod_1.z
|
|
|
9377
8684
|
.describe('A date-time anchor to base the recurring period on.'),
|
|
9378
8685
|
interval: zod_1.z
|
|
9379
8686
|
.union([
|
|
9380
|
-
zod_1.z.coerce
|
|
8687
|
+
zod_1.z.coerce
|
|
8688
|
+
.string()
|
|
8689
|
+
.regex(createEntitlementBodyUsagePeriodIntervalRegExpOnezero),
|
|
9381
8690
|
zod_1.z
|
|
9382
8691
|
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
9383
8692
|
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
@@ -9489,7 +8798,9 @@ exports.createGrantBody = zod_1.z
|
|
|
9489
8798
|
.describe('A date-time anchor to base the recurring period on.'),
|
|
9490
8799
|
interval: zod_1.z
|
|
9491
8800
|
.union([
|
|
9492
|
-
zod_1.z.coerce
|
|
8801
|
+
zod_1.z.coerce
|
|
8802
|
+
.string()
|
|
8803
|
+
.regex(createGrantBodyRecurrenceIntervalRegExpTwo),
|
|
9493
8804
|
zod_1.z
|
|
9494
8805
|
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
9495
8806
|
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
@@ -9592,7 +8903,9 @@ exports.overrideEntitlementBody = zod_1.z
|
|
|
9592
8903
|
.describe('A date-time anchor to base the recurring period on.'),
|
|
9593
8904
|
interval: zod_1.z
|
|
9594
8905
|
.union([
|
|
9595
|
-
zod_1.z.coerce
|
|
8906
|
+
zod_1.z.coerce
|
|
8907
|
+
.string()
|
|
8908
|
+
.regex(overrideEntitlementBodyUsagePeriodIntervalRegExpTwo),
|
|
9596
8909
|
zod_1.z
|
|
9597
8910
|
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
9598
8911
|
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
@@ -9635,7 +8948,9 @@ exports.overrideEntitlementBody = zod_1.z
|
|
|
9635
8948
|
.describe('A date-time anchor to base the recurring period on.'),
|
|
9636
8949
|
interval: zod_1.z
|
|
9637
8950
|
.union([
|
|
9638
|
-
zod_1.z.coerce
|
|
8951
|
+
zod_1.z.coerce
|
|
8952
|
+
.string()
|
|
8953
|
+
.regex(overrideEntitlementBodyUsagePeriodIntervalRegExpSix),
|
|
9639
8954
|
zod_1.z
|
|
9640
8955
|
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
9641
8956
|
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
@@ -9676,7 +8991,9 @@ exports.overrideEntitlementBody = zod_1.z
|
|
|
9676
8991
|
.describe('A date-time anchor to base the recurring period on.'),
|
|
9677
8992
|
interval: zod_1.z
|
|
9678
8993
|
.union([
|
|
9679
|
-
zod_1.z.coerce
|
|
8994
|
+
zod_1.z.coerce
|
|
8995
|
+
.string()
|
|
8996
|
+
.regex(overrideEntitlementBodyUsagePeriodIntervalRegExpOnezero),
|
|
9680
8997
|
zod_1.z
|
|
9681
8998
|
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
9682
8999
|
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
@@ -12097,85 +11414,955 @@ exports.changeSubscriptionBody = zod_1.z
|
|
|
12097
11414
|
.default(exports.changeSubscriptionBodyCustomPlanProRatingConfigDefault)
|
|
12098
11415
|
.describe('Default pro-rating configuration for subscriptions using this plan.'),
|
|
12099
11416
|
})
|
|
12100
|
-
.describe('The template for omitting properties.')
|
|
12101
|
-
.describe('Plan input for custom subscription creation (without key and version).')
|
|
12102
|
-
.describe('The custom plan description which defines the Subscription.'),
|
|
12103
|
-
timing: zod_1.z
|
|
12104
|
-
.union([
|
|
12105
|
-
zod_1.z
|
|
12106
|
-
.enum(['immediate', 'next_billing_cycle'])
|
|
12107
|
-
.describe('Subscription edit timing.\nWhen immediate, the requested changes take effect immediately.\nWhen nextBillingCycle, the requested changes take effect at the next billing cycle.'),
|
|
12108
|
-
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.listCustomerEntitlementsV2QueryParams = zod_1.z.object({
|
|
11729
|
+
includeDeleted: zod_1.z.coerce.boolean().optional(),
|
|
11730
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
11731
|
+
orderBy: zod_1.z
|
|
11732
|
+
.enum(['createdAt', 'updatedAt'])
|
|
11733
|
+
.optional()
|
|
11734
|
+
.describe('The order by field.'),
|
|
11735
|
+
page: zod_1.z.coerce
|
|
11736
|
+
.number()
|
|
11737
|
+
.min(1)
|
|
11738
|
+
.default(exports.listCustomerEntitlementsV2QueryPageDefault)
|
|
11739
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
11740
|
+
pageSize: zod_1.z.coerce
|
|
11741
|
+
.number()
|
|
11742
|
+
.min(1)
|
|
11743
|
+
.max(exports.listCustomerEntitlementsV2QueryPageSizeMax)
|
|
11744
|
+
.default(exports.listCustomerEntitlementsV2QueryPageSizeDefault)
|
|
11745
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
11746
|
+
});
|
|
11747
|
+
/**
|
|
11748
|
+
* Get entitlement by feature key. For checking entitlement access, use the /value endpoint instead.
|
|
11749
|
+
If featureKey is used, the entitlement is resolved for the current timestamp.
|
|
11750
|
+
* @summary Get customer entitlement
|
|
11751
|
+
*/
|
|
11752
|
+
exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11753
|
+
exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11754
|
+
exports.getCustomerEntitlementV2Params = zod_1.z.object({
|
|
11755
|
+
customerIdOrKey: zod_1.z.union([
|
|
11756
|
+
zod_1.z.coerce
|
|
11757
|
+
.string()
|
|
11758
|
+
.regex(getCustomerEntitlementV2PathCustomerIdOrKeyRegExpOne)
|
|
11759
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11760
|
+
zod_1.z.coerce
|
|
11761
|
+
.string()
|
|
11762
|
+
.min(1)
|
|
11763
|
+
.max(getCustomerEntitlementV2PathCustomerIdOrKeyMaxTwo)
|
|
11764
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11765
|
+
]),
|
|
11766
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
11767
|
+
.string()
|
|
11768
|
+
.min(1)
|
|
11769
|
+
.max(exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax)
|
|
11770
|
+
.regex(exports.getCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
11771
|
+
});
|
|
11772
|
+
/**
|
|
11773
|
+
* 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.
|
|
11774
|
+
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.
|
|
11775
|
+
* @summary Delete customer entitlement
|
|
11776
|
+
*/
|
|
11777
|
+
exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11778
|
+
exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11779
|
+
exports.deleteCustomerEntitlementV2Params = zod_1.z.object({
|
|
11780
|
+
customerIdOrKey: zod_1.z.union([
|
|
11781
|
+
zod_1.z.coerce
|
|
11782
|
+
.string()
|
|
11783
|
+
.regex(deleteCustomerEntitlementV2PathCustomerIdOrKeyRegExpOne)
|
|
11784
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11785
|
+
zod_1.z.coerce
|
|
11786
|
+
.string()
|
|
11787
|
+
.min(1)
|
|
11788
|
+
.max(deleteCustomerEntitlementV2PathCustomerIdOrKeyMaxTwo)
|
|
11789
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11790
|
+
]),
|
|
11791
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
11792
|
+
.string()
|
|
11793
|
+
.min(1)
|
|
11794
|
+
.max(exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMax)
|
|
11795
|
+
.regex(exports.deleteCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
11796
|
+
});
|
|
11797
|
+
/**
|
|
11798
|
+
* List all grants issued for an entitlement. The entitlement can be defined either by its id or featureKey.
|
|
11799
|
+
* @summary List customer entitlement grants
|
|
11800
|
+
*/
|
|
11801
|
+
exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11802
|
+
exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11803
|
+
exports.listCustomerEntitlementGrantsV2Params = zod_1.z.object({
|
|
11804
|
+
customerIdOrKey: zod_1.z.union([
|
|
11805
|
+
zod_1.z.coerce
|
|
11806
|
+
.string()
|
|
11807
|
+
.regex(listCustomerEntitlementGrantsV2PathCustomerIdOrKeyRegExpOne)
|
|
11808
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11809
|
+
zod_1.z.coerce
|
|
11810
|
+
.string()
|
|
11811
|
+
.min(1)
|
|
11812
|
+
.max(listCustomerEntitlementGrantsV2PathCustomerIdOrKeyMaxTwo)
|
|
11813
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11814
|
+
]),
|
|
11815
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
11816
|
+
.string()
|
|
11817
|
+
.min(1)
|
|
11818
|
+
.max(exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyMax)
|
|
11819
|
+
.regex(exports.listCustomerEntitlementGrantsV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
11820
|
+
});
|
|
11821
|
+
exports.listCustomerEntitlementGrantsV2QueryIncludeDeletedDefault = false;
|
|
11822
|
+
exports.listCustomerEntitlementGrantsV2QueryPageDefault = 1;
|
|
11823
|
+
exports.listCustomerEntitlementGrantsV2QueryPageSizeDefault = 100;
|
|
11824
|
+
exports.listCustomerEntitlementGrantsV2QueryPageSizeMax = 1000;
|
|
11825
|
+
exports.listCustomerEntitlementGrantsV2QueryOffsetDefault = 0;
|
|
11826
|
+
exports.listCustomerEntitlementGrantsV2QueryOffsetMin = 0;
|
|
11827
|
+
exports.listCustomerEntitlementGrantsV2QueryLimitDefault = 100;
|
|
11828
|
+
exports.listCustomerEntitlementGrantsV2QueryLimitMax = 1000;
|
|
11829
|
+
exports.listCustomerEntitlementGrantsV2QueryParams = zod_1.z.object({
|
|
11830
|
+
includeDeleted: zod_1.z.coerce.boolean().optional(),
|
|
11831
|
+
limit: zod_1.z.coerce
|
|
11832
|
+
.number()
|
|
11833
|
+
.min(1)
|
|
11834
|
+
.max(exports.listCustomerEntitlementGrantsV2QueryLimitMax)
|
|
11835
|
+
.default(exports.listCustomerEntitlementGrantsV2QueryLimitDefault)
|
|
11836
|
+
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
11837
|
+
offset: zod_1.z.coerce
|
|
11838
|
+
.number()
|
|
11839
|
+
.min(exports.listCustomerEntitlementGrantsV2QueryOffsetMin)
|
|
11840
|
+
.optional()
|
|
11841
|
+
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
11842
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
11843
|
+
orderBy: zod_1.z
|
|
11844
|
+
.enum(['id', 'createdAt', 'updatedAt'])
|
|
11845
|
+
.optional()
|
|
11846
|
+
.describe('The order by field.'),
|
|
11847
|
+
page: zod_1.z.coerce
|
|
11848
|
+
.number()
|
|
11849
|
+
.min(1)
|
|
11850
|
+
.default(exports.listCustomerEntitlementGrantsV2QueryPageDefault)
|
|
11851
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
11852
|
+
pageSize: zod_1.z.coerce
|
|
11853
|
+
.number()
|
|
11854
|
+
.min(1)
|
|
11855
|
+
.max(exports.listCustomerEntitlementGrantsV2QueryPageSizeMax)
|
|
11856
|
+
.default(exports.listCustomerEntitlementGrantsV2QueryPageSizeDefault)
|
|
11857
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
11858
|
+
});
|
|
11859
|
+
/**
|
|
11860
|
+
* 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.
|
|
11861
|
+
|
|
11862
|
+
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.
|
|
11863
|
+
|
|
11864
|
+
Grants have a priority setting that determines their order of use. Lower numbers have higher priority, with 0 being the highest priority.
|
|
11865
|
+
|
|
11866
|
+
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).
|
|
11867
|
+
|
|
11868
|
+
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))
|
|
11869
|
+
|
|
11870
|
+
Grants cannot be changed once created, only deleted. This is to ensure that balance is deterministic regardless of when it is queried.
|
|
11871
|
+
* @summary Create customer entitlement grant
|
|
11872
|
+
*/
|
|
11873
|
+
exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11874
|
+
exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11875
|
+
exports.createCustomerEntitlementGrantV2Params = zod_1.z.object({
|
|
11876
|
+
customerIdOrKey: zod_1.z.union([
|
|
11877
|
+
zod_1.z.coerce
|
|
11878
|
+
.string()
|
|
11879
|
+
.regex(createCustomerEntitlementGrantV2PathCustomerIdOrKeyRegExpOne)
|
|
11880
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11881
|
+
zod_1.z.coerce
|
|
11882
|
+
.string()
|
|
11883
|
+
.min(1)
|
|
11884
|
+
.max(createCustomerEntitlementGrantV2PathCustomerIdOrKeyMaxTwo)
|
|
11885
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11886
|
+
]),
|
|
11887
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
11888
|
+
.string()
|
|
11889
|
+
.min(1)
|
|
11890
|
+
.max(exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyMax)
|
|
11891
|
+
.regex(exports.createCustomerEntitlementGrantV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
11892
|
+
});
|
|
11893
|
+
exports.createCustomerEntitlementGrantV2BodyAmountMin = 0;
|
|
11894
|
+
exports.createCustomerEntitlementGrantV2BodyPriorityMax = 255;
|
|
11895
|
+
exports.createCustomerEntitlementGrantV2BodyExpirationCountMax = 1000;
|
|
11896
|
+
exports.createCustomerEntitlementGrantV2BodyMaxRolloverAmountDefault = 0;
|
|
11897
|
+
exports.createCustomerEntitlementGrantV2BodyMinRolloverAmountDefault = 0;
|
|
11898
|
+
exports.createCustomerEntitlementGrantV2Body = zod_1.z
|
|
11899
|
+
.object({
|
|
11900
|
+
amount: zod_1.z.coerce
|
|
11901
|
+
.number()
|
|
11902
|
+
.min(exports.createCustomerEntitlementGrantV2BodyAmountMin)
|
|
11903
|
+
.describe('The amount to grant. Should be a positive number.'),
|
|
11904
|
+
effectiveAt: zod_1.z.coerce
|
|
11905
|
+
.date()
|
|
11906
|
+
.describe('Effective date for grants and anchor for recurring grants. Provided value will be ceiled to metering windowSize (minute).'),
|
|
11907
|
+
expiration: zod_1.z
|
|
11908
|
+
.object({
|
|
11909
|
+
count: zod_1.z.coerce
|
|
11910
|
+
.number()
|
|
11911
|
+
.min(1)
|
|
11912
|
+
.max(exports.createCustomerEntitlementGrantV2BodyExpirationCountMax)
|
|
11913
|
+
.describe('The number of time units in the expiration period.'),
|
|
11914
|
+
duration: zod_1.z
|
|
11915
|
+
.enum(['HOUR', 'DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
11916
|
+
.describe('The expiration duration enum')
|
|
11917
|
+
.describe('The unit of time for the expiration period.'),
|
|
11918
|
+
})
|
|
11919
|
+
.describe('The grant expiration definition')
|
|
11920
|
+
.describe('The grant expiration definition'),
|
|
11921
|
+
maxRolloverAmount: zod_1.z.coerce
|
|
11922
|
+
.number()
|
|
11923
|
+
.optional()
|
|
11924
|
+
.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))'),
|
|
11925
|
+
metadata: zod_1.z
|
|
11926
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
11927
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
11928
|
+
.optional()
|
|
11929
|
+
.describe('The grant metadata.'),
|
|
11930
|
+
minRolloverAmount: zod_1.z.coerce
|
|
11931
|
+
.number()
|
|
11932
|
+
.optional()
|
|
11933
|
+
.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))'),
|
|
11934
|
+
priority: zod_1.z.coerce
|
|
11935
|
+
.number()
|
|
11936
|
+
.min(1)
|
|
11937
|
+
.max(exports.createCustomerEntitlementGrantV2BodyPriorityMax)
|
|
11938
|
+
.optional()
|
|
11939
|
+
.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.'),
|
|
11940
|
+
recurrence: zod_1.z
|
|
11941
|
+
.object({
|
|
11942
|
+
anchor: zod_1.z.coerce
|
|
11943
|
+
.date()
|
|
11944
|
+
.optional()
|
|
11945
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
11946
|
+
interval: zod_1.z
|
|
11947
|
+
.union([
|
|
11948
|
+
zod_1.z.coerce
|
|
11949
|
+
.string()
|
|
11950
|
+
.regex(createCustomerEntitlementGrantV2BodyRecurrenceIntervalRegExpTwo),
|
|
11951
|
+
zod_1.z
|
|
11952
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
11953
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
11954
|
+
])
|
|
11955
|
+
.describe('Period duration for the recurrence')
|
|
11956
|
+
.describe('The unit of time for the interval.'),
|
|
11957
|
+
})
|
|
11958
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
11959
|
+
.optional()
|
|
11960
|
+
.describe('The subject of the grant.'),
|
|
11961
|
+
})
|
|
11962
|
+
.describe('The grant creation input.');
|
|
11963
|
+
/**
|
|
11964
|
+
* Returns historical balance and usage data for the entitlement. The queried history can span accross multiple reset events.
|
|
11965
|
+
|
|
11966
|
+
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.
|
|
11967
|
+
|
|
11968
|
+
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.
|
|
11969
|
+
* @summary Get customer entitlement history
|
|
11970
|
+
*/
|
|
11971
|
+
exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
11972
|
+
exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
11973
|
+
exports.getCustomerEntitlementHistoryV2Params = zod_1.z.object({
|
|
11974
|
+
customerIdOrKey: zod_1.z.union([
|
|
11975
|
+
zod_1.z.coerce
|
|
11976
|
+
.string()
|
|
11977
|
+
.regex(getCustomerEntitlementHistoryV2PathCustomerIdOrKeyRegExpOne)
|
|
11978
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
11979
|
+
zod_1.z.coerce
|
|
11980
|
+
.string()
|
|
11981
|
+
.min(1)
|
|
11982
|
+
.max(getCustomerEntitlementHistoryV2PathCustomerIdOrKeyMaxTwo)
|
|
11983
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
11984
|
+
]),
|
|
11985
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
11986
|
+
.string()
|
|
11987
|
+
.min(1)
|
|
11988
|
+
.max(exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyMax)
|
|
11989
|
+
.regex(exports.getCustomerEntitlementHistoryV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
11990
|
+
});
|
|
11991
|
+
exports.getCustomerEntitlementHistoryV2QueryWindowTimeZoneDefault = 'UTC';
|
|
11992
|
+
exports.getCustomerEntitlementHistoryV2QueryParams = zod_1.z.object({
|
|
11993
|
+
from: zod_1.z.coerce
|
|
11994
|
+
.date()
|
|
11995
|
+
.optional()
|
|
11996
|
+
.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.'),
|
|
11997
|
+
to: zod_1.z.coerce
|
|
11998
|
+
.date()
|
|
11999
|
+
.optional()
|
|
12000
|
+
.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.'),
|
|
12001
|
+
windowSize: zod_1.z
|
|
12002
|
+
.enum(['MINUTE', 'HOUR', 'DAY', 'MONTH'])
|
|
12003
|
+
.describe('Windowsize'),
|
|
12004
|
+
windowTimeZone: zod_1.z.coerce
|
|
12005
|
+
.string()
|
|
12006
|
+
.default(exports.getCustomerEntitlementHistoryV2QueryWindowTimeZoneDefault)
|
|
12007
|
+
.describe('The timezone used when calculating the windows.'),
|
|
12008
|
+
});
|
|
12009
|
+
/**
|
|
12010
|
+
* 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.
|
|
12011
|
+
|
|
12012
|
+
This endpoint is useful for upgrades, downgrades, or other changes to entitlements that require a new entitlement to be created with zero downtime.
|
|
12013
|
+
* @summary Override customer entitlement
|
|
12014
|
+
*/
|
|
12015
|
+
exports.overrideCustomerEntitlementV2Params = zod_1.z.object({
|
|
12016
|
+
customerIdOrKey: zod_1.z.union([
|
|
12017
|
+
zod_1.z.coerce
|
|
12018
|
+
.string()
|
|
12019
|
+
.regex(overrideCustomerEntitlementV2PathCustomerIdOrKeyRegExpOne)
|
|
12020
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12021
|
+
zod_1.z.coerce
|
|
12022
|
+
.string()
|
|
12023
|
+
.min(1)
|
|
12024
|
+
.max(overrideCustomerEntitlementV2PathCustomerIdOrKeyMaxTwo)
|
|
12025
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12026
|
+
]),
|
|
12027
|
+
entitlementIdOrFeatureKey: zod_1.z.union([
|
|
12028
|
+
zod_1.z.coerce
|
|
12029
|
+
.string()
|
|
12030
|
+
.regex(overrideCustomerEntitlementV2PathEntitlementIdOrFeatureKeyRegExpOne)
|
|
12031
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12032
|
+
zod_1.z.coerce
|
|
12033
|
+
.string()
|
|
12034
|
+
.min(1)
|
|
12035
|
+
.max(overrideCustomerEntitlementV2PathEntitlementIdOrFeatureKeyMaxTwo)
|
|
12036
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12037
|
+
]),
|
|
12038
|
+
});
|
|
12039
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyMax = 64;
|
|
12040
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
12041
|
+
exports.overrideCustomerEntitlementV2BodyFeatureIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12042
|
+
exports.overrideCustomerEntitlementV2BodyIsSoftLimitDefault = false;
|
|
12043
|
+
exports.overrideCustomerEntitlementV2BodyIsUnlimitedDefault = false;
|
|
12044
|
+
exports.overrideCustomerEntitlementV2BodyIssueAfterResetMin = 0;
|
|
12045
|
+
exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityDefault = 1;
|
|
12046
|
+
exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityMax = 255;
|
|
12047
|
+
exports.overrideCustomerEntitlementV2BodyPreserveOverageAtResetDefault = false;
|
|
12048
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxOne = 64;
|
|
12049
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpOne = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
12050
|
+
exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpOne = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12051
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxTwo = 64;
|
|
12052
|
+
exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpTwo = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$');
|
|
12053
|
+
exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpTwo = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12054
|
+
exports.overrideCustomerEntitlementV2Body = zod_1.z
|
|
12055
|
+
.union([
|
|
12056
|
+
zod_1.z
|
|
12057
|
+
.object({
|
|
12058
|
+
featureId: zod_1.z.coerce
|
|
12059
|
+
.string()
|
|
12060
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureIdRegExp)
|
|
12061
|
+
.optional()
|
|
12062
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12063
|
+
featureKey: zod_1.z.coerce
|
|
12064
|
+
.string()
|
|
12065
|
+
.min(1)
|
|
12066
|
+
.max(exports.overrideCustomerEntitlementV2BodyFeatureKeyMax)
|
|
12067
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExp)
|
|
12068
|
+
.optional()
|
|
12069
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12070
|
+
isSoftLimit: zod_1.z.coerce
|
|
12071
|
+
.boolean()
|
|
12072
|
+
.optional()
|
|
12073
|
+
.describe('If softLimit=true the subject can use the feature even if the entitlement is exhausted, hasAccess will always be true.'),
|
|
12074
|
+
issueAfterReset: zod_1.z.coerce
|
|
12075
|
+
.number()
|
|
12076
|
+
.min(exports.overrideCustomerEntitlementV2BodyIssueAfterResetMin)
|
|
12077
|
+
.optional()
|
|
12078
|
+
.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.'),
|
|
12079
|
+
issueAfterResetPriority: zod_1.z.coerce
|
|
12080
|
+
.number()
|
|
12081
|
+
.min(1)
|
|
12082
|
+
.max(exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityMax)
|
|
12083
|
+
.default(exports.overrideCustomerEntitlementV2BodyIssueAfterResetPriorityDefault)
|
|
12084
|
+
.describe('Defines the grant priority for the default grant.'),
|
|
12085
|
+
isUnlimited: zod_1.z.coerce
|
|
12086
|
+
.boolean()
|
|
12087
|
+
.optional()
|
|
12088
|
+
.describe('Deprecated, ignored by the backend. Please use isSoftLimit instead; this field will be removed in the future.'),
|
|
12089
|
+
measureUsageFrom: zod_1.z
|
|
12090
|
+
.union([
|
|
12091
|
+
zod_1.z
|
|
12092
|
+
.enum(['CURRENT_PERIOD_START', 'NOW'])
|
|
12093
|
+
.describe('Start of measurement options'),
|
|
12094
|
+
zod_1.z.coerce
|
|
12095
|
+
.date()
|
|
12096
|
+
.describe('[RFC3339](https://tools.ietf.org/html/rfc3339) formatted date-time string in UTC.'),
|
|
12097
|
+
])
|
|
12098
|
+
.describe('Measure usage from')
|
|
12099
|
+
.optional()
|
|
12100
|
+
.describe('Defines the time from which usage is measured. If not specified on creation, defaults to entitlement creation time.'),
|
|
12101
|
+
metadata: zod_1.z
|
|
12102
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
12103
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
12104
|
+
.optional()
|
|
12105
|
+
.describe('Additional metadata for the feature.'),
|
|
12106
|
+
preserveOverageAtReset: zod_1.z.coerce
|
|
12107
|
+
.boolean()
|
|
12108
|
+
.optional()
|
|
12109
|
+
.describe('If true, the overage is preserved at reset. If false, the usage is reset to 0.'),
|
|
12110
|
+
type: zod_1.z.enum(['metered']),
|
|
12111
|
+
usagePeriod: zod_1.z
|
|
12112
|
+
.object({
|
|
12113
|
+
anchor: zod_1.z.coerce
|
|
12114
|
+
.date()
|
|
12115
|
+
.optional()
|
|
12116
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
12117
|
+
interval: zod_1.z
|
|
12118
|
+
.union([
|
|
12119
|
+
zod_1.z.coerce
|
|
12120
|
+
.string()
|
|
12121
|
+
.regex(overrideCustomerEntitlementV2BodyUsagePeriodIntervalRegExpTwo),
|
|
12122
|
+
zod_1.z
|
|
12123
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
12124
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
12125
|
+
])
|
|
12126
|
+
.describe('Period duration for the recurrence')
|
|
12127
|
+
.describe('The unit of time for the interval.'),
|
|
12128
|
+
})
|
|
12129
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
12130
|
+
.describe('The usage period associated with the entitlement.'),
|
|
12131
|
+
})
|
|
12132
|
+
.describe('Create inpurs for metered entitlement'),
|
|
12133
|
+
zod_1.z
|
|
12134
|
+
.object({
|
|
12135
|
+
config: zod_1.z.coerce
|
|
12136
|
+
.string()
|
|
12137
|
+
.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.'),
|
|
12138
|
+
featureId: zod_1.z.coerce
|
|
12139
|
+
.string()
|
|
12140
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpOne)
|
|
12141
|
+
.optional()
|
|
12142
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12143
|
+
featureKey: zod_1.z.coerce
|
|
12144
|
+
.string()
|
|
12145
|
+
.min(1)
|
|
12146
|
+
.max(exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxOne)
|
|
12147
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpOne)
|
|
12148
|
+
.optional()
|
|
12149
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12150
|
+
metadata: zod_1.z
|
|
12151
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
12152
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
12153
|
+
.optional()
|
|
12154
|
+
.describe('Additional metadata for the feature.'),
|
|
12155
|
+
type: zod_1.z.enum(['static']),
|
|
12156
|
+
usagePeriod: zod_1.z
|
|
12157
|
+
.object({
|
|
12158
|
+
anchor: zod_1.z.coerce
|
|
12159
|
+
.date()
|
|
12160
|
+
.optional()
|
|
12161
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
12162
|
+
interval: zod_1.z
|
|
12163
|
+
.union([
|
|
12164
|
+
zod_1.z.coerce
|
|
12165
|
+
.string()
|
|
12166
|
+
.regex(overrideCustomerEntitlementV2BodyUsagePeriodIntervalRegExpSix),
|
|
12167
|
+
zod_1.z
|
|
12168
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
12169
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
12170
|
+
])
|
|
12171
|
+
.describe('Period duration for the recurrence')
|
|
12172
|
+
.describe('The unit of time for the interval.'),
|
|
12173
|
+
})
|
|
12174
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
12175
|
+
.optional()
|
|
12176
|
+
.describe('The usage period associated with the entitlement.'),
|
|
12177
|
+
})
|
|
12178
|
+
.describe('Create inputs for static entitlement'),
|
|
12179
|
+
zod_1.z
|
|
12180
|
+
.object({
|
|
12181
|
+
featureId: zod_1.z.coerce
|
|
12182
|
+
.string()
|
|
12183
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureIdRegExpTwo)
|
|
12184
|
+
.optional()
|
|
12185
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12186
|
+
featureKey: zod_1.z.coerce
|
|
12187
|
+
.string()
|
|
12188
|
+
.min(1)
|
|
12189
|
+
.max(exports.overrideCustomerEntitlementV2BodyFeatureKeyMaxTwo)
|
|
12190
|
+
.regex(exports.overrideCustomerEntitlementV2BodyFeatureKeyRegExpTwo)
|
|
12191
|
+
.optional()
|
|
12192
|
+
.describe('The feature the subject is entitled to use.\nEither featureKey or featureId is required.'),
|
|
12193
|
+
metadata: zod_1.z
|
|
12194
|
+
.record(zod_1.z.string(), zod_1.z.coerce.string())
|
|
12195
|
+
.describe('Set of key-value pairs.\nMetadata can be used to store additional information about a resource.')
|
|
12196
|
+
.optional()
|
|
12197
|
+
.describe('Additional metadata for the feature.'),
|
|
12198
|
+
type: zod_1.z.enum(['boolean']),
|
|
12199
|
+
usagePeriod: zod_1.z
|
|
12200
|
+
.object({
|
|
12201
|
+
anchor: zod_1.z.coerce
|
|
12109
12202
|
.date()
|
|
12110
|
-
.
|
|
12111
|
-
|
|
12112
|
-
|
|
12113
|
-
|
|
12203
|
+
.optional()
|
|
12204
|
+
.describe('A date-time anchor to base the recurring period on.'),
|
|
12205
|
+
interval: zod_1.z
|
|
12206
|
+
.union([
|
|
12207
|
+
zod_1.z.coerce
|
|
12208
|
+
.string()
|
|
12209
|
+
.regex(overrideCustomerEntitlementV2BodyUsagePeriodIntervalRegExpOnezero),
|
|
12210
|
+
zod_1.z
|
|
12211
|
+
.enum(['DAY', 'WEEK', 'MONTH', 'YEAR'])
|
|
12212
|
+
.describe('The unit of time for the interval.\nOne of: `day`, `week`, `month`, or `year`.'),
|
|
12213
|
+
])
|
|
12214
|
+
.describe('Period duration for the recurrence')
|
|
12215
|
+
.describe('The unit of time for the interval.'),
|
|
12216
|
+
})
|
|
12217
|
+
.describe('Recurring period with an interval and an anchor.')
|
|
12218
|
+
.optional()
|
|
12219
|
+
.describe('The usage period associated with the entitlement.'),
|
|
12114
12220
|
})
|
|
12115
|
-
.describe('
|
|
12221
|
+
.describe('Create inputs for boolean entitlement'),
|
|
12116
12222
|
])
|
|
12117
|
-
.describe('
|
|
12223
|
+
.describe('Create inputs for entitlement');
|
|
12118
12224
|
/**
|
|
12119
|
-
*
|
|
12120
|
-
|
|
12121
|
-
|
|
12122
|
-
* @summary
|
|
12225
|
+
* 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.
|
|
12226
|
+
|
|
12227
|
+
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.
|
|
12228
|
+
* @summary Reset customer entitlement
|
|
12123
12229
|
*/
|
|
12124
|
-
exports.
|
|
12125
|
-
exports.
|
|
12126
|
-
|
|
12230
|
+
exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
12231
|
+
exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12232
|
+
exports.resetCustomerEntitlementUsageV2Params = zod_1.z.object({
|
|
12233
|
+
customerIdOrKey: zod_1.z.union([
|
|
12234
|
+
zod_1.z.coerce
|
|
12235
|
+
.string()
|
|
12236
|
+
.regex(resetCustomerEntitlementUsageV2PathCustomerIdOrKeyRegExpOne)
|
|
12237
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12238
|
+
zod_1.z.coerce
|
|
12239
|
+
.string()
|
|
12240
|
+
.min(1)
|
|
12241
|
+
.max(resetCustomerEntitlementUsageV2PathCustomerIdOrKeyMaxTwo)
|
|
12242
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12243
|
+
]),
|
|
12244
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
12127
12245
|
.string()
|
|
12128
|
-
.
|
|
12246
|
+
.min(1)
|
|
12247
|
+
.max(exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyMax)
|
|
12248
|
+
.regex(exports.resetCustomerEntitlementUsageV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
12129
12249
|
});
|
|
12130
|
-
exports.
|
|
12131
|
-
|
|
12132
|
-
|
|
12250
|
+
exports.resetCustomerEntitlementUsageV2Body = zod_1.z
|
|
12251
|
+
.object({
|
|
12252
|
+
effectiveAt: zod_1.z.coerce
|
|
12133
12253
|
.date()
|
|
12134
12254
|
.optional()
|
|
12135
|
-
.describe('The
|
|
12136
|
-
|
|
12137
|
-
.
|
|
12138
|
-
.min(1)
|
|
12255
|
+
.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.'),
|
|
12256
|
+
preserveOverage: zod_1.z.coerce
|
|
12257
|
+
.boolean()
|
|
12139
12258
|
.optional()
|
|
12140
|
-
.describe(
|
|
12141
|
-
|
|
12142
|
-
.
|
|
12143
|
-
.min(1)
|
|
12259
|
+
.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."),
|
|
12260
|
+
retainAnchor: zod_1.z.coerce
|
|
12261
|
+
.boolean()
|
|
12144
12262
|
.optional()
|
|
12145
|
-
.describe('
|
|
12146
|
-
|
|
12147
|
-
|
|
12148
|
-
|
|
12149
|
-
|
|
12150
|
-
|
|
12263
|
+
.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.'),
|
|
12264
|
+
})
|
|
12265
|
+
.describe('Reset parameters');
|
|
12266
|
+
/**
|
|
12267
|
+
* 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.
|
|
12268
|
+
* @summary Get customer entitlement value
|
|
12269
|
+
*/
|
|
12270
|
+
exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyMax = 64;
|
|
12271
|
+
exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyRegExp = new RegExp('^[a-z0-9]+(?:_[a-z0-9]+)*$|^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12272
|
+
exports.getCustomerEntitlementValueV2Params = zod_1.z.object({
|
|
12273
|
+
customerIdOrKey: zod_1.z.union([
|
|
12151
12274
|
zod_1.z.coerce
|
|
12152
|
-
.
|
|
12153
|
-
.
|
|
12154
|
-
|
|
12155
|
-
.
|
|
12156
|
-
|
|
12157
|
-
|
|
12275
|
+
.string()
|
|
12276
|
+
.regex(getCustomerEntitlementValueV2PathCustomerIdOrKeyRegExpOne)
|
|
12277
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12278
|
+
zod_1.z.coerce
|
|
12279
|
+
.string()
|
|
12280
|
+
.min(1)
|
|
12281
|
+
.max(getCustomerEntitlementValueV2PathCustomerIdOrKeyMaxTwo)
|
|
12282
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12283
|
+
]),
|
|
12284
|
+
entitlementIdOrFeatureKey: zod_1.z.coerce
|
|
12285
|
+
.string()
|
|
12286
|
+
.min(1)
|
|
12287
|
+
.max(exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyMax)
|
|
12288
|
+
.regex(exports.getCustomerEntitlementValueV2PathEntitlementIdOrFeatureKeyRegExp),
|
|
12289
|
+
});
|
|
12290
|
+
exports.getCustomerEntitlementValueV2QueryParams = zod_1.z.object({
|
|
12291
|
+
time: zod_1.z.coerce.date().optional(),
|
|
12158
12292
|
});
|
|
12159
12293
|
/**
|
|
12160
|
-
*
|
|
12161
|
-
|
|
12162
|
-
* @summary
|
|
12294
|
+
* List all entitlements for all the customers and features. This endpoint is intended for administrative purposes only.
|
|
12295
|
+
To fetch the entitlements of a specific subject please use the /api/v2/customers/{customerIdOrKey}/entitlements endpoint.
|
|
12296
|
+
* @summary List all entitlements
|
|
12163
12297
|
*/
|
|
12164
|
-
exports.
|
|
12165
|
-
exports.
|
|
12166
|
-
|
|
12167
|
-
|
|
12168
|
-
|
|
12298
|
+
exports.listEntitlementsV2QueryExcludeInactiveDefault = false;
|
|
12299
|
+
exports.listEntitlementsV2QueryPageDefault = 1;
|
|
12300
|
+
exports.listEntitlementsV2QueryPageSizeDefault = 100;
|
|
12301
|
+
exports.listEntitlementsV2QueryPageSizeMax = 1000;
|
|
12302
|
+
exports.listEntitlementsV2QueryOffsetDefault = 0;
|
|
12303
|
+
exports.listEntitlementsV2QueryOffsetMin = 0;
|
|
12304
|
+
exports.listEntitlementsV2QueryLimitDefault = 100;
|
|
12305
|
+
exports.listEntitlementsV2QueryLimitMax = 1000;
|
|
12306
|
+
exports.listEntitlementsV2QueryParams = zod_1.z.object({
|
|
12307
|
+
customerIds: zod_1.z
|
|
12308
|
+
.array(zod_1.z.coerce.string())
|
|
12309
|
+
.optional()
|
|
12310
|
+
.describe('Filtering by multiple customers.\n\nUsage: `?customerIds=01K4WAQ0J99ZZ0MD75HXR112H8&customerIds=01K4WAQ0J99ZZ0MD75HXR112H9`'),
|
|
12311
|
+
customerKeys: zod_1.z
|
|
12312
|
+
.array(zod_1.z.coerce.string())
|
|
12313
|
+
.optional()
|
|
12314
|
+
.describe('Filtering by multiple customers.\n\nUsage: `?customerKeys=customer-1&customerKeys=customer-3`'),
|
|
12315
|
+
entitlementType: zod_1.z
|
|
12316
|
+
.array(zod_1.z
|
|
12317
|
+
.enum(['metered', 'boolean', 'static'])
|
|
12318
|
+
.describe('Type of the entitlement.'))
|
|
12319
|
+
.optional()
|
|
12320
|
+
.describe('Filtering by multiple entitlement types.\n\nUsage: `?entitlementType=metered&entitlementType=boolean`'),
|
|
12321
|
+
excludeInactive: zod_1.z.coerce
|
|
12322
|
+
.boolean()
|
|
12323
|
+
.optional()
|
|
12324
|
+
.describe('Exclude inactive entitlements in the response (those scheduled for later or earlier)'),
|
|
12325
|
+
feature: zod_1.z
|
|
12326
|
+
.array(zod_1.z.coerce.string())
|
|
12327
|
+
.optional()
|
|
12328
|
+
.describe('Filtering by multiple features.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
12329
|
+
limit: zod_1.z.coerce
|
|
12330
|
+
.number()
|
|
12331
|
+
.min(1)
|
|
12332
|
+
.max(exports.listEntitlementsV2QueryLimitMax)
|
|
12333
|
+
.default(exports.listEntitlementsV2QueryLimitDefault)
|
|
12334
|
+
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
12335
|
+
offset: zod_1.z.coerce
|
|
12336
|
+
.number()
|
|
12337
|
+
.min(exports.listEntitlementsV2QueryOffsetMin)
|
|
12338
|
+
.optional()
|
|
12339
|
+
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
12340
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
12341
|
+
orderBy: zod_1.z
|
|
12342
|
+
.enum(['createdAt', 'updatedAt'])
|
|
12343
|
+
.optional()
|
|
12344
|
+
.describe('The order by field.'),
|
|
12345
|
+
page: zod_1.z.coerce
|
|
12346
|
+
.number()
|
|
12347
|
+
.min(1)
|
|
12348
|
+
.default(exports.listEntitlementsV2QueryPageDefault)
|
|
12349
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
12350
|
+
pageSize: zod_1.z.coerce
|
|
12351
|
+
.number()
|
|
12352
|
+
.min(1)
|
|
12353
|
+
.max(exports.listEntitlementsV2QueryPageSizeMax)
|
|
12354
|
+
.default(exports.listEntitlementsV2QueryPageSizeDefault)
|
|
12355
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
12169
12356
|
});
|
|
12170
12357
|
/**
|
|
12171
|
-
*
|
|
12172
|
-
* @summary
|
|
12358
|
+
* Get entitlement by id.
|
|
12359
|
+
* @summary Get entitlement by id
|
|
12173
12360
|
*/
|
|
12174
|
-
exports.
|
|
12175
|
-
exports.
|
|
12176
|
-
|
|
12361
|
+
exports.getEntitlementByIdV2PathEntitlementIdRegExp = new RegExp('^[0-7][0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{25}$');
|
|
12362
|
+
exports.getEntitlementByIdV2Params = zod_1.z.object({
|
|
12363
|
+
entitlementId: zod_1.z.coerce
|
|
12177
12364
|
.string()
|
|
12178
|
-
.regex(exports.
|
|
12365
|
+
.regex(exports.getEntitlementByIdV2PathEntitlementIdRegExp),
|
|
12179
12366
|
});
|
|
12180
12367
|
/**
|
|
12181
12368
|
* List ingested events with advanced filtering and cursor pagination.
|
|
@@ -12202,4 +12389,68 @@ exports.listEventsV2QueryParams = zod_1.z.object({
|
|
|
12202
12389
|
.default(exports.listEventsV2QueryLimitDefault)
|
|
12203
12390
|
.describe('The limit of the pagination.'),
|
|
12204
12391
|
});
|
|
12392
|
+
/**
|
|
12393
|
+
* List all grants for all the customers and entitlements. This endpoint is intended for administrative purposes only.
|
|
12394
|
+
To fetch the grants of a specific entitlement please use the /api/v2/customers/{customerIdOrKey}/entitlements/{entitlementIdOrFeatureKey}/grants endpoint.
|
|
12395
|
+
If page is provided that takes precedence and the paginated response is returned.
|
|
12396
|
+
* @summary List grants
|
|
12397
|
+
*/
|
|
12398
|
+
exports.listGrantsV2QueryIncludeDeletedDefault = false;
|
|
12399
|
+
exports.listGrantsV2QueryPageDefault = 1;
|
|
12400
|
+
exports.listGrantsV2QueryPageSizeDefault = 100;
|
|
12401
|
+
exports.listGrantsV2QueryPageSizeMax = 1000;
|
|
12402
|
+
exports.listGrantsV2QueryOffsetDefault = 0;
|
|
12403
|
+
exports.listGrantsV2QueryOffsetMin = 0;
|
|
12404
|
+
exports.listGrantsV2QueryLimitDefault = 100;
|
|
12405
|
+
exports.listGrantsV2QueryLimitMax = 1000;
|
|
12406
|
+
exports.listGrantsV2QueryParams = zod_1.z.object({
|
|
12407
|
+
customer: zod_1.z
|
|
12408
|
+
.array(zod_1.z
|
|
12409
|
+
.union([
|
|
12410
|
+
zod_1.z.coerce
|
|
12411
|
+
.string()
|
|
12412
|
+
.regex(listGrantsV2QueryCustomerItemRegExpOne)
|
|
12413
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier).'),
|
|
12414
|
+
zod_1.z.coerce
|
|
12415
|
+
.string()
|
|
12416
|
+
.min(1)
|
|
12417
|
+
.max(listGrantsV2QueryCustomerItemMaxTwo)
|
|
12418
|
+
.describe('ExternalKey is a looser version of key.'),
|
|
12419
|
+
])
|
|
12420
|
+
.describe('ULID (Universally Unique Lexicographically Sortable Identifier) or external unique key.'))
|
|
12421
|
+
.optional()
|
|
12422
|
+
.describe('Filtering by multiple customers (either by ID or key).\n\nUsage: `?customer=customer-1&customer=customer-2`'),
|
|
12423
|
+
feature: zod_1.z
|
|
12424
|
+
.array(zod_1.z.coerce.string())
|
|
12425
|
+
.optional()
|
|
12426
|
+
.describe('Filtering by multiple features.\n\nUsage: `?feature=feature-1&feature=feature-2`'),
|
|
12427
|
+
includeDeleted: zod_1.z.coerce.boolean().optional().describe('Include deleted'),
|
|
12428
|
+
limit: zod_1.z.coerce
|
|
12429
|
+
.number()
|
|
12430
|
+
.min(1)
|
|
12431
|
+
.max(exports.listGrantsV2QueryLimitMax)
|
|
12432
|
+
.default(exports.listGrantsV2QueryLimitDefault)
|
|
12433
|
+
.describe('Number of items to return.\n\nDefault is 100.'),
|
|
12434
|
+
offset: zod_1.z.coerce
|
|
12435
|
+
.number()
|
|
12436
|
+
.min(exports.listGrantsV2QueryOffsetMin)
|
|
12437
|
+
.optional()
|
|
12438
|
+
.describe('Number of items to skip.\n\nDefault is 0.'),
|
|
12439
|
+
order: zod_1.z.enum(['ASC', 'DESC']).optional().describe('The order direction.'),
|
|
12440
|
+
orderBy: zod_1.z
|
|
12441
|
+
.enum(['id', 'createdAt', 'updatedAt'])
|
|
12442
|
+
.optional()
|
|
12443
|
+
.describe('The order by field.'),
|
|
12444
|
+
page: zod_1.z.coerce
|
|
12445
|
+
.number()
|
|
12446
|
+
.min(1)
|
|
12447
|
+
.default(exports.listGrantsV2QueryPageDefault)
|
|
12448
|
+
.describe('Page index.\n\nDefault is 1.'),
|
|
12449
|
+
pageSize: zod_1.z.coerce
|
|
12450
|
+
.number()
|
|
12451
|
+
.min(1)
|
|
12452
|
+
.max(exports.listGrantsV2QueryPageSizeMax)
|
|
12453
|
+
.default(exports.listGrantsV2QueryPageSizeDefault)
|
|
12454
|
+
.describe('The maximum number of items per page.\n\nDefault is 100.'),
|
|
12455
|
+
});
|
|
12205
12456
|
//# sourceMappingURL=index.js.map
|